Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore286
-rwxr-xr-xdocs/.project2
-rw-r--r--examples/org.eclipse.tcf.examples.daytime/.classpath (renamed from examples/org.eclipse.tm.tcf.examples.daytime/.classpath)0
-rw-r--r--examples/org.eclipse.tcf.examples.daytime/.project (renamed from examples/org.eclipse.tm.tcf.examples.daytime/.project)2
-rw-r--r--examples/org.eclipse.tcf.examples.daytime/.settings/org.eclipse.jdt.core.prefs (renamed from examples/org.eclipse.tm.tcf.examples.daytime/.settings/org.eclipse.jdt.core.prefs)0
-rw-r--r--examples/org.eclipse.tcf.examples.daytime/.settings/org.eclipse.jdt.ui.prefs (renamed from examples/org.eclipse.tm.tcf.examples.daytime/.settings/org.eclipse.jdt.ui.prefs)0
-rw-r--r--examples/org.eclipse.tcf.examples.daytime/META-INF/MANIFEST.MF14
-rw-r--r--examples/org.eclipse.tcf.examples.daytime/about.html (renamed from examples/org.eclipse.tm.tcf.examples.daytime/about.html)0
-rw-r--r--examples/org.eclipse.tcf.examples.daytime/build.properties (renamed from examples/org.eclipse.tm.tcf.examples.daytime/build.properties)0
-rw-r--r--examples/org.eclipse.tcf.examples.daytime/plugin.properties (renamed from examples/org.eclipse.tm.tcf.examples.daytime/plugin.properties)2
-rw-r--r--examples/org.eclipse.tcf.examples.daytime/plugin.xml9
-rw-r--r--examples/org.eclipse.tcf.examples.daytime/readme.txt (renamed from examples/org.eclipse.tm.tcf.examples.daytime/readme.txt)0
-rw-r--r--examples/org.eclipse.tcf.examples.daytime/src/org/eclipse/tcf/internal/examples/daytime/Activator.java (renamed from examples/org.eclipse.tm.tcf.examples.daytime/src/org/eclipse/tm/internal/tcf/examples/daytime/Activator.java)4
-rw-r--r--examples/org.eclipse.tcf.examples.daytime/src/org/eclipse/tcf/internal/examples/daytime/DaytimeServiceProxy.java (renamed from examples/org.eclipse.tm.tcf.examples.daytime/src/org/eclipse/tm/internal/tcf/examples/daytime/DaytimeServiceProxy.java)12
-rw-r--r--examples/org.eclipse.tcf.examples.daytime/src/org/eclipse/tcf/internal/examples/daytime/IDaytimeService.java (renamed from examples/org.eclipse.tm.tcf.examples.daytime/src/org/eclipse/tm/internal/tcf/examples/daytime/IDaytimeService.java)6
-rw-r--r--examples/org.eclipse.tm.tcf.examples.daytime.agent/.cproject209
-rw-r--r--examples/org.eclipse.tm.tcf.examples.daytime.agent/.project81
-rw-r--r--examples/org.eclipse.tm.tcf.examples.daytime.agent/Makefile30
-rw-r--r--examples/org.eclipse.tm.tcf.examples.daytime.agent/about.html31
-rw-r--r--examples/org.eclipse.tm.tcf.examples.daytime.agent/config.h44
-rw-r--r--examples/org.eclipse.tm.tcf.examples.daytime.agent/daytime.c68
-rw-r--r--examples/org.eclipse.tm.tcf.examples.daytime.agent/daytime.h28
-rw-r--r--examples/org.eclipse.tm.tcf.examples.daytime.agent/edl-v10.html59
-rw-r--r--examples/org.eclipse.tm.tcf.examples.daytime.agent/main/services-ext.h26
-rw-r--r--examples/org.eclipse.tm.tcf.examples.daytime.agent/readme.txt17
-rw-r--r--examples/org.eclipse.tm.tcf.examples.daytime/META-INF/MANIFEST.MF14
-rw-r--r--examples/org.eclipse.tm.tcf.examples.daytime/plugin.xml9
-rw-r--r--features/org.eclipse.tcf.cdt.feature/.project (renamed from features/org.eclipse.tm.tcf.cdt.feature/.project)2
-rw-r--r--features/org.eclipse.tcf.cdt.feature/build.properties (renamed from features/org.eclipse.tm.tcf.cdt.feature/build.properties)0
-rw-r--r--features/org.eclipse.tcf.cdt.feature/eclipse_update_120.jpg (renamed from features/org.eclipse.tm.tcf.cdt.feature/eclipse_update_120.jpg)bin21695 -> 21695 bytes
-rw-r--r--features/org.eclipse.tcf.cdt.feature/epl-v10.html (renamed from features/org.eclipse.tm.tcf.cdt.feature/epl-v10.html)0
-rw-r--r--features/org.eclipse.tcf.cdt.feature/feature.properties (renamed from features/org.eclipse.tm.tcf.rse.feature/feature.properties)2
-rw-r--r--features/org.eclipse.tcf.cdt.feature/feature.xml (renamed from features/org.eclipse.tm.tcf.cdt.feature/feature.xml)16
-rw-r--r--features/org.eclipse.tcf.cdt.feature/license.html (renamed from features/org.eclipse.tm.tcf.cdt.feature/license.html)0
-rw-r--r--features/org.eclipse.tcf.cdt.feature/pom.xml (renamed from features/org.eclipse.tm.tcf.sdk.feature/pom.xml)6
-rw-r--r--features/org.eclipse.tcf.cdt.sdk.feature/.project (renamed from features/org.eclipse.tm.tcf.rse.sdk.feature/.project)2
-rw-r--r--features/org.eclipse.tcf.cdt.sdk.feature/build.properties (renamed from features/org.eclipse.tm.tcf.cdt.sdk.feature/build.properties)0
-rw-r--r--features/org.eclipse.tcf.cdt.sdk.feature/eclipse_update_120.jpg (renamed from features/org.eclipse.tm.tcf.cdt.sdk.feature/eclipse_update_120.jpg)bin21695 -> 21695 bytes
-rw-r--r--features/org.eclipse.tcf.cdt.sdk.feature/epl-v10.html (renamed from features/org.eclipse.tm.tcf.cdt.sdk.feature/epl-v10.html)0
-rw-r--r--features/org.eclipse.tcf.cdt.sdk.feature/feature.properties (renamed from features/org.eclipse.tm.tcf.cdt.feature/feature.properties)2
-rw-r--r--features/org.eclipse.tcf.cdt.sdk.feature/feature.xml (renamed from features/org.eclipse.tm.tcf.rse.sdk.feature/feature.xml)10
-rw-r--r--features/org.eclipse.tcf.cdt.sdk.feature/license.html (renamed from features/org.eclipse.tm.tcf.cdt.sdk.feature/license.html)0
-rw-r--r--features/org.eclipse.tcf.cdt.sdk.feature/pom.xml17
-rw-r--r--features/org.eclipse.tcf.feature/.project (renamed from features/org.eclipse.tm.tcf.feature/.project)2
-rw-r--r--features/org.eclipse.tcf.feature/build.properties (renamed from features/org.eclipse.tm.tcf.feature/build.properties)0
-rw-r--r--features/org.eclipse.tcf.feature/eclipse_update_120.jpg (renamed from features/org.eclipse.tm.tcf.feature/eclipse_update_120.jpg)bin21695 -> 21695 bytes
-rw-r--r--features/org.eclipse.tcf.feature/epl-v10.html (renamed from features/org.eclipse.tm.tcf.feature/epl-v10.html)0
-rw-r--r--features/org.eclipse.tcf.feature/feature.properties (renamed from features/org.eclipse.tm.tcf.feature/feature.properties)2
-rw-r--r--features/org.eclipse.tcf.feature/feature.xml (renamed from features/org.eclipse.tm.tcf.feature/feature.xml)14
-rw-r--r--features/org.eclipse.tcf.feature/license.html (renamed from features/org.eclipse.tm.tcf.feature/license.html)0
-rw-r--r--features/org.eclipse.tcf.feature/pom.xml (renamed from features/org.eclipse.tm.tcf.feature/pom.xml)6
-rw-r--r--features/org.eclipse.tcf.headless.build/.project (renamed from features/org.eclipse.tm.tcf.headless.build/.project)2
-rw-r--r--features/org.eclipse.tcf.headless.build/.settings/org.eclipse.pde.core.prefs (renamed from features/org.eclipse.tm.tcf.headless.build/.settings/org.eclipse.pde.core.prefs)0
-rw-r--r--features/org.eclipse.tcf.headless.build/TCF Headless Build.launch (renamed from features/org.eclipse.tm.tcf.headless.build/TCF Headless Build.launch)0
-rw-r--r--features/org.eclipse.tcf.headless.build/builder/build.properties (renamed from features/org.eclipse.tm.tcf.headless.build/builder/build.properties)2
-rw-r--r--features/org.eclipse.tcf.headless.build/builder/customTargets.xml (renamed from features/org.eclipse.tm.tcf.headless.build/builder/customTargets.xml)24
-rw-r--r--features/org.eclipse.tcf.repo/.project (renamed from features/org.eclipse.tm.tcf.repo/.project)2
-rw-r--r--features/org.eclipse.tcf.repo/category.xml55
-rw-r--r--features/org.eclipse.tcf.repo/pom.xml (renamed from features/org.eclipse.tm.tcf.repo/pom.xml)12
-rw-r--r--features/org.eclipse.tcf.rse.feature/.project (renamed from features/org.eclipse.tm.tcf.rse.feature/.project)2
-rw-r--r--features/org.eclipse.tcf.rse.feature/build.properties (renamed from features/org.eclipse.tm.tcf.rse.feature/build.properties)0
-rw-r--r--features/org.eclipse.tcf.rse.feature/eclipse_update_120.jpg (renamed from features/org.eclipse.tm.tcf.rse.feature/eclipse_update_120.jpg)bin21695 -> 21695 bytes
-rw-r--r--features/org.eclipse.tcf.rse.feature/epl-v10.html (renamed from features/org.eclipse.tm.tcf.rse.feature/epl-v10.html)0
-rw-r--r--features/org.eclipse.tcf.rse.feature/feature.properties (renamed from features/org.eclipse.tm.tcf.cdt.sdk.feature/feature.properties)2
-rw-r--r--features/org.eclipse.tcf.rse.feature/feature.xml (renamed from features/org.eclipse.tm.tcf.rse.feature/feature.xml)14
-rw-r--r--features/org.eclipse.tcf.rse.feature/license.html (renamed from features/org.eclipse.tm.tcf.rse.feature/license.html)0
-rw-r--r--features/org.eclipse.tcf.rse.feature/pom.xml (renamed from features/org.eclipse.tm.tcf.cdt.feature/pom.xml)6
-rw-r--r--features/org.eclipse.tcf.rse.sdk.feature/.project (renamed from features/org.eclipse.tm.tcf.cdt.sdk.feature/.project)2
-rw-r--r--features/org.eclipse.tcf.rse.sdk.feature/build.properties (renamed from features/org.eclipse.tm.tcf.rse.sdk.feature/build.properties)0
-rw-r--r--features/org.eclipse.tcf.rse.sdk.feature/eclipse_update_120.jpg (renamed from features/org.eclipse.tm.tcf.rse.sdk.feature/eclipse_update_120.jpg)bin21695 -> 21695 bytes
-rw-r--r--features/org.eclipse.tcf.rse.sdk.feature/epl-v10.html (renamed from features/org.eclipse.tm.tcf.rse.sdk.feature/epl-v10.html)0
-rw-r--r--features/org.eclipse.tcf.rse.sdk.feature/feature.properties (renamed from features/org.eclipse.tm.tcf.rse.sdk.feature/feature.properties)2
-rw-r--r--features/org.eclipse.tcf.rse.sdk.feature/feature.xml (renamed from features/org.eclipse.tm.tcf.cdt.sdk.feature/feature.xml)10
-rw-r--r--features/org.eclipse.tcf.rse.sdk.feature/license.html (renamed from features/org.eclipse.tm.tcf.rse.sdk.feature/license.html)0
-rw-r--r--features/org.eclipse.tcf.rse.sdk.feature/pom.xml17
-rw-r--r--features/org.eclipse.tcf.sdk.feature/.project (renamed from features/org.eclipse.tm.tcf.sdk.feature/.project)2
-rw-r--r--features/org.eclipse.tcf.sdk.feature/build.properties (renamed from features/org.eclipse.tm.tcf.sdk.feature/build.properties)0
-rw-r--r--features/org.eclipse.tcf.sdk.feature/eclipse_update_120.jpg (renamed from features/org.eclipse.tm.tcf.sdk.feature/eclipse_update_120.jpg)bin21695 -> 21695 bytes
-rw-r--r--features/org.eclipse.tcf.sdk.feature/epl-v10.html (renamed from features/org.eclipse.tm.tcf.sdk.feature/epl-v10.html)0
-rw-r--r--features/org.eclipse.tcf.sdk.feature/feature.properties (renamed from features/org.eclipse.tm.tcf.sdk.feature/feature.properties)2
-rw-r--r--features/org.eclipse.tcf.sdk.feature/feature.xml (renamed from features/org.eclipse.tm.tcf.sdk.feature/feature.xml)16
-rw-r--r--features/org.eclipse.tcf.sdk.feature/license.html (renamed from features/org.eclipse.tm.tcf.sdk.feature/license.html)0
-rw-r--r--features/org.eclipse.tcf.sdk.feature/pom.xml (renamed from features/org.eclipse.tm.tcf.rse.feature/pom.xml)6
-rw-r--r--features/org.eclipse.tcf.site/.project (renamed from features/org.eclipse.tm.tcf.site/.project)0
-rw-r--r--features/org.eclipse.tcf.site/index.html (renamed from features/org.eclipse.tm.tcf.site/index.html)0
-rw-r--r--features/org.eclipse.tcf.site/site.xml (renamed from features/org.eclipse.tm.tcf.site/site.xml)0
-rw-r--r--features/org.eclipse.tcf.site/web/site.css (renamed from features/org.eclipse.tm.tcf.site/web/site.css)0
-rw-r--r--features/org.eclipse.tcf.site/web/site.xsl (renamed from features/org.eclipse.tm.tcf.site/web/site.xsl)0
-rw-r--r--features/org.eclipse.tm.tcf.cdt.sdk.feature/pom.xml17
-rw-r--r--features/org.eclipse.tm.tcf.repo/category.xml49
-rw-r--r--features/org.eclipse.tm.tcf.rse.sdk.feature/pom.xml17
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/.classpath (renamed from plugins/org.eclipse.tm.tcf.cdt.ui/.classpath)0
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/.project (renamed from plugins/org.eclipse.tm.tcf.cdt.ui/.project)2
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/.settings/org.eclipse.jdt.core.prefs (renamed from plugins/org.eclipse.tm.tcf.cdt.ui/.settings/org.eclipse.jdt.core.prefs)0
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/.settings/org.eclipse.jdt.ui.prefs (renamed from plugins/org.eclipse.tm.tcf.cdt.ui/.settings/org.eclipse.jdt.ui.prefs)0
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/META-INF/MANIFEST.MF (renamed from plugins/org.eclipse.tm.tcf.cdt.ui/META-INF/MANIFEST.MF)12
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/about.html (renamed from plugins/org.eclipse.tm.tcf.cdt.ui/about.html)0
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/build.properties (renamed from plugins/org.eclipse.tm.tcf.cdt.ui/build.properties)0
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/icons/obj16/c_app.gif (renamed from plugins/org.eclipse.tm.tcf.cdt.ui/icons/obj16/c_app.gif)bin606 -> 606 bytes
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/plugin.properties (renamed from plugins/org.eclipse.tm.tcf.cdt.ui/plugin.properties)2
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/plugin.xml (renamed from plugins/org.eclipse.tm.tcf.cdt.ui/plugin.xml)106
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/pom.xml (renamed from plugins/org.eclipse.tm.tcf.rse/pom.xml)6
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/launch/ContextSelection.java (renamed from plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/launch/ContextSelection.java)2
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/launch/TCFCDTLaunchDelegate.java (renamed from plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/launch/TCFCDTLaunchDelegate.java)10
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/Activator.java (renamed from plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/Activator.java)6
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/EvaluationContextManager.java (renamed from plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/EvaluationContextManager.java)8
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/ImageCache.java (renamed from plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/ImageCache.java)4
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/TCFBreakpointActions.java (renamed from plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/TCFBreakpointActions.java)32
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/TCFBreakpointStatusListener.java (renamed from plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/TCFBreakpointStatusListener.java)27
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/TCFLaunchContext.java (renamed from plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/TCFLaunchContext.java)6
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/TCFNodeAdapterFactory.java (renamed from plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/TCFNodeAdapterFactory.java)34
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/TCFSteppingModeTarget.java (renamed from plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/TCFSteppingModeTarget.java)4
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/TCFSuspendResumeAdapter.java (renamed from plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/TCFSuspendResumeAdapter.java)42
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/TCFBreakpointScopeExtension.java (renamed from plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/breakpoints/TCFBreakpointScopeExtension.java)8
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/TCFBreakpointStatusPage.java (renamed from plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/breakpoints/TCFBreakpointStatusPage.java)55
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/TCFBreakpointThreadFilterPage.java (renamed from plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/breakpoints/TCFBreakpointThreadFilterPage.java)4
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/TCFThreadFilterEditor.java (renamed from plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/breakpoints/TCFThreadFilterEditor.java)22
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/TCFWatchpointTarget.java (renamed from plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/breakpoints/TCFWatchpointTarget.java)12
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/commands/AddFunctionBreakointHandler.java (renamed from plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/commands/AddFunctionBreakointHandler.java)2
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/commands/AddWatchpointHandler.java (renamed from plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/commands/AddWatchpointHandler.java)2
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/commands/TCFPinViewCommand.java (renamed from plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/commands/TCFPinViewCommand.java)16
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/commands/TCFReverseDebuggingPropertyTester.java (renamed from plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/commands/TCFReverseDebuggingPropertyTester.java)2
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/commands/TCFReverseResumeCommand.java (renamed from plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/commands/TCFReverseResumeCommand.java)6
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/commands/TCFReverseStepIntoCommand.java (renamed from plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/commands/TCFReverseStepIntoCommand.java)6
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/commands/TCFReverseStepOverCommand.java (renamed from plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/commands/TCFReverseStepOverCommand.java)6
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/commands/TCFReverseStepReturnCommand.java (renamed from plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/commands/TCFReverseStepReturnCommand.java)6
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/commands/TCFReverseToggleCommand.java (renamed from plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/commands/TCFReverseToggleCommand.java)2
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/disassembly/TCFDisassemblyBackend.java (renamed from plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/disassembly/TCFDisassemblyBackend.java)70
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/disassembly/TCFDisassemblyBackendFactory.java (renamed from plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/disassembly/TCFDisassemblyBackendFactory.java)4
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/hover/ExpressionInformationControlCreator.java (renamed from plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/hover/ExpressionInformationControlCreator.java)6
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/hover/TCFDebugTextHover.java (renamed from plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/hover/TCFDebugTextHover.java)34
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/launch/FileSystemBrowserControl.java (renamed from plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/launch/FileSystemBrowserControl.java)20
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/launch/PeerListControl.java (renamed from plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/launch/PeerListControl.java)16
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/launch/ProcessListControl.java (renamed from plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/launch/ProcessListControl.java)16
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/launch/ProcessPrompter.java (renamed from plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/launch/ProcessPrompter.java)6
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/launch/ProcessSelectionDialog.java (renamed from plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/launch/ProcessSelectionDialog.java)8
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/launch/RemoteCMainTab.java (renamed from plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/launch/RemoteCMainTab.java)18
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/launch/RemoteFileSelectionDialog.java (renamed from plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/launch/RemoteFileSelectionDialog.java)6
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/sourcelookup/TCFCSourceNotFoundEditor.java (renamed from plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/sourcelookup/TCFCSourceNotFoundEditor.java)10
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/sourcelookup/TCFSourceNotFoundPresentation.java (renamed from plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/sourcelookup/TCFSourceNotFoundPresentation.java)6
-rw-r--r--plugins/org.eclipse.tcf.core/.classpath (renamed from plugins/org.eclipse.tm.tcf.core/.classpath)0
-rw-r--r--plugins/org.eclipse.tcf.core/.project (renamed from plugins/org.eclipse.tm.tcf.core/.project)2
-rw-r--r--plugins/org.eclipse.tcf.core/.settings/org.eclipse.jdt.core.prefs (renamed from plugins/org.eclipse.tm.tcf.core/.settings/org.eclipse.jdt.core.prefs)0
-rw-r--r--plugins/org.eclipse.tcf.core/.settings/org.eclipse.jdt.ui.prefs (renamed from plugins/org.eclipse.tm.tcf.core/.settings/org.eclipse.jdt.ui.prefs)0
-rw-r--r--plugins/org.eclipse.tcf.core/META-INF/MANIFEST.MF18
-rw-r--r--plugins/org.eclipse.tcf.core/about.html (renamed from plugins/org.eclipse.tm.tcf.core/about.html)0
-rw-r--r--plugins/org.eclipse.tcf.core/activator/org/eclipse/tcf/internal/Activator.java (renamed from plugins/org.eclipse.tm.tcf.core/activator/org/eclipse/tm/internal/tcf/Activator.java)6
-rw-r--r--plugins/org.eclipse.tcf.core/build.properties (renamed from plugins/org.eclipse.tm.tcf.core/build.properties)0
-rw-r--r--plugins/org.eclipse.tcf.core/plugin.properties (renamed from plugins/org.eclipse.tm.tcf/plugin.properties)2
-rw-r--r--plugins/org.eclipse.tcf.core/pom.xml (renamed from plugins/org.eclipse.tm.tcf.core/pom.xml)6
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/core/AbstractChannel.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/AbstractChannel.java)28
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/core/AbstractPeer.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/AbstractPeer.java)16
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/core/Base64.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/Base64.java)2
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/core/ChannelPIPE.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/ChannelPIPE.java)6
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/core/ChannelTCP.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/ChannelTCP.java)6
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/core/Command.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/Command.java)16
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/core/ErrorReport.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/ErrorReport.java)6
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/core/ServerTCP.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/ServerTCP.java)8
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/core/StreamChannel.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/StreamChannel.java)4
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/core/TransientPeer.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/TransientPeer.java)16
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/core/ChannelLoop.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/ChannelLoop.java)6
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/core/LocalPeer.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/LocalPeer.java)10
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/core/LoggingUtil.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/LoggingUtil.java)4
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/core/RemotePeer.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/RemotePeer.java)4
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/core/ServiceManager.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/ServiceManager.java)16
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/core/Token.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/Token.java)6
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/core/TransportManager.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/TransportManager.java)26
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/local/ChannelProxy.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/local/ChannelProxy.java)12
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/local/DiagnosticsService.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/local/DiagnosticsService.java)18
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/local/LocatorService.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/local/LocatorService.java)32
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/BreakpointsProxy.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/BreakpointsProxy.java)12
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/DiagnosticsProxy.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/DiagnosticsProxy.java)12
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/DisassemblyProxy.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/DisassemblyProxy.java)10
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/ExpressionsProxy.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/ExpressionsProxy.java)18
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/FileSystemProxy.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/FileSystemProxy.java)14
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/GenericProxy.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/GenericProxy.java)6
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/LineNumbersProxy.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/LineNumbersProxy.java)10
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/LocatorProxy.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/LocatorProxy.java)18
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/MemoryMapProxy.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/MemoryMapProxy.java)12
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/MemoryProxy.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/MemoryProxy.java)14
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/PathMapProxy.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/PathMapProxy.java)45
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/ProcessesProxy.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/ProcessesProxy.java)12
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/ProcessesV1Proxy.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/ProcessesV1Proxy.java)10
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/RegistersProxy.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/RegistersProxy.java)12
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/RunControlProxy.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/RunControlProxy.java)21
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/StackTraceProxy.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/StackTraceProxy.java)10
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/StreamsProxy.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/StreamsProxy.java)12
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/SymbolsProxy.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/SymbolsProxy.java)33
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/SysMonitorProxy.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/SysMonitorProxy.java)10
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/TerminalsProxy.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/TerminalsProxy.java)12
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/protocol/IChannel.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IChannel.java)2
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/protocol/IErrorReport.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IErrorReport.java)2
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/protocol/IEventQueue.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IEventQueue.java)2
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/protocol/ILogger.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/ILogger.java)2
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/protocol/IPeer.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IPeer.java)10
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/protocol/IService.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IService.java)2
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/protocol/IServiceProvider.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IServiceProvider.java)2
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/protocol/IToken.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IToken.java)2
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/protocol/ITransportProvider.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/ITransportProvider.java)2
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/protocol/JSON.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/JSON.java)71
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/protocol/Protocol.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/Protocol.java)10
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/IBreakpoints.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IBreakpoints.java)7
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/IDiagnostics.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IDiagnostics.java)6
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/IDisassembly.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IDisassembly.java)14
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/IExpressions.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IExpressions.java)13
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/IFileSystem.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IFileSystem.java)6
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/ILineNumbers.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/ILineNumbers.java)8
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/ILocator.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/ILocator.java)12
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/IMemory.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IMemory.java)6
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/IMemoryMap.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IMemoryMap.java)6
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/IPathMap.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IPathMap.java)31
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/IProcesses.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IProcesses.java)6
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/IProcessesV1.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IProcessesV1.java)4
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/IRegisters.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IRegisters.java)6
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/IRunControl.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IRunControl.java)32
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/IStackTrace.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IStackTrace.java)6
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/IStreams.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IStreams.java)6
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/ISymbols.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/ISymbols.java)51
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/ISysMonitor.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/ISysMonitor.java)6
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/ITerminals.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/ITerminals.java)6
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/util/TCFDataCache.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/util/TCFDataCache.java)8
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/util/TCFFileInputStream.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/util/TCFFileInputStream.java)14
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/util/TCFFileOutputStream.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/util/TCFFileOutputStream.java)12
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/util/TCFTask.java (renamed from plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/util/TCFTask.java)6
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/.classpath (renamed from plugins/org.eclipse.tm.tcf.debug.ui/.classpath)0
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/.project (renamed from plugins/org.eclipse.tm.tcf.debug.ui/.project)2
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/.settings/org.eclipse.jdt.core.prefs (renamed from plugins/org.eclipse.tm.tcf.debug.ui/.settings/org.eclipse.jdt.core.prefs)0
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/.settings/org.eclipse.jdt.ui.prefs (renamed from plugins/org.eclipse.tm.tcf.debug.ui/.settings/org.eclipse.jdt.ui.prefs)0
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/META-INF/MANIFEST.MF (renamed from plugins/org.eclipse.tm.tcf.debug.ui/META-INF/MANIFEST.MF)26
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/about.html (renamed from plugins/org.eclipse.tm.tcf.debug.ui/about.html)0
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/agent/get-os-tag (renamed from plugins/org.eclipse.tm.tcf.debug.ui/agent/get-os-tag)0
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/build.properties (renamed from plugins/org.eclipse.tm.tcf.debug.ui/build.properties)0
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/icons/arguments_tab.gif (renamed from plugins/org.eclipse.tm.tcf.debug.ui/icons/arguments_tab.gif)bin95 -> 95 bytes
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/icons/attribute.gif (renamed from plugins/org.eclipse.tm.tcf.debug.ui/icons/attribute.gif)bin207 -> 207 bytes
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/icons/brkp_ovr.gif (renamed from plugins/org.eclipse.tm.tcf.debug.ui/icons/brkp_ovr.gif)bin893 -> 893 bytes
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/icons/casttotype_co.gif (renamed from plugins/org.eclipse.tm.tcf.debug.ui/icons/casttotype_co.gif)bin214 -> 214 bytes
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/icons/console.gifbin0 -> 582 bytes
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/icons/detach.gifbin0 -> 883 bytes
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/icons/memory-map.gif (renamed from plugins/org.eclipse.tm.tcf.debug.ui/icons/memory-map.gif)bin922 -> 922 bytes
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/icons/moved_ovr.gifbin0 -> 851 bytes
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/icons/path.gif (renamed from plugins/org.eclipse.tm.tcf.debug.ui/icons/path.gif)bin310 -> 310 bytes
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/icons/refresh.gif (renamed from plugins/org.eclipse.tm.tcf.debug.ui/icons/refresh.gif)bin368 -> 368 bytes
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/icons/showasarray_co.gif (renamed from plugins/org.eclipse.tm.tcf.debug.ui/icons/showasarray_co.gif)bin96 -> 96 bytes
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/icons/signals.gif (renamed from plugins/org.eclipse.tm.tcf.debug.ui/icons/signals.gif)bin323 -> 323 bytes
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/icons/target_tab.gif (renamed from plugins/org.eclipse.tm.tcf.debug.ui/icons/target_tab.gif)bin567 -> 567 bytes
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/icons/tcf.gif (renamed from plugins/org.eclipse.tm.tcf.debug.ui/icons/tcf.gif)bin165 -> 165 bytes
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/icons/thread_not_active.gif (renamed from plugins/org.eclipse.tm.tcf.debug.ui/icons/thread_not_active.gif)bin159 -> 159 bytes
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/icons/var_aggr.gif (renamed from plugins/org.eclipse.tm.tcf.debug.ui/icons/var_aggr.gif)bin361 -> 361 bytes
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/icons/var_pointer.gif (renamed from plugins/org.eclipse.tm.tcf.debug.ui/icons/var_pointer.gif)bin82 -> 82 bytes
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/icons/var_simple.gif (renamed from plugins/org.eclipse.tm.tcf.debug.ui/icons/var_simple.gif)bin95 -> 95 bytes
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/plugin.properties (renamed from plugins/org.eclipse.tm.tcf.debug.ui/plugin.properties)6
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/plugin.xml (renamed from plugins/org.eclipse.tm.tcf.debug.ui/plugin.xml)283
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/pom.xml (renamed from plugins/org.eclipse.tm.tcf.debug/pom.xml)6
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/schema/launch_context.exsd (renamed from plugins/org.eclipse.tm.tcf.debug.ui/schema/launch_context.exsd)4
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/debug/ui/ITCFObject.java35
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/Activator.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/Activator.java)10
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/ImageCache.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/ImageCache.java)3
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/adapters/TCFBreakpointAdapterFactory.java64
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/adapters/TCFLaunchAdapterFactory.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/adapters/TCFLaunchAdapterFactory.java)10
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/adapters/TCFLaunchLabelProvider.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/adapters/TCFLaunchLabelProvider.java)10
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/adapters/TCFNodeAdapterFactory.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/adapters/TCFNodeAdapterFactory.java)6
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/adapters/TCFNodePropertySource.java260
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/AbstractActionDelegate.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/AbstractActionDelegate.java)12
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/BackIntoCommand.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/BackIntoCommand.java)22
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/BackOverCommand.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/BackOverCommand.java)26
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/BackResumeCommand.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/BackResumeCommand.java)16
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/BackReturnCommand.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/BackReturnCommand.java)24
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/BreakpointCommand.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/BreakpointCommand.java)14
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/CastToArrayCommand.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/CastToArrayCommand.java)18
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/CastToTypeCommand.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/CastToTypeCommand.java)12
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/ConsoleCommand.java27
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/DetachCommand.java76
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/DisconnectCommand.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/DisconnectCommand.java)8
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/DropToFrameCommand.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/DropToFrameCommand.java)30
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/MemoryMapCommand.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/MemoryMapCommand.java)26
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/MemoryMapDialog.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/MemoryMapDialog.java)8
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/MemoryMapItemDialog.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/MemoryMapItemDialog.java)8
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/MemoryMapWidget.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/MemoryMapWidget.java)32
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/RefreshCommand.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/RefreshCommand.java)12
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/RefreshHandler.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/RefreshHandler.java)12
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/RestoreDefaultTypeCommand.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/RestoreDefaultTypeCommand.java)8
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/ResumeCommand.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/ResumeCommand.java)16
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/SignalsCommand.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/SignalsCommand.java)16
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/SignalsDialog.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/SignalsDialog.java)30
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/StepCommand.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/StepCommand.java)16
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/StepIntoCommand.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/StepIntoCommand.java)22
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/StepOverCommand.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/StepOverCommand.java)26
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/StepReturnCommand.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/StepReturnCommand.java)24
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/SuspendCommand.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/SuspendCommand.java)22
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/TerminateCommand.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/TerminateCommand.java)20
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/UpdatePolicyMenu.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/UpdatePolicyMenu.java)8
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/ViewMemoryCommand.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/ViewMemoryCommand.java)16
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/WatchInExpressionsCommand.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/WatchInExpressionsCommand.java)12
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/ITCFLaunchContext.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/ITCFLaunchContext.java)2
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/PeerPropsDialog.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/PeerPropsDialog.java)4
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/TCFArgumentsTab.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFArgumentsTab.java)8
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/TCFLaunchContext.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFLaunchContext.java)4
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/TCFLaunchShortcut.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFLaunchShortcut.java)10
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/TCFMainTab.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFMainTab.java)8
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/TCFMemoryMapTab.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFMemoryMapTab.java)10
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/TCFPathMapTab.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFPathMapTab.java)16
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/TCFPropertyTester.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFPropertyTester.java)4
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/TCFTabGroup.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFTabGroup.java)2
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/TCFTargetTab.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFTargetTab.java)59
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/TestErrorsDialog.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TestErrorsDialog.java)2
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/setup/AbstractRemoteShell.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/AbstractRemoteShell.java)2
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/setup/IRemoteShell.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/IRemoteShell.java)2
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/setup/PeerPropsControl.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/PeerPropsControl.java)6
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/setup/SSHClient.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/SSHClient.java)8
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/setup/SetupWizardDialog.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/SetupWizardDialog.java)4
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/setup/TelnetClient.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/TelnetClient.java)2
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/setup/TelnetInputStream.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/TelnetInputStream.java)2
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/setup/TimeOutInputStream.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/TimeOutInputStream.java)2
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/setup/WizardFirstPage.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/WizardFirstPage.java)4
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/setup/WizardLocalPage.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/WizardLocalPage.java)4
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/setup/WizardLogPage.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/WizardLogPage.java)10
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/setup/WizardLoginPage.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/WizardLoginPage.java)12
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/setup/WizardPropsPage.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/WizardPropsPage.java)4
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/ICastToType.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/ICastToType.java)6
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/IDetailsProvider.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/IDetailsProvider.java)2
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/ISourceNotFoundPresentation.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/ISourceNotFoundPresentation.java)2
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/ISymbolOwner.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/ISymbolOwner.java)2
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/IWatchInExpressions.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/IWatchInExpressions.java)4
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/StyledStringBuffer.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/StyledStringBuffer.java)2
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFAnnotationImageProvider.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFAnnotationImageProvider.java)2
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFAnnotationManager.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFAnnotationManager.java)42
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFChildren.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildren.java)6
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFChildrenExecContext.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenExecContext.java)10
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFChildrenExpressions.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenExpressions.java)2
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFChildrenHoverExpressions.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenHoverExpressions.java)24
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFChildrenLocalVariables.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenLocalVariables.java)6
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFChildrenLogExpressions.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenLogExpressions.java)2
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFChildrenModules.java51
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFChildrenRegisters.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenRegisters.java)6
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFChildrenStackTrace.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenStackTrace.java)10
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFChildrenSubExpressions.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenSubExpressions.java)8
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFColumnPresentationExpression.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFColumnPresentationExpression.java)2
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFColumnPresentationModules.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFColumnPresentationModules.java)2
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFColumnPresentationRegister.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFColumnPresentationRegister.java)2
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFConsole.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFConsole.java)63
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFDebugTask.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFDebugTask.java)10
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFDetailPane.java293
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFDetailPaneFactory.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFDetailPaneFactory.java)2
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFMemoryBlockRetrieval.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFMemoryBlockRetrieval.java)24
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFModel.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModel.java)128
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFModelManager.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModelManager.java)8
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFModelPresentation.java269
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFModelProxy.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModelProxy.java)13
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFModelSelectionPolicy.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModelSelectionPolicy.java)10
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNode.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNode.java)13
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeArrayPartition.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeArrayPartition.java)4
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeExecContext.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeExecContext.java)112
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeExpression.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeExpression.java)53
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeLaunch.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeLaunch.java)6
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeModule.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeModule.java)55
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeRegister.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeRegister.java)24
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeStackFrame.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeStackFrame.java)35
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeSymbol.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeSymbol.java)10
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNumberFormat.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNumberFormat.java)2
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFRunnable.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFRunnable.java)4
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFSnapshot.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFSnapshot.java)4
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/preferences/DecoratingIntegerFieldEditor.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/preferences/DecoratingIntegerFieldEditor.java)2
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/preferences/IntegerWithBooleanFieldEditor.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/preferences/IntegerWithBooleanFieldEditor.java)2
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/preferences/TCFDebugPreferencePage.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/preferences/TCFDebugPreferencePage.java)2
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/preferences/TCFPreferences.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/preferences/TCFPreferences.java)4
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/preferences/TCFPreferencesInitializer.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/preferences/TCFPreferencesInitializer.java)2
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/properties/TCFPropertyPage.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/properties/TCFPropertyPage.java)2
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/trace/TraceView.java (renamed from plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/trace/TraceView.java)12
-rw-r--r--plugins/org.eclipse.tcf.debug/.classpath (renamed from plugins/org.eclipse.tm.tcf.debug/.classpath)0
-rw-r--r--plugins/org.eclipse.tcf.debug/.options2
-rw-r--r--plugins/org.eclipse.tcf.debug/.project (renamed from plugins/org.eclipse.tm.tcf.debug/.project)2
-rw-r--r--plugins/org.eclipse.tcf.debug/.settings/org.eclipse.jdt.core.prefs (renamed from plugins/org.eclipse.tm.tcf.debug/.settings/org.eclipse.jdt.core.prefs)0
-rw-r--r--plugins/org.eclipse.tcf.debug/.settings/org.eclipse.jdt.ui.prefs (renamed from plugins/org.eclipse.tm.tcf.debug/.settings/org.eclipse.jdt.ui.prefs)0
-rw-r--r--plugins/org.eclipse.tcf.debug/META-INF/MANIFEST.MF24
-rw-r--r--plugins/org.eclipse.tcf.debug/TCF Test Suite.launch (renamed from plugins/org.eclipse.tm.tcf.debug/TCF Test Suite.launch)8
-rw-r--r--plugins/org.eclipse.tcf.debug/about.html (renamed from plugins/org.eclipse.tm.tcf.debug/about.html)0
-rw-r--r--plugins/org.eclipse.tcf.debug/build.properties (renamed from plugins/org.eclipse.tm.tcf.debug/build.properties)0
-rw-r--r--plugins/org.eclipse.tcf.debug/plugin.properties (renamed from plugins/org.eclipse.tm.tcf.debug/plugin.properties)2
-rw-r--r--plugins/org.eclipse.tcf.debug/plugin.xml (renamed from plugins/org.eclipse.tm.tcf.debug/plugin.xml)24
-rw-r--r--plugins/org.eclipse.tcf.debug/pom.xml17
-rw-r--r--plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/Activator.java (renamed from plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/Activator.java)19
-rw-r--r--plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/actions/TCFAction.java (renamed from plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFAction.java)6
-rw-r--r--plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/actions/TCFActionStepInto.java (renamed from plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFActionStepInto.java)22
-rw-r--r--plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/actions/TCFActionStepOut.java (renamed from plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFActionStepOut.java)22
-rw-r--r--plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/actions/TCFActionStepOver.java (renamed from plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFActionStepOver.java)26
-rw-r--r--plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/cmdline/TCFCommandLine.java69
-rw-r--r--plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/launch/TCFLaunchDelegate.java (renamed from plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFLaunchDelegate.java)20
-rw-r--r--plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/launch/TCFLocalAgent.java (renamed from plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFLocalAgent.java)12
-rw-r--r--plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/launch/TCFSourceLookupDirector.java107
-rw-r--r--plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/launch/TCFSourceLookupParticipant.java (renamed from plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFSourceLookupParticipant.java)46
-rw-r--r--plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/launch/TCFSourcePathComputerDelegate.java (renamed from plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFSourcePathComputerDelegate.java)2
-rw-r--r--plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/launch/TCFUserDefPeer.java (renamed from plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFUserDefPeer.java)10
-rw-r--r--plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/model/ITCFBreakpointListener.java (renamed from plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/ITCFBreakpointListener.java)2
-rw-r--r--plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/model/ITCFConstants.java (renamed from plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/ITCFConstants.java)4
-rw-r--r--plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/model/TCFBreakpoint.java (renamed from plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFBreakpoint.java)42
-rw-r--r--plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/model/TCFBreakpointsModel.java (renamed from plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFBreakpointsModel.java)41
-rw-r--r--plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/model/TCFBreakpointsStatus.java (renamed from plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFBreakpointsStatus.java)8
-rw-r--r--plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/model/TCFContextState.java (renamed from plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFContextState.java)2
-rw-r--r--plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/model/TCFError.java (renamed from plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFError.java)4
-rw-r--r--plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/model/TCFFunctionRef.java (renamed from plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFFunctionRef.java)2
-rw-r--r--plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/model/TCFLaunch.java (renamed from plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFLaunch.java)120
-rw-r--r--plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/model/TCFMemoryRegion.java (renamed from plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFMemoryRegion.java)8
-rw-r--r--plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/model/TCFSourceRef.java (renamed from plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFSourceRef.java)4
-rw-r--r--plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/model/TCFSymFileRef.java38
-rw-r--r--plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/tests/ITCFTest.java (renamed from plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/ITCFTest.java)4
-rw-r--r--plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/tests/Main.java (renamed from plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/Main.java)12
-rw-r--r--plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/tests/RunControl.java (renamed from plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/RunControl.java)49
-rw-r--r--plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/tests/TCFTestSuite.java (renamed from plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TCFTestSuite.java)12
-rw-r--r--plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/tests/TestAttachTerminate.java (renamed from plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestAttachTerminate.java)16
-rw-r--r--plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/tests/TestEcho.java (renamed from plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestEcho.java)12
-rw-r--r--plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/tests/TestEchoERR.java (renamed from plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestEchoERR.java)14
-rw-r--r--plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/tests/TestEchoFP.java (renamed from plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestEchoFP.java)8
-rw-r--r--plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/tests/TestExpressions.java (renamed from plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestExpressions.java)89
-rw-r--r--plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/tests/TestFileSystem.java (renamed from plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestFileSystem.java)31
-rw-r--r--plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/tests/TestPathMap.java (renamed from plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestPathMap.java)11
-rw-r--r--plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/tests/TestRCBP1.java (renamed from plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestRCBP1.java)52
-rw-r--r--plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/tests/TestStreams.java (renamed from plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestStreams.java)10
-rw-r--r--plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/tests/TestSysMonitor.java (renamed from plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestSysMonitor.java)12
-rw-r--r--plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/tests/TestTerminals.java (renamed from plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestTerminals.java)16
-rw-r--r--plugins/org.eclipse.tcf.rse/.classpath (renamed from plugins/org.eclipse.tm.tcf.rse/.classpath)0
-rw-r--r--plugins/org.eclipse.tcf.rse/.project (renamed from plugins/org.eclipse.tm.tcf.rse/.project)2
-rw-r--r--plugins/org.eclipse.tcf.rse/.settings/org.eclipse.jdt.core.prefs (renamed from plugins/org.eclipse.tm.tcf.rse/.settings/org.eclipse.jdt.core.prefs)0
-rw-r--r--plugins/org.eclipse.tcf.rse/.settings/org.eclipse.jdt.ui.prefs (renamed from plugins/org.eclipse.tm.tcf.rse/.settings/org.eclipse.jdt.ui.prefs)0
-rw-r--r--plugins/org.eclipse.tcf.rse/META-INF/MANIFEST.MF (renamed from plugins/org.eclipse.tm.tcf.rse/META-INF/MANIFEST.MF)18
-rw-r--r--plugins/org.eclipse.tcf.rse/about.html (renamed from plugins/org.eclipse.tm.tcf.rse/about.html)0
-rw-r--r--plugins/org.eclipse.tcf.rse/build.properties (renamed from plugins/org.eclipse.tm.tcf.rse/build.properties)0
-rw-r--r--plugins/org.eclipse.tcf.rse/icons/process-r.gif (renamed from plugins/org.eclipse.tm.tcf.rse/icons/process-r.gif)bin582 -> 582 bytes
-rw-r--r--plugins/org.eclipse.tcf.rse/icons/process-s.gif (renamed from plugins/org.eclipse.tm.tcf.rse/icons/process-s.gif)bin344 -> 344 bytes
-rw-r--r--plugins/org.eclipse.tcf.rse/icons/system-files-live.gif (renamed from plugins/org.eclipse.tm.tcf.rse/icons/system-files-live.gif)bin224 -> 224 bytes
-rw-r--r--plugins/org.eclipse.tcf.rse/icons/system-files.gif (renamed from plugins/org.eclipse.tm.tcf.rse/icons/system-files.gif)bin157 -> 157 bytes
-rw-r--r--plugins/org.eclipse.tcf.rse/icons/system-processes-live.gif (renamed from plugins/org.eclipse.tm.tcf.rse/icons/system-processes-live.gif)bin594 -> 594 bytes
-rw-r--r--plugins/org.eclipse.tcf.rse/icons/system-processes.gif (renamed from plugins/org.eclipse.tm.tcf.rse/icons/system-processes.gif)bin574 -> 574 bytes
-rw-r--r--plugins/org.eclipse.tcf.rse/icons/systemshell.gif (renamed from plugins/org.eclipse.tm.tcf.rse/icons/systemshell.gif)bin357 -> 357 bytes
-rw-r--r--plugins/org.eclipse.tcf.rse/icons/systemshelllive.gif (renamed from plugins/org.eclipse.tm.tcf.rse/icons/systemshelllive.gif)bin366 -> 366 bytes
-rw-r--r--plugins/org.eclipse.tcf.rse/icons/tcf.gif (renamed from plugins/org.eclipse.tm.tcf.rse/icons/tcf.gif)bin165 -> 165 bytes
-rw-r--r--plugins/org.eclipse.tcf.rse/icons/thread-r.gif (renamed from plugins/org.eclipse.tm.tcf.rse/icons/thread-r.gif)bin925 -> 925 bytes
-rw-r--r--plugins/org.eclipse.tcf.rse/icons/thread-s.gif (renamed from plugins/org.eclipse.tm.tcf.rse/icons/thread-s.gif)bin942 -> 942 bytes
-rw-r--r--plugins/org.eclipse.tcf.rse/plugin.properties (renamed from plugins/org.eclipse.tm.tcf.rse/plugin.properties)2
-rw-r--r--plugins/org.eclipse.tcf.rse/plugin.xml (renamed from plugins/org.eclipse.tm.tcf.rse/plugin.xml)30
-rw-r--r--plugins/org.eclipse.tcf.rse/pom.xml17
-rw-r--r--plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/Activator.java (renamed from plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/Activator.java)6
-rw-r--r--plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/ITCFService.java (renamed from plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/ITCFService.java)4
-rw-r--r--plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/ITCFSessionProvider.java (renamed from plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/ITCFSessionProvider.java)10
-rw-r--r--plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/ITCFSubSystem.java (renamed from plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/ITCFSubSystem.java)2
-rw-r--r--plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/Messages.java (renamed from plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/Messages.java)2
-rw-r--r--plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/Messages.properties (renamed from plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/Messages.properties)0
-rw-r--r--plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/TCFConnectorService.java (renamed from plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/TCFConnectorService.java)183
-rw-r--r--plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/TCFConnectorServiceManager.java (renamed from plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/TCFConnectorServiceManager.java)4
-rw-r--r--plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/TCFRSETask.java (renamed from plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/TCFRSETask.java)6
-rw-r--r--plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/files/TCFFileAdapter.java (renamed from plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/files/TCFFileAdapter.java)2
-rw-r--r--plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/files/TCFFileResource.java (renamed from plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/files/TCFFileResource.java)6
-rw-r--r--plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/files/TCFFileService.java (renamed from plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/files/TCFFileService.java)34
-rw-r--r--plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/files/TCFFileSubSystemConfiguration.java (renamed from plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/files/TCFFileSubSystemConfiguration.java)12
-rw-r--r--plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/files/TCFRemoteFile.java (renamed from plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/files/TCFRemoteFile.java)4
-rw-r--r--plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/processes/TCFProcessAdapter.java (renamed from plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/processes/TCFProcessAdapter.java)2
-rw-r--r--plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/processes/TCFProcessResource.java (renamed from plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/processes/TCFProcessResource.java)12
-rw-r--r--plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/processes/TCFProcessService.java (renamed from plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/processes/TCFProcessService.java)16
-rw-r--r--plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/processes/TCFProcessSubSystemConfiguration.java (renamed from plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/processes/TCFProcessSubSystemConfiguration.java)10
-rw-r--r--plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/processes/TCFRemoteProcess.java (renamed from plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/processes/TCFRemoteProcess.java)4
-rw-r--r--plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/processes/TCFSystemViewProcessAdapterFactory.java (renamed from plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/processes/TCFSystemViewProcessAdapterFactory.java)2
-rw-r--r--plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/processes/TCFSystemViewRemoteProcessAdapter.java (renamed from plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/processes/TCFSystemViewRemoteProcessAdapter.java)10
-rw-r--r--plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/shells/TCFServiceCommandShell.java (renamed from plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/shells/TCFServiceCommandShell.java)3
-rw-r--r--plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/shells/TCFShellSubSystemConfiguration.java (renamed from plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/shells/TCFShellSubSystemConfiguration.java)31
-rw-r--r--plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/shells/TCFTerminalInputStream.java (renamed from plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/shells/TCFTerminalInputStream.java)102
-rw-r--r--plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/shells/TCFTerminalOutputStream.java84
-rw-r--r--plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/shells/TCFTerminalShell.java (renamed from plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/shells/TCFTerminalShell.java)166
-rw-r--r--plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/terminals/TCFTerminalService.java (renamed from plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/terminals/TCFTerminalService.java)29
-rw-r--r--plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/terminals/TCFTerminalServiceSubSystemConfiguration.java (renamed from plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/terminals/TCFTerminalServiceSubSystemConfiguration.java)8
-rw-r--r--plugins/org.eclipse.tcf/.classpath (renamed from plugins/org.eclipse.tm.tcf/.classpath)0
-rw-r--r--plugins/org.eclipse.tcf/.options2
-rw-r--r--plugins/org.eclipse.tcf/.project (renamed from plugins/org.eclipse.tm.tcf/.project)2
-rw-r--r--plugins/org.eclipse.tcf/.settings/org.eclipse.jdt.core.prefs (renamed from plugins/org.eclipse.tm.tcf/.settings/org.eclipse.jdt.core.prefs)0
-rw-r--r--plugins/org.eclipse.tcf/.settings/org.eclipse.jdt.ui.prefs (renamed from plugins/org.eclipse.tm.tcf/.settings/org.eclipse.jdt.ui.prefs)0
-rw-r--r--plugins/org.eclipse.tcf/META-INF/MANIFEST.MF16
-rw-r--r--plugins/org.eclipse.tcf/about.html (renamed from plugins/org.eclipse.tm.tcf/about.html)0
-rw-r--r--plugins/org.eclipse.tcf/build.properties (renamed from plugins/org.eclipse.tm.tcf/build.properties)0
-rw-r--r--plugins/org.eclipse.tcf/plugin.properties (renamed from plugins/org.eclipse.tm.tcf.core/plugin.properties)2
-rw-r--r--plugins/org.eclipse.tcf/plugin.xml (renamed from plugins/org.eclipse.tm.tcf/plugin.xml)0
-rw-r--r--plugins/org.eclipse.tcf/pom.xml (renamed from plugins/org.eclipse.tm.tcf/pom.xml)6
-rw-r--r--plugins/org.eclipse.tcf/schema/serviceProviders.exsd (renamed from plugins/org.eclipse.tm.tcf/schema/serviceProviders.exsd)10
-rw-r--r--plugins/org.eclipse.tcf/schema/startup.exsd (renamed from plugins/org.eclipse.tm.tcf/schema/startup.exsd)4
-rw-r--r--plugins/org.eclipse.tcf/src/org/eclipse/tcf/Activator.java (renamed from plugins/org.eclipse.tm.tcf/src/org/eclipse/tm/tcf/Activator.java)20
-rw-r--r--plugins/org.eclipse.tcf/src/org/eclipse/tcf/EventQueue.java (renamed from plugins/org.eclipse.tm.tcf/src/org/eclipse/tm/tcf/EventQueue.java)8
-rw-r--r--plugins/org.eclipse.tcf/src/org/eclipse/tcf/extensions/TcfAbstractExtensionPointManager.java (renamed from plugins/org.eclipse.tm.tcf/src/org/eclipse/tm/tcf/extensions/TcfAbstractExtensionPointManager.java)6
-rw-r--r--plugins/org.eclipse.tcf/src/org/eclipse/tcf/extensions/TcfExtensionPointComparator.java (renamed from plugins/org.eclipse.tm.tcf/src/org/eclipse/tm/tcf/extensions/TcfExtensionPointComparator.java)6
-rw-r--r--plugins/org.eclipse.tcf/src/org/eclipse/tcf/extensions/TcfExtensionProxy.java (renamed from plugins/org.eclipse.tm.tcf/src/org/eclipse/tm/tcf/extensions/TcfExtensionProxy.java)6
-rw-r--r--plugins/org.eclipse.tcf/src/org/eclipse/tcf/internal/extensions/TcfServiceProvidersExtensionPointManager.java (renamed from plugins/org.eclipse.tm.tcf/src/org/eclipse/tm/tcf/internal/extensions/TcfServiceProvidersExtensionPointManager.java)18
-rw-r--r--plugins/org.eclipse.tcf/src/org/eclipse/tcf/internal/nls/TcfPluginMessages.java (renamed from plugins/org.eclipse.tm.tcf/src/org/eclipse/tm/tcf/internal/nls/TcfPluginMessages.java)4
-rw-r--r--plugins/org.eclipse.tcf/src/org/eclipse/tcf/internal/nls/TcfPluginMessages.properties (renamed from plugins/org.eclipse.tm.tcf/src/org/eclipse/tm/tcf/internal/nls/TcfPluginMessages.properties)2
-rw-r--r--plugins/org.eclipse.tcf/src/org/eclipse/tcf/ssl/TCFSecurityManager.java (renamed from plugins/org.eclipse.tm.tcf/src/org/eclipse/tm/tcf/ssl/TCFSecurityManager.java)8
-rw-r--r--plugins/org.eclipse.tm.tcf.cdt.ui/pom.xml17
-rw-r--r--plugins/org.eclipse.tm.tcf.core/META-INF/MANIFEST.MF18
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/pom.xml17
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/adapters/TCFNodePropertySource.java191
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenModules.java58
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFDetailPane.java158
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModelPresentation.java171
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/.options2
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/META-INF/MANIFEST.MF23
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/agent/GNU/Linux/i386/agentbin338513 -> 0 bytes
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/agent/Windows/i386/agent.exebin296448 -> 0 bytes
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFSourceLookupDirector.java46
-rw-r--r--plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/shells/TCFTerminalOutputStream.java105
-rw-r--r--plugins/org.eclipse.tm.tcf/.options2
-rw-r--r--plugins/org.eclipse.tm.tcf/META-INF/MANIFEST.MF16
-rw-r--r--pom.xml105
-rw-r--r--target_explorer/experimental/plugins/org.eclipse.tcf.te.ui.sequoyah.vnc/.classpath (renamed from target_explorer/plugins/org.eclipse.tm.te.core/.classpath)0
-rw-r--r--target_explorer/experimental/plugins/org.eclipse.tcf.te.ui.sequoyah.vnc/.project28
-rw-r--r--target_explorer/experimental/plugins/org.eclipse.tcf.te.ui.sequoyah.vnc/.settings/org.eclipse.jdt.core.prefs362
-rw-r--r--target_explorer/experimental/plugins/org.eclipse.tcf.te.ui.sequoyah.vnc/.settings/org.eclipse.jdt.ui.prefs4
-rw-r--r--target_explorer/experimental/plugins/org.eclipse.tcf.te.ui.sequoyah.vnc/META-INF/MANIFEST.MF20
-rw-r--r--target_explorer/experimental/plugins/org.eclipse.tcf.te.ui.sequoyah.vnc/build.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals.process/build.properties)0
-rw-r--r--target_explorer/experimental/plugins/org.eclipse.tcf.te.ui.sequoyah.vnc/plugin.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/plugin.properties)12
-rw-r--r--target_explorer/experimental/plugins/org.eclipse.tcf.te.ui.sequoyah.vnc/plugin.xml46
-rw-r--r--target_explorer/experimental/plugins/org.eclipse.tcf.te.ui.sequoyah.vnc/src/org/eclipse/tcf/te/ui/sequoyah/vnc/activator/UIPlugin.java64
-rw-r--r--target_explorer/experimental/plugins/org.eclipse.tcf.te.ui.sequoyah.vnc/src/org/eclipse/tcf/te/ui/sequoyah/vnc/handler/LaunchVNCCommandHandler.java167
-rw-r--r--target_explorer/features/org.eclipse.tcf.te.cdt.feature/.project (renamed from target_explorer/features/org.eclipse.tm.te.cdt.feature/.project)2
-rw-r--r--target_explorer/features/org.eclipse.tcf.te.cdt.feature/build.properties (renamed from target_explorer/features/org.eclipse.tm.te.cdt.feature/build.properties)0
-rw-r--r--target_explorer/features/org.eclipse.tcf.te.cdt.feature/epl-v10.html (renamed from target_explorer/features/org.eclipse.tm.te.cdt.feature/epl-v10.html)0
-rw-r--r--target_explorer/features/org.eclipse.tcf.te.cdt.feature/feature.properties (renamed from target_explorer/features/org.eclipse.tm.te.cdt.feature/feature.properties)2
-rw-r--r--target_explorer/features/org.eclipse.tcf.te.cdt.feature/feature.xml (renamed from target_explorer/features/org.eclipse.tm.te.cdt.feature/feature.xml)6
-rw-r--r--target_explorer/features/org.eclipse.tcf.te.cdt.feature/license.html (renamed from target_explorer/features/org.eclipse.tm.te.cdt.feature/license.html)0
-rw-r--r--target_explorer/features/org.eclipse.tcf.te.cdt.feature/pom.xml (renamed from target_explorer/features/org.eclipse.tm.te.cdt.feature/pom.xml)4
-rw-r--r--target_explorer/features/org.eclipse.tcf.te.cdt.sdk.feature/.project (renamed from target_explorer/features/org.eclipse.tm.te.cdt.sdk.feature/.project)2
-rw-r--r--target_explorer/features/org.eclipse.tcf.te.cdt.sdk.feature/build.properties (renamed from target_explorer/features/org.eclipse.tm.te.cdt.sdk.feature/build.properties)0
-rw-r--r--target_explorer/features/org.eclipse.tcf.te.cdt.sdk.feature/epl-v10.html (renamed from target_explorer/features/org.eclipse.tm.te.cdt.sdk.feature/epl-v10.html)0
-rw-r--r--target_explorer/features/org.eclipse.tcf.te.cdt.sdk.feature/feature.properties (renamed from target_explorer/features/org.eclipse.tm.te.cdt.sdk.feature/feature.properties)2
-rw-r--r--target_explorer/features/org.eclipse.tcf.te.cdt.sdk.feature/feature.xml (renamed from target_explorer/features/org.eclipse.tm.te.cdt.sdk.feature/feature.xml)8
-rw-r--r--target_explorer/features/org.eclipse.tcf.te.cdt.sdk.feature/license.html (renamed from target_explorer/features/org.eclipse.tm.te.cdt.sdk.feature/license.html)0
-rw-r--r--target_explorer/features/org.eclipse.tcf.te.cdt.sdk.feature/pom.xml (renamed from target_explorer/features/org.eclipse.tm.te.cdt.sdk.feature/pom.xml)4
-rw-r--r--target_explorer/features/org.eclipse.tcf.te.feature/.project (renamed from target_explorer/features/org.eclipse.tm.te.feature/.project)2
-rw-r--r--target_explorer/features/org.eclipse.tcf.te.feature/build.properties (renamed from target_explorer/features/org.eclipse.tm.te.feature/build.properties)0
-rw-r--r--target_explorer/features/org.eclipse.tcf.te.feature/epl-v10.html (renamed from target_explorer/features/org.eclipse.tm.te.feature/epl-v10.html)0
-rw-r--r--target_explorer/features/org.eclipse.tcf.te.feature/feature.properties (renamed from target_explorer/features/org.eclipse.tm.te.feature/feature.properties)2
-rw-r--r--target_explorer/features/org.eclipse.tcf.te.feature/feature.xml (renamed from target_explorer/features/org.eclipse.tm.te.feature/feature.xml)57
-rw-r--r--target_explorer/features/org.eclipse.tcf.te.feature/license.html (renamed from target_explorer/features/org.eclipse.tm.te.feature/license.html)0
-rw-r--r--target_explorer/features/org.eclipse.tcf.te.feature/pom.xml (renamed from target_explorer/features/org.eclipse.tm.te.feature/pom.xml)4
-rw-r--r--target_explorer/features/org.eclipse.tcf.te.rcp.feature/.project (renamed from target_explorer/features/org.eclipse.tm.te.rcp.feature/.project)2
-rw-r--r--target_explorer/features/org.eclipse.tcf.te.rcp.feature/build.properties (renamed from target_explorer/features/org.eclipse.tm.te.rcp.feature/build.properties)0
-rw-r--r--target_explorer/features/org.eclipse.tcf.te.rcp.feature/epl-v10.html (renamed from target_explorer/features/org.eclipse.tm.te.rcp.feature/epl-v10.html)0
-rw-r--r--target_explorer/features/org.eclipse.tcf.te.rcp.feature/feature.properties (renamed from target_explorer/features/org.eclipse.tm.te.rcp.feature/feature.properties)2
-rw-r--r--target_explorer/features/org.eclipse.tcf.te.rcp.feature/feature.xml (renamed from target_explorer/features/org.eclipse.tm.te.rcp.feature/feature.xml)6
-rw-r--r--target_explorer/features/org.eclipse.tcf.te.rcp.feature/license.html (renamed from target_explorer/features/org.eclipse.tm.te.rcp.feature/license.html)0
-rw-r--r--target_explorer/features/org.eclipse.tcf.te.rcp.feature/pom.xml (renamed from target_explorer/features/org.eclipse.tm.te.sdk.feature/pom.xml)4
-rw-r--r--target_explorer/features/org.eclipse.tcf.te.sdk.feature/.project (renamed from target_explorer/features/org.eclipse.tm.te.sdk.feature/.project)2
-rw-r--r--target_explorer/features/org.eclipse.tcf.te.sdk.feature/build.properties (renamed from target_explorer/features/org.eclipse.tm.te.sdk.feature/build.properties)0
-rw-r--r--target_explorer/features/org.eclipse.tcf.te.sdk.feature/epl-v10.html (renamed from target_explorer/features/org.eclipse.tm.te.sdk.feature/epl-v10.html)0
-rw-r--r--target_explorer/features/org.eclipse.tcf.te.sdk.feature/feature.properties (renamed from target_explorer/features/org.eclipse.tm.te.sdk.feature/feature.properties)2
-rw-r--r--target_explorer/features/org.eclipse.tcf.te.sdk.feature/feature.xml150
-rw-r--r--target_explorer/features/org.eclipse.tcf.te.sdk.feature/license.html (renamed from target_explorer/features/org.eclipse.tm.te.sdk.feature/license.html)0
-rw-r--r--target_explorer/features/org.eclipse.tcf.te.sdk.feature/pom.xml (renamed from target_explorer/features/org.eclipse.tm.te.rcp.feature/pom.xml)4
-rw-r--r--target_explorer/features/org.eclipse.tcf.te.tcf.feature/.project (renamed from target_explorer/features/org.eclipse.tm.te.tcf.feature/.project)2
-rw-r--r--target_explorer/features/org.eclipse.tcf.te.tcf.feature/build.properties (renamed from target_explorer/features/org.eclipse.tm.te.tcf.feature/build.properties)0
-rw-r--r--target_explorer/features/org.eclipse.tcf.te.tcf.feature/epl-v10.html (renamed from target_explorer/features/org.eclipse.tm.te.tcf.feature/epl-v10.html)0
-rw-r--r--target_explorer/features/org.eclipse.tcf.te.tcf.feature/feature.properties (renamed from target_explorer/features/org.eclipse.tm.te.tcf.feature/feature.properties)2
-rw-r--r--target_explorer/features/org.eclipse.tcf.te.tcf.feature/feature.xml (renamed from target_explorer/features/org.eclipse.tm.te.tcf.feature/feature.xml)66
-rw-r--r--target_explorer/features/org.eclipse.tcf.te.tcf.feature/license.html (renamed from target_explorer/features/org.eclipse.tm.te.tcf.feature/license.html)0
-rw-r--r--target_explorer/features/org.eclipse.tcf.te.tcf.feature/pom.xml17
-rw-r--r--target_explorer/features/org.eclipse.tcf.te.tcf.rcp.feature/.project (renamed from target_explorer/features/org.eclipse.tm.te.tcf.rcp.feature/.project)2
-rw-r--r--target_explorer/features/org.eclipse.tcf.te.tcf.rcp.feature/build.properties (renamed from target_explorer/features/org.eclipse.tm.te.tcf.rcp.feature/build.properties)0
-rw-r--r--target_explorer/features/org.eclipse.tcf.te.tcf.rcp.feature/epl-v10.html (renamed from target_explorer/features/org.eclipse.tm.te.tcf.rcp.feature/epl-v10.html)0
-rw-r--r--target_explorer/features/org.eclipse.tcf.te.tcf.rcp.feature/feature.properties (renamed from target_explorer/features/org.eclipse.tm.te.tcf.rcp.feature/feature.properties)2
-rw-r--r--target_explorer/features/org.eclipse.tcf.te.tcf.rcp.feature/feature.xml (renamed from target_explorer/features/org.eclipse.tm.te.tcf.rcp.feature/feature.xml)6
-rw-r--r--target_explorer/features/org.eclipse.tcf.te.tcf.rcp.feature/license.html (renamed from target_explorer/features/org.eclipse.tm.te.tcf.rcp.feature/license.html)0
-rw-r--r--target_explorer/features/org.eclipse.tcf.te.tcf.rcp.feature/pom.xml17
-rw-r--r--target_explorer/features/org.eclipse.tcf.te.tcf.sdk.feature/.project28
-rw-r--r--target_explorer/features/org.eclipse.tcf.te.tcf.sdk.feature/build.properties (renamed from target_explorer/features/org.eclipse.tm.te.tcf.sdk.feature/build.properties)0
-rw-r--r--target_explorer/features/org.eclipse.tcf.te.tcf.sdk.feature/epl-v10.html (renamed from target_explorer/features/org.eclipse.tm.te.tcf.sdk.feature/epl-v10.html)0
-rw-r--r--target_explorer/features/org.eclipse.tcf.te.tcf.sdk.feature/feature.properties (renamed from target_explorer/features/org.eclipse.tm.te.tcf.sdk.feature/feature.properties)2
-rw-r--r--target_explorer/features/org.eclipse.tcf.te.tcf.sdk.feature/feature.xml (renamed from target_explorer/features/org.eclipse.tm.te.sdk.feature/feature.xml)36
-rw-r--r--target_explorer/features/org.eclipse.tcf.te.tcf.sdk.feature/license.html (renamed from target_explorer/features/org.eclipse.tm.te.tcf.sdk.feature/license.html)0
-rw-r--r--target_explorer/features/org.eclipse.tcf.te.tcf.sdk.feature/pom.xml17
-rw-r--r--target_explorer/features/org.eclipse.tm.te.tcf.feature/pom.xml17
-rw-r--r--target_explorer/features/org.eclipse.tm.te.tcf.rcp.feature/pom.xml17
-rw-r--r--target_explorer/features/org.eclipse.tm.te.tcf.sdk.feature/.project28
-rw-r--r--target_explorer/features/org.eclipse.tm.te.tcf.sdk.feature/feature.xml88
-rw-r--r--target_explorer/features/org.eclipse.tm.te.tcf.sdk.feature/pom.xml17
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.core/.classpath (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/.classpath)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.core/.options1
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.core/.project (renamed from target_explorer/plugins/org.eclipse.tm.te.core/.project)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.core/.settings/org.eclipse.jdt.core.prefs (renamed from target_explorer/plugins/org.eclipse.tm.te.core/.settings/org.eclipse.jdt.core.prefs)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.core/.settings/org.eclipse.jdt.ui.prefs (renamed from target_explorer/plugins/org.eclipse.tm.te.core/.settings/org.eclipse.jdt.ui.prefs)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.core/META-INF/MANIFEST.MF23
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.core/build.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.core/build.properties)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.core/plugin.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.core/plugin.properties)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.core/plugin.xml27
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.core/pom.xml (renamed from target_explorer/plugins/org.eclipse.tm.te.rcp/pom.xml)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/activator/CoreBundleActivator.java (renamed from target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/activator/CoreBundleActivator.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/adapters/AdapterFactory.java (renamed from target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/adapters/AdapterFactory.java)21
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/adapters/ModelNodePersistableAdapter.java356
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/adapters/ModelNodePersistableNameProvider.java42
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/adapters/PropertyTester.java60
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/async/AbstractAsyncExecutable.java (renamed from target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/async/AbstractAsyncExecutable.java)16
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/async/AbstractAsyncExecutableJob.java (renamed from target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/async/AbstractAsyncExecutableJob.java)16
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/async/AbstractAsyncExecutableStepperJob.java (renamed from target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/async/AbstractAsyncExecutableStepperJob.java)16
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/async/AsyncCallbackCollector.java (renamed from target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/async/AsyncCallbackCollector.java)14
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/async/AsyncCallbackHandler.java (renamed from target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/async/AsyncCallbackHandler.java)12
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/async/interfaces/IAsyncExecutable.java (renamed from target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/async/interfaces/IAsyncExecutable.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/nls/Messages.java (renamed from target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/nls/Messages.java)9
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/nls/Messages.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/nls/Messages.properties)7
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/utils/text/StringUtil.java (renamed from target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/utils/text/StringUtil.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.core/.classpath (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.model/.classpath)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.core/.options1
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.core/.project28
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.core/.settings/org.eclipse.jdt.core.prefs362
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.core/.settings/org.eclipse.jdt.ui.prefs4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.core/META-INF/MANIFEST.MF12
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.core/build.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.rcp.application/build.properties)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.core/plugin.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/plugin.properties)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.core/pom.xml17
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/activator/CoreBundleActivator.java75
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/nls/Messages.java32
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/nls/Messages.properties5
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.ui/.classpath (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.persistence/.classpath)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.ui/.options1
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.ui/.project28
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.ui/.settings/org.eclipse.jdt.core.prefs362
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.ui/.settings/org.eclipse.jdt.ui.prefs4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.ui/META-INF/MANIFEST.MF15
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.ui/build.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/build.properties)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.ui/plugin.properties12
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.ui/plugin.xml23
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.ui/pom.xml17
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipe/tcf/te/launch/ui/activator/UIPlugin.java114
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipe/tcf/te/launch/ui/nls/Messages.java32
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipe/tcf/te/launch/ui/nls/Messages.properties5
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.rcp.application/.classpath (renamed from target_explorer/plugins/org.eclipse.tm.te.rcp.application/.classpath)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.rcp.application/.project28
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.rcp.application/.settings/org.eclipse.jdt.core.prefs (renamed from target_explorer/plugins/org.eclipse.tm.te.rcp.application/.settings/org.eclipse.jdt.core.prefs)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.rcp.application/.settings/org.eclipse.jdt.ui.prefs (renamed from target_explorer/plugins/org.eclipse.tm.te.rcp.application/.settings/org.eclipse.jdt.ui.prefs)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.rcp.application/META-INF/MANIFEST.MF (renamed from target_explorer/plugins/org.eclipse.tm.te.rcp.application/META-INF/MANIFEST.MF)8
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.rcp.application/build.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.model/build.properties)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.rcp.application/plugin.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.rcp.application/plugin.properties)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.rcp.application/pom.xml17
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.rcp.application/src/org/eclipse/tcf/te/rcp/application/Application.java (renamed from target_explorer/plugins/org.eclipse.tm.te.rcp.application/src/org/eclipse/tm/te/rcp/application/Application.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.rcp.application/src/org/eclipse/tcf/te/rcp/application/ApplicationActionBarAdvisor.java (renamed from target_explorer/plugins/org.eclipse.tm.te.rcp.application/src/org/eclipse/tm/te/rcp/application/ApplicationActionBarAdvisor.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.rcp.application/src/org/eclipse/tcf/te/rcp/application/ApplicationWorkbenchAdvisor.java (renamed from target_explorer/plugins/org.eclipse.tm.te.rcp.application/src/org/eclipse/tm/te/rcp/application/ApplicationWorkbenchAdvisor.java)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.rcp.application/src/org/eclipse/tcf/te/rcp/application/ApplicationWorkbenchWindowAdvisor.java (renamed from target_explorer/plugins/org.eclipse.tm.te.rcp.application/src/org/eclipse/tm/te/rcp/application/ApplicationWorkbenchWindowAdvisor.java)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.rcp.application/src/org/eclipse/tcf/te/rcp/application/activator/UIPlugin.java (renamed from target_explorer/plugins/org.eclipse.tm.te.rcp.application/src/org/eclipse/tm/te/rcp/application/activator/UIPlugin.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.rcp.application/src/org/eclipse/tcf/te/rcp/application/nls/Messages.java (renamed from target_explorer/plugins/org.eclipse.tm.te.rcp.application/src/org/eclipse/tm/te/rcp/application/nls/Messages.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.rcp.application/src/org/eclipse/tcf/te/rcp/application/nls/Messages.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.rcp.application/src/org/eclipse/tm/te/rcp/application/nls/Messages.properties)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.rcp/.classpath (renamed from target_explorer/plugins/org.eclipse.tm.te.rcp/.classpath)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.rcp/.project (renamed from target_explorer/plugins/org.eclipse.tm.te.rcp/.project)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.rcp/.settings/org.eclipse.jdt.core.prefs (renamed from target_explorer/plugins/org.eclipse.tm.te.rcp/.settings/org.eclipse.jdt.core.prefs)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.rcp/.settings/org.eclipse.jdt.ui.prefs (renamed from target_explorer/plugins/org.eclipse.tm.te.rcp/.settings/org.eclipse.jdt.ui.prefs)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.rcp/META-INF/MANIFEST.MF (renamed from target_explorer/plugins/org.eclipse.tm.te.rcp/META-INF/MANIFEST.MF)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.rcp/build.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.rcp/build.properties)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.rcp/plugin.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.rcp/plugin.properties)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.rcp/plugin.xml (renamed from target_explorer/plugins/org.eclipse.tm.te.rcp/plugin.xml)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.rcp/plugin_customization.ini (renamed from target_explorer/plugins/org.eclipse.tm.te.rcp/plugin_customization.ini)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.rcp/pom.xml (renamed from target_explorer/plugins/org.eclipse.tm.te.core/pom.xml)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.rcp/products/TargetExplorer.product (renamed from target_explorer/plugins/org.eclipse.tm.te.rcp/products/TargetExplorer.product)16
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.rcp/products/TargetExplorer_TCF.product (renamed from target_explorer/plugins/org.eclipse.tm.te.rcp/products/TargetExplorer_TCF.product)30
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.rcp/src/org/eclipse/tcf/te/rcp/activator/ProductBundleActivator.java (renamed from target_explorer/plugins/org.eclipse.tm.te.rcp/src/org/eclipse/tm/te/rcp/activator/ProductBundleActivator.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/.classpath (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.services/.classpath)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/.options1
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/.project (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/.project)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/.settings/org.eclipse.jdt.core.prefs (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/.settings/org.eclipse.jdt.core.prefs)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/.settings/org.eclipse.jdt.ui.prefs (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/.settings/org.eclipse.jdt.ui.prefs)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/META-INF/MANIFEST.MF20
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/build.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.persistence/build.properties)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/plugin.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/plugin.properties)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/plugin.xml (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/plugin.xml)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/pom.xml (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/pom.xml)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/schema/executorServices.exsd (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/schema/executorServices.exsd)20
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/schema/executorUtilDelegates.exsd (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/schema/executorUtilDelegates.exsd)20
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/Executors.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/src/org/eclipse/tm/te/runtime/concurrent/Executors.java)14
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/activator/CoreBundleActivator.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.services/src/org/eclipse/tm/te/runtime/services/activator/CoreBundleActivator.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/event/ExecutorThreadNotificationListener.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/src/org/eclipse/tm/te/runtime/concurrent/event/ExecutorThreadNotificationListener.java)10
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/executors/AbstractDelegatingExecutorService.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/src/org/eclipse/tm/te/runtime/concurrent/executors/AbstractDelegatingExecutorService.java)12
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/executors/SingleThreadedExecutorService.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/src/org/eclipse/tm/te/runtime/concurrent/executors/SingleThreadedExecutorService.java)22
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/factories/SingleThreadThreadFactory.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/src/org/eclipse/tm/te/runtime/concurrent/factories/SingleThreadThreadFactory.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/interfaces/IExecutor.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/src/org/eclipse/tm/te/runtime/concurrent/interfaces/IExecutor.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/interfaces/IExecutorUtilDelegate.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/src/org/eclipse/tm/te/runtime/concurrent/interfaces/IExecutorUtilDelegate.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/interfaces/INestableExecutor.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/src/org/eclipse/tm/te/runtime/concurrent/interfaces/INestableExecutor.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/interfaces/ISingleThreadedExecutor.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/src/org/eclipse/tm/te/runtime/concurrent/interfaces/ISingleThreadedExecutor.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/nls/Messages.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/src/org/eclipse/tm/te/runtime/concurrent/nls/Messages.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/nls/Messages.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/src/org/eclipse/tm/te/runtime/concurrent/nls/Messages.properties)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/util/ExecutorsUtil.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/src/org/eclipse/tm/te/runtime/concurrent/util/ExecutorsUtil.java)26
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.model/.classpath (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.statushandler/.classpath)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.model/.options1
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.model/.project28
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.model/.settings/org.eclipse.jdt.core.prefs (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.model/.settings/org.eclipse.jdt.core.prefs)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.model/.settings/org.eclipse.jdt.ui.prefs (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.model/.settings/org.eclipse.jdt.ui.prefs)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.model/META-INF/MANIFEST.MF19
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.model/build.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.services/build.properties)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.model/plugin.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.model/plugin.properties)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.model/plugin.xml6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.model/pom.xml17
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.model/schema/factoryDelegates.exsd (renamed from target_explorer/plugins/org.eclipse.tm.te.core/schema/connectionTypes.exsd)117
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/ContainerModelNode.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.model/src/org/eclipse/tm/te/runtime/model/ContainerModelNode.java)67
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/MessageModelNode.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.model/src/org/eclipse/tm/te/runtime/model/MessageModelNode.java)8
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/ModelNode.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.model/src/org/eclipse/tm/te/runtime/model/ModelNode.java)66
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/PendingOperationModelNode.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.model/src/org/eclipse/tm/te/runtime/model/PendingOperationModelNode.java)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/activator/CoreBundleActivator.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.model/src/org/eclipse/tm/te/runtime/model/activator/CoreBundleActivator.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/factory/AbstractFactoryDelegate.java21
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/factory/Factory.java63
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/interfaces/IContainerModelNode.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.model/src/org/eclipse/tm/te/runtime/model/interfaces/IContainerModelNode.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/interfaces/IModelNode.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.model/src/org/eclipse/tm/te/runtime/model/interfaces/IModelNode.java)44
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/interfaces/IModelNodeProvider.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.model/src/org/eclipse/tm/te/runtime/model/interfaces/IModelNodeProvider.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/interfaces/factory/IFactory.java28
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/interfaces/factory/IFactoryDelegate.java28
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/internal/factory/FactoryDelegateManager.java78
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/internal/factory/FactoryDelegateProxy.java107
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/nls/Messages.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.model/src/org/eclipse/tm/te/runtime/model/nls/Messages.java)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/nls/Messages.properties8
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/.classpath (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/.classpath)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/.project28
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/.settings/org.eclipse.jdt.core.prefs (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.persistence/.settings/org.eclipse.jdt.core.prefs)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/.settings/org.eclipse.jdt.ui.prefs (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.persistence/.settings/org.eclipse.jdt.ui.prefs)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/META-INF/MANIFEST.MF17
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/build.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/build.properties)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/plugin.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.persistence/plugin.properties)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/plugin.xml26
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/pom.xml (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.persistence/pom.xml)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/schema/delegates.exsd (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.persistence/schema/delegates.exsd)20
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/AbstractPersistenceDelegate.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.persistence/src/org/eclipse/tm/te/runtime/persistence/AbstractPersistenceDelegate.java)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/PersistenceDelegateManager.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.persistence/src/org/eclipse/tm/te/runtime/persistence/PersistenceDelegateManager.java)14
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/activator/CoreBundleActivator.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.persistence/src/org/eclipse/tm/te/runtime/persistence/activator/CoreBundleActivator.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/interfaces/IPersistable.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.persistence/src/org/eclipse/tm/te/runtime/persistence/interfaces/IPersistable.java)14
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/interfaces/IPersistableNameProvider.java28
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/interfaces/IPersistableNodeProperties.java26
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/interfaces/IPersistenceDelegate.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.persistence/src/org/eclipse/tm/te/runtime/persistence/interfaces/IPersistenceDelegate.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/interfaces/IPersistenceService.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.persistence/src/org/eclipse/tm/te/runtime/persistence/interfaces/IPersistenceService.java)15
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/properties/PropertiesFilePersistenceDelegate.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.persistence/src/org/eclipse/tm/te/runtime/persistence/properties/PropertiesFilePersistenceDelegate.java)13
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/services/PersistenceService.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.persistence/src/org/eclipse/tm/te/runtime/persistence/services/PersistenceService.java)43
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.services/.classpath (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime/.classpath)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.services/.options1
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.services/.project28
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.services/.settings/org.eclipse.jdt.core.prefs (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.services/.settings/org.eclipse.jdt.core.prefs)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.services/.settings/org.eclipse.jdt.ui.prefs (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.services/.settings/org.eclipse.jdt.ui.prefs)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.services/META-INF/MANIFEST.MF18
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.services/build.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime/build.properties)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.services/plugin.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.services/plugin.properties)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.services/plugin.xml20
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.services/pom.xml17
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.services/schema/services.exsd (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.services/schema/services.exsd)73
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/AbstractService.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.services/src/org/eclipse/tm/te/runtime/services/AbstractService.java)8
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/AbstractServiceManager.java426
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/ServiceManager.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.services/src/org/eclipse/tm/te/runtime/services/ServiceManager.java)62
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/activator/CoreBundleActivator.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/src/org/eclipse/tm/te/runtime/concurrent/activator/CoreBundleActivator.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/IDebugService.java31
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/IPropertiesAccessService.java41
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/IService.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.services/src/org/eclipse/tm/te/runtime/services/interfaces/IService.java)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/ITerminalService.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.services/src/org/eclipse/tm/te/runtime/services/interfaces/ITerminalService.java)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/constants/ILineSeparatorConstants.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.services/src/org/eclipse/tm/te/runtime/services/interfaces/constants/ILineSeparatorConstants.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/constants/IPropertiesAccessServiceConstants.java68
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/constants/ITerminalsConnectorConstants.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.services/src/org/eclipse/tm/te/runtime/services/interfaces/constants/ITerminalsConnectorConstants.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/internal/PropertyTester.java38
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/nls/Messages.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.services/src/org/eclipse/tm/te/runtime/services/nls/Messages.java)5
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/nls/Messages.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.services/src/org/eclipse/tm/te/runtime/services/nls/Messages.properties)3
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/.classpath (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.core/.classpath)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/.project (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.statushandler/.project)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/.settings/org.eclipse.jdt.core.prefs (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.statushandler/.settings/org.eclipse.jdt.core.prefs)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/.settings/org.eclipse.jdt.ui.prefs (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.statushandler/.settings/org.eclipse.jdt.ui.prefs)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/META-INF/MANIFEST.MF18
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/build.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.statushandler/build.properties)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/plugin.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.statushandler/plugin.properties)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/plugin.xml (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.statushandler/plugin.xml)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/pom.xml17
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/schema/bindings.exsd (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.statushandler/schema/bindings.exsd)12
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/schema/handlers.exsd (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.statushandler/schema/handlers.exsd)20
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/AbstractStatusHandler.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.statushandler/src/org/eclipse/tm/te/runtime/statushandler/AbstractStatusHandler.java)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/StatusHandlerManager.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.statushandler/src/org/eclipse/tm/te/runtime/statushandler/StatusHandlerManager.java)20
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/activator/CoreBundleActivator.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.statushandler/src/org/eclipse/tm/te/runtime/statushandler/activator/CoreBundleActivator.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/interfaces/IStatusHandler.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.statushandler/src/org/eclipse/tm/te/runtime/statushandler/interfaces/IStatusHandler.java)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/interfaces/IStatusHandlerConstants.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.statushandler/src/org/eclipse/tm/te/runtime/statushandler/interfaces/IStatusHandlerConstants.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/internal/StatusHandlerBinding.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.statushandler/src/org/eclipse/tm/te/runtime/statushandler/internal/StatusHandlerBinding.java)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/internal/StatusHandlerBindingExtensionPointManager.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.statushandler/src/org/eclipse/tm/te/runtime/statushandler/internal/StatusHandlerBindingExtensionPointManager.java)26
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/nls/Messages.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.statushandler/src/org/eclipse/tm/te/runtime/statushandler/nls/Messages.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/nls/Messages.properties4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/.classpath (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/.classpath)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/.options3
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/.project28
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/.settings/org.eclipse.jdt.core.prefs (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/.settings/org.eclipse.jdt.core.prefs)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/.settings/org.eclipse.jdt.ui.prefs (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/.settings/org.eclipse.jdt.ui.prefs)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/META-INF/MANIFEST.MF22
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/build.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.log.core/build.properties)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/plugin.properties17
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/plugin.xml23
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/pom.xml17
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/schema/stepBindings.exsd (renamed from target_explorer/plugins/org.eclipse.tm.te.core/schema/connectionTypeBindings.exsd)69
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/schema/stepGroups.exsd (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/schema/stepGroups.exsd)31
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/schema/steppers.exsd (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/schema/steppers.exsd)20
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/schema/steps.exsd (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/schema/steps.exsd)22
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/FullQualifiedId.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/FullQualifiedId.java)14
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/StepperAttributeUtil.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/StepperAttributeUtil.java)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/StepperManager.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/StepperManager.java)19
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/activator/CoreBundleActivator.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/activator/CoreBundleActivator.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/AbstractContextStep.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/extensions/AbstractContextStep.java)36
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/AbstractContextStepExecutor.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/extensions/AbstractContextStepExecutor.java)40
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/AbstractContextStepGroup.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/extensions/AbstractContextStepGroup.java)18
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/AbstractContextStepper.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/extensions/AbstractContextStepper.java)170
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/ContextStepExecutor.java122
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/ContextStepGroup.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/extensions/ContextStepGroup.java)115
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/ContextStepGroupable.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/extensions/ContextStepGroupable.java)22
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/manager/StepBinding.java66
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/manager/StepBindingsExtensionPointManager.java185
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/manager/StepExtensionPointManager.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/internal/extensions/StepExtensionPointManager.java)16
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/manager/StepGroupExtensionPointManager.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/internal/extensions/StepGroupExtensionPointManager.java)44
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/manager/StepGroupExtensionProxy.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/internal/extensions/StepGroupExtensionProxy.java)14
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/manager/StepperExtensionPointManager.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/internal/extensions/StepperExtensionPointManager.java)34
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IContext.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/interfaces/IContext.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IContextManipulator.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/interfaces/IContextManipulator.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IContextStep.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/interfaces/IContextStep.java)12
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IContextStepExecutor.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/interfaces/IContextStepExecutor.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IContextStepGroup.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/interfaces/IContextStepGroup.java)14
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IContextStepGroupIterator.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/interfaces/IContextStepGroupIterator.java)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IContextStepGroupable.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/interfaces/IContextStepGroupable.java)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IContextStepper.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/interfaces/IStepper.java)25
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IContextStepperProperties.java41
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IExtendedContextStep.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/interfaces/IExtendedContextStep.java)8
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IFullQualifiedId.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/interfaces/IFullQualifiedId.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IVariantDelegate.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/interfaces/IVariantDelegate.java)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/tracing/ITraceIds.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/interfaces/tracing/ITraceIds.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/nls/Messages.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/nls/Messages.java)14
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/nls/Messages.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/nls/Messages.properties)20
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/stepper/MultiContextStepper.java126
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/stepper/SingleContextStepper.java107
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime/.classpath (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.locator/.classpath)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime/.options3
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime/.project (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.forms/.project)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime/.settings/org.eclipse.jdt.core.prefs (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime/.settings/org.eclipse.jdt.core.prefs)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime/.settings/org.eclipse.jdt.ui.prefs (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime/.settings/org.eclipse.jdt.ui.prefs)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime/META-INF/MANIFEST.MF30
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime/build.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/build.properties)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime/plugin.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime/plugin.properties)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime/plugin.xml32
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime/pom.xml (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.core/pom.xml)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime/schema/eventListeners.exsd (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime/schema/eventListeners.exsd)14
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/activator/CoreBundleActivator.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/activator/CoreBundleActivator.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/callback/Callback.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/callback/Callback.java)26
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/events/ChangeEvent.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/events/ChangeEvent.java)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/events/DisposedEvent.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/events/DisposedEvent.java)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/events/EventManager.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/events/EventManager.java)16
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/extensions/AbstractExtensionPointManager.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/extensions/AbstractExtensionPointManager.java)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/extensions/ExecutableExtension.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/extensions/ExecutableExtension.java)14
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/extensions/ExecutableExtensionProxy.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/extensions/ExecutableExtensionProxy.java)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/extensions/ExtensionPointComparator.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/extensions/ExtensionPointComparator.java)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/interfaces/IConditionTester.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/interfaces/IConditionTester.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/interfaces/IDisposable.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/internal/navigator/LabelProviderDelegate.java)42
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/interfaces/ISharedConstants.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/interfaces/ISharedConstants.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/interfaces/callback/ICallback.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/interfaces/callback/ICallback.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/interfaces/events/IEventFireDelegate.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/interfaces/events/IEventFireDelegate.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/interfaces/events/IEventListener.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/interfaces/events/IEventListener.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/interfaces/extensions/IExecutableExtension.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/interfaces/extensions/IExecutableExtension.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/interfaces/properties/IPropertiesContainer.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/interfaces/properties/IPropertiesContainer.java)21
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/interfaces/tracing/ITraceIds.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/interfaces/tracing/ITraceIds.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/interfaces/workingsets/IWorkingSetElement.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/interfaces/workingsets/IWorkingSetElement.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/internal/DebugEventListener.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/internal/DebugEventListener.java)10
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/internal/PreferencesPropertyTester.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/internal/PreferencesPropertyTester.java)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/internal/PropertiesContainerPropertyTester.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/internal/PropertiesContainerPropertyTester.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/nls/Messages.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/nls/Messages.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/nls/Messages.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/nls/Messages.properties)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/preferences/ScopedEclipsePreferences.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/preferences/ScopedEclipsePreferences.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/properties/PropertiesContainer.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/properties/PropertiesContainer.java)102
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/tracing/TraceHandler.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/tracing/TraceHandler.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/utils/Host.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/utils/Host.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/utils/ProgressHelper.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/utils/ProgressHelper.java)10
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/utils/StatusHelper.java (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/utils/StatusHelper.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/utils/net/IPAddressUtil.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/utils/IPAddressUtil.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/.classpath (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.log.core/.classpath)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/.options1
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/.project28
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/.settings/org.eclipse.jdt.core.prefs362
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/.settings/org.eclipse.jdt.ui.prefs4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/META-INF/MANIFEST.MF20
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/build.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.processes.core/build.properties)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/plugin.properties12
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/pom.xml17
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/src/org/eclipse/tcf/te/tcf/core/scripting/activator/CoreBundleActivator.java73
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/src/org/eclipse/tcf/te/tcf/core/scripting/events/ScriptEvent.java98
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/src/org/eclipse/tcf/te/tcf/core/scripting/interfaces/IScriptLauncher.java35
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/src/org/eclipse/tcf/te/tcf/core/scripting/interfaces/IScriptLauncherProperties.java23
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/src/org/eclipse/tcf/te/tcf/core/scripting/launcher/ScriptLauncher.java399
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/src/org/eclipse/tcf/te/tcf/core/scripting/nls/Messages.java40
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/src/org/eclipse/tcf/te/tcf/core/scripting/nls/Messages.properties13
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/src/org/eclipse/tcf/te/tcf/core/scripting/parser/Parser.java242
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/src/org/eclipse/tcf/te/tcf/core/scripting/parser/Token.java91
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core/.classpath (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.processes.core/.classpath)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core/.options3
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core/.project (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.core/.project)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core/.settings/org.eclipse.jdt.core.prefs (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.core/.settings/org.eclipse.jdt.core.prefs)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core/.settings/org.eclipse.jdt.ui.prefs (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.core/.settings/org.eclipse.jdt.ui.prefs)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core/META-INF/MANIFEST.MF30
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core/build.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.core/build.properties)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core/plugin.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.core/plugin.properties)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core/plugin.xml (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.core/plugin.xml)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core/pom.xml17
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/Tcf.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.core/src/org/eclipse/tm/te/tcf/core/Tcf.java)23
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/activator/CoreBundleActivator.java77
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/async/CallbackInvocationDelegate.java32
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/concurrent/BlockingCallProxy.java243
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/concurrent/Rendezvous.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/url/Rendezvous.java)12
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/concurrent/interfaces/IProxyDescriptor.java51
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/concurrent/internal/DefaultProxyDescriptor.java115
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/interfaces/IChannelManager.java99
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/interfaces/ITransportTypes.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.core/src/org/eclipse/tm/te/tcf/core/interfaces/ITransportTypes.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/interfaces/tracing/ITraceIds.java26
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/ChannelManager.java444
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/Startup.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.core/src/org/eclipse/tm/te/tcf/core/internal/Startup.java)8
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/utils/LogUtils.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.core/src/org/eclipse/tm/te/tcf/core/internal/utils/LogUtils.java)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/listeners/ChannelListener.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.core/src/org/eclipse/tm/te/tcf/core/internal/listener/InternalChannelListener.java)29
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/listeners/ChannelOpenListener.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.core/src/org/eclipse/tm/te/tcf/core/internal/listener/InternalChannelOpenListener.java)29
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/listeners/interfaces/IChannelOpenListener.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.core/src/org/eclipse/tm/te/tcf/core/internal/interfaces/IChannelOpenListener.java)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/listeners/interfaces/IChannelStateChangeListener.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.core/src/org/eclipse/tm/te/tcf/core/interfaces/listeners/IChannelStateChangeListener.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/listeners/interfaces/IProtocolStateChangeListener.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.core/src/org/eclipse/tm/te/tcf/core/interfaces/listeners/IProtocolStateChangeListener.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/nls/Messages.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.core/src/org/eclipse/tm/te/tcf/core/internal/nls/Messages.java)15
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/nls/Messages.properties19
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/streams/StreamsDataProvider.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.core/src/org/eclipse/tm/te/tcf/core/streams/StreamsDataProvider.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/streams/StreamsDataReceiver.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.core/src/org/eclipse/tm/te/tcf/core/streams/StreamsDataReceiver.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/util/ExceptionUtils.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.core/src/org/eclipse/tm/te/tcf/core/utils/ExceptionUtils.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/util/JSONUtils.java46
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/util/persistence/PersistableNameUtil.java48
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/.classpath (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/.classpath)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/.project (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/.project)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/.settings/org.eclipse.jdt.core.prefs (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/.settings/org.eclipse.jdt.core.prefs)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/.settings/org.eclipse.jdt.ui.prefs (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/.settings/org.eclipse.jdt.ui.prefs)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/META-INF/MANIFEST.MF45
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/build.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/build.properties)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/icons/obj16/error.gifbin0 -> 354 bytes
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/icons/obj16/folder.gif (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/icons/obj16/folder.gif)bin216 -> 216 bytes
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/icons/obj16/hidden_file_filter.pngbin0 -> 438 bytes
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/icons/obj16/newfile_wiz.gifbin0 -> 353 bytes
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/icons/obj16/newfolder_wiz.gifbin0 -> 349 bytes
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/icons/obj16/refresh.gifbin0 -> 327 bytes
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/icons/obj16/root.gifbin0 -> 909 bytes
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/icons/obj16/rootdrive.gif (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/icons/obj16/rootdrive.gif)bin336 -> 336 bytes
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/icons/obj16/rootdriveopen.gif (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/icons/obj16/rootdriveopen.gif)bin339 -> 339 bytes
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/icons/obj16/synch_synch.gif (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/icons/obj16/synch_synch.gif)bin353 -> 353 bytes
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/icons/obj16/system_file_filter.pngbin0 -> 243 bytes
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/icons/obj32/banner.png (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/icons/obj32/banner.png)bin2315 -> 2315 bytes
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/icons/obj32/delete_readonly.pngbin0 -> 367 bytes
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/icons/obj32/replace_confirm.pngbin0 -> 847 bytes
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/icons/ovr/ovr_conflict.png (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/icons/ovr/ovr_conflict.png)bin98 -> 98 bytes
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/icons/ovr/ovr_modified.png (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/icons/ovr/ovr_modified.png)bin97 -> 97 bytes
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/icons/ovr/ovr_outdated.png (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/icons/ovr/ovr_outdated.png)bin98 -> 98 bytes
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/plugin.properties110
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/plugin.xml2229
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/pom.xml (renamed from target_explorer/plugins/org.eclipse.tm.te.rcp.application/pom.xml)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/activator/UIPlugin.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/activator/UIPlugin.java)71
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/controls/FSNavigatorContentProvider.java25
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/controls/FSTreeContentProvider.java543
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/controls/FSTreeViewerSorter.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/controls/FSTreeViewerSorter.java)14
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/dialogs/FSFolderSelectionDialog.java187
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/dialogs/FSOpenFileDialog.java133
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/dialogs/TimeTriggeredProgressMonitorDialog.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/handlers/TimeTriggeredProgressMonitorDialog.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/filters/HiddenFilesViewerFilter.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/filters/HiddenFilesViewerFilter.java)12
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/filters/SystemFilesViewerFilter.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/filters/SystemFilesViewerFilter.java)13
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/help/IContextHelpIds.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/help/IContextHelpIds.java)10
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/interfaces/IUIConstants.java19
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/interfaces/IWindowsFileAttributes.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/interfaces/IWindowsFileAttributes.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/interfaces/preferences/IPreferenceKeys.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/interfaces/preferences/IPreferenceKeys.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/ImageConsts.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/ImageConsts.java)44
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/UserAccount.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/UserAccount.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/adapters/NodeStateFilter.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/adapters/NodeStateFilter.java)40
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/adapters/NodeStateFilterFactory.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/adapters/NodeStateFilterFactory.java)29
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/adapters/PeerModelViewerInput.java81
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/adapters/ViewerInputAdapterFactory.java79
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/autosave/SaveAllListener.java120
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/autosave/SaveListener.java94
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/celleditor/FSCellListener.java91
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/celleditor/FSCellModifier.java87
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/celleditor/FSCellValidator.java85
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/celleditor/FSViewerCellEditorFactory.java103
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/AccessTimeComparator.java29
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/AccessTimeLabelProvider.java43
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/FSTreeElementComparator.java34
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/FSTreeElementLabelProvider.java96
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/FSTreeNodeComparator.java58
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/FileTypeComparator.java29
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/FileTypeLabelProvider.java32
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/ModificationTimeComparator.java29
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/ModificationTimeLabelProvider.java43
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/SizeComparator.java29
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/SizeLabelProvider.java43
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/compare/EditableSharedDocumentAdapter.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/compare/EditableSharedDocumentAdapter.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/compare/LocalFileSaveable.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/compare/LocalFileSaveable.java)21
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/compare/LocalTypedElement.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/compare/LocalTypedElement.java)22
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/compare/MergeEditorInput.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/compare/MergeEditorInput.java)25
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/compare/MergeInput.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/compare/MergeInput.java)14
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/compare/MergeTypedElement.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/compare/MergeTypedElement.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/compare/RemoteTypedElement.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/compare/RemoteTypedElement.java)10
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/decorators/PhantomDecorator.java45
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/decorators/PhantomImageDescriptor.java224
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/dnd/FSDragAdapterAssistant.java90
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/dnd/FSDragSourceListener.java97
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/dnd/FSDropAdapterAssistant.java118
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/dnd/FSDropTargetListener.java118
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/exceptions/TCFChannelException.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/exceptions/TCFChannelException.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/exceptions/TCFException.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/exceptions/TCFException.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/exceptions/TCFFileSystemException.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/exceptions/TCFFileSystemException.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/CommitHandler.java37
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/CopyFilesHandler.java44
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/CutFilesHandler.java45
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/DeleteFilesHandler.java54
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/MergeHandler.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/handlers/MergeHandler.java)10
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/MoveFilesHandler.java52
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/NewFileHandler.java28
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/NewFolderHandler.java28
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/NewNodeHandler.java59
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/OpenFileHandler.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/handlers/OpenFileHandler.java)67
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/OpenWithContribution.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/handlers/OpenWithContribution.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/OpenWithMenu.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/handlers/OpenWithMenu.java)71
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/PasteFilesHandler.java82
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/RefreshDirectoryHandler.java55
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/RefreshHandler.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/handlers/RefreshHandler.java)10
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/RefreshViewerHandler.java56
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/RenameFilesHandler.java136
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/UpdateHandler.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/handlers/RevertHandler.java)12
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSClipboard.java90
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSCopy.java221
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSCreate.java180
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSCreateFile.java79
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSCreateFolder.java67
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSCreateRoot.java117
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSDelete.java260
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSMove.java207
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSOperation.java680
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSRefresh.java144
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSRename.java128
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/preferences/PreferencesInitializer.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/preferences/PreferencesInitializer.java)20
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/preferences/TargetExplorerPreferencePage.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/preferences/TargetExplorerPreferencePage.java)31
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/properties/AdvancedAttributesDialog.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/properties/AdvancedAttributesDialog.java)29
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/properties/GeneralInformationPage.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/properties/GeneralInformationPage.java)39
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/BasicFileSection.java48
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/BasicFolderSection.java121
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/FileFilter.java33
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/FolderFilter.java33
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/LinuxFilter.java33
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/LinuxPermissionsSection.java142
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/WindowsAttributesCESection.java100
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/WindowsAttributesSection.java95
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/WindowsFileAISection.java35
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/WindowsFileFilter.java33
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/WindowsFilter.java33
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/WindowsFolderAISection.java120
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/WindowsFolderFilter.java33
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/testers/CachePropertyTester.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/handlers/CachePropertyTester.java)3
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/testers/ClipboardPropertyTester.java80
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/testers/EditorActivationEventPropertyTester.java42
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/testers/FSTreeNodePropertyTester.java117
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/testers/TargetPropertyTester.java68
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/url/TcfInputStream.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/url/TcfInputStream.java)23
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/url/TcfOutputStream.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/url/TcfOutputStream.java)22
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/url/TcfURLConnection.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/url/TcfURLConnection.java)96
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/utils/CacheManager.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/handlers/CacheManager.java)79
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/utils/ContentTypeHelper.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/handlers/ContentTypeHelper.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/utils/PersistenceManager.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/handlers/PersistenceManager.java)44
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/utils/StateManager.java187
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/utils/UserManager.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/handlers/UserManager.java)99
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/FolderValidator.java60
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/NameValidator.java108
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/NewFileWizard.java48
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/NewFileWizardPage.java52
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/NewFolderWizard.java48
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/NewFolderWizardPage.java52
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/NewNodeWizard.java211
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/NewNodeWizardPage.java360
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/TargetContentProvider.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/internal/navigator/ContentProviderDelegate.java)220
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/TargetPatternFilter.java49
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/TargetSelectionPage.java296
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/model/CacheState.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/model/CacheState.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/model/FSModel.java298
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/model/FSTreeNode.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/model/FSTreeNode.java)240
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/nls/Messages.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/nls/Messages.java)115
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/nls/Messages.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/nls/Messages.properties)112
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/.classpath (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.core/.classpath)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/.options1
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/.project28
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/.settings/org.eclipse.jdt.core.prefs362
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/.settings/org.eclipse.jdt.ui.prefs4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/META-INF/MANIFEST.MF21
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/build.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.ui/build.properties)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/plugin.properties12
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/plugin.xml23
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/pom.xml17
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/activator/CoreBundleActivator.java72
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/nls/Messages.java32
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/nls/Messages.properties5
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/services/DebugService.java254
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/.classpath (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.ui/.classpath)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/.options1
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/.project28
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/.settings/org.eclipse.jdt.core.prefs362
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/.settings/org.eclipse.jdt.ui.prefs4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/META-INF/MANIFEST.MF17
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/build.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.core/build.properties)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/plugin.properties17
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/pom.xml17
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/activator/UIPlugin.java112
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/nls/Messages.java32
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/nls/Messages.properties5
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/.classpath (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.ui/.classpath)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/.options5
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/.project (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.locator/.project)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/.settings/org.eclipse.jdt.core.prefs (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.locator/.settings/org.eclipse.jdt.core.prefs)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/.settings/org.eclipse.jdt.ui.prefs (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.locator/.settings/org.eclipse.jdt.ui.prefs)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/META-INF/MANIFEST.MF31
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/build.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.locator/build.properties)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/plugin.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.locator/plugin.properties)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/plugin.xml59
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/pom.xml17
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/Scanner.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/Scanner.java)18
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/ScannerRunnable.java336
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/activator/CoreBundleActivator.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/activator/CoreBundleActivator.java)21
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/IModelListener.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/interfaces/IModelListener.java)23
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/IScanner.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/interfaces/IScanner.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/ITracing.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/interfaces/ITracing.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/nodes/ILocatorModel.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/interfaces/nodes/ILocatorModel.java)47
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/nodes/IPeerModel.java71
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/nodes/IPeerModelProperties.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/interfaces/nodes/IPeerModelProperties.java)11
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/nodes/IPeerModelProvider.java26
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/nodes/IPeerRedirector.java25
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/preferences/IPreferenceKeys.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/interfaces/preferences/IPreferenceKeys.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/services/ILocatorModelLookupService.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/interfaces/services/ILocatorModelLookupService.java)25
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/services/ILocatorModelRefreshService.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/interfaces/services/ILocatorModelRefreshService.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/services/ILocatorModelService.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/interfaces/services/ILocatorModelService.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/services/ILocatorModelUpdateService.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/interfaces/services/ILocatorModelUpdateService.java)36
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/internal/MyPropertyTester.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/internal/MyPropertyTester.java)18
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/internal/PeersPersistenceDelegate.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/internal/PeersPersistenceDelegate.java)10
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/internal/adapters/AdapterFactory.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/internal/adapters/AdapterFactory.java)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/internal/adapters/MapPersistableAdapter.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/internal/adapters/MapPersistableAdapter.java)36
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/internal/adapters/PeerModelPersistableAdapter.java126
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/internal/nls/Messages.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/internal/nls/Messages.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/internal/nls/Messages.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/internal/nls/Messages.properties)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/internal/preferences/PreferencesInitializer.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/internal/preferences/PreferencesInitializer.java)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/internal/services/PropertiesAccessService.java67
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/listener/ChannelStateChangeListener.java90
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/listener/LocatorListener.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/listener/LocatorListener.java)34
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/listener/ModelAdapter.java35
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/model/Model.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/model/Model.java)34
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/nodes/LocatorModel.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/nodes/LocatorModel.java)282
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/nodes/PeerModel.java267
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/nodes/PeerRedirector.java63
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/services/AbstractLocatorModelService.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/services/AbstractLocatorModelService.java)8
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/services/LocatorModelLookupService.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/services/LocatorModelLookupService.java)61
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/services/LocatorModelRefreshService.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/services/LocatorModelRefreshService.java)121
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/services/LocatorModelUpdateService.java172
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/.classpath (renamed from target_explorer/plugins/org.eclipse.tm.te.tests/.classpath)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/.options3
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/.project (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.log.core/.project)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/.settings/org.eclipse.jdt.core.prefs (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.log.core/.settings/org.eclipse.jdt.core.prefs)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/.settings/org.eclipse.jdt.ui.prefs (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.log.core/.settings/org.eclipse.jdt.ui.prefs)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/META-INF/MANIFEST.MF20
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/build.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.tests/build.properties)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/plugin.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.log.core/plugin.properties)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/plugin.xml (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.log.core/plugin.xml)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/pom.xml (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.model/pom.xml)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/src/org/eclipse/tcf/te/tcf/log/core/activator/CoreBundleActivator.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.log.core/src/org/eclipse/tm/te/tcf/log/core/activator/CoreBundleActivator.java)19
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/src/org/eclipse/tcf/te/tcf/log/core/events/MonitorEvent.java97
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/src/org/eclipse/tcf/te/tcf/log/core/interfaces/IPreferenceKeys.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.log.core/src/org/eclipse/tm/te/tcf/log/core/interfaces/IPreferenceKeys.java)13
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/src/org/eclipse/tcf/te/tcf/log/core/interfaces/ITracing.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.log.core/src/org/eclipse/tm/te/tcf/log/core/interfaces/ITracing.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/src/org/eclipse/tcf/te/tcf/log/core/internal/LogManager.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.log.core/src/org/eclipse/tm/te/tcf/log/core/internal/LogManager.java)72
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/src/org/eclipse/tcf/te/tcf/log/core/internal/PreferencesInitializer.java52
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/src/org/eclipse/tcf/te/tcf/log/core/internal/Startup.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.log.core/src/org/eclipse/tm/te/tcf/log/core/internal/Startup.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/src/org/eclipse/tcf/te/tcf/log/core/internal/listener/ChannelStateChangeListener.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.log.core/src/org/eclipse/tm/te/tcf/log/core/internal/listener/ChannelStateChangeListener.java)8
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/src/org/eclipse/tcf/te/tcf/log/core/internal/listener/ChannelTraceListener.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.log.core/src/org/eclipse/tm/te/tcf/log/core/internal/listener/ChannelTraceListener.java)52
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/src/org/eclipse/tcf/te/tcf/log/core/internal/listener/ChannelTraceListenerManager.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.log.core/src/org/eclipse/tm/te/tcf/log/core/internal/listener/ChannelTraceListenerManager.java)24
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/src/org/eclipse/tcf/te/tcf/log/core/internal/nls/Messages.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.log.core/src/org/eclipse/tm/te/tcf/log/core/internal/nls/Messages.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/src/org/eclipse/tcf/te/tcf/log/core/internal/nls/Messages.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.log.core/src/org/eclipse/tm/te/tcf/log/core/internal/nls/Messages.properties)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/.classpath (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.controls/.classpath)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/.options4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/.project28
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/.settings/org.eclipse.jdt.core.prefs (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.processes.core/.settings/org.eclipse.jdt.core.prefs)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/.settings/org.eclipse.jdt.ui.prefs (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.processes.core/.settings/org.eclipse.jdt.ui.prefs)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/META-INF/MANIFEST.MF21
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/build.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.forms/build.properties)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/plugin.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.processes.core/plugin.properties)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/pom.xml17
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/activator/CoreBundleActivator.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.processes.core/src/org/eclipse/tm/te/tcf/processes/core/activator/CoreBundleActivator.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/interfaces/launcher/IProcessContextAwareListener.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.processes.core/src/org/eclipse/tm/te/tcf/processes/core/interfaces/launcher/IProcessContextAwareListener.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/interfaces/launcher/IProcessLauncher.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.processes.core/src/org/eclipse/tm/te/tcf/processes/core/interfaces/launcher/IProcessLauncher.java)8
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/interfaces/launcher/IProcessStreamsProxy.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.processes.core/src/org/eclipse/tm/te/tcf/processes/core/interfaces/launcher/IProcessStreamsProxy.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/interfaces/tracing/ITraceIds.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.processes.core/src/org/eclipse/tm/te/tcf/processes/core/internal/tracing/ITraceIds.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/launcher/ProcessLauncher.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.processes.core/src/org/eclipse/tm/te/tcf/processes/core/launcher/ProcessLauncher.java)103
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/launcher/ProcessLauncherEventListener.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.processes.core/src/org/eclipse/tm/te/tcf/processes/core/launcher/ProcessLauncherEventListener.java)8
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/launcher/ProcessProcessesListener.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.processes.core/src/org/eclipse/tm/te/tcf/processes/core/launcher/ProcessProcessesListener.java)22
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/launcher/ProcessStateChangeEvent.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.processes.core/src/org/eclipse/tm/te/tcf/processes/core/launcher/ProcessStateChangeEvent.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/launcher/ProcessStreamsListener.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.processes.core/src/org/eclipse/tm/te/tcf/processes/core/launcher/ProcessStreamsListener.java)59
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/nls/Messages.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.processes.core/src/org/eclipse/tm/te/tcf/processes/core/nls/Messages.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/nls/Messages.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.processes.core/src/org/eclipse/tm/te/tcf/processes/core/nls/Messages.properties)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/.classpath (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.forms/.classpath)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/.options1
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/.project28
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/.settings/org.eclipse.jdt.core.prefs (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/.settings/org.eclipse.jdt.core.prefs)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/.settings/org.eclipse.jdt.ui.prefs (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/.settings/org.eclipse.jdt.ui.prefs)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/META-INF/MANIFEST.MF30
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/build.properties7
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/icons/obj16/process.gif (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/icons/obj16/process.gif)bin887 -> 887 bytes
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/icons/obj16/process_root.pngbin0 -> 212 bytes
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/icons/obj16/refresh.gifbin0 -> 327 bytes
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/icons/obj16/refresh_interval.pngbin0 -> 459 bytes
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/icons/obj16/run_refresh.pngbin0 -> 392 bytes
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/icons/obj16/stop_refresh.gifbin0 -> 215 bytes
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/plugin.properties42
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/plugin.xml422
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/pom.xml17
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/activator/UIPlugin.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/src/org/eclipse/tm/te/tcf/processes/ui/activator/UIPlugin.java)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/controls/ProcessNavigatorContentProvider.java25
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/controls/ProcessTreeContentProvider.java158
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/controls/ProcessViewerSorter.java35
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/dialogs/ProcessSelectionDialog.java125
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/help/IContextHelpIds.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/src/org/eclipse/tm/te/tcf/processes/ui/internal/help/IContextHelpIds.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/interfaces/ImageConsts.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/src/org/eclipse/tm/te/tcf/processes/ui/interfaces/ImageConsts.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/adapters/ProcessTreeNodeAdapterFactory.java49
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/callbacks/QueryDoneGetChildren.java74
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/callbacks/QueryDoneGetContext.java121
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/callbacks/QueryDoneOpenChannel.java50
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/callbacks/RefreshDoneGetChildren.java94
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/callbacks/RefreshDoneGetContext.java221
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/callbacks/RefreshDoneOpenChannel.java54
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/columns/PIDComparator.java29
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/columns/PIDLabelProvider.java36
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/columns/PPIDComparator.java29
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/columns/PPIDLabelProvider.java35
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/columns/ProcessComparator.java109
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/columns/ProcessLabelProvider.java61
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/columns/StateComparator.java34
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/columns/StateLabelProvider.java35
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/columns/UserComparator.java34
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/columns/UserLabelProvider.java35
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/dialogs/EditSpeedGradeDialog.java212
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/dialogs/IntervalConfigDialog.java311
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/dialogs/LaunchObjectDialog.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/src/org/eclipse/tm/te/tcf/processes/ui/internal/dialogs/LaunchObjectDialog.java)60
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/dialogs/NewSpeedGradeDialog.java231
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/filters/SingleThreadFilter.java49
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/handler/AbstractChannelCommandHandler.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/src/org/eclipse/tm/te/tcf/processes/ui/internal/handler/AbstractChannelCommandHandler.java)61
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/handler/ConfigIntervalDynamicContribution.java197
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/handler/ConfigRefreshIntervalHandler.java50
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/handler/LaunchProcessesCommandHandler.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/src/org/eclipse/tm/te/tcf/processes/ui/internal/handler/LaunchProcessesCommandHandler.java)33
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/handler/RefreshProcessListHandler.java39
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/handler/StartPollingHandler.java40
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/handler/StopPollingHandler.java39
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/preferences/IPreferenceConsts.java30
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/preferences/PreferencesInitializer.java39
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/preferences/ProcessPreferencePage.java575
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/tabbed/AdvancedPropertiesSection.java126
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/tabbed/BasicContextSection.java96
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/tabbed/BasicInformationSection.java86
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/tabbed/ContextIDSection.java105
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/tabbed/IDSection.java85
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/tabbed/MapContentProvider.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/internal/navigator/ContentProviderDelegate.java)117
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/tabbed/MemorySection.java84
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/tabbed/ProcessFilter.java33
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/testers/EditorInputPropertyTester.java38
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/model/IntervalGrade.java65
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/model/ProcessModel.java308
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/model/ProcessTreeNode.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/src/org/eclipse/tm/te/tcf/processes/ui/controls/ProcessesTreeNode.java)33
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/nls/Messages.java193
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/nls/Messages.properties97
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.services.contexts/.classpath (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.swt/.classpath)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.services.contexts/.options1
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.services.contexts/.project28
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.services.contexts/.settings/org.eclipse.jdt.core.prefs362
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.services.contexts/.settings/org.eclipse.jdt.ui.prefs4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.services.contexts/META-INF/MANIFEST.MF17
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.services.contexts/build.properties5
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.services.contexts/plugin.properties12
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.services.contexts/plugin.xml14
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.services.contexts/pom.xml17
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.services.contexts/src/org/eclipse/tcf/te/tcf/services/contexts/activator/CoreBundleActivator.java73
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.services.contexts/src/org/eclipse/tcf/te/tcf/services/contexts/interfaces/IContextService.java93
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.services.contexts/src/org/eclipse/tcf/te/tcf/services/contexts/internal/AdapterFactory.java80
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.services.contexts/src/org/eclipse/tcf/te/tcf/services/contexts/internal/ContextServiceAdapter.java88
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/.classpath (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals.process/.classpath)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/.options4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/.project28
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/.settings/org.eclipse.jdt.core.prefs (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.core/.settings/org.eclipse.jdt.core.prefs)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/.settings/org.eclipse.jdt.ui.prefs (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.core/.settings/org.eclipse.jdt.ui.prefs)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/META-INF/MANIFEST.MF21
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/build.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.swt/build.properties)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/plugin.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.core/plugin.properties)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/pom.xml17
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/src/org/eclipse/tcf/te/tcf/terminals/core/activator/CoreBundleActivator.java72
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/src/org/eclipse/tcf/te/tcf/terminals/core/interfaces/launcher/ITerminalsContextAwareListener.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.core/src/org/eclipse/tm/te/tcf/terminals/core/interfaces/launcher/ITerminalsContextAwareListener.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/src/org/eclipse/tcf/te/tcf/terminals/core/interfaces/launcher/ITerminalsLauncher.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.core/src/org/eclipse/tm/te/tcf/terminals/core/interfaces/launcher/ITerminalsLauncher.java)8
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/src/org/eclipse/tcf/te/tcf/terminals/core/interfaces/tracing/ITraceIds.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.core/src/org/eclipse/tm/te/tcf/terminals/core/internal/tracing/ITraceIds.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/src/org/eclipse/tcf/te/tcf/terminals/core/launcher/TerminalsLauncher.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.core/src/org/eclipse/tm/te/tcf/terminals/core/launcher/TerminalsLauncher.java)99
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/src/org/eclipse/tcf/te/tcf/terminals/core/launcher/TerminalsLauncherEventListener.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.core/src/org/eclipse/tm/te/tcf/terminals/core/launcher/TerminalsLauncherEventListener.java)8
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/src/org/eclipse/tcf/te/tcf/terminals/core/launcher/TerminalsListener.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.core/src/org/eclipse/tm/te/tcf/terminals/core/launcher/TerminalsListener.java)24
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/src/org/eclipse/tcf/te/tcf/terminals/core/launcher/TerminalsStateChangeEvent.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.core/src/org/eclipse/tm/te/tcf/terminals/core/launcher/TerminalsStateChangeEvent.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/src/org/eclipse/tcf/te/tcf/terminals/core/launcher/TerminalsStreamsListener.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.core/src/org/eclipse/tm/te/tcf/terminals/core/launcher/TerminalsStreamsListener.java)61
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/src/org/eclipse/tcf/te/tcf/terminals/core/nls/Messages.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.core/src/org/eclipse/tm/te/tcf/terminals/core/nls/Messages.java)5
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/src/org/eclipse/tcf/te/tcf/terminals/core/nls/Messages.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.core/src/org/eclipse/tm/te/tcf/terminals/core/nls/Messages.properties)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.ui/.classpath (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals.ssh/.classpath)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.ui/.options1
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.ui/.project28
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.ui/.settings/org.eclipse.jdt.core.prefs (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.ui/.settings/org.eclipse.jdt.core.prefs)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.ui/.settings/org.eclipse.jdt.ui.prefs (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.ui/.settings/org.eclipse.jdt.ui.prefs)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.ui/META-INF/MANIFEST.MF23
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.ui/build.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals.ssh/build.properties)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.ui/plugin.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.ui/plugin.properties)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.ui/plugin.xml (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.ui/plugin.xml)18
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.ui/pom.xml17
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.ui/src/org/eclipse/tcf/te/tcf/terminals/ui/activator/UIPlugin.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.ui/src/org/eclipse/tm/te/tcf/terminals/ui/activator/UIPlugin.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.ui/src/org/eclipse/tcf/te/tcf/terminals/ui/connector/TerminalsConnector.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.ui/src/org/eclipse/tm/te/tcf/terminals/ui/connector/TerminalsConnector.java)30
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.ui/src/org/eclipse/tcf/te/tcf/terminals/ui/connector/TerminalsConnectorType.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.ui/src/org/eclipse/tm/te/tcf/terminals/ui/connector/TerminalsConnectorType.java)16
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.ui/src/org/eclipse/tcf/te/tcf/terminals/ui/connector/TerminalsSettings.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.ui/src/org/eclipse/tm/te/tcf/terminals/ui/connector/TerminalsSettings.java)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.ui/src/org/eclipse/tcf/te/tcf/terminals/ui/launcher/LauncherDelegate.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.ui/src/org/eclipse/tm/te/tcf/terminals/ui/launcher/LauncherDelegate.java)28
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.ui/src/org/eclipse/tcf/te/tcf/terminals/ui/nls/Messages.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.ui/src/org/eclipse/tm/te/tcf/terminals/ui/nls/Messages.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.ui/src/org/eclipse/tcf/te/tcf/terminals/ui/nls/Messages.properties4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/.classpath (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals/.classpath)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/.project (renamed from target_explorer/plugins/org.eclipse.tm.te.rcp.application/.project)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/.settings/org.eclipse.jdt.core.prefs362
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/.settings/org.eclipse.jdt.ui.prefs4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/META-INF/MANIFEST.MF22
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/build.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals/build.properties)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/plugin.properties26
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/plugin.xml63
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/pom.xml17
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/src/org/eclipse/tcf/te/tcf/ui/console/AbstractConsole.java456
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/src/org/eclipse/tcf/te/tcf/ui/console/PageParticipant.java66
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/src/org/eclipse/tcf/te/tcf/ui/console/activator/UIPlugin.java133
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/src/org/eclipse/tcf/te/tcf/ui/console/handler/RemoveHandler.java46
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/src/org/eclipse/tcf/te/tcf/ui/console/help/IContextHelpIds.java28
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/src/org/eclipse/tcf/te/tcf/ui/console/interfaces/IPreferenceKeys.java57
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/src/org/eclipse/tcf/te/tcf/ui/console/internal/preferences/PreferencesInitializer.java64
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/src/org/eclipse/tcf/te/tcf/ui/console/internal/preferences/PreferencesPage.java253
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/src/org/eclipse/tcf/te/tcf/ui/console/nls/Messages.java48
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/src/org/eclipse/tcf/te/tcf/ui/console/nls/Messages.properties21
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/.classpath (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.views/.classpath)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/.project (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.model/.project)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/.settings/org.eclipse.jdt.core.prefs362
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/.settings/org.eclipse.jdt.ui.prefs4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/META-INF/MANIFEST.MF23
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/build.properties7
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/icons/dtool16/run_exc.gifbin0 -> 359 bytes
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/icons/etool16/run_exc.gifbin0 -> 379 bytes
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/icons/eview16/monitor_console.gifbin0 -> 992 bytes
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/icons/eview16/scriptpad.gif (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.views/icons/obj16/workingset.gif)bin906 -> 937 bytes
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/icons/eview16/scriptpad_console.gifbin0 -> 938 bytes
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/icons/obj16/peer.gif (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.ui/icons/obj16/target.gif)bin567 -> 567 bytes
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/plugin.properties55
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/plugin.xml202
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/pom.xml17
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/activator/UIPlugin.java126
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/help/IContextHelpIds.java43
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/internal/ImageConsts.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/internal/ImageConsts.java)34
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/monitor/console/Console.java63
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/monitor/console/Factory.java108
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/monitor/events/EventListener.java64
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/nls/Messages.java40
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/nls/Messages.properties14
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/ScriptPad.java627
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/ScriptPadLineStyleListener.java61
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/ClearAction.java85
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/CopyAction.java51
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/CutAction.java51
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/DeleteAction.java57
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/OpenAction.java96
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/PasteAction.java68
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/PeerAction.java64
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/PeersSubMenuAction.java224
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/PlayAction.java185
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/SelectAllAction.java51
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/console/Console.java37
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/console/Factory.java86
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/events/EventListener.java52
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/.classpath (renamed from target_explorer/plugins/org.eclipse.tm.te.ui/.classpath)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/.project (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.ui/.project)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/.settings/org.eclipse.jdt.core.prefs (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.ui/.settings/org.eclipse.jdt.core.prefs)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/.settings/org.eclipse.jdt.ui.prefs (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.ui/.settings/org.eclipse.jdt.ui.prefs)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/META-INF/MANIFEST.MF43
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/build.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.ui/build.properties)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/icons/dlcl16/newTarget_wiz.gif (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.ui/icons/dlcl16/newTarget_wiz.gif)bin152 -> 152 bytes
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/icons/elcl16/newTarget_wiz.gif (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.ui/icons/elcl16/newTarget_wiz.gif)bin940 -> 940 bytes
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/icons/obj16/discovery_root.gifbin0 -> 955 bytes
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/icons/obj16/peer.gifbin0 -> 567 bytes
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/icons/obj16/rootNode_obj.gif (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.ui/icons/obj16/rootNode_obj.gif)bin1001 -> 1001 bytes
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/icons/ovr16/gold_ovr.gif (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.ui/icons/ovr16/gold_ovr.gif)bin854 -> 854 bytes
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/icons/ovr16/green_ovr.gif (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.ui/icons/ovr16/green_ovr.gif)bin854 -> 854 bytes
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/icons/ovr16/grey_ovr.gif (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.ui/icons/ovr16/grey_ovr.gif)bin854 -> 854 bytes
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/icons/ovr16/redX_ovr.gif (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.ui/icons/ovr16/redX_ovr.gif)bin854 -> 854 bytes
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/icons/ovr16/red_ovr.gif (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.ui/icons/ovr16/red_ovr.gif)bin854 -> 854 bytes
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/plugin.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.ui/plugin.properties)23
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/plugin.xml350
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/pom.xml (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime/pom.xml)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/activator/UIPlugin.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/activator/UIPlugin.java)39
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/controls/CustomTransportPanel.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/wizards/controls/CustomTransportPanel.java)83
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/controls/PeerAttributesTablePart.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/wizards/controls/PeerAttributesTablePart.java)102
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/controls/PeerIdControl.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/wizards/controls/PeerIdControl.java)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/controls/PeerNameControl.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/wizards/controls/PeerNameControl.java)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/controls/PipeTransportPanel.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/wizards/controls/PipeTransportPanel.java)84
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/controls/TcpTransportPanel.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/wizards/controls/TcpTransportPanel.java)111
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/controls/TransportTypeControl.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/wizards/controls/TransportTypeControl.java)16
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/controls/TransportTypePanelControl.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/wizards/controls/TransportTypePanelControl.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/dialogs/AgentSelectionDialog.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/dialogs/AgentSelectionDialog.java)58
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/dialogs/RedirectAgentSelectionDialog.java71
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/OverviewEditorPage.java173
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/controls/InfoSectionPeerIdControl.java54
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/controls/InfoSectionPeerNameControl.java54
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/controls/TransportSectionTypeControl.java70
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/controls/TransportSectionTypePanelControl.java81
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/sections/AttributesSection.java381
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/sections/GeneralInformationSection.java437
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/sections/ServicesSection.java152
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/sections/TransportSection.java454
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/filter/RedirectPeersFilter.java48
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/filter/UnreachablePeersFilter.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/internal/filter/UnreachablePeersFilter.java)8
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/handler/DeleteHandler.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/internal/handler/DeleteCommandHandler.java)39
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/handler/RedirectHandler.java188
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/handler/RefreshHandler.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/internal/handler/RefreshCommandHandler.java)10
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/handler/ResetRedirectHandler.java132
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/help/IContextHelpIds.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/internal/help/IContextHelpIds.java)19
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/ImageConsts.java107
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/adapters/PeerModelAdapterFactory.java48
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/tabbed/PeerGeneralSection.java96
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/tabbed/PeerGeneralSectionContentProvider.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/tables/NodePropertiesContentProvider.java)89
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/tabbed/PeerGeneralSectionLabelProvider.java76
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/navigator/ContentProviderDelegate.java228
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/navigator/EventListener.java47
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/navigator/LabelProvider.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/internal/navigator/LabelProvider.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/navigator/LabelProviderDelegate.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/internal/navigator/LabelProviderDelegate.java)70
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/navigator/ModelListener.java93
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/navigator/images/PeerImageDescriptor.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/internal/navigator/images/PeerImageDescriptor.java)27
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/navigator/nodes/PeerRedirectorGroupNode.java48
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/nls/Messages.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/nls/Messages.java)61
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/nls/Messages.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/nls/Messages.properties)61
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/preferences/LoggingPreferencePage.java251
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/wizards/NewTargetWizard.java112
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/.classpath7
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/.project (renamed from target_explorer/plugins/org.eclipse.tm.te.tests/.project)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/.settings/org.eclipse.jdt.core.prefs (renamed from target_explorer/plugins/org.eclipse.tm.te.tests/.settings/org.eclipse.jdt.core.prefs)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/.settings/org.eclipse.jdt.ui.prefs (renamed from target_explorer/plugins/org.eclipse.tm.te.tests/.settings/org.eclipse.jdt.ui.prefs)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/META-INF/MANIFEST.MF22
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/build.properties6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/plugin.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.tests/plugin.properties)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/plugin.xml188
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/pom.xml (renamed from target_explorer/plugins/org.eclipse.tm.te.tests/pom.xml)10
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/CoreTestCase.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tests/src/org/eclipse/tm/te/tests/CoreTestCase.java)16
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/activator/UIPlugin.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tests/src/org/eclipse/tm/te/tests/activator/UIPlugin.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/interfaces/IConfigurationProperties.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tests/src/org/eclipse/tm/te/tests/interfaces/IConfigurationProperties.java)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/interfaces/IInterruptCondition.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tests/src/org/eclipse/tm/te/tests/interfaces/IInterruptCondition.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/statushandler/StatusHandlerTestCase.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tests/src/org/eclipse/tm/te/tests/statushandler/StatusHandlerTestCase.java)20
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/statushandler/TestStatusHandler.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tests/src/org/eclipse/tm/te/tests/statushandler/TestStatusHandler.java)8
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/stepper/ParameterizedTestStep.java32
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/stepper/StepperTestCase.java265
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/stepper/TestStep.java39
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/suites/AllCoreTests.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tests/src/org/eclipse/tm/te/tests/suites/AllCoreTests.java)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.controls/.classpath7
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.controls/.project (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.controls/.project)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.controls/.settings/org.eclipse.jdt.core.prefs (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.controls/.settings/org.eclipse.jdt.core.prefs)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.controls/.settings/org.eclipse.jdt.ui.prefs (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.controls/.settings/org.eclipse.jdt.ui.prefs)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.controls/META-INF/MANIFEST.MF25
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.controls/build.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.controls/build.properties)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.controls/plugin.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.controls/plugin.properties)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.controls/pom.xml17
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/BaseControl.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/BaseControl.java)18
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/BaseDialogPageControl.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/BaseDialogPageControl.java)20
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/BaseDialogSelectionControl.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/BaseDialogSelectionControl.java)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/BaseEditBrowseTextControl.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/BaseEditBrowseTextControl.java)33
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/BaseJFaceDialogSelectionControl.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/BaseJFaceDialogSelectionControl.java)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/BaseWizardConfigurationPanelControl.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/BaseWizardConfigurationPanelControl.java)20
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/activator/UIPlugin.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/activator/UIPlugin.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/file/DirectorySelectionControl.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/DirectorySelectionControl.java)19
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/file/FileSelectionControl.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/FileSelectionControl.java)19
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/interfaces/IRunnableContextProvider.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/interfaces/IRunnableContextProvider.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/interfaces/IWizardConfigurationPanel.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/interfaces/IWizardConfigurationPanel.java)10
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/net/RemoteHostAddressControl.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/net/RemoteHostAddressControl.java)42
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/net/RemoteHostPortControl.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/net/RemoteHostPortControl.java)16
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/nls/Messages.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/nls/Messages.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/nls/Messages.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/nls/Messages.properties)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/panels/AbstractWizardConfigurationPanel.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/panels/AbstractWizardConfigurationPanel.java)20
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/validator/DirectoryNameValidator.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/validator/DirectoryNameValidator.java)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/validator/DoubleNumberVerifyListener.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/validator/DoubleNumberVerifyListener.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/validator/FileNameValidator.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/validator/FileNameValidator.java)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/validator/HexValidator.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/validator/HexValidator.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/validator/HexVerifyListener.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/validator/HexVerifyListener.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/validator/NameOrIPValidator.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/validator/NameOrIPValidator.java)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/validator/NameOrIPVerifyListener.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/validator/NameOrIPVerifyListener.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/validator/NetMaskValidator.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/validator/NetMaskValidator.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/validator/NetMaskVerifyListener.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/validator/NetMaskVerifyListener.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/validator/NumberValidator.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/validator/NumberValidator.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/validator/NumberVerifyListener.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/validator/NumberVerifyListener.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/validator/PortNumberValidator.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/validator/PortNumberValidator.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/validator/PortNumberVerifyListener.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/validator/PortNumberVerifyListener.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/validator/RegexValidator.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/validator/RegexValidator.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/validator/RegexVerifyListener.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/validator/RegexVerifyListener.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/validator/Validator.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/validator/Validator.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/validator/VerifyListener.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/validator/VerifyListener.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/validator/WorkspaceContainerValidator.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/validator/WorkspaceContainerValidator.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.forms/.classpath7
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.forms/.project28
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.forms/.settings/org.eclipse.jdt.core.prefs (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.forms/.settings/org.eclipse.jdt.core.prefs)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.forms/.settings/org.eclipse.jdt.ui.prefs (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.forms/.settings/org.eclipse.jdt.ui.prefs)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.forms/META-INF/MANIFEST.MF (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.forms/META-INF/MANIFEST.MF)12
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.forms/build.properties5
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.forms/plugin.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.forms/plugin.properties)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.forms/pom.xml17
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.forms/src/org/eclipse/tcf/te/ui/forms/CustomFormToolkit.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.forms/src/org/eclipse/tm/te/ui/forms/CustomFormToolkit.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.forms/src/org/eclipse/tcf/te/ui/forms/FormLayoutFactory.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.forms/src/org/eclipse/tm/te/ui/forms/FormLayoutFactory.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.forms/src/org/eclipse/tcf/te/ui/forms/activator/UIPlugin.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.forms/src/org/eclipse/tm/te/ui/forms/activator/UIPlugin.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.forms/src/org/eclipse/tcf/te/ui/forms/parts/AbstractFormTextSection.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.forms/src/org/eclipse/tm/te/ui/forms/parts/AbstractFormTextSection.java)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.forms/src/org/eclipse/tcf/te/ui/forms/parts/AbstractPart.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.forms/src/org/eclipse/tm/te/ui/forms/parts/AbstractPart.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.forms/src/org/eclipse/tcf/te/ui/forms/parts/AbstractPartWithButtons.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.forms/src/org/eclipse/tm/te/ui/forms/parts/AbstractPartWithButtons.java)20
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.forms/src/org/eclipse/tcf/te/ui/forms/parts/AbstractSection.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.forms/src/org/eclipse/tm/te/ui/forms/parts/AbstractSection.java)50
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.forms/src/org/eclipse/tcf/te/ui/forms/parts/AbstractStructuredViewerPart.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.forms/src/org/eclipse/tm/te/ui/forms/parts/AbstractStructuredViewerPart.java)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.forms/src/org/eclipse/tcf/te/ui/forms/parts/AbstractStructuredViewerSection.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.forms/src/org/eclipse/tm/te/ui/forms/parts/AbstractStructuredViewerSection.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.forms/src/org/eclipse/tcf/te/ui/forms/parts/AbstractTableSection.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.forms/src/org/eclipse/tm/te/ui/forms/parts/AbstractTableSection.java)33
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.forms/src/org/eclipse/tcf/te/ui/forms/parts/AbstractTreeSection.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.forms/src/org/eclipse/tm/te/ui/forms/parts/AbstractTreeSection.java)32
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.forms/src/org/eclipse/tcf/te/ui/forms/parts/TablePart.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.forms/src/org/eclipse/tm/te/ui/forms/parts/TablePart.java)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.forms/src/org/eclipse/tcf/te/ui/forms/parts/TreePart.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.forms/src/org/eclipse/tm/te/ui/forms/parts/TreePart.java)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.swt/.classpath7
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.swt/.project (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime/.project)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.swt/.settings/org.eclipse.jdt.core.prefs (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.swt/.settings/org.eclipse.jdt.core.prefs)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.swt/.settings/org.eclipse.jdt.ui.prefs (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.swt/.settings/org.eclipse.jdt.ui.prefs)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.swt/META-INF/MANIFEST.MF20
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.swt/build.properties5
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.swt/plugin.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.swt/plugin.properties)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.swt/pom.xml (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.ui/pom.xml)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.swt/src/org/eclipse/tcf/te/ui/jface/dialogs/CustomTitleAreaDialog.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.swt/src/org/eclipse/tm/te/ui/jface/dialogs/CustomTitleAreaDialog.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.swt/src/org/eclipse/tcf/te/ui/jface/dialogs/CustomTrayDialog.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.swt/src/org/eclipse/tm/te/ui/jface/dialogs/CustomTrayDialog.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.swt/src/org/eclipse/tcf/te/ui/jface/dialogs/OptionalMessageDialog.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.swt/src/org/eclipse/tm/te/ui/jface/dialogs/OptionalMessageDialog.java)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.swt/src/org/eclipse/tcf/te/ui/jface/images/AbstractImageDescriptor.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.swt/src/org/eclipse/tm/te/ui/jface/images/AbstractImageDescriptor.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.swt/src/org/eclipse/tcf/te/ui/jface/interfaces/IValidatable.java31
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.swt/src/org/eclipse/tcf/te/ui/jface/interfaces/IValidatingContainer.java26
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.swt/src/org/eclipse/tcf/te/ui/swt/DisplayUtil.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.swt/src/org/eclipse/tm/te/ui/swt/DisplayUtil.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.swt/src/org/eclipse/tcf/te/ui/swt/SWTControlUtil.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.swt/src/org/eclipse/tm/te/ui/swt/SWTControlUtil.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.swt/src/org/eclipse/tcf/te/ui/swt/activator/UIPlugin.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.swt/src/org/eclipse/tm/te/ui/swt/activator/UIPlugin.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.swt/src/org/eclipse/tcf/te/ui/swt/listener/AbstractCellPaintListener.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.swt/src/org/eclipse/tm/te/ui/swt/listener/AbstractCellPaintListener.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.swt/src/org/eclipse/tcf/te/ui/swt/listener/AbstractCheckBoxCellPaintListener.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.swt/src/org/eclipse/tm/te/ui/swt/listener/AbstractCheckBoxCellPaintListener.java)8
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.swt/src/org/eclipse/tcf/te/ui/swt/listener/AbstractDecorationCellPaintListener.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.swt/src/org/eclipse/tm/te/ui/swt/listener/AbstractDecorationCellPaintListener.java)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.swt/src/org/eclipse/tcf/te/ui/swt/nls/Messages.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.swt/src/org/eclipse/tm/te/ui/swt/nls/Messages.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.swt/src/org/eclipse/tcf/te/ui/swt/nls/Messages.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.swt/src/org/eclipse/tm/te/ui/swt/nls/Messages.properties)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.swt/src/org/eclipse/tcf/te/ui/swt/widgets/NoteCompositeHelper.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.swt/src/org/eclipse/tm/te/ui/swt/widgets/NoteCompositeHelper.java)31
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/.classpath7
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/.options1
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/.project28
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/.settings/org.eclipse.jdt.core.prefs (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals.process/.settings/org.eclipse.jdt.core.prefs)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/.settings/org.eclipse.jdt.ui.prefs (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals.process/.settings/org.eclipse.jdt.ui.prefs)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/META-INF/MANIFEST.MF22
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/build.properties6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/plugin.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals.process/plugin.properties)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/plugin.xml (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals.process/plugin.xml)10
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/pom.xml (renamed from target_explorer/plugins/org.eclipse.tm.te.runtime.statushandler/pom.xml)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/src/org/eclipse/tcf/te/ui/terminals/process/ProcessConnector.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals.process/src/org/eclipse/tm/te/ui/terminals/process/ProcessConnector.java)26
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/src/org/eclipse/tcf/te/ui/terminals/process/ProcessConnectorType.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals.process/src/org/eclipse/tm/te/ui/terminals/process/ProcessConnectorType.java)14
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/src/org/eclipse/tcf/te/ui/terminals/process/ProcessMonitor.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals.process/src/org/eclipse/tm/te/ui/terminals/process/ProcessMonitor.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/src/org/eclipse/tcf/te/ui/terminals/process/ProcessSettings.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals.process/src/org/eclipse/tm/te/ui/terminals/process/ProcessSettings.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/src/org/eclipse/tcf/te/ui/terminals/process/ProcessSettingsPage.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals.process/src/org/eclipse/tm/te/ui/terminals/process/ProcessSettingsPage.java)14
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/src/org/eclipse/tcf/te/ui/terminals/process/activator/UIPlugin.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals.process/src/org/eclipse/tm/te/ui/terminals/process/activator/UIPlugin.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/src/org/eclipse/tcf/te/ui/terminals/process/nls/Messages.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals.process/src/org/eclipse/tm/te/ui/terminals/process/nls/Messages.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/src/org/eclipse/tcf/te/ui/terminals/process/nls/Messages.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals.process/src/org/eclipse/tm/te/ui/terminals/process/nls/Messages.properties)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/.classpath7
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/.options1
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/.project28
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/.settings/org.eclipse.jdt.core.prefs (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals.ssh/.settings/org.eclipse.jdt.core.prefs)60
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/.settings/org.eclipse.jdt.ui.prefs (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals.ssh/.settings/org.eclipse.jdt.ui.prefs)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/META-INF/MANIFEST.MF (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals.ssh/META-INF/MANIFEST.MF)18
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/build.properties6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/plugin.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals.ssh/plugin.properties)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/plugin.xml32
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/pom.xml17
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/src/org/eclipse/tcf/te/ui/terminals/ssh/activator/UIPlugin.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals.ssh/src/org/eclipse/tm/te/ui/terminals/ssh/activator/UIPlugin.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/src/org/eclipse/tcf/te/ui/terminals/ssh/controls/SshWizardConfigurationPanel.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals.ssh/src/org/eclipse/tm/te/ui/terminals/ssh/controls/SshWizardConfigurationPanel.java)167
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/src/org/eclipse/tcf/te/ui/terminals/ssh/launcher/SshLauncherDelegate.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals.ssh/src/org/eclipse/tm/te/ui/terminals/ssh/launcher/SshLauncherDelegate.java)28
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/src/org/eclipse/tcf/te/ui/terminals/ssh/nls/Messages.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals.ssh/src/org/eclipse/tm/te/ui/terminals/ssh/nls/Messages.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/src/org/eclipse/tcf/te/ui/terminals/ssh/nls/Messages.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals.ssh/src/org/eclipse/tm/te/ui/terminals/ssh/nls/Messages.properties)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/src/org/eclipse/tcf/te/ui/terminals/ssh/types/SshConnectorType.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals.ssh/src/org/eclipse/tm/te/ui/terminals/ssh/types/SshConnectorType.java)14
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/.classpath7
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/.options1
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/.project (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.swt/.project)56
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/.settings/org.eclipse.jdt.core.prefs362
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/.settings/org.eclipse.jdt.ui.prefs4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/META-INF/MANIFEST.MF23
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/build.properties6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/plugin.properties20
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/plugin.xml32
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/pom.xml (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals.process/pom.xml)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/src/org/eclipse/tcf/te/ui/terminals/telnet/activator/UIPlugin.java112
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/src/org/eclipse/tcf/te/ui/terminals/telnet/controls/TelnetWizardConfigurationPanel.java156
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/src/org/eclipse/tcf/te/ui/terminals/telnet/launcher/TelnetLauncherDelegate.java85
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/src/org/eclipse/tcf/te/ui/terminals/telnet/nls/Messages.java35
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/src/org/eclipse/tcf/te/ui/terminals/telnet/nls/Messages.properties7
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/src/org/eclipse/tcf/te/ui/terminals/telnet/types/TelnetConnectorType.java103
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/.classpath7
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/.options2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/.project28
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/.settings/org.eclipse.jdt.core.prefs (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals/.settings/org.eclipse.jdt.core.prefs)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/.settings/org.eclipse.jdt.ui.prefs (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals/.settings/org.eclipse.jdt.ui.prefs)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/META-INF/MANIFEST.MF42
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/build.properties6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/plugin.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals/plugin.properties)1
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/plugin.xml (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals/plugin.xml)72
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/pom.xml17
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/schema/connectorTypes.exsd (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals/schema/connectorTypes.exsd)20
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/schema/launcherDelegates.exsd (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals/schema/launcherDelegates.exsd)20
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/actions/AbstractAction.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/actions/AbstractAction.java)16
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/actions/PinTerminalAction.java56
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/actions/TabScrollLockAction.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/actions/TabScrollLockAction.java)10
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/activator/UIPlugin.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/activator/UIPlugin.java)19
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/events/SelectionChangedBroadcastEvent.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/events/SelectionChangedBroadcastEvent.java)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/help/IContextHelpIds.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/help/IContextHelpIds.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/interfaces/IConfigurationPanel.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/interfaces/IConfigurationPanel.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/interfaces/IConnectorType.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/interfaces/IConnectorType.java)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/interfaces/ILauncherDelegate.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/interfaces/ILauncherDelegate.java)10
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/interfaces/IPreferenceKeys.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/interfaces/IPreferenceKeys.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/interfaces/ITerminalsView.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/interfaces/ITerminalsView.java)18
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/interfaces/IUIConstants.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/interfaces/IUIConstants.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/interfaces/ImageConsts.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/interfaces/ImageConsts.java)19
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/interfaces/tracing/ITraceIds.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/internal/tracing/ITraceIds.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/internal/PreferenceInitializer.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/internal/PreferenceInitializer.java)8
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/internal/PropertyTester.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/internal/PropertyTester.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/internal/SettingsStore.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/internal/SettingsStore.java)10
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/internal/dialogs/LaunchTerminalSettingsDialog.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/internal/dialogs/LaunchTerminalSettingsDialog.java)50
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/internal/handler/LaunchTerminalCommandHandler.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/internal/handler/LaunchTerminalCommandHandler.java)12
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/launcher/AbstractLauncherDelegate.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/launcher/AbstractLauncherDelegate.java)10
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/launcher/LauncherDelegateManager.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/launcher/LauncherDelegateManager.java)16
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/manager/ConsoleManager.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/manager/ConsoleManager.java)292
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/nls/Messages.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/nls/Messages.java)8
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/nls/Messages.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/nls/Messages.properties)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/panels/AbstractConfigurationPanel.java77
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/services/TerminalService.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/services/TerminalService.java)30
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/streams/AbstractStreamsConnector.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/streams/AbstractStreamsConnector.java)8
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/streams/InputStreamMonitor.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/streams/InputStreamMonitor.java)14
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/streams/OutputStreamMonitor.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/streams/OutputStreamMonitor.java)24
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/streams/StreamsConnector.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/streams/StreamsConnector.java)18
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/streams/StreamsSettings.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/streams/StreamsSettings.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/tabs/TabDisposeListener.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/tabs/TabDisposeListener.java)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/tabs/TabFolderManager.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/tabs/TabFolderManager.java)18
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/tabs/TabFolderMenuHandler.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/tabs/TabFolderMenuHandler.java)16
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/tabs/TabFolderSelectionListener.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/tabs/TabFolderSelectionListener.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/tabs/TabFolderToolbarHandler.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/tabs/TabFolderToolbarHandler.java)39
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/tabs/TabPropertyChangeListener.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/tabs/TabPropertyChangeListener.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/tabs/TabTerminalListener.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/tabs/TabTerminalListener.java)8
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/types/AbstractConnectorType.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/types/AbstractConnectorType.java)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/types/ConnectorManager.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/types/ConnectorManager.java)14
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/types/StreamsConnectorType.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/types/StreamsConnectorType.java)14
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/types/TelnetConnectorType.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/types/TelnetConnectorType.java)10
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/view/TerminalsView.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/view/TerminalsView.java)41
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/.classpath7
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/.options3
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/.project (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.views/.project)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/.settings/org.eclipse.jdt.core.prefs (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.views/.settings/org.eclipse.jdt.core.prefs)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/.settings/org.eclipse.jdt.ui.prefs (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.views/.settings/org.eclipse.jdt.ui.prefs)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/META-INF/MANIFEST.MF41
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/build.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.views/build.properties)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/icons/eview16/editor.gif (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.views/icons/eview16/editor.gif)bin940 -> 940 bytes
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/icons/eview16/prop_ps.gif (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.views/icons/eview16/prop_ps.gif)bin343 -> 343 bytes
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/icons/eview16/targets_view.gif (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.views/icons/eview16/targets_view.gif)bin940 -> 940 bytes
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/icons/obj16/workingset.gifbin0 -> 943 bytes
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/icons/obj16/workingsets.gif (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.views/icons/obj16/workingsets.gif)bin333 -> 333 bytes
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/plugin.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.views/plugin.properties)11
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/plugin.xml (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.views/plugin.xml)164
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/pom.xml17
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/schema/editorPageBindings.exsd (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.views/schema/editorPageBindings.exsd)16
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/schema/editorPages.exsd (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.views/schema/editorPages.exsd)16
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/ViewsUtil.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/ViewsUtil.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/actions/NewActionProvider.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/actions/NewActionProvider.java)35
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/activator/UIPlugin.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/activator/UIPlugin.java)23
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/editor/Editor.java321
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/editor/EditorEventListener.java106
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/editor/EditorInput.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/internal/editor/EditorInput.java)14
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/editor/pages/AbstractCustomFormToolkitEditorPage.java163
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/editor/pages/AbstractEditorPage.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/editor/AbstractEditorPage.java)8
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/editor/pages/TreeViewerExplorerEditorPage.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/src/org/eclipse/tm/te/tcf/processes/ui/internal/explorer/ProcessExplorerEditorPage.java)78
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/events/AbstractEventListener.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/events/AbstractEventListener.java)34
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/events/ViewerContentChangeEvent.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/events/ViewerContentChangeEvent.java)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/expressions/EditorPropertyTester.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/expressions/EditorPropertyTester.java)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/extensions/EditorPageBinding.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/extensions/EditorPageBinding.java)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/extensions/EditorPageBindingExtensionPointManager.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/extensions/EditorPageBindingExtensionPointManager.java)18
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/extensions/EditorPageExtensionPointManager.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/extensions/EditorPageExtensionPointManager.java)14
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/OpenCommandHandler.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/handler/OpenCommandHandler.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/PropertiesCommandHandler.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/handler/PropertiesCommandHandler.java)29
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/ShowInPropertiesHandler.java44
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/IEditorPage.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/interfaces/IEditorPage.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/IRoot.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/interfaces/IRoot.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/IUIConstants.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/interfaces/IUIConstants.java)11
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/ImageConsts.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/interfaces/ImageConsts.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/tracing/ITraceIds.java21
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/workingsets/IWorkingSetIDs.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/interfaces/workingsets/IWorkingSetIDs.java)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/workingsets/IWorkingSetNameIDs.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/interfaces/workingsets/IWorkingSetNameIDs.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/PropertyContributorLabelProvider.java72
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/View.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/internal/View.java)66
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/ViewRoot.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/internal/ViewRoot.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/ViewViewer.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/internal/ViewViewer.java)55
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/ViewViewerSorter.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/internal/ViewViewerSorter.java)13
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/listeners/WorkbenchPartListener.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/listeners/WorkbenchPartListener.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/listeners/WorkbenchWindowListener.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/listeners/WorkbenchWindowListener.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/nls/Messages.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/nls/Messages.java)26
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/nls/Messages.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/nls/Messages.properties)26
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/perspective/PerspectiveFactory.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/perspective/PerspectiveFactory.java)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/tabbed/BaseTitledSection.java167
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/workingsets/CustomizedOrderComparator.java120
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/workingsets/CustomizedOrderComparatorFactory.java31
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/workingsets/OthersWorkingSetElementUpdater.java176
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/workingsets/WorkingSetElementAdapter.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/workingsets/WorkingSetElementAdapter.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/workingsets/WorkingSetElementHolder.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/workingsets/WorkingSetElementHolder.java)50
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/workingsets/WorkingSetElementHolderAdapterFactory.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/workingsets/WorkingSetElementHolderAdapterFactory.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/workingsets/WorkingSetElementHolderFactory.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/workingsets/WorkingSetElementHolderFactory.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/workingsets/WorkingSetElementUpdater.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/workingsets/WorkingSetElementUpdater.java)10
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/workingsets/WorkingSetFilter.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/workingsets/WorkingSetFilter.java)26
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/workingsets/WorkingSetViewStateManager.java430
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/workingsets/WorkingSetViewerSorter.java46
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/workingsets/WorkingSetsContentProvider.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/workingsets/WorkingSetsContentProvider.java)231
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/workingsets/WorkingSetsLabelProvider.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/workingsets/WorkingSetsLabelProvider.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/workingsets/actions/ConfigureWorkingSetAction.java181
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/workingsets/actions/WorkingSetActionGroup.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/actions/WorkingSetRootModeActionGroup.java)79
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/workingsets/actions/WorkingSetActionProvider.java126
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/workingsets/dialogs/WorkingSetConfigurationDialog.java598
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/workingsets/pages/AbstractWorkingSetWizardPage.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/workingsets/pages/AbstractWorkingSetWizardPage.java)8
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/workingsets/pages/TargetWorkingSetPage.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/workingsets/pages/TargetWorkingSetPage.java)30
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/.classpath7
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/.project (renamed from target_explorer/plugins/org.eclipse.tm.te.ui/.project)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/.settings/org.eclipse.jdt.core.prefs (renamed from target_explorer/plugins/org.eclipse.tm.te.ui/.settings/org.eclipse.jdt.core.prefs)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/.settings/org.eclipse.jdt.ui.prefs (renamed from target_explorer/plugins/org.eclipse.tm.te.ui/.settings/org.eclipse.jdt.ui.prefs)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/META-INF/MANIFEST.MF40
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/build.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.ui/build.properties)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/icons/dlcl16/filter_ps.gifbin0 -> 155 bytes
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/icons/dlcl16/newtarget_wiz.gif (renamed from target_explorer/plugins/org.eclipse.tm.te.ui/icons/dlcl16/newtarget_wiz.gif)bin202 -> 202 bytes
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/icons/elcl16/filter_ps.gifbin0 -> 219 bytes
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/icons/elcl16/help.gifbin0 -> 259 bytes
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/icons/elcl16/newtarget_wiz.gif (renamed from target_explorer/plugins/org.eclipse.tm.te.ui/icons/elcl16/newtarget_wiz.gif)bin328 -> 328 bytes
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/icons/ovr16/busy.gif (renamed from target_explorer/plugins/org.eclipse.tm.te.ui/icons/ovr16/busy.gif)bin838 -> 838 bytes
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/icons/ovr16/gold_ovr.gif (renamed from target_explorer/plugins/org.eclipse.tm.te.ui/icons/ovr16/gold_ovr.gif)bin854 -> 854 bytes
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/icons/ovr16/green_ovr.gif (renamed from target_explorer/plugins/org.eclipse.tm.te.ui/icons/ovr16/green_ovr.gif)bin854 -> 854 bytes
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/icons/ovr16/grey_ovr.gif (renamed from target_explorer/plugins/org.eclipse.tm.te.ui/icons/ovr16/grey_ovr.gif)bin854 -> 854 bytes
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/icons/ovr16/redX_ovr.gif (renamed from target_explorer/plugins/org.eclipse.tm.te.ui/icons/ovr16/redX_ovr.gif)bin854 -> 854 bytes
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/icons/ovr16/red_ovr.gif (renamed from target_explorer/plugins/org.eclipse.tm.te.ui/icons/ovr16/red_ovr.gif)bin854 -> 854 bytes
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/icons/wizban/newtarget_wiz.gif (renamed from target_explorer/plugins/org.eclipse.tm.te.ui/icons/wizban/newtarget_wiz.gif)bin2886 -> 2886 bytes
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/plugin.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.ui/plugin.properties)11
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/plugin.xml99
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/pom.xml (renamed from target_explorer/plugins/org.eclipse.tm.te.ui/pom.xml)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/schema/cellEditors.exsd201
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/schema/newWizards.exsd (renamed from target_explorer/plugins/org.eclipse.tm.te.ui/schema/newWizards.exsd)25
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/schema/viewers.exsd739
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/schema/wizardProviders.exsd109
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/AbstractViewerComparator.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/AbstractViewerComparator.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/WorkbenchPartControl.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/WorkbenchPartControl.java)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/activator/UIPlugin.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/activator/UIPlugin.java)17
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/dialogs/NameValuePairDialog.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/dialogs/NameValuePairDialog.java)14
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/dialogs/RenameDialog.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/dialogs/RenameDialog.java)8
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/events/AbstractEventListener.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/events/AbstractEventListener.java)10
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/interfaces/IContextHelpIds.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/interfaces/IContextHelpIds.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/interfaces/IUIConstants.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/interfaces/IUIConstants.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/interfaces/IViewerCellEditorFactory.java58
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/interfaces/IViewerInput.java60
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/interfaces/ImageConsts.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/interfaces/ImageConsts.java)17
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/interfaces/data/IDataExchangeNode.java39
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/interfaces/data/IDataExchangeNode2.java30
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/interfaces/data/IDataExchangeNode3.java38
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/internal/executors/SWTDisplayExecutor.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/internal/executors/SWTDisplayExecutor.java)20
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/internal/executors/SWTDisplayExecutorUtilDelegate.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/internal/executors/SWTDisplayExecutorUtilDelegate.java)10
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/nls/Messages.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/nls/Messages.java)16
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/nls/Messages.properties (renamed from target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/nls/Messages.properties)18
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/preferences/PreferencePage.java50
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/statushandler/DefaultStatusHandler.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/statushandler/DefaultStatusHandler.java)25
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/tables/TableViewerComparator.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/tables/TableViewerComparator.java)14
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/tables/properties/NodePropertiesTableControl.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/tables/properties/NodePropertiesTableControl.java)14
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/tables/properties/NodePropertiesTableTableNode.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/tables/properties/NodePropertiesTableTableNode.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/AbstractTreeControl.java946
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/ColumnDescriptor.java364
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/ColumnState.java97
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/CommonViewerListener.java63
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/ConfigFilterAction.java113
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/FilterDescriptor.java141
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/FilterState.java57
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeArrayContentProvider.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/trees/TreeArrayContentProvider.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeContentProvider.java114
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeControl.java176
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeViewerComparator.java61
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeViewerDecoratingLabelProvider.java (renamed from target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/controls/FSTreeDecoratingLabelProvider.java)10
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeViewerEditorActivationStrategy.java171
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeViewerExtension.java592
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeViewerHeaderMenu.java133
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeViewerLabelProvider.java97
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeViewerSorter.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/trees/TreeViewerSorter.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeViewerState.java204
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/ViewerDescriptor.java109
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/ViewerStateManager.java274
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/utils/DialogSettingsUtil.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/DialogSettingsUtil.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/AbstractWizard.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/wizards/AbstractWizard.java)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/AbstractWizardCommandHandler.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/wizards/AbstractWizardCommandHandler.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/interfaces/INewTargetWizard.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/wizards/interfaces/INewTargetWizard.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/interfaces/INewWizardProvider.java32
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/newWizard/NewWizard.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/wizards/newWizard/NewWizard.java)8
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/newWizard/NewWizardCategory.java259
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/newWizard/NewWizardCommandHandler.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/wizards/newWizard/NewWizardCommandHandler.java)12
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/newWizard/NewWizardContentProvider.java107
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/newWizard/NewWizardDescriptor.java235
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/newWizard/NewWizardNode.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/wizards/newWizard/NewWizardNode.java)8
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/newWizard/NewWizardRegistry.java165
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/newWizard/NewWizardSelectionPage.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/wizards/newWizard/NewWizardSelectionPage.java)116
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/pages/AbstractFormsWizardPage.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/wizards/pages/AbstractFormsWizardPage.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/pages/AbstractSharedDataWizardPage.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/wizards/pages/AbstractSharedDataWizardPage.java)23
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/pages/AbstractValidatingWizardPage.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/wizards/pages/AbstractValidatableWizardPage.java)19
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/pages/AbstractWizardPage.java (renamed from target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/wizards/pages/AbstractWizardPage.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.core/.options1
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.core/META-INF/MANIFEST.MF27
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.core/plugin.xml33
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.core/schema/connectStrategies.exsd283
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/adapters/ModelNodePersistableAdapter.java138
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/connection/ConnectionType.java227
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/connection/interfaces/IConnectStrategy.java91
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/connection/interfaces/IConnectionType.java56
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/connection/interfaces/IConnectionTypeConstants.java115
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/connection/managers/ConnectStrategyExtensionPointManager.java133
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/connection/managers/ConnectionTypeBindingsManager.java257
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/connection/managers/ConnectionTypeExtensionPointManager.java84
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/connection/strategy/ConnectStrategyStepExecutor.java101
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/connection/strategy/ConnectStrategyStepGroup.java59
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/connection/strategy/ConnectStrategyStepper.java141
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/model/interfaces/IConnectable.java93
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/.options1
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/META-INF/MANIFEST.MF20
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.runtime.model/.options1
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.runtime.model/META-INF/MANIFEST.MF16
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.runtime.model/src/org/eclipse/tm/te/runtime/model/nls/Messages.properties6
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.runtime.persistence/.project28
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.runtime.persistence/META-INF/MANIFEST.MF17
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.runtime.persistence/plugin.xml26
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.runtime.services/.options1
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.runtime.services/.project28
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.runtime.services/META-INF/MANIFEST.MF17
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.runtime.services/plugin.xml8
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.runtime.services/pom.xml17
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.runtime.services/src/org/eclipse/tm/te/runtime/services/AbstractServiceManager.java282
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.runtime.statushandler/META-INF/MANIFEST.MF18
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.runtime.statushandler/src/org/eclipse/tm/te/runtime/statushandler/nls/Messages.properties4
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/.options3
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/.project28
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/META-INF/MANIFEST.MF20
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/plugin.xml9
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/pom.xml17
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.runtime/.options3
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.runtime/META-INF/MANIFEST.MF29
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.runtime/plugin.xml32
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.core/.options1
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.core/META-INF/MANIFEST.MF23
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.core/src/org/eclipse/tm/te/tcf/core/activator/CoreBundleActivator.java62
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.core/src/org/eclipse/tm/te/tcf/core/interfaces/IChannelManager.java56
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.core/src/org/eclipse/tm/te/tcf/core/internal/ChannelManager.java162
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.core/src/org/eclipse/tm/te/tcf/core/internal/nls/Messages.properties9
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/META-INF/MANIFEST.MF43
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/plugin.properties54
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/plugin.xml827
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/pom.xml17
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/controls/FSTreeContentProvider.java607
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/controls/FSTreeControl.java205
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/controls/FSTreeLabelProvider.java181
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/controls/FSTreeViewerComparator.java69
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/dialogs/FSOpenFileDialog.java199
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/autosave/SaveAllListener.java194
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/autosave/SaveListener.java143
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/events/INodeStateListener.java26
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/explorer/FSExplorerEditorPage.java134
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/handlers/CommitHandler.java90
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/handlers/FSTreeNodePropertyTester.java59
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/handlers/StateManager.java300
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/handlers/UpdateHandler.java89
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/model/FSModel.java163
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.locator/.options5
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.locator/META-INF/MANIFEST.MF30
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.locator/plugin.xml44
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.locator/pom.xml17
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/ScannerRunnable.java186
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/interfaces/nodes/IPeerModel.java41
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/internal/adapters/PeerModelPersistableAdapter.java96
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/listener/ChannelStateChangeListener.java84
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/listener/ModelAdapter.java42
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/nodes/PeerModel.java275
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/services/LocatorModelUpdateService.java114
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.log.core/.options3
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.log.core/META-INF/MANIFEST.MF19
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.log.core/pom.xml17
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.log.core/src/org/eclipse/tm/te/tcf/log/core/internal/PreferencesInitializer.java49
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.processes.core/.options4
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.processes.core/.project28
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.processes.core/META-INF/MANIFEST.MF21
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.processes.core/pom.xml17
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/.options1
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/.project28
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/META-INF/MANIFEST.MF27
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/plugin.xml79
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/pom.xml17
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/src/org/eclipse/tm/te/tcf/processes/ui/controls/ProcessesTreeContentProvider.java371
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/src/org/eclipse/tm/te/tcf/processes/ui/controls/ProcessesTreeControl.java136
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/src/org/eclipse/tm/te/tcf/processes/ui/controls/ProcessesTreeLabelProvider.java92
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/src/org/eclipse/tm/te/tcf/processes/ui/dialogs/ProcessSelectionDialog.java201
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/src/org/eclipse/tm/te/tcf/processes/ui/nls/Messages.java55
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/src/org/eclipse/tm/te/tcf/processes/ui/nls/Messages.properties28
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.core/.options4
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.core/.project28
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.core/META-INF/MANIFEST.MF21
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.core/pom.xml17
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.core/src/org/eclipse/tm/te/tcf/terminals/core/activator/CoreBundleActivator.java71
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.ui/.options1
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.ui/.project28
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.ui/META-INF/MANIFEST.MF23
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.ui/pom.xml17
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.ui/src/org/eclipse/tm/te/tcf/terminals/ui/nls/Messages.properties4
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.ui/META-INF/MANIFEST.MF41
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.ui/plugin.xml194
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/internal/editor/pages/NodePropertiesEditorPage.java164
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/internal/navigator/ModelListener.java70
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/tables/NodePropertiesLabelProvider.java116
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/tables/NodePropertiesViewerComparator.java81
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/wizards/NewTargetWizard.java110
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/wizards/pages/NewTargetWizardPage.java424
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tests/META-INF/MANIFEST.MF21
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tests/plugin.xml35
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.ui.controls/META-INF/MANIFEST.MF24
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.ui.controls/pom.xml17
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.ui.forms/pom.xml17
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.ui.swt/META-INF/MANIFEST.MF19
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.ui.swt/pom.xml17
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.ui.terminals.process/.options1
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.ui.terminals.process/.project28
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.ui.terminals.process/META-INF/MANIFEST.MF22
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.ui.terminals.ssh/.options1
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.ui.terminals.ssh/.project28
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.ui.terminals.ssh/plugin.xml29
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.ui.terminals.ssh/pom.xml17
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.ui.terminals/.options2
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.ui.terminals/.project28
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.ui.terminals/META-INF/MANIFEST.MF42
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.ui.terminals/pom.xml17
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/panels/AbstractConfigurationPanel.java50
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.ui.views/META-INF/MANIFEST.MF36
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.ui.views/pom.xml17
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/actions/WorkingSetActionProvider.java409
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/editor/AbstractCustomFormToolkitEditorPage.java63
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/internal/editor/Editor.java215
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/workingsets/OthersWorkingSetElementUpdater.java128
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/workingsets/WorkingSetViewerSorter.java39
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.ui/META-INF/MANIFEST.MF38
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.ui/plugin.xml87
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/decorators/images/ConnectableImageDescriptor.java130
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/trees/AbstractTreeControl.java309
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/trees/TreeViewerComparator.java178
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/wizards/interfaces/ISharedDataWizardPage.java63
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/wizards/interfaces/IValidatableWizardPage.java30
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/wizards/newWizard/NewWizardRegistry.java62
-rw-r--r--tests/mem-leaks/Makefile30
-rw-r--r--tests/mem-leaks/agent.sln20
-rw-r--r--tests/mem-leaks/agent.vcproj647
-rw-r--r--tests/mem-leaks/config.h21
-rw-r--r--tests/mem-leaks/main/services-ext.h26
-rw-r--r--tests/mem-leaks/services/memtrace.c799
-rw-r--r--tests/mem-leaks/services/memtrace.h28
-rw-r--r--tests/plugins/org.eclipse.tcf.debug.test/.classpath7
-rw-r--r--tests/plugins/org.eclipse.tcf.debug.test/.project28
-rw-r--r--tests/plugins/org.eclipse.tcf.debug.test/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--tests/plugins/org.eclipse.tcf.debug.test/META-INF/MANIFEST.MF17
-rw-r--r--tests/plugins/org.eclipse.tcf.debug.test/build.properties4
-rw-r--r--tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/AbstractTcfUITest.java488
-rw-r--r--tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/Activator.java50
-rw-r--r--tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/BreakpointsTest.java115
-rw-r--r--tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/IViewerUpdatesListenerConstants.java55
-rw-r--r--tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/SampleTest.java502
-rw-r--r--tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/TestDebugContextProvider.java162
-rw-r--r--tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/VariablesVirtualTreeModelViewer.java80
-rw-r--r--tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/ViewerUpdatesListener.java649
-rw-r--r--tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/VirtualViewerUpdatesListener.java194
-rw-r--r--tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/services/AbstractCacheManager.java43
-rw-r--r--tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/services/BreakpointsCM.java348
-rw-r--r--tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/services/CommandKey.java37
-rw-r--r--tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/services/DiagnosticsCM.java136
-rw-r--r--tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/services/EventKey.java24
-rw-r--r--tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/services/IWaitForEventCache.java24
-rw-r--r--tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/services/IdEventKey.java24
-rw-r--r--tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/services/IdKey.java28
-rw-r--r--tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/services/Key.java29
-rw-r--r--tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/services/ResetMap.java159
-rw-r--r--tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/services/RunControlCM.java629
-rw-r--r--tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/services/StackTraceCM.java162
-rw-r--r--tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/services/SymbolsCM.java422
-rw-r--r--tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/services/WaitForEventCache.java16
-rw-r--r--tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/util/AbstractCache.java314
-rw-r--r--tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/util/AggregateCallback.java126
-rw-r--r--tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/util/AggregateError.java45
-rw-r--r--tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/util/Callback.java402
-rw-r--r--tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/util/CallbackCache.java100
-rw-r--r--tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/util/DataCallback.java62
-rw-r--r--tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/util/ICache.java58
-rw-r--r--tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/util/Query.java177
-rw-r--r--tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/util/Task.java61
-rw-r--r--tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/util/TokenCache.java46
-rw-r--r--tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/util/Transaction.java254
-rwxr-xr-xtests/test-all56
-rw-r--r--tests/test-dwarf/Makefile30
-rw-r--r--tests/test-dwarf/backend/backend.c565
-rw-r--r--tests/test-dwarf/backend/backend.h31
-rw-r--r--tests/test-dwarf/config.h98
-rw-r--r--tests/test-dwarf/dwarf-test.sln20
-rw-r--r--tests/test-dwarf/dwarf-test.vcproj692
-rw-r--r--tests/test-dwarf/machine/cpudefs-ext.h114
1988 files changed, 63862 insertions, 23863 deletions
diff --git a/.gitignore b/.gitignore
index 9879cf8c5..ca9f8b48a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,148 +5,156 @@
# .
workspace
debug-workspace
-sync
-# examples/org.eclipse.tm.tcf.examples.daytime/
-examples/org.eclipse.tm.tcf.examples.daytime/bin
-
-# examples/org.eclipse.tm.tcf.examples.daytime.agent/
-examples/org.eclipse.tm.tcf.examples.daytime.agent/obj
+# examples/org.eclipse.tcf.examples.daytime/
+examples/org.eclipse.tcf.examples.daytime/bin
# features/
features/build-directory
features/build-workspace
-# features/org.eclipse.tm.tcf.cdt.feature/
-features/org.eclipse.tm.tcf.cdt.feature/target
-
-# features/org.eclipse.tm.tcf.feature/
-features/org.eclipse.tm.tcf.feature/target
-
-# features/org.eclipse.tm.tcf.headless.build/
-features/org.eclipse.tm.tcf.headless.build/build-directory
-features/org.eclipse.tm.tcf.headless.build/workspace
-
-# features/org.eclipse.tm.tcf.repo/
-features/org.eclipse.tm.tcf.repo/target
-
-# features/org.eclipse.tm.tcf.rse.feature/
-features/org.eclipse.tm.tcf.rse.feature/target
-
-# features/org.eclipse.tm.tcf.site/
-features/org.eclipse.tm.tcf.site/features
-features/org.eclipse.tm.tcf.site/plugins
-features/org.eclipse.tm.tcf.site/artifacts.xml
-features/org.eclipse.tm.tcf.site/content.xml
-
-# plugins/org.eclipse.tm.tcf/
-plugins/org.eclipse.tm.tcf/target
-plugins/org.eclipse.tm.tcf/bin
-
-# plugins/org.eclipse.tm.tcf.cdt.ui/
-plugins/org.eclipse.tm.tcf.cdt.ui/target
-plugins/org.eclipse.tm.tcf.cdt.ui/bin
-
-# plugins/org.eclipse.tm.tcf.core/
-plugins/org.eclipse.tm.tcf.core/target
-plugins/org.eclipse.tm.tcf.core/bin
-
-# plugins/org.eclipse.tm.tcf.debug/
-plugins/org.eclipse.tm.tcf.debug/target
-plugins/org.eclipse.tm.tcf.debug/bin
-
-# plugins/org.eclipse.tm.tcf.debug.ui/
-plugins/org.eclipse.tm.tcf.debug.ui/target
-plugins/org.eclipse.tm.tcf.debug.ui/bin
-
-# plugins/org.eclipse.tm.tcf.rse/
-plugins/org.eclipse.tm.tcf.rse/target
-plugins/org.eclipse.tm.tcf.rse/bin
-
-# tests/mem-leaks/
-tests/mem-leaks/obj
-tests/mem-leaks/*.ncb
-tests/mem-leaks/*.suo
-tests/mem-leaks/*.user
-tests/mem-leaks/enc_temp_folder
-
-# tests/test-dwarf/
-tests/test-dwarf/obj
-tests/test-dwarf/files
-tests/test-dwarf/*.user
-tests/test-dwarf/*.suo
-tests/test-dwarf/*.ncb
-
-# target explorer
-/target_explorer/plugins/org.eclipse.tm.te.core/target
-/target_explorer/plugins/org.eclipse.tm.te.core/bin
-/target_explorer/plugins/org.eclipse.tm.te.rcp/target
-/target_explorer/plugins/org.eclipse.tm.te.rcp/bin
-/target_explorer/plugins/org.eclipse.tm.te.rcp.application/target
-/target_explorer/plugins/org.eclipse.tm.te.rcp.application/bin
-/target_explorer/plugins/org.eclipse.tm.te.runtime/target
-/target_explorer/plugins/org.eclipse.tm.te.runtime/bin
-/target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/target
-/target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/bin
-/target_explorer/plugins/org.eclipse.tm.te.runtime.model/target
-/target_explorer/plugins/org.eclipse.tm.te.runtime.model/bin
-/target_explorer/plugins/org.eclipse.tm.te.runtime.persistence/target
-/target_explorer/plugins/org.eclipse.tm.te.runtime.persistence/bin
-/target_explorer/plugins/org.eclipse.tm.te.runtime.services/target
-/target_explorer/plugins/org.eclipse.tm.te.runtime.services/bin
-/target_explorer/plugins/org.eclipse.tm.te.runtime.statushandler/target
-/target_explorer/plugins/org.eclipse.tm.te.runtime.statushandler/bin
-/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/target
-/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/bin
-/target_explorer/plugins/org.eclipse.tm.te.tcf.core/target
-/target_explorer/plugins/org.eclipse.tm.te.tcf.core/bin
-/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/target
-/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/bin
-/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/target
-/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/bin
-/target_explorer/plugins/org.eclipse.tm.te.tcf.log.core/target
-/target_explorer/plugins/org.eclipse.tm.te.tcf.log.core/bin
-/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.core/target
-/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.core/bin
-/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/target
-/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/bin
-/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.core/target
-/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.core/bin
-/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.ui/target
-/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.ui/bin
-/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/target
-/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/bin
-/target_explorer/plugins/org.eclipse.tm.te.tests/target
-/target_explorer/plugins/org.eclipse.tm.te.tests/bin
-/target_explorer/plugins/org.eclipse.tm.te.ui/target
-/target_explorer/plugins/org.eclipse.tm.te.ui/bin
-/target_explorer/plugins/org.eclipse.tm.te.ui.controls/target
-/target_explorer/plugins/org.eclipse.tm.te.ui.controls/bin
-/target_explorer/plugins/org.eclipse.tm.te.ui.forms/target
-/target_explorer/plugins/org.eclipse.tm.te.ui.forms/bin
-/target_explorer/plugins/org.eclipse.tm.te.ui.swt/target
-/target_explorer/plugins/org.eclipse.tm.te.ui.swt/bin
-/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/target
-/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/bin
-/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.process/target
-/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.process/bin
-/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.ssh/target
-/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.ssh/bin
-/target_explorer/plugins/org.eclipse.tm.te.ui.views/target
-/target_explorer/plugins/org.eclipse.tm.te.ui.views/bin
-/target_explorer/features/org.eclipse.tm.te.feature/target
-/target_explorer/features/org.eclipse.tm.te.feature/bin
-/target_explorer/features/org.eclipse.tm.te.cdt.feature/target
-/target_explorer/features/org.eclipse.tm.te.cdt.feature/bin
-/target_explorer/features/org.eclipse.tm.te.rcp.feature/target
-/target_explorer/features/org.eclipse.tm.te.rcp.feature/bin
-/target_explorer/features/org.eclipse.tm.te.sdk.feature/target
-/target_explorer/features/org.eclipse.tm.te.sdk.feature/bin
-/target_explorer/features/org.eclipse.tm.te.cdt.sdk.feature/target
-/target_explorer/features/org.eclipse.tm.te.cdt.sdk.feature/bin
-/target_explorer/features/org.eclipse.tm.te.tcf.feature/target
-/target_explorer/features/org.eclipse.tm.te.tcf.feature/bin
-/target_explorer/features/org.eclipse.tm.te.tcf.rcp.feature/target
-/target_explorer/features/org.eclipse.tm.te.tcf.rcp.feature/bin
-/target_explorer/features/org.eclipse.tm.te.tcf.sdk.feature/target
-/target_explorer/features/org.eclipse.tm.te.tcf.sdk.feature/bin
+# features/org.eclipse.tcf.cdt.feature/
+features/org.eclipse.tcf.cdt.feature/target
+features/org.eclipse.tcf.cdt.sdk.feature/target
+
+# features/org.eclipse.tcf.feature/
+features/org.eclipse.tcf.feature/target
+
+# features/org.eclipse.tcf.headless.build/
+features/org.eclipse.tcf.headless.build/build-directory
+features/org.eclipse.tcf.headless.build/workspace
+
+# features/org.eclipse.tcf.repo/
+features/org.eclipse.tcf.repo/target
+
+# features/org.eclipse.tcf.rse.feature/
+features/org.eclipse.tcf.rse.feature/target
+features/org.eclipse.tcf.rse.sdk.feature/target
+
+# features/org.eclipse.tcf.site/
+features/org.eclipse.tcf.site/features
+features/org.eclipse.tcf.site/plugins
+features/org.eclipse.tcf.site/artifacts.xml
+features/org.eclipse.tcf.site/content.xml
+
+# plugins/org.eclipse.tcf/
+plugins/org.eclipse.tcf/target
+plugins/org.eclipse.tcf/bin
+
+# plugins/org.eclipse.tcf.cdt.ui/
+plugins/org.eclipse.tcf.cdt.ui/target
+plugins/org.eclipse.tcf.cdt.ui/bin
+
+# plugins/org.eclipse.tcf.core/
+plugins/org.eclipse.tcf.core/target
+plugins/org.eclipse.tcf.core/bin
+
+# plugins/org.eclipse.tcf.debug/
+plugins/org.eclipse.tcf.debug/target
+plugins/org.eclipse.tcf.debug/bin
+
+# plugins/org.eclipse.tcf.debug.ui/
+plugins/org.eclipse.tcf.debug.ui/target
+plugins/org.eclipse.tcf.debug.ui/bin
+
+# plugins/org.eclipse.tcf.rse/
+plugins/org.eclipse.tcf.rse/target
+plugins/org.eclipse.tcf.rse/bin
+
+# Tests
+tests/plugins/org.eclipse.tcf.debug.test/bin
+
+# target explorer
+/target_explorer/plugins/org.eclipse.tcf.te.core/target
+/target_explorer/plugins/org.eclipse.tcf.te.core/bin
+/target_explorer/plugins/org.eclipse.tcf.te.launch.core/target
+/target_explorer/plugins/org.eclipse.tcf.te.launch.core/bin
+/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/target
+/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/bin
+/target_explorer/plugins/org.eclipse.tcf.te.rcp/target
+/target_explorer/plugins/org.eclipse.tcf.te.rcp/bin
+/target_explorer/plugins/org.eclipse.tcf.te.rcp.application/target
+/target_explorer/plugins/org.eclipse.tcf.te.rcp.application/bin
+/target_explorer/plugins/org.eclipse.tcf.te.runtime/target
+/target_explorer/plugins/org.eclipse.tcf.te.runtime/bin
+/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/target
+/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/bin
+/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/target
+/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/bin
+/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/target
+/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/bin
+/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/target
+/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/bin
+/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/target
+/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/bin
+/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/target
+/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/bin
+/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/target
+/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/bin
+/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/target
+/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/bin
+/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/target
+/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/bin
+/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/target
+/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/bin
+/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/target
+/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/bin
+/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/target
+/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/bin
+/target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/target
+/target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/bin
+/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/target
+/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/bin
+/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/target
+/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/bin
+/target_explorer/plugins/org.eclipse.tcf.te.tcf.services.contexts/target
+/target_explorer/plugins/org.eclipse.tcf.te.tcf.services.contexts/bin
+/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/target
+/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/bin
+/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.ui/target
+/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.ui/bin
+/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/target
+/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/bin
+/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/target
+/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/bin
+/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/target
+/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/bin
+/target_explorer/plugins/org.eclipse.tcf.te.tests/target
+/target_explorer/plugins/org.eclipse.tcf.te.tests/bin
+/target_explorer/plugins/org.eclipse.tcf.te.ui/target
+/target_explorer/plugins/org.eclipse.tcf.te.ui/bin
+/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/target
+/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/bin
+/target_explorer/plugins/org.eclipse.tcf.te.ui.forms/target
+/target_explorer/plugins/org.eclipse.tcf.te.ui.forms/bin
+/target_explorer/plugins/org.eclipse.tcf.te.ui.swt/target
+/target_explorer/plugins/org.eclipse.tcf.te.ui.swt/bin
+/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/target
+/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/bin
+/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/target
+/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/bin
+/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/target
+/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/bin
+/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/target
+/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/bin
+/target_explorer/plugins/org.eclipse.tcf.te.ui.views/target
+/target_explorer/plugins/org.eclipse.tcf.te.ui.views/bin
+/target_explorer/features/org.eclipse.tcf.te.feature/target
+/target_explorer/features/org.eclipse.tcf.te.feature/bin
+/target_explorer/features/org.eclipse.tcf.te.cdt.feature/target
+/target_explorer/features/org.eclipse.tcf.te.cdt.feature/bin
+/target_explorer/features/org.eclipse.tcf.te.rcp.feature/target
+/target_explorer/features/org.eclipse.tcf.te.rcp.feature/bin
+/target_explorer/features/org.eclipse.tcf.te.sdk.feature/target
+/target_explorer/features/org.eclipse.tcf.te.sdk.feature/bin
+/target_explorer/features/org.eclipse.tcf.te.cdt.sdk.feature/target
+/target_explorer/features/org.eclipse.tcf.te.cdt.sdk.feature/bin
+/target_explorer/features/org.eclipse.tcf.te.tcf.feature/target
+/target_explorer/features/org.eclipse.tcf.te.tcf.feature/bin
+/target_explorer/features/org.eclipse.tcf.te.tcf.rcp.feature/target
+/target_explorer/features/org.eclipse.tcf.te.tcf.rcp.feature/bin
+/target_explorer/features/org.eclipse.tcf.te.tcf.sdk.feature/target
+/target_explorer/features/org.eclipse.tcf.te.tcf.sdk.feature/bin
+
+/target_explorer/experimental/plugins/org.eclipse.tcf.te.ui.sequoyah.vnc/target
+/target_explorer/experimental/plugins/org.eclipse.tcf.te.ui.sequoyah.vnc/bin
diff --git a/docs/.project b/docs/.project
index 8d59bf774..39c221064 100755
--- a/docs/.project
+++ b/docs/.project
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.eclipse.tm.tcf.docs</name>
+ <name>org.eclipse.tcf.docs</name>
<comment></comment>
<projects>
</projects>
diff --git a/examples/org.eclipse.tm.tcf.examples.daytime/.classpath b/examples/org.eclipse.tcf.examples.daytime/.classpath
index 01a008e0d..01a008e0d 100644
--- a/examples/org.eclipse.tm.tcf.examples.daytime/.classpath
+++ b/examples/org.eclipse.tcf.examples.daytime/.classpath
diff --git a/examples/org.eclipse.tm.tcf.examples.daytime/.project b/examples/org.eclipse.tcf.examples.daytime/.project
index 0dbc2599c..b7d89b1ff 100644
--- a/examples/org.eclipse.tm.tcf.examples.daytime/.project
+++ b/examples/org.eclipse.tcf.examples.daytime/.project
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.eclipse.tm.tcf.examples.daytime</name>
+ <name>org.eclipse.tcf.examples.daytime</name>
<comment></comment>
<projects>
</projects>
diff --git a/examples/org.eclipse.tm.tcf.examples.daytime/.settings/org.eclipse.jdt.core.prefs b/examples/org.eclipse.tcf.examples.daytime/.settings/org.eclipse.jdt.core.prefs
index 4700ed795..4700ed795 100644
--- a/examples/org.eclipse.tm.tcf.examples.daytime/.settings/org.eclipse.jdt.core.prefs
+++ b/examples/org.eclipse.tcf.examples.daytime/.settings/org.eclipse.jdt.core.prefs
diff --git a/examples/org.eclipse.tm.tcf.examples.daytime/.settings/org.eclipse.jdt.ui.prefs b/examples/org.eclipse.tcf.examples.daytime/.settings/org.eclipse.jdt.ui.prefs
index 2fe5d3ead..2fe5d3ead 100644
--- a/examples/org.eclipse.tm.tcf.examples.daytime/.settings/org.eclipse.jdt.ui.prefs
+++ b/examples/org.eclipse.tcf.examples.daytime/.settings/org.eclipse.jdt.ui.prefs
diff --git a/examples/org.eclipse.tcf.examples.daytime/META-INF/MANIFEST.MF b/examples/org.eclipse.tcf.examples.daytime/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..342f2dd65
--- /dev/null
+++ b/examples/org.eclipse.tcf.examples.daytime/META-INF/MANIFEST.MF
@@ -0,0 +1,14 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.tcf.examples.daytime;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipse.tcf.internal.examples.daytime.Activator
+Bundle-Vendor: %providerName
+Require-Bundle: org.eclipse.core.runtime
+Bundle-ActivationPolicy: lazy
+Eclipse-LazyStart: true
+Import-Package: org.eclipse.tcf.core;version="1.0.0",
+ org.eclipse.tcf.protocol;version="1.0.0"
+Export-Package: org.eclipse.tcf.internal.examples.daytime
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/examples/org.eclipse.tm.tcf.examples.daytime/about.html b/examples/org.eclipse.tcf.examples.daytime/about.html
index 6c5b3615b..6c5b3615b 100644
--- a/examples/org.eclipse.tm.tcf.examples.daytime/about.html
+++ b/examples/org.eclipse.tcf.examples.daytime/about.html
diff --git a/examples/org.eclipse.tm.tcf.examples.daytime/build.properties b/examples/org.eclipse.tcf.examples.daytime/build.properties
index 786b1df93..786b1df93 100644
--- a/examples/org.eclipse.tm.tcf.examples.daytime/build.properties
+++ b/examples/org.eclipse.tcf.examples.daytime/build.properties
diff --git a/examples/org.eclipse.tm.tcf.examples.daytime/plugin.properties b/examples/org.eclipse.tcf.examples.daytime/plugin.properties
index c471eab8f..2d7b5e3dd 100644
--- a/examples/org.eclipse.tm.tcf.examples.daytime/plugin.properties
+++ b/examples/org.eclipse.tcf.examples.daytime/plugin.properties
@@ -8,6 +8,6 @@
# Contributors:
# Wind River Systems - initial implementation
###############################################################################
-pluginName = TCF Daytime service example (Incubation)
+pluginName = TCF Daytime service example
providerName = Eclipse CDT
diff --git a/examples/org.eclipse.tcf.examples.daytime/plugin.xml b/examples/org.eclipse.tcf.examples.daytime/plugin.xml
new file mode 100644
index 000000000..aa8e245fb
--- /dev/null
+++ b/examples/org.eclipse.tcf.examples.daytime/plugin.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+
+ <extension point="org.eclipse.tcf.startup">
+ <class name="org.eclipse.tcf.internal.examples.daytime.DaytimeServiceProxy"/>
+ </extension>
+
+</plugin>
diff --git a/examples/org.eclipse.tm.tcf.examples.daytime/readme.txt b/examples/org.eclipse.tcf.examples.daytime/readme.txt
index ef5ea285a..ef5ea285a 100644
--- a/examples/org.eclipse.tm.tcf.examples.daytime/readme.txt
+++ b/examples/org.eclipse.tcf.examples.daytime/readme.txt
diff --git a/examples/org.eclipse.tm.tcf.examples.daytime/src/org/eclipse/tm/internal/tcf/examples/daytime/Activator.java b/examples/org.eclipse.tcf.examples.daytime/src/org/eclipse/tcf/internal/examples/daytime/Activator.java
index e8e753675..9db588004 100644
--- a/examples/org.eclipse.tm.tcf.examples.daytime/src/org/eclipse/tm/internal/tcf/examples/daytime/Activator.java
+++ b/examples/org.eclipse.tcf.examples.daytime/src/org/eclipse/tcf/internal/examples/daytime/Activator.java
@@ -9,7 +9,7 @@
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.examples.daytime;
+package org.eclipse.tcf.internal.examples.daytime;
import org.eclipse.core.runtime.Plugin;
import org.osgi.framework.BundleContext;
@@ -20,7 +20,7 @@ import org.osgi.framework.BundleContext;
public class Activator extends Plugin {
// The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.tm.tcf.examples.daytime";
+ public static final String PLUGIN_ID = "org.eclipse.tcf.examples.daytime";
// The shared instance
private static Activator plugin;
diff --git a/examples/org.eclipse.tm.tcf.examples.daytime/src/org/eclipse/tm/internal/tcf/examples/daytime/DaytimeServiceProxy.java b/examples/org.eclipse.tcf.examples.daytime/src/org/eclipse/tcf/internal/examples/daytime/DaytimeServiceProxy.java
index 37e37d6d1..72dd6ddd9 100644
--- a/examples/org.eclipse.tm.tcf.examples.daytime/src/org/eclipse/tm/internal/tcf/examples/daytime/DaytimeServiceProxy.java
+++ b/examples/org.eclipse.tcf.examples.daytime/src/org/eclipse/tcf/internal/examples/daytime/DaytimeServiceProxy.java
@@ -9,12 +9,12 @@
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.examples.daytime;
+package org.eclipse.tcf.internal.examples.daytime;
-import org.eclipse.tm.tcf.core.Command;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.protocol.Protocol;
+import org.eclipse.tcf.core.Command;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.Protocol;
public class DaytimeServiceProxy implements IDaytimeService {
@@ -58,7 +58,7 @@ public class DaytimeServiceProxy implements IDaytimeService {
/*
* Make Daytime Service proxy available to all potential clients by creating
* the proxy object every time a TCF communication channel is opened.
- * Note: extension point "org.eclipse.tm.tcf.startup" is used to load this class
+ * Note: extension point "org.eclipse.tcf.startup" is used to load this class
* at TCF startup time, so proxy factory is properly activated even if nobody
* import directly from this plugin.
*/
diff --git a/examples/org.eclipse.tm.tcf.examples.daytime/src/org/eclipse/tm/internal/tcf/examples/daytime/IDaytimeService.java b/examples/org.eclipse.tcf.examples.daytime/src/org/eclipse/tcf/internal/examples/daytime/IDaytimeService.java
index ef08ff838..58414df5c 100644
--- a/examples/org.eclipse.tm.tcf.examples.daytime/src/org/eclipse/tm/internal/tcf/examples/daytime/IDaytimeService.java
+++ b/examples/org.eclipse.tcf.examples.daytime/src/org/eclipse/tcf/internal/examples/daytime/IDaytimeService.java
@@ -9,10 +9,10 @@
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.examples.daytime;
+package org.eclipse.tcf.internal.examples.daytime;
-import org.eclipse.tm.tcf.protocol.IService;
-import org.eclipse.tm.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.IService;
+import org.eclipse.tcf.protocol.IToken;
/**
* IDaytimeService allows retrieving the time of day from a remote system.
diff --git a/examples/org.eclipse.tm.tcf.examples.daytime.agent/.cproject b/examples/org.eclipse.tm.tcf.examples.daytime.agent/.cproject
deleted file mode 100644
index 48691de2e..000000000
--- a/examples/org.eclipse.tm.tcf.examples.daytime.agent/.cproject
+++ /dev/null
@@ -1,209 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<?fileVersion 4.0.0?>
-
-<cproject>
-<storageModule moduleId="org.eclipse.cdt.core.settings">
-<cconfiguration id="0.1030292515">
-<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="0.1030292515" moduleId="org.eclipse.cdt.core.settings" name="Default">
-<externalSettings/>
-<extensions>
-<extension id="org.eclipse.cdt.core.VCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-<extension id="org.eclipse.cdt.core.MakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-</extensions>
-</storageModule>
-<storageModule moduleId="cdtBuildSystem" version="4.0.0">
-<configuration artifactName="org.eclipse.tm.tcf.examples.daytime.agent" buildProperties="" description="" id="0.1030292515" name="Default" parent="org.eclipse.cdt.build.core.prefbase.cfg">
-<folderInfo id="0.1030292515." name="/" resourcePath="">
-<toolChain id="org.eclipse.cdt.build.core.prefbase.toolchain.646171937" name="No ToolChain" resourceTypeBasedDiscovery="false" superClass="org.eclipse.cdt.build.core.prefbase.toolchain">
-<targetPlatform id="org.eclipse.cdt.build.core.prefbase.toolchain.646171937.252390378" name=""/>
-<builder buildPath="${build_project}" id="org.eclipse.cdt.build.core.settings.default.builder.1220803001" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
-<tool id="org.eclipse.cdt.build.core.settings.holder.libs.997801155" name="holder for library settings" superClass="org.eclipse.cdt.build.core.settings.holder.libs"/>
-<tool id="org.eclipse.cdt.build.core.settings.holder.57900273" name="Assembly" superClass="org.eclipse.cdt.build.core.settings.holder">
-<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1447522501" languageId="org.eclipse.cdt.core.assembly" languageName="Assembly" sourceContentType="org.eclipse.cdt.core.asmSource" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
-</tool>
-<tool id="org.eclipse.cdt.build.core.settings.holder.959540451" name="GNU C++" superClass="org.eclipse.cdt.build.core.settings.holder">
-<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1941675218" languageId="org.eclipse.cdt.core.g++" languageName="GNU C++" sourceContentType="org.eclipse.cdt.core.cxxSource,org.eclipse.cdt.core.cxxHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
-</tool>
-<tool id="org.eclipse.cdt.build.core.settings.holder.169557224" name="GNU C" superClass="org.eclipse.cdt.build.core.settings.holder">
-<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1296401318" languageId="org.eclipse.cdt.core.gcc" languageName="GNU C" sourceContentType="org.eclipse.cdt.core.cSource,org.eclipse.cdt.core.cHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
-</tool>
-</toolChain>
-</folderInfo>
-</configuration>
-</storageModule>
-<storageModule moduleId="scannerConfiguration">
-<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="makefileGenerator">
-<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<scannerConfigBuildInfo instanceId="0.1030292515">
-<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="makefileGenerator">
-<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-</scannerConfigBuildInfo>
-</storageModule>
-<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
-</cconfiguration>
-</storageModule>
-<storageModule moduleId="cdtBuildSystem" version="4.0.0">
-<project id="org.eclipse.tm.tcf.examples.daytime.agent.null.744502123" name="org.eclipse.tm.tcf.examples.daytime.agent"/>
-</storageModule>
-</cproject>
diff --git a/examples/org.eclipse.tm.tcf.examples.daytime.agent/.project b/examples/org.eclipse.tm.tcf.examples.daytime.agent/.project
deleted file mode 100644
index 55552333c..000000000
--- a/examples/org.eclipse.tm.tcf.examples.daytime.agent/.project
+++ /dev/null
@@ -1,81 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.tm.tcf.examples.daytime.agent</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
- <triggers>clean,full,incremental,</triggers>
- <arguments>
- <dictionary>
- <key>?name?</key>
- <value></value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.append_environment</key>
- <value>true</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.autoBuildTarget</key>
- <value>all</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.buildArguments</key>
- <value></value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.buildCommand</key>
- <value>make</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.buildLocation</key>
- <value>${build_project}</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
- <value>clean</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.contents</key>
- <value>org.eclipse.cdt.make.core.activeConfigSettings</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.enableAutoBuild</key>
- <value>false</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.enableCleanBuild</key>
- <value>true</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.enableFullBuild</key>
- <value>true</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.fullBuildTarget</key>
- <value>all</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.stopOnError</key>
- <value>true</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
- <value>true</value>
- </dictionary>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
- <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
- <nature>org.eclipse.cdt.core.cnature</nature>
- </natures>
-</projectDescription>
diff --git a/examples/org.eclipse.tm.tcf.examples.daytime.agent/Makefile b/examples/org.eclipse.tm.tcf.examples.daytime.agent/Makefile
deleted file mode 100644
index 76b098864..000000000
--- a/examples/org.eclipse.tm.tcf.examples.daytime.agent/Makefile
+++ /dev/null
@@ -1,30 +0,0 @@
-TCF_AGENT_DIR=../../../org.eclipse.tcf.agent
-
-include $(TCF_AGENT_DIR)/Makefile.inc
-
-override CFLAGS += $(foreach dir,$(INCDIRS),-I$(dir)) $(OPTS)
-
-HFILES := $(foreach dir,$(SRCDIRS),$(wildcard $(dir)/*.h)) $(HFILES)
-CFILES := $(sort $(foreach dir,$(SRCDIRS),$(wildcard $(dir)/*.c)) $(CFILES))
-
-EXECS = $(BINDIR)/agent$(EXTEXE)
-
-all: $(EXECS)
-
-$(BINDIR)/libtcf$(EXTLIB) : $(OFILES)
- $(AR) -rc $@ $^
- $(RANLIB)
-
-$(BINDIR)/agent$(EXTEXE): $(BINDIR)/main/main$(EXTOBJ) $(BINDIR)/libtcf$(EXTLIB)
- $(CC) $(CFLAGS) -o $@ $(BINDIR)/main/main$(EXTOBJ) $(BINDIR)/libtcf$(EXTLIB) $(LIBS)
-
-$(BINDIR)/%$(EXTOBJ): %.c $(HFILES) Makefile
- @$(call MKDIR,$(dir $@))
- $(CC) $(CFLAGS) -c -o $@ $<
-
-$(BINDIR)/%$(EXTOBJ): $(TCF_AGENT_DIR)/%.c $(HFILES) Makefile
- @$(call MKDIR,$(dir $@))
- $(CC) $(CFLAGS) -c -o $@ $<
-
-clean:
- $(call RMDIR,$(BINDIR))
diff --git a/examples/org.eclipse.tm.tcf.examples.daytime.agent/about.html b/examples/org.eclipse.tm.tcf.examples.daytime.agent/about.html
deleted file mode 100644
index 26aa26557..000000000
--- a/examples/org.eclipse.tm.tcf.examples.daytime.agent/about.html
+++ /dev/null
@@ -1,31 +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>July 28, 2008</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;), and the Eclipse Distribution License
-Version 1.0 (&quot;EDL&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>.
-A copy of the EDL is available
-at <a href="http://www.eclipse.org/org/documents/edl-v10.php">http://www.eclipse.org/org/documents/edl-v10.php</a>.
-For purposes of the EPL and the EDL, &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 and EDL 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/examples/org.eclipse.tm.tcf.examples.daytime.agent/config.h b/examples/org.eclipse.tm.tcf.examples.daytime.agent/config.h
deleted file mode 100644
index d2bb543a3..000000000
--- a/examples/org.eclipse.tm.tcf.examples.daytime.agent/config.h
+++ /dev/null
@@ -1,44 +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
- * and Eclipse Distribution License v1.0 which accompany this distribution.
- * The Eclipse Public License is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * You may elect to redistribute this code under either of these licenses.
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-
-/*
- * This file contains "define" statements that control agent configuration.
- * SERVICE_* definitions control which service implementations are included into the agent.
- *
- * This is example agent configuration. It includes only few standard services,
- * and one example service: Day Time.
- */
-
-#ifndef D_config
-#define D_config
-
-#include <framework/mdep.h>
-
-#if defined(WIN32) || defined(__CYGWIN__)
-# define TARGET_UNIX 0
-#elif defined(_WRS_KERNEL)
-# define TARGET_UNIX 0
-#else
-# define TARGET_UNIX 1
-#endif
-
-#define SERVICE_FileSystem 1
-#define SERVICE_SysMonitor TARGET_UNIX
-
-#define ENABLE_Trace 1
-#define ENABLE_Discovery 1
-
-
-#endif /* D_config */
diff --git a/examples/org.eclipse.tm.tcf.examples.daytime.agent/daytime.c b/examples/org.eclipse.tm.tcf.examples.daytime.agent/daytime.c
deleted file mode 100644
index 745d081c2..000000000
--- a/examples/org.eclipse.tm.tcf.examples.daytime.agent/daytime.c
+++ /dev/null
@@ -1,68 +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
- * and Eclipse Distribution License v1.0 which accompany this distribution.
- * The Eclipse Public License is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * You may elect to redistribute this code under either of these licenses.
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-
-/*
- * Sample TCF service implementation.
- */
-
-#include <config.h>
-#include <time.h>
-#include <framework/json.h>
-#include <framework/errors.h>
-#include <framework/exceptions.h>
-#include <daytime.h>
-
-static const char * DAYTIME = "Daytime";
-
-static void command_get_time_of_day(char * token, Channel * c) {
- char str[0x100];
- char res[0x100];
- time_t t;
-
- // Read command argumnet: string TZ - time zone name
- json_read_string(&c->inp, str, sizeof(str));
- // Each JSON encoded argument should end with zero byte
- if (c->inp.read(&c->inp) != 0) exception(ERR_JSON_SYNTAX);
- // Done reading arguments.
- // The command message should end with MARKER_EOM (End Of Message)
- if (c->inp.read(&c->inp) != MARKER_EOM) exception(ERR_JSON_SYNTAX);
-
- // Execute the command: retrieve current time as a string.
- // Note: we ignore command argument for simplicity,
- // a real command handler should do something better then that.
- time(&t);
- strcpy(res, ctime(&t));
-
- // Start reply message with zero terminated string "R"
- write_stringz(&c->out, "R");
- // Send back the command token
- write_stringz(&c->out, token);
- // Send error report, for now always "no error"
- write_errno(&c->out, 0);
- // Send reply data
- json_write_string(&c->out, res);
- // JSON encoded data should end with zero byte
- c->out.write(&c->out, 0);
- // Done sending reply data.
- // The reply message should end with MARKER_EOM (End Of Message)
- c->out.write(&c->out, MARKER_EOM);
- // Done sending reply message.
- // Command handling is complete.
-}
-
-void ini_daytime_service(Protocol * proto) {
- // Install command handler
- add_command_handler(proto, DAYTIME, "getTimeOfDay", command_get_time_of_day);
-}
diff --git a/examples/org.eclipse.tm.tcf.examples.daytime.agent/daytime.h b/examples/org.eclipse.tm.tcf.examples.daytime.agent/daytime.h
deleted file mode 100644
index 99e11cb2e..000000000
--- a/examples/org.eclipse.tm.tcf.examples.daytime.agent/daytime.h
+++ /dev/null
@@ -1,28 +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
- * and Eclipse Distribution License v1.0 which accompany this distribution.
- * The Eclipse Public License is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * You may elect to redistribute this code under either of these licenses.
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-
-/*
- * Sample TCF service header file.
- */
-
-#ifndef DAYTIME_H_
-#define DAYTIME_H_
-
-#include <config.h>
-#include <framework/protocol.h>
-
-extern void ini_daytime_service(Protocol * proto);
-
-#endif /*DAYTIME_H_*/
diff --git a/examples/org.eclipse.tm.tcf.examples.daytime.agent/edl-v10.html b/examples/org.eclipse.tm.tcf.examples.daytime.agent/edl-v10.html
deleted file mode 100644
index 58cf7c3f7..000000000
--- a/examples/org.eclipse.tm.tcf.examples.daytime.agent/edl-v10.html
+++ /dev/null
@@ -1,59 +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">
-
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
-<title>Eclipse Distribution 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><b>Eclipse Distribution License - v 1.0</b></p>
-
-<p>Copyright (c) 2007, Eclipse Foundation, Inc. and its licensors. </p>
-
-<p>All rights reserved.</p>
-<p>Redistribution and use in source and binary forms, with or without modification,
- are permitted provided that the following conditions are met:
-<ul><li>Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer. </li>
-<li>Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution. </li>
-<li>Neither the name of the Eclipse Foundation, Inc. nor the names of its
- contributors may be used to endorse or promote products derived from
- this software without specific prior written permission. </li></ul>
-</p>
-<p>THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.</p>
-
-</body>
-
-</html>
diff --git a/examples/org.eclipse.tm.tcf.examples.daytime.agent/main/services-ext.h b/examples/org.eclipse.tm.tcf.examples.daytime.agent/main/services-ext.h
deleted file mode 100644
index 35d154256..000000000
--- a/examples/org.eclipse.tm.tcf.examples.daytime.agent/main/services-ext.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2010 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and Eclipse Distribution License v1.0 which accompany this distribution.
- * The Eclipse Public License is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * You may elect to redistribute this code under either of these licenses.
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-
-/*
- * Services initialization code extension point.
- * If the agent is built with additional user-defined services,
- * a customized version of services-ext.h file can be added to compiler headers search paths.
- */
-
-#include "daytime.h"
-
-static void ini_ext_services(Protocol * proto, TCFBroadcastGroup * bcg) {
- ini_daytime_service(proto);
-}
diff --git a/examples/org.eclipse.tm.tcf.examples.daytime.agent/readme.txt b/examples/org.eclipse.tm.tcf.examples.daytime.agent/readme.txt
deleted file mode 100644
index b9c425abc..000000000
--- a/examples/org.eclipse.tm.tcf.examples.daytime.agent/readme.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-Readme for TCF Agent Daytime Example
-------------------------------
-
-The Agent Daytime Example shows how TCF agent can be customized and extended with user defined service.
-The example provides code to build the agent with custom set of services, including user defined DayTime service.
-The example is mainly meant for developer's educational use,
-DayTime service does not meant to be of any other value.
-
-See "org.eclipse.tm.tcf.examples.daytime" for details on extending TCF Java binding for DayTime service.
-
-The example includes:
-1. Makefile to build the customized agent.
-2. Implementation of DayTime service: daytime.h daytime.c
-3. Agent configuration header file: config.h
-
-CDT can be used to edit and build the example project.
-Supported agent execution environments: CygWin, Linux.
diff --git a/examples/org.eclipse.tm.tcf.examples.daytime/META-INF/MANIFEST.MF b/examples/org.eclipse.tm.tcf.examples.daytime/META-INF/MANIFEST.MF
deleted file mode 100644
index 34e3ea31e..000000000
--- a/examples/org.eclipse.tm.tcf.examples.daytime/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,14 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.tm.tcf.examples.daytime;singleton:=true
-Bundle-Version: 0.5.0.qualifier
-Bundle-Activator: org.eclipse.tm.internal.tcf.examples.daytime.Activator
-Bundle-Vendor: %providerName
-Require-Bundle: org.eclipse.core.runtime
-Bundle-ActivationPolicy: lazy
-Eclipse-LazyStart: true
-Import-Package: org.eclipse.tm.tcf.core;version="0.5.0",
- org.eclipse.tm.tcf.protocol;version="0.5.0"
-Export-Package: org.eclipse.tm.internal.tcf.examples.daytime
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/examples/org.eclipse.tm.tcf.examples.daytime/plugin.xml b/examples/org.eclipse.tm.tcf.examples.daytime/plugin.xml
deleted file mode 100644
index bc6b5dc36..000000000
--- a/examples/org.eclipse.tm.tcf.examples.daytime/plugin.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<plugin>
-
- <extension point="org.eclipse.tm.tcf.startup">
- <class name="org.eclipse.tm.internal.tcf.examples.daytime.DaytimeServiceProxy"/>
- </extension>
-
-</plugin>
diff --git a/features/org.eclipse.tm.tcf.cdt.feature/.project b/features/org.eclipse.tcf.cdt.feature/.project
index 812e1d06d..e958b3dcd 100644
--- a/features/org.eclipse.tm.tcf.cdt.feature/.project
+++ b/features/org.eclipse.tcf.cdt.feature/.project
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.eclipse.tm.tcf.cdt.feature</name>
+ <name>org.eclipse.tcf.cdt.feature</name>
<comment></comment>
<projects>
</projects>
diff --git a/features/org.eclipse.tm.tcf.cdt.feature/build.properties b/features/org.eclipse.tcf.cdt.feature/build.properties
index b9abc1ca3..b9abc1ca3 100644
--- a/features/org.eclipse.tm.tcf.cdt.feature/build.properties
+++ b/features/org.eclipse.tcf.cdt.feature/build.properties
diff --git a/features/org.eclipse.tm.tcf.cdt.feature/eclipse_update_120.jpg b/features/org.eclipse.tcf.cdt.feature/eclipse_update_120.jpg
index bfdf708ad..bfdf708ad 100644
--- a/features/org.eclipse.tm.tcf.cdt.feature/eclipse_update_120.jpg
+++ b/features/org.eclipse.tcf.cdt.feature/eclipse_update_120.jpg
Binary files differ
diff --git a/features/org.eclipse.tm.tcf.cdt.feature/epl-v10.html b/features/org.eclipse.tcf.cdt.feature/epl-v10.html
index 90f2d5ea0..90f2d5ea0 100644
--- a/features/org.eclipse.tm.tcf.cdt.feature/epl-v10.html
+++ b/features/org.eclipse.tcf.cdt.feature/epl-v10.html
diff --git a/features/org.eclipse.tm.tcf.rse.feature/feature.properties b/features/org.eclipse.tcf.cdt.feature/feature.properties
index e1d1f5ecb..66a7bd25c 100644
--- a/features/org.eclipse.tm.tcf.rse.feature/feature.properties
+++ b/features/org.eclipse.tcf.cdt.feature/feature.properties
@@ -10,7 +10,7 @@
###############################################################################
# "featureName" property - name of the feature
-featureName=Target Communication Framework (Incubation), RSE Extender
+featureName=Target Communication Framework, CDT Extender
# "providerName" property - name of the company that provides the feature
providerName=Eclipse CDT
diff --git a/features/org.eclipse.tm.tcf.cdt.feature/feature.xml b/features/org.eclipse.tcf.cdt.feature/feature.xml
index 256544afa..0969acfeb 100644
--- a/features/org.eclipse.tm.tcf.cdt.feature/feature.xml
+++ b/features/org.eclipse.tcf.cdt.feature/feature.xml
@@ -10,9 +10,9 @@
Wind River Systems - initial API and implementation
-->
<feature
- id="org.eclipse.tm.tcf.cdt.feature"
+ id="org.eclipse.tcf.cdt.feature"
label="%featureName"
- version="0.5.0.qualifier"
+ version="1.0.0.qualifier"
provider-name="%providerName">
<description url="http://wiki.eclipse.org/TCF">
@@ -28,11 +28,11 @@
</license>
<url>
- <update label="%updateSiteName" url="http://dev.eclipse.org/svnroot/dsdp/org.eclipse.tm.tcf/releases/0.5.0"/>
+ <update label="%updateSiteName" url="http://download.eclipse.org/tools/cdt/releases/juno"/>
</url>
<includes
- id="org.eclipse.tm.tcf.feature"
+ id="org.eclipse.tcf.feature"
version="0.0.0"/>
<requires>
@@ -48,15 +48,15 @@
<import feature="org.eclipse.cdt" version="8.0.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.text" version="3.5.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.cdt.debug.ui"/>
- <import plugin="org.eclipse.tm.tcf.core"/>
- <import plugin="org.eclipse.tm.tcf.debug"/>
- <import plugin="org.eclipse.tm.tcf.debug.ui"/>
+ <import plugin="org.eclipse.tcf.core"/>
+ <import plugin="org.eclipse.tcf.debug"/>
+ <import plugin="org.eclipse.tcf.debug.ui"/>
<import plugin="org.eclipse.jface.text" version="3.5.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.cdt.launch" version="7.0.0" match="greaterOrEqual"/>
</requires>
<plugin
- id="org.eclipse.tm.tcf.cdt.ui"
+ id="org.eclipse.tcf.cdt.ui"
download-size="0"
install-size="0"
version="0.0.0"
diff --git a/features/org.eclipse.tm.tcf.cdt.feature/license.html b/features/org.eclipse.tcf.cdt.feature/license.html
index f19c483b9..f19c483b9 100644
--- a/features/org.eclipse.tm.tcf.cdt.feature/license.html
+++ b/features/org.eclipse.tcf.cdt.feature/license.html
diff --git a/features/org.eclipse.tm.tcf.sdk.feature/pom.xml b/features/org.eclipse.tcf.cdt.feature/pom.xml
index 41a39fcc2..10081cc41 100644
--- a/features/org.eclipse.tm.tcf.sdk.feature/pom.xml
+++ b/features/org.eclipse.tcf.cdt.feature/pom.xml
@@ -7,11 +7,11 @@
<parent>
<groupId>org.eclipse.tcf</groupId>
<artifactId>tcf-parent</artifactId>
- <version>0.5.0-SNAPSHOT</version>
+ <version>1.0.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
- <artifactId>org.eclipse.tm.tcf.sdk.feature</artifactId>
+ <artifactId>org.eclipse.tcf.cdt.feature</artifactId>
<packaging>eclipse-feature</packaging>
- <version>0.5.0.qualifier</version>
+ <version>1.0.0.qualifier</version>
</project>
diff --git a/features/org.eclipse.tm.tcf.rse.sdk.feature/.project b/features/org.eclipse.tcf.cdt.sdk.feature/.project
index 4f3e6f953..6c9f6dce4 100644
--- a/features/org.eclipse.tm.tcf.rse.sdk.feature/.project
+++ b/features/org.eclipse.tcf.cdt.sdk.feature/.project
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.eclipse.tm.tcf.rse.sdk.feature</name>
+ <name>org.eclipse.tcf.cdt.sdk.feature</name>
<comment></comment>
<projects>
</projects>
diff --git a/features/org.eclipse.tm.tcf.cdt.sdk.feature/build.properties b/features/org.eclipse.tcf.cdt.sdk.feature/build.properties
index a182fb1b4..a182fb1b4 100644
--- a/features/org.eclipse.tm.tcf.cdt.sdk.feature/build.properties
+++ b/features/org.eclipse.tcf.cdt.sdk.feature/build.properties
diff --git a/features/org.eclipse.tm.tcf.cdt.sdk.feature/eclipse_update_120.jpg b/features/org.eclipse.tcf.cdt.sdk.feature/eclipse_update_120.jpg
index bfdf708ad..bfdf708ad 100644
--- a/features/org.eclipse.tm.tcf.cdt.sdk.feature/eclipse_update_120.jpg
+++ b/features/org.eclipse.tcf.cdt.sdk.feature/eclipse_update_120.jpg
Binary files differ
diff --git a/features/org.eclipse.tm.tcf.cdt.sdk.feature/epl-v10.html b/features/org.eclipse.tcf.cdt.sdk.feature/epl-v10.html
index 90f2d5ea0..90f2d5ea0 100644
--- a/features/org.eclipse.tm.tcf.cdt.sdk.feature/epl-v10.html
+++ b/features/org.eclipse.tcf.cdt.sdk.feature/epl-v10.html
diff --git a/features/org.eclipse.tm.tcf.cdt.feature/feature.properties b/features/org.eclipse.tcf.cdt.sdk.feature/feature.properties
index 0db1064e0..d50e1b832 100644
--- a/features/org.eclipse.tm.tcf.cdt.feature/feature.properties
+++ b/features/org.eclipse.tcf.cdt.sdk.feature/feature.properties
@@ -10,7 +10,7 @@
###############################################################################
# "featureName" property - name of the feature
-featureName=Target Communication Framework (Incubation), CDT Extender
+featureName=Target Communication Framework, CDT Extender SDK
# "providerName" property - name of the company that provides the feature
providerName=Eclipse CDT
diff --git a/features/org.eclipse.tm.tcf.rse.sdk.feature/feature.xml b/features/org.eclipse.tcf.cdt.sdk.feature/feature.xml
index f36538fd8..1f02d2312 100644
--- a/features/org.eclipse.tm.tcf.rse.sdk.feature/feature.xml
+++ b/features/org.eclipse.tcf.cdt.sdk.feature/feature.xml
@@ -10,9 +10,9 @@
Wind River Systems - initial API and implementation
-->
<feature
- id="org.eclipse.tm.tcf.rse.sdk.feature"
+ id="org.eclipse.tcf.cdt.sdk.feature"
label="%featureName"
- version="0.5.0.qualifier"
+ version="1.0.0.qualifier"
provider-name="%providerName">
<description url="http://wiki.eclipse.org/TCF">
@@ -28,15 +28,15 @@
</license>
<url>
- <update label="%updateSiteName" url="http://dev.eclipse.org/svnroot/dsdp/org.eclipse.tm.tcf/releases/0.5.0"/>
+ <update label="%updateSiteName" url="http://download.eclipse.org/tools/cdt/releases/juno"/>
</url>
<requires>
- <import feature="org.eclipse.tm.tcf.rse.feature" version="0.5.0.qualifier"/>
+ <import feature="org.eclipse.tcf.cdt.feature" version="1.0.0.qualifier"/>
</requires>
<plugin
- id="org.eclipse.tm.tcf.rse.source"
+ id="org.eclipse.tcf.cdt.ui.source"
download-size="0"
install-size="0"
version="0.0.0"
diff --git a/features/org.eclipse.tm.tcf.cdt.sdk.feature/license.html b/features/org.eclipse.tcf.cdt.sdk.feature/license.html
index f19c483b9..f19c483b9 100644
--- a/features/org.eclipse.tm.tcf.cdt.sdk.feature/license.html
+++ b/features/org.eclipse.tcf.cdt.sdk.feature/license.html
diff --git a/features/org.eclipse.tcf.cdt.sdk.feature/pom.xml b/features/org.eclipse.tcf.cdt.sdk.feature/pom.xml
new file mode 100644
index 000000000..5adfe06d7
--- /dev/null
+++ b/features/org.eclipse.tcf.cdt.sdk.feature/pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.tcf</groupId>
+ <artifactId>tcf-parent</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>org.eclipse.tcf.cdt.sdk.feature</artifactId>
+ <packaging>eclipse-feature</packaging>
+ <version>1.0.0.qualifier</version>
+</project>
diff --git a/features/org.eclipse.tm.tcf.feature/.project b/features/org.eclipse.tcf.feature/.project
index 0b5b809ef..fd86d73c2 100644
--- a/features/org.eclipse.tm.tcf.feature/.project
+++ b/features/org.eclipse.tcf.feature/.project
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.eclipse.tm.tcf.feature</name>
+ <name>org.eclipse.tcf.feature</name>
<comment></comment>
<projects>
</projects>
diff --git a/features/org.eclipse.tm.tcf.feature/build.properties b/features/org.eclipse.tcf.feature/build.properties
index b9abc1ca3..b9abc1ca3 100644
--- a/features/org.eclipse.tm.tcf.feature/build.properties
+++ b/features/org.eclipse.tcf.feature/build.properties
diff --git a/features/org.eclipse.tm.tcf.feature/eclipse_update_120.jpg b/features/org.eclipse.tcf.feature/eclipse_update_120.jpg
index bfdf708ad..bfdf708ad 100644
--- a/features/org.eclipse.tm.tcf.feature/eclipse_update_120.jpg
+++ b/features/org.eclipse.tcf.feature/eclipse_update_120.jpg
Binary files differ
diff --git a/features/org.eclipse.tm.tcf.feature/epl-v10.html b/features/org.eclipse.tcf.feature/epl-v10.html
index 90f2d5ea0..90f2d5ea0 100644
--- a/features/org.eclipse.tm.tcf.feature/epl-v10.html
+++ b/features/org.eclipse.tcf.feature/epl-v10.html
diff --git a/features/org.eclipse.tm.tcf.feature/feature.properties b/features/org.eclipse.tcf.feature/feature.properties
index fa5b8273c..98844aca0 100644
--- a/features/org.eclipse.tm.tcf.feature/feature.properties
+++ b/features/org.eclipse.tcf.feature/feature.properties
@@ -10,7 +10,7 @@
###############################################################################
# "featureName" property - name of the feature
-featureName=Target Communication Framework (Incubation)
+featureName=Target Communication Framework
# "providerName" property - name of the company that provides the feature
providerName=Eclipse CDT
diff --git a/features/org.eclipse.tm.tcf.feature/feature.xml b/features/org.eclipse.tcf.feature/feature.xml
index 8d0d7336f..5057d7269 100644
--- a/features/org.eclipse.tm.tcf.feature/feature.xml
+++ b/features/org.eclipse.tcf.feature/feature.xml
@@ -10,9 +10,9 @@
Wind River Systems - initial API and implementation
-->
<feature
- id="org.eclipse.tm.tcf.feature"
+ id="org.eclipse.tcf.feature"
label="%featureName"
- version="0.5.0.qualifier"
+ version="1.0.0.qualifier"
provider-name="%providerName">
<description url="http://wiki.eclipse.org/TCF">
@@ -28,7 +28,7 @@
</license>
<url>
- <update label="%updateSiteName" url="http://dev.eclipse.org/svnroot/dsdp/org.eclipse.tm.tcf/releases/0.5.0"/>
+ <update label="%updateSiteName" url="http://download.eclipse.org/tools/cdt/releases/juno"/>
</url>
<requires>
@@ -51,28 +51,28 @@
</requires>
<plugin
- id="org.eclipse.tm.tcf.core"
+ id="org.eclipse.tcf.core"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
- id="org.eclipse.tm.tcf"
+ id="org.eclipse.tcf"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
- id="org.eclipse.tm.tcf.debug"
+ id="org.eclipse.tcf.debug"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
- id="org.eclipse.tm.tcf.debug.ui"
+ id="org.eclipse.tcf.debug.ui"
download-size="0"
install-size="0"
version="0.0.0"
diff --git a/features/org.eclipse.tm.tcf.feature/license.html b/features/org.eclipse.tcf.feature/license.html
index f19c483b9..f19c483b9 100644
--- a/features/org.eclipse.tm.tcf.feature/license.html
+++ b/features/org.eclipse.tcf.feature/license.html
diff --git a/features/org.eclipse.tm.tcf.feature/pom.xml b/features/org.eclipse.tcf.feature/pom.xml
index 91c3cb005..77c7bcf3f 100644
--- a/features/org.eclipse.tm.tcf.feature/pom.xml
+++ b/features/org.eclipse.tcf.feature/pom.xml
@@ -7,11 +7,11 @@
<parent>
<groupId>org.eclipse.tcf</groupId>
<artifactId>tcf-parent</artifactId>
- <version>0.5.0-SNAPSHOT</version>
+ <version>1.0.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
- <artifactId>org.eclipse.tm.tcf.feature</artifactId>
+ <artifactId>org.eclipse.tcf.feature</artifactId>
<packaging>eclipse-feature</packaging>
- <version>0.5.0.qualifier</version>
+ <version>1.0.0.qualifier</version>
</project>
diff --git a/features/org.eclipse.tm.tcf.headless.build/.project b/features/org.eclipse.tcf.headless.build/.project
index 289502dc3..16356b000 100644
--- a/features/org.eclipse.tm.tcf.headless.build/.project
+++ b/features/org.eclipse.tcf.headless.build/.project
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.eclipse.tm.tcf.headless.build</name>
+ <name>org.eclipse.tcf.headless.build</name>
<comment></comment>
<projects>
</projects>
diff --git a/features/org.eclipse.tm.tcf.headless.build/.settings/org.eclipse.pde.core.prefs b/features/org.eclipse.tcf.headless.build/.settings/org.eclipse.pde.core.prefs
index c767eccce..c767eccce 100644
--- a/features/org.eclipse.tm.tcf.headless.build/.settings/org.eclipse.pde.core.prefs
+++ b/features/org.eclipse.tcf.headless.build/.settings/org.eclipse.pde.core.prefs
diff --git a/features/org.eclipse.tm.tcf.headless.build/TCF Headless Build.launch b/features/org.eclipse.tcf.headless.build/TCF Headless Build.launch
index b0ef1bafc..b0ef1bafc 100644
--- a/features/org.eclipse.tm.tcf.headless.build/TCF Headless Build.launch
+++ b/features/org.eclipse.tcf.headless.build/TCF Headless Build.launch
diff --git a/features/org.eclipse.tm.tcf.headless.build/builder/build.properties b/features/org.eclipse.tcf.headless.build/builder/build.properties
index 3fc9e7cc8..e790bb2f9 100644
--- a/features/org.eclipse.tm.tcf.headless.build/builder/build.properties
+++ b/features/org.eclipse.tcf.headless.build/builder/build.properties
@@ -21,7 +21,7 @@
#The type of the top level element we are building, generally "feature"
topLevelElementType = feature
#The id of the top level element we are building
-topLevelElementId = org.eclipse.tm.tcf.feature
+topLevelElementId = org.eclipse.tcf.feature
############# PRODUCT/PACKAGING CONTROL #############
#product=/plugin or feature id/path/to/.product
diff --git a/features/org.eclipse.tm.tcf.headless.build/builder/customTargets.xml b/features/org.eclipse.tcf.headless.build/builder/customTargets.xml
index abd7955de..84e7446d7 100644
--- a/features/org.eclipse.tm.tcf.headless.build/builder/customTargets.xml
+++ b/features/org.eclipse.tcf.headless.build/builder/customTargets.xml
@@ -77,34 +77,34 @@
<delete dir="${buildDirectory}/plugins"/>
<exec dir="${buildDirectory}" executable="svn">
<arg value="co"/>
- <arg value="http://dev.eclipse.org/svnroot/dsdp/org.eclipse.tm.tcf/trunk/plugins/org.eclipse.tm.tcf"/>
- <arg value="plugins/org.eclipse.tm.tcf"/>
+ <arg value="http://dev.eclipse.org/svnroot/dsdp/org.eclipse.tcf/trunk/plugins/org.eclipse.tcf"/>
+ <arg value="plugins/org.eclipse.tcf"/>
</exec>
<exec dir="${buildDirectory}" executable="svn">
<arg value="co"/>
- <arg value="http://dev.eclipse.org/svnroot/dsdp/org.eclipse.tm.tcf/trunk/plugins/org.eclipse.tm.tcf.core"/>
- <arg value="plugins/org.eclipse.tm.tcf.core"/>
+ <arg value="http://dev.eclipse.org/svnroot/dsdp/org.eclipse.tcf/trunk/plugins/org.eclipse.tcf.core"/>
+ <arg value="plugins/org.eclipse.tcf.core"/>
</exec>
<exec dir="${buildDirectory}" executable="svn">
<arg value="co"/>
- <arg value="http://dev.eclipse.org/svnroot/dsdp/org.eclipse.tm.tcf/trunk/plugins/org.eclipse.tm.tcf.debug"/>
- <arg value="plugins/org.eclipse.tm.tcf.debug"/>
+ <arg value="http://dev.eclipse.org/svnroot/dsdp/org.eclipse.tcf/trunk/plugins/org.eclipse.tcf.debug"/>
+ <arg value="plugins/org.eclipse.tcf.debug"/>
</exec>
<exec dir="${buildDirectory}" executable="svn">
<arg value="co"/>
- <arg value="http://dev.eclipse.org/svnroot/dsdp/org.eclipse.tm.tcf/trunk/plugins/org.eclipse.tm.tcf.debug.ui"/>
- <arg value="plugins/org.eclipse.tm.tcf.debug.ui"/>
+ <arg value="http://dev.eclipse.org/svnroot/dsdp/org.eclipse.tcf/trunk/plugins/org.eclipse.tcf.debug.ui"/>
+ <arg value="plugins/org.eclipse.tcf.debug.ui"/>
</exec>
<exec dir="${buildDirectory}" executable="svn">
<arg value="co"/>
- <arg value="http://dev.eclipse.org/svnroot/dsdp/org.eclipse.tm.tcf/trunk/plugins/org.eclipse.tm.tcf.rse"/>
- <arg value="plugins/org.eclipse.tm.tcf.rse"/>
+ <arg value="http://dev.eclipse.org/svnroot/dsdp/org.eclipse.tcf/trunk/plugins/org.eclipse.tcf.rse"/>
+ <arg value="plugins/org.eclipse.tcf.rse"/>
</exec>
<delete dir="${buildDirectory}/features"/>
<exec dir="${buildDirectory}" executable="svn">
<arg value="co"/>
- <arg value="http://dev.eclipse.org/svnroot/dsdp/org.eclipse.tm.tcf/trunk/features/org.eclipse.tm.tcf.feature"/>
- <arg value="features/org.eclipse.tm.tcf.feature"/>
+ <arg value="http://dev.eclipse.org/svnroot/dsdp/org.eclipse.tcf/trunk/features/org.eclipse.tcf.feature"/>
+ <arg value="features/org.eclipse.tcf.feature"/>
</exec>
</target>
diff --git a/features/org.eclipse.tm.tcf.repo/.project b/features/org.eclipse.tcf.repo/.project
index 09173098e..f5f6f0a66 100644
--- a/features/org.eclipse.tm.tcf.repo/.project
+++ b/features/org.eclipse.tcf.repo/.project
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.eclipse.tm.tcf.repo</name>
+ <name>org.eclipse.tcf.repo</name>
<comment></comment>
<projects>
</projects>
diff --git a/features/org.eclipse.tcf.repo/category.xml b/features/org.eclipse.tcf.repo/category.xml
new file mode 100644
index 000000000..0a3b5c802
--- /dev/null
+++ b/features/org.eclipse.tcf.repo/category.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<site>
+ <feature url="features/org.eclipse.tcf.feature_0.0.0.qualifier.jar" id="org.eclipse.tcf.feature" version="0.0.0">
+ <category name="org.eclipse.tcf"/>
+ </feature>
+ <feature url="features/org.eclipse.tcf.sdk.feature_0.0.0.qualifier.jar" id="org.eclipse.tcf.sdk.feature" version="0.0.0">
+ <category name="org.eclipse.tcf"/>
+ </feature>
+ <feature url="features/org.eclipse.tcf.cdt.feature_0.0.0.qualifier.jar" id="org.eclipse.tcf.cdt.feature" version="0.0.0">
+ <category name="org.eclipse.tcf"/>
+ </feature>
+ <feature url="features/org.eclipse.tcf.cdt.sdk.feature_0.0.0.qualifier.jar" id="org.eclipse.tcf.cdt.feature" version="0.0.0">
+ <category name="org.eclipse.tcf"/>
+ </feature>
+ <feature url="features/org.eclipse.tcf.rse.feature_0.0.0.qualifier.jar" id="org.eclipse.tcf.rse.feature" version="0.0.0">
+ <category name="org.eclipse.tcf"/>
+ </feature>
+ <feature url="features/org.eclipse.tcf.rse.sdk.feature_0.0.0.qualifier.jar" id="org.eclipse.tcf.rse.feature" version="0.0.0">
+ <category name="org.eclipse.tcf"/>
+ </feature>
+ <feature url="features/org.eclipse.tcf.te.feature_0.0.0.qualifier.jar" id="org.eclipse.tcf.te.feature" version="0.0.0">
+ <category name="org.eclipse.tcf.te"/>
+ </feature>
+ <feature url="features/org.eclipse.tcf.te.sdk.feature_0.0.0.qualifier.jar" id="org.eclipse.tcf.te.sdk.feature" version="0.0.0">
+ <category name="org.eclipse.tcf.te"/>
+ </feature>
+ <feature url="features/org.eclipse.tcf.te.tcf.feature_0.0.0.qualifier.jar" id="org.eclipse.tcf.te.tcf.feature" version="0.0.0">
+ <category name="org.eclipse.tcf.te"/>
+ </feature>
+ <feature url="features/org.eclipse.tcf.te.tcf.sdk.feature_0.0.0.qualifier.jar" id="org.eclipse.tcf.te.tcf.sdk.feature" version="0.0.0">
+ <category name="org.eclipse.tcf.te"/>
+ </feature>
+ <feature url="features/org.eclipse.tcf.te.cdt.feature_0.0.0.qualifier.jar" id="org.eclipse.tcf.te.cdt.feature" version="0.0.0">
+ <category name="org.eclipse.tcf.te"/>
+ </feature>
+ <feature url="features/org.eclipse.tcf.te.cdt.sdk.feature_0.0.0.qualifier.jar" id="org.eclipse.tcf.te.cdt.sdk.feature" version="0.0.0">
+ <category name="org.eclipse.tcf.te"/>
+ </feature>
+ <feature url="features/org.eclipse.tcf.cdt.sdk.feature_0.0.0.qualifier.jar" id="org.eclipse.tcf.cdt.sdk.feature" version="0.0.0">
+ <category name="org.eclipse.tcf"/>
+ </feature>
+ <feature url="features/org.eclipse.tcf.rse.sdk.feature_0.0.0.qualifier.jar" id="org.eclipse.tcf.rse.sdk.feature" version="0.0.0">
+ <category name="org.eclipse.tcf"/>
+ </feature>
+ <category-def name="org.eclipse.tcf" label="Target Communication Framework">
+ <description>
+ Target Communication Framework
+ </description>
+ </category-def>
+ <category-def name="org.eclipse.tcf.te" label="Target Explorer">
+ <description>
+ Target Explorer to manage TCF targets.
+ </description>
+ </category-def>
+</site>
diff --git a/features/org.eclipse.tm.tcf.repo/pom.xml b/features/org.eclipse.tcf.repo/pom.xml
index 34acde0c7..b7c7e8e41 100644
--- a/features/org.eclipse.tm.tcf.repo/pom.xml
+++ b/features/org.eclipse.tcf.repo/pom.xml
@@ -7,12 +7,12 @@
<parent>
<groupId>org.eclipse.tcf</groupId>
<artifactId>tcf-parent</artifactId>
- <version>0.5.0-SNAPSHOT</version>
+ <version>1.0.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
- <version>0.5.0-SNAPSHOT</version>
- <artifactId>org.eclipse.tm.tcf.repo</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <artifactId>org.eclipse.tcf.repo</artifactId>
<packaging>eclipse-repository</packaging>
<profiles>
@@ -40,9 +40,9 @@
<include name="**" />
</fileset>
</delete>
- <copy file="target/org.eclipse.tm.tcf.repo.zip"
- tofile="${tcf-install}/org.eclipse.tm.tcf.repo.${unqualifiedVersion}.${buildQualifier}.zip" />
- <unzip src="target/org.eclipse.tm.tcf.repo.zip" dest="${tcf-install}" />
+ <copy file="target/org.eclipse.tcf.repo.zip"
+ tofile="${tcf-install}/org.eclipse.tcf.repo.${unqualifiedVersion}.${buildQualifier}.zip" />
+ <unzip src="target/org.eclipse.tcf.repo.zip" dest="${tcf-install}" />
</tasks>
</configuration>
</execution>
diff --git a/features/org.eclipse.tm.tcf.rse.feature/.project b/features/org.eclipse.tcf.rse.feature/.project
index f96b847a8..0ac6a3e23 100644
--- a/features/org.eclipse.tm.tcf.rse.feature/.project
+++ b/features/org.eclipse.tcf.rse.feature/.project
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.eclipse.tm.tcf.rse.feature</name>
+ <name>org.eclipse.tcf.rse.feature</name>
<comment></comment>
<projects>
</projects>
diff --git a/features/org.eclipse.tm.tcf.rse.feature/build.properties b/features/org.eclipse.tcf.rse.feature/build.properties
index b9abc1ca3..b9abc1ca3 100644
--- a/features/org.eclipse.tm.tcf.rse.feature/build.properties
+++ b/features/org.eclipse.tcf.rse.feature/build.properties
diff --git a/features/org.eclipse.tm.tcf.rse.feature/eclipse_update_120.jpg b/features/org.eclipse.tcf.rse.feature/eclipse_update_120.jpg
index bfdf708ad..bfdf708ad 100644
--- a/features/org.eclipse.tm.tcf.rse.feature/eclipse_update_120.jpg
+++ b/features/org.eclipse.tcf.rse.feature/eclipse_update_120.jpg
Binary files differ
diff --git a/features/org.eclipse.tm.tcf.rse.feature/epl-v10.html b/features/org.eclipse.tcf.rse.feature/epl-v10.html
index 90f2d5ea0..90f2d5ea0 100644
--- a/features/org.eclipse.tm.tcf.rse.feature/epl-v10.html
+++ b/features/org.eclipse.tcf.rse.feature/epl-v10.html
diff --git a/features/org.eclipse.tm.tcf.cdt.sdk.feature/feature.properties b/features/org.eclipse.tcf.rse.feature/feature.properties
index d411b4689..b3b2a360d 100644
--- a/features/org.eclipse.tm.tcf.cdt.sdk.feature/feature.properties
+++ b/features/org.eclipse.tcf.rse.feature/feature.properties
@@ -10,7 +10,7 @@
###############################################################################
# "featureName" property - name of the feature
-featureName=Target Communication Framework (Incubation), CDT Extender SDK
+featureName=Target Communication Framework, RSE Extender
# "providerName" property - name of the company that provides the feature
providerName=Eclipse CDT
diff --git a/features/org.eclipse.tm.tcf.rse.feature/feature.xml b/features/org.eclipse.tcf.rse.feature/feature.xml
index c21953a2f..5bb19d8ac 100644
--- a/features/org.eclipse.tm.tcf.rse.feature/feature.xml
+++ b/features/org.eclipse.tcf.rse.feature/feature.xml
@@ -10,9 +10,9 @@
Wind River Systems - initial API and implementation
-->
<feature
- id="org.eclipse.tm.tcf.rse.feature"
+ id="org.eclipse.tcf.rse.feature"
label="%featureName"
- version="0.5.0.qualifier"
+ version="1.0.0.qualifier"
provider-name="%providerName">
<description url="http://wiki.eclipse.org/TCF">
@@ -28,11 +28,11 @@
</license>
<url>
- <update label="%updateSiteName" url="http://dev.eclipse.org/svnroot/dsdp/org.eclipse.tm.tcf/releases/0.5.0"/>
+ <update label="%updateSiteName" url="http://download.eclipse.org/tools/cdt/releases/juno"/>
</url>
<includes
- id="org.eclipse.tm.tcf.feature"
+ id="org.eclipse.tcf.feature"
version="0.0.0"/>
<requires>
@@ -47,14 +47,14 @@
<import plugin="org.eclipse.rse.subsystems.processes.core"/>
<import plugin="org.eclipse.rse.processes.ui"/>
<import plugin="org.eclipse.rse.subsystems.terminals.core"/>
- <import plugin="org.eclipse.tm.tcf" version="0.5.0" match="greaterOrEqual"/>
+ <import plugin="org.eclipse.tcf" version="1.0.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.rse.subsystems.shells.core" version="3.1.100" match="greaterOrEqual"/>
<import plugin="org.eclipse.core.resources" version="3.6.0" match="greaterOrEqual"/>
- <import plugin="org.eclipse.tm.tcf.core" version="0.5.0" match="greaterOrEqual"/>
+ <import plugin="org.eclipse.tcf.core" version="1.0.0" match="greaterOrEqual"/>
</requires>
<plugin
- id="org.eclipse.tm.tcf.rse"
+ id="org.eclipse.tcf.rse"
download-size="0"
install-size="0"
version="0.0.0"
diff --git a/features/org.eclipse.tm.tcf.rse.feature/license.html b/features/org.eclipse.tcf.rse.feature/license.html
index f19c483b9..f19c483b9 100644
--- a/features/org.eclipse.tm.tcf.rse.feature/license.html
+++ b/features/org.eclipse.tcf.rse.feature/license.html
diff --git a/features/org.eclipse.tm.tcf.cdt.feature/pom.xml b/features/org.eclipse.tcf.rse.feature/pom.xml
index b27ce2770..978882608 100644
--- a/features/org.eclipse.tm.tcf.cdt.feature/pom.xml
+++ b/features/org.eclipse.tcf.rse.feature/pom.xml
@@ -7,11 +7,11 @@
<parent>
<groupId>org.eclipse.tcf</groupId>
<artifactId>tcf-parent</artifactId>
- <version>0.5.0-SNAPSHOT</version>
+ <version>1.0.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
- <artifactId>org.eclipse.tm.tcf.cdt.feature</artifactId>
+ <artifactId>org.eclipse.tcf.rse.feature</artifactId>
<packaging>eclipse-feature</packaging>
- <version>0.5.0.qualifier</version>
+ <version>1.0.0.qualifier</version>
</project>
diff --git a/features/org.eclipse.tm.tcf.cdt.sdk.feature/.project b/features/org.eclipse.tcf.rse.sdk.feature/.project
index 086edffd0..67ba98676 100644
--- a/features/org.eclipse.tm.tcf.cdt.sdk.feature/.project
+++ b/features/org.eclipse.tcf.rse.sdk.feature/.project
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.eclipse.tm.tcf.cdt.sdk.feature</name>
+ <name>org.eclipse.tcf.rse.sdk.feature</name>
<comment></comment>
<projects>
</projects>
diff --git a/features/org.eclipse.tm.tcf.rse.sdk.feature/build.properties b/features/org.eclipse.tcf.rse.sdk.feature/build.properties
index 3e6b4cb26..3e6b4cb26 100644
--- a/features/org.eclipse.tm.tcf.rse.sdk.feature/build.properties
+++ b/features/org.eclipse.tcf.rse.sdk.feature/build.properties
diff --git a/features/org.eclipse.tm.tcf.rse.sdk.feature/eclipse_update_120.jpg b/features/org.eclipse.tcf.rse.sdk.feature/eclipse_update_120.jpg
index bfdf708ad..bfdf708ad 100644
--- a/features/org.eclipse.tm.tcf.rse.sdk.feature/eclipse_update_120.jpg
+++ b/features/org.eclipse.tcf.rse.sdk.feature/eclipse_update_120.jpg
Binary files differ
diff --git a/features/org.eclipse.tm.tcf.rse.sdk.feature/epl-v10.html b/features/org.eclipse.tcf.rse.sdk.feature/epl-v10.html
index 90f2d5ea0..90f2d5ea0 100644
--- a/features/org.eclipse.tm.tcf.rse.sdk.feature/epl-v10.html
+++ b/features/org.eclipse.tcf.rse.sdk.feature/epl-v10.html
diff --git a/features/org.eclipse.tm.tcf.rse.sdk.feature/feature.properties b/features/org.eclipse.tcf.rse.sdk.feature/feature.properties
index e843c941b..eef7002b6 100644
--- a/features/org.eclipse.tm.tcf.rse.sdk.feature/feature.properties
+++ b/features/org.eclipse.tcf.rse.sdk.feature/feature.properties
@@ -10,7 +10,7 @@
###############################################################################
# "featureName" property - name of the feature
-featureName=Target Communication Framework (Incubation), RSE Extender SDK
+featureName=Target Communication Framework, RSE Extender SDK
# "providerName" property - name of the company that provides the feature
providerName=Eclipse CDT
diff --git a/features/org.eclipse.tm.tcf.cdt.sdk.feature/feature.xml b/features/org.eclipse.tcf.rse.sdk.feature/feature.xml
index 6a581def9..a5e760139 100644
--- a/features/org.eclipse.tm.tcf.cdt.sdk.feature/feature.xml
+++ b/features/org.eclipse.tcf.rse.sdk.feature/feature.xml
@@ -10,9 +10,9 @@
Wind River Systems - initial API and implementation
-->
<feature
- id="org.eclipse.tm.tcf.cdt.sdk.feature"
+ id="org.eclipse.tcf.rse.sdk.feature"
label="%featureName"
- version="0.5.0.qualifier"
+ version="1.0.0.qualifier"
provider-name="%providerName">
<description url="http://wiki.eclipse.org/TCF">
@@ -28,15 +28,15 @@
</license>
<url>
- <update label="%updateSiteName" url="http://dev.eclipse.org/svnroot/dsdp/org.eclipse.tm.tcf/releases/0.5.0"/>
+ <update label="%updateSiteName" url="http://download.eclipse.org/tools/cdt/releases/juno"/>
</url>
<requires>
- <import feature="org.eclipse.tm.tcf.cdt.feature" version="0.5.0.qualifier"/>
+ <import feature="org.eclipse.tcf.rse.feature" version="1.0.0.qualifier"/>
</requires>
<plugin
- id="org.eclipse.tm.tcf.cdt.ui.source"
+ id="org.eclipse.tcf.rse.source"
download-size="0"
install-size="0"
version="0.0.0"
diff --git a/features/org.eclipse.tm.tcf.rse.sdk.feature/license.html b/features/org.eclipse.tcf.rse.sdk.feature/license.html
index f19c483b9..f19c483b9 100644
--- a/features/org.eclipse.tm.tcf.rse.sdk.feature/license.html
+++ b/features/org.eclipse.tcf.rse.sdk.feature/license.html
diff --git a/features/org.eclipse.tcf.rse.sdk.feature/pom.xml b/features/org.eclipse.tcf.rse.sdk.feature/pom.xml
new file mode 100644
index 000000000..ab57452fe
--- /dev/null
+++ b/features/org.eclipse.tcf.rse.sdk.feature/pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.tcf</groupId>
+ <artifactId>tcf-parent</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>org.eclipse.tcf.rse.sdk.feature</artifactId>
+ <packaging>eclipse-feature</packaging>
+ <version>1.0.0.qualifier</version>
+</project>
diff --git a/features/org.eclipse.tm.tcf.sdk.feature/.project b/features/org.eclipse.tcf.sdk.feature/.project
index 147026b1d..9bd047030 100644
--- a/features/org.eclipse.tm.tcf.sdk.feature/.project
+++ b/features/org.eclipse.tcf.sdk.feature/.project
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.eclipse.tm.tcf.sdk.feature</name>
+ <name>org.eclipse.tcf.sdk.feature</name>
<comment></comment>
<projects>
</projects>
diff --git a/features/org.eclipse.tm.tcf.sdk.feature/build.properties b/features/org.eclipse.tcf.sdk.feature/build.properties
index a182fb1b4..a182fb1b4 100644
--- a/features/org.eclipse.tm.tcf.sdk.feature/build.properties
+++ b/features/org.eclipse.tcf.sdk.feature/build.properties
diff --git a/features/org.eclipse.tm.tcf.sdk.feature/eclipse_update_120.jpg b/features/org.eclipse.tcf.sdk.feature/eclipse_update_120.jpg
index bfdf708ad..bfdf708ad 100644
--- a/features/org.eclipse.tm.tcf.sdk.feature/eclipse_update_120.jpg
+++ b/features/org.eclipse.tcf.sdk.feature/eclipse_update_120.jpg
Binary files differ
diff --git a/features/org.eclipse.tm.tcf.sdk.feature/epl-v10.html b/features/org.eclipse.tcf.sdk.feature/epl-v10.html
index 90f2d5ea0..90f2d5ea0 100644
--- a/features/org.eclipse.tm.tcf.sdk.feature/epl-v10.html
+++ b/features/org.eclipse.tcf.sdk.feature/epl-v10.html
diff --git a/features/org.eclipse.tm.tcf.sdk.feature/feature.properties b/features/org.eclipse.tcf.sdk.feature/feature.properties
index b7cc8bfc5..e2b44d41e 100644
--- a/features/org.eclipse.tm.tcf.sdk.feature/feature.properties
+++ b/features/org.eclipse.tcf.sdk.feature/feature.properties
@@ -10,7 +10,7 @@
###############################################################################
# "featureName" property - name of the feature
-featureName=Target Communication Framework (Incubation) SDK
+featureName=Target Communication Framework SDK
# "providerName" property - name of the company that provides the feature
providerName=Eclipse CDT
diff --git a/features/org.eclipse.tm.tcf.sdk.feature/feature.xml b/features/org.eclipse.tcf.sdk.feature/feature.xml
index d50f96bc2..0e9dba757 100644
--- a/features/org.eclipse.tm.tcf.sdk.feature/feature.xml
+++ b/features/org.eclipse.tcf.sdk.feature/feature.xml
@@ -10,9 +10,9 @@
Wind River Systems - initial API and implementation
-->
<feature
- id="org.eclipse.tm.tcf.sdk.feature"
+ id="org.eclipse.tcf.sdk.feature"
label="%featureName"
- version="0.5.0.qualifier"
+ version="1.0.0.qualifier"
provider-name="%featureProvider">
<description url="http://wiki.eclipse.org/TCF">
@@ -28,36 +28,36 @@
</license>
<url>
- <update label="%updateSiteName" url="http://dev.eclipse.org/svnroot/dsdp/org.eclipse.tm.tcf/releases/0.5.0"/>
+ <update label="%updateSiteName" url="http://download.eclipse.org/tools/cdt/releases/juno"/>
</url>
<requires>
- <import feature="org.eclipse.tm.tcf.feature" version="0.5.0.qualifier"/>
+ <import feature="org.eclipse.tcf.feature" version="1.0.0.qualifier"/>
</requires>
<plugin
- id="org.eclipse.tm.tcf.core.source"
+ id="org.eclipse.tcf.core.source"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
- id="org.eclipse.tm.tcf.debug.source"
+ id="org.eclipse.tcf.debug.source"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
- id="org.eclipse.tm.tcf.debug.ui.source"
+ id="org.eclipse.tcf.debug.ui.source"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
- id="org.eclipse.tm.tcf.source"
+ id="org.eclipse.tcf.source"
download-size="0"
install-size="0"
version="0.0.0"
diff --git a/features/org.eclipse.tm.tcf.sdk.feature/license.html b/features/org.eclipse.tcf.sdk.feature/license.html
index f19c483b9..f19c483b9 100644
--- a/features/org.eclipse.tm.tcf.sdk.feature/license.html
+++ b/features/org.eclipse.tcf.sdk.feature/license.html
diff --git a/features/org.eclipse.tm.tcf.rse.feature/pom.xml b/features/org.eclipse.tcf.sdk.feature/pom.xml
index d8fd62c02..82d0e1f95 100644
--- a/features/org.eclipse.tm.tcf.rse.feature/pom.xml
+++ b/features/org.eclipse.tcf.sdk.feature/pom.xml
@@ -7,11 +7,11 @@
<parent>
<groupId>org.eclipse.tcf</groupId>
<artifactId>tcf-parent</artifactId>
- <version>0.5.0-SNAPSHOT</version>
+ <version>1.0.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
- <artifactId>org.eclipse.tm.tcf.rse.feature</artifactId>
+ <artifactId>org.eclipse.tcf.sdk.feature</artifactId>
<packaging>eclipse-feature</packaging>
- <version>0.5.0.qualifier</version>
+ <version>1.0.0.qualifier</version>
</project>
diff --git a/features/org.eclipse.tm.tcf.site/.project b/features/org.eclipse.tcf.site/.project
index a1b94675e..a1b94675e 100644
--- a/features/org.eclipse.tm.tcf.site/.project
+++ b/features/org.eclipse.tcf.site/.project
diff --git a/features/org.eclipse.tm.tcf.site/index.html b/features/org.eclipse.tcf.site/index.html
index d4bf86cc2..d4bf86cc2 100644
--- a/features/org.eclipse.tm.tcf.site/index.html
+++ b/features/org.eclipse.tcf.site/index.html
diff --git a/features/org.eclipse.tm.tcf.site/site.xml b/features/org.eclipse.tcf.site/site.xml
index 977ff682c..977ff682c 100644
--- a/features/org.eclipse.tm.tcf.site/site.xml
+++ b/features/org.eclipse.tcf.site/site.xml
diff --git a/features/org.eclipse.tm.tcf.site/web/site.css b/features/org.eclipse.tcf.site/web/site.css
index 425134ee3..425134ee3 100644
--- a/features/org.eclipse.tm.tcf.site/web/site.css
+++ b/features/org.eclipse.tcf.site/web/site.css
diff --git a/features/org.eclipse.tm.tcf.site/web/site.xsl b/features/org.eclipse.tcf.site/web/site.xsl
index 682e26b80..682e26b80 100644
--- a/features/org.eclipse.tm.tcf.site/web/site.xsl
+++ b/features/org.eclipse.tcf.site/web/site.xsl
diff --git a/features/org.eclipse.tm.tcf.cdt.sdk.feature/pom.xml b/features/org.eclipse.tm.tcf.cdt.sdk.feature/pom.xml
deleted file mode 100644
index 2b59d6fb6..000000000
--- a/features/org.eclipse.tm.tcf.cdt.sdk.feature/pom.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
- xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.eclipse.tcf</groupId>
- <artifactId>tcf-parent</artifactId>
- <version>0.5.0-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent>
-
- <artifactId>org.eclipse.tm.tcf.cdt.sdk.feature</artifactId>
- <packaging>eclipse-feature</packaging>
- <version>0.5.0.qualifier</version>
-</project>
diff --git a/features/org.eclipse.tm.tcf.repo/category.xml b/features/org.eclipse.tm.tcf.repo/category.xml
deleted file mode 100644
index 110c593a9..000000000
--- a/features/org.eclipse.tm.tcf.repo/category.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<site>
- <feature url="features/org.eclipse.tm.tcf.feature_0.0.0.qualifier.jar" id="org.eclipse.tm.tcf.feature" version="0.0.0">
- <category name="org.eclipse.tcf"/>
- </feature>
- <feature url="features/org.eclipse.tm.tcf.sdk.feature_0.0.0.qualifier.jar" id="org.eclipse.tm.tcf.sdk.feature" version="0.0.0">
- <category name="org.eclipse.tcf"/>
- </feature>
- <feature url="features/org.eclipse.tm.tcf.cdt.feature_0.0.0.qualifier.jar" id="org.eclipse.tm.tcf.cdt.feature" version="0.0.0">
- <category name="org.eclipse.tcf"/>
- </feature>
- <feature url="features/org.eclipse.tm.tcf.cdt.sdk.feature_0.0.0.qualifier.jar" id="org.eclipse.tm.tcf.cdt.feature" version="0.0.0">
- <category name="org.eclipse.tcf"/>
- </feature>
- <feature url="features/org.eclipse.tm.tcf.rse.feature_0.0.0.qualifier.jar" id="org.eclipse.tm.tcf.rse.feature" version="0.0.0">
- <category name="org.eclipse.tcf"/>
- </feature>
- <feature url="features/org.eclipse.tm.tcf.rse.sdk.feature_0.0.0.qualifier.jar" id="org.eclipse.tm.tcf.rse.feature" version="0.0.0">
- <category name="org.eclipse.tcf"/>
- </feature>
- <feature url="features/org.eclipse.tm.te.feature_0.0.0.qualifier.jar" id="org.eclipse.tm.te.feature" version="0.0.0">
- <category name="org.eclipse.tm.te"/>
- </feature>
- <feature url="features/org.eclipse.tm.te.sdk.feature_0.0.0.qualifier.jar" id="org.eclipse.tm.te.sdk.feature" version="0.0.0">
- <category name="org.eclipse.tm.te"/>
- </feature>
- <feature url="features/org.eclipse.tm.te.tcf.feature_0.0.0.qualifier.jar" id="org.eclipse.tm.te.tcf.feature" version="0.0.0">
- <category name="org.eclipse.tm.te"/>
- </feature>
- <feature url="features/org.eclipse.tm.te.tcf.sdk.feature_0.0.0.qualifier.jar" id="org.eclipse.tm.te.tcf.sdk.feature" version="0.0.0">
- <category name="org.eclipse.tm.te"/>
- </feature>
- <feature url="features/org.eclipse.tm.tcf.cdt.sdk.feature_0.0.0.qualifier.jar" id="org.eclipse.tm.tcf.cdt.sdk.feature" version="0.0.0">
- <category name="org.eclipse.tcf"/>
- </feature>
- <feature url="features/org.eclipse.tm.tcf.rse.sdk.feature_0.0.0.qualifier.jar" id="org.eclipse.tm.tcf.rse.sdk.feature" version="0.0.0">
- <category name="org.eclipse.tcf"/>
- </feature>
- <category-def name="org.eclipse.tcf" label="Target Communication Framework">
- <description>
- Target Communication Framework
- </description>
- </category-def>
- <category-def name="org.eclipse.tm.te" label="Target Explorer">
- <description>
- Target Explorer to manage TCF targets.
- </description>
- </category-def>
-</site>
diff --git a/features/org.eclipse.tm.tcf.rse.sdk.feature/pom.xml b/features/org.eclipse.tm.tcf.rse.sdk.feature/pom.xml
deleted file mode 100644
index 24f4e9f5e..000000000
--- a/features/org.eclipse.tm.tcf.rse.sdk.feature/pom.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
- xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.eclipse.tcf</groupId>
- <artifactId>tcf-parent</artifactId>
- <version>0.5.0-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent>
-
- <artifactId>org.eclipse.tm.tcf.rse.sdk.feature</artifactId>
- <packaging>eclipse-feature</packaging>
- <version>0.5.0.qualifier</version>
-</project>
diff --git a/plugins/org.eclipse.tm.tcf.cdt.ui/.classpath b/plugins/org.eclipse.tcf.cdt.ui/.classpath
index 01a008e0d..01a008e0d 100644
--- a/plugins/org.eclipse.tm.tcf.cdt.ui/.classpath
+++ b/plugins/org.eclipse.tcf.cdt.ui/.classpath
diff --git a/plugins/org.eclipse.tm.tcf.cdt.ui/.project b/plugins/org.eclipse.tcf.cdt.ui/.project
index f00ffd323..e03217589 100644
--- a/plugins/org.eclipse.tm.tcf.cdt.ui/.project
+++ b/plugins/org.eclipse.tcf.cdt.ui/.project
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.eclipse.tm.tcf.cdt.ui</name>
+ <name>org.eclipse.tcf.cdt.ui</name>
<comment></comment>
<projects>
</projects>
diff --git a/plugins/org.eclipse.tm.tcf.cdt.ui/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.tcf.cdt.ui/.settings/org.eclipse.jdt.core.prefs
index 2532d5d37..2532d5d37 100644
--- a/plugins/org.eclipse.tm.tcf.cdt.ui/.settings/org.eclipse.jdt.core.prefs
+++ b/plugins/org.eclipse.tcf.cdt.ui/.settings/org.eclipse.jdt.core.prefs
diff --git a/plugins/org.eclipse.tm.tcf.cdt.ui/.settings/org.eclipse.jdt.ui.prefs b/plugins/org.eclipse.tcf.cdt.ui/.settings/org.eclipse.jdt.ui.prefs
index 07018402e..07018402e 100644
--- a/plugins/org.eclipse.tm.tcf.cdt.ui/.settings/org.eclipse.jdt.ui.prefs
+++ b/plugins/org.eclipse.tcf.cdt.ui/.settings/org.eclipse.jdt.ui.prefs
diff --git a/plugins/org.eclipse.tm.tcf.cdt.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.tcf.cdt.ui/META-INF/MANIFEST.MF
index fca221a7a..4da1a0f38 100644
--- a/plugins/org.eclipse.tm.tcf.cdt.ui/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.tcf.cdt.ui/META-INF/MANIFEST.MF
@@ -1,10 +1,10 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.tm.tcf.cdt.ui;singleton:=true
-Bundle-Version: 0.5.0.qualifier
+Bundle-SymbolicName: org.eclipse.tcf.cdt.ui;singleton:=true
+Bundle-Version: 1.0.0.qualifier
Bundle-Localization: plugin
-Bundle-Activator: org.eclipse.tm.internal.tcf.cdt.ui.Activator
+Bundle-Activator: org.eclipse.tcf.internal.cdt.ui.Activator
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.core.resources,
org.eclipse.text;bundle-version="3.5.0",
@@ -15,9 +15,9 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.cdt.ui,
org.eclipse.cdt.debug.core,
org.eclipse.cdt.debug.ui;bundle-version="7.0.0",
- org.eclipse.tm.tcf.core,
- org.eclipse.tm.tcf.debug,
- org.eclipse.tm.tcf.debug.ui,
+ org.eclipse.tcf.core,
+ org.eclipse.tcf.debug,
+ org.eclipse.tcf.debug.ui,
org.eclipse.jface.text;bundle-version="3.5.0",
org.eclipse.core.expressions,
org.eclipse.cdt.launch;bundle-version="6.1.0"
diff --git a/plugins/org.eclipse.tm.tcf.cdt.ui/about.html b/plugins/org.eclipse.tcf.cdt.ui/about.html
index 6c5b3615b..6c5b3615b 100644
--- a/plugins/org.eclipse.tm.tcf.cdt.ui/about.html
+++ b/plugins/org.eclipse.tcf.cdt.ui/about.html
diff --git a/plugins/org.eclipse.tm.tcf.cdt.ui/build.properties b/plugins/org.eclipse.tcf.cdt.ui/build.properties
index 9593b304f..9593b304f 100644
--- a/plugins/org.eclipse.tm.tcf.cdt.ui/build.properties
+++ b/plugins/org.eclipse.tcf.cdt.ui/build.properties
diff --git a/plugins/org.eclipse.tm.tcf.cdt.ui/icons/obj16/c_app.gif b/plugins/org.eclipse.tcf.cdt.ui/icons/obj16/c_app.gif
index 504ef509f..504ef509f 100644
--- a/plugins/org.eclipse.tm.tcf.cdt.ui/icons/obj16/c_app.gif
+++ b/plugins/org.eclipse.tcf.cdt.ui/icons/obj16/c_app.gif
Binary files differ
diff --git a/plugins/org.eclipse.tm.tcf.cdt.ui/plugin.properties b/plugins/org.eclipse.tcf.cdt.ui/plugin.properties
index 9539ca4ca..9f2cca172 100644
--- a/plugins/org.eclipse.tm.tcf.cdt.ui/plugin.properties
+++ b/plugins/org.eclipse.tcf.cdt.ui/plugin.properties
@@ -8,7 +8,7 @@
# Contributors:
# Wind River Systems - initial implementation
###############################################################################
-pluginName = TCF/CDT Integration UI (Incubation)
+pluginName = TCF/CDT Integration UI
providerName = Eclipse CDT
breakpoints.filterPage.name = Scope
diff --git a/plugins/org.eclipse.tm.tcf.cdt.ui/plugin.xml b/plugins/org.eclipse.tcf.cdt.ui/plugin.xml
index d62278837..261b6ac40 100644
--- a/plugins/org.eclipse.tm.tcf.cdt.ui/plugin.xml
+++ b/plugins/org.eclipse.tcf.cdt.ui/plugin.xml
@@ -12,15 +12,15 @@
<plugin>
- <extension point="org.eclipse.tm.tcf.debug.ui.launch_context">
- <class name="org.eclipse.tm.internal.tcf.cdt.ui.TCFLaunchContext" />
+ <extension point="org.eclipse.tcf.debug.ui.launch_context">
+ <class name="org.eclipse.tcf.internal.cdt.ui.TCFLaunchContext" />
</extension>
<extension
point="org.eclipse.core.runtime.adapters">
<factory
- adaptableType="org.eclipse.tm.internal.tcf.debug.ui.model.TCFNode"
- class="org.eclipse.tm.internal.tcf.cdt.ui.TCFNodeAdapterFactory">
+ adaptableType="org.eclipse.tcf.internal.debug.ui.model.TCFNode"
+ class="org.eclipse.tcf.internal.cdt.ui.TCFNodeAdapterFactory">
<adapter type="org.eclipse.cdt.debug.internal.ui.disassembly.dsf.IDisassemblyBackend"/>
<adapter type="org.eclipse.cdt.debug.core.model.ISteppingModeTarget"/>
<adapter type="org.eclipse.debug.core.model.ISuspendResume"/>
@@ -32,18 +32,18 @@
<adapter type="org.eclipse.cdt.debug.core.model.IUncallHandler"/>
<adapter type="org.eclipse.cdt.debug.ui.IPinProvider"/>
<adapter type="org.eclipse.cdt.debug.internal.core.ICWatchpointTarget"/>
- <adapter type="org.eclipse.tm.internal.tcf.debug.ui.model.ISourceNotFoundPresentation"/>
+ <adapter type="org.eclipse.tcf.internal.debug.ui.model.ISourceNotFoundPresentation"/>
</factory>
</extension>
<extension
point="org.eclipse.core.expressions.propertyTesters">
<propertyTester
- class="org.eclipse.tm.internal.tcf.cdt.ui.commands.TCFReverseDebuggingPropertyTester"
+ class="org.eclipse.tcf.internal.cdt.ui.commands.TCFReverseDebuggingPropertyTester"
id="org.eclipse.tcf.cdt.ui.ReverseDebuggingTester"
namespace="org.eclipse.cdt.debug.ui"
properties="isReverseDebuggingEnabled"
- type="org.eclipse.tm.internal.tcf.debug.ui.model.TCFNode">
+ type="org.eclipse.tcf.internal.debug.ui.model.TCFNode">
</propertyTester>
</extension>
@@ -51,29 +51,29 @@
point="org.eclipse.debug.ui.debugModelContextBindings">
<modelContextBinding
contextId="org.eclipse.cdt.debug.ui.debugging"
- debugModelId="org.eclipse.tm.tcf.debug">
+ debugModelId="org.eclipse.tcf.debug">
</modelContextBinding>
<modelContextBinding
contextId="org.eclipse.cdt.debug.ui.reverseDebuggingActionSet"
- debugModelId="org.eclipse.tm.tcf.debug">
+ debugModelId="org.eclipse.tcf.debug">
</modelContextBinding>
</extension>
<extension
point="org.eclipse.cdt.debug.core.BreakpointExtension">
<breakpointExtension
- class="org.eclipse.tm.internal.tcf.cdt.ui.breakpoints.TCFBreakpointScopeExtension"
- debugModelId="org.eclipse.tm.tcf.debug"
- id="org.eclipse.tm.tcf.cdt.ui.breakpointExtension"
+ class="org.eclipse.tcf.internal.cdt.ui.breakpoints.TCFBreakpointScopeExtension"
+ debugModelId="org.eclipse.tcf.debug"
+ id="org.eclipse.tcf.cdt.ui.breakpointExtension"
markerType="org.eclipse.cdt.debug.core.cBreakpointMarker">
</breakpointExtension>
</extension>
<extension point="org.eclipse.ui.propertyPages">
- <page class="org.eclipse.tm.internal.tcf.cdt.ui.breakpoints.TCFBreakpointThreadFilterPage"
- id="org.eclipse.tm.tcf.breakpoint.filtering"
+ <page class="org.eclipse.tcf.internal.cdt.ui.breakpoints.TCFBreakpointThreadFilterPage"
+ id="org.eclipse.tcf.breakpoint.filtering"
name="%breakpoints.filterPage.name">
- <filter name="debugModelId" value="org.eclipse.tm.tcf.debug"/>
+ <filter name="debugModelId" value="org.eclipse.tcf.debug"/>
<enabledWhen>
<and>
<adapt type="org.eclipse.cdt.debug.core.model.ICBreakpoint"/>
@@ -83,10 +83,10 @@
</and>
</enabledWhen>
</page>
- <page class="org.eclipse.tm.internal.tcf.cdt.ui.breakpoints.TCFBreakpointStatusPage"
- id="org.eclipse.tm.tcf.breakpoint.status"
+ <page class="org.eclipse.tcf.internal.cdt.ui.breakpoints.TCFBreakpointStatusPage"
+ id="org.eclipse.tcf.breakpoint.status"
name="%breakpoints.statusPage.name">
- <filter name="debugModelId" value="org.eclipse.tm.tcf.debug"/>
+ <filter name="debugModelId" value="org.eclipse.tcf.debug"/>
<enabledWhen>
<and>
<adapt type="org.eclipse.cdt.debug.core.model.ICBreakpoint"/>
@@ -116,30 +116,30 @@
id="org.eclipse.tcf.cdt.launch.localCLaunch"
type="org.eclipse.cdt.launch.applicationLaunchType"
modes="debug"
- delegate="org.eclipse.tm.internal.tcf.cdt.launch.TCFCDTLaunchDelegate"
+ delegate="org.eclipse.tcf.internal.cdt.launch.TCFCDTLaunchDelegate"
name="%launchDelegate.localApplication.name"
delegateDescription="%launchDelegate.localApplication.description"
- sourceLocatorId="org.eclipse.tm.tcf.debug.SourceLocator"
+ sourceLocatorId="org.eclipse.tcf.debug.SourceLocator"
sourcePathComputerId="org.eclipse.cdt.debug.core.sourcePathComputer">
</launchDelegate>
<launchDelegate
id="org.eclipse.tcf.cdt.launch.attachCLaunch"
type="org.eclipse.cdt.launch.attachLaunchType"
modes="debug"
- delegate="org.eclipse.tm.internal.tcf.cdt.launch.TCFCDTLaunchDelegate"
+ delegate="org.eclipse.tcf.internal.cdt.launch.TCFCDTLaunchDelegate"
name="%launchDelegate.attach.name"
delegateDescription="%launchDelegate.attach.description"
- sourceLocatorId="org.eclipse.tm.tcf.debug.SourceLocator"
+ sourceLocatorId="org.eclipse.tcf.debug.SourceLocator"
sourcePathComputerId="org.eclipse.cdt.debug.core.sourcePathComputer">
</launchDelegate>
<launchDelegate
id="org.eclipse.tcf.cdt.launch.remoteCLaunch"
type="org.eclipse.tcf.cdt.launch.remoteApplicationLaunchType"
modes="debug"
- delegate="org.eclipse.tm.internal.tcf.cdt.launch.TCFCDTLaunchDelegate"
+ delegate="org.eclipse.tcf.internal.cdt.launch.TCFCDTLaunchDelegate"
name="%launchDelegate.remoteApplication.name"
delegateDescription="%launchDelegate.remoteApplication.description"
- sourceLocatorId="org.eclipse.tm.tcf.debug.SourceLocator"
+ sourceLocatorId="org.eclipse.tcf.debug.SourceLocator"
sourcePathComputerId="org.eclipse.cdt.debug.core.sourcePathComputer">
</launchDelegate>
</extension>
@@ -170,7 +170,7 @@
<tab id="org.eclipse.tcf.cdt.launch.pathMapTab"
group="org.eclipse.cdt.launch.applicationLaunchTabGroup"
name="%launchTab.pathMap.name"
- class="org.eclipse.tm.internal.tcf.debug.ui.launch.TCFPathMapTab">
+ class="org.eclipse.tcf.internal.debug.ui.launch.TCFPathMapTab">
<associatedDelegate delegate="org.eclipse.tcf.cdt.launch.localCLaunch"/>
<placement after="org.eclipse.debug.ui.environmentTab"/>
</tab>
@@ -179,7 +179,7 @@
name="%launchTab.sourceLookup.name"
class="org.eclipse.debug.ui.sourcelookup.SourceLookupTab">
<associatedDelegate delegate="org.eclipse.tcf.cdt.launch.localCLaunch"/>
- <placement after="org.eclipse.tm.tcf.launch.pathMapTab"/>
+ <placement after="org.eclipse.tcf.launch.pathMapTab"/>
</tab>
<tab id="org.eclipse.tcf.cdt.launch.commonTab"
group="org.eclipse.cdt.launch.applicationLaunchTabGroup"
@@ -193,7 +193,7 @@
<tab id="org.eclipse.tcf.cdt.launch.attach.pathMapTab"
group="org.eclipse.cdt.launch.attachLaunchTabGroup"
name="%launchTab.pathMap.name"
- class="org.eclipse.tm.internal.tcf.debug.ui.launch.TCFPathMapTab">
+ class="org.eclipse.tcf.internal.debug.ui.launch.TCFPathMapTab">
<associatedDelegate delegate="org.eclipse.tcf.cdt.launch.attachCLaunch"/>
</tab>
<tab id="org.eclipse.tcf.cdt.launch.attach.sourceLookupTab"
@@ -201,7 +201,7 @@
name="%launchTab.sourceLookup.name"
class="org.eclipse.debug.ui.sourcelookup.SourceLookupTab">
<associatedDelegate delegate="org.eclipse.tcf.cdt.launch.attachCLaunch"/>
- <placement after="org.eclipse.tm.tcf.launch.pathMapTab"/>
+ <placement after="org.eclipse.tcf.launch.pathMapTab"/>
</tab>
<tab id="org.eclipse.tcf.cdt.launch.attach.commonTab"
group="org.eclipse.cdt.launch.attachLaunchTabGroup"
@@ -213,41 +213,41 @@
<!-- Remote application launch tabs -->
<tab id="org.eclipse.tcf.cdt.launch.remote.mainTab"
- group="org.eclipse.tm.tcf.cdt.ui.remoteApplicationLaunchTabGroup"
+ group="org.eclipse.tcf.cdt.ui.remoteApplicationLaunchTabGroup"
name="%launchTab.main.name"
- class="org.eclipse.tm.internal.tcf.cdt.ui.launch.RemoteCMainTab">
+ class="org.eclipse.tcf.internal.cdt.ui.launch.RemoteCMainTab">
<associatedDelegate delegate="org.eclipse.tcf.cdt.launch.remoteCLaunch"/>
</tab>
<tab id="org.eclipse.tcf.cdt.launch.remote.argumentsTab"
- group="org.eclipse.tm.tcf.cdt.ui.remoteApplicationLaunchTabGroup"
+ group="org.eclipse.tcf.cdt.ui.remoteApplicationLaunchTabGroup"
name="%launchTab.arguments.name"
class="org.eclipse.cdt.launch.ui.CArgumentsTab">
<associatedDelegate delegate="org.eclipse.tcf.cdt.launch.remoteCLaunch"/>
<placement after="org.eclipse.cdt.cdi.launch.mainTab"/>
</tab>
<tab id="org.eclipse.tcf.cdt.launch.remote.environmentTab"
- group="org.eclipse.tm.tcf.cdt.ui.remoteApplicationLaunchTabGroup"
+ group="org.eclipse.tcf.cdt.ui.remoteApplicationLaunchTabGroup"
name="%launchTab.environment.name"
class="org.eclipse.debug.ui.EnvironmentTab">
<associatedDelegate delegate="org.eclipse.tcf.cdt.launch.remoteCLaunch"/>
<placement after="org.eclipse.cdt.cdi.launch.argumentsTab"/>
</tab>
<tab id="org.eclipse.tcf.cdt.launch.remote.pathMapTab"
- group="org.eclipse.tm.tcf.cdt.ui.remoteApplicationLaunchTabGroup"
+ group="org.eclipse.tcf.cdt.ui.remoteApplicationLaunchTabGroup"
name="%launchTab.pathMap.name"
- class="org.eclipse.tm.internal.tcf.debug.ui.launch.TCFPathMapTab">
+ class="org.eclipse.tcf.internal.debug.ui.launch.TCFPathMapTab">
<associatedDelegate delegate="org.eclipse.tcf.cdt.launch.remoteCLaunch"/>
<placement after="org.eclipse.cdt.cdi.launch.argumentsTab"/>
</tab>
<tab id="org.eclipse.tcf.cdt.launch.remote.sourceLookupTab"
- group="org.eclipse.tm.tcf.cdt.ui.remoteApplicationLaunchTabGroup"
+ group="org.eclipse.tcf.cdt.ui.remoteApplicationLaunchTabGroup"
name="%launchTab.sourceLookup.name"
class="org.eclipse.debug.ui.sourcelookup.SourceLookupTab">
<associatedDelegate delegate="org.eclipse.tcf.cdt.launch.remoteCLaunch"/>
- <placement after="org.eclipse.tm.tcf.launch.pathMapTab"/>
+ <placement after="org.eclipse.tcf.launch.pathMapTab"/>
</tab>
<tab id="org.eclipse.tcf.cdt.launch.remote.commonTab"
- group="org.eclipse.tm.tcf.cdt.ui.remoteApplicationLaunchTabGroup"
+ group="org.eclipse.tcf.cdt.ui.remoteApplicationLaunchTabGroup"
name="%launchTab.common.name"
class="org.eclipse.debug.ui.CommonTab">
<associatedDelegate delegate="org.eclipse.tcf.cdt.launch.remoteCLaunch"/>
@@ -259,7 +259,7 @@
point="org.eclipse.debug.ui.launchConfigurationTabGroups">
<launchConfigurationTabGroup
class="org.eclipse.cdt.debug.internal.ui.launch.PlaceHolderLaunchConfigurationTabGroup"
- id="org.eclipse.tm.tcf.cdt.ui.remoteApplicationLaunchTabGroup"
+ id="org.eclipse.tcf.cdt.ui.remoteApplicationLaunchTabGroup"
type="org.eclipse.tcf.cdt.launch.remoteApplicationLaunchType">
</launchConfigurationTabGroup>
</extension>
@@ -276,10 +276,10 @@
<extension
point="org.eclipse.debug.core.statusHandlers">
<statusHandler
- class="org.eclipse.tm.internal.tcf.cdt.ui.launch.ProcessPrompter"
+ class="org.eclipse.tcf.internal.cdt.ui.launch.ProcessPrompter"
code="100"
- id="org.eclipse.tm.tcf.cdt.ui.processPrompter"
- plugin="org.eclipse.tm.tcf.cdt.core">
+ id="org.eclipse.tcf.cdt.ui.processPrompter"
+ plugin="org.eclipse.tcf.cdt.core">
</statusHandler>
</extension>
@@ -287,16 +287,16 @@
point="org.eclipse.ui.commands">
<command
categoryId="org.eclipse.debug.ui.category.run"
- defaultHandler="org.eclipse.tm.internal.tcf.cdt.ui.commands.AddFunctionBreakointHandler"
+ defaultHandler="org.eclipse.tcf.internal.cdt.ui.commands.AddFunctionBreakointHandler"
description="%command.addFunctionBreakpoint.desc"
- id="org.eclipse.tm.tcf.cdt.ui.add_function_breakpoint"
+ id="org.eclipse.tcf.cdt.ui.add_function_breakpoint"
name="%command.addFunctionBreakpoint.name">
</command>
<command
categoryId="org.eclipse.debug.ui.category.run"
- defaultHandler="org.eclipse.tm.internal.tcf.cdt.ui.commands.AddWatchpointHandler"
+ defaultHandler="org.eclipse.tcf.internal.cdt.ui.commands.AddWatchpointHandler"
description="%command.addWatchpoint.desc"
- id="org.eclipse.tm.tcf.cdt.ui.add_watchpoint"
+ id="org.eclipse.tcf.cdt.ui.add_watchpoint"
name="%command.addWatchpoint.name">
</command>
</extension>
@@ -307,9 +307,9 @@
allPopups="false"
locationURI="menu:org.eclipse.debug.ui.BreakpointView?after=additions">
<command
- commandId="org.eclipse.tm.tcf.cdt.ui.add_function_breakpoint"
+ commandId="org.eclipse.tcf.cdt.ui.add_function_breakpoint"
icon="platform:/plugin/org.eclipse.cdt.debug.ui/icons/obj16/funbrkp_obj.gif"
- id="org.eclipse.tm.tcf.cdt.ui.add_function_breakpoint"
+ id="org.eclipse.tcf.cdt.ui.add_function_breakpoint"
label="%item.addFunctionBreakpoint.name"
style="push">
</command>
@@ -318,15 +318,15 @@
allPopups="false"
locationURI="popup:#CEditorContext?after=group.debug">
<command
- commandId="org.eclipse.tm.tcf.cdt.ui.add_watchpoint"
+ commandId="org.eclipse.tcf.cdt.ui.add_watchpoint"
icon="platform:/plugin/org.eclipse.cdt.debug.ui/icons/elcl16/watchpoint_co.gif"
- id="org.eclipse.tm.tcf.cdt.ui.add_watchpoint.editor"
+ id="org.eclipse.tcf.cdt.ui.add_watchpoint.editor"
label="%item.addWatchpoint.name"
style="push">
<visibleWhen checkEnabled="false">
<with variable="activeContexts">
<iterate ifEmpty="false" operator="or">
- <equals value="org.eclipse.tm.tcf.debug.ui.debugging"/>
+ <equals value="org.eclipse.tcf.debug.ui.debugging"/>
</iterate>
</with>
</visibleWhen>
@@ -336,7 +336,7 @@
<extension point="org.eclipse.ui.popupMenus">
<objectContribution
- objectClass="org.eclipse.tm.internal.tcf.debug.ui.model.TCFNodeExpression"
+ objectClass="org.eclipse.tcf.internal.debug.ui.model.TCFNodeExpression"
id="org.eclipse.tcf.cdt.ui.WatchpointActions">
<action
class="org.eclipse.cdt.debug.internal.ui.actions.AddWatchpointOnVariableActionDelegate"
@@ -351,10 +351,10 @@
<extension
point="org.eclipse.ui.editors">
<editor
- class="org.eclipse.tm.internal.tcf.cdt.ui.sourcelookup.TCFCSourceNotFoundEditor"
+ class="org.eclipse.tcf.internal.cdt.ui.sourcelookup.TCFCSourceNotFoundEditor"
default="false"
icon="icons/obj16/c_app.gif"
- id="org.eclipse.tm.tcf.cdt.ui.source_not_found_editor"
+ id="org.eclipse.tcf.cdt.ui.source_not_found_editor"
name="%editor.sourceNotFound.name">
</editor>
</extension>
diff --git a/plugins/org.eclipse.tm.tcf.rse/pom.xml b/plugins/org.eclipse.tcf.cdt.ui/pom.xml
index 1ab6df9fd..6238c9b79 100644
--- a/plugins/org.eclipse.tm.tcf.rse/pom.xml
+++ b/plugins/org.eclipse.tcf.cdt.ui/pom.xml
@@ -7,11 +7,11 @@
<parent>
<groupId>org.eclipse.tcf</groupId>
<artifactId>tcf-parent</artifactId>
- <version>0.5.0-SNAPSHOT</version>
+ <version>1.0.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
- <version>0.5.0-SNAPSHOT</version>
- <artifactId>org.eclipse.tm.tcf.rse</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <artifactId>org.eclipse.tcf.cdt.ui</artifactId>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/launch/ContextSelection.java b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/launch/ContextSelection.java
index 62bb56f52..0cc2b0644 100644
--- a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/launch/ContextSelection.java
+++ b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/launch/ContextSelection.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.cdt.launch;
+package org.eclipse.tcf.internal.cdt.launch;
public class ContextSelection {
public String fPeerId;
diff --git a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/launch/TCFCDTLaunchDelegate.java b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/launch/TCFCDTLaunchDelegate.java
index 15797358c..21b607057 100644
--- a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/launch/TCFCDTLaunchDelegate.java
+++ b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/launch/TCFCDTLaunchDelegate.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.cdt.launch;
+package org.eclipse.tcf.internal.cdt.launch;
import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
import org.eclipse.core.runtime.CoreException;
@@ -20,9 +20,9 @@ import org.eclipse.debug.core.ILaunch;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.debug.core.IStatusHandler;
-import org.eclipse.tm.internal.tcf.debug.launch.TCFLaunchDelegate;
-import org.eclipse.tm.internal.tcf.debug.model.TCFLaunch;
-import org.eclipse.tm.tcf.protocol.Protocol;
+import org.eclipse.tcf.internal.debug.launch.TCFLaunchDelegate;
+import org.eclipse.tcf.internal.debug.model.TCFLaunch;
+import org.eclipse.tcf.protocol.Protocol;
/**
* TCF launch delegate for CDT based launch configuration types.
@@ -83,7 +83,7 @@ public class TCFCDTLaunchDelegate extends TCFLaunchDelegate {
private ContextSelection promptForContext(ILaunchConfiguration config) throws CoreException {
IStatus promptStatus = new Status(IStatus.INFO, "org.eclipse.debug.ui", 200, "", null); //$NON-NLS-1$//$NON-NLS-2$
- IStatus contextPrompt = new Status(IStatus.INFO, "org.eclipse.tm.tcf.cdt.core", 100, "", null); //$NON-NLS-1$//$NON-NLS-2$
+ IStatus contextPrompt = new Status(IStatus.INFO, "org.eclipse.tcf.cdt.core", 100, "", null); //$NON-NLS-1$//$NON-NLS-2$
// consult a status handler
IStatusHandler prompter = DebugPlugin.getDefault().getStatusHandler(promptStatus);
if (prompter != null) {
diff --git a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/Activator.java b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/Activator.java
index 229fcb7de..7aef6bc2c 100644
--- a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/Activator.java
+++ b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/Activator.java
@@ -8,13 +8,13 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.cdt.ui;
+package org.eclipse.tcf.internal.cdt.ui;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.dialogs.ErrorDialog;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.tm.tcf.protocol.Protocol;
+import org.eclipse.tcf.protocol.Protocol;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.plugin.AbstractUIPlugin;
@@ -25,7 +25,7 @@ import org.osgi.framework.BundleContext;
*/
public class Activator extends AbstractUIPlugin {
- public static final String PLUGIN_ID = "org.eclipse.tm.tcf.cdt.ui";
+ public static final String PLUGIN_ID = "org.eclipse.tcf.cdt.ui";
private static Activator plugin;
private static TCFBreakpointStatusListener bp_status_listener;
private static TCFBreakpointActions bp_actions;
diff --git a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/EvaluationContextManager.java b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/EvaluationContextManager.java
index 2ca62c65f..3de7186df 100644
--- a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/EvaluationContextManager.java
+++ b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/EvaluationContextManager.java
@@ -11,7 +11,7 @@
* Nokia - Made generic to DSF
* Wind River Systems - Adapted to TCF Debug
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.cdt.ui;
+package org.eclipse.tcf.internal.cdt.ui;
import java.util.HashMap;
import java.util.Map;
@@ -24,9 +24,9 @@ import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.debug.ui.IDebugUIConstants;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNode;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNodeExecContext;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNodeStackFrame;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNode;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNodeExecContext;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNodeStackFrame;
import org.eclipse.ui.IPageListener;
import org.eclipse.ui.IPartListener2;
import org.eclipse.ui.ISelectionListener;
diff --git a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/ImageCache.java b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/ImageCache.java
index bcf6fa62c..1b0a785cc 100644
--- a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/ImageCache.java
+++ b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/ImageCache.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.cdt.ui;
+package org.eclipse.tcf.internal.cdt.ui;
import java.net.URL;
import java.util.HashMap;
@@ -33,7 +33,7 @@ public class ImageCache {
if (name == null) return null;
ImageDescriptor descriptor = desc_cache.get(name);
if (descriptor == null) {
- Bundle bundle = Platform.getBundle("org.eclipse.tm.tcf.debug.ui");
+ Bundle bundle = Platform.getBundle("org.eclipse.tcf.debug.ui");
if (bundle != null){
URL url = FileLocator.find(bundle, new Path(name), null);
if (url != null) descriptor = ImageDescriptor.createFromURL(url);
diff --git a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/TCFBreakpointActions.java b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/TCFBreakpointActions.java
index eba6e3f35..64034ba2c 100644
--- a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/TCFBreakpointActions.java
+++ b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/TCFBreakpointActions.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.cdt.ui;
+package org.eclipse.tcf.internal.cdt.ui;
import java.util.Collection;
import java.util.HashMap;
@@ -29,21 +29,21 @@ import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.ILaunch;
import org.eclipse.debug.core.model.IBreakpoint;
-import org.eclipse.tm.internal.tcf.debug.actions.TCFAction;
-import org.eclipse.tm.internal.tcf.debug.model.TCFBreakpointsModel;
-import org.eclipse.tm.internal.tcf.debug.model.TCFContextState;
-import org.eclipse.tm.internal.tcf.debug.model.TCFLaunch;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFChildrenLogExpressions;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFModel;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFModelManager;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNodeExecContext;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNodeExpression;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.tcf.services.IRunControl;
-import org.eclipse.tm.tcf.services.IRunControl.RunControlContext;
-import org.eclipse.tm.tcf.util.TCFDataCache;
-import org.eclipse.tm.tcf.util.TCFTask;
+import org.eclipse.tcf.internal.debug.actions.TCFAction;
+import org.eclipse.tcf.internal.debug.model.TCFBreakpointsModel;
+import org.eclipse.tcf.internal.debug.model.TCFContextState;
+import org.eclipse.tcf.internal.debug.model.TCFLaunch;
+import org.eclipse.tcf.internal.debug.ui.model.TCFChildrenLogExpressions;
+import org.eclipse.tcf.internal.debug.ui.model.TCFModel;
+import org.eclipse.tcf.internal.debug.ui.model.TCFModelManager;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNodeExecContext;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNodeExpression;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.services.IRunControl;
+import org.eclipse.tcf.services.IRunControl.RunControlContext;
+import org.eclipse.tcf.util.TCFDataCache;
+import org.eclipse.tcf.util.TCFTask;
public class TCFBreakpointActions {
diff --git a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/TCFBreakpointStatusListener.java b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/TCFBreakpointStatusListener.java
index 0105afc25..9286bcec0 100644
--- a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/TCFBreakpointStatusListener.java
+++ b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/TCFBreakpointStatusListener.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.cdt.ui;
+package org.eclipse.tcf.internal.cdt.ui;
import java.util.ArrayList;
import java.util.Collection;
@@ -38,16 +38,15 @@ import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.ILaunch;
import org.eclipse.debug.core.model.IBreakpoint;
-import org.eclipse.tm.internal.tcf.debug.model.ITCFBreakpointListener;
-import org.eclipse.tm.internal.tcf.debug.model.ITCFConstants;
-import org.eclipse.tm.internal.tcf.debug.model.TCFBreakpoint;
-import org.eclipse.tm.internal.tcf.debug.model.TCFBreakpointsModel;
-import org.eclipse.tm.internal.tcf.debug.model.TCFBreakpointsStatus;
-import org.eclipse.tm.internal.tcf.debug.model.TCFLaunch;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFModel;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFModelManager;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.tcf.services.IBreakpoints;
+import org.eclipse.tcf.internal.debug.model.ITCFBreakpointListener;
+import org.eclipse.tcf.internal.debug.model.TCFBreakpoint;
+import org.eclipse.tcf.internal.debug.model.TCFBreakpointsModel;
+import org.eclipse.tcf.internal.debug.model.TCFBreakpointsStatus;
+import org.eclipse.tcf.internal.debug.model.TCFLaunch;
+import org.eclipse.tcf.internal.debug.ui.model.TCFModel;
+import org.eclipse.tcf.internal.debug.ui.model.TCFModelManager;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.services.IBreakpoints;
/**
* This class monitors breakpoints status on TCF debug targets and calls ICBreakpoint.incrementInstallCount() or
@@ -57,9 +56,7 @@ import org.eclipse.tm.tcf.services.IBreakpoints;
class TCFBreakpointStatusListener {
/** Ref count attribute for foreign breakpoints */
- private static final String ATTR_REFCOUNT = "org.eclipse.tm.tcf.cdt.refcount";
- /** TCF breakpoint ID attribute */
- private static final String ATTR_TCF_ID = ITCFConstants.ID_TCF_DEBUG_MODEL + '.' + IBreakpoints.PROP_ID;
+ private static final String ATTR_REFCOUNT = "org.eclipse.tcf.cdt.refcount";
private class BreakpointListener implements ITCFBreakpointListener {
@@ -284,7 +281,7 @@ class TCFBreakpointStatusListener {
if (bp.isPersisted()) continue;
IMarker marker = bp.getMarker();
if (marker == null) continue;
- if (id.equals(marker.getAttribute(ATTR_TCF_ID, null))) {
+ if (id.equals(marker.getAttribute(TCFBreakpointsModel.ATTR_ID, null))) {
int cnt = marker.getAttribute(ATTR_REFCOUNT, 0) - 1;
if (cnt > 0) {
marker.setAttribute(ATTR_REFCOUNT, cnt);
diff --git a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/TCFLaunchContext.java b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/TCFLaunchContext.java
index 7f31ce1a7..89b6a5aa0 100644
--- a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/TCFLaunchContext.java
+++ b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/TCFLaunchContext.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.cdt.ui;
+package org.eclipse.tcf.internal.cdt.ui;
import org.eclipse.cdt.core.CCorePlugin;
import org.eclipse.cdt.core.model.CModelException;
@@ -37,8 +37,8 @@ import org.eclipse.swt.custom.BusyIndicator;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.tm.internal.tcf.debug.launch.TCFLaunchDelegate;
-import org.eclipse.tm.internal.tcf.debug.ui.launch.ITCFLaunchContext;
+import org.eclipse.tcf.internal.debug.launch.TCFLaunchDelegate;
+import org.eclipse.tcf.internal.debug.ui.launch.ITCFLaunchContext;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IWorkbenchPage;
diff --git a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/TCFNodeAdapterFactory.java b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/TCFNodeAdapterFactory.java
index 7dcc42b2c..b28b577cf 100644
--- a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/TCFNodeAdapterFactory.java
+++ b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/TCFNodeAdapterFactory.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.cdt.ui;
+package org.eclipse.tcf.internal.cdt.ui;
import org.eclipse.cdt.debug.core.model.IReverseResumeHandler;
import org.eclipse.cdt.debug.core.model.IReverseStepIntoHandler;
@@ -22,22 +22,22 @@ import org.eclipse.cdt.debug.ui.IPinProvider;
import org.eclipse.cdt.ui.text.c.hover.ICEditorTextHover;
import org.eclipse.core.runtime.IAdapterFactory;
import org.eclipse.debug.core.model.ISuspendResume;
-import org.eclipse.tm.internal.tcf.cdt.ui.breakpoints.TCFWatchpointTarget;
-import org.eclipse.tm.internal.tcf.cdt.ui.commands.TCFPinViewCommand;
-import org.eclipse.tm.internal.tcf.cdt.ui.commands.TCFReverseResumeCommand;
-import org.eclipse.tm.internal.tcf.cdt.ui.commands.TCFReverseStepIntoCommand;
-import org.eclipse.tm.internal.tcf.cdt.ui.commands.TCFReverseStepOverCommand;
-import org.eclipse.tm.internal.tcf.cdt.ui.commands.TCFReverseStepReturnCommand;
-import org.eclipse.tm.internal.tcf.cdt.ui.commands.TCFReverseToggleCommand;
-import org.eclipse.tm.internal.tcf.cdt.ui.disassembly.TCFDisassemblyBackend;
-import org.eclipse.tm.internal.tcf.cdt.ui.hover.TCFDebugTextHover;
-import org.eclipse.tm.internal.tcf.cdt.ui.sourcelookup.TCFSourceNotFoundPresentation;
-import org.eclipse.tm.internal.tcf.debug.ui.model.ISourceNotFoundPresentation;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFModel;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNode;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNodeExecContext;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNodeExpression;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNodeStackFrame;
+import org.eclipse.tcf.internal.cdt.ui.breakpoints.TCFWatchpointTarget;
+import org.eclipse.tcf.internal.cdt.ui.commands.TCFPinViewCommand;
+import org.eclipse.tcf.internal.cdt.ui.commands.TCFReverseResumeCommand;
+import org.eclipse.tcf.internal.cdt.ui.commands.TCFReverseStepIntoCommand;
+import org.eclipse.tcf.internal.cdt.ui.commands.TCFReverseStepOverCommand;
+import org.eclipse.tcf.internal.cdt.ui.commands.TCFReverseStepReturnCommand;
+import org.eclipse.tcf.internal.cdt.ui.commands.TCFReverseToggleCommand;
+import org.eclipse.tcf.internal.cdt.ui.disassembly.TCFDisassemblyBackend;
+import org.eclipse.tcf.internal.cdt.ui.hover.TCFDebugTextHover;
+import org.eclipse.tcf.internal.cdt.ui.sourcelookup.TCFSourceNotFoundPresentation;
+import org.eclipse.tcf.internal.debug.ui.model.ISourceNotFoundPresentation;
+import org.eclipse.tcf.internal.debug.ui.model.TCFModel;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNode;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNodeExecContext;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNodeExpression;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNodeStackFrame;
@SuppressWarnings({ "rawtypes", "restriction" })
public class TCFNodeAdapterFactory implements IAdapterFactory {
diff --git a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/TCFSteppingModeTarget.java b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/TCFSteppingModeTarget.java
index d36b71a20..280aa55b8 100644
--- a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/TCFSteppingModeTarget.java
+++ b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/TCFSteppingModeTarget.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.cdt.ui;
+package org.eclipse.tcf.internal.cdt.ui;
import org.eclipse.cdt.debug.core.model.ISteppingModeTarget;
import org.eclipse.cdt.debug.core.model.ITargetProperties;
@@ -17,7 +17,7 @@ import org.eclipse.core.runtime.Preferences;
import org.eclipse.core.runtime.Preferences.IPropertyChangeListener;
import org.eclipse.debug.ui.DebugUITools;
import org.eclipse.debug.ui.sourcelookup.ISourceDisplay;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFModel;
+import org.eclipse.tcf.internal.debug.ui.model.TCFModel;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;
diff --git a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/TCFSuspendResumeAdapter.java b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/TCFSuspendResumeAdapter.java
index 124c8ac16..4530a4f15 100644
--- a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/TCFSuspendResumeAdapter.java
+++ b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/TCFSuspendResumeAdapter.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.cdt.ui;
+package org.eclipse.tcf.internal.cdt.ui;
import java.util.HashMap;
import java.util.LinkedList;
@@ -31,26 +31,26 @@ import org.eclipse.core.runtime.Status;
import org.eclipse.debug.core.DebugException;
import org.eclipse.debug.core.model.ISourceLocator;
import org.eclipse.debug.core.model.ISuspendResume;
-import org.eclipse.tm.internal.tcf.debug.model.TCFContextState;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFChildren;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFDebugTask;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNode;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNodeExecContext;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNodeRegister;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.protocol.JSON;
-import org.eclipse.tm.tcf.services.IBreakpoints;
-import org.eclipse.tm.tcf.services.ILineNumbers;
-import org.eclipse.tm.tcf.services.ILineNumbers.CodeArea;
-import org.eclipse.tm.tcf.services.IMemory;
-import org.eclipse.tm.tcf.services.IRegisters;
-import org.eclipse.tm.tcf.services.IRegisters.RegistersContext;
-import org.eclipse.tm.tcf.services.IRunControl;
-import org.eclipse.tm.tcf.services.IRunControl.RunControlContext;
-import org.eclipse.tm.tcf.services.IRunControl.RunControlListener;
-import org.eclipse.tm.tcf.util.TCFDataCache;
-import org.eclipse.tm.tcf.util.TCFTask;
+import org.eclipse.tcf.internal.debug.model.TCFContextState;
+import org.eclipse.tcf.internal.debug.ui.model.TCFChildren;
+import org.eclipse.tcf.internal.debug.ui.model.TCFDebugTask;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNode;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNodeExecContext;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNodeRegister;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.JSON;
+import org.eclipse.tcf.services.IBreakpoints;
+import org.eclipse.tcf.services.ILineNumbers;
+import org.eclipse.tcf.services.ILineNumbers.CodeArea;
+import org.eclipse.tcf.services.IMemory;
+import org.eclipse.tcf.services.IRegisters;
+import org.eclipse.tcf.services.IRegisters.RegistersContext;
+import org.eclipse.tcf.services.IRunControl;
+import org.eclipse.tcf.services.IRunControl.RunControlContext;
+import org.eclipse.tcf.services.IRunControl.RunControlListener;
+import org.eclipse.tcf.util.TCFDataCache;
+import org.eclipse.tcf.util.TCFTask;
/**
* A {@link ISuspendResume} adapter for TCF execution contexts enabling special
diff --git a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/breakpoints/TCFBreakpointScopeExtension.java b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/TCFBreakpointScopeExtension.java
index b9536af71..c247f81f3 100644
--- a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/breakpoints/TCFBreakpointScopeExtension.java
+++ b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/TCFBreakpointScopeExtension.java
@@ -8,15 +8,15 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.cdt.ui.breakpoints;
+package org.eclipse.tcf.internal.cdt.ui.breakpoints;
import org.eclipse.cdt.debug.core.model.ICBreakpoint;
import org.eclipse.cdt.debug.core.model.ICBreakpointExtension;
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.runtime.CoreException;
-import org.eclipse.tm.internal.tcf.cdt.ui.Activator;
-import org.eclipse.tm.internal.tcf.debug.model.ITCFConstants;
-import org.eclipse.tm.tcf.services.IBreakpoints;
+import org.eclipse.tcf.internal.cdt.ui.Activator;
+import org.eclipse.tcf.internal.debug.model.ITCFConstants;
+import org.eclipse.tcf.services.IBreakpoints;
public class TCFBreakpointScopeExtension implements ICBreakpointExtension {
diff --git a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/breakpoints/TCFBreakpointStatusPage.java b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/TCFBreakpointStatusPage.java
index 3a07b9949..e52bf2b53 100644
--- a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/breakpoints/TCFBreakpointStatusPage.java
+++ b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/TCFBreakpointStatusPage.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.cdt.ui.breakpoints;
+package org.eclipse.tcf.internal.cdt.ui.breakpoints;
import java.math.BigInteger;
import java.util.ArrayList;
@@ -36,19 +36,20 @@ 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.tm.internal.tcf.cdt.ui.ImageCache;
-import org.eclipse.tm.internal.tcf.debug.model.TCFBreakpointsStatus;
-import org.eclipse.tm.internal.tcf.debug.model.TCFLaunch;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFModel;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFModelManager;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNode;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNodeExecContext;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNodeLaunch;
-import org.eclipse.tm.tcf.protocol.JSON;
-import org.eclipse.tm.tcf.services.IBreakpoints;
-import org.eclipse.tm.tcf.services.IRunControl;
-import org.eclipse.tm.tcf.util.TCFDataCache;
-import org.eclipse.tm.tcf.util.TCFTask;
+import org.eclipse.tcf.internal.cdt.ui.ImageCache;
+import org.eclipse.tcf.internal.debug.model.TCFBreakpointsStatus;
+import org.eclipse.tcf.internal.debug.model.TCFLaunch;
+import org.eclipse.tcf.internal.debug.model.TCFSourceRef;
+import org.eclipse.tcf.internal.debug.ui.model.TCFModel;
+import org.eclipse.tcf.internal.debug.ui.model.TCFModelManager;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNode;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNodeExecContext;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNodeLaunch;
+import org.eclipse.tcf.protocol.JSON;
+import org.eclipse.tcf.services.IBreakpoints;
+import org.eclipse.tcf.services.IRunControl;
+import org.eclipse.tcf.util.TCFDataCache;
+import org.eclipse.tcf.util.TCFTask;
import org.eclipse.ui.dialogs.PropertyPage;
public class TCFBreakpointStatusPage extends PropertyPage {
@@ -128,6 +129,32 @@ public class TCFBreakpointStatusPage extends PropertyPage {
if (size != null) z.text += "; Size " + size;
String type = (String)m.get(IBreakpoints.INSTANCE_TYPE);
if (type != null) z.text += "; Type: " + type;
+ if (y.object instanceof TCFNode) {
+ TCFDataCache<TCFNodeExecContext> mem = model.searchMemoryContext((TCFNode)y.object);
+ if (mem != null) {
+ if (!mem.validate(this)) {
+ pending = mem;
+ }
+ else {
+ TCFNodeExecContext ctx = mem.getData();
+ if (ctx != null) {
+ TCFDataCache<TCFSourceRef> ln_cache = ctx.getLineInfo(i);
+ if (ln_cache != null) {
+ if (!ln_cache.validate()) {
+ pending = ln_cache;
+ }
+ else {
+ TCFSourceRef ref = ln_cache.getData();
+ if (ref != null && ref.area != null && ref.area.file != null) {
+ z.text += "; " + ref.area.file + ":" + ref.area.start_line;
+ if (ref.area.start_column > 0) z.text += "." + ref.area.start_column;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
}
}
z.parent = y;
diff --git a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/breakpoints/TCFBreakpointThreadFilterPage.java b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/TCFBreakpointThreadFilterPage.java
index d5274096e..eec02a39f 100644
--- a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/breakpoints/TCFBreakpointThreadFilterPage.java
+++ b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/TCFBreakpointThreadFilterPage.java
@@ -9,7 +9,7 @@
* QNX Software Systems - Initial API and implementation
* Wind River Systems - Adapted to TCF
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.cdt.ui.breakpoints;
+package org.eclipse.tcf.internal.cdt.ui.breakpoints;
import org.eclipse.cdt.debug.core.model.ICBreakpoint;
import org.eclipse.core.runtime.CoreException;
@@ -18,7 +18,7 @@ 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.tm.internal.tcf.debug.model.ITCFConstants;
+import org.eclipse.tcf.internal.debug.model.ITCFConstants;
import org.eclipse.ui.dialogs.PropertyPage;
/**
diff --git a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/breakpoints/TCFThreadFilterEditor.java b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/TCFThreadFilterEditor.java
index e48fb7ca3..cbee657e8 100644
--- a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/breakpoints/TCFThreadFilterEditor.java
+++ b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/TCFThreadFilterEditor.java
@@ -9,7 +9,7 @@
* QNX Software Systems - Initial API and implementation
* Wind River Systems - Adapted to TCF
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.cdt.ui.breakpoints;
+package org.eclipse.tcf.internal.cdt.ui.breakpoints;
import java.util.ArrayList;
import java.util.Arrays;
@@ -36,16 +36,16 @@ import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
-import org.eclipse.tm.internal.tcf.cdt.ui.ImageCache;
-import org.eclipse.tm.internal.tcf.debug.model.TCFLaunch;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFChildren;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFModel;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFModelManager;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNode;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNodeExecContext;
-import org.eclipse.tm.tcf.services.IRunControl;
-import org.eclipse.tm.tcf.util.TCFDataCache;
-import org.eclipse.tm.tcf.util.TCFTask;
+import org.eclipse.tcf.internal.cdt.ui.ImageCache;
+import org.eclipse.tcf.internal.debug.model.TCFLaunch;
+import org.eclipse.tcf.internal.debug.ui.model.TCFChildren;
+import org.eclipse.tcf.internal.debug.ui.model.TCFModel;
+import org.eclipse.tcf.internal.debug.ui.model.TCFModelManager;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNode;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNodeExecContext;
+import org.eclipse.tcf.services.IRunControl;
+import org.eclipse.tcf.util.TCFDataCache;
+import org.eclipse.tcf.util.TCFTask;
public class TCFThreadFilterEditor {
diff --git a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/breakpoints/TCFWatchpointTarget.java b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/TCFWatchpointTarget.java
index 2807f3611..805792158 100644
--- a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/breakpoints/TCFWatchpointTarget.java
+++ b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/TCFWatchpointTarget.java
@@ -8,14 +8,14 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.cdt.ui.breakpoints;
+package org.eclipse.tcf.internal.cdt.ui.breakpoints;
import org.eclipse.cdt.debug.internal.core.ICWatchpointTarget;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNodeExpression;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.tcf.services.ISymbols;
-import org.eclipse.tm.tcf.util.TCFDataCache;
-import org.eclipse.tm.tcf.util.TCFTask;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNodeExpression;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.services.ISymbols;
+import org.eclipse.tcf.util.TCFDataCache;
+import org.eclipse.tcf.util.TCFTask;
/**
* TCF "Add Watchpoint" target implementation.
diff --git a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/commands/AddFunctionBreakointHandler.java b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/commands/AddFunctionBreakointHandler.java
index 5b8375455..604b2eb1f 100644
--- a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/commands/AddFunctionBreakointHandler.java
+++ b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/commands/AddFunctionBreakointHandler.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.cdt.ui.commands;
+package org.eclipse.tcf.internal.cdt.ui.commands;
import org.eclipse.cdt.debug.core.CDIDebugModel;
import org.eclipse.cdt.debug.core.model.ICBreakpointType;
diff --git a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/commands/AddWatchpointHandler.java b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/commands/AddWatchpointHandler.java
index 827923ddd..df79caf5e 100644
--- a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/commands/AddWatchpointHandler.java
+++ b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/commands/AddWatchpointHandler.java
@@ -9,7 +9,7 @@
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.cdt.ui.commands;
+package org.eclipse.tcf.internal.cdt.ui.commands;
import java.math.BigInteger;
diff --git a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/commands/TCFPinViewCommand.java b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/commands/TCFPinViewCommand.java
index 24f72e72f..4f58708b3 100644
--- a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/commands/TCFPinViewCommand.java
+++ b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/commands/TCFPinViewCommand.java
@@ -9,7 +9,7 @@
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.cdt.ui.commands;
+package org.eclipse.tcf.internal.cdt.ui.commands;
import java.util.ArrayList;
import java.util.Map;
@@ -24,13 +24,13 @@ import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.viewers.TreePath;
import org.eclipse.swt.graphics.FontData;
import org.eclipse.swt.graphics.RGB;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFModel;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNode;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNodeExecContext;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNodeStackFrame;
-import org.eclipse.tm.tcf.services.IRunControl;
-import org.eclipse.tm.tcf.util.TCFDataCache;
-import org.eclipse.tm.tcf.util.TCFTask;
+import org.eclipse.tcf.internal.debug.ui.model.TCFModel;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNode;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNodeExecContext;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNodeStackFrame;
+import org.eclipse.tcf.services.IRunControl;
+import org.eclipse.tcf.util.TCFDataCache;
+import org.eclipse.tcf.util.TCFTask;
import org.eclipse.ui.IWorkbenchPart;
@SuppressWarnings("restriction")
diff --git a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/commands/TCFReverseDebuggingPropertyTester.java b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/commands/TCFReverseDebuggingPropertyTester.java
index 9d8b079a3..fa664ba49 100644
--- a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/commands/TCFReverseDebuggingPropertyTester.java
+++ b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/commands/TCFReverseDebuggingPropertyTester.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.cdt.ui.commands;
+package org.eclipse.tcf.internal.cdt.ui.commands;
import org.eclipse.core.expressions.PropertyTester;
diff --git a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/commands/TCFReverseResumeCommand.java b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/commands/TCFReverseResumeCommand.java
index 232f44515..577d76089 100644
--- a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/commands/TCFReverseResumeCommand.java
+++ b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/commands/TCFReverseResumeCommand.java
@@ -8,11 +8,11 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.cdt.ui.commands;
+package org.eclipse.tcf.internal.cdt.ui.commands;
import org.eclipse.cdt.debug.core.model.IReverseResumeHandler;
-import org.eclipse.tm.internal.tcf.debug.ui.commands.BackResumeCommand;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFModel;
+import org.eclipse.tcf.internal.debug.ui.commands.BackResumeCommand;
+import org.eclipse.tcf.internal.debug.ui.model.TCFModel;
/**
* Debug command handler for reverse resume.
diff --git a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/commands/TCFReverseStepIntoCommand.java b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/commands/TCFReverseStepIntoCommand.java
index bdf1affea..35b26fede 100644
--- a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/commands/TCFReverseStepIntoCommand.java
+++ b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/commands/TCFReverseStepIntoCommand.java
@@ -8,11 +8,11 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.cdt.ui.commands;
+package org.eclipse.tcf.internal.cdt.ui.commands;
import org.eclipse.cdt.debug.core.model.IReverseStepIntoHandler;
-import org.eclipse.tm.internal.tcf.debug.ui.commands.BackIntoCommand;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFModel;
+import org.eclipse.tcf.internal.debug.ui.commands.BackIntoCommand;
+import org.eclipse.tcf.internal.debug.ui.model.TCFModel;
/**
* Debug command handler for reverse step into.
diff --git a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/commands/TCFReverseStepOverCommand.java b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/commands/TCFReverseStepOverCommand.java
index e15c81544..26359b035 100644
--- a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/commands/TCFReverseStepOverCommand.java
+++ b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/commands/TCFReverseStepOverCommand.java
@@ -8,11 +8,11 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.cdt.ui.commands;
+package org.eclipse.tcf.internal.cdt.ui.commands;
import org.eclipse.cdt.debug.core.model.IReverseStepOverHandler;
-import org.eclipse.tm.internal.tcf.debug.ui.commands.BackOverCommand;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFModel;
+import org.eclipse.tcf.internal.debug.ui.commands.BackOverCommand;
+import org.eclipse.tcf.internal.debug.ui.model.TCFModel;
/**
* Debug command handler for reverse step over.
diff --git a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/commands/TCFReverseStepReturnCommand.java b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/commands/TCFReverseStepReturnCommand.java
index 93358ad31..38c651033 100644
--- a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/commands/TCFReverseStepReturnCommand.java
+++ b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/commands/TCFReverseStepReturnCommand.java
@@ -8,11 +8,11 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.cdt.ui.commands;
+package org.eclipse.tcf.internal.cdt.ui.commands;
import org.eclipse.cdt.debug.core.model.IUncallHandler;
-import org.eclipse.tm.internal.tcf.debug.ui.commands.BackReturnCommand;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFModel;
+import org.eclipse.tcf.internal.debug.ui.commands.BackReturnCommand;
+import org.eclipse.tcf.internal.debug.ui.model.TCFModel;
/**
* Debug command handler for reverse step return.
diff --git a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/commands/TCFReverseToggleCommand.java b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/commands/TCFReverseToggleCommand.java
index 6823e8273..4e741c724 100644
--- a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/commands/TCFReverseToggleCommand.java
+++ b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/commands/TCFReverseToggleCommand.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.cdt.ui.commands;
+package org.eclipse.tcf.internal.cdt.ui.commands;
import org.eclipse.cdt.debug.core.model.IReverseToggleHandler;
import org.eclipse.debug.core.commands.IDebugCommandRequest;
diff --git a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/disassembly/TCFDisassemblyBackend.java b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/disassembly/TCFDisassemblyBackend.java
index efcc2812c..0079fb35e 100644
--- a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/disassembly/TCFDisassemblyBackend.java
+++ b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/disassembly/TCFDisassemblyBackend.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.cdt.ui.disassembly;
+package org.eclipse.tcf.internal.cdt.ui.disassembly;
import static org.eclipse.cdt.debug.internal.ui.disassembly.dsf.DisassemblyUtils.DEBUG;
@@ -35,39 +35,39 @@ import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.IDocumentExtension4;
import org.eclipse.jface.text.Position;
-import org.eclipse.tm.internal.tcf.cdt.ui.Activator;
-import org.eclipse.tm.internal.tcf.debug.launch.TCFSourceLookupDirector;
-import org.eclipse.tm.internal.tcf.debug.model.TCFContextState;
-import org.eclipse.tm.internal.tcf.debug.model.TCFSourceRef;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFChildrenStackTrace;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFModel;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNode;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNodeExecContext;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNodeStackFrame;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IChannel.IChannelListener;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.protocol.JSON;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.tcf.services.IDisassembly;
-import org.eclipse.tm.tcf.services.IDisassembly.DoneDisassemble;
-import org.eclipse.tm.tcf.services.IDisassembly.IDisassemblyLine;
-import org.eclipse.tm.tcf.services.IExpressions;
-import org.eclipse.tm.tcf.services.IExpressions.DoneCreate;
-import org.eclipse.tm.tcf.services.IExpressions.DoneDispose;
-import org.eclipse.tm.tcf.services.IExpressions.DoneEvaluate;
-import org.eclipse.tm.tcf.services.IExpressions.Expression;
-import org.eclipse.tm.tcf.services.IExpressions.Value;
-import org.eclipse.tm.tcf.services.ILineNumbers;
-import org.eclipse.tm.tcf.services.ILineNumbers.CodeArea;
-import org.eclipse.tm.tcf.services.ILineNumbers.DoneMapToSource;
-import org.eclipse.tm.tcf.services.IMemory;
-import org.eclipse.tm.tcf.services.IRunControl;
-import org.eclipse.tm.tcf.services.IRunControl.RunControlContext;
-import org.eclipse.tm.tcf.services.IRunControl.RunControlListener;
-import org.eclipse.tm.tcf.services.ISymbols;
-import org.eclipse.tm.tcf.util.TCFDataCache;
-import org.eclipse.tm.tcf.util.TCFTask;
+import org.eclipse.tcf.internal.cdt.ui.Activator;
+import org.eclipse.tcf.internal.debug.launch.TCFSourceLookupDirector;
+import org.eclipse.tcf.internal.debug.model.TCFContextState;
+import org.eclipse.tcf.internal.debug.model.TCFSourceRef;
+import org.eclipse.tcf.internal.debug.ui.model.TCFChildrenStackTrace;
+import org.eclipse.tcf.internal.debug.ui.model.TCFModel;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNode;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNodeExecContext;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNodeStackFrame;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IChannel.IChannelListener;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.JSON;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.services.IDisassembly;
+import org.eclipse.tcf.services.IDisassembly.DoneDisassemble;
+import org.eclipse.tcf.services.IDisassembly.IDisassemblyLine;
+import org.eclipse.tcf.services.IExpressions;
+import org.eclipse.tcf.services.IExpressions.DoneCreate;
+import org.eclipse.tcf.services.IExpressions.DoneDispose;
+import org.eclipse.tcf.services.IExpressions.DoneEvaluate;
+import org.eclipse.tcf.services.IExpressions.Expression;
+import org.eclipse.tcf.services.IExpressions.Value;
+import org.eclipse.tcf.services.ILineNumbers;
+import org.eclipse.tcf.services.ILineNumbers.CodeArea;
+import org.eclipse.tcf.services.ILineNumbers.DoneMapToSource;
+import org.eclipse.tcf.services.IMemory;
+import org.eclipse.tcf.services.IRunControl;
+import org.eclipse.tcf.services.IRunControl.RunControlContext;
+import org.eclipse.tcf.services.IRunControl.RunControlListener;
+import org.eclipse.tcf.services.ISymbols;
+import org.eclipse.tcf.util.TCFDataCache;
+import org.eclipse.tcf.util.TCFTask;
import org.eclipse.ui.PlatformUI;
@SuppressWarnings("restriction")
@@ -942,7 +942,7 @@ public class TCFDisassemblyBackend extends AbstractDisassemblyBackend {
public Object insertSource(Position pos, BigInteger address, String file, int lineNumber) {
TCFNodeExecContext execContext = fExecContext;
if (execContext == null) return null;
- return TCFSourceLookupDirector.lookup(execContext.getModel().getLaunch().getSourceLocator(), file);
+ return TCFSourceLookupDirector.lookup(execContext.getModel().getLaunch(), file);
}
private static BigInteger toBigInteger(byte[] data, boolean big_endian, boolean sign_extension) {
diff --git a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/disassembly/TCFDisassemblyBackendFactory.java b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/disassembly/TCFDisassemblyBackendFactory.java
index d052b3d2f..67976947e 100644
--- a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/disassembly/TCFDisassemblyBackendFactory.java
+++ b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/disassembly/TCFDisassemblyBackendFactory.java
@@ -8,11 +8,11 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.cdt.ui.disassembly;
+package org.eclipse.tcf.internal.cdt.ui.disassembly;
import org.eclipse.cdt.debug.internal.ui.disassembly.dsf.IDisassemblyBackend;
import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNode;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNode;
@SuppressWarnings({"restriction", "rawtypes"})
public class TCFDisassemblyBackendFactory implements IAdapterFactory {
diff --git a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/hover/ExpressionInformationControlCreator.java b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/hover/ExpressionInformationControlCreator.java
index 8dec7a92f..fcf00370c 100644
--- a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/hover/ExpressionInformationControlCreator.java
+++ b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/hover/ExpressionInformationControlCreator.java
@@ -10,7 +10,7 @@
* Wind River Systems - adapted for DSF
* Wind River Systems - adapted for TCF
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.cdt.ui.hover;
+package org.eclipse.tcf.internal.cdt.ui.hover;
import org.eclipse.debug.internal.ui.SWTFactory;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
@@ -47,8 +47,8 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Layout;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Tree;
-import org.eclipse.tm.internal.tcf.cdt.ui.Activator;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFModel;
+import org.eclipse.tcf.internal.cdt.ui.Activator;
+import org.eclipse.tcf.internal.debug.ui.model.TCFModel;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchPartSite;
diff --git a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/hover/TCFDebugTextHover.java b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/hover/TCFDebugTextHover.java
index 7ffb5c80b..1d5268669 100644
--- a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/hover/TCFDebugTextHover.java
+++ b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/hover/TCFDebugTextHover.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.cdt.ui.hover;
+package org.eclipse.tcf.internal.cdt.ui.hover;
import java.math.BigInteger;
import java.util.Map;
@@ -22,22 +22,22 @@ import org.eclipse.jface.text.IRegion;
import org.eclipse.jface.text.ITextHoverExtension2;
import org.eclipse.jface.text.ITextViewer;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFChildren;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFChildrenStackTrace;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNode;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNodeExecContext;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNodeExpression;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNodeStackFrame;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.services.IExpressions;
-import org.eclipse.tm.tcf.services.IExpressions.DoneCreate;
-import org.eclipse.tm.tcf.services.IExpressions.DoneDispose;
-import org.eclipse.tm.tcf.services.IExpressions.DoneEvaluate;
-import org.eclipse.tm.tcf.services.IExpressions.Expression;
-import org.eclipse.tm.tcf.services.IExpressions.Value;
-import org.eclipse.tm.tcf.util.TCFDataCache;
-import org.eclipse.tm.tcf.util.TCFTask;
+import org.eclipse.tcf.internal.debug.ui.model.TCFChildren;
+import org.eclipse.tcf.internal.debug.ui.model.TCFChildrenStackTrace;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNode;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNodeExecContext;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNodeExpression;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNodeStackFrame;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.services.IExpressions;
+import org.eclipse.tcf.services.IExpressions.DoneCreate;
+import org.eclipse.tcf.services.IExpressions.DoneDispose;
+import org.eclipse.tcf.services.IExpressions.DoneEvaluate;
+import org.eclipse.tcf.services.IExpressions.Expression;
+import org.eclipse.tcf.services.IExpressions.Value;
+import org.eclipse.tcf.util.TCFDataCache;
+import org.eclipse.tcf.util.TCFTask;
/**
* TCF implementation of debug expression hover for the C/C++ Editor.
diff --git a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/launch/FileSystemBrowserControl.java b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/launch/FileSystemBrowserControl.java
index 24c06293a..e6ee9453a 100644
--- a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/launch/FileSystemBrowserControl.java
+++ b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/launch/FileSystemBrowserControl.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.cdt.ui.launch;
+package org.eclipse.tcf.internal.cdt.ui.launch;
import java.util.ArrayList;
import java.util.Arrays;
@@ -30,15 +30,15 @@ import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Tree;
import org.eclipse.swt.widgets.TreeItem;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IChannel.IChannelListener;
-import org.eclipse.tm.tcf.protocol.IPeer;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.tcf.services.IFileSystem;
-import org.eclipse.tm.tcf.services.IFileSystem.DirEntry;
-import org.eclipse.tm.tcf.services.IFileSystem.FileSystemException;
-import org.eclipse.tm.tcf.services.IFileSystem.IFileHandle;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IChannel.IChannelListener;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.services.IFileSystem;
+import org.eclipse.tcf.services.IFileSystem.DirEntry;
+import org.eclipse.tcf.services.IFileSystem.FileSystemException;
+import org.eclipse.tcf.services.IFileSystem.IFileHandle;
import org.eclipse.ui.ISharedImages;
import org.eclipse.ui.PlatformUI;
diff --git a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/launch/PeerListControl.java b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/launch/PeerListControl.java
index 3b5bf6e67..69174d524 100644
--- a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/launch/PeerListControl.java
+++ b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/launch/PeerListControl.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.cdt.ui.launch;
+package org.eclipse.tcf.internal.cdt.ui.launch;
import java.util.ArrayList;
import java.util.HashMap;
@@ -42,13 +42,13 @@ import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Tree;
import org.eclipse.swt.widgets.TreeColumn;
import org.eclipse.swt.widgets.TreeItem;
-import org.eclipse.tm.internal.tcf.cdt.ui.Activator;
-import org.eclipse.tm.internal.tcf.cdt.ui.ImageCache;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IChannel.IChannelListener;
-import org.eclipse.tm.tcf.protocol.IPeer;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.tcf.services.ILocator;
+import org.eclipse.tcf.internal.cdt.ui.Activator;
+import org.eclipse.tcf.internal.cdt.ui.ImageCache;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IChannel.IChannelListener;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.services.ILocator;
// Cloned from TCFTargetTab
public class PeerListControl implements ISelectionProvider {
diff --git a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/launch/ProcessListControl.java b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/launch/ProcessListControl.java
index c452c31b9..616329d6c 100644
--- a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/launch/ProcessListControl.java
+++ b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/launch/ProcessListControl.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.cdt.ui.launch;
+package org.eclipse.tcf.internal.cdt.ui.launch;
import java.util.ArrayList;
import java.util.HashSet;
@@ -32,13 +32,13 @@ import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Tree;
import org.eclipse.swt.widgets.TreeItem;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IChannel.IChannelListener;
-import org.eclipse.tm.tcf.protocol.IPeer;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.tcf.services.IProcesses;
-import org.eclipse.tm.tcf.services.IProcesses.ProcessContext;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IChannel.IChannelListener;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.services.IProcesses;
+import org.eclipse.tcf.services.IProcesses.ProcessContext;
public class ProcessListControl {
diff --git a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/launch/ProcessPrompter.java b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/launch/ProcessPrompter.java
index c31fda488..4a0fa0294 100644
--- a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/launch/ProcessPrompter.java
+++ b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/launch/ProcessPrompter.java
@@ -8,15 +8,15 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.cdt.ui.launch;
+package org.eclipse.tcf.internal.cdt.ui.launch;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.IStatusHandler;
import org.eclipse.jface.window.Window;
-import org.eclipse.tm.internal.tcf.cdt.launch.ContextSelection;
-import org.eclipse.tm.internal.tcf.debug.launch.TCFLaunchDelegate;
+import org.eclipse.tcf.internal.cdt.launch.ContextSelection;
+import org.eclipse.tcf.internal.debug.launch.TCFLaunchDelegate;
import org.eclipse.ui.PlatformUI;
public class ProcessPrompter implements IStatusHandler {
diff --git a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/launch/ProcessSelectionDialog.java b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/launch/ProcessSelectionDialog.java
index 3dfe739f6..15fa82bad 100644
--- a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/launch/ProcessSelectionDialog.java
+++ b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/launch/ProcessSelectionDialog.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.cdt.ui.launch;
+package org.eclipse.tcf.internal.cdt.ui.launch;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.IDialogConstants;
@@ -25,9 +25,9 @@ import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.TreeItem;
-import org.eclipse.tm.internal.tcf.cdt.launch.ContextSelection;
-import org.eclipse.tm.internal.tcf.cdt.ui.launch.PeerListControl.PeerInfo;
-import org.eclipse.tm.internal.tcf.cdt.ui.launch.ProcessListControl.ProcessInfo;
+import org.eclipse.tcf.internal.cdt.launch.ContextSelection;
+import org.eclipse.tcf.internal.cdt.ui.launch.PeerListControl.PeerInfo;
+import org.eclipse.tcf.internal.cdt.ui.launch.ProcessListControl.ProcessInfo;
/**
* Dialog to select a peer and context.
diff --git a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/launch/RemoteCMainTab.java b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/launch/RemoteCMainTab.java
index 85c1509a6..64f0cbda0 100644
--- a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/launch/RemoteCMainTab.java
+++ b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/launch/RemoteCMainTab.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.cdt.ui.launch;
+package org.eclipse.tcf.internal.cdt.ui.launch;
import org.eclipse.cdt.launch.ui.CMainTab;
import org.eclipse.core.resources.IProject;
@@ -37,13 +37,13 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
-import org.eclipse.tm.internal.tcf.cdt.ui.launch.PeerListControl.PeerInfo;
-import org.eclipse.tm.internal.tcf.debug.launch.TCFLaunchDelegate;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IChannel.IChannelListener;
-import org.eclipse.tm.tcf.services.IFileSystem;
-import org.eclipse.tm.tcf.services.IProcesses;
-import org.eclipse.tm.tcf.util.TCFTask;
+import org.eclipse.tcf.internal.cdt.ui.launch.PeerListControl.PeerInfo;
+import org.eclipse.tcf.internal.debug.launch.TCFLaunchDelegate;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IChannel.IChannelListener;
+import org.eclipse.tcf.services.IFileSystem;
+import org.eclipse.tcf.services.IProcesses;
+import org.eclipse.tcf.util.TCFTask;
import org.eclipse.ui.PlatformUI;
public class RemoteCMainTab extends CMainTab implements IShellProvider {
@@ -101,7 +101,7 @@ public class RemoteCMainTab extends CMainTab implements IShellProvider {
.getWorkbench()
.getHelpSystem()
.setHelp(getControl(),
- "org.eclipse.tm.tcf.cdt.ui.remoteApplicationLaunchGroup"); //$NON-NLS-1$
+ "org.eclipse.tcf.cdt.ui.remoteApplicationLaunchGroup"); //$NON-NLS-1$
}
private void createPeerListGroup(Composite comp) {
diff --git a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/launch/RemoteFileSelectionDialog.java b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/launch/RemoteFileSelectionDialog.java
index 72ef8e338..23af441d2 100644
--- a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/launch/RemoteFileSelectionDialog.java
+++ b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/launch/RemoteFileSelectionDialog.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.cdt.ui.launch;
+package org.eclipse.tcf.internal.cdt.ui.launch;
import org.eclipse.core.runtime.Path;
import org.eclipse.jface.dialogs.Dialog;
@@ -27,8 +27,8 @@ import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
import org.eclipse.swt.widgets.TreeItem;
-import org.eclipse.tm.internal.tcf.cdt.ui.launch.FileSystemBrowserControl.FileInfo;
-import org.eclipse.tm.tcf.protocol.IPeer;
+import org.eclipse.tcf.internal.cdt.ui.launch.FileSystemBrowserControl.FileInfo;
+import org.eclipse.tcf.protocol.IPeer;
/**
* Dialog to select a remote file.
diff --git a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/sourcelookup/TCFCSourceNotFoundEditor.java b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/sourcelookup/TCFCSourceNotFoundEditor.java
index c287029a5..12d7769c6 100644
--- a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/sourcelookup/TCFCSourceNotFoundEditor.java
+++ b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/sourcelookup/TCFCSourceNotFoundEditor.java
@@ -8,16 +8,16 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.cdt.ui.sourcelookup;
+package org.eclipse.tcf.internal.cdt.ui.sourcelookup;
import org.eclipse.cdt.debug.core.model.ISteppingModeTarget;
import org.eclipse.cdt.debug.internal.ui.sourcelookup.CSourceNotFoundEditor;
import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.ILaunch;
import org.eclipse.debug.core.ILaunchesListener2;
-import org.eclipse.tm.internal.tcf.cdt.ui.sourcelookup.TCFSourceNotFoundPresentation.TCFCSourceNotFoundEditorInput;
-import org.eclipse.tm.internal.tcf.cdt.ui.sourcelookup.TCFSourceNotFoundPresentation.TCFCSourceNotFoundElement;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFModel;
+import org.eclipse.tcf.internal.cdt.ui.sourcelookup.TCFSourceNotFoundPresentation.TCFCSourceNotFoundEditorInput;
+import org.eclipse.tcf.internal.cdt.ui.sourcelookup.TCFSourceNotFoundPresentation.TCFCSourceNotFoundElement;
+import org.eclipse.tcf.internal.debug.ui.model.TCFModel;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IWorkbenchPage;
@@ -28,7 +28,7 @@ import org.eclipse.ui.IWorkbenchPage;
@SuppressWarnings("restriction")
public class TCFCSourceNotFoundEditor extends CSourceNotFoundEditor {
- static final String ID = "org.eclipse.tm.tcf.cdt.ui.source_not_found_editor";
+ static final String ID = "org.eclipse.tcf.cdt.ui.source_not_found_editor";
private class LaunchListener implements ILaunchesListener2 {
public void launchesRemoved(ILaunch[] launches) {
diff --git a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/sourcelookup/TCFSourceNotFoundPresentation.java b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/sourcelookup/TCFSourceNotFoundPresentation.java
index bd8dfaa29..3333587fc 100644
--- a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/sourcelookup/TCFSourceNotFoundPresentation.java
+++ b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/sourcelookup/TCFSourceNotFoundPresentation.java
@@ -8,14 +8,14 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.cdt.ui.sourcelookup;
+package org.eclipse.tcf.internal.cdt.ui.sourcelookup;
import org.eclipse.cdt.debug.internal.core.sourcelookup.CSourceNotFoundElement;
import org.eclipse.cdt.debug.internal.ui.sourcelookup.CSourceNotFoundEditorInput;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.tm.internal.tcf.debug.ui.model.ISourceNotFoundPresentation;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFModel;
+import org.eclipse.tcf.internal.debug.ui.model.ISourceNotFoundPresentation;
+import org.eclipse.tcf.internal.debug.ui.model.TCFModel;
import org.eclipse.ui.IEditorInput;
/**
diff --git a/plugins/org.eclipse.tm.tcf.core/.classpath b/plugins/org.eclipse.tcf.core/.classpath
index 937d4a354..937d4a354 100644
--- a/plugins/org.eclipse.tm.tcf.core/.classpath
+++ b/plugins/org.eclipse.tcf.core/.classpath
diff --git a/plugins/org.eclipse.tm.tcf.core/.project b/plugins/org.eclipse.tcf.core/.project
index 3e1ef026c..97061f3d2 100644
--- a/plugins/org.eclipse.tm.tcf.core/.project
+++ b/plugins/org.eclipse.tcf.core/.project
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.eclipse.tm.tcf.core</name>
+ <name>org.eclipse.tcf.core</name>
<comment></comment>
<projects>
</projects>
diff --git a/plugins/org.eclipse.tm.tcf.core/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.tcf.core/.settings/org.eclipse.jdt.core.prefs
index 1824e2ce1..1824e2ce1 100644
--- a/plugins/org.eclipse.tm.tcf.core/.settings/org.eclipse.jdt.core.prefs
+++ b/plugins/org.eclipse.tcf.core/.settings/org.eclipse.jdt.core.prefs
diff --git a/plugins/org.eclipse.tm.tcf.core/.settings/org.eclipse.jdt.ui.prefs b/plugins/org.eclipse.tcf.core/.settings/org.eclipse.jdt.ui.prefs
index 07018402e..07018402e 100644
--- a/plugins/org.eclipse.tm.tcf.core/.settings/org.eclipse.jdt.ui.prefs
+++ b/plugins/org.eclipse.tcf.core/.settings/org.eclipse.jdt.ui.prefs
diff --git a/plugins/org.eclipse.tcf.core/META-INF/MANIFEST.MF b/plugins/org.eclipse.tcf.core/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..0a1dca0db
--- /dev/null
+++ b/plugins/org.eclipse.tcf.core/META-INF/MANIFEST.MF
@@ -0,0 +1,18 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-Vendor: %providerName
+Bundle-SymbolicName: org.eclipse.tcf.core;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-ActivationPolicy: lazy
+Eclipse-LazyStart: true
+Bundle-Activator: org.eclipse.tcf.internal.Activator
+Import-Package: org.osgi.framework,
+ org.osgi.service.packageadmin,
+ org.osgi.util.tracker
+Export-Package: org.eclipse.tcf.core;version="1.0.0",
+ org.eclipse.tcf.protocol;version="1.0.0",
+ org.eclipse.tcf.services;version="1.0.0",
+ org.eclipse.tcf.util;version="1.0.0"
diff --git a/plugins/org.eclipse.tm.tcf.core/about.html b/plugins/org.eclipse.tcf.core/about.html
index 6c5b3615b..6c5b3615b 100644
--- a/plugins/org.eclipse.tm.tcf.core/about.html
+++ b/plugins/org.eclipse.tcf.core/about.html
diff --git a/plugins/org.eclipse.tm.tcf.core/activator/org/eclipse/tm/internal/tcf/Activator.java b/plugins/org.eclipse.tcf.core/activator/org/eclipse/tcf/internal/Activator.java
index 283d1c99c..f2a36ce94 100644
--- a/plugins/org.eclipse.tm.tcf.core/activator/org/eclipse/tm/internal/tcf/Activator.java
+++ b/plugins/org.eclipse.tcf.core/activator/org/eclipse/tcf/internal/Activator.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf;
+package org.eclipse.tcf.internal;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleActivator;
@@ -18,11 +18,11 @@ import org.osgi.util.tracker.ServiceTracker;
public class Activator implements BundleActivator {
- private static final String TCF_INTEGRATION_BUNDLE_ID = "org.eclipse.tm.tcf";
+ private static final String TCF_INTEGRATION_BUNDLE_ID = "org.eclipse.tcf";
public void start(BundleContext context) throws Exception {
/*
- * Activate TCF Eclipse integration bundle "org.eclipse.tm.tcf".
+ * Activate TCF Eclipse integration bundle "org.eclipse.tcf".
* It must be activated explicitly, because default activation through
* class loading may never happen - most client don't need classes from that bundle.
*/
diff --git a/plugins/org.eclipse.tm.tcf.core/build.properties b/plugins/org.eclipse.tcf.core/build.properties
index 20a4a6db3..20a4a6db3 100644
--- a/plugins/org.eclipse.tm.tcf.core/build.properties
+++ b/plugins/org.eclipse.tcf.core/build.properties
diff --git a/plugins/org.eclipse.tm.tcf/plugin.properties b/plugins/org.eclipse.tcf.core/plugin.properties
index c1bcc6bde..c165caf84 100644
--- a/plugins/org.eclipse.tm.tcf/plugin.properties
+++ b/plugins/org.eclipse.tcf.core/plugin.properties
@@ -8,6 +8,6 @@
# Contributors:
# Wind River Systems - initial implementation
###############################################################################
-pluginName = Target Communication Framework (TCF) (Incubation)
+pluginName = Target Communication Framework (TCF) Core
providerName = Eclipse CDT
diff --git a/plugins/org.eclipse.tm.tcf.core/pom.xml b/plugins/org.eclipse.tcf.core/pom.xml
index b9fdf8d87..1d70df0de 100644
--- a/plugins/org.eclipse.tm.tcf.core/pom.xml
+++ b/plugins/org.eclipse.tcf.core/pom.xml
@@ -7,11 +7,11 @@
<parent>
<groupId>org.eclipse.tcf</groupId>
<artifactId>tcf-parent</artifactId>
- <version>0.5.0-SNAPSHOT</version>
+ <version>1.0.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
- <version>0.5.0-SNAPSHOT</version>
- <artifactId>org.eclipse.tm.tcf.core</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <artifactId>org.eclipse.tcf.core</artifactId>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/AbstractChannel.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/core/AbstractChannel.java
index ff1db8746..4d982807e 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/AbstractChannel.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/core/AbstractChannel.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.tcf.core;
+package org.eclipse.tcf.core;
import java.io.IOException;
import java.util.ArrayList;
@@ -17,19 +17,19 @@ import java.util.HashMap;
import java.util.LinkedList;
import java.util.Map;
-import org.eclipse.tm.internal.tcf.core.ServiceManager;
-import org.eclipse.tm.internal.tcf.core.Token;
-import org.eclipse.tm.internal.tcf.core.TransportManager;
-import org.eclipse.tm.internal.tcf.services.local.LocatorService;
-import org.eclipse.tm.internal.tcf.services.remote.GenericProxy;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IErrorReport;
-import org.eclipse.tm.tcf.protocol.IPeer;
-import org.eclipse.tm.tcf.protocol.IService;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.protocol.JSON;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.tcf.services.ILocator;
+import org.eclipse.tcf.internal.core.ServiceManager;
+import org.eclipse.tcf.internal.core.Token;
+import org.eclipse.tcf.internal.core.TransportManager;
+import org.eclipse.tcf.internal.services.local.LocatorService;
+import org.eclipse.tcf.internal.services.remote.GenericProxy;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IErrorReport;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.protocol.IService;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.JSON;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.services.ILocator;
/**
* Abstract implementation of IChannel interface.
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/AbstractPeer.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/core/AbstractPeer.java
index 4bb0c16dc..0bec71205 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/AbstractPeer.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/core/AbstractPeer.java
@@ -8,19 +8,19 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.tcf.core;
+package org.eclipse.tcf.core;
import java.io.IOException;
import java.util.Iterator;
import java.util.Map;
-import org.eclipse.tm.internal.tcf.core.RemotePeer;
-import org.eclipse.tm.internal.tcf.services.local.LocatorService;
-import org.eclipse.tm.tcf.protocol.IPeer;
-import org.eclipse.tm.tcf.protocol.JSON;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.tcf.services.ILocator;
-import org.eclipse.tm.tcf.services.ILocator.LocatorListener;
+import org.eclipse.tcf.internal.core.RemotePeer;
+import org.eclipse.tcf.internal.services.local.LocatorService;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.protocol.JSON;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.services.ILocator;
+import org.eclipse.tcf.services.ILocator.LocatorListener;
/**
* Abstract implementation of IPeer interface.
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/Base64.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/core/Base64.java
index 8821adea2..c924e894e 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/Base64.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/core/Base64.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.tcf.core;
+package org.eclipse.tcf.core;
/**
* Methods for translating Base64 encoded strings to byte arrays and back.
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/ChannelPIPE.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/core/ChannelPIPE.java
index fc1f21b69..46e01f2dc 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/ChannelPIPE.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/core/ChannelPIPE.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.tcf.core;
+package org.eclipse.tcf.core;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
@@ -18,8 +18,8 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
-import org.eclipse.tm.tcf.protocol.IPeer;
-import org.eclipse.tm.tcf.protocol.Protocol;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.protocol.Protocol;
/**
* ChannelPIPE is a IChannel implementation that works on top of named pipes as a transport.
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/ChannelTCP.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/core/ChannelTCP.java
index a9dcbfdd3..e062304ee 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/ChannelTCP.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/core/ChannelTCP.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.tcf.core;
+package org.eclipse.tcf.core;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
@@ -22,8 +22,8 @@ import java.net.SocketException;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLSocket;
-import org.eclipse.tm.tcf.protocol.IPeer;
-import org.eclipse.tm.tcf.protocol.Protocol;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.protocol.Protocol;
/**
* ChannelTCP is a IChannel implementation that works on top of TCP sockets as a transport.
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/Command.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/core/Command.java
index ea549b93f..711d60c3f 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/Command.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/core/Command.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.tcf.core;
+package org.eclipse.tcf.core;
import java.io.IOException;
import java.text.MessageFormat;
@@ -17,13 +17,13 @@ import java.util.Collection;
import java.util.Date;
import java.util.Map;
-import org.eclipse.tm.internal.tcf.core.Token;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IErrorReport;
-import org.eclipse.tm.tcf.protocol.IService;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.protocol.JSON;
-import org.eclipse.tm.tcf.protocol.Protocol;
+import org.eclipse.tcf.internal.core.Token;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IErrorReport;
+import org.eclipse.tcf.protocol.IService;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.JSON;
+import org.eclipse.tcf.protocol.Protocol;
/**
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/ErrorReport.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/core/ErrorReport.java
index d2054ad0e..0b51122b4 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/ErrorReport.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/core/ErrorReport.java
@@ -8,12 +8,12 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.tcf.core;
+package org.eclipse.tcf.core;
import java.util.HashMap;
import java.util.Map;
-import org.eclipse.tm.tcf.protocol.IErrorReport;
+import org.eclipse.tcf.protocol.IErrorReport;
public class ErrorReport extends Exception implements IErrorReport {
@@ -63,4 +63,4 @@ public class ErrorReport extends Exception implements IErrorReport {
public Map<String, Object> getAttributes() {
return attrs;
}
-} \ No newline at end of file
+}
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/ServerTCP.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/core/ServerTCP.java
index 4700c0cd5..24bb35ae2 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/ServerTCP.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/core/ServerTCP.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.tcf.core;
+package org.eclipse.tcf.core;
import java.io.IOException;
import java.io.InterruptedIOException;
@@ -22,9 +22,9 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import org.eclipse.tm.internal.tcf.core.ServiceManager;
-import org.eclipse.tm.tcf.protocol.IPeer;
-import org.eclipse.tm.tcf.protocol.Protocol;
+import org.eclipse.tcf.internal.core.ServiceManager;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.protocol.Protocol;
/**
* ServerTCP is a TCP server that is listening for incoming connection requests
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/StreamChannel.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/core/StreamChannel.java
index 841e53fc6..25ecf792e 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/StreamChannel.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/core/StreamChannel.java
@@ -8,11 +8,11 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.tcf.core;
+package org.eclipse.tcf.core;
import java.io.IOException;
-import org.eclipse.tm.tcf.protocol.IPeer;
+import org.eclipse.tcf.protocol.IPeer;
/**
* Abstract implementation of IChannel interface for stream oriented transport protocols.
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/TransientPeer.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/core/TransientPeer.java
index 44683c012..7087fe6b8 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/TransientPeer.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/core/TransientPeer.java
@@ -8,16 +8,16 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.tcf.core;
+package org.eclipse.tcf.core;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
-import org.eclipse.tm.internal.tcf.core.TransportManager;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IPeer;
-import org.eclipse.tm.tcf.protocol.Protocol;
+import org.eclipse.tcf.internal.core.TransportManager;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.protocol.Protocol;
/**
* Transient implementation of IPeer interface.
@@ -60,6 +60,10 @@ public class TransientPeer implements IPeer {
return ro_attrs.get(ATTR_OS_NAME);
}
+ public String getUserName() {
+ return ro_attrs.get(ATTR_USER_NAME);
+ }
+
public String getTransportName() {
return ro_attrs.get(ATTR_TRANSPORT_NAME);
}
@@ -67,4 +71,4 @@ public class TransientPeer implements IPeer {
public IChannel openChannel() {
return TransportManager.openChannel(this);
}
-} \ No newline at end of file
+}
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/ChannelLoop.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/core/ChannelLoop.java
index 3b6f50db2..7d686ed06 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/ChannelLoop.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/core/ChannelLoop.java
@@ -8,13 +8,13 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.core;
+package org.eclipse.tcf.internal.core;
import java.io.IOException;
import java.io.InterruptedIOException;
-import org.eclipse.tm.tcf.core.StreamChannel;
-import org.eclipse.tm.tcf.protocol.IPeer;
+import org.eclipse.tcf.core.StreamChannel;
+import org.eclipse.tcf.protocol.IPeer;
public class ChannelLoop extends StreamChannel {
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/LocalPeer.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/core/LocalPeer.java
index d2d4e41ba..0ba2d872e 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/LocalPeer.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/core/LocalPeer.java
@@ -8,14 +8,14 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.core;
+package org.eclipse.tcf.internal.core;
import java.util.HashMap;
import java.util.Map;
-import org.eclipse.tm.tcf.core.TransientPeer;
-import org.eclipse.tm.tcf.protocol.IPeer;
-import org.eclipse.tm.tcf.protocol.Protocol;
+import org.eclipse.tcf.core.TransientPeer;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.protocol.Protocol;
/**
* LocalPeer object represents local end-point of TCF communication channel.
@@ -40,4 +40,4 @@ public class LocalPeer extends TransientPeer {
public LocalPeer() {
super(createAttributes());
}
-} \ No newline at end of file
+}
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/LoggingUtil.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/core/LoggingUtil.java
index e8c050ce7..ceca2a146 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/LoggingUtil.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/core/LoggingUtil.java
@@ -8,11 +8,11 @@
* Contributors:
* Freescale Semiconductor - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.core;
+package org.eclipse.tcf.internal.core;
import java.text.DecimalFormatSymbols;
-import org.eclipse.tm.tcf.protocol.Protocol;
+import org.eclipse.tcf.protocol.Protocol;
/**
* Internal utility methods used for logging/tracing.
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/RemotePeer.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/core/RemotePeer.java
index 3ff1d78f7..2c9390521 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/RemotePeer.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/core/RemotePeer.java
@@ -8,11 +8,11 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.core;
+package org.eclipse.tcf.internal.core;
import java.util.Map;
-import org.eclipse.tm.tcf.core.AbstractPeer;
+import org.eclipse.tcf.core.AbstractPeer;
/**
* RemotePeer objects represent TCF agents that Locator service discovered on local network.
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/ServiceManager.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/core/ServiceManager.java
index e0eb9f8a8..1fa89074e 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/ServiceManager.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/core/ServiceManager.java
@@ -8,19 +8,19 @@
* Contributors:
* Anyware Technologies - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.core;
+package org.eclipse.tcf.internal.core;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Map;
-import org.eclipse.tm.internal.tcf.services.local.DiagnosticsService;
-import org.eclipse.tm.internal.tcf.services.remote.GenericProxy;
-import org.eclipse.tm.internal.tcf.services.remote.LocatorProxy;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IService;
-import org.eclipse.tm.tcf.protocol.IServiceProvider;
-import org.eclipse.tm.tcf.protocol.Protocol;
+import org.eclipse.tcf.internal.services.local.DiagnosticsService;
+import org.eclipse.tcf.internal.services.remote.GenericProxy;
+import org.eclipse.tcf.internal.services.remote.LocatorProxy;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IService;
+import org.eclipse.tcf.protocol.IServiceProvider;
+import org.eclipse.tcf.protocol.Protocol;
public class ServiceManager {
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/Token.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/core/Token.java
index 0ae46024d..bb2571f6b 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/Token.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/core/Token.java
@@ -8,12 +8,12 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.core;
+package org.eclipse.tcf.internal.core;
import java.io.UnsupportedEncodingException;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IToken;
public class Token implements IToken {
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/TransportManager.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/core/TransportManager.java
index 58ed4a497..5c0775940 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/TransportManager.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/core/TransportManager.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.core;
+package org.eclipse.tcf.internal.core;
import java.util.Collection;
import java.util.HashMap;
@@ -17,16 +17,16 @@ import java.util.LinkedList;
import java.util.Map;
import java.util.Set;
-import org.eclipse.tm.tcf.core.AbstractChannel;
-import org.eclipse.tm.tcf.core.ChannelPIPE;
-import org.eclipse.tm.tcf.core.ChannelTCP;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IPeer;
-import org.eclipse.tm.tcf.protocol.IService;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.protocol.ITransportProvider;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.tcf.services.ILocator;
+import org.eclipse.tcf.core.AbstractChannel;
+import org.eclipse.tcf.core.ChannelPIPE;
+import org.eclipse.tcf.core.ChannelTCP;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.protocol.IService;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.ITransportProvider;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.services.ILocator;
public class TransportManager {
@@ -175,7 +175,7 @@ public class TransportManager {
* Transmit TCF event message.
* The message is sent to all open communication channels – broadcasted.
*
- * This is internal API, TCF clients should use {@code org.eclipse.tm.tcf.protocol.Protocol}.
+ * This is internal API, TCF clients should use {@code org.eclipse.tcf.protocol.Protocol}.
*/
public static void sendEvent(String service_name, String event_name, byte[] data) {
for (AbstractChannel c : channels) {
@@ -198,7 +198,7 @@ public class TransportManager {
* @param done will be executed by dispatch thread after communication
* messages are delivered to corresponding targets.
*
- * This is internal API, TCF clients should use {@code org.eclipse.tm.tcf.protocol.Protocol}.
+ * This is internal API, TCF clients should use {@code org.eclipse.tcf.protocol.Protocol}.
*/
public static void sync(final Runnable done) {
final Set<IToken> set = new HashSet<IToken>();
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/local/ChannelProxy.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/local/ChannelProxy.java
index 9fc1444dd..68dbf46eb 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/local/ChannelProxy.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/local/ChannelProxy.java
@@ -8,17 +8,17 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.services.local;
+package org.eclipse.tcf.internal.services.local;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
-import org.eclipse.tm.internal.tcf.core.ChannelLoop;
-import org.eclipse.tm.tcf.core.AbstractChannel;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IService;
-import org.eclipse.tm.tcf.protocol.IToken;
+import org.eclipse.tcf.internal.core.ChannelLoop;
+import org.eclipse.tcf.core.AbstractChannel;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IService;
+import org.eclipse.tcf.protocol.IToken;
/**
* ChannelProxy implements forwarding of TCF messages between two channels.
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/local/DiagnosticsService.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/local/DiagnosticsService.java
index 8fd6869c9..2bcaaaf43 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/local/DiagnosticsService.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/local/DiagnosticsService.java
@@ -8,19 +8,19 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.services.local;
+package org.eclipse.tcf.internal.services.local;
import java.math.BigDecimal;
import java.util.Map;
-import org.eclipse.tm.internal.tcf.core.Token;
-import org.eclipse.tm.tcf.core.Command;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IErrorReport;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.protocol.JSON;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.tcf.services.IDiagnostics;
+import org.eclipse.tcf.internal.core.Token;
+import org.eclipse.tcf.core.Command;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IErrorReport;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.JSON;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.services.IDiagnostics;
public class DiagnosticsService implements IDiagnostics {
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/local/LocatorService.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/local/LocatorService.java
index 9ec7b7167..7242e4e98 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/local/LocatorService.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/local/LocatorService.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.services.local;
+package org.eclipse.tcf.internal.services.local;
import java.io.BufferedReader;
import java.io.IOException;
@@ -34,20 +34,20 @@ import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
-import org.eclipse.tm.internal.tcf.core.LocalPeer;
-import org.eclipse.tm.internal.tcf.core.LoggingUtil;
-import org.eclipse.tm.internal.tcf.core.RemotePeer;
-import org.eclipse.tm.internal.tcf.core.ServiceManager;
-import org.eclipse.tm.tcf.core.AbstractChannel;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IErrorReport;
-import org.eclipse.tm.tcf.protocol.IPeer;
-import org.eclipse.tm.tcf.protocol.IService;
-import org.eclipse.tm.tcf.protocol.IServiceProvider;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.protocol.JSON;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.tcf.services.ILocator;
+import org.eclipse.tcf.internal.core.LocalPeer;
+import org.eclipse.tcf.internal.core.LoggingUtil;
+import org.eclipse.tcf.internal.core.RemotePeer;
+import org.eclipse.tcf.internal.core.ServiceManager;
+import org.eclipse.tcf.core.AbstractChannel;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IErrorReport;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.protocol.IService;
+import org.eclipse.tcf.protocol.IServiceProvider;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.JSON;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.services.ILocator;
/**
@@ -77,7 +77,7 @@ public class LocatorService implements ILocator {
/**
* Flag indicating whether tracing of the discovery activity is enabled.
*/
- private static boolean TRACE_DISCOVERY = System.getProperty("org.eclipse.tm.tcf.core.tracing.discovery") != null;
+ private static boolean TRACE_DISCOVERY = System.getProperty("org.eclipse.tcf.core.tracing.discovery") != null;
private static class SubNet {
final int prefix_length;
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/BreakpointsProxy.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/BreakpointsProxy.java
index 9636a81c4..50d1e252b 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/BreakpointsProxy.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/BreakpointsProxy.java
@@ -8,18 +8,18 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.services.remote;
+package org.eclipse.tcf.internal.services.remote;
import java.io.IOException;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
-import org.eclipse.tm.tcf.core.Command;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.protocol.JSON;
-import org.eclipse.tm.tcf.services.IBreakpoints;
+import org.eclipse.tcf.core.Command;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.JSON;
+import org.eclipse.tcf.services.IBreakpoints;
public class BreakpointsProxy implements IBreakpoints {
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/DiagnosticsProxy.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/DiagnosticsProxy.java
index a5dbdaca2..ab78ab8d5 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/DiagnosticsProxy.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/DiagnosticsProxy.java
@@ -8,18 +8,18 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.services.remote;
+package org.eclipse.tcf.internal.services.remote;
import java.math.BigDecimal;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
-import org.eclipse.tm.tcf.core.Command;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IErrorReport;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.services.IDiagnostics;
+import org.eclipse.tcf.core.Command;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IErrorReport;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.services.IDiagnostics;
public class DiagnosticsProxy implements IDiagnostics {
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/DisassemblyProxy.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/DisassemblyProxy.java
index 64a0956b7..40368a82b 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/DisassemblyProxy.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/DisassemblyProxy.java
@@ -8,15 +8,15 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.services.remote;
+package org.eclipse.tcf.internal.services.remote;
import java.util.Collection;
import java.util.Map;
-import org.eclipse.tm.tcf.core.Command;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.services.IDisassembly;
+import org.eclipse.tcf.core.Command;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.services.IDisassembly;
public class DisassemblyProxy implements IDisassembly {
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/ExpressionsProxy.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/ExpressionsProxy.java
index 1289958d1..22c539ae1 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/ExpressionsProxy.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/ExpressionsProxy.java
@@ -8,19 +8,19 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.services.remote;
+package org.eclipse.tcf.internal.services.remote;
import java.io.IOException;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
-import org.eclipse.tm.tcf.core.Command;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.protocol.JSON;
-import org.eclipse.tm.tcf.services.IExpressions;
-import org.eclipse.tm.tcf.services.ISymbols.TypeClass;;
+import org.eclipse.tcf.core.Command;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.JSON;
+import org.eclipse.tcf.services.IExpressions;
+import org.eclipse.tcf.services.ISymbols.TypeClass;
public class ExpressionsProxy implements IExpressions {
@@ -110,6 +110,10 @@ public class ExpressionsProxy implements IExpressions {
return (String)props.get(VAL_REGISTER);
}
+ public String getSymbolID() {
+ return (String)props.get(VAL_SYMBOL);
+ }
+
public Number getAddress() {
return (Number)props.get(VAL_ADDRESS);
}
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/FileSystemProxy.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/FileSystemProxy.java
index 182d32378..5154bdabc 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/FileSystemProxy.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/FileSystemProxy.java
@@ -8,18 +8,18 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.services.remote;
+package org.eclipse.tcf.internal.services.remote;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
-import org.eclipse.tm.tcf.core.Command;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IErrorReport;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.protocol.JSON;
-import org.eclipse.tm.tcf.services.IFileSystem;
+import org.eclipse.tcf.core.Command;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IErrorReport;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.JSON;
+import org.eclipse.tcf.services.IFileSystem;
public class FileSystemProxy implements IFileSystem {
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/GenericProxy.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/GenericProxy.java
index 2275c2301..ead55adcf 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/GenericProxy.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/GenericProxy.java
@@ -8,10 +8,10 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.services.remote;
+package org.eclipse.tcf.internal.services.remote;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IService;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IService;
/**
* Objects of GenericProxy class represent remote services, which don't
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/LineNumbersProxy.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/LineNumbersProxy.java
index 1f32b3e71..fef0e4391 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/LineNumbersProxy.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/LineNumbersProxy.java
@@ -8,15 +8,15 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.services.remote;
+package org.eclipse.tcf.internal.services.remote;
import java.util.Collection;
import java.util.Map;
-import org.eclipse.tm.tcf.core.Command;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.services.ILineNumbers;
+import org.eclipse.tcf.core.Command;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.services.ILineNumbers;
public class LineNumbersProxy implements ILineNumbers {
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/LocatorProxy.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/LocatorProxy.java
index d5be57e2c..17142b1e3 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/LocatorProxy.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/LocatorProxy.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.services.remote;
+package org.eclipse.tcf.internal.services.remote;
import java.io.IOException;
import java.util.ArrayList;
@@ -16,14 +16,14 @@ import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
-import org.eclipse.tm.tcf.core.Command;
-import org.eclipse.tm.tcf.core.TransientPeer;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IPeer;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.protocol.JSON;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.tcf.services.ILocator;
+import org.eclipse.tcf.core.Command;
+import org.eclipse.tcf.core.TransientPeer;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.JSON;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.services.ILocator;
public class LocatorProxy implements ILocator {
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/MemoryMapProxy.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/MemoryMapProxy.java
index bffea8091..b50207b76 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/MemoryMapProxy.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/MemoryMapProxy.java
@@ -8,18 +8,18 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.services.remote;
+package org.eclipse.tcf.internal.services.remote;
import java.io.IOException;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
-import org.eclipse.tm.tcf.core.Command;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.protocol.JSON;
-import org.eclipse.tm.tcf.services.IMemoryMap;
+import org.eclipse.tcf.core.Command;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.JSON;
+import org.eclipse.tcf.services.IMemoryMap;
public class MemoryMapProxy implements IMemoryMap {
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/MemoryProxy.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/MemoryProxy.java
index caeb32f71..9b1de8c2b 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/MemoryProxy.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/MemoryProxy.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.services.remote;
+package org.eclipse.tcf.internal.services.remote;
import java.io.IOException;
import java.math.BigInteger;
@@ -18,12 +18,12 @@ import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
-import org.eclipse.tm.tcf.core.Command;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IErrorReport;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.protocol.JSON;
-import org.eclipse.tm.tcf.services.IMemory;
+import org.eclipse.tcf.core.Command;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IErrorReport;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.JSON;
+import org.eclipse.tcf.services.IMemory;
public class MemoryProxy implements IMemory {
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/PathMapProxy.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/PathMapProxy.java
index de2465a9b..2557b4c3a 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/PathMapProxy.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/PathMapProxy.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2010 Wind River Systems, Inc. and others.
+ * Copyright (c) 2009, 2011 Wind River Systems, Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -8,21 +8,24 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.services.remote;
+package org.eclipse.tcf.internal.services.remote;
import java.io.IOException;
import java.util.Collection;
+import java.util.HashMap;
import java.util.Map;
-import org.eclipse.tm.tcf.core.Command;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.protocol.JSON;
-import org.eclipse.tm.tcf.services.IPathMap;
+import org.eclipse.tcf.core.Command;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.JSON;
+import org.eclipse.tcf.services.IPathMap;
public class PathMapProxy implements IPathMap {
private final IChannel channel;
+ private final Map<PathMapListener,IChannel.IEventListener> listeners =
+ new HashMap<PathMapListener,IChannel.IEventListener>();
private static class MapRule implements PathMapRule {
@@ -113,6 +116,34 @@ public class PathMapProxy implements IPathMap {
return new MapRule((Map<String,Object>)o);
}
+ public void addListener(final PathMapListener listener) {
+ IChannel.IEventListener l = new IChannel.IEventListener() {
+
+ public void event(String name, byte[] data) {
+ try {
+ Object[] args = JSON.parseSequence(data);
+ if (name.equals("changed")) {
+ assert args.length == 0;
+ listener.changed();
+ }
+ else {
+ throw new IOException("Path Map service: unknown event: " + name);
+ }
+ }
+ catch (Throwable x) {
+ channel.terminate(x);
+ }
+ }
+ };
+ channel.addEventListener(this, l);
+ listeners.put(listener, l);
+ }
+
+ public void removeListener(PathMapListener listener) {
+ IChannel.IEventListener l = listeners.remove(listener);
+ if (l != null) channel.removeEventListener(this, l);
+ }
+
static {
JSON.addObjectWriter(PathMapRule.class, new JSON.ObjectWriter<PathMapRule>() {
public void write(PathMapRule r) throws IOException {
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/ProcessesProxy.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/ProcessesProxy.java
index c5d95349e..d68491db3 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/ProcessesProxy.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/ProcessesProxy.java
@@ -8,18 +8,18 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.services.remote;
+package org.eclipse.tcf.internal.services.remote;
import java.io.IOException;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
-import org.eclipse.tm.tcf.core.Command;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.protocol.JSON;
-import org.eclipse.tm.tcf.services.IProcesses;
+import org.eclipse.tcf.core.Command;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.JSON;
+import org.eclipse.tcf.services.IProcesses;
public class ProcessesProxy implements IProcesses {
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/ProcessesV1Proxy.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/ProcessesV1Proxy.java
index 64ff4d035..ab764608d 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/ProcessesV1Proxy.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/ProcessesV1Proxy.java
@@ -8,14 +8,14 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.services.remote;
+package org.eclipse.tcf.internal.services.remote;
import java.util.Map;
-import org.eclipse.tm.tcf.core.Command;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.services.IProcessesV1;
+import org.eclipse.tcf.core.Command;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.services.IProcessesV1;
public class ProcessesV1Proxy extends ProcessesProxy implements IProcessesV1 {
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/RegistersProxy.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/RegistersProxy.java
index 4943ae906..e89080ab6 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/RegistersProxy.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/RegistersProxy.java
@@ -8,18 +8,18 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.services.remote;
+package org.eclipse.tcf.internal.services.remote;
import java.io.IOException;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
-import org.eclipse.tm.tcf.core.Command;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.protocol.JSON;
-import org.eclipse.tm.tcf.services.IRegisters;
+import org.eclipse.tcf.core.Command;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.JSON;
+import org.eclipse.tcf.services.IRegisters;
public class RegistersProxy implements IRegisters {
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/RunControlProxy.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/RunControlProxy.java
index c8ed6d772..0526c7736 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/RunControlProxy.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/RunControlProxy.java
@@ -8,18 +8,18 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.services.remote;
+package org.eclipse.tcf.internal.services.remote;
import java.io.IOException;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
-import org.eclipse.tm.tcf.core.Command;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.protocol.JSON;
-import org.eclipse.tm.tcf.services.IRunControl;
+import org.eclipse.tcf.core.Command;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.JSON;
+import org.eclipse.tcf.services.IRunControl;
public class RunControlProxy implements IRunControl {
@@ -98,6 +98,11 @@ public class RunControlProxy implements IRunControl {
return b != null && b.booleanValue();
}
+ public boolean canDetach() {
+ Boolean b = (Boolean)props.get(PROP_CAN_DETACH);
+ return b != null && b.booleanValue();
+ }
+
public String getRCGroup() {
return (String)props.get(PROP_RC_GROUP);
}
@@ -149,6 +154,10 @@ public class RunControlProxy implements IRunControl {
return command("terminate", new Object[]{ getID() }, done);
}
+ public IToken detach(DoneCommand done) {
+ return command("detach", new Object[]{ getID() }, done);
+ }
+
private IToken command(String cmd, Object[] args, final DoneCommand done) {
return new Command(channel, RunControlProxy.this, cmd, args) {
@Override
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/StackTraceProxy.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/StackTraceProxy.java
index 13f701a22..3b27568ce 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/StackTraceProxy.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/StackTraceProxy.java
@@ -8,16 +8,16 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.services.remote;
+package org.eclipse.tcf.internal.services.remote;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
-import org.eclipse.tm.tcf.core.Command;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.services.IStackTrace;
+import org.eclipse.tcf.core.Command;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.services.IStackTrace;
public class StackTraceProxy implements IStackTrace {
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/StreamsProxy.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/StreamsProxy.java
index dea9b6f90..9be49a111 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/StreamsProxy.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/StreamsProxy.java
@@ -8,17 +8,17 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.services.remote;
+package org.eclipse.tcf.internal.services.remote;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
-import org.eclipse.tm.tcf.core.Command;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.protocol.JSON;
-import org.eclipse.tm.tcf.services.IStreams;
+import org.eclipse.tcf.core.Command;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.JSON;
+import org.eclipse.tcf.services.IStreams;
public class StreamsProxy implements IStreams {
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/SymbolsProxy.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/SymbolsProxy.java
index 79f394998..9473f99fb 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/SymbolsProxy.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/SymbolsProxy.java
@@ -8,17 +8,17 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.services.remote;
+package org.eclipse.tcf.internal.services.remote;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
-import org.eclipse.tm.tcf.core.Command;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.protocol.JSON;
-import org.eclipse.tm.tcf.services.ISymbols;
+import org.eclipse.tcf.core.Command;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.JSON;
+import org.eclipse.tcf.services.ISymbols;
public class SymbolsProxy implements ISymbols {
@@ -60,6 +60,10 @@ public class SymbolsProxy implements ISymbols {
return (String)props.get(PROP_INDEX_TYPE_ID);
}
+ public String getContainerID() {
+ return (String)props.get(PROP_CONTAINER_ID);
+ }
+
public int getLength() {
Number n = (Number)props.get(PROP_LENGTH);
if (n == null) return 0;
@@ -119,6 +123,7 @@ public class SymbolsProxy implements ISymbols {
case 6: return TypeClass.composite;
case 7: return TypeClass.enumeration;
case 8: return TypeClass.function;
+ case 9: return TypeClass.member_pointer;
}
}
return TypeClass.unknown;
@@ -260,6 +265,22 @@ public class SymbolsProxy implements ISymbols {
}.token;
}
+ public IToken getSymFileInfo(String context_id, Number address, final DoneGetSymFileInfo done) {
+ return new Command(channel, this, "getSymFileInfo", new Object[]{ context_id, address }) {
+ @SuppressWarnings("unchecked")
+ @Override
+ public void done(Exception error, Object[] args) {
+ Map<String,Object> props = null;
+ if (error == null) {
+ assert args.length == 2;
+ error = toError(args[0]);
+ props = (Map<String,Object>)args[1];
+ }
+ done.doneGetSymFileInfo(token, error, props);
+ }
+ }.token;
+ }
+
@SuppressWarnings("unchecked")
private String[] toStringArray(Object o) {
if (o == null) return null;
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/SysMonitorProxy.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/SysMonitorProxy.java
index f88731a3e..c128775b7 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/SysMonitorProxy.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/SysMonitorProxy.java
@@ -8,15 +8,15 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.services.remote;
+package org.eclipse.tcf.internal.services.remote;
import java.util.Collection;
import java.util.Map;
-import org.eclipse.tm.tcf.core.Command;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.services.ISysMonitor;
+import org.eclipse.tcf.core.Command;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.services.ISysMonitor;
public class SysMonitorProxy implements ISysMonitor {
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/TerminalsProxy.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/TerminalsProxy.java
index 57ee5df0f..95dc92ade 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/TerminalsProxy.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/TerminalsProxy.java
@@ -9,17 +9,17 @@
* Intel - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.services.remote;
+package org.eclipse.tcf.internal.services.remote;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
-import org.eclipse.tm.tcf.core.Command;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.protocol.JSON;
-import org.eclipse.tm.tcf.services.ITerminals;
+import org.eclipse.tcf.core.Command;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.JSON;
+import org.eclipse.tcf.services.ITerminals;
public class TerminalsProxy implements ITerminals {
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IChannel.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/protocol/IChannel.java
index d981bb11e..cf37df12d 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IChannel.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/protocol/IChannel.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.tcf.protocol;
+package org.eclipse.tcf.protocol;
import java.util.Collection;
import java.util.Map;
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IErrorReport.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/protocol/IErrorReport.java
index be1f46efa..f803b1640 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IErrorReport.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/protocol/IErrorReport.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.tcf.protocol;
+package org.eclipse.tcf.protocol;
import java.util.Map;
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IEventQueue.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/protocol/IEventQueue.java
index f39e9bdb5..24dbe0371 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IEventQueue.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/protocol/IEventQueue.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.tcf.protocol;
+package org.eclipse.tcf.protocol;
/**
* Clients of stand-alone version the framework should implement this interface and call Protocol.setEventQueue.
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/ILogger.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/protocol/ILogger.java
index 0bc5b4031..faa314382 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/ILogger.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/protocol/ILogger.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.tcf.protocol;
+package org.eclipse.tcf.protocol;
/**
* Clients of stand-alone version the framework should implement this interface and call Protocol.setLogger.
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IPeer.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/protocol/IPeer.java
index f67ec35ee..ebc998472 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IPeer.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/protocol/IPeer.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.tcf.protocol;
+package org.eclipse.tcf.protocol;
import java.util.Map;
@@ -50,6 +50,9 @@ public interface IPeer {
/** Name of the peer operating system */
ATTR_OS_NAME = "OSName",
+ /** Name of a user that created the peer */
+ ATTR_USER_NAME = "UserName",
+
/** Transport name, for example TCP, SSL */
ATTR_TRANSPORT_NAME = "TransportName",
@@ -100,6 +103,11 @@ public interface IPeer {
String getOSName();
/**
+ * @return agent user name, same as getAttributes().get(ATTR_USER_NAME)
+ */
+ String getUserName();
+
+ /**
* @return transport name, same as getAttributes().get(ATTR_TRANSPORT_NAME)
*/
String getTransportName();
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IService.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/protocol/IService.java
index 65a29f322..92ae8942f 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IService.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/protocol/IService.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.tcf.protocol;
+package org.eclipse.tcf.protocol;
/**
* Base interface for all service interfaces. A client can get list of available services
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IServiceProvider.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/protocol/IServiceProvider.java
index 99ec07cc5..cb6a5e02a 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IServiceProvider.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/protocol/IServiceProvider.java
@@ -8,7 +8,7 @@
* Contributors:
* Anyware Technologies - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.tcf.protocol;
+package org.eclipse.tcf.protocol;
/**
* Clients can implement this interface if they want to provide implementation of a local service or
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IToken.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/protocol/IToken.java
index 53a84b4cb..aeb372824 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IToken.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/protocol/IToken.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.tcf.protocol;
+package org.eclipse.tcf.protocol;
/**
* IToken is created by the framework for each command sent to a remote peer.
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/ITransportProvider.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/protocol/ITransportProvider.java
index 7416c74fc..fc71fb2cf 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/ITransportProvider.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/protocol/ITransportProvider.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.tcf.protocol;
+package org.eclipse.tcf.protocol;
/**
* ITransportProvider represents communication protocol that can be used to open TCF communication channels.
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/JSON.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/protocol/JSON.java
index 14be0d949..1b6b7cb1d 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/JSON.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/protocol/JSON.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.tcf.protocol;
+package org.eclipse.tcf.protocol;
import java.io.IOException;
import java.math.BigDecimal;
@@ -21,7 +21,7 @@ import java.util.Iterator;
import java.util.List;
import java.util.Map;
-import org.eclipse.tm.tcf.core.Base64;
+import org.eclipse.tcf.core.Base64;
/**
@@ -166,6 +166,21 @@ public final class JSON {
}
}
+ private static void skipWS() throws IOException {
+ while (cur_ch <= ' ') {
+ switch (cur_ch) {
+ case '\r':
+ case '\n':
+ case '\t':
+ case ' ':
+ read();
+ break;
+ default:
+ return;
+ }
+ }
+ }
+
private static void error() throws IOException {
error("syntax error");
}
@@ -243,6 +258,7 @@ public final class JSON {
}
private static Object readNestedObject() throws IOException {
+ skipWS();
switch (cur_ch) {
case '(':
read();
@@ -306,17 +322,29 @@ public final class JSON {
else {
tmp_buf[tmp_buf_pos++] = (char)cur_ch;
}
- read();
+ if (inp_pos >= inp.length || inp[inp_pos] < 0) {
+ cur_ch = readUTF8Char();
+ }
+ else {
+ cur_ch = inp[inp_pos++];
+ }
+ err_buf[err_buf_pos++] = (char)cur_ch;
+ if (err_buf_pos >= err_buf.length) {
+ err_buf_pos = 0;
+ err_buf_cnt++;
+ }
}
read();
return new String(tmp_buf, 0, tmp_buf_pos);
case '[':
- List<Object> l = new ArrayList<Object>();
read();
+ skipWS();
+ List<Object> l = new ArrayList<Object>();
if (cur_ch <= 0) error();
if (cur_ch != ']') {
for (;;) {
l.add(readNestedObject());
+ skipWS();
if (cur_ch == ']') break;
if (cur_ch != ',') error();
read();
@@ -325,16 +353,19 @@ public final class JSON {
read();
return Collections.unmodifiableList(l);
case '{':
- Map<String,Object> m = new HashMap<String,Object>();
read();
+ skipWS();
+ Map<String,Object> m = new HashMap<String,Object>();
if (cur_ch <= 0) error();
if (cur_ch != '}') {
for (;;) {
String key = (String)readNestedObject();
+ skipWS();
if (cur_ch != ':') error();
read();
Object val = readNestedObject();
m.put(key, val);
+ skipWS();
if (cur_ch == '}') break;
if (cur_ch != ',') error();
read();
@@ -426,23 +457,6 @@ public final class JSON {
}
}
- private static Object readObject() throws IOException {
- Object o = readNestedObject();
- if (cur_ch >= 0) error();
- return o;
- }
-
- private static Object[] readSequence() throws IOException {
- List<Object> l = new ArrayList<Object>();
- while (cur_ch >= 0) {
- if (cur_ch == 0) l.add(null);
- else l.add(readNestedObject());
- if (cur_ch != 0) error("missing \\0 terminator");
- read();
- }
- return l.toArray();
- }
-
/**
* Write an object into JSON output buffer.
* Clients should not call this method directly, except from ObjectWriter implementation.
@@ -713,7 +727,9 @@ public final class JSON {
err_buf_pos = 0;
err_buf_cnt = 0;
read();
- return readObject();
+ Object o = readNestedObject();
+ if (cur_ch >= 0) error();
+ return o;
}
/**
@@ -730,7 +746,14 @@ public final class JSON {
err_buf_pos = 0;
err_buf_cnt = 0;
read();
- return readSequence();
+ List<Object> l = new ArrayList<Object>();
+ while (cur_ch >= 0) {
+ if (cur_ch == 0) l.add(null);
+ else l.add(readNestedObject());
+ if (cur_ch != 0) error("missing \\0 terminator");
+ read();
+ }
+ return l.toArray();
}
/**
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/Protocol.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/protocol/Protocol.java
index 13e23ddf0..8b7bb62b4 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/Protocol.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/protocol/Protocol.java
@@ -8,16 +8,16 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.tcf.protocol;
+package org.eclipse.tcf.protocol;
import java.util.ArrayList;
import java.util.TreeSet;
import java.util.UUID;
-import org.eclipse.tm.internal.tcf.core.ServiceManager;
-import org.eclipse.tm.internal.tcf.core.TransportManager;
-import org.eclipse.tm.internal.tcf.services.local.LocatorService;
-import org.eclipse.tm.tcf.services.ILocator;
+import org.eclipse.tcf.internal.core.ServiceManager;
+import org.eclipse.tcf.internal.core.TransportManager;
+import org.eclipse.tcf.internal.services.local.LocatorService;
+import org.eclipse.tcf.services.ILocator;
/**
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IBreakpoints.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/IBreakpoints.java
index 122ed72d8..c9264e7fc 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IBreakpoints.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/IBreakpoints.java
@@ -8,12 +8,12 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.tcf.services;
+package org.eclipse.tcf.services;
import java.util.Map;
-import org.eclipse.tm.tcf.protocol.IService;
-import org.eclipse.tm.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.IService;
+import org.eclipse.tcf.protocol.IToken;
/**
@@ -121,6 +121,7 @@ public interface IBreakpoints extends IService {
static final String
CAPABILITY_CONTEXT_ID = "ID", // String
CAPABILITY_HAS_CHILDREN = "HasChildren", // Boolean
+ CAPABILITY_BREAKPOINT_TYPE = "BreakpointType", // Boolean
CAPABILITY_LOCATION = "Location", // Boolean
CAPABILITY_CONDITION = "Condition", // Boolean
CAPABILITY_FILE_LINE = "FileLine", // Boolean
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IDiagnostics.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/IDiagnostics.java
index 6ffa51237..ef881174f 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IDiagnostics.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/IDiagnostics.java
@@ -8,12 +8,12 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.tcf.services;
+package org.eclipse.tcf.services;
import java.math.BigDecimal;
-import org.eclipse.tm.tcf.protocol.IService;
-import org.eclipse.tm.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.IService;
+import org.eclipse.tcf.protocol.IToken;
/**
* This is optional service that can be implemented by a peer.
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IDisassembly.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/IDisassembly.java
index 3e195140a..4920fd9ab 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IDisassembly.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/IDisassembly.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010 Wind River Systems, Inc. and others.
+ * Copyright (c) 2010, 2011 Wind River Systems, Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -8,12 +8,12 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.tcf.services;
+package org.eclipse.tcf.services;
import java.util.Map;
-import org.eclipse.tm.tcf.protocol.IService;
-import org.eclipse.tm.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.IService;
+import org.eclipse.tcf.protocol.IToken;
/**
* TCF Disassembly service interface.
@@ -104,13 +104,13 @@ public interface IDisassembly extends IService {
/** The type of the instruction field. See FTYPE_*, String. */
FIELD_TYPE = "Type",
- /** Value of the field for “String” and “Register” types, String. */
+ /** Value of the field for "String" and "Register" types, String. */
FIELD_TEXT = "Text",
- /** Value of the field for “Address,” “Displacement,” or “Immediate” types, Number. */
+ /** Value of the field for "Address", "Displacement", or "Immediate" types, Number. */
FIELD_VALUE = "Value",
- /** Context ID of the address space used with “Address” types, String. */
+ /** Context ID of the address space used with "Address" types, String. */
FIELD_ADDRESS_SPACE = "AddressSpace";
/** Instruction field types */
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IExpressions.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/IExpressions.java
index 6b7d35d21..31900a2df 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IExpressions.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/IExpressions.java
@@ -8,12 +8,12 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.tcf.services;
+package org.eclipse.tcf.services;
import java.util.Map;
-import org.eclipse.tm.tcf.protocol.IService;
-import org.eclipse.tm.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.IService;
+import org.eclipse.tcf.protocol.IToken;
/**
* Expressions service allows TCF client to perform expression evaluation on remote target.
@@ -146,6 +146,12 @@ public interface IExpressions extends IService {
String getRegisterID();
/**
+ * Return symbol ID if the value represents a symbol.
+ * @return symbol ID or null.
+ */
+ String getSymbolID();
+
+ /**
* Return value memory address, if applicable.
* @return address or null.
*/
@@ -172,6 +178,7 @@ public interface IExpressions extends IService {
VAL_TYPE = "Type",
VAL_BIG_ENDIAN = "BigEndian",
VAL_REGISTER = "Register",
+ VAL_SYMBOL = "Symbol",
VAL_ADDRESS = "Address";
/**
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IFileSystem.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/IFileSystem.java
index 9e254bebb..fbcc2b85b 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IFileSystem.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/IFileSystem.java
@@ -8,13 +8,13 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.tcf.services;
+package org.eclipse.tcf.services;
import java.io.IOException;
import java.util.Map;
-import org.eclipse.tm.tcf.protocol.IService;
-import org.eclipse.tm.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.IService;
+import org.eclipse.tcf.protocol.IToken;
/**
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/ILineNumbers.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/ILineNumbers.java
index f3839574f..2311b32c2 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/ILineNumbers.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/ILineNumbers.java
@@ -8,11 +8,11 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.tcf.services;
+package org.eclipse.tcf.services;
-import org.eclipse.tm.tcf.protocol.IService;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.protocol.JSON;
+import org.eclipse.tcf.protocol.IService;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.JSON;
/**
* Line numbers service associates locations in the source files with the corresponding
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/ILocator.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/ILocator.java
index be7cfef97..b3427547c 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/ILocator.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/ILocator.java
@@ -8,13 +8,13 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.tcf.services;
+package org.eclipse.tcf.services;
import java.util.Map;
-import org.eclipse.tm.tcf.protocol.IPeer;
-import org.eclipse.tm.tcf.protocol.IService;
-import org.eclipse.tm.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.protocol.IService;
+import org.eclipse.tcf.protocol.IToken;
/**
@@ -91,7 +91,7 @@ public interface ILocator extends IService {
* @param done will be executed by dispatch thread after communication
* messages are delivered to corresponding targets.
*
- * This is internal API, TCF clients should use {@code org.eclipse.tm.tcf.protocol.Protocol}.
+ * This is internal API, TCF clients should use {@code org.eclipse.tcf.protocol.Protocol}.
*/
IToken sync(DoneSync done);
@@ -134,4 +134,4 @@ public interface ILocator extends IService {
*/
void peerHeartBeat(String id);
}
-} \ No newline at end of file
+}
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IMemory.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/IMemory.java
index df9dd2ac1..46c08a440 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IMemory.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/IMemory.java
@@ -8,13 +8,13 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.tcf.services;
+package org.eclipse.tcf.services;
import java.util.Collection;
import java.util.Map;
-import org.eclipse.tm.tcf.protocol.IService;
-import org.eclipse.tm.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.IService;
+import org.eclipse.tcf.protocol.IToken;
/**
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IMemoryMap.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/IMemoryMap.java
index c54e81d0b..fa45a62fd 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IMemoryMap.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/IMemoryMap.java
@@ -8,12 +8,12 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.tcf.services;
+package org.eclipse.tcf.services;
import java.util.Map;
-import org.eclipse.tm.tcf.protocol.IService;
-import org.eclipse.tm.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.IService;
+import org.eclipse.tcf.protocol.IToken;
/**
* IMemoryMap service provides information about executable modules (files) mapped (loaded) into target memory.
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IPathMap.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/IPathMap.java
index df5dddf70..1a1e7cd20 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IPathMap.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/IPathMap.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 Wind River Systems, Inc. and others.
+ * Copyright (c) 2007, 2011 Wind River Systems, Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -8,12 +8,12 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.tcf.services;
+package org.eclipse.tcf.services;
import java.util.Map;
-import org.eclipse.tm.tcf.protocol.IService;
-import org.eclipse.tm.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.IService;
+import org.eclipse.tcf.protocol.IToken;
/**
* IPathMap service manages file path translation across systems.
@@ -145,4 +145,27 @@ public interface IPathMap extends IService {
*/
void doneSet(IToken token, Exception error);
}
+
+ /**
+ * Add path map event listener.
+ * @param listener - path map event listener to add.
+ */
+ void addListener(PathMapListener listener);
+
+ /**
+ * Remove path map event listener.
+ * @param listener - path map event listener to remove.
+ */
+ void removeListener(PathMapListener listener);
+
+ /**
+ * Service events listener interface.
+ */
+ interface PathMapListener {
+
+ /**
+ * Called when path map changes.
+ */
+ void changed();
+ }
}
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IProcesses.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/IProcesses.java
index b0b40eda5..fc51611e4 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IProcesses.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/IProcesses.java
@@ -8,13 +8,13 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.tcf.services;
+package org.eclipse.tcf.services;
import java.util.Collection;
import java.util.Map;
-import org.eclipse.tm.tcf.protocol.IService;
-import org.eclipse.tm.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.IService;
+import org.eclipse.tcf.protocol.IToken;
/**
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IProcessesV1.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/IProcessesV1.java
index dfb0ec796..640dff083 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IProcessesV1.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/IProcessesV1.java
@@ -8,11 +8,11 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.tcf.services;
+package org.eclipse.tcf.services;
import java.util.Map;
-import org.eclipse.tm.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.IToken;
/**
* Extension of Processes service.
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IRegisters.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/IRegisters.java
index 39723dd3a..1bff71146 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IRegisters.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/IRegisters.java
@@ -8,13 +8,13 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.tcf.services;
+package org.eclipse.tcf.services;
import java.util.Collection;
import java.util.Map;
-import org.eclipse.tm.tcf.protocol.IService;
-import org.eclipse.tm.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.IService;
+import org.eclipse.tcf.protocol.IToken;
/**
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IRunControl.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/IRunControl.java
index f73e7932f..0c17e0f5c 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IRunControl.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/IRunControl.java
@@ -8,12 +8,12 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.tcf.services;
+package org.eclipse.tcf.services;
import java.util.Map;
-import org.eclipse.tm.tcf.protocol.IService;
-import org.eclipse.tm.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.IService;
+import org.eclipse.tcf.protocol.IToken;
public interface IRunControl extends IService {
@@ -57,6 +57,9 @@ public interface IRunControl extends IService {
/** true if terminate command is supported by the context */
PROP_CAN_TERMINATE = "CanTerminate",
+ /** true if detach command is supported by the context */
+ PROP_CAN_DETACH = "CanDetach",
+
/** Context ID of a run control group that contains the context.
* Members of same group are always suspended and resumed together:
* resuming/suspending a context resumes/suspends all members of the group */
@@ -359,13 +362,23 @@ public interface IRunControl extends IService {
* Utility method to read context property PROP_CAN_TERMINATE.
* Value 'true' means terminate command is supported by the context,
* however the method does not check that the command can be executed successfully in
- * the current state of the context. For example, the command still can fail if context is
- * already exited.
- * @return value of PROP_CAN_SUSPEND.
+ * the current state of the context. For example, the command still can fail if the context
+ * already has exited.
+ * @return value of PROP_CAN_TERMINATE.
*/
boolean canTerminate();
/**
+ * Utility method to read context property PROP_CAN_DETACH.
+ * Value 'true' means detach command is supported by the context,
+ * however the method does not check that the command can be executed successfully in
+ * the current state of the context. For example, the command still can fail if the context
+ * already has exited.
+ * @return value of PROP_CAN_DETACH.
+ */
+ boolean canDetach();
+
+ /**
* Utility method to read context property PROP_RC_GROUP -
* context ID of a run control group that contains the context.
* Members of same group are always suspended and resumed together:
@@ -435,6 +448,13 @@ public interface IRunControl extends IService {
* @return pending command handle, can be used to cancel the command.
*/
IToken terminate(DoneCommand done);
+
+ /**
+ * Send a command to detach a context.
+ * @param done - command result call back object.
+ * @return pending command handle, can be used to cancel the command.
+ */
+ IToken detach(DoneCommand done);
}
class RunControlError extends Exception {
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IStackTrace.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/IStackTrace.java
index 576df4ecf..79caef4f6 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IStackTrace.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/IStackTrace.java
@@ -8,12 +8,12 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.tcf.services;
+package org.eclipse.tcf.services;
import java.util.Map;
-import org.eclipse.tm.tcf.protocol.IService;
-import org.eclipse.tm.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.IService;
+import org.eclipse.tcf.protocol.IToken;
public interface IStackTrace extends IService {
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IStreams.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/IStreams.java
index 61749932a..7621deb4f 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IStreams.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/IStreams.java
@@ -8,10 +8,10 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.tcf.services;
+package org.eclipse.tcf.services;
-import org.eclipse.tm.tcf.protocol.IService;
-import org.eclipse.tm.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.IService;
+import org.eclipse.tcf.protocol.IToken;
/**
* Streams service is a generic interface to support streaming of data between host and remote agents.
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/ISymbols.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/ISymbols.java
index 913ad8a98..2c2cf351e 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/ISymbols.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/ISymbols.java
@@ -8,12 +8,12 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.tcf.services;
+package org.eclipse.tcf.services;
import java.util.Map;
-import org.eclipse.tm.tcf.protocol.IService;
-import org.eclipse.tm.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.IService;
+import org.eclipse.tcf.protocol.IToken;
public interface ISymbols extends IService {
@@ -39,7 +39,8 @@ public interface ISymbols extends IService {
array, // array of anything.
composite, // struct, union, or class.
enumeration, // enumeration type.
- function // function type.
+ function, // function type.
+ member_pointer // pointer to member type
}
static final int
@@ -119,7 +120,6 @@ public interface ISymbols extends IService {
* pointer type - return pointed type;
* array type - return element type;
* function type - return function result type;
- * class type - return base class;
* otherwise return null.
* @return type ID.
*/
@@ -135,6 +135,16 @@ public interface ISymbols extends IService {
String getIndexTypeID();
/**
+ * Get container type ID.
+ * If this symbol is a
+ * field or member - return containing class type;
+ * member pointer - return containing class type;
+ * otherwise return null.
+ * @return type ID.
+ */
+ String getContainerID();
+
+ /**
* Return value size of the symbol (or type).
* @return size in bytes.
*/
@@ -221,6 +231,7 @@ public interface ISymbols extends IService {
PROP_TYPE_ID = "TypeID",
PROP_BASE_TYPE_ID = "BaseTypeID",
PROP_INDEX_TYPE_ID = "IndexTypeID",
+ PROP_CONTAINER_ID = "ContainerID",
PROP_SIZE = "Size",
PROP_LENGTH = "Length",
PROP_LOWER_BOUND = "LowerBound",
@@ -378,8 +389,28 @@ public interface ISymbols extends IService {
* the value size (Number) and endianness (Boolean, false - little-endian, true - big-endian). */
CMD_DEREF = 4,
- /** Add two values on top of the evaluation stack */
- CMD_ADD = 5;
+ /** Integer arithmetic and bit-wise boolean operations */
+ CMD_ADD = 5,
+ CMD_SUB = 6,
+ CMD_MUL = 7,
+ CMD_DIV = 8,
+ CMD_AND = 9,
+ CMD_OR = 10,
+ CMD_XOR = 11,
+ CMD_NEG = 12,
+ CMD_GE = 13,
+ CMD_GT = 14,
+ CMD_LE = 15,
+ CMD_LT = 16,
+ CMD_SHL = 17,
+ CMD_SHR = 18,
+
+ /** Load expression argument to evaluation stack. */
+ CMD_ARG = 19,
+
+ /** Evaluate DWARF location expression. Command arguments are byte array of
+ * DWARF expression instructions and an object that contains evaluation parameters. */
+ CMD_LOCATION = 20;
/**
* Retrieve stack tracing commands for given instruction address in a context memory.
@@ -407,4 +438,10 @@ public interface ISymbols extends IService {
Number address, Number size,
Object[] fp_cmds, Map<String,Object[]> reg_cmds);
}
+
+ IToken getSymFileInfo(String context_id, Number address, DoneGetSymFileInfo done);
+
+ interface DoneGetSymFileInfo {
+ void doneGetSymFileInfo(IToken token, Exception error, Map<String,Object> props);
+ }
}
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/ISysMonitor.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/ISysMonitor.java
index c9dfaf374..b9bab74e2 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/ISysMonitor.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/ISysMonitor.java
@@ -8,12 +8,12 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.tcf.services;
+package org.eclipse.tcf.services;
import java.util.Map;
-import org.eclipse.tm.tcf.protocol.IService;
-import org.eclipse.tm.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.IService;
+import org.eclipse.tcf.protocol.IToken;
/**
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/ITerminals.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/ITerminals.java
index ccda16c57..14d7c9de7 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/ITerminals.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/ITerminals.java
@@ -9,12 +9,12 @@
* Intel - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.tcf.services;
+package org.eclipse.tcf.services;
import java.util.Map;
-import org.eclipse.tm.tcf.protocol.IService;
-import org.eclipse.tm.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.IService;
+import org.eclipse.tcf.protocol.IToken;
/**
* ITerminalsService allows to launch a new terminal on the remote target system.
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/util/TCFDataCache.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/util/TCFDataCache.java
index 93a4ee3f3..6f1038c17 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/util/TCFDataCache.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/util/TCFDataCache.java
@@ -8,11 +8,11 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.tcf.util;
+package org.eclipse.tcf.util;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.protocol.Protocol;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.Protocol;
/**
* Objects of this class are used to cache TCF remote data.
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/util/TCFFileInputStream.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/util/TCFFileInputStream.java
index 3cd2915b7..e37e58aaa 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/util/TCFFileInputStream.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/util/TCFFileInputStream.java
@@ -8,18 +8,18 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.tcf.util;
+package org.eclipse.tcf.util;
import java.io.IOException;
import java.io.InputStream;
import java.util.Iterator;
import java.util.LinkedList;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.tcf.services.IFileSystem;
-import org.eclipse.tm.tcf.services.IFileSystem.FileSystemException;
-import org.eclipse.tm.tcf.services.IFileSystem.IFileHandle;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.services.IFileSystem;
+import org.eclipse.tcf.services.IFileSystem.FileSystemException;
+import org.eclipse.tcf.services.IFileSystem.IFileHandle;
/**
* TCFFileInputStream is high performance InputStream implementation over TCF FileSystem service.
@@ -249,4 +249,4 @@ public final class TCFFileInputStream extends InputStream {
closed = true;
buf = null;
}
-} \ No newline at end of file
+}
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/util/TCFFileOutputStream.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/util/TCFFileOutputStream.java
index 616035d4b..82078344b 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/util/TCFFileOutputStream.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/util/TCFFileOutputStream.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.tcf.util;
+package org.eclipse.tcf.util;
import java.io.IOException;
import java.io.InterruptedIOException;
@@ -17,10 +17,10 @@ import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.services.IFileSystem;
-import org.eclipse.tm.tcf.services.IFileSystem.FileSystemException;
-import org.eclipse.tm.tcf.services.IFileSystem.IFileHandle;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.services.IFileSystem;
+import org.eclipse.tcf.services.IFileSystem.FileSystemException;
+import org.eclipse.tcf.services.IFileSystem.IFileHandle;
/**
* TCFFileOutputStream is high performance OutputStream implementation over TCF FileSystem service.
@@ -155,4 +155,4 @@ public final class TCFFileOutputStream extends OutputStream {
}.getIO();
closed = true;
}
-} \ No newline at end of file
+}
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/util/TCFTask.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/util/TCFTask.java
index 8bbe1b052..9193b6a47 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/util/TCFTask.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/util/TCFTask.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.tcf.util;
+package org.eclipse.tcf.util;
import java.io.IOException;
import java.io.InterruptedIOException;
@@ -18,8 +18,8 @@ import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.Protocol;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.Protocol;
/**
* A <tt>TCFTask</tt> is an utility class that represents the result of an asynchronous
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/.classpath b/plugins/org.eclipse.tcf.debug.ui/.classpath
index 8e321c38f..8e321c38f 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/.classpath
+++ b/plugins/org.eclipse.tcf.debug.ui/.classpath
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/.project b/plugins/org.eclipse.tcf.debug.ui/.project
index 5ea738022..ff991fefe 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/.project
+++ b/plugins/org.eclipse.tcf.debug.ui/.project
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.eclipse.tm.tcf.debug.ui</name>
+ <name>org.eclipse.tcf.debug.ui</name>
<comment></comment>
<projects>
</projects>
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.tcf.debug.ui/.settings/org.eclipse.jdt.core.prefs
index 35fc6d403..35fc6d403 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/.settings/org.eclipse.jdt.core.prefs
+++ b/plugins/org.eclipse.tcf.debug.ui/.settings/org.eclipse.jdt.core.prefs
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/.settings/org.eclipse.jdt.ui.prefs b/plugins/org.eclipse.tcf.debug.ui/.settings/org.eclipse.jdt.ui.prefs
index 903e1082e..903e1082e 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/.settings/org.eclipse.jdt.ui.prefs
+++ b/plugins/org.eclipse.tcf.debug.ui/.settings/org.eclipse.jdt.ui.prefs
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.tcf.debug.ui/META-INF/MANIFEST.MF
index e8a698e55..5e077e27c 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.tcf.debug.ui/META-INF/MANIFEST.MF
@@ -1,9 +1,9 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.tm.tcf.debug.ui;singleton:=true
-Bundle-Version: 0.5.0.qualifier
-Bundle-Activator: org.eclipse.tm.internal.tcf.debug.ui.Activator
+Bundle-SymbolicName: org.eclipse.tcf.debug.ui;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipse.tcf.internal.debug.ui.Activator
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui,
@@ -15,22 +15,22 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.jface.text,
org.eclipse.debug.core,
org.eclipse.debug.ui,
- org.eclipse.tm.tcf.debug,
+ org.eclipse.tcf.debug,
com.jcraft.jsch;bundle-version="0.1.37",
org.eclipse.jsch.core;bundle-version="1.1.100",
org.eclipse.jsch.ui;bundle-version="1.1.100",
org.eclipse.core.filesystem;bundle-version="1.3.0",
org.eclipse.ui.views
Import-Package: org.eclipse.core.expressions,
- org.eclipse.tm.tcf.core;version="0.4.0",
- org.eclipse.tm.tcf.protocol;version="0.5.0",
- org.eclipse.tm.tcf.services;version="0.5.0",
- org.eclipse.tm.tcf.ssl;version="0.4.0",
- org.eclipse.tm.tcf.util;version="0.4.0"
+ org.eclipse.tcf.core;version="1.0.0",
+ org.eclipse.tcf.protocol;version="1.0.0",
+ org.eclipse.tcf.services;version="1.0.0",
+ org.eclipse.tcf.ssl;version="1.0.0",
+ org.eclipse.tcf.util;version="1.0.0"
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ActivationPolicy: lazy
Eclipse-LazyStart: true
-Export-Package: org.eclipse.tm.internal.tcf.debug.ui.adapters,
- org.eclipse.tm.internal.tcf.debug.ui.commands;x-friends:="org.eclipse.tm.tcf.cdt.ui",
- org.eclipse.tm.internal.tcf.debug.ui.launch,
- org.eclipse.tm.internal.tcf.debug.ui.model;x-friends:="org.eclipse.tm.tcf.cdt.ui"
+Export-Package: org.eclipse.tcf.internal.debug.ui.commands;x-friends:="org.eclipse.tcf.cdt.ui",
+ org.eclipse.tcf.internal.debug.ui.launch;x-friends:="org.eclipse.tcf.cdt.ui",
+ org.eclipse.tcf.internal.debug.ui.model;x-friends:="org.eclipse.tcf.cdt.ui",
+ org.eclipse.tcf.debug.ui
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/about.html b/plugins/org.eclipse.tcf.debug.ui/about.html
index 6c5b3615b..6c5b3615b 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/about.html
+++ b/plugins/org.eclipse.tcf.debug.ui/about.html
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/agent/get-os-tag b/plugins/org.eclipse.tcf.debug.ui/agent/get-os-tag
index 3ab5d23fe..3ab5d23fe 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/agent/get-os-tag
+++ b/plugins/org.eclipse.tcf.debug.ui/agent/get-os-tag
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/build.properties b/plugins/org.eclipse.tcf.debug.ui/build.properties
index 39c4c9da1..39c4c9da1 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/build.properties
+++ b/plugins/org.eclipse.tcf.debug.ui/build.properties
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/icons/arguments_tab.gif b/plugins/org.eclipse.tcf.debug.ui/icons/arguments_tab.gif
index 44660b5f0..44660b5f0 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/icons/arguments_tab.gif
+++ b/plugins/org.eclipse.tcf.debug.ui/icons/arguments_tab.gif
Binary files differ
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/icons/attribute.gif b/plugins/org.eclipse.tcf.debug.ui/icons/attribute.gif
index 0f0769269..0f0769269 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/icons/attribute.gif
+++ b/plugins/org.eclipse.tcf.debug.ui/icons/attribute.gif
Binary files differ
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/icons/brkp_ovr.gif b/plugins/org.eclipse.tcf.debug.ui/icons/brkp_ovr.gif
index 5f5f0ab99..5f5f0ab99 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/icons/brkp_ovr.gif
+++ b/plugins/org.eclipse.tcf.debug.ui/icons/brkp_ovr.gif
Binary files differ
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/icons/casttotype_co.gif b/plugins/org.eclipse.tcf.debug.ui/icons/casttotype_co.gif
index b04de7e29..b04de7e29 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/icons/casttotype_co.gif
+++ b/plugins/org.eclipse.tcf.debug.ui/icons/casttotype_co.gif
Binary files differ
diff --git a/plugins/org.eclipse.tcf.debug.ui/icons/console.gif b/plugins/org.eclipse.tcf.debug.ui/icons/console.gif
new file mode 100644
index 000000000..a598f6082
--- /dev/null
+++ b/plugins/org.eclipse.tcf.debug.ui/icons/console.gif
Binary files differ
diff --git a/plugins/org.eclipse.tcf.debug.ui/icons/detach.gif b/plugins/org.eclipse.tcf.debug.ui/icons/detach.gif
new file mode 100644
index 000000000..2f875e2da
--- /dev/null
+++ b/plugins/org.eclipse.tcf.debug.ui/icons/detach.gif
Binary files differ
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/icons/memory-map.gif b/plugins/org.eclipse.tcf.debug.ui/icons/memory-map.gif
index b48083118..b48083118 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/icons/memory-map.gif
+++ b/plugins/org.eclipse.tcf.debug.ui/icons/memory-map.gif
Binary files differ
diff --git a/plugins/org.eclipse.tcf.debug.ui/icons/moved_ovr.gif b/plugins/org.eclipse.tcf.debug.ui/icons/moved_ovr.gif
new file mode 100644
index 000000000..87ad14d22
--- /dev/null
+++ b/plugins/org.eclipse.tcf.debug.ui/icons/moved_ovr.gif
Binary files differ
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/icons/path.gif b/plugins/org.eclipse.tcf.debug.ui/icons/path.gif
index 13ce11b14..13ce11b14 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/icons/path.gif
+++ b/plugins/org.eclipse.tcf.debug.ui/icons/path.gif
Binary files differ
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/icons/refresh.gif b/plugins/org.eclipse.tcf.debug.ui/icons/refresh.gif
index 049cac696..049cac696 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/icons/refresh.gif
+++ b/plugins/org.eclipse.tcf.debug.ui/icons/refresh.gif
Binary files differ
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/icons/showasarray_co.gif b/plugins/org.eclipse.tcf.debug.ui/icons/showasarray_co.gif
index 233e52a4a..233e52a4a 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/icons/showasarray_co.gif
+++ b/plugins/org.eclipse.tcf.debug.ui/icons/showasarray_co.gif
Binary files differ
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/icons/signals.gif b/plugins/org.eclipse.tcf.debug.ui/icons/signals.gif
index 34823ea7b..34823ea7b 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/icons/signals.gif
+++ b/plugins/org.eclipse.tcf.debug.ui/icons/signals.gif
Binary files differ
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/icons/target_tab.gif b/plugins/org.eclipse.tcf.debug.ui/icons/target_tab.gif
index e9df7b871..e9df7b871 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/icons/target_tab.gif
+++ b/plugins/org.eclipse.tcf.debug.ui/icons/target_tab.gif
Binary files differ
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/icons/tcf.gif b/plugins/org.eclipse.tcf.debug.ui/icons/tcf.gif
index 3198679ae..3198679ae 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/icons/tcf.gif
+++ b/plugins/org.eclipse.tcf.debug.ui/icons/tcf.gif
Binary files differ
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/icons/thread_not_active.gif b/plugins/org.eclipse.tcf.debug.ui/icons/thread_not_active.gif
index d1a859622..d1a859622 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/icons/thread_not_active.gif
+++ b/plugins/org.eclipse.tcf.debug.ui/icons/thread_not_active.gif
Binary files differ
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/icons/var_aggr.gif b/plugins/org.eclipse.tcf.debug.ui/icons/var_aggr.gif
index d261b6887..d261b6887 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/icons/var_aggr.gif
+++ b/plugins/org.eclipse.tcf.debug.ui/icons/var_aggr.gif
Binary files differ
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/icons/var_pointer.gif b/plugins/org.eclipse.tcf.debug.ui/icons/var_pointer.gif
index 961873ea9..961873ea9 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/icons/var_pointer.gif
+++ b/plugins/org.eclipse.tcf.debug.ui/icons/var_pointer.gif
Binary files differ
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/icons/var_simple.gif b/plugins/org.eclipse.tcf.debug.ui/icons/var_simple.gif
index 9ea61ad1f..9ea61ad1f 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/icons/var_simple.gif
+++ b/plugins/org.eclipse.tcf.debug.ui/icons/var_simple.gif
Binary files differ
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/plugin.properties b/plugins/org.eclipse.tcf.debug.ui/plugin.properties
index 693faaef4..20877c8ce 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/plugin.properties
+++ b/plugins/org.eclipse.tcf.debug.ui/plugin.properties
@@ -8,7 +8,7 @@
# Contributors:
# Wind River Systems - initial implementation
###############################################################################
-pluginName = TCF/Eclipse Debugger Integration UI (Incubation)
+pluginName = TCF/Eclipse Debugger Integration UI
providerName = Eclipse CDT
preferencePage.name = Target Communication
@@ -27,6 +27,8 @@ MemoryMap.label = Symbol Files...
ViewMemory.label = View Memory
WatchInExpressions.label = Watch In Expressions
Refresh.label = Refresh
+Console.label = Open Debug Console
+Detach.label = Detach Debug Context
UpdatePolicy.label = Update Policy
CastToType.label=Cast To Type...
@@ -52,4 +54,4 @@ BackResume.label=Run Backwards
BackResume.tooltip=Run Backwards
BackResume.description=Run backwards
-propertyPage.name = Debug Element
+propertyPage.name = Debug Element \ No newline at end of file
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/plugin.xml b/plugins/org.eclipse.tcf.debug.ui/plugin.xml
index 3927a0dc4..81e276625 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/plugin.xml
+++ b/plugins/org.eclipse.tcf.debug.ui/plugin.xml
@@ -15,59 +15,66 @@
<extension-point id="launch_context" name="TCF Launch Context" schema="schema/launch_context.exsd"/>
- <extension point="org.eclipse.tm.tcf.startup"/>
+ <extension point="org.eclipse.tcf.startup"/>
<extension
- id="org.eclipse.tm.tcf.debug.ui.adapters"
+ id="org.eclipse.tcf.debug.ui.adapters"
point="org.eclipse.core.runtime.adapters">
<factory
- class="org.eclipse.tm.internal.tcf.debug.ui.adapters.TCFLaunchAdapterFactory"
- adaptableType="org.eclipse.tm.internal.tcf.debug.model.TCFLaunch">
+ class="org.eclipse.tcf.internal.debug.ui.adapters.TCFLaunchAdapterFactory"
+ adaptableType="org.eclipse.tcf.internal.debug.model.TCFLaunch">
<adapter type="org.eclipse.debug.internal.ui.viewers.model.provisional.IElementContentProvider"/>
<adapter type="org.eclipse.debug.internal.ui.viewers.model.provisional.IElementLabelProvider"/>
<adapter type="org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxyFactory"/>
<adapter type="org.eclipse.debug.ui.contexts.ISuspendTrigger"/>
</factory>
<factory
- class="org.eclipse.tm.internal.tcf.debug.ui.adapters.TCFNodeAdapterFactory"
- adaptableType="org.eclipse.tm.internal.tcf.debug.ui.model.TCFNode">
+ class="org.eclipse.tcf.internal.debug.ui.adapters.TCFNodeAdapterFactory"
+ adaptableType="org.eclipse.tcf.internal.debug.ui.model.TCFNode">
<adapter type="org.eclipse.debug.ui.actions.IToggleBreakpointsTarget"/>
<adapter type="org.eclipse.debug.ui.actions.IToggleBreakpointsTargetExtension"/>
<adapter type="org.eclipse.ui.views.properties.IPropertySource"/>
</factory>
+<!--
+ <factory
+ class="org.eclipse.tcf.internal.debug.ui.adapters.TCFBreakpointAdapterFactory"
+ adaptableType="org.eclipse.debug.core.model.IBreakpoint">
+ <adapter type="org.eclipse.jface.viewers.ILabelProvider"/>
+ </factory>
+-->
</extension>
<extension point="org.eclipse.debug.ui.debugModelPresentations">
<debugModelPresentation
- class = "org.eclipse.tm.internal.tcf.debug.ui.model.TCFModelPresentation"
- id = "org.eclipse.tm.tcf.debug">
+ class = "org.eclipse.tcf.internal.debug.ui.model.TCFModelPresentation"
+ id = "org.eclipse.tcf.debug">
</debugModelPresentation>
</extension>
<extension point="org.eclipse.debug.ui.launchConfigurationTypeImages">
<launchConfigurationTypeImage
icon="icons/tcf.gif"
- configTypeID="org.eclipse.tm.tcf.debug.LaunchConfigurationType"
- id="org.eclipse.tm.tcf.debug.LaunchConfigurationTypeImage">
+ configTypeID="org.eclipse.tcf.debug.LaunchConfigurationType"
+ id="org.eclipse.tcf.debug.LaunchConfigurationTypeImage">
</launchConfigurationTypeImage>
</extension>
<extension point="org.eclipse.debug.ui.launchConfigurationTabGroups">
<launchConfigurationTabGroup
- type="org.eclipse.tm.tcf.debug.LaunchConfigurationType"
+ type="org.eclipse.tcf.debug.LaunchConfigurationType"
description="Run or debug a program using Target Communication Framework"
- class="org.eclipse.tm.internal.tcf.debug.ui.launch.TCFTabGroup"
- id="org.eclipse.tm.tcf.debug.LaunchConfigurationTabGroup">
+ class="org.eclipse.tcf.internal.debug.ui.launch.TCFTabGroup"
+ id="org.eclipse.tcf.debug.LaunchConfigurationTabGroup">
</launchConfigurationTabGroup>
</extension>
<extension point="org.eclipse.core.expressions.propertyTesters">
<propertyTester
- namespace="org.eclipse.tm.tcf.launch"
+ namespace="org.eclipse.tcf.launch"
properties="isExecutable,areUpdatePoliciesSupported"
type="org.eclipse.core.runtime.IAdaptable"
- class="org.eclipse.tm.internal.tcf.debug.ui.launch.TCFPropertyTester"
- id="org.eclipse.tm.tcf.launch.PropertyTester">
+ class="org.eclipse.tcf.internal.debug.ui.launch.TCFPropertyTester"
+ id="org.eclipse.tcf.launch.PropertyTester">
</propertyTester>
</extension>
@@ -75,11 +82,11 @@
<shortcut
label="TCF Application"
icon="icons/tcf.gif"
- helpContextId="org.eclipse.tm.tcf.debug.ui.shortcut_tcf_application"
+ helpContextId="org.eclipse.tcf.debug.ui.shortcut_tcf_application"
modes="run, debug"
- class="org.eclipse.tm.internal.tcf.debug.ui.launch.TCFLaunchShortcut"
+ class="org.eclipse.tcf.internal.debug.ui.launch.TCFLaunchShortcut"
description="Launch an application using Target Communication Framework (TCF)"
- id="org.eclipse.tm.tcf.debug.ui.TCFShortcut">
+ id="org.eclipse.tcf.debug.ui.TCFShortcut">
<description
description="Runs an application using Target Communication Framework (TCF)"
mode="run">
@@ -95,13 +102,13 @@
<iterate>
<test
forcePluginActivation="true"
- property="org.eclipse.tm.tcf.launch.isExecutable"/>
+ property="org.eclipse.tcf.launch.isExecutable"/>
</iterate>
</with>
</enablement>
</contextualLaunch>
<configurationType
- id="org.eclipse.tm.tcf.debug.LaunchConfigurationType">
+ id="org.eclipse.tcf.debug.LaunchConfigurationType">
</configurationType>
</shortcut>
</extension>
@@ -111,7 +118,7 @@
<context
name="Debugging using Target Communication Framework"
description="Debugging using Target Communication Framework"
- id="org.eclipse.tm.tcf.debug.ui.debugging"
+ id="org.eclipse.tcf.debug.ui.debugging"
parentId="org.eclipse.debug.ui.debugging">
</context>
</extension>
@@ -122,8 +129,8 @@
name="TCF Trace"
icon="icons/tcf.gif"
category="org.eclipse.debug.ui"
- class="org.eclipse.tm.internal.tcf.debug.ui.trace.TraceView"
- id="org.eclipse.tm.tcf.TraceView">
+ class="org.eclipse.tcf.internal.debug.ui.trace.TraceView"
+ id="org.eclipse.tcf.TraceView">
</view>
</extension>
@@ -135,27 +142,27 @@
relative="org.eclipse.ui.console.ConsoleView"
relationship="stack"
visible="false"
- id="org.eclipse.tm.tcf.TraceView">
+ id="org.eclipse.tcf.TraceView">
</view>
</perspectiveExtension>
</extension>
<extension point="org.eclipse.ui.editors.annotationTypes">
<type
- name="org.eclipse.tm.tcf.debug.top_frame">
+ name="org.eclipse.tcf.debug.top_frame">
</type>
<type
- name="org.eclipse.tm.tcf.debug.stack_frame">
+ name="org.eclipse.tcf.debug.stack_frame">
</type>
<type
- name="org.eclipse.tm.tcf.debug.breakpoint_instance">
+ name="org.eclipse.tcf.debug.breakpoint_instance">
</type>
</extension>
<extension point="org.eclipse.ui.editors.markerAnnotationSpecification">
<specification
- annotationImageProvider="org.eclipse.tm.internal.tcf.debug.ui.model.TCFAnnotationImageProvider"
- annotationType="org.eclipse.tm.tcf.debug.top_frame"
+ annotationImageProvider="org.eclipse.tcf.internal.debug.ui.model.TCFAnnotationImageProvider"
+ annotationType="org.eclipse.tcf.debug.top_frame"
colorPreferenceKey="currentIPColor"
colorPreferenceValue="198,219,174"
highlightPreferenceKey="currentIPHighlight"
@@ -170,8 +177,8 @@
verticalRulerPreferenceValue="true">
</specification>
<specification
- annotationImageProvider="org.eclipse.tm.internal.tcf.debug.ui.model.TCFAnnotationImageProvider"
- annotationType="org.eclipse.tm.tcf.debug.stack_frame"
+ annotationImageProvider="org.eclipse.tcf.internal.debug.ui.model.TCFAnnotationImageProvider"
+ annotationType="org.eclipse.tcf.debug.stack_frame"
colorPreferenceKey="secondaryIPColor"
colorPreferenceValue="219,235,204"
highlightPreferenceKey="secondaryIPHighlight"
@@ -186,8 +193,8 @@
verticalRulerPreferenceValue="true">
</specification>
<specification
- annotationImageProvider="org.eclipse.tm.internal.tcf.debug.ui.model.TCFAnnotationImageProvider"
- annotationType="org.eclipse.tm.tcf.debug.breakpoint_instance"
+ annotationImageProvider="org.eclipse.tcf.internal.debug.ui.model.TCFAnnotationImageProvider"
+ annotationType="org.eclipse.tcf.debug.breakpoint_instance"
colorPreferenceKey="breakpointInstanceColor"
colorPreferenceValue="100,200,204"
highlightPreferenceKey="breakpointInstanceHighlight"
@@ -205,13 +212,13 @@
<extension point="org.eclipse.debug.ui.detailPaneFactories">
<detailFactories
- class="org.eclipse.tm.internal.tcf.debug.ui.model.TCFDetailPaneFactory"
- id="org.eclipse.tm.tcf.debug.DetailPaneFactory">
+ class="org.eclipse.tcf.internal.debug.ui.model.TCFDetailPaneFactory"
+ id="org.eclipse.tcf.debug.DetailPaneFactory">
<enablement>
<with variable="selection">
<iterate>
<or>
- <instanceof value="org.eclipse.tm.internal.tcf.debug.ui.model.TCFNode"/>
+ <instanceof value="org.eclipse.tcf.internal.debug.ui.model.TCFNode"/>
</or>
</iterate>
</with>
@@ -222,18 +229,18 @@
<extension point="org.eclipse.ui.popupMenus">
<!-- TCFLaunch popup menu contributions -->
<objectContribution
- id="org.eclipse.tm.tcf.debug.ui.TCFLaunch"
- objectClass="org.eclipse.tm.internal.tcf.debug.model.TCFLaunch">
+ id="org.eclipse.tcf.debug.ui.TCFLaunch"
+ objectClass="org.eclipse.tcf.internal.debug.model.TCFLaunch">
<action
- id="org.eclipse.tm.tcf.debug.ui.actions.Signals"
- class="org.eclipse.tm.internal.tcf.debug.ui.commands.SignalsCommand"
+ id="org.eclipse.tcf.debug.ui.actions.Signals"
+ class="org.eclipse.tcf.internal.debug.ui.commands.SignalsCommand"
icon="icons/signals.gif"
label="%Signals.label"
menubarPath="additions">
<enablement>
<pluginState
value="activated"
- id="org.eclipse.tm.tcf.debug.ui">
+ id="org.eclipse.tcf.debug.ui">
</pluginState>
</enablement>
</action>
@@ -241,44 +248,70 @@
<!-- TCFNode popup menu contributions -->
<objectContribution
- id="org.eclipse.tm.tcf.debug.ui.TCFNode"
- objectClass="org.eclipse.tm.internal.tcf.debug.ui.model.TCFNode">
+ id="org.eclipse.tcf.debug.ui.TCFNode"
+ objectClass="org.eclipse.tcf.internal.debug.ui.model.TCFNode">
<action
- id="org.eclipse.tm.tcf.debug.ui.actions.Signals"
- class="org.eclipse.tm.internal.tcf.debug.ui.commands.SignalsCommand"
+ id="org.eclipse.tcf.debug.ui.actions.Signals"
+ class="org.eclipse.tcf.internal.debug.ui.commands.SignalsCommand"
icon="icons/signals.gif"
label="%Signals.label"
menubarPath="additions">
<enablement>
<pluginState
value="activated"
- id="org.eclipse.tm.tcf.debug.ui">
+ id="org.eclipse.tcf.debug.ui">
</pluginState>
</enablement>
</action>
<action
- id="org.eclipse.tm.tcf.debug.ui.actions.MemoryMap"
- class="org.eclipse.tm.internal.tcf.debug.ui.commands.MemoryMapCommand"
+ id="org.eclipse.tcf.debug.ui.actions.MemoryMap"
+ class="org.eclipse.tcf.internal.debug.ui.commands.MemoryMapCommand"
icon="icons/memory-map.gif"
label="%MemoryMap.label"
menubarPath="additions">
<enablement>
<pluginState
value="activated"
- id="org.eclipse.tm.tcf.debug.ui">
+ id="org.eclipse.tcf.debug.ui">
</pluginState>
</enablement>
</action>
<action
- id="org.eclipse.tm.tcf.debug.ui.actions.Refresh"
- class="org.eclipse.tm.internal.tcf.debug.ui.commands.RefreshCommand"
+ id="org.eclipse.tcf.debug.ui.actions.Refresh"
+ class="org.eclipse.tcf.internal.debug.ui.commands.RefreshCommand"
icon="icons/refresh.gif"
label="%Refresh.label"
menubarPath="additions">
<enablement>
<pluginState
value="activated"
- id="org.eclipse.tm.tcf.debug.ui">
+ id="org.eclipse.tcf.debug.ui">
+ </pluginState>
+ </enablement>
+ </action>
+ <action
+ id="org.eclipse.tcf.debug.ui.actions.Console"
+ class="org.eclipse.tcf.internal.debug.ui.commands.ConsoleCommand"
+ icon="icons/console.gif"
+ label="%Console.label"
+ menubarPath="additions">
+ <enablement>
+ <pluginState
+ value="activated"
+ id="org.eclipse.tcf.debug.ui">
+ </pluginState>
+ </enablement>
+ </action>
+ <action
+ id="org.eclipse.tcf.debug.ui.actions.Detach"
+ class="org.eclipse.tcf.internal.debug.ui.commands.DetachCommand"
+ icon="icons/detach.gif"
+ label="%Detach.label"
+ menubarPath="additions">
+ <enablement>
+ <pluginState
+ value="activated"
+ id="org.eclipse.tcf.debug.ui">
</pluginState>
</enablement>
</action>
@@ -286,17 +319,17 @@
<!-- TCFNodeExpression popup menu contributions -->
<objectContribution
- id="org.eclipse.tm.tcf.debug.ui.TCFNodeExpression"
- objectClass="org.eclipse.tm.internal.tcf.debug.ui.model.TCFNodeExpression">
+ id="org.eclipse.tcf.debug.ui.TCFNodeExpression"
+ objectClass="org.eclipse.tcf.internal.debug.ui.model.TCFNodeExpression">
<action
- id="org.eclipse.tm.tcf.debug.ui.actions.ViewMemory"
- class="org.eclipse.tm.internal.tcf.debug.ui.commands.ViewMemoryCommand"
+ id="org.eclipse.tcf.debug.ui.actions.ViewMemory"
+ class="org.eclipse.tcf.internal.debug.ui.commands.ViewMemoryCommand"
label="%ViewMemory.label"
menubarPath="variableGroup">
<enablement>
<pluginState
value="activated"
- id="org.eclipse.tm.tcf.debug.ui">
+ id="org.eclipse.tcf.debug.ui">
</pluginState>
</enablement>
</action>
@@ -304,20 +337,20 @@
<!-- ICastToType popup menu contributions -->
<objectContribution
- id="org.eclipse.tm.tcf.debug.ui.CastToType"
- objectClass="org.eclipse.tm.internal.tcf.debug.ui.model.ICastToType">
+ id="org.eclipse.tcf.debug.ui.CastToType"
+ objectClass="org.eclipse.tcf.internal.debug.ui.model.ICastToType">
<action
label="%RestoreDefaultType.label"
helpContextId="restore_default_type_action_context"
tooltip="%RestoreDefaultType.tooltip"
- class="org.eclipse.tm.internal.tcf.debug.ui.commands.RestoreDefaultTypeCommand"
+ class="org.eclipse.tcf.internal.debug.ui.commands.RestoreDefaultTypeCommand"
menubarPath="variableGroup"
enablesFor="1"
- id="org.eclipse.tm.tcf.debug.ui.commands.RestoreDefaultType">
+ id="org.eclipse.tcf.debug.ui.commands.RestoreDefaultType">
<enablement>
<pluginState
value="activated"
- id="org.eclipse.tm.tcf.debug.ui">
+ id="org.eclipse.tcf.debug.ui">
</pluginState>
</enablement>
</action>
@@ -326,14 +359,14 @@
icon="icons/casttotype_co.gif"
helpContextId="cast_to_type_action_context"
tooltip="%CastToType.tooltip"
- class="org.eclipse.tm.internal.tcf.debug.ui.commands.CastToTypeCommand"
+ class="org.eclipse.tcf.internal.debug.ui.commands.CastToTypeCommand"
menubarPath="variableGroup"
enablesFor="1"
- id="org.eclipse.tm.tcf.debug.ui.commands.CastToType">
+ id="org.eclipse.tcf.debug.ui.commands.CastToType">
<enablement>
<pluginState
value="activated"
- id="org.eclipse.tm.tcf.debug.ui">
+ id="org.eclipse.tcf.debug.ui">
</pluginState>
</enablement>
</action>
@@ -342,14 +375,14 @@
icon="icons/showasarray_co.gif"
helpContextId="cast_to_array_action_context"
tooltip="%CastToArray.tooltip"
- class="org.eclipse.tm.internal.tcf.debug.ui.commands.CastToArrayCommand"
+ class="org.eclipse.tcf.internal.debug.ui.commands.CastToArrayCommand"
menubarPath="variableGroup"
enablesFor="1"
- id="org.eclipse.tm.tcf.debug.ui.commands.CastToArray">
+ id="org.eclipse.tcf.debug.ui.commands.CastToArray">
<enablement>
<pluginState
value="activated"
- id="org.eclipse.tm.tcf.debug.ui">
+ id="org.eclipse.tcf.debug.ui">
</pluginState>
</enablement>
</action>
@@ -357,17 +390,17 @@
<!-- IWatchInExpressions -->
<objectContribution
- id="org.eclipse.tm.tcf.debug.ui.WatchInExpressions"
- objectClass="org.eclipse.tm.internal.tcf.debug.ui.model.IWatchInExpressions">
+ id="org.eclipse.tcf.debug.ui.WatchInExpressions"
+ objectClass="org.eclipse.tcf.internal.debug.ui.model.IWatchInExpressions">
<action
- id="org.eclipse.tm.tcf.debug.ui.actions.WatchInExpressions"
- class="org.eclipse.tm.internal.tcf.debug.ui.commands.WatchInExpressionsCommand"
+ id="org.eclipse.tcf.debug.ui.actions.WatchInExpressions"
+ class="org.eclipse.tcf.internal.debug.ui.commands.WatchInExpressionsCommand"
label="%WatchInExpressions.label"
menubarPath="additions">
<enablement>
<pluginState
value="activated"
- id="org.eclipse.tm.tcf.debug.ui">
+ id="org.eclipse.tcf.debug.ui">
</pluginState>
</enablement>
</action>
@@ -379,28 +412,28 @@
<category
name="%commands.category.name"
description="%commands.category.desc"
- id="org.eclipse.tm.tcf.debug.ui.commands">
+ id="org.eclipse.tcf.debug.ui.commands">
</category>
<command
- categoryId="org.eclipse.tm.tcf.debug.ui.commands"
- defaultHandler="org.eclipse.tm.internal.tcf.debug.ui.commands.RefreshHandler"
- id="org.eclipse.tm.tcf.debug.ui.commands.refresh"
+ categoryId="org.eclipse.tcf.debug.ui.commands"
+ defaultHandler="org.eclipse.tcf.internal.debug.ui.commands.RefreshHandler"
+ id="org.eclipse.tcf.debug.ui.commands.refresh"
name="%Refresh.label"/>
</extension>
<extension point="org.eclipse.ui.handlers">
<handler
- class="org.eclipse.tm.internal.tcf.debug.ui.commands.RefreshHandler"
+ class="org.eclipse.tcf.internal.debug.ui.commands.RefreshHandler"
commandId="org.eclipse.ui.file.refresh">
<activeWhen>
<and>
<with variable="activeContexts">
<iterate ifEmpty="false" operator="or">
- <equals value="org.eclipse.tm.tcf.debug.ui.debugging"/>
+ <equals value="org.eclipse.tcf.debug.ui.debugging"/>
</iterate>
</with>
<with variable="activePart">
- <test property="org.eclipse.tm.tcf.launch.areUpdatePoliciesSupported"/>
+ <test property="org.eclipse.tcf.launch.areUpdatePoliciesSupported"/>
</with>
</and>
</activeWhen>
@@ -413,15 +446,15 @@
<menuContribution
locationURI="toolbar:org.eclipse.debug.ui.RegisterView?after=additions">
<command
- commandId="org.eclipse.tm.tcf.debug.ui.commands.refresh"
+ commandId="org.eclipse.tcf.debug.ui.commands.refresh"
icon="icons/refresh.gif"
- id="org.eclipse.tm.tcf.debug.ui.commands.refresh.registers"
+ id="org.eclipse.tcf.debug.ui.commands.refresh.registers"
label="%Refresh.label"
style="push">
<visibleWhen checkEnabled="false">
<with variable="activeContexts">
<iterate ifEmpty="false" operator="or">
- <equals value="org.eclipse.tm.tcf.debug.ui.debugging"/>
+ <equals value="org.eclipse.tcf.debug.ui.debugging"/>
</iterate>
</with>
</visibleWhen>
@@ -431,32 +464,32 @@
locationURI="menu:org.eclipse.debug.ui.RegisterView?after=additions">
<menu
label="%UpdatePolicy.label"
- id="org.eclipse.tm.tcf.debug.ui.commands.update.policy.registers">
+ id="org.eclipse.tcf.debug.ui.commands.update.policy.registers">
<visibleWhen checkEnabled="false">
<with variable="activeContexts">
<iterate ifEmpty="false" operator="or">
- <equals value="org.eclipse.tm.tcf.debug.ui.debugging"/>
+ <equals value="org.eclipse.tcf.debug.ui.debugging"/>
</iterate>
</with>
</visibleWhen>
<dynamic
- id="org.eclipse.tm.tcf.debug.ui.commands.update.policy.registers.menu"
- class="org.eclipse.tm.internal.tcf.debug.ui.commands.UpdatePolicyMenu"/>
+ id="org.eclipse.tcf.debug.ui.commands.update.policy.registers.menu"
+ class="org.eclipse.tcf.internal.debug.ui.commands.UpdatePolicyMenu"/>
</menu>
</menuContribution>
<!-- Variables View -->
<menuContribution
locationURI="toolbar:org.eclipse.debug.ui.VariableView?after=additions">
<command
- commandId="org.eclipse.tm.tcf.debug.ui.commands.refresh"
+ commandId="org.eclipse.tcf.debug.ui.commands.refresh"
icon="icons/refresh.gif"
- id="org.eclipse.tm.tcf.debug.ui.commands.refresh.variables"
+ id="org.eclipse.tcf.debug.ui.commands.refresh.variables"
label="%Refresh.label"
style="push">
<visibleWhen checkEnabled="false">
<with variable="activeContexts">
<iterate ifEmpty="false" operator="or">
- <equals value="org.eclipse.tm.tcf.debug.ui.debugging"/>
+ <equals value="org.eclipse.tcf.debug.ui.debugging"/>
</iterate>
</with>
</visibleWhen>
@@ -466,32 +499,32 @@
locationURI="menu:org.eclipse.debug.ui.VariableView?after=additions">
<menu
label="%UpdatePolicy.label"
- id="org.eclipse.tm.tcf.debug.ui.commands.update.policy.variables">
+ id="org.eclipse.tcf.debug.ui.commands.update.policy.variables">
<visibleWhen checkEnabled="false">
<with variable="activeContexts">
<iterate ifEmpty="false" operator="or">
- <equals value="org.eclipse.tm.tcf.debug.ui.debugging"/>
+ <equals value="org.eclipse.tcf.debug.ui.debugging"/>
</iterate>
</with>
</visibleWhen>
<dynamic
- id="org.eclipse.tm.tcf.debug.ui.commands.update.policy.variables.menu"
- class="org.eclipse.tm.internal.tcf.debug.ui.commands.UpdatePolicyMenu"/>
+ id="org.eclipse.tcf.debug.ui.commands.update.policy.variables.menu"
+ class="org.eclipse.tcf.internal.debug.ui.commands.UpdatePolicyMenu"/>
</menu>
</menuContribution>
<!-- Expressions View -->
<menuContribution
locationURI="toolbar:org.eclipse.debug.ui.ExpressionView?after=additions">
<command
- commandId="org.eclipse.tm.tcf.debug.ui.commands.refresh"
+ commandId="org.eclipse.tcf.debug.ui.commands.refresh"
icon="icons/refresh.gif"
- id="org.eclipse.tm.tcf.debug.ui.commands.refresh.expressions"
+ id="org.eclipse.tcf.debug.ui.commands.refresh.expressions"
label="%Refresh.label"
style="push">
<visibleWhen checkEnabled="false">
<with variable="activeContexts">
<iterate ifEmpty="false" operator="or">
- <equals value="org.eclipse.tm.tcf.debug.ui.debugging"/>
+ <equals value="org.eclipse.tcf.debug.ui.debugging"/>
</iterate>
</with>
</visibleWhen>
@@ -501,32 +534,32 @@
locationURI="menu:org.eclipse.debug.ui.ExpressionView?after=additions">
<menu
label="%UpdatePolicy.label"
- id="org.eclipse.tm.tcf.debug.ui.commands.update.policy.expressions">
+ id="org.eclipse.tcf.debug.ui.commands.update.policy.expressions">
<visibleWhen checkEnabled="false">
<with variable="activeContexts">
<iterate ifEmpty="false" operator="or">
- <equals value="org.eclipse.tm.tcf.debug.ui.debugging"/>
+ <equals value="org.eclipse.tcf.debug.ui.debugging"/>
</iterate>
</with>
</visibleWhen>
<dynamic
- id="org.eclipse.tm.tcf.debug.ui.commands.update.policy.expressions.menu"
- class="org.eclipse.tm.internal.tcf.debug.ui.commands.UpdatePolicyMenu"/>
+ id="org.eclipse.tcf.debug.ui.commands.update.policy.expressions.menu"
+ class="org.eclipse.tcf.internal.debug.ui.commands.UpdatePolicyMenu"/>
</menu>
</menuContribution>
<!-- Modules View -->
<menuContribution
locationURI="toolbar:org.eclipse.debug.ui.ModuleView?after=additions">
<command
- commandId="org.eclipse.tm.tcf.debug.ui.commands.refresh"
+ commandId="org.eclipse.tcf.debug.ui.commands.refresh"
icon="icons/refresh.gif"
- id="org.eclipse.tm.tcf.debug.ui.commands.refresh.modules"
+ id="org.eclipse.tcf.debug.ui.commands.refresh.modules"
label="%Refresh.label"
style="push">
<visibleWhen checkEnabled="false">
<with variable="activeContexts">
<iterate ifEmpty="false" operator="or">
- <equals value="org.eclipse.tm.tcf.debug.ui.debugging"/>
+ <equals value="org.eclipse.tcf.debug.ui.debugging"/>
</iterate>
</with>
</visibleWhen>
@@ -536,32 +569,32 @@
locationURI="menu:org.eclipse.debug.ui.ModuleView?after=additions">
<menu
label="%UpdatePolicy.label"
- id="org.eclipse.tm.tcf.debug.ui.commands.update.policy.modules">
+ id="org.eclipse.tcf.debug.ui.commands.update.policy.modules">
<visibleWhen checkEnabled="false">
<with variable="activeContexts">
<iterate ifEmpty="false" operator="or">
- <equals value="org.eclipse.tm.tcf.debug.ui.debugging"/>
+ <equals value="org.eclipse.tcf.debug.ui.debugging"/>
</iterate>
</with>
</visibleWhen>
<dynamic
- id="org.eclipse.tm.tcf.debug.ui.commands.update.policy.modules.menu"
- class="org.eclipse.tm.internal.tcf.debug.ui.commands.UpdatePolicyMenu"/>
+ id="org.eclipse.tcf.debug.ui.commands.update.policy.modules.menu"
+ class="org.eclipse.tcf.internal.debug.ui.commands.UpdatePolicyMenu"/>
</menu>
</menuContribution>
<!-- Memory View -->
<menuContribution
locationURI="toolbar:org.eclipse.debug.ui.MemoryView?after=additions">
<command
- commandId="org.eclipse.tm.tcf.debug.ui.commands.refresh"
+ commandId="org.eclipse.tcf.debug.ui.commands.refresh"
icon="icons/refresh.gif"
- id="org.eclipse.tm.tcf.debug.ui.commands.refresh.memory"
+ id="org.eclipse.tcf.debug.ui.commands.refresh.memory"
label="%Refresh.label"
style="push">
<visibleWhen checkEnabled="false">
<with variable="activeContexts">
<iterate ifEmpty="false" operator="or">
- <equals value="org.eclipse.tm.tcf.debug.ui.debugging"/>
+ <equals value="org.eclipse.tcf.debug.ui.debugging"/>
</iterate>
</with>
</visibleWhen>
@@ -571,17 +604,17 @@
locationURI="menu:org.eclipse.debug.ui.MemoryView?after=additions">
<menu
label="%UpdatePolicy.label"
- id="org.eclipse.tm.tcf.debug.ui.commands.update.policy.memory">
+ id="org.eclipse.tcf.debug.ui.commands.update.policy.memory">
<visibleWhen checkEnabled="false">
<with variable="activeContexts">
<iterate ifEmpty="false" operator="or">
- <equals value="org.eclipse.tm.tcf.debug.ui.debugging"/>
+ <equals value="org.eclipse.tcf.debug.ui.debugging"/>
</iterate>
</with>
</visibleWhen>
<dynamic
- id="org.eclipse.tm.tcf.debug.ui.commands.update.policy.memory.menu"
- class="org.eclipse.tm.internal.tcf.debug.ui.commands.UpdatePolicyMenu"/>
+ id="org.eclipse.tcf.debug.ui.commands.update.policy.memory.menu"
+ class="org.eclipse.tcf.internal.debug.ui.commands.UpdatePolicyMenu"/>
</menu>
</menuContribution>
</extension>
@@ -593,24 +626,24 @@
primaryId="org.eclipse.debug.ui.rendering.raw_memory"
renderingIds="org.eclipse.debug.ui.rendering.raw_memory,org.eclipse.debug.ui.rendering.ascii,org.eclipse.debug.ui.rendering.signedint,org.eclipse.debug.ui.rendering.unsignedint,org.eclipse.debug.ui.rendering.hexint">
<enablement>
- <instanceof value="org.eclipse.tm.internal.tcf.debug.ui.model.TCFMemoryBlockRetrieval$MemoryBlock"/>
+ <instanceof value="org.eclipse.tcf.internal.debug.ui.model.TCFMemoryBlockRetrieval$MemoryBlock"/>
</enablement>
</renderingBindings>
</extension>
<extension point="org.eclipse.debug.ui.debugModelContextBindings">
<modelContextBinding
- contextId="org.eclipse.tm.tcf.debug.ui.debugging"
- debugModelId="org.eclipse.tm.tcf.debug"/>
+ contextId="org.eclipse.tcf.debug.ui.debugging"
+ debugModelId="org.eclipse.tcf.debug"/>
</extension>
<extension point="org.eclipse.ui.propertyPages">
- <page class="org.eclipse.tm.internal.tcf.debug.ui.properties.TCFPropertyPage"
+ <page class="org.eclipse.tcf.internal.debug.ui.properties.TCFPropertyPage"
id="org.eclipse.tcf.debug.node.propertyPage"
name="%propertyPage.name">
- <filter name="debugModelId" value="org.eclipse.tm.tcf.debug"/>
+ <filter name="debugModelId" value="org.eclipse.tcf.debug"/>
<enabledWhen>
- <instanceof value="org.eclipse.tm.internal.tcf.debug.ui.model.TCFNode"/>
+ <instanceof value="org.eclipse.tcf.internal.debug.ui.model.TCFNode"/>
</enabledWhen>
</page>
</extension>
@@ -619,13 +652,13 @@
point="org.eclipse.ui.preferencePages">
<page
category="org.eclipse.debug.ui.DebugPreferencePage"
- class="org.eclipse.tm.internal.tcf.debug.ui.preferences.TCFDebugPreferencePage"
- id="org.eclipse.tm.internal.tcf.debug.ui.preferences"
+ class="org.eclipse.tcf.internal.debug.ui.preferences.TCFDebugPreferencePage"
+ id="org.eclipse.tcf.internal.debug.ui.preferences"
name="%preferencePage.name">
</page>
</extension>
<extension point="org.eclipse.core.runtime.preferences">
- <initializer class="org.eclipse.tm.internal.tcf.debug.ui.preferences.TCFPreferencesInitializer"/>
+ <initializer class="org.eclipse.tcf.internal.debug.ui.preferences.TCFPreferencesInitializer"/>
</extension>
</plugin>
diff --git a/plugins/org.eclipse.tm.tcf.debug/pom.xml b/plugins/org.eclipse.tcf.debug.ui/pom.xml
index 67b5910d0..5d0a3e195 100644
--- a/plugins/org.eclipse.tm.tcf.debug/pom.xml
+++ b/plugins/org.eclipse.tcf.debug.ui/pom.xml
@@ -7,11 +7,11 @@
<parent>
<groupId>org.eclipse.tcf</groupId>
<artifactId>tcf-parent</artifactId>
- <version>0.5.0-SNAPSHOT</version>
+ <version>1.0.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
- <version>0.5.0-SNAPSHOT</version>
- <artifactId>org.eclipse.tm.tcf.debug</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <artifactId>org.eclipse.tcf.debug.ui</artifactId>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/schema/launch_context.exsd b/plugins/org.eclipse.tcf.debug.ui/schema/launch_context.exsd
index 473255026..a391ec5fa 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/schema/launch_context.exsd
+++ b/plugins/org.eclipse.tcf.debug.ui/schema/launch_context.exsd
@@ -1,9 +1,9 @@
<?xml version='1.0' encoding='UTF-8'?>
<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.tm.tcf">
+<schema targetNamespace="org.eclipse.tcf">
<annotation>
<appInfo>
- <meta.schema plugin="org.eclipse.tm.tcf.debug.ui" id="launch_context" name="TCF Launch Context"/>
+ <meta.schema plugin="org.eclipse.tcf.debug.ui" id="launch_context" name="TCF Launch Context"/>
</appInfo>
<documentation>
This extension point is used to register plugins
diff --git a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/debug/ui/ITCFObject.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/debug/ui/ITCFObject.java
new file mode 100644
index 000000000..a5d158902
--- /dev/null
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/debug/ui/ITCFObject.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.debug.ui;
+
+import org.eclipse.tcf.protocol.IChannel;
+
+/**
+ * ITCFObject is an interface that is implemented by all TCF debug model elements.
+ * A visual element in a debugger view can be adapted to this interface -
+ * if the element represents a remote TCF object.
+ * Clients can get communication channel and ID of the object,
+ * and use them to access the object through TCF service interfaces.
+ */
+public interface ITCFObject {
+
+ /**
+ * Get TCF ID of the object.
+ * @return TCF ID
+ */
+ public String getID();
+
+ /**
+ * Get IChannel of the debug model that owns this object.
+ * @return IChannel object
+ */
+ public IChannel getChannel();
+}
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/Activator.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/Activator.java
index ae58135e7..0d0f05674 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/Activator.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/Activator.java
@@ -8,13 +8,13 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui;
+package org.eclipse.tcf.internal.debug.ui;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFAnnotationManager;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFModelManager;
-import org.eclipse.tm.tcf.protocol.Protocol;
+import org.eclipse.tcf.internal.debug.ui.model.TCFAnnotationManager;
+import org.eclipse.tcf.internal.debug.ui.model.TCFModelManager;
+import org.eclipse.tcf.protocol.Protocol;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
@@ -23,7 +23,7 @@ import org.osgi.framework.BundleContext;
*/
public class Activator extends AbstractUIPlugin {
- public static final String PLUGIN_ID = "org.eclipse.tm.tcf.debug.ui";
+ public static final String PLUGIN_ID = "org.eclipse.tcf.debug.ui";
private static final Object lock = new Object();
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/ImageCache.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/ImageCache.java
index 76d445be0..ea945349b 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/ImageCache.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/ImageCache.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui;
+package org.eclipse.tcf.internal.debug.ui;
import java.net.URL;
import java.util.HashMap;
@@ -63,6 +63,7 @@ public class ImageCache {
IMG_BREAKPOINT_DISABLED = "icons/full/obj16/brkpd_obj.gif",
IMG_BREAKPOINT_INSTALLED = "icons/ovr16/installed_ovr.gif",
IMG_BREAKPOINT_CONDITIONAL = "icons/ovr16/conditional_ovr.gif",
+ IMG_BREAKPOINT_MOVED = "icons/moved_ovr.gif",
IMG_BREAKPOINT_WARNING = "icons/ovr16/warning_ovr.gif",
IMG_BREAKPOINT_ERROR = "icons/ovr16/error_ovr.gif",
IMG_BREAKPOINT_OVERLAY = "icons/brkp_ovr.gif";
diff --git a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/adapters/TCFBreakpointAdapterFactory.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/adapters/TCFBreakpointAdapterFactory.java
new file mode 100644
index 000000000..af07cf9c5
--- /dev/null
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/adapters/TCFBreakpointAdapterFactory.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.internal.debug.ui.adapters;
+
+import org.eclipse.core.runtime.IAdapterFactory;
+import org.eclipse.debug.core.model.IBreakpoint;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ILabelProviderListener;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.tcf.internal.debug.ui.model.TCFModelManager;
+import org.eclipse.tcf.internal.debug.ui.model.TCFModelPresentation;
+
+public class TCFBreakpointAdapterFactory implements IAdapterFactory {
+
+ private static final Class<?>[] adapter_list = {
+ ILabelProvider.class,
+ };
+
+ private static final ILabelProvider label_provider = new ILabelProvider() {
+
+ public void removeListener(ILabelProviderListener listener) {
+ }
+
+ public boolean isLabelProperty(Object element, String property) {
+ return false;
+ }
+
+ public void dispose() {
+ }
+
+ public void addListener(ILabelProviderListener listener) {
+ }
+
+ public String getText(Object element) {
+ return TCFModelPresentation.getDefault().getText(element);
+ }
+
+ public Image getImage(Object element) {
+ return TCFModelPresentation.getDefault().getImage(element);
+ }
+ };
+
+ @SuppressWarnings("rawtypes")
+ public Object getAdapter(Object obj, Class cls) {
+ if (obj instanceof IBreakpoint) {
+ //TCFModelManager.getModelManager().
+ if (cls == ILabelProvider.class) return label_provider;
+ }
+ return null;
+ }
+
+ @SuppressWarnings("rawtypes")
+ public Class[] getAdapterList() {
+ return adapter_list;
+ }
+}
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/adapters/TCFLaunchAdapterFactory.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/adapters/TCFLaunchAdapterFactory.java
index 7bb5dc9b9..072f11093 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/adapters/TCFLaunchAdapterFactory.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/adapters/TCFLaunchAdapterFactory.java
@@ -8,17 +8,17 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.adapters;
+package org.eclipse.tcf.internal.debug.ui.adapters;
import org.eclipse.core.runtime.IAdapterFactory;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementContentProvider;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementLabelProvider;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxyFactory;
import org.eclipse.debug.ui.contexts.ISuspendTrigger;
-import org.eclipse.tm.internal.tcf.debug.model.TCFLaunch;
-import org.eclipse.tm.internal.tcf.debug.ui.Activator;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFModel;
-import org.eclipse.tm.tcf.util.TCFTask;
+import org.eclipse.tcf.internal.debug.model.TCFLaunch;
+import org.eclipse.tcf.internal.debug.ui.Activator;
+import org.eclipse.tcf.internal.debug.ui.model.TCFModel;
+import org.eclipse.tcf.util.TCFTask;
public class TCFLaunchAdapterFactory implements IAdapterFactory {
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/adapters/TCFLaunchLabelProvider.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/adapters/TCFLaunchLabelProvider.java
index 701cfecfc..3fe1d304b 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/adapters/TCFLaunchLabelProvider.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/adapters/TCFLaunchLabelProvider.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.adapters;
+package org.eclipse.tcf.internal.debug.ui.adapters;
import java.util.Collection;
import java.util.Map;
@@ -19,10 +19,10 @@ import org.eclipse.debug.internal.ui.viewers.model.provisional.ILabelUpdate;
import org.eclipse.debug.ui.DebugUITools;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.swt.graphics.RGB;
-import org.eclipse.tm.internal.tcf.debug.model.TCFLaunch;
-import org.eclipse.tm.internal.tcf.debug.ui.ImageCache;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFModel;
-import org.eclipse.tm.tcf.services.IProcesses;
+import org.eclipse.tcf.internal.debug.model.TCFLaunch;
+import org.eclipse.tcf.internal.debug.ui.ImageCache;
+import org.eclipse.tcf.internal.debug.ui.model.TCFModel;
+import org.eclipse.tcf.services.IProcesses;
class TCFLaunchLabelProvider implements IElementLabelProvider {
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/adapters/TCFNodeAdapterFactory.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/adapters/TCFNodeAdapterFactory.java
index e426c6174..4bbe8ba05 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/adapters/TCFNodeAdapterFactory.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/adapters/TCFNodeAdapterFactory.java
@@ -8,13 +8,13 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.adapters;
+package org.eclipse.tcf.internal.debug.ui.adapters;
import org.eclipse.core.runtime.IAdapterFactory;
import org.eclipse.debug.ui.actions.IToggleBreakpointsTarget;
import org.eclipse.debug.ui.actions.IToggleBreakpointsTargetExtension;
-import org.eclipse.tm.internal.tcf.debug.ui.commands.BreakpointCommand;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNode;
+import org.eclipse.tcf.internal.debug.ui.commands.BreakpointCommand;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNode;
import org.eclipse.ui.views.properties.IPropertySource;
diff --git a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/adapters/TCFNodePropertySource.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/adapters/TCFNodePropertySource.java
new file mode 100644
index 000000000..08768367f
--- /dev/null
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/adapters/TCFNodePropertySource.java
@@ -0,0 +1,260 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.internal.debug.ui.adapters;
+
+import java.math.BigInteger;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.debug.ui.IDebugView;
+import org.eclipse.swt.graphics.Device;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.tcf.internal.debug.model.TCFContextState;
+import org.eclipse.tcf.internal.debug.model.TCFSourceRef;
+import org.eclipse.tcf.internal.debug.ui.Activator;
+import org.eclipse.tcf.internal.debug.ui.model.TCFModel;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNode;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNodeExecContext;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNodeExecContext.MemoryRegion;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNodeStackFrame;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.JSON;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.services.IRunControl;
+import org.eclipse.tcf.services.IStackTrace;
+import org.eclipse.tcf.util.TCFDataCache;
+import org.eclipse.tcf.util.TCFTask;
+import org.eclipse.ui.IViewPart;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.views.properties.IPropertyDescriptor;
+import org.eclipse.ui.views.properties.IPropertySource;
+import org.eclipse.ui.views.properties.PropertyDescriptor;
+import org.eclipse.ui.views.properties.PropertySheet;
+import org.eclipse.ui.views.properties.PropertySheetPage;
+
+/**
+ * Adapts TCFNode to IPropertySource.
+ */
+public class TCFNodePropertySource implements IPropertySource {
+
+ private final TCFNode node;
+ private final Map<String, Object> properties = new HashMap<String, Object>();
+
+ private IPropertyDescriptor[] descriptors;
+
+ public TCFNodePropertySource(TCFNode node) {
+ this.node = node;
+ }
+
+ public Object getEditableValue() {
+ return null;
+ }
+
+ public IPropertyDescriptor[] getPropertyDescriptors() {
+ if (descriptors == null) {
+ try {
+ final List<IPropertyDescriptor> list = new ArrayList<IPropertyDescriptor>();
+ descriptors = new TCFTask<IPropertyDescriptor[]>(node.getChannel()) {
+ public void run() {
+ list.clear();
+ properties.clear();
+ if (node instanceof TCFNodeExecContext) {
+ getExecContextDescriptors((TCFNodeExecContext)node);
+ }
+ else if (node instanceof TCFNodeStackFrame) {
+ getFrameDescriptors((TCFNodeStackFrame)node);
+ }
+ else {
+ done(list.toArray(new IPropertyDescriptor[list.size()]));
+ }
+ }
+
+ private void getFrameDescriptors(TCFNodeStackFrame frameNode) {
+ TCFDataCache<IStackTrace.StackTraceContext> ctx_cache = frameNode.getStackTraceContext();
+ TCFDataCache<TCFSourceRef> line_info_cache = frameNode.getLineInfo();
+ if (!validateAll(ctx_cache, line_info_cache)) return;
+ IStackTrace.StackTraceContext ctx = ctx_cache.getData();
+ if (ctx != null) {
+ Map<String, Object> props = ctx.getProperties();
+ for (String key : props.keySet()) {
+ Object value = props.get(key);
+ if (value instanceof Number) {
+ value = toHexAddrString((Number)value);
+ }
+ addDescriptor("Context", key, value);
+ }
+ }
+ TCFSourceRef ref = line_info_cache.getData();
+ if (ref != null) {
+ if (ref.area != null) {
+ if (ref.area.directory != null) addDescriptor("Source", "Directory", ref.area.directory);
+ if (ref.area.file != null) addDescriptor("Source", "File", ref.area.file);
+ if (ref.area.start_line > 0) addDescriptor("Source", "Line", ref.area.start_line);
+ if (ref.area.start_column > 0) addDescriptor("Source", "Column", ref.area.start_column);
+ }
+ if (ref.error != null) {
+ addDescriptor("Source", "Error", TCFModel.getErrorMessage(ref.error, false));
+ }
+ }
+ done(list.toArray(new IPropertyDescriptor[list.size()]));
+ }
+
+ private void getExecContextDescriptors(TCFNodeExecContext exe_node) {
+ TCFDataCache<IRunControl.RunControlContext> ctx_cache = exe_node.getRunContext();
+ TCFDataCache<TCFContextState> state_cache = exe_node.getState();
+ TCFDataCache<MemoryRegion[]> mem_map_cache = exe_node.getMemoryMap();
+ if (!validateAll(ctx_cache, state_cache, mem_map_cache)) return;
+ IRunControl.RunControlContext ctx = ctx_cache.getData();
+ if (ctx != null) {
+ Map<String, Object> props = ctx.getProperties();
+ for (String key : props.keySet()) {
+ Object value = props.get(key);
+ if (value instanceof Number) {
+ value = toHexAddrString((Number)value);
+ }
+ addDescriptor("Context", key, value);
+ }
+ }
+ TCFContextState state = state_cache.getData();
+ if (state != null) {
+ addDescriptor("State", "Suspended", state.is_suspended);
+ if (state.suspend_reason != null) addDescriptor("State", "Suspend reason", state.suspend_reason);
+ if (state.suspend_pc != null) addDescriptor("State", "PC", toHexAddrString(new BigInteger(state.suspend_pc)));
+ addDescriptor("State", "Active", !exe_node.isNotActive());
+ if (state.suspend_params != null) {
+ for (String key : state.suspend_params.keySet()) {
+ Object value = state.suspend_params.get(key);
+ if (value instanceof Number) {
+ value = toHexAddrString((Number)value);
+ }
+ addDescriptor("State Properties", key, value);
+ }
+ }
+ }
+ MemoryRegion[] mem_map = mem_map_cache.getData();
+ if (mem_map != null && mem_map.length > 0) {
+ int idx = 0;
+ for (MemoryRegion region : mem_map) {
+ Map<String, Object> props = region.region.getProperties();
+ for (String key : props.keySet()) {
+ Object value = props.get(key);
+ if (value instanceof Number) {
+ value = toHexAddrString((Number)value);
+ }
+ addDescriptor("MemoryRegion[" + idx + ']', key, value);
+ }
+ idx++;
+ }
+ }
+ done(list.toArray(new IPropertyDescriptor[list.size()]));
+ }
+
+ private void addDescriptor(String category, String key, Object value) {
+ String id = category + '.' + key;
+ PropertyDescriptor desc = new PropertyDescriptor(id, key);
+ desc.setCategory(category);
+ list.add(desc);
+ properties.put(id, value);
+ }
+
+ boolean validateAll(TCFDataCache<?>... caches) {
+ TCFDataCache<?> pending = null;
+ for (TCFDataCache<?> cache : caches) {
+ if (!cache.validate()) pending = cache;
+ }
+ if (pending != null) {
+ pending.wait(this);
+ return false;
+ }
+ return true;
+ }
+ }.get();
+ }
+ catch (Exception e) {
+ if (node.getChannel().getState() != IChannel.STATE_CLOSED) {
+ Activator.log("Error retrieving property data", e);
+ }
+ descriptors = new IPropertyDescriptor[0];
+ }
+ }
+ return descriptors;
+ }
+
+ public Object getPropertyValue(final Object id) {
+ return properties.get(id);
+ }
+
+ public boolean isPropertySet(Object id) {
+ return false;
+ }
+
+ public void resetPropertyValue(Object id) {
+ }
+
+ public void setPropertyValue(Object id, Object value) {
+ }
+
+ private static String toHexAddrString(Number num) {
+ BigInteger n = JSON.toBigInteger(num);
+ String s = n.toString(16);
+ int sz = s.length() > 8 ? 16 : 8;
+ int l = sz - s.length();
+ if (l < 0) l = 0;
+ if (l > 16) l = 16;
+ return "0x0000000000000000".substring(0, 2 + l) + s;
+ }
+
+ private static final long REFRESH_DELAY = 250;
+ private static boolean refresh_posted = false;
+ private static long refresh_time = 0;
+
+ public static void refresh(TCFNode node) {
+ assert Protocol.isDispatchThread();
+ refresh_time = System.currentTimeMillis();
+ if (refresh_posted) return;
+ refresh_posted = true;
+ Protocol.invokeLater(REFRESH_DELAY, new Runnable() {
+ public void run() {
+ long time = System.currentTimeMillis();
+ if (time - refresh_time < REFRESH_DELAY * 3 / 4) {
+ Protocol.invokeLater(refresh_time + REFRESH_DELAY - time, this);
+ return;
+ }
+ refresh_posted = false;
+ synchronized (Device.class) {
+ Display display = Display.getDefault();
+ if (!display.isDisposed()) {
+ display.asyncExec(new Runnable() {
+ public void run() {
+ for (IWorkbenchWindow window : PlatformUI.getWorkbench().getWorkbenchWindows()) {
+ IWorkbenchPart active_part = window.getActivePage().getActivePart();
+ if (active_part instanceof IDebugView) {
+ IViewPart part = window.getActivePage().findView("org.eclipse.ui.views.PropertySheet");
+ if (part instanceof PropertySheet) {
+ PropertySheet props = (PropertySheet)part;
+ PropertySheetPage page = (PropertySheetPage)props.getCurrentPage();
+ // TODO: need to check Properties view selection to skip unnecessary refreshes
+ if (page != null) page.refresh();
+ }
+ }
+ }
+ }
+ });
+ }
+ }
+ }
+ });
+ }
+}
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/AbstractActionDelegate.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/AbstractActionDelegate.java
index d46939ca3..71abba37e 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/AbstractActionDelegate.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/AbstractActionDelegate.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.commands;
+package org.eclipse.tcf.internal.debug.ui.commands;
import java.util.ArrayList;
@@ -16,11 +16,11 @@ import org.eclipse.jface.action.IAction;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.swt.widgets.Event;
-import org.eclipse.tm.internal.tcf.debug.model.TCFLaunch;
-import org.eclipse.tm.internal.tcf.debug.ui.Activator;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFModel;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNode;
-import org.eclipse.tm.tcf.util.TCFTask;
+import org.eclipse.tcf.internal.debug.model.TCFLaunch;
+import org.eclipse.tcf.internal.debug.ui.Activator;
+import org.eclipse.tcf.internal.debug.ui.model.TCFModel;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNode;
+import org.eclipse.tcf.util.TCFTask;
import org.eclipse.ui.IActionDelegate2;
import org.eclipse.ui.IObjectActionDelegate;
import org.eclipse.ui.IViewActionDelegate;
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/BackIntoCommand.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/BackIntoCommand.java
index 15bbe73c3..19fbed870 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/BackIntoCommand.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/BackIntoCommand.java
@@ -8,21 +8,21 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.commands;
+package org.eclipse.tcf.internal.debug.ui.commands;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.debug.core.commands.IDebugCommandRequest;
-import org.eclipse.tm.internal.tcf.debug.actions.TCFActionStepInto;
-import org.eclipse.tm.internal.tcf.debug.model.TCFContextState;
-import org.eclipse.tm.internal.tcf.debug.model.TCFSourceRef;
-import org.eclipse.tm.internal.tcf.debug.ui.Activator;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFModel;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNodeExecContext;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNodeStackFrame;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.services.IRunControl;
-import org.eclipse.tm.tcf.util.TCFDataCache;
+import org.eclipse.tcf.internal.debug.actions.TCFActionStepInto;
+import org.eclipse.tcf.internal.debug.model.TCFContextState;
+import org.eclipse.tcf.internal.debug.model.TCFSourceRef;
+import org.eclipse.tcf.internal.debug.ui.Activator;
+import org.eclipse.tcf.internal.debug.ui.model.TCFModel;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNodeExecContext;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNodeStackFrame;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.services.IRunControl;
+import org.eclipse.tcf.util.TCFDataCache;
public class BackIntoCommand extends StepCommand {
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/BackOverCommand.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/BackOverCommand.java
index 35e4af1e8..222361d6f 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/BackOverCommand.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/BackOverCommand.java
@@ -8,23 +8,23 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.commands;
+package org.eclipse.tcf.internal.debug.ui.commands;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.debug.core.commands.IDebugCommandRequest;
-import org.eclipse.tm.internal.tcf.debug.actions.TCFActionStepOver;
-import org.eclipse.tm.internal.tcf.debug.model.TCFContextState;
-import org.eclipse.tm.internal.tcf.debug.model.TCFSourceRef;
-import org.eclipse.tm.internal.tcf.debug.ui.Activator;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFModel;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNodeExecContext;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNodeStackFrame;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.services.IBreakpoints;
-import org.eclipse.tm.tcf.services.IRunControl;
-import org.eclipse.tm.tcf.services.IStackTrace.StackTraceContext;
-import org.eclipse.tm.tcf.util.TCFDataCache;
+import org.eclipse.tcf.internal.debug.actions.TCFActionStepOver;
+import org.eclipse.tcf.internal.debug.model.TCFContextState;
+import org.eclipse.tcf.internal.debug.model.TCFSourceRef;
+import org.eclipse.tcf.internal.debug.ui.Activator;
+import org.eclipse.tcf.internal.debug.ui.model.TCFModel;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNodeExecContext;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNodeStackFrame;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.services.IBreakpoints;
+import org.eclipse.tcf.services.IRunControl;
+import org.eclipse.tcf.services.IStackTrace.StackTraceContext;
+import org.eclipse.tcf.util.TCFDataCache;
public class BackOverCommand extends StepCommand {
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/BackResumeCommand.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/BackResumeCommand.java
index 051883bc8..387771f5e 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/BackResumeCommand.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/BackResumeCommand.java
@@ -8,18 +8,18 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.commands;
+package org.eclipse.tcf.internal.debug.ui.commands;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.debug.core.commands.IDebugCommandRequest;
-import org.eclipse.tm.internal.tcf.debug.actions.TCFAction;
-import org.eclipse.tm.internal.tcf.debug.ui.Activator;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFModel;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IErrorReport;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.services.IRunControl;
+import org.eclipse.tcf.internal.debug.actions.TCFAction;
+import org.eclipse.tcf.internal.debug.ui.Activator;
+import org.eclipse.tcf.internal.debug.ui.model.TCFModel;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IErrorReport;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.services.IRunControl;
public class BackResumeCommand extends StepCommand {
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/BackReturnCommand.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/BackReturnCommand.java
index 604a131f0..9600e018a 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/BackReturnCommand.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/BackReturnCommand.java
@@ -8,22 +8,22 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.commands;
+package org.eclipse.tcf.internal.debug.ui.commands;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.debug.core.commands.IDebugCommandRequest;
-import org.eclipse.tm.internal.tcf.debug.actions.TCFActionStepOut;
-import org.eclipse.tm.internal.tcf.debug.model.TCFContextState;
-import org.eclipse.tm.internal.tcf.debug.ui.Activator;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFModel;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNodeExecContext;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNodeStackFrame;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.services.IBreakpoints;
-import org.eclipse.tm.tcf.services.IRunControl;
-import org.eclipse.tm.tcf.services.IStackTrace.StackTraceContext;
-import org.eclipse.tm.tcf.util.TCFDataCache;
+import org.eclipse.tcf.internal.debug.actions.TCFActionStepOut;
+import org.eclipse.tcf.internal.debug.model.TCFContextState;
+import org.eclipse.tcf.internal.debug.ui.Activator;
+import org.eclipse.tcf.internal.debug.ui.model.TCFModel;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNodeExecContext;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNodeStackFrame;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.services.IBreakpoints;
+import org.eclipse.tcf.services.IRunControl;
+import org.eclipse.tcf.services.IStackTrace.StackTraceContext;
+import org.eclipse.tcf.util.TCFDataCache;
public class BackReturnCommand extends StepCommand {
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/BreakpointCommand.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/BreakpointCommand.java
index 83fd1ffe8..c78a7c72b 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/BreakpointCommand.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/BreakpointCommand.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.commands;
+package org.eclipse.tcf.internal.debug.ui.commands;
import java.math.BigInteger;
import java.util.HashMap;
@@ -18,12 +18,12 @@ import org.eclipse.core.runtime.CoreException;
import org.eclipse.debug.ui.actions.IToggleBreakpointsTargetExtension;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.tm.internal.tcf.debug.model.TCFBreakpoint;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNodeExecContext;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNodeStackFrame;
-import org.eclipse.tm.tcf.services.IBreakpoints;
-import org.eclipse.tm.tcf.util.TCFDataCache;
-import org.eclipse.tm.tcf.util.TCFTask;
+import org.eclipse.tcf.internal.debug.model.TCFBreakpoint;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNodeExecContext;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNodeStackFrame;
+import org.eclipse.tcf.services.IBreakpoints;
+import org.eclipse.tcf.util.TCFDataCache;
+import org.eclipse.tcf.util.TCFTask;
import org.eclipse.ui.IWorkbenchPart;
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/CastToArrayCommand.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/CastToArrayCommand.java
index 3f2e9db95..50733aaab 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/CastToArrayCommand.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/CastToArrayCommand.java
@@ -8,20 +8,20 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.commands;
+package org.eclipse.tcf.internal.debug.ui.commands;
import org.eclipse.jface.dialogs.IInputValidator;
import org.eclipse.jface.dialogs.InputDialog;
import org.eclipse.jface.window.Window;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.tm.internal.tcf.debug.ui.Activator;
-import org.eclipse.tm.internal.tcf.debug.ui.ImageCache;
-import org.eclipse.tm.internal.tcf.debug.ui.model.ICastToType;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNode;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.tcf.services.ISymbols;
-import org.eclipse.tm.tcf.util.TCFDataCache;
-import org.eclipse.tm.tcf.util.TCFTask;
+import org.eclipse.tcf.internal.debug.ui.Activator;
+import org.eclipse.tcf.internal.debug.ui.ImageCache;
+import org.eclipse.tcf.internal.debug.ui.model.ICastToType;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNode;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.services.ISymbols;
+import org.eclipse.tcf.util.TCFDataCache;
+import org.eclipse.tcf.util.TCFTask;
import org.eclipse.ui.IWorkbenchWindow;
public class CastToArrayCommand extends AbstractActionDelegate {
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/CastToTypeCommand.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/CastToTypeCommand.java
index 48e7bdb98..8bd017f18 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/CastToTypeCommand.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/CastToTypeCommand.java
@@ -8,17 +8,17 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.commands;
+package org.eclipse.tcf.internal.debug.ui.commands;
import org.eclipse.jface.dialogs.IInputValidator;
import org.eclipse.jface.dialogs.InputDialog;
import org.eclipse.jface.window.Window;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.tm.internal.tcf.debug.ui.Activator;
-import org.eclipse.tm.internal.tcf.debug.ui.ImageCache;
-import org.eclipse.tm.internal.tcf.debug.ui.model.ICastToType;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNode;
-import org.eclipse.tm.tcf.protocol.Protocol;
+import org.eclipse.tcf.internal.debug.ui.Activator;
+import org.eclipse.tcf.internal.debug.ui.ImageCache;
+import org.eclipse.tcf.internal.debug.ui.model.ICastToType;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNode;
+import org.eclipse.tcf.protocol.Protocol;
import org.eclipse.ui.IWorkbenchWindow;
public class CastToTypeCommand extends AbstractActionDelegate {
diff --git a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/ConsoleCommand.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/ConsoleCommand.java
new file mode 100644
index 000000000..a38530416
--- /dev/null
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/ConsoleCommand.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.internal.debug.ui.commands;
+
+import org.eclipse.tcf.internal.debug.ui.model.TCFNode;
+
+public class ConsoleCommand extends AbstractActionDelegate {
+
+ @Override
+ protected void selectionChanged() {
+ getAction().setEnabled(getSelectedNode() != null);
+ }
+
+ @Override
+ protected void run() {
+ TCFNode n = getSelectedNode();
+ if (n != null) n.getModel().showDebugConsole();
+ }
+}
diff --git a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/DetachCommand.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/DetachCommand.java
new file mode 100644
index 000000000..a6b055907
--- /dev/null
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/DetachCommand.java
@@ -0,0 +1,76 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.internal.debug.ui.commands;
+
+import org.eclipse.tcf.internal.debug.ui.model.TCFNode;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNodeExecContext;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.services.IRunControl;
+import org.eclipse.tcf.util.TCFDataCache;
+import org.eclipse.tcf.util.TCFTask;
+
+public class DetachCommand extends AbstractActionDelegate {
+
+ private static boolean run(TCFNode[] nodes, final boolean dry_run) {
+ if (nodes == null || nodes.length == 0) return false;
+ for (TCFNode n : nodes) {
+ boolean ok = false;
+ while (!ok && n != null) {
+ if (n instanceof TCFNodeExecContext) {
+ final TCFNodeExecContext exe = (TCFNodeExecContext)n;
+ ok = new TCFTask<Boolean>(n.getChannel()) {
+ public void run() {
+ TCFDataCache<IRunControl.RunControlContext> ctx_cache = exe.getRunContext();
+ if (!ctx_cache.validate(this)) return;
+ IRunControl.RunControlContext ctx_data = ctx_cache.getData();
+ if (ctx_data != null && ctx_data.canDetach()) {
+ if (dry_run) {
+ done(true);
+ }
+ else {
+ ctx_data.detach(new IRunControl.DoneCommand() {
+ public void doneCommand(IToken token, Exception error) {
+ if (error != null) {
+ error(error);
+ }
+ else {
+ exe.getModel().getLaunch().onDetach(exe.getID());
+ done(true);
+ }
+ }
+ });
+ }
+ }
+ else {
+ done(false);
+ }
+ }
+ }.getE();
+ }
+ n = n.getParent();
+ }
+ if (!ok) return false;
+ }
+ return true;
+ }
+
+ @Override
+ protected void selectionChanged() {
+ getAction().setEnabled(run(getSelectedNodes(), true));
+ }
+
+ @Override
+ protected void run() {
+ TCFNode[] nodes = getSelectedNodes();
+ if (!run(nodes, true)) return;
+ run(nodes, false);
+ }
+}
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/DisconnectCommand.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/DisconnectCommand.java
index eb79092f8..82c9cac63 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/DisconnectCommand.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/DisconnectCommand.java
@@ -8,15 +8,15 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.commands;
+package org.eclipse.tcf.internal.debug.ui.commands;
import org.eclipse.core.runtime.Status;
import org.eclipse.debug.core.commands.IDebugCommandRequest;
import org.eclipse.debug.core.commands.IDisconnectHandler;
import org.eclipse.debug.core.commands.IEnabledStateRequest;
-import org.eclipse.tm.internal.tcf.debug.model.TCFError;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFModel;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFRunnable;
+import org.eclipse.tcf.internal.debug.model.TCFError;
+import org.eclipse.tcf.internal.debug.ui.model.TCFModel;
+import org.eclipse.tcf.internal.debug.ui.model.TCFRunnable;
public class DisconnectCommand implements IDisconnectHandler {
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/DropToFrameCommand.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/DropToFrameCommand.java
index b4efec179..46929b6f5 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/DropToFrameCommand.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/DropToFrameCommand.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.commands;
+package org.eclipse.tcf.internal.debug.ui.commands;
import java.util.Map;
@@ -17,20 +17,20 @@ import org.eclipse.core.runtime.Status;
import org.eclipse.debug.core.commands.IDebugCommandRequest;
import org.eclipse.debug.core.commands.IDropToFrameHandler;
import org.eclipse.debug.core.commands.IEnabledStateRequest;
-import org.eclipse.tm.internal.tcf.debug.actions.TCFActionStepOut;
-import org.eclipse.tm.internal.tcf.debug.model.TCFContextState;
-import org.eclipse.tm.internal.tcf.debug.ui.Activator;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFModel;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNode;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNodeExecContext;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNodeStackFrame;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFRunnable;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.services.IBreakpoints;
-import org.eclipse.tm.tcf.services.IRunControl;
-import org.eclipse.tm.tcf.services.IRunControl.RunControlContext;
-import org.eclipse.tm.tcf.services.IStackTrace.StackTraceContext;
-import org.eclipse.tm.tcf.util.TCFDataCache;
+import org.eclipse.tcf.internal.debug.actions.TCFActionStepOut;
+import org.eclipse.tcf.internal.debug.model.TCFContextState;
+import org.eclipse.tcf.internal.debug.ui.Activator;
+import org.eclipse.tcf.internal.debug.ui.model.TCFModel;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNode;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNodeExecContext;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNodeStackFrame;
+import org.eclipse.tcf.internal.debug.ui.model.TCFRunnable;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.services.IBreakpoints;
+import org.eclipse.tcf.services.IRunControl;
+import org.eclipse.tcf.services.IRunControl.RunControlContext;
+import org.eclipse.tcf.services.IStackTrace.StackTraceContext;
+import org.eclipse.tcf.util.TCFDataCache;
/**
* Drop-to-frame command handler for TCF.
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/MemoryMapCommand.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/MemoryMapCommand.java
index 098eb50dd..f3a93c6ae 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/MemoryMapCommand.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/MemoryMapCommand.java
@@ -8,23 +8,23 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.commands;
+package org.eclipse.tcf.internal.debug.ui.commands;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.MessageBox;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFModel;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNode;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNodeArrayPartition;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNodeExecContext;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNodeExpression;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNodeLaunch;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNodeModule;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNodeRegister;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNodeStackFrame;
-import org.eclipse.tm.tcf.services.IMemory;
-import org.eclipse.tm.tcf.util.TCFDataCache;
-import org.eclipse.tm.tcf.util.TCFTask;
+import org.eclipse.tcf.internal.debug.ui.model.TCFModel;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNode;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNodeArrayPartition;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNodeExecContext;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNodeExpression;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNodeLaunch;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNodeModule;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNodeRegister;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNodeStackFrame;
+import org.eclipse.tcf.services.IMemory;
+import org.eclipse.tcf.util.TCFDataCache;
+import org.eclipse.tcf.util.TCFTask;
public class MemoryMapCommand extends AbstractActionDelegate {
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/MemoryMapDialog.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/MemoryMapDialog.java
index c8e450a7e..ff398132c 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/MemoryMapDialog.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/MemoryMapDialog.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.commands;
+package org.eclipse.tcf.internal.debug.ui.commands;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
@@ -20,9 +20,9 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.MessageBox;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.tm.internal.tcf.debug.ui.ImageCache;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFModel;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNode;
+import org.eclipse.tcf.internal.debug.ui.ImageCache;
+import org.eclipse.tcf.internal.debug.ui.model.TCFModel;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNode;
class MemoryMapDialog extends Dialog {
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/MemoryMapItemDialog.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/MemoryMapItemDialog.java
index 39a314963..bf0930fb3 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/MemoryMapItemDialog.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/MemoryMapItemDialog.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.commands;
+package org.eclipse.tcf.internal.debug.ui.commands;
import java.math.BigInteger;
import java.util.Map;
@@ -33,9 +33,9 @@ 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.tcf.debug.ui.model.TCFModel;
-import org.eclipse.tm.tcf.protocol.JSON;
-import org.eclipse.tm.tcf.services.IMemoryMap;
+import org.eclipse.tcf.internal.debug.ui.model.TCFModel;
+import org.eclipse.tcf.protocol.JSON;
+import org.eclipse.tcf.services.IMemoryMap;
class MemoryMapItemDialog extends Dialog {
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/MemoryMapWidget.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/MemoryMapWidget.java
index 7db194fde..f9c6f03e7 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/MemoryMapWidget.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/MemoryMapWidget.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.commands;
+package org.eclipse.tcf.internal.debug.ui.commands;
import java.io.IOException;
import java.math.BigInteger;
@@ -46,21 +46,21 @@ import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.MenuItem;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.tm.internal.tcf.debug.launch.TCFLaunchDelegate;
-import org.eclipse.tm.internal.tcf.debug.model.TCFMemoryRegion;
-import org.eclipse.tm.internal.tcf.debug.ui.Activator;
-import org.eclipse.tm.internal.tcf.debug.ui.ImageCache;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFChildren;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFModel;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNode;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNodeExecContext;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNodeLaunch;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.JSON;
-import org.eclipse.tm.tcf.services.IMemory;
-import org.eclipse.tm.tcf.services.IMemoryMap;
-import org.eclipse.tm.tcf.util.TCFDataCache;
-import org.eclipse.tm.tcf.util.TCFTask;
+import org.eclipse.tcf.internal.debug.launch.TCFLaunchDelegate;
+import org.eclipse.tcf.internal.debug.model.TCFMemoryRegion;
+import org.eclipse.tcf.internal.debug.ui.Activator;
+import org.eclipse.tcf.internal.debug.ui.ImageCache;
+import org.eclipse.tcf.internal.debug.ui.model.TCFChildren;
+import org.eclipse.tcf.internal.debug.ui.model.TCFModel;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNode;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNodeExecContext;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNodeLaunch;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.JSON;
+import org.eclipse.tcf.services.IMemory;
+import org.eclipse.tcf.services.IMemoryMap;
+import org.eclipse.tcf.util.TCFDataCache;
+import org.eclipse.tcf.util.TCFTask;
public class MemoryMapWidget {
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/RefreshCommand.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/RefreshCommand.java
index ac52e4fa2..b82e38aa4 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/RefreshCommand.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/RefreshCommand.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.commands;
+package org.eclipse.tcf.internal.debug.ui.commands;
import org.eclipse.debug.ui.DebugUITools;
import org.eclipse.debug.ui.IDebugUIConstants;
@@ -16,11 +16,11 @@ import org.eclipse.debug.ui.IDebugView;
import org.eclipse.debug.ui.memory.IMemoryRenderingSite;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFModel;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNode;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNodeExecContext;
-import org.eclipse.tm.tcf.util.TCFDataCache;
-import org.eclipse.tm.tcf.util.TCFTask;
+import org.eclipse.tcf.internal.debug.ui.model.TCFModel;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNode;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNodeExecContext;
+import org.eclipse.tcf.util.TCFDataCache;
+import org.eclipse.tcf.util.TCFTask;
import org.eclipse.ui.IViewPart;
import org.eclipse.ui.IWorkbenchPartSite;
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/RefreshHandler.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/RefreshHandler.java
index 6658ec5da..320bfa7be 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/RefreshHandler.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/RefreshHandler.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.commands;
+package org.eclipse.tcf.internal.debug.ui.commands;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
@@ -19,11 +19,11 @@ import org.eclipse.debug.ui.IDebugView;
import org.eclipse.debug.ui.memory.IMemoryRenderingSite;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFModel;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNode;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNodeExecContext;
-import org.eclipse.tm.tcf.util.TCFDataCache;
-import org.eclipse.tm.tcf.util.TCFTask;
+import org.eclipse.tcf.internal.debug.ui.model.TCFModel;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNode;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNodeExecContext;
+import org.eclipse.tcf.util.TCFDataCache;
+import org.eclipse.tcf.util.TCFTask;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.IWorkbenchPartSite;
import org.eclipse.ui.handlers.HandlerUtil;
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/RestoreDefaultTypeCommand.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/RestoreDefaultTypeCommand.java
index 6be58e590..87d3da547 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/RestoreDefaultTypeCommand.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/RestoreDefaultTypeCommand.java
@@ -8,11 +8,11 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.commands;
+package org.eclipse.tcf.internal.debug.ui.commands;
-import org.eclipse.tm.internal.tcf.debug.ui.model.ICastToType;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNode;
-import org.eclipse.tm.tcf.protocol.Protocol;
+import org.eclipse.tcf.internal.debug.ui.model.ICastToType;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNode;
+import org.eclipse.tcf.protocol.Protocol;
public class RestoreDefaultTypeCommand extends AbstractActionDelegate {
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/ResumeCommand.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/ResumeCommand.java
index 5400baae8..081fb2112 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/ResumeCommand.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/ResumeCommand.java
@@ -8,19 +8,19 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.commands;
+package org.eclipse.tcf.internal.debug.ui.commands;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.debug.core.commands.IDebugCommandRequest;
import org.eclipse.debug.core.commands.IResumeHandler;
-import org.eclipse.tm.internal.tcf.debug.actions.TCFAction;
-import org.eclipse.tm.internal.tcf.debug.ui.Activator;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFModel;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IErrorReport;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.services.IRunControl;
+import org.eclipse.tcf.internal.debug.actions.TCFAction;
+import org.eclipse.tcf.internal.debug.ui.Activator;
+import org.eclipse.tcf.internal.debug.ui.model.TCFModel;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IErrorReport;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.services.IRunControl;
public class ResumeCommand extends StepCommand implements IResumeHandler {
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/SignalsCommand.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/SignalsCommand.java
index 05dc7a6c3..fe2e0237a 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/SignalsCommand.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/SignalsCommand.java
@@ -8,18 +8,18 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.commands;
+package org.eclipse.tcf.internal.debug.ui.commands;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.MessageBox;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFModel;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNode;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNodeExecContext;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNodeExpression;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNodeLaunch;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNodeModule;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNodeStackFrame;
+import org.eclipse.tcf.internal.debug.ui.model.TCFModel;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNode;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNodeExecContext;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNodeExpression;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNodeLaunch;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNodeModule;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNodeStackFrame;
public class SignalsCommand extends AbstractActionDelegate {
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/SignalsDialog.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/SignalsDialog.java
index eae7a5e9d..2a360afce 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/SignalsDialog.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/SignalsDialog.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.commands;
+package org.eclipse.tcf.internal.debug.ui.commands;
import java.util.Collection;
import java.util.HashMap;
@@ -39,20 +39,20 @@ import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.swt.widgets.TableItem;
-import org.eclipse.tm.internal.tcf.debug.launch.TCFLaunchDelegate;
-import org.eclipse.tm.internal.tcf.debug.model.TCFLaunch;
-import org.eclipse.tm.internal.tcf.debug.ui.Activator;
-import org.eclipse.tm.internal.tcf.debug.ui.ImageCache;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFChildren;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFModel;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNode;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNodeExecContext;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNodeExecContext.SignalMask;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.services.IProcesses;
-import org.eclipse.tm.tcf.util.TCFDataCache;
-import org.eclipse.tm.tcf.util.TCFTask;
+import org.eclipse.tcf.internal.debug.launch.TCFLaunchDelegate;
+import org.eclipse.tcf.internal.debug.model.TCFLaunch;
+import org.eclipse.tcf.internal.debug.ui.Activator;
+import org.eclipse.tcf.internal.debug.ui.ImageCache;
+import org.eclipse.tcf.internal.debug.ui.model.TCFChildren;
+import org.eclipse.tcf.internal.debug.ui.model.TCFModel;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNode;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNodeExecContext;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNodeExecContext.SignalMask;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.services.IProcesses;
+import org.eclipse.tcf.util.TCFDataCache;
+import org.eclipse.tcf.util.TCFTask;
class SignalsDialog extends Dialog {
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/StepCommand.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/StepCommand.java
index 824b6ea7b..2ea1ef100 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/StepCommand.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/StepCommand.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.commands;
+package org.eclipse.tcf.internal.debug.ui.commands;
import java.util.HashSet;
import java.util.Set;
@@ -17,13 +17,13 @@ import org.eclipse.core.runtime.Status;
import org.eclipse.debug.core.commands.IDebugCommandHandler;
import org.eclipse.debug.core.commands.IDebugCommandRequest;
import org.eclipse.debug.core.commands.IEnabledStateRequest;
-import org.eclipse.tm.internal.tcf.debug.model.TCFContextState;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFModel;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNode;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNodeExecContext;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFRunnable;
-import org.eclipse.tm.tcf.services.IRunControl;
-import org.eclipse.tm.tcf.util.TCFDataCache;
+import org.eclipse.tcf.internal.debug.model.TCFContextState;
+import org.eclipse.tcf.internal.debug.ui.model.TCFModel;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNode;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNodeExecContext;
+import org.eclipse.tcf.internal.debug.ui.model.TCFRunnable;
+import org.eclipse.tcf.services.IRunControl;
+import org.eclipse.tcf.util.TCFDataCache;
abstract class StepCommand implements IDebugCommandHandler {
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/StepIntoCommand.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/StepIntoCommand.java
index 4f6c98a67..94868dda7 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/StepIntoCommand.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/StepIntoCommand.java
@@ -8,22 +8,22 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.commands;
+package org.eclipse.tcf.internal.debug.ui.commands;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.debug.core.commands.IDebugCommandRequest;
import org.eclipse.debug.core.commands.IStepIntoHandler;
-import org.eclipse.tm.internal.tcf.debug.actions.TCFActionStepInto;
-import org.eclipse.tm.internal.tcf.debug.model.TCFContextState;
-import org.eclipse.tm.internal.tcf.debug.model.TCFSourceRef;
-import org.eclipse.tm.internal.tcf.debug.ui.Activator;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFModel;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNodeExecContext;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNodeStackFrame;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.services.IRunControl;
-import org.eclipse.tm.tcf.util.TCFDataCache;
+import org.eclipse.tcf.internal.debug.actions.TCFActionStepInto;
+import org.eclipse.tcf.internal.debug.model.TCFContextState;
+import org.eclipse.tcf.internal.debug.model.TCFSourceRef;
+import org.eclipse.tcf.internal.debug.ui.Activator;
+import org.eclipse.tcf.internal.debug.ui.model.TCFModel;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNodeExecContext;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNodeStackFrame;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.services.IRunControl;
+import org.eclipse.tcf.util.TCFDataCache;
public class StepIntoCommand extends StepCommand implements IStepIntoHandler {
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/StepOverCommand.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/StepOverCommand.java
index cda698a99..2e14cec9f 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/StepOverCommand.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/StepOverCommand.java
@@ -8,24 +8,24 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.commands;
+package org.eclipse.tcf.internal.debug.ui.commands;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.debug.core.commands.IDebugCommandRequest;
import org.eclipse.debug.core.commands.IStepOverHandler;
-import org.eclipse.tm.internal.tcf.debug.actions.TCFActionStepOver;
-import org.eclipse.tm.internal.tcf.debug.model.TCFContextState;
-import org.eclipse.tm.internal.tcf.debug.model.TCFSourceRef;
-import org.eclipse.tm.internal.tcf.debug.ui.Activator;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFModel;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNodeExecContext;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNodeStackFrame;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.services.IBreakpoints;
-import org.eclipse.tm.tcf.services.IRunControl;
-import org.eclipse.tm.tcf.services.IStackTrace.StackTraceContext;
-import org.eclipse.tm.tcf.util.TCFDataCache;
+import org.eclipse.tcf.internal.debug.actions.TCFActionStepOver;
+import org.eclipse.tcf.internal.debug.model.TCFContextState;
+import org.eclipse.tcf.internal.debug.model.TCFSourceRef;
+import org.eclipse.tcf.internal.debug.ui.Activator;
+import org.eclipse.tcf.internal.debug.ui.model.TCFModel;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNodeExecContext;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNodeStackFrame;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.services.IBreakpoints;
+import org.eclipse.tcf.services.IRunControl;
+import org.eclipse.tcf.services.IStackTrace.StackTraceContext;
+import org.eclipse.tcf.util.TCFDataCache;
public class StepOverCommand extends StepCommand implements IStepOverHandler {
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/StepReturnCommand.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/StepReturnCommand.java
index 638be3559..b1edf9b79 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/StepReturnCommand.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/StepReturnCommand.java
@@ -8,23 +8,23 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.commands;
+package org.eclipse.tcf.internal.debug.ui.commands;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.debug.core.commands.IDebugCommandRequest;
import org.eclipse.debug.core.commands.IStepReturnHandler;
-import org.eclipse.tm.internal.tcf.debug.actions.TCFActionStepOut;
-import org.eclipse.tm.internal.tcf.debug.model.TCFContextState;
-import org.eclipse.tm.internal.tcf.debug.ui.Activator;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFModel;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNodeExecContext;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNodeStackFrame;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.services.IBreakpoints;
-import org.eclipse.tm.tcf.services.IRunControl;
-import org.eclipse.tm.tcf.services.IStackTrace.StackTraceContext;
-import org.eclipse.tm.tcf.util.TCFDataCache;
+import org.eclipse.tcf.internal.debug.actions.TCFActionStepOut;
+import org.eclipse.tcf.internal.debug.model.TCFContextState;
+import org.eclipse.tcf.internal.debug.ui.Activator;
+import org.eclipse.tcf.internal.debug.ui.model.TCFModel;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNodeExecContext;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNodeStackFrame;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.services.IBreakpoints;
+import org.eclipse.tcf.services.IRunControl;
+import org.eclipse.tcf.services.IStackTrace.StackTraceContext;
+import org.eclipse.tcf.util.TCFDataCache;
public class StepReturnCommand extends StepCommand implements IStepReturnHandler {
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/SuspendCommand.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/SuspendCommand.java
index 133daf61f..be294b668 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/SuspendCommand.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/SuspendCommand.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.commands;
+package org.eclipse.tcf.internal.debug.ui.commands;
import java.util.HashSet;
import java.util.Iterator;
@@ -19,16 +19,16 @@ import org.eclipse.core.runtime.Status;
import org.eclipse.debug.core.commands.IDebugCommandRequest;
import org.eclipse.debug.core.commands.IEnabledStateRequest;
import org.eclipse.debug.core.commands.ISuspendHandler;
-import org.eclipse.tm.internal.tcf.debug.actions.TCFAction;
-import org.eclipse.tm.internal.tcf.debug.model.TCFContextState;
-import org.eclipse.tm.internal.tcf.debug.ui.Activator;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFModel;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNode;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNodeExecContext;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFRunnable;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.services.IRunControl;
-import org.eclipse.tm.tcf.util.TCFDataCache;
+import org.eclipse.tcf.internal.debug.actions.TCFAction;
+import org.eclipse.tcf.internal.debug.model.TCFContextState;
+import org.eclipse.tcf.internal.debug.ui.Activator;
+import org.eclipse.tcf.internal.debug.ui.model.TCFModel;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNode;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNodeExecContext;
+import org.eclipse.tcf.internal.debug.ui.model.TCFRunnable;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.services.IRunControl;
+import org.eclipse.tcf.util.TCFDataCache;
public class SuspendCommand implements ISuspendHandler {
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/TerminateCommand.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/TerminateCommand.java
index b4cdebc5c..5e3e6a66e 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/TerminateCommand.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/TerminateCommand.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.commands;
+package org.eclipse.tcf.internal.debug.ui.commands;
import java.util.HashSet;
import java.util.Iterator;
@@ -19,15 +19,15 @@ import org.eclipse.core.runtime.Status;
import org.eclipse.debug.core.commands.IDebugCommandRequest;
import org.eclipse.debug.core.commands.IEnabledStateRequest;
import org.eclipse.debug.core.commands.ITerminateHandler;
-import org.eclipse.tm.internal.tcf.debug.ui.Activator;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFChildren;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFModel;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNode;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNodeExecContext;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFRunnable;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.services.IRunControl;
-import org.eclipse.tm.tcf.util.TCFDataCache;
+import org.eclipse.tcf.internal.debug.ui.Activator;
+import org.eclipse.tcf.internal.debug.ui.model.TCFChildren;
+import org.eclipse.tcf.internal.debug.ui.model.TCFModel;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNode;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNodeExecContext;
+import org.eclipse.tcf.internal.debug.ui.model.TCFRunnable;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.services.IRunControl;
+import org.eclipse.tcf.util.TCFDataCache;
public class TerminateCommand implements ITerminateHandler {
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/UpdatePolicyMenu.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/UpdatePolicyMenu.java
index 80a1d8a78..9282e9661 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/UpdatePolicyMenu.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/UpdatePolicyMenu.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.commands;
+package org.eclipse.tcf.internal.debug.ui.commands;
import org.eclipse.debug.ui.IDebugUIConstants;
import org.eclipse.debug.ui.IDebugView;
@@ -23,9 +23,9 @@ import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.MenuItem;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFModel;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNode;
-import org.eclipse.tm.tcf.util.TCFTask;
+import org.eclipse.tcf.internal.debug.ui.model.TCFModel;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNode;
+import org.eclipse.tcf.util.TCFTask;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.IWorkbenchPartSite;
import org.eclipse.ui.PlatformUI;
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/ViewMemoryCommand.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/ViewMemoryCommand.java
index aa189e831..bc1afc984 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/ViewMemoryCommand.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/ViewMemoryCommand.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.commands;
+package org.eclipse.tcf.internal.debug.ui.commands;
import java.util.ArrayList;
@@ -16,13 +16,13 @@ import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.model.IMemoryBlock;
import org.eclipse.debug.core.model.IMemoryBlockRetrievalExtension;
import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.tm.internal.tcf.debug.ui.Activator;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNode;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNodeExpression;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNumberFormat;
-import org.eclipse.tm.tcf.services.IExpressions;
-import org.eclipse.tm.tcf.util.TCFDataCache;
-import org.eclipse.tm.tcf.util.TCFTask;
+import org.eclipse.tcf.internal.debug.ui.Activator;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNode;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNodeExpression;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNumberFormat;
+import org.eclipse.tcf.services.IExpressions;
+import org.eclipse.tcf.util.TCFDataCache;
+import org.eclipse.tcf.util.TCFTask;
import org.eclipse.ui.IWorkbenchPage;
public class ViewMemoryCommand extends AbstractActionDelegate {
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/WatchInExpressionsCommand.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/WatchInExpressionsCommand.java
index 931ac3fa1..a5adf7052 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/WatchInExpressionsCommand.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/WatchInExpressionsCommand.java
@@ -8,16 +8,16 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.commands;
+package org.eclipse.tcf.internal.debug.ui.commands;
import org.eclipse.debug.core.IExpressionManager;
import org.eclipse.debug.core.model.IExpression;
import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.tm.internal.tcf.debug.ui.Activator;
-import org.eclipse.tm.internal.tcf.debug.ui.model.IWatchInExpressions;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNode;
-import org.eclipse.tm.tcf.util.TCFDataCache;
-import org.eclipse.tm.tcf.util.TCFTask;
+import org.eclipse.tcf.internal.debug.ui.Activator;
+import org.eclipse.tcf.internal.debug.ui.model.IWatchInExpressions;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNode;
+import org.eclipse.tcf.util.TCFDataCache;
+import org.eclipse.tcf.util.TCFTask;
import org.eclipse.ui.IWorkbenchPage;
public class WatchInExpressionsCommand extends AbstractActionDelegate {
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/ITCFLaunchContext.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/ITCFLaunchContext.java
index a63183ffa..896b83162 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/ITCFLaunchContext.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/ITCFLaunchContext.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.launch;
+package org.eclipse.tcf.internal.debug.ui.launch;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/PeerPropsDialog.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/PeerPropsDialog.java
index 36b41479d..3cad4d6e7 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/PeerPropsDialog.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/PeerPropsDialog.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.launch;
+package org.eclipse.tcf.internal.debug.ui.launch;
import java.util.Map;
@@ -19,7 +19,7 @@ import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.tm.internal.tcf.debug.ui.launch.setup.PeerPropsControl;
+import org.eclipse.tcf.internal.debug.ui.launch.setup.PeerPropsControl;
class PeerPropsDialog extends Dialog {
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFArgumentsTab.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/TCFArgumentsTab.java
index 71baba1d7..e4d71c478 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFArgumentsTab.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/TCFArgumentsTab.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.launch;
+package org.eclipse.tcf.internal.debug.ui.launch;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.debug.core.ILaunchConfiguration;
@@ -28,9 +28,9 @@ import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
-import org.eclipse.tm.internal.tcf.debug.launch.TCFLaunchDelegate;
-import org.eclipse.tm.internal.tcf.debug.ui.Activator;
-import org.eclipse.tm.internal.tcf.debug.ui.ImageCache;
+import org.eclipse.tcf.internal.debug.launch.TCFLaunchDelegate;
+import org.eclipse.tcf.internal.debug.ui.Activator;
+import org.eclipse.tcf.internal.debug.ui.ImageCache;
public class TCFArgumentsTab extends AbstractLaunchConfigurationTab {
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFLaunchContext.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/TCFLaunchContext.java
index ab0910489..230281d34 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFLaunchContext.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/TCFLaunchContext.java
@@ -8,13 +8,13 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.launch;
+package org.eclipse.tcf.internal.debug.ui.launch;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExtension;
import org.eclipse.core.runtime.IExtensionPoint;
import org.eclipse.core.runtime.Platform;
-import org.eclipse.tm.internal.tcf.debug.ui.Activator;
+import org.eclipse.tcf.internal.debug.ui.Activator;
import org.osgi.framework.Bundle;
/**
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFLaunchShortcut.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/TCFLaunchShortcut.java
index c0f2ad8fc..2e1d1fec0 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFLaunchShortcut.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/TCFLaunchShortcut.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.launch;
+package org.eclipse.tcf.internal.debug.ui.launch;
import java.util.ArrayList;
import java.util.List;
@@ -29,8 +29,8 @@ import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.window.Window;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.tm.internal.tcf.debug.launch.TCFLaunchDelegate;
-import org.eclipse.tm.internal.tcf.debug.ui.Activator;
+import org.eclipse.tcf.internal.debug.launch.TCFLaunchDelegate;
+import org.eclipse.tcf.internal.debug.ui.Activator;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.dialogs.ElementListSelectionDialog;
@@ -42,7 +42,7 @@ import org.eclipse.ui.dialogs.ElementListSelectionDialog;
*/
public class TCFLaunchShortcut implements ILaunchShortcut {
- private static final String LAUNCH_CONFIGURATION_TYPE_ID = "org.eclipse.tm.tcf.debug.LaunchConfigurationType"; //$NON-NLS-1$
+ private static final String LAUNCH_CONFIGURATION_TYPE_ID = "org.eclipse.tcf.debug.LaunchConfigurationType"; //$NON-NLS-1$
public void launch(ISelection selection, String mode) {
if (selection instanceof IStructuredSelection) {
@@ -111,7 +111,7 @@ public class TCFLaunchShortcut implements ILaunchShortcut {
try {
ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
ILaunchConfigurationType type = manager.getLaunchConfigurationType(LAUNCH_CONFIGURATION_TYPE_ID);
- wc = type.newInstance(null, manager.generateUniqueLaunchConfigurationNameFrom("TCF Local Host " + path.lastSegment()));
+ wc = type.newInstance(null, manager.generateLaunchConfigurationName("TCF Local Host " + path.lastSegment()));
wc.setAttribute(TCFLaunchDelegate.ATTR_LOCAL_PROGRAM_FILE, path.toOSString());
wc.setAttribute(TCFLaunchDelegate.ATTR_PROJECT_NAME, project.getName());
// wc.setMappedResources(new IResource[] { });
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFMainTab.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/TCFMainTab.java
index 4a2cfce21..033178ee4 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFMainTab.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/TCFMainTab.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.launch;
+package org.eclipse.tcf.internal.debug.ui.launch;
import java.io.File;
@@ -38,9 +38,9 @@ import org.eclipse.swt.widgets.FileDialog;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
-import org.eclipse.tm.internal.tcf.debug.launch.TCFLaunchDelegate;
-import org.eclipse.tm.internal.tcf.debug.ui.Activator;
-import org.eclipse.tm.internal.tcf.debug.ui.ImageCache;
+import org.eclipse.tcf.internal.debug.launch.TCFLaunchDelegate;
+import org.eclipse.tcf.internal.debug.ui.Activator;
+import org.eclipse.tcf.internal.debug.ui.ImageCache;
import org.eclipse.ui.dialogs.ElementListSelectionDialog;
public class TCFMainTab extends AbstractLaunchConfigurationTab {
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFMemoryMapTab.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/TCFMemoryMapTab.java
index 0654678f1..eb35c00a8 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFMemoryMapTab.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/TCFMemoryMapTab.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.launch;
+package org.eclipse.tcf.internal.debug.ui.launch;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.debug.core.ILaunchConfiguration;
@@ -20,13 +20,13 @@ import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
-import org.eclipse.tm.internal.tcf.debug.ui.ImageCache;
-import org.eclipse.tm.internal.tcf.debug.ui.commands.MemoryMapWidget;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNode;
+import org.eclipse.tcf.internal.debug.ui.ImageCache;
+import org.eclipse.tcf.internal.debug.ui.commands.MemoryMapWidget;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNode;
public class TCFMemoryMapTab extends AbstractLaunchConfigurationTab {
- private static final String TAB_ID = "org.eclipse.tm.tcf.launch.memoryMapTab";
+ private static final String TAB_ID = "org.eclipse.tcf.launch.memoryMapTab";
private MemoryMapWidget widget;
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFPathMapTab.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/TCFPathMapTab.java
index f0e0b638c..6ddb7dfdc 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFPathMapTab.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/TCFPathMapTab.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.launch;
+package org.eclipse.tcf.internal.debug.ui.launch;
import java.util.ArrayList;
import java.util.Collections;
@@ -44,11 +44,11 @@ import org.eclipse.swt.widgets.Item;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.tm.internal.tcf.debug.launch.TCFLaunchDelegate;
-import org.eclipse.tm.internal.tcf.debug.launch.TCFLaunchDelegate.PathMapRule;
-import org.eclipse.tm.internal.tcf.debug.ui.Activator;
-import org.eclipse.tm.internal.tcf.debug.ui.ImageCache;
-import org.eclipse.tm.tcf.services.IPathMap;
+import org.eclipse.tcf.internal.debug.launch.TCFLaunchDelegate;
+import org.eclipse.tcf.internal.debug.launch.TCFLaunchDelegate.PathMapRule;
+import org.eclipse.tcf.internal.debug.ui.Activator;
+import org.eclipse.tcf.internal.debug.ui.ImageCache;
+import org.eclipse.tcf.services.IPathMap;
// TODO: add source lookup container that represents ATTR_PATH_MAP
public class TCFPathMapTab extends AbstractLaunchConfigurationTab {
@@ -69,7 +69,7 @@ public class TCFPathMapTab extends AbstractLaunchConfigurationTab {
50,
};
- private static final String TAB_ID = "org.eclipse.tm.tcf.launch.pathMapTab";
+ private static final String TAB_ID = "org.eclipse.tcf.launch.pathMapTab";
private ArrayList<PathMapRule> map;
@@ -206,7 +206,6 @@ public class TCFPathMapTab extends AbstractLaunchConfigurationTab {
@Override
public void widgetSelected(SelectionEvent e) {
PathMapRule a = new PathMapRule(new HashMap<String,Object>());
- a.getProperties().put(IPathMap.PROP_ID, "PR" + System.currentTimeMillis());
map.add(a);
viewer.add(a);
viewer.setSelection(new StructuredSelection(a), true);
@@ -254,6 +253,7 @@ public class TCFPathMapTab extends AbstractLaunchConfigurationTab {
}
public void performApply(ILaunchConfigurationWorkingCopy config) {
+ for (PathMapRule m : map) m.getProperties().remove(IPathMap.PROP_ID);
StringBuffer bf = new StringBuffer();
for (PathMapRule m : map) bf.append(m.toString());
if (bf.length() == 0) config.removeAttribute(TCFLaunchDelegate.ATTR_PATH_MAP);
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFPropertyTester.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/TCFPropertyTester.java
index c70096067..4d6d36061 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFPropertyTester.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/TCFPropertyTester.java
@@ -8,14 +8,14 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.launch;
+package org.eclipse.tcf.internal.debug.ui.launch;
import org.eclipse.core.expressions.PropertyTester;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IPath;
import org.eclipse.debug.ui.IDebugView;
-import org.eclipse.tm.internal.tcf.debug.ui.Activator;
+import org.eclipse.tcf.internal.debug.ui.Activator;
public class TCFPropertyTester extends PropertyTester {
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFTabGroup.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/TCFTabGroup.java
index 1db24c9fd..fa0b86242 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFTabGroup.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/TCFTabGroup.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.launch;
+package org.eclipse.tcf.internal.debug.ui.launch;
import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup;
import org.eclipse.debug.ui.CommonTab;
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFTargetTab.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/TCFTargetTab.java
index 9796f06eb..e7ae188d2 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFTargetTab.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/TCFTargetTab.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.launch;
+package org.eclipse.tcf.internal.debug.ui.launch;
import java.util.ArrayList;
import java.util.Collection;
@@ -51,20 +51,20 @@ import org.eclipse.swt.widgets.Text;
import org.eclipse.swt.widgets.Tree;
import org.eclipse.swt.widgets.TreeColumn;
import org.eclipse.swt.widgets.TreeItem;
-import org.eclipse.tm.internal.tcf.debug.launch.TCFLaunchDelegate;
-import org.eclipse.tm.internal.tcf.debug.launch.TCFLocalAgent;
-import org.eclipse.tm.internal.tcf.debug.launch.TCFUserDefPeer;
-import org.eclipse.tm.internal.tcf.debug.tests.TCFTestSuite;
-import org.eclipse.tm.internal.tcf.debug.ui.Activator;
-import org.eclipse.tm.internal.tcf.debug.ui.ImageCache;
-import org.eclipse.tm.internal.tcf.debug.ui.launch.setup.SetupWizardDialog;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IPeer;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.tcf.services.ILocator;
-import org.eclipse.tm.tcf.services.IMemoryMap;
-import org.eclipse.tm.tcf.services.IPathMap;
-import org.eclipse.tm.tcf.util.TCFTask;
+import org.eclipse.tcf.internal.debug.launch.TCFLaunchDelegate;
+import org.eclipse.tcf.internal.debug.launch.TCFLocalAgent;
+import org.eclipse.tcf.internal.debug.launch.TCFUserDefPeer;
+import org.eclipse.tcf.internal.debug.tests.TCFTestSuite;
+import org.eclipse.tcf.internal.debug.ui.Activator;
+import org.eclipse.tcf.internal.debug.ui.ImageCache;
+import org.eclipse.tcf.internal.debug.ui.launch.setup.SetupWizardDialog;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.services.ILocator;
+import org.eclipse.tcf.services.IMemoryMap;
+import org.eclipse.tcf.services.IPathMap;
+import org.eclipse.tcf.util.TCFTask;
/**
@@ -73,7 +73,7 @@ import org.eclipse.tm.tcf.util.TCFTask;
*/
public class TCFTargetTab extends AbstractLaunchConfigurationTab {
- private static final String TAB_ID = "org.eclipse.tm.tcf.launch.targetTab";
+ private static final String TAB_ID = "org.eclipse.tcf.launch.targetTab";
private Button run_local_agent_button;
private Button use_local_agent_button;
@@ -241,7 +241,7 @@ public class TCFTargetTab extends AbstractLaunchConfigurationTab {
});
run_local_agent_button.setEnabled(true);
- use_local_agent_button = createCheckButton(local_agent_comp, "Use local host as a target");
+ use_local_agent_button = createCheckButton(local_agent_comp, "Use local host as the target");
use_local_agent_button.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent evt) {
@@ -300,7 +300,7 @@ public class TCFTargetTab extends AbstractLaunchConfigurationTab {
gd.minimumWidth = 470;
peer_tree.setLayoutData(gd);
- for (int i = 0; i < 5; i++) {
+ for (int i = 0; i < 6; i++) {
TreeColumn column = new TreeColumn(peer_tree, SWT.LEAD, i);
column.setMoveable(true);
switch (i) {
@@ -313,14 +313,18 @@ public class TCFTargetTab extends AbstractLaunchConfigurationTab {
column.setWidth(100);
break;
case 2:
+ column.setText("User");
+ column.setWidth(100);
+ break;
+ case 3:
column.setText("Transport");
column.setWidth(60);
break;
- case 3:
+ case 4:
column.setText("Host");
column.setWidth(100);
break;
- case 4:
+ case 5:
column.setText("Port");
column.setWidth(40);
break;
@@ -1003,9 +1007,9 @@ public class TCFTargetTab extends AbstractLaunchConfigurationTab {
TCFLaunchDelegate.parseMemMapsAttribute(mem_map, mem_map_cfg);
}
boolean enable_tracing =
- "true".equals(Platform.getDebugOption("org.eclipse.tm.tcf.debug/debug")) &&
- "true".equals(Platform.getDebugOption("org.eclipse.tm.tcf.debug/debug/tests/runcontrol"));
- if (enable_tracing) System.setProperty("org.eclipse.tm.tcf.debug.tracing.tests.runcontrol", "true");
+ "true".equals(Platform.getDebugOption("org.eclipse.tcf.debug/debug")) &&
+ "true".equals(Platform.getDebugOption("org.eclipse.tcf.debug/debug/tests/runcontrol"));
+ if (enable_tracing) System.setProperty("org.eclipse.tcf.debug.tracing.tests.runcontrol", "true");
test[0] = new TCFTestSuite(peer, done, path_map, mem_map);
}
catch (Throwable x) {
@@ -1022,12 +1026,13 @@ public class TCFTargetTab extends AbstractLaunchConfigurationTab {
Object data = item.getData("TCFPeerInfo");
if (data != null && data != info) item.removeAll();
item.setData("TCFPeerInfo", info);
- String text[] = new String[5];
+ String text[] = new String[6];
text[0] = info.attrs.get(IPeer.ATTR_NAME);
text[1] = info.attrs.get(IPeer.ATTR_OS_NAME);
- text[2] = info.attrs.get(IPeer.ATTR_TRANSPORT_NAME);
- text[3] = info.attrs.get(IPeer.ATTR_IP_HOST);
- text[4] = info.attrs.get(IPeer.ATTR_IP_PORT);
+ text[2] = info.attrs.get(IPeer.ATTR_USER_NAME);
+ text[3] = info.attrs.get(IPeer.ATTR_TRANSPORT_NAME);
+ text[4] = info.attrs.get(IPeer.ATTR_IP_HOST);
+ text[5] = info.attrs.get(IPeer.ATTR_IP_PORT);
for (int i = 0; i < text.length; i++) {
if (text[i] == null) text[i] = "";
}
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TestErrorsDialog.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/TestErrorsDialog.java
index e1b0ac463..a9255ca92 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TestErrorsDialog.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/TestErrorsDialog.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.launch;
+package org.eclipse.tcf.internal.debug.ui.launch;
import java.io.PrintWriter;
import java.io.StringWriter;
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/AbstractRemoteShell.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/setup/AbstractRemoteShell.java
index 066ab0630..700c47f9b 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/AbstractRemoteShell.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/setup/AbstractRemoteShell.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.launch.setup;
+package org.eclipse.tcf.internal.debug.ui.launch.setup;
import java.io.BufferedReader;
import java.io.IOException;
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/IRemoteShell.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/setup/IRemoteShell.java
index 4e052a6b4..3568c4704 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/IRemoteShell.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/setup/IRemoteShell.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.launch.setup;
+package org.eclipse.tcf.internal.debug.ui.launch.setup;
import java.io.IOException;
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/PeerPropsControl.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/setup/PeerPropsControl.java
index ad4fee038..133f8ca62 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/PeerPropsControl.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/setup/PeerPropsControl.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.launch.setup;
+package org.eclipse.tcf.internal.debug.ui.launch.setup;
import java.util.ArrayList;
import java.util.Arrays;
@@ -41,8 +41,8 @@ import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.swt.widgets.Text;
-import org.eclipse.tm.internal.tcf.debug.ui.ImageCache;
-import org.eclipse.tm.tcf.protocol.IPeer;
+import org.eclipse.tcf.internal.debug.ui.ImageCache;
+import org.eclipse.tcf.protocol.IPeer;
public class PeerPropsControl {
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/SSHClient.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/setup/SSHClient.java
index 3b5427f91..bf5d2193c 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/SSHClient.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/setup/SSHClient.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.launch.setup;
+package org.eclipse.tcf.internal.debug.ui.launch.setup;
import java.io.BufferedReader;
import java.io.IOException;
@@ -20,7 +20,7 @@ import java.io.PrintWriter;
import org.eclipse.jsch.core.IJSchService;
import org.eclipse.jsch.ui.UserInfoPrompter;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.tm.internal.tcf.debug.ui.Activator;
+import org.eclipse.tcf.internal.debug.ui.Activator;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceReference;
@@ -44,8 +44,8 @@ class SSHClient extends AbstractRemoteShell {
SSHClient(final Shell parent, String host, String user, final String password) throws Exception {
BundleContext ctx = Activator.getDefault().getBundle().getBundleContext();
- ServiceReference ref = ctx.getServiceReference(IJSchService.class.getName());
- IJSchService s = (IJSchService)ctx.getService(ref);
+ ServiceReference<IJSchService> ref = ctx.getServiceReference(IJSchService.class);
+ IJSchService s = ctx.getService(ref);
session = s.createSession(host, 22, user);
session.setPassword(password);
new UserInfoPrompter(session);
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/SetupWizardDialog.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/setup/SetupWizardDialog.java
index 04facc944..da0a889bd 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/SetupWizardDialog.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/setup/SetupWizardDialog.java
@@ -8,14 +8,14 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.launch.setup;
+package org.eclipse.tcf.internal.debug.ui.launch.setup;
import java.util.Map;
import org.eclipse.jface.wizard.IWizardPage;
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.swt.graphics.Image;
-import org.eclipse.tm.internal.tcf.debug.ui.ImageCache;
+import org.eclipse.tcf.internal.debug.ui.ImageCache;
public class SetupWizardDialog extends Wizard {
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/TelnetClient.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/setup/TelnetClient.java
index 3c31506b5..0ff366a0b 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/TelnetClient.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/setup/TelnetClient.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.launch.setup;
+package org.eclipse.tcf.internal.debug.ui.launch.setup;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/TelnetInputStream.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/setup/TelnetInputStream.java
index 6554dd9e0..008d816c0 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/TelnetInputStream.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/setup/TelnetInputStream.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.launch.setup;
+package org.eclipse.tcf.internal.debug.ui.launch.setup;
import java.io.*;
import java.net.*;
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/TimeOutInputStream.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/setup/TimeOutInputStream.java
index e8bb3ab4f..25c44e490 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/TimeOutInputStream.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/setup/TimeOutInputStream.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.launch.setup;
+package org.eclipse.tcf.internal.debug.ui.launch.setup;
import java.io.*;
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/WizardFirstPage.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/setup/WizardFirstPage.java
index c83842cb1..d0a4b5d1a 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/WizardFirstPage.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/setup/WizardFirstPage.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.launch.setup;
+package org.eclipse.tcf.internal.debug.ui.launch.setup;
import org.eclipse.jface.wizard.IWizardPage;
import org.eclipse.jface.wizard.WizardPage;
@@ -66,4 +66,4 @@ class WizardFirstPage extends WizardPage implements Listener {
if (button_login.getSelection()) return wizard.getPage("LoginPage");
return null;
}
-} \ No newline at end of file
+}
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/WizardLocalPage.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/setup/WizardLocalPage.java
index 1ec8cadff..9f9c66b53 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/WizardLocalPage.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/setup/WizardLocalPage.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.launch.setup;
+package org.eclipse.tcf.internal.debug.ui.launch.setup;
import org.eclipse.jface.wizard.IWizardPage;
import org.eclipse.jface.wizard.WizardPage;
@@ -45,4 +45,4 @@ class WizardLocalPage extends WizardPage implements Listener {
public IWizardPage getNextPage() {
return null;
}
-} \ No newline at end of file
+}
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/WizardLogPage.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/setup/WizardLogPage.java
index 9d9ee9b62..4317afc58 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/WizardLogPage.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/setup/WizardLogPage.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.launch.setup;
+package org.eclipse.tcf.internal.debug.ui.launch.setup;
import java.io.BufferedReader;
import java.io.BufferedWriter;
@@ -40,9 +40,9 @@ 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.tcf.debug.ui.Activator;
-import org.eclipse.tm.tcf.core.Base64;
-import org.eclipse.tm.tcf.ssl.TCFSecurityManager;
+import org.eclipse.tcf.internal.debug.ui.Activator;
+import org.eclipse.tcf.core.Base64;
+import org.eclipse.tcf.ssl.TCFSecurityManager;
import org.osgi.framework.Bundle;
class WizardLogPage extends WizardPage implements Runnable {
@@ -136,7 +136,7 @@ class WizardLogPage extends WizardPage implements Runnable {
String os = waitPrompt().replace('\n', ' ').trim();
send("uname -m", true);
String machine = waitPrompt().replace('\n', ' ').trim();
- String version = "0.5.0";
+ String version = "1.0.0";
Bundle bundle = Platform.getBundle(Activator.PLUGIN_ID);
URL url = FileLocator.find(bundle, new Path("agent/get-os-tag"), null);
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/WizardLoginPage.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/setup/WizardLoginPage.java
index 313ef8389..b50849393 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/WizardLoginPage.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/setup/WizardLoginPage.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.launch.setup;
+package org.eclipse.tcf.internal.debug.ui.launch.setup;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExtension;
@@ -38,7 +38,7 @@ import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.MessageBox;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
-import org.eclipse.tm.internal.tcf.debug.ui.Activator;
+import org.eclipse.tcf.internal.debug.ui.Activator;
import org.osgi.framework.Bundle;
class WizardLoginPage extends WizardPage implements Listener {
@@ -69,7 +69,7 @@ class WizardLoginPage extends WizardPage implements Listener {
public void handleEvent(Event event) {
getContainer().updateButtons();
- IEclipsePreferences n = new InstanceScope().getNode(Activator.PLUGIN_ID);
+ IEclipsePreferences n = InstanceScope.INSTANCE.getNode(Activator.PLUGIN_ID);
n.put(PREF_PROTOCOL, protocol.getText());
n.put(PREF_HOST, host.getText());
n.put(PREF_USER, user.getText());
@@ -143,10 +143,10 @@ class WizardLoginPage extends WizardPage implements Listener {
root_password.setLayoutData(gd);
root_password.addListener(SWT.KeyUp, this);
- IEclipsePreferences d = new DefaultScope().getNode(Activator.PLUGIN_ID);
+ IEclipsePreferences d = DefaultScope.INSTANCE.getNode(Activator.PLUGIN_ID);
d.put(PREF_PROTOCOL, protocols[0]);
- IEclipsePreferences[] n = { new InstanceScope().getNode(Activator.PLUGIN_ID) };
+ IEclipsePreferences[] n = { InstanceScope.INSTANCE.getNode(Activator.PLUGIN_ID) };
IPreferencesService s = Platform.getPreferencesService();
protocol.setText(s.get(PREF_PROTOCOL, "", n));
host.setText(s.get(PREF_HOST, "", n));
@@ -206,4 +206,4 @@ class WizardLoginPage extends WizardPage implements Listener {
return wizard.getPage("LogPage");
return null;
}
-} \ No newline at end of file
+}
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/WizardPropsPage.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/setup/WizardPropsPage.java
index af1ab7711..808bde376 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/WizardPropsPage.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/setup/WizardPropsPage.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.launch.setup;
+package org.eclipse.tcf.internal.debug.ui.launch.setup;
import java.util.Map;
@@ -55,4 +55,4 @@ class WizardPropsPage extends WizardPage {
props.okPressed();
return true;
}
-} \ No newline at end of file
+}
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/ICastToType.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/ICastToType.java
index 5d79636f0..4c9a8b773 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/ICastToType.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/ICastToType.java
@@ -8,10 +8,10 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.model;
+package org.eclipse.tcf.internal.debug.ui.model;
-import org.eclipse.tm.tcf.services.ISymbols;
-import org.eclipse.tm.tcf.util.TCFDataCache;
+import org.eclipse.tcf.services.ISymbols;
+import org.eclipse.tcf.util.TCFDataCache;
public interface ICastToType {
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/IDetailsProvider.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/IDetailsProvider.java
index 24104eb1d..43595cd2c 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/IDetailsProvider.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/IDetailsProvider.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.model;
+package org.eclipse.tcf.internal.debug.ui.model;
public interface IDetailsProvider {
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/ISourceNotFoundPresentation.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/ISourceNotFoundPresentation.java
index ce0a7aac8..1b098052d 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/ISourceNotFoundPresentation.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/ISourceNotFoundPresentation.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.model;
+package org.eclipse.tcf.internal.debug.ui.model;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.ui.IEditorInput;
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/ISymbolOwner.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/ISymbolOwner.java
index 2d3a6100c..36ca46fea 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/ISymbolOwner.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/ISymbolOwner.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.model;
+package org.eclipse.tcf.internal.debug.ui.model;
public interface ISymbolOwner {
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/IWatchInExpressions.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/IWatchInExpressions.java
index 9fee2ceb9..6fe499bd0 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/IWatchInExpressions.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/IWatchInExpressions.java
@@ -8,9 +8,9 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.model;
+package org.eclipse.tcf.internal.debug.ui.model;
-import org.eclipse.tm.tcf.util.TCFDataCache;
+import org.eclipse.tcf.util.TCFDataCache;
public interface IWatchInExpressions {
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/StyledStringBuffer.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/StyledStringBuffer.java
index 7be54744f..eb0b82526 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/StyledStringBuffer.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/StyledStringBuffer.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.model;
+package org.eclipse.tcf.internal.debug.ui.model;
import java.util.ArrayList;
import java.util.Collection;
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFAnnotationImageProvider.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFAnnotationImageProvider.java
index 486d70222..a3dcf8b2a 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFAnnotationImageProvider.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFAnnotationImageProvider.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.model;
+package org.eclipse.tcf.internal.debug.ui.model;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.text.source.Annotation;
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFAnnotationManager.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFAnnotationManager.java
index 21c09020d..22e7ba3f4 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFAnnotationManager.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFAnnotationManager.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.model;
+package org.eclipse.tcf.internal.debug.ui.model;
import java.math.BigInteger;
import java.util.ArrayList;
@@ -28,7 +28,6 @@ import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchConfigurationListener;
import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.debug.core.model.IBreakpoint;
-import org.eclipse.debug.core.model.ISourceLocator;
import org.eclipse.debug.ui.DebugUITools;
import org.eclipse.debug.ui.IDebugUIConstants;
import org.eclipse.debug.ui.ISourcePresentation;
@@ -43,21 +42,21 @@ import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.swt.graphics.Device;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Display;
-import org.eclipse.tm.internal.tcf.debug.launch.TCFSourceLookupDirector;
-import org.eclipse.tm.internal.tcf.debug.model.ITCFBreakpointListener;
-import org.eclipse.tm.internal.tcf.debug.model.TCFBreakpointsStatus;
-import org.eclipse.tm.internal.tcf.debug.model.TCFContextState;
-import org.eclipse.tm.internal.tcf.debug.model.TCFLaunch;
-import org.eclipse.tm.internal.tcf.debug.model.TCFSourceRef;
-import org.eclipse.tm.internal.tcf.debug.ui.Activator;
-import org.eclipse.tm.internal.tcf.debug.ui.ImageCache;
-import org.eclipse.tm.tcf.protocol.JSON;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.tcf.services.IBreakpoints;
-import org.eclipse.tm.tcf.services.ILineNumbers;
-import org.eclipse.tm.tcf.services.IRunControl;
-import org.eclipse.tm.tcf.util.TCFDataCache;
-import org.eclipse.tm.tcf.util.TCFTask;
+import org.eclipse.tcf.internal.debug.launch.TCFSourceLookupDirector;
+import org.eclipse.tcf.internal.debug.model.ITCFBreakpointListener;
+import org.eclipse.tcf.internal.debug.model.TCFBreakpointsStatus;
+import org.eclipse.tcf.internal.debug.model.TCFContextState;
+import org.eclipse.tcf.internal.debug.model.TCFLaunch;
+import org.eclipse.tcf.internal.debug.model.TCFSourceRef;
+import org.eclipse.tcf.internal.debug.ui.Activator;
+import org.eclipse.tcf.internal.debug.ui.ImageCache;
+import org.eclipse.tcf.protocol.JSON;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.services.IBreakpoints;
+import org.eclipse.tcf.services.ILineNumbers;
+import org.eclipse.tcf.services.IRunControl;
+import org.eclipse.tcf.util.TCFDataCache;
+import org.eclipse.tcf.util.TCFTask;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IEditorReference;
@@ -72,9 +71,9 @@ import org.eclipse.ui.texteditor.ITextEditor;
public class TCFAnnotationManager {
private static final String
- TYPE_BP_INSTANCE = "org.eclipse.tm.tcf.debug.breakpoint_instance",
- TYPE_TOP_FRAME = "org.eclipse.tm.tcf.debug.top_frame",
- TYPE_STACK_FRAME = "org.eclipse.tm.tcf.debug.stack_frame";
+ TYPE_BP_INSTANCE = "org.eclipse.tcf.debug.breakpoint_instance",
+ TYPE_TOP_FRAME = "org.eclipse.tcf.debug.top_frame",
+ TYPE_STACK_FRAME = "org.eclipse.tcf.debug.stack_frame";
class TCFAnnotation extends Annotation {
@@ -536,10 +535,9 @@ public class TCFAnnotationManager {
ITextEditor editor = (ITextEditor)part;
editors.put(editor.getEditorInput(), editor);
}
- ISourceLocator locator = node.launch.getSourceLocator();
ISourcePresentation presentation = TCFModelPresentation.getDefault();
for (TCFAnnotation a : set) {
- Object source_element = TCFSourceLookupDirector.lookup(locator, a.area);
+ Object source_element = TCFSourceLookupDirector.lookup(node.launch, a.area);
if (source_element == null) continue;
IEditorInput editor_input = presentation.getEditorInput(source_element);
ITextEditor editor = editors.get(editor_input);
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildren.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFChildren.java
index 1953566d3..1f98fa578 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildren.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFChildren.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.model;
+package org.eclipse.tcf.internal.debug.ui.model;
import java.util.Arrays;
import java.util.Collection;
@@ -17,8 +17,8 @@ import java.util.LinkedHashMap;
import java.util.Map;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IChildrenUpdate;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.util.TCFDataCache;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.util.TCFDataCache;
/**
* TCFChildren is a concrete type of TCF data cache that is used to cache a list of children.
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenExecContext.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFChildrenExecContext.java
index 459cd16a2..eb4d6d85b 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenExecContext.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFChildrenExecContext.java
@@ -8,15 +8,15 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.model;
+package org.eclipse.tcf.internal.debug.ui.model;
import java.util.HashMap;
import java.util.Map;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.services.IMemory;
-import org.eclipse.tm.tcf.services.IRunControl;
-import org.eclipse.tm.tcf.util.TCFDataCache;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.services.IMemory;
+import org.eclipse.tcf.services.IRunControl;
+import org.eclipse.tcf.util.TCFDataCache;
/**
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenExpressions.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFChildrenExpressions.java
index d3b9339d9..66deb3200 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenExpressions.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFChildrenExpressions.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.model;
+package org.eclipse.tcf.internal.debug.ui.model;
import java.util.HashMap;
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenHoverExpressions.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFChildrenHoverExpressions.java
index 705044bd2..79eef7dd3 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenHoverExpressions.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFChildrenHoverExpressions.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.model;
+package org.eclipse.tcf.internal.debug.ui.model;
import java.util.HashMap;
@@ -17,10 +17,19 @@ import java.util.HashMap;
*/
class TCFChildrenHoverExpressions extends TCFChildren {
+ private String expression;
+
TCFChildrenHoverExpressions(TCFNode parent) {
super(parent, 16);
}
+ void setExpression(String expression) {
+ if (expression == this.expression) return;
+ if (expression != null && expression.equals(this.expression)) return;
+ this.expression = expression;
+ cancel();
+ }
+
void onSuspended() {
for (TCFNode n : getNodes()) ((TCFNodeExpression)n).onSuspended();
}
@@ -48,17 +57,10 @@ class TCFChildrenHoverExpressions extends TCFChildren {
@Override
protected boolean startDataRetrieval() {
HashMap<String,TCFNode> data = new HashMap<String,TCFNode>();
- String expression_script = null;
- if (node instanceof TCFNodeExecContext) {
- expression_script = ((TCFNodeExecContext)node).getHoverExpression();
- }
- else if (node instanceof TCFNodeStackFrame) {
- expression_script = ((TCFNodeStackFrame)node).getHoverExpression();
- }
- if (expression_script != null) {
- TCFNodeExpression expression_node = findScript(expression_script);
+ if (expression != null) {
+ TCFNodeExpression expression_node = findScript(expression);
if (expression_node == null) {
- add(expression_node = new TCFNodeExpression(node, expression_script, null, null, null, -1, false));
+ add(expression_node = new TCFNodeExpression(node, expression, null, null, null, -1, false));
}
data.put(expression_node.id, expression_node);
}
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenLocalVariables.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFChildrenLocalVariables.java
index 2320cd4b3..e87ef5b5c 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenLocalVariables.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFChildrenLocalVariables.java
@@ -8,13 +8,13 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.model;
+package org.eclipse.tcf.internal.debug.ui.model;
import java.util.HashMap;
import java.util.Map;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.services.IExpressions;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.services.IExpressions;
public class TCFChildrenLocalVariables extends TCFChildren {
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenLogExpressions.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFChildrenLogExpressions.java
index 90286a53e..f5c2f8476 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenLogExpressions.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFChildrenLogExpressions.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.model;
+package org.eclipse.tcf.internal.debug.ui.model;
import java.util.HashMap;
import java.util.HashSet;
diff --git a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFChildrenModules.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFChildrenModules.java
new file mode 100644
index 000000000..8e37eb98f
--- /dev/null
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFChildrenModules.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.internal.debug.ui.model;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.tcf.internal.debug.ui.model.TCFNodeExecContext.MemoryRegion;
+import org.eclipse.tcf.util.TCFDataCache;
+
+/**
+ * Provides and caches memory regions (modules) for a context.
+ */
+public class TCFChildrenModules extends TCFChildren {
+
+ public TCFChildrenModules(TCFNode node) {
+ super(node, 128);
+ }
+
+ void onMemoryMapChanged() {
+ reset();
+ }
+
+ @Override
+ protected boolean startDataRetrieval() {
+ TCFNodeExecContext exe = (TCFNodeExecContext)node;
+ TCFDataCache<MemoryRegion[]> map_cache = exe.getMemoryMap();
+ if (!map_cache.validate(this)) return false;
+ MemoryRegion[] map = map_cache.getData();
+ Map<String, TCFNode> data = new HashMap<String, TCFNode>();
+ if (map != null) {
+ for (MemoryRegion region : map) {
+ String id = node.id + ".Module-" + region.region.getFileName() + '@' + region.region.getAddress();
+ TCFNodeModule module = (TCFNodeModule) node.model.getNode(id);
+ if (module == null) module = new TCFNodeModule(node, id);
+ module.setRegion(region.region);
+ data.put(id, module);
+ }
+ }
+ set(null, map_cache.getError(), data);
+ return true;
+ }
+}
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenRegisters.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFChildrenRegisters.java
index 86dc0a30c..c2a91bb2e 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenRegisters.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFChildrenRegisters.java
@@ -8,13 +8,13 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.model;
+package org.eclipse.tcf.internal.debug.ui.model;
import java.util.HashMap;
import java.util.Map;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.services.IRegisters;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.services.IRegisters;
public class TCFChildrenRegisters extends TCFChildren {
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenStackTrace.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFChildrenStackTrace.java
index 5ebfe41ab..e62ec500a 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenStackTrace.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFChildrenStackTrace.java
@@ -8,15 +8,15 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.model;
+package org.eclipse.tcf.internal.debug.ui.model;
import java.util.HashMap;
import java.util.Map;
-import org.eclipse.tm.internal.tcf.debug.model.TCFContextState;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.services.IStackTrace;
-import org.eclipse.tm.tcf.util.TCFDataCache;
+import org.eclipse.tcf.internal.debug.model.TCFContextState;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.services.IStackTrace;
+import org.eclipse.tcf.util.TCFDataCache;
public class TCFChildrenStackTrace extends TCFChildren {
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenSubExpressions.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFChildrenSubExpressions.java
index 993e5101c..84907d355 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenSubExpressions.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFChildrenSubExpressions.java
@@ -8,14 +8,14 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.model;
+package org.eclipse.tcf.internal.debug.ui.model;
import java.util.HashMap;
import java.util.Map;
-import org.eclipse.tm.tcf.services.IExpressions;
-import org.eclipse.tm.tcf.services.ISymbols;
-import org.eclipse.tm.tcf.util.TCFDataCache;
+import org.eclipse.tcf.services.IExpressions;
+import org.eclipse.tcf.services.ISymbols;
+import org.eclipse.tcf.util.TCFDataCache;
public class TCFChildrenSubExpressions extends TCFChildren {
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFColumnPresentationExpression.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFColumnPresentationExpression.java
index 47264d233..44604a4b5 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFColumnPresentationExpression.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFColumnPresentationExpression.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.model;
+package org.eclipse.tcf.internal.debug.ui.model;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentation;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFColumnPresentationModules.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFColumnPresentationModules.java
index 43fd626ce..0a0e8c9c0 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFColumnPresentationModules.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFColumnPresentationModules.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.model;
+package org.eclipse.tcf.internal.debug.ui.model;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentation;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFColumnPresentationRegister.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFColumnPresentationRegister.java
index 929987145..10bdc8947 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFColumnPresentationRegister.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFColumnPresentationRegister.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.model;
+package org.eclipse.tcf.internal.debug.ui.model;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentation;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFConsole.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFConsole.java
index 225f737f7..4977940d2 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFConsole.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFConsole.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.model;
+package org.eclipse.tcf.internal.debug.ui.model;
import java.io.IOException;
import java.util.HashMap;
@@ -18,9 +18,10 @@ import java.util.Map;
import org.eclipse.swt.SWT;
import org.eclipse.swt.SWTException;
import org.eclipse.swt.widgets.Display;
-import org.eclipse.tm.internal.tcf.debug.ui.Activator;
-import org.eclipse.tm.internal.tcf.debug.ui.ImageCache;
-import org.eclipse.tm.tcf.protocol.Protocol;
+import org.eclipse.tcf.internal.debug.cmdline.TCFCommandLine;
+import org.eclipse.tcf.internal.debug.ui.Activator;
+import org.eclipse.tcf.internal.debug.ui.ImageCache;
+import org.eclipse.tcf.protocol.Protocol;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;
@@ -37,8 +38,12 @@ class TCFConsole {
private final TCFModel model;
private final IOConsole console;
private final Display display;
-
+ private final String process_id;
private final LinkedList<Message> out_queue;
+ private final TCFCommandLine cmd_line;
+
+ private final byte[] prompt = { 't', 'c', 'f', '>' };
+ private final StringBuffer cmd_buf = new StringBuffer();
private static class Message {
int stream_id;
@@ -59,10 +64,38 @@ class TCFConsole {
Protocol.invokeAndWait(new Runnable() {
public void run() {
try {
- model.getLaunch().writeProcessInputStream(buf, 0, n);
+ if (cmd_line != null) {
+ String s = new String(buf, 0, n, "UTF-8");
+ int l = s.length();
+ for (int i = 0; i < l; i++) {
+ char ch = s.charAt(i);
+ if (ch == '\r') {
+ String res = cmd_line.command(cmd_buf.toString());
+ cmd_buf.setLength(0);
+ if (res != null) {
+ if (res.length() > 0 && res.charAt(res.length() - 1) != '\n') {
+ res += '\n';
+ }
+ write(0, res.getBytes("UTF-8"));
+ }
+ write(0, prompt);
+ }
+ else if (ch == '\b') {
+ int n = cmd_buf.length();
+ if (n > 0) n--;
+ cmd_buf.setLength(n);
+ }
+ else {
+ cmd_buf.append(ch);
+ }
+ }
+ }
+ else {
+ model.getLaunch().writeProcessInputStream(process_id, buf, 0, n);
+ }
}
catch (Exception x) {
- model.onProcessStreamError(null, 0, x, 0);
+ model.onProcessStreamError(process_id, 0, x, 0);
}
}
});
@@ -143,12 +176,18 @@ class TCFConsole {
}
};
+ /* process_id == null means debug console */
TCFConsole(final TCFModel model, String process_id) {
this.model = model;
+ this.process_id = process_id;
display = model.getDisplay();
out_queue = new LinkedList<Message>();
- console = new IOConsole("TCF " + process_id, null,
- ImageCache.getImageDescriptor(ImageCache.IMG_TCF), "UTF-8", true);
+ String image = process_id != null ? ImageCache.IMG_PROCESS_RUNNING : ImageCache.IMG_TCF;
+ console = new IOConsole(
+ "TCF " + (process_id != null ? process_id : "Debugger"), null,
+ ImageCache.getImageDescriptor(image), "UTF-8", true);
+ cmd_line = process_id != null ? null : new TCFCommandLine();
+ if (cmd_line != null) write(0, prompt);
display.asyncExec(new Runnable() {
public void run() {
if (!PlatformUI.isWorkbenchRunning() || PlatformUI.getWorkbench().isStarting()) {
@@ -171,8 +210,8 @@ class TCFConsole {
}
}
});
- inp_thread.setName("TCF Launch Console Input");
- out_thread.setName("TCF Launch Console Output");
+ inp_thread.setName("TCF Console Input");
+ out_thread.setName("TCF Console Output");
inp_thread.start();
out_thread.start();
}
@@ -194,4 +233,4 @@ class TCFConsole {
out_queue.notify();
}
}
-} \ No newline at end of file
+}
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFDebugTask.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFDebugTask.java
index 4a4bf37e6..5c888b809 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFDebugTask.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFDebugTask.java
@@ -8,15 +8,15 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.model;
+package org.eclipse.tcf.internal.debug.ui.model;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.debug.core.DebugException;
-import org.eclipse.tm.internal.tcf.debug.ui.Activator;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.tcf.util.TCFTask;
+import org.eclipse.tcf.internal.debug.ui.Activator;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.util.TCFTask;
/**
* An extension of TCFTask class that adds support for throwing DebugException.
diff --git a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFDetailPane.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFDetailPane.java
new file mode 100644
index 000000000..632147ece
--- /dev/null
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFDetailPane.java
@@ -0,0 +1,293 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2011 Wind River Systems, Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.internal.debug.ui.model;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.debug.ui.IDebugView;
+import org.eclipse.debug.ui.IDetailPane;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.IMenuListener;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.action.Separator;
+import org.eclipse.jface.text.Document;
+import org.eclipse.jface.text.DocumentEvent;
+import org.eclipse.jface.text.IDocumentListener;
+import org.eclipse.jface.text.ITextOperationTarget;
+import org.eclipse.jface.text.ITextPresentationListener;
+import org.eclipse.jface.text.TextPresentation;
+import org.eclipse.jface.text.source.SourceViewer;
+import org.eclipse.jface.text.source.SourceViewerConfiguration;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.StyleRange;
+import org.eclipse.swt.events.FocusAdapter;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.swt.layout.GridData;
+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.tcf.protocol.Protocol;
+import org.eclipse.ui.IViewSite;
+import org.eclipse.ui.IWorkbenchActionConstants;
+import org.eclipse.ui.IWorkbenchCommandConstants;
+import org.eclipse.ui.IWorkbenchPartSite;
+
+/**
+ * This detail pane uses a source viewer to display detailed information about the current
+ * selection.
+ */
+public class TCFDetailPane implements IDetailPane {
+
+ public static final String ID = "org.eclipse.tcf.debug.DetailPaneFactory";
+ public static final String NAME = "TCF Detail Pane";
+ public static final String DESC = "TCF Detail Pane";
+
+ private static final String DETAIL_COPY_ACTION = IDebugView.COPY_ACTION + ".DetailPane"; //$NON-NLS-1$
+ private static final String DETAIL_SELECT_ALL_ACTION = IDebugView.SELECT_ALL_ACTION + ".DetailPane"; //$NON-NLS-1$
+
+ private SourceViewer source_viewer;
+ private Display display;
+ private int generation;
+ private IWorkbenchPartSite part_site;
+ private final Document document = new Document();
+ private final ArrayList<StyleRange> style_ranges = new ArrayList<StyleRange>();
+ private final HashMap<RGB,Color> colors = new HashMap<RGB,Color>();
+ private final Map<String,IAction> action_map = new HashMap<String,IAction>();
+ private final List<String> selection_actions = new ArrayList<String>();
+
+ private final ITextPresentationListener presentation_listener = new ITextPresentationListener() {
+ public void applyTextPresentation(TextPresentation presentation) {
+ for (StyleRange r : style_ranges) presentation.addStyleRange(r);
+ }
+ };
+
+ private class DetailPaneAction extends Action {
+ final int op_code;
+ DetailPaneAction(String text, int op_code) {
+ super(text);
+ this.op_code = op_code;
+ }
+ void update() {
+ boolean was_enabled = isEnabled();
+ boolean is_enabled = (source_viewer != null && source_viewer.canDoOperation(op_code));
+ setEnabled(is_enabled);
+ if (was_enabled == is_enabled) return;
+ firePropertyChange(ENABLED, was_enabled, is_enabled);
+ }
+ @Override
+ public void run() {
+ if (!isEnabled()) return;
+ source_viewer.doOperation(op_code);
+ }
+ }
+
+ private void createActions() {
+ DetailPaneAction action = null;
+
+ action = new DetailPaneAction("Select &All", ITextOperationTarget.SELECT_ALL);
+ action.setActionDefinitionId(IWorkbenchCommandConstants.EDIT_SELECT_ALL);
+ action_map.put(DETAIL_SELECT_ALL_ACTION, action);
+
+ action = new DetailPaneAction("&Copy", ITextOperationTarget.COPY);
+ action.setActionDefinitionId(IWorkbenchCommandConstants.EDIT_COPY);
+ action_map.put(DETAIL_COPY_ACTION, action);
+
+ selection_actions.add(DETAIL_COPY_ACTION);
+
+ updateSelectionDependentActions();
+ }
+
+ private IAction getAction(String id) {
+ return action_map.get(id);
+ }
+
+ private void setGlobalAction(String id, IAction action){
+ if (part_site instanceof IViewSite) {
+ ((IViewSite)part_site).getActionBars().setGlobalActionHandler(id, action);
+ }
+ }
+
+ private void createDetailContextMenu(Control menuControl) {
+ if (part_site == null) return;
+ MenuManager manager = new MenuManager();
+ manager.setRemoveAllWhenShown(true);
+ manager.addMenuListener(new IMenuListener() {
+ public void menuAboutToShow(IMenuManager mgr) {
+ fillDetailContextMenu(mgr);
+ }
+ });
+ Menu menu = manager.createContextMenu(menuControl);
+ menuControl.setMenu(menu);
+ part_site.registerContextMenu(ID, manager, source_viewer.getSelectionProvider());
+ }
+
+ private void fillDetailContextMenu(IMenuManager menu) {
+ //menu.add(new Separator(MODULES_GROUP));
+ //menu.add(new Separator());
+ menu.add(getAction(DETAIL_COPY_ACTION));
+ menu.add(getAction(DETAIL_SELECT_ALL_ACTION));
+ menu.add(new Separator());
+ menu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
+ }
+
+ private void updateAction(String id) {
+ IAction action = getAction(id);
+ if (action instanceof DetailPaneAction) ((DetailPaneAction)action).update();
+ }
+
+ private void updateSelectionDependentActions() {
+ for (String id : selection_actions) updateAction(id);
+ }
+
+ public Control createControl(Composite parent) {
+ assert source_viewer == null;
+ source_viewer = new SourceViewer(parent, null, SWT.V_SCROLL | SWT.H_SCROLL);
+ source_viewer.configure(new SourceViewerConfiguration());
+ source_viewer.setDocument(document);
+ source_viewer.setEditable(false);
+ source_viewer.addTextPresentationListener(presentation_listener);
+ Control control = source_viewer.getControl();
+ GridData gd = new GridData(GridData.FILL_BOTH);
+ control.setLayoutData(gd);
+ display = control.getDisplay();
+ createActions();
+ // Add the selection listener so selection dependent actions get updated.
+ document.addDocumentListener(new IDocumentListener() {
+ public void documentAboutToBeChanged(DocumentEvent event) {}
+ public void documentChanged(DocumentEvent event) {
+ updateSelectionDependentActions();
+ }
+ });
+ // Add the selection listener so selection dependent actions get updated.
+ source_viewer.getSelectionProvider().addSelectionChangedListener(new ISelectionChangedListener() {
+ public void selectionChanged(SelectionChangedEvent event) {
+ updateSelectionDependentActions();
+ }
+ });
+ // Add a focus listener to update actions when details area gains focus
+ source_viewer.getControl().addFocusListener(new FocusAdapter() {
+ public void focusGained(FocusEvent e) {
+ if (part_site != null) part_site.setSelectionProvider(source_viewer.getSelectionProvider());
+ setGlobalAction(IDebugView.SELECT_ALL_ACTION, getAction(DETAIL_SELECT_ALL_ACTION));
+ setGlobalAction(IDebugView.COPY_ACTION, getAction(DETAIL_COPY_ACTION));
+ if (part_site instanceof IViewSite) ((IViewSite)part_site).getActionBars().updateActionBars();
+ }
+ public void focusLost(FocusEvent e) {
+ if (part_site != null) part_site.setSelectionProvider(null);
+ setGlobalAction(IDebugView.SELECT_ALL_ACTION, null);
+ setGlobalAction(IDebugView.COPY_ACTION, null);
+ if (part_site instanceof IViewSite) ((IViewSite)part_site).getActionBars().updateActionBars();
+ }
+ });
+ // Add a context menu to the detail area
+ createDetailContextMenu(source_viewer.getTextWidget());
+ return control;
+ }
+
+ public void display(IStructuredSelection selection) {
+ if (source_viewer == null) return;
+ generation++;
+ final int g = generation;
+ final ArrayList<TCFNode> nodes = new ArrayList<TCFNode>();
+ if (selection != null) {
+ Iterator<?> iterator = selection.iterator();
+ while (iterator.hasNext()) {
+ Object next = iterator.next();
+ if (next instanceof TCFNode) nodes.add((TCFNode)next);
+ }
+ }
+ Protocol.invokeLater(new Runnable() {
+ public void run() {
+ if (g != generation) return;
+ final StyledStringBuffer s = getDetailText(nodes, this);
+ if (s == null) return;
+ display.asyncExec(new Runnable() {
+ public void run() {
+ if (g != generation) return;
+ document.set(getStyleRanges(s));
+ }
+ });
+ }
+ });
+ }
+
+ private StyledStringBuffer getDetailText(ArrayList<TCFNode> nodes, Runnable done) {
+ StyledStringBuffer bf = new StyledStringBuffer();
+ for (TCFNode n : nodes) {
+ if (n instanceof IDetailsProvider) {
+ if (!((IDetailsProvider)n).getDetailText(bf, done)) return null;
+ }
+ }
+ return bf;
+ }
+
+ private String getStyleRanges(StyledStringBuffer s) {
+ style_ranges.clear();
+ for (StyledStringBuffer.Style x : s.getStyle()) {
+ style_ranges.add(new StyleRange(x.pos, x.len, getColor(x.fg), getColor(x.bg), x.font));
+ }
+ return s.toString();
+ }
+
+ private Color getColor(RGB rgb) {
+ if (rgb == null) return null;
+ Color c = colors.get(rgb);
+ if (c == null) colors.put(rgb, c = new Color(display, rgb));
+ return c;
+ }
+
+ public void dispose() {
+ for (Color c : colors.values()) c.dispose();
+ colors.clear();
+ if (source_viewer == null) return;
+ generation++;
+ if (source_viewer.getControl() != null) {
+ source_viewer.getControl().dispose();
+ }
+ source_viewer = null;
+ selection_actions.clear();
+ action_map.clear();
+ }
+
+ public String getDescription() {
+ return DESC;
+ }
+
+ public String getID() {
+ return ID;
+ }
+
+ public String getName() {
+ return NAME;
+ }
+
+ public void init(IWorkbenchPartSite part_site) {
+ this.part_site = part_site;
+ }
+
+ public boolean setFocus() {
+ if (source_viewer == null) return false;
+ source_viewer.getTextWidget().setFocus();
+ return true;
+ }
+}
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFDetailPaneFactory.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFDetailPaneFactory.java
index e7a6d4fc5..25d988da9 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFDetailPaneFactory.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFDetailPaneFactory.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.model;
+package org.eclipse.tcf.internal.debug.ui.model;
import java.util.HashSet;
import java.util.Set;
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFMemoryBlockRetrieval.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFMemoryBlockRetrieval.java
index 18a3f5704..219d01301 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFMemoryBlockRetrieval.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFMemoryBlockRetrieval.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.model;
+package org.eclipse.tcf.internal.debug.ui.model;
import java.math.BigInteger;
import java.util.ArrayList;
@@ -26,17 +26,17 @@ import org.eclipse.debug.core.model.IMemoryBlockExtension;
import org.eclipse.debug.core.model.IMemoryBlockRetrieval;
import org.eclipse.debug.core.model.IMemoryBlockRetrievalExtension;
import org.eclipse.debug.core.model.MemoryByte;
-import org.eclipse.tm.internal.tcf.debug.model.ITCFConstants;
-import org.eclipse.tm.internal.tcf.debug.model.TCFLaunch;
-import org.eclipse.tm.internal.tcf.debug.ui.Activator;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.tcf.services.IExpressions;
-import org.eclipse.tm.tcf.services.IMemory;
-import org.eclipse.tm.tcf.services.ISymbols;
-import org.eclipse.tm.tcf.services.IMemory.MemoryError;
-import org.eclipse.tm.tcf.util.TCFDataCache;
+import org.eclipse.tcf.internal.debug.model.ITCFConstants;
+import org.eclipse.tcf.internal.debug.model.TCFLaunch;
+import org.eclipse.tcf.internal.debug.ui.Activator;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.services.IExpressions;
+import org.eclipse.tcf.services.IMemory;
+import org.eclipse.tcf.services.ISymbols;
+import org.eclipse.tcf.services.IMemory.MemoryError;
+import org.eclipse.tcf.util.TCFDataCache;
/**
* A memory block retrieval allows the user interface to request a memory block from a debugger when needed.
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModel.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFModel.java
index 1f8787bd4..83faae53e 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModel.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFModel.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.model;
+package org.eclipse.tcf.internal.debug.ui.model;
import java.util.ArrayList;
import java.util.Collection;
@@ -37,7 +37,6 @@ import org.eclipse.debug.core.model.IDebugModelProvider;
import org.eclipse.debug.core.model.IExpression;
import org.eclipse.debug.core.model.IMemoryBlockRetrieval;
import org.eclipse.debug.core.model.IMemoryBlockRetrievalExtension;
-import org.eclipse.debug.core.model.ISourceLocator;
import org.eclipse.debug.internal.ui.viewers.model.ITreeModelViewer;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IChildrenCountUpdate;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IChildrenUpdate;
@@ -80,44 +79,45 @@ import org.eclipse.swt.graphics.Device;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.MessageBox;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.tm.internal.tcf.debug.actions.TCFAction;
-import org.eclipse.tm.internal.tcf.debug.launch.TCFSourceLookupDirector;
-import org.eclipse.tm.internal.tcf.debug.launch.TCFSourceLookupParticipant;
-import org.eclipse.tm.internal.tcf.debug.model.ITCFConstants;
-import org.eclipse.tm.internal.tcf.debug.model.TCFContextState;
-import org.eclipse.tm.internal.tcf.debug.model.TCFLaunch;
-import org.eclipse.tm.internal.tcf.debug.model.TCFSourceRef;
-import org.eclipse.tm.internal.tcf.debug.ui.Activator;
-import org.eclipse.tm.internal.tcf.debug.ui.commands.BackIntoCommand;
-import org.eclipse.tm.internal.tcf.debug.ui.commands.BackOverCommand;
-import org.eclipse.tm.internal.tcf.debug.ui.commands.BackResumeCommand;
-import org.eclipse.tm.internal.tcf.debug.ui.commands.BackReturnCommand;
-import org.eclipse.tm.internal.tcf.debug.ui.commands.DisconnectCommand;
-import org.eclipse.tm.internal.tcf.debug.ui.commands.DropToFrameCommand;
-import org.eclipse.tm.internal.tcf.debug.ui.commands.ResumeCommand;
-import org.eclipse.tm.internal.tcf.debug.ui.commands.StepIntoCommand;
-import org.eclipse.tm.internal.tcf.debug.ui.commands.StepOverCommand;
-import org.eclipse.tm.internal.tcf.debug.ui.commands.StepReturnCommand;
-import org.eclipse.tm.internal.tcf.debug.ui.commands.SuspendCommand;
-import org.eclipse.tm.internal.tcf.debug.ui.commands.TerminateCommand;
-import org.eclipse.tm.internal.tcf.debug.ui.preferences.TCFPreferences;
-import org.eclipse.tm.tcf.core.Command;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IErrorReport;
-import org.eclipse.tm.tcf.protocol.IService;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.tcf.services.IDisassembly;
-import org.eclipse.tm.tcf.services.ILineNumbers;
-import org.eclipse.tm.tcf.services.IMemory;
-import org.eclipse.tm.tcf.services.IMemoryMap;
-import org.eclipse.tm.tcf.services.IProcesses;
-import org.eclipse.tm.tcf.services.IRegisters;
-import org.eclipse.tm.tcf.services.IRunControl;
-import org.eclipse.tm.tcf.services.IStackTrace;
-import org.eclipse.tm.tcf.services.ISymbols;
-import org.eclipse.tm.tcf.util.TCFDataCache;
-import org.eclipse.tm.tcf.util.TCFTask;
+import org.eclipse.tcf.internal.debug.actions.TCFAction;
+import org.eclipse.tcf.internal.debug.launch.TCFSourceLookupDirector;
+import org.eclipse.tcf.internal.debug.launch.TCFSourceLookupParticipant;
+import org.eclipse.tcf.internal.debug.model.ITCFConstants;
+import org.eclipse.tcf.internal.debug.model.TCFContextState;
+import org.eclipse.tcf.internal.debug.model.TCFLaunch;
+import org.eclipse.tcf.internal.debug.model.TCFSourceRef;
+import org.eclipse.tcf.internal.debug.ui.Activator;
+import org.eclipse.tcf.internal.debug.ui.adapters.TCFNodePropertySource;
+import org.eclipse.tcf.internal.debug.ui.commands.BackIntoCommand;
+import org.eclipse.tcf.internal.debug.ui.commands.BackOverCommand;
+import org.eclipse.tcf.internal.debug.ui.commands.BackResumeCommand;
+import org.eclipse.tcf.internal.debug.ui.commands.BackReturnCommand;
+import org.eclipse.tcf.internal.debug.ui.commands.DisconnectCommand;
+import org.eclipse.tcf.internal.debug.ui.commands.DropToFrameCommand;
+import org.eclipse.tcf.internal.debug.ui.commands.ResumeCommand;
+import org.eclipse.tcf.internal.debug.ui.commands.StepIntoCommand;
+import org.eclipse.tcf.internal.debug.ui.commands.StepOverCommand;
+import org.eclipse.tcf.internal.debug.ui.commands.StepReturnCommand;
+import org.eclipse.tcf.internal.debug.ui.commands.SuspendCommand;
+import org.eclipse.tcf.internal.debug.ui.commands.TerminateCommand;
+import org.eclipse.tcf.internal.debug.ui.preferences.TCFPreferences;
+import org.eclipse.tcf.core.Command;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IErrorReport;
+import org.eclipse.tcf.protocol.IService;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.services.IDisassembly;
+import org.eclipse.tcf.services.ILineNumbers;
+import org.eclipse.tcf.services.IMemory;
+import org.eclipse.tcf.services.IMemoryMap;
+import org.eclipse.tcf.services.IProcesses;
+import org.eclipse.tcf.services.IRegisters;
+import org.eclipse.tcf.services.IRunControl;
+import org.eclipse.tcf.services.IStackTrace;
+import org.eclipse.tcf.services.ISymbols;
+import org.eclipse.tcf.util.TCFDataCache;
+import org.eclipse.tcf.util.TCFTask;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IPersistableElement;
@@ -291,7 +291,8 @@ public class TCFModel implements IElementContentProvider, IElementLabelProvider,
private final Map<IWorkbenchPart,TCFSnapshot> locks = new HashMap<IWorkbenchPart,TCFSnapshot>();
private final Map<IWorkbenchPart,Integer> lock_policy = new HashMap<IWorkbenchPart,Integer>();
- private TCFConsole console;
+ private final Map<String,TCFConsole> process_consoles = new HashMap<String,TCFConsole>();;
+ private final List<TCFConsole> debug_consoles = new ArrayList<TCFConsole>();
private static final Map<ILaunchConfiguration,IEditorInput> editor_not_found =
new HashMap<ILaunchConfiguration,IEditorInput>();
@@ -384,6 +385,7 @@ public class TCFModel implements IElementContentProvider, IElementLabelProvider,
if (action_cnt == 0) {
setDebugViewSelection(node, reason);
annotation_manager.updateAnnotations(null, launch);
+ TCFNodePropertySource.refresh(node);
}
action_results.remove(context);
}
@@ -414,6 +416,9 @@ public class TCFModel implements IElementContentProvider, IElementLabelProvider,
((TCFNodeExecContext)node).onContextChanged(ctx);
}
onMemoryChanged(id, true, false);
+ if (active_actions.get(id) == null) {
+ TCFNodePropertySource.refresh(node);
+ }
}
launch_node.onAnyContextSuspendedOrChanged();
}
@@ -447,6 +452,7 @@ public class TCFModel implements IElementContentProvider, IElementLabelProvider,
if (active_actions.get(id) == null) {
setDebugViewSelection(node, reason);
annotation_manager.updateAnnotations(null, launch);
+ TCFNodePropertySource.refresh(node);
}
onMemoryChanged(id, false, true);
}
@@ -560,6 +566,7 @@ public class TCFModel implements IElementContentProvider, IElementLabelProvider,
setDebugViewSelection(id2node.get(id), "Action");
for (TCFModelProxy p : model_proxies.values()) p.post();
annotation_manager.updateAnnotations(null, launch);
+ TCFNodePropertySource.refresh(node);
}
};
@@ -753,10 +760,9 @@ public class TCFModel implements IElementContentProvider, IElementLabelProvider,
}
void onProcessOutput(String process_id, final int stream_id, byte[] data) {
- IProcesses.ProcessContext prs = launch.getProcessContext();
- if (prs == null || !process_id.equals(prs.getID())) return;
- if (console == null) console = new TCFConsole(this, process_id);
- console.write(stream_id, data);
+ TCFConsole c = process_consoles.get(process_id);
+ if (c == null) process_consoles.put(process_id, c = new TCFConsole(this, process_id));
+ c.write(stream_id, data);
}
void onProcessStreamError(String process_id, int stream_id, Exception x, int lost_size) {
@@ -928,7 +934,8 @@ public class TCFModel implements IElementContentProvider, IElementLabelProvider,
void dispose() {
launch.removeActionsListener(actions_listener);
expr_manager.removeExpressionListener(expressions_listener);
- if (console != null) console.close();
+ for (TCFConsole c : process_consoles.values()) c.close();
+ for (TCFConsole c : debug_consoles) c.close();
}
void addNode(String id, TCFNode node) {
@@ -1084,13 +1091,14 @@ public class TCFModel implements IElementContentProvider, IElementLabelProvider,
/**
* Asynchronously create model node for given ID.
- * If 'cache' is valid after the method returns, the node cannot be created,
- * and the cache will contain an error report.
+ * If 'done' is TCFDataCache and it is valid after the method returns,
+ * the node cannot be created because of an error,
+ * and the cache will contain the error report.
* @param id - context ID.
- * @param cache - data cache object that need the node for validation.
- * @return - true if all done, false if 'cache' is waiting for remote data.
+ * @param done - an object waiting for cache validation.
+ * @return - true if all done, false if 'done' is waiting for remote data.
*/
- public boolean createNode(String id, final TCFDataCache<?> cache) {
+ public boolean createNode(String id, final Runnable done) {
TCFNode parent = getNode(id);
if (parent != null) return true;
LinkedList<Object> path = null;
@@ -1098,11 +1106,13 @@ public class TCFModel implements IElementContentProvider, IElementLabelProvider,
Object obj = context_map.get(id);
if (obj == null) obj = new CreateNodeRunnable(id);
if (obj instanceof CreateNodeRunnable) {
- ((CreateNodeRunnable)obj).wait(cache);
+ ((CreateNodeRunnable)obj).wait(done);
return false;
}
if (obj instanceof Throwable) {
- cache.set(null, (Throwable)obj, null);
+ if (done instanceof TCFDataCache<?>) {
+ ((TCFDataCache<?>)done).set(null, (Throwable)obj, null);
+ }
return true;
}
if (path == null) path = new LinkedList<Object>();
@@ -1522,8 +1532,7 @@ public class TCFModel implements IElementContentProvider, IElementLabelProvider,
IEditorInput editor_input = null;
int line = 0;
if (area != null) {
- ISourceLocator locator = getLaunch().getSourceLocator();
- Object source_element = TCFSourceLookupDirector.lookup(locator, area);
+ Object source_element = TCFSourceLookupDirector.lookup(launch, area);
if (source_element != null) {
ISourcePresentation presentation = TCFModelPresentation.getDefault();
editor_input = presentation.getEditorInput(source_element);
@@ -1533,7 +1542,7 @@ public class TCFModel implements IElementContentProvider, IElementLabelProvider,
}
if (area != null && !instruction_stepping_enabled && (editor_input == null || editor_id == null)) {
ILaunchConfiguration cfg = launch.getLaunchConfiguration();
- ISourceNotFoundPresentation presentation = (ISourceNotFoundPresentation) DebugPlugin.getAdapter(element, ISourceNotFoundPresentation.class);
+ ISourceNotFoundPresentation presentation = (ISourceNotFoundPresentation)DebugPlugin.getAdapter(element, ISourceNotFoundPresentation.class);
if (presentation != null) {
String filename = TCFSourceLookupParticipant.toFileName(area);
editor_input = presentation.getEditorInput(element, cfg, filename);
@@ -1604,6 +1613,13 @@ public class TCFModel implements IElementContentProvider, IElementLabelProvider,
}
/**
+ * Open debugger console that provide command line UI for the debugger.
+ */
+ public void showDebugConsole() {
+ debug_consoles.add(new TCFConsole(this, null));
+ }
+
+ /**
* Show error message box in active workbench window.
* @param title - message box title.
* @param error - error to be shown.
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModelManager.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFModelManager.java
index c8939e44d..47c05a3da 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModelManager.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFModelManager.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.model;
+package org.eclipse.tcf.internal.debug.ui.model;
import java.util.ArrayList;
import java.util.HashMap;
@@ -19,9 +19,9 @@ import java.util.Map;
import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.ILaunch;
import org.eclipse.debug.core.ILaunchesListener;
-import org.eclipse.tm.internal.tcf.debug.model.TCFLaunch;
-import org.eclipse.tm.internal.tcf.debug.ui.Activator;
-import org.eclipse.tm.tcf.protocol.Protocol;
+import org.eclipse.tcf.internal.debug.model.TCFLaunch;
+import org.eclipse.tcf.internal.debug.ui.Activator;
+import org.eclipse.tcf.protocol.Protocol;
public class TCFModelManager {
diff --git a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFModelPresentation.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFModelPresentation.java
new file mode 100644
index 000000000..2e644e46a
--- /dev/null
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFModelPresentation.java
@@ -0,0 +1,269 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Wind River Systems, Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.internal.debug.ui.model;
+
+import java.math.BigInteger;
+import java.net.URI;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+
+import org.eclipse.core.filesystem.EFS;
+import org.eclipse.core.filesystem.URIUtil;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IStorage;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.debug.core.model.IBreakpoint;
+import org.eclipse.debug.core.model.ILineBreakpoint;
+import org.eclipse.debug.core.model.IValue;
+import org.eclipse.debug.ui.IDebugModelPresentation;
+import org.eclipse.debug.ui.IValueDetailListener;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.ILabelProviderListener;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.tcf.internal.debug.model.TCFBreakpointsModel;
+import org.eclipse.tcf.internal.debug.model.TCFLaunch;
+import org.eclipse.tcf.internal.debug.model.TCFSourceRef;
+import org.eclipse.tcf.internal.debug.ui.Activator;
+import org.eclipse.tcf.internal.debug.ui.ImageCache;
+import org.eclipse.tcf.protocol.JSON;
+import org.eclipse.tcf.services.IBreakpoints;
+import org.eclipse.tcf.services.ILineNumbers;
+import org.eclipse.tcf.util.TCFDataCache;
+import org.eclipse.tcf.util.TCFTask;
+import org.eclipse.ui.IEditorDescriptor;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorRegistry;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.ide.FileStoreEditorInput;
+import org.eclipse.ui.part.FileEditorInput;
+
+
+public class TCFModelPresentation implements IDebugModelPresentation {
+
+ public final static String DISPLAY_FULL_PATHS = "DISPLAY_FULL_PATHS"; //$NON-NLS-1$
+
+ private static final String[] attr_names = {
+ TCFBreakpointsModel.ATTR_LINE, "line",
+ TCFBreakpointsModel.ATTR_ADDRESS, "address",
+ TCFBreakpointsModel.ATTR_FUNCTION, "location",
+ TCFBreakpointsModel.ATTR_EXPRESSION, "expression",
+ TCFBreakpointsModel.ATTR_CONDITION, "condition",
+ TCFBreakpointsModel.ATTR_CONTEXTNAMES, "scope (names)",
+ TCFBreakpointsModel.ATTR_CONTEXTIDS, "scope (IDs)",
+ TCFBreakpointsModel.ATTR_EXE_PATHS, "scope (modules)",
+ TCFBreakpointsModel.ATTR_STOP_GROUP, "stop group",
+ };
+
+ private final Collection<ILabelProviderListener> listeners = new HashSet<ILabelProviderListener>();
+ private HashMap<String,Object> attrs = new HashMap<String,Object>();
+
+ private static final TCFModelPresentation default_instance = new TCFModelPresentation();
+
+ public static TCFModelPresentation getDefault() {
+ return default_instance;
+ }
+
+ public void addListener(ILabelProviderListener listener) {
+ listeners.add(listener);
+ }
+
+ public void removeListener(ILabelProviderListener listener) {
+ listeners.remove(listener);
+ }
+
+ public void dispose() {
+ }
+
+ public void computeDetail(IValue value, IValueDetailListener listener) {
+ }
+
+ public Image getImage(Object element) {
+ ImageDescriptor descriptor = null;
+ if (element instanceof IBreakpoint) {
+ final IBreakpoint breakpoint = (IBreakpoint)element;
+ descriptor = ImageCache.getImageDescriptor(ImageCache.IMG_BREAKPOINT_DISABLED);
+ try {
+ if (breakpoint.isEnabled()) {
+ descriptor = new TCFTask<ImageDescriptor>() {
+ public void run() {
+ boolean installed = false;
+ boolean warning = false;
+ boolean error = false;
+ boolean moved = false;
+ ImageDescriptor d = ImageCache.getImageDescriptor(ImageCache.IMG_BREAKPOINT_ENABLED);
+ Map<TCFLaunch,Map<String,Object>> status = Activator.getAnnotationManager().getBreakpointStatus(breakpoint);
+ for (TCFLaunch launch : status.keySet()) {
+ Map<String,Object> map = status.get(launch);
+ if (map == null) continue;
+ if ((String)map.get(IBreakpoints.STATUS_ERROR) != null) error = true;
+ Object planted = map.get(IBreakpoints.STATUS_INSTANCES);
+ if (planted == null) continue;
+ @SuppressWarnings("unchecked")
+ Collection<Map<String,Object>> list = (Collection<Map<String,Object>>)planted;
+ for (Map<String,Object> m : list) {
+ if (m.get(IBreakpoints.INSTANCE_ERROR) == null) {
+ installed = true;
+ if (!moved) {
+ TCFNodeExecContext ctx = null;
+ String ctx_id = (String)m.get(IBreakpoints.INSTANCE_CONTEXT);
+ BigInteger addr = JSON.toBigInteger((Number)m.get(IBreakpoints.INSTANCE_ADDRESS));
+ int line = breakpoint.getMarker().getAttribute(TCFBreakpointsModel.ATTR_LINE, 0);
+ if (ctx_id != null && addr != null && line > 0) {
+ TCFModel model = TCFModelManager.getModelManager().getModel(launch);
+ if (model != null) {
+ if (!model.createNode(ctx_id, this)) return;
+ TCFDataCache<TCFNodeExecContext> mem = model.searchMemoryContext(model.getNode(ctx_id));
+ if (mem != null) {
+ if (!mem.validate(this)) return;
+ ctx = mem.getData();
+ }
+ }
+ }
+ if (ctx != null) {
+ ILineNumbers.CodeArea area = null;
+ TCFDataCache<TCFSourceRef> line_cache = ctx.getLineInfo(addr);
+ if (line_cache != null) {
+ if (!line_cache.validate(this)) return;
+ TCFSourceRef line_data = line_cache.getData();
+ if (line_data != null && line_data.area != null) area = line_data.area;
+ }
+ if (area != null && area.start_line != line) moved = true;
+ }
+ }
+ }
+ else {
+ warning = true;
+ }
+ }
+ }
+ if (moved) d = ImageCache.addOverlay(d, ImageCache.IMG_BREAKPOINT_MOVED, 0, 0);
+ else if (installed) d = ImageCache.addOverlay(d, ImageCache.IMG_BREAKPOINT_INSTALLED, 0, 8);
+ if (warning) d = ImageCache.addOverlay(d, ImageCache.IMG_BREAKPOINT_WARNING, 9, 8);
+ if (error) d = ImageCache.addOverlay(d, ImageCache.IMG_BREAKPOINT_ERROR, 9, 8);
+ done(d);
+ }
+ }.getE();
+ }
+ String cond = breakpoint.getMarker().getAttribute(TCFBreakpointsModel.ATTR_CONDITION, null);
+ if (cond != null && cond.length() > 0) {
+ descriptor = ImageCache.addOverlay(descriptor, ImageCache.IMG_BREAKPOINT_CONDITIONAL);
+ }
+ }
+ catch (Throwable x) {
+ }
+ }
+ if (descriptor != null) return ImageCache.getImage(descriptor);
+ return null;
+ }
+
+ public String getText(Object element) {
+ String text = null;
+ if (element instanceof IBreakpoint) {
+ final IBreakpoint breakpoint = (IBreakpoint)element;
+ IMarker marker = breakpoint.getMarker();
+ if (marker == null) return null;
+ StringBuffer bf = new StringBuffer();
+ try {
+ Map<String,Object> m = marker.getAttributes();
+ String file = marker.getAttribute(TCFBreakpointsModel.ATTR_FILE, null);
+ if (file != null && file.length() > 0) {
+ IPath path = new Path(file);
+ if (path.isValidPath(file)) {
+ bf.append(isShowQualifiedNames() ? path.toOSString() : path.lastSegment());
+ bf.append(' ');
+ }
+ }
+ for (int i = 0; i < attr_names.length; i += 2) {
+ Object obj = m.get(attr_names[i]);
+ if (obj == null) continue;
+ String s = obj.toString();
+ if (s.length() == 0) continue;
+ bf.append('[');
+ bf.append(attr_names[i + 1]);
+ bf.append(": ");
+ bf.append(s);
+ bf.append(']');
+ }
+ if (bf.length() == 0) {
+ String id = marker.getAttribute(TCFBreakpointsModel.ATTR_ID, null);
+ if (id == null) id = Long.toString(marker.getId());
+ bf.append(id);
+ }
+ }
+ catch (Throwable x) {
+ return x.toString();
+ }
+ text = bf.toString();
+ String status = new TCFTask<String>() {
+ public void run() {
+ done(Activator.getAnnotationManager().getBreakpointStatusText(breakpoint));
+ }
+ }.getE();
+ if (status != null) text += " (" + status + ")";
+ }
+ return text;
+ }
+
+ protected boolean isShowQualifiedNames() {
+ Boolean show_qualified = (Boolean)attrs.get( DISPLAY_FULL_PATHS );
+ if (show_qualified == null) return false;
+ return show_qualified.booleanValue();
+ }
+
+ public void setAttribute(String attribute, Object value) {
+ if (value == null) attrs.remove(attribute);
+ else attrs.put(attribute, value);
+ }
+
+ public boolean isLabelProperty(Object element, String property) {
+ return true;
+ }
+
+ public String getEditorId(IEditorInput input, Object element) {
+ String id = null;
+ if (input != null) {
+ IEditorRegistry registry = PlatformUI.getWorkbench().getEditorRegistry();
+ IEditorDescriptor descriptor = registry.getDefaultEditor(input.getName());
+ if (descriptor != null) id = descriptor.getId();
+ }
+ return id;
+ }
+
+ public IEditorInput getEditorInput(Object element) {
+ if (element instanceof ILineBreakpoint) {
+ element = ((ILineBreakpoint)element).getMarker();
+ }
+ if (element instanceof IMarker) {
+ element = ((IMarker)element).getResource();
+ }
+ if (element instanceof IFile) {
+ return new FileEditorInput((IFile)element);
+ }
+ if (element instanceof IStorage) {
+ IPath fullPath = ((IStorage)element).getFullPath();
+ URI uri = URIUtil.toURI(fullPath);
+ if (uri != null) {
+ try {
+ return new FileStoreEditorInput(EFS.getStore(uri));
+ }
+ catch (CoreException e) {
+ Activator.log(e);
+ }
+ }
+ }
+ return null;
+ }
+}
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModelProxy.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFModelProxy.java
index 2b37168d5..84972913d 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModelProxy.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFModelProxy.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.model;
+package org.eclipse.tcf.internal.debug.ui.model;
import java.util.Arrays;
import java.util.Comparator;
@@ -21,6 +21,7 @@ import java.util.Set;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.debug.internal.ui.viewers.model.ITreeModelViewer;
import org.eclipse.debug.internal.ui.viewers.model.InternalTreeModelViewer;
+import org.eclipse.debug.internal.ui.viewers.model.InternalVirtualTreeModelViewer;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IChildrenCountUpdate;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IChildrenUpdate;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta;
@@ -35,8 +36,8 @@ import org.eclipse.jface.viewers.TreePath;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.swt.graphics.Device;
import org.eclipse.swt.widgets.Display;
-import org.eclipse.tm.internal.tcf.debug.model.TCFLaunch;
-import org.eclipse.tm.tcf.protocol.Protocol;
+import org.eclipse.tcf.internal.debug.model.TCFLaunch;
+import org.eclipse.tcf.protocol.Protocol;
/**
* A model proxy represents a model for a specific presentation context and
@@ -426,7 +427,11 @@ public class TCFModelProxy extends AbstractModelProxy implements IModelProxy, Ru
asyncExec(new Runnable() {
boolean found;
public void run() {
- found = ((InternalTreeModelViewer)getViewer()).findElementIndex(TreePath.EMPTY, launch) >= 0;
+ if (getViewer() instanceof InternalTreeModelViewer) {
+ found = ((InternalTreeModelViewer)getViewer()).findElementIndex(TreePath.EMPTY, launch) >= 0;
+ } else if (getViewer() instanceof InternalVirtualTreeModelViewer) {
+ found = ((InternalVirtualTreeModelViewer)getViewer()).findElementIndex(TreePath.EMPTY, launch) >= 0;
+ }
Protocol.invokeLater(new Runnable() {
public void run() {
if (disposed) return;
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModelSelectionPolicy.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFModelSelectionPolicy.java
index d860fdd7e..9f5242bb5 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModelSelectionPolicy.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFModelSelectionPolicy.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.model;
+package org.eclipse.tcf.internal.debug.ui.model;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelSelectionPolicy;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
@@ -16,10 +16,10 @@ import org.eclipse.debug.ui.IDebugUIConstants;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.tm.internal.tcf.debug.model.TCFContextState;
-import org.eclipse.tm.tcf.services.IRunControl;
-import org.eclipse.tm.tcf.util.TCFDataCache;
-import org.eclipse.tm.tcf.util.TCFTask;
+import org.eclipse.tcf.internal.debug.model.TCFContextState;
+import org.eclipse.tcf.services.IRunControl;
+import org.eclipse.tcf.util.TCFDataCache;
+import org.eclipse.tcf.util.TCFTask;
class TCFModelSelectionPolicy implements IModelSelectionPolicy {
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNode.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNode.java
index 846933802..ff5cf76e4 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNode.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNode.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.model;
+package org.eclipse.tcf.internal.debug.ui.model;
import java.util.LinkedList;
@@ -23,16 +23,17 @@ import org.eclipse.debug.internal.ui.viewers.model.provisional.ILabelUpdate;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerInputUpdate;
-import org.eclipse.tm.internal.tcf.debug.model.TCFLaunch;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.tcf.util.TCFDataCache;
+import org.eclipse.tcf.debug.ui.ITCFObject;
+import org.eclipse.tcf.internal.debug.model.TCFLaunch;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.util.TCFDataCache;
import org.eclipse.ui.IWorkbenchPart;
/**
* TCFNode is base class for all TCF debug model elements.
*/
-public abstract class TCFNode extends PlatformObject implements Comparable<TCFNode> {
+public abstract class TCFNode extends PlatformObject implements ITCFObject, Comparable<TCFNode> {
protected final String id;
protected final TCFNode parent;
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeArrayPartition.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeArrayPartition.java
index fdaad03db..e3a12d201 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeArrayPartition.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeArrayPartition.java
@@ -8,13 +8,13 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.model;
+package org.eclipse.tcf.internal.debug.ui.model;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IChildrenCountUpdate;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IChildrenUpdate;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IHasChildrenUpdate;
import org.eclipse.debug.internal.ui.viewers.model.provisional.ILabelUpdate;
-import org.eclipse.tm.internal.tcf.debug.ui.ImageCache;
+import org.eclipse.tcf.internal.debug.ui.ImageCache;
public class TCFNodeArrayPartition extends TCFNode {
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeExecContext.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeExecContext.java
index 833a1f933..29836cf61 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeExecContext.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeExecContext.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.model;
+package org.eclipse.tcf.internal.debug.ui.model;
import java.math.BigInteger;
import java.util.ArrayList;
@@ -30,21 +30,22 @@ import org.eclipse.debug.ui.IDebugUIConstants;
import org.eclipse.debug.ui.memory.IMemoryRenderingSite;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.swt.graphics.RGB;
-import org.eclipse.tm.internal.tcf.debug.model.TCFContextState;
-import org.eclipse.tm.internal.tcf.debug.model.TCFFunctionRef;
-import org.eclipse.tm.internal.tcf.debug.model.TCFSourceRef;
-import org.eclipse.tm.internal.tcf.debug.ui.ImageCache;
-import org.eclipse.tm.tcf.protocol.IErrorReport;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.protocol.JSON;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.tcf.services.ILineNumbers;
-import org.eclipse.tm.tcf.services.IMemory;
-import org.eclipse.tm.tcf.services.IMemoryMap;
-import org.eclipse.tm.tcf.services.IProcesses;
-import org.eclipse.tm.tcf.services.IRunControl;
-import org.eclipse.tm.tcf.services.ISymbols;
-import org.eclipse.tm.tcf.util.TCFDataCache;
+import org.eclipse.tcf.internal.debug.model.TCFContextState;
+import org.eclipse.tcf.internal.debug.model.TCFFunctionRef;
+import org.eclipse.tcf.internal.debug.model.TCFSourceRef;
+import org.eclipse.tcf.internal.debug.model.TCFSymFileRef;
+import org.eclipse.tcf.internal.debug.ui.ImageCache;
+import org.eclipse.tcf.protocol.IErrorReport;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.JSON;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.services.ILineNumbers;
+import org.eclipse.tcf.services.IMemory;
+import org.eclipse.tcf.services.IMemoryMap;
+import org.eclipse.tcf.services.IProcesses;
+import org.eclipse.tcf.services.IRunControl;
+import org.eclipse.tcf.services.ISymbols;
+import org.eclipse.tcf.util.TCFDataCache;
import org.eclipse.ui.IWorkbenchPart;
public class TCFNodeExecContext extends TCFNode implements ISymbolOwner {
@@ -69,6 +70,7 @@ public class TCFNodeExecContext extends TCFNode implements ISymbolOwner {
private final TCFData<TCFNodeExecContext> symbols_node;
private final TCFData<String> full_name;
+ private LinkedHashMap<BigInteger,TCFDataCache<TCFSymFileRef>> syms_info_lookup_cache;
private LinkedHashMap<BigInteger,TCFDataCache<TCFSourceRef>> line_info_lookup_cache;
private LinkedHashMap<BigInteger,TCFDataCache<TCFFunctionRef>> func_info_lookup_cache;
private LookupCacheTimer lookup_cache_timer;
@@ -89,9 +91,17 @@ public class TCFNodeExecContext extends TCFNode implements ISymbolOwner {
public void run() {
if (isDisposed()) return;
+ if (syms_info_lookup_cache != null) {
+ BigInteger addr = syms_info_lookup_cache.keySet().iterator().next();
+ TCFDataCache<?> cache = syms_info_lookup_cache.get(addr);
+ if (!cache.isPending()) {
+ syms_info_lookup_cache.remove(addr).dispose();
+ if (syms_info_lookup_cache.size() == 0) syms_info_lookup_cache = null;
+ }
+ }
if (line_info_lookup_cache != null) {
BigInteger addr = line_info_lookup_cache.keySet().iterator().next();
- TCFDataCache<TCFSourceRef> cache = line_info_lookup_cache.get(addr);
+ TCFDataCache<?> cache = line_info_lookup_cache.get(addr);
if (!cache.isPending()) {
line_info_lookup_cache.remove(addr).dispose();
if (line_info_lookup_cache.size() == 0) line_info_lookup_cache = null;
@@ -99,13 +109,13 @@ public class TCFNodeExecContext extends TCFNode implements ISymbolOwner {
}
if (func_info_lookup_cache != null) {
BigInteger addr = func_info_lookup_cache.keySet().iterator().next();
- TCFDataCache<TCFFunctionRef> cache = func_info_lookup_cache.get(addr);
+ TCFDataCache<?> cache = func_info_lookup_cache.get(addr);
if (!cache.isPending()) {
func_info_lookup_cache.remove(addr).dispose();
if (func_info_lookup_cache.size() == 0) func_info_lookup_cache = null;
}
}
- if (line_info_lookup_cache == null && func_info_lookup_cache == null) {
+ if (syms_info_lookup_cache == null && line_info_lookup_cache == null && func_info_lookup_cache == null) {
lookup_cache_timer = null;
}
else {
@@ -133,8 +143,6 @@ public class TCFNodeExecContext extends TCFNode implements ISymbolOwner {
private ChildrenStateInfo last_children_state_info;
private boolean delayed_children_list_delta;
- private String hover_expression;
-
/**
* Wrapper class for IMemoryMap.MemoryRegion.
* The class help to search memory region by address by
@@ -499,17 +507,10 @@ public class TCFNodeExecContext extends TCFNode implements ISymbolOwner {
}
TCFChildren getHoverExpressionCache(String expression) {
- if (expression != hover_expression && (expression == null || !expression.equals(hover_expression))) {
- hover_expression = expression;
- children_hover_exps.cancel();
- }
+ children_hover_exps.setExpression(expression);
return children_hover_exps;
}
- String getHoverExpression() {
- return hover_expression;
- }
-
public TCFChildrenLogExpressions getLogExpressionCache() {
return children_log_exps;
}
@@ -546,6 +547,49 @@ public class TCFNodeExecContext extends TCFNode implements ISymbolOwner {
return signal_mask;
}
+ public TCFDataCache<TCFSymFileRef> getSymFileInfo(final BigInteger addr) {
+ if (isDisposed()) return null;
+ TCFDataCache<TCFSymFileRef> ref_cache;
+ if (syms_info_lookup_cache != null) {
+ ref_cache = syms_info_lookup_cache.get(addr);
+ if (ref_cache != null) return ref_cache;
+ }
+ final ISymbols syms = launch.getService(ISymbols.class);
+ if (syms == null) return null;
+ if (syms_info_lookup_cache == null) {
+ syms_info_lookup_cache = new LinkedHashMap<BigInteger,TCFDataCache<TCFSymFileRef>>(11, 0.75f, true);
+ if (lookup_cache_timer == null) lookup_cache_timer = new LookupCacheTimer();
+ }
+ syms_info_lookup_cache.put(addr, ref_cache = new TCFData<TCFSymFileRef>(channel) {
+ @Override
+ protected boolean startDataRetrieval() {
+ if (!memory_node.validate(this)) return false;
+ IMemory.MemoryContext mem_data = null;
+ TCFNodeExecContext mem = memory_node.getData();
+ if (mem != null) {
+ TCFDataCache<IMemory.MemoryContext> mem_cache = mem.mem_context;
+ if (!mem_cache.validate(this)) return false;
+ mem_data = mem_cache.getData();
+ }
+ final TCFSymFileRef ref_data = new TCFSymFileRef();
+ if (mem_data != null) {
+ ref_data.context_id = mem_data.getID();
+ ref_data.address_size = mem_data.getAddressSize();
+ }
+ command = syms.getSymFileInfo(ref_data.context_id, addr, new ISymbols.DoneGetSymFileInfo() {
+ public void doneGetSymFileInfo(IToken token, Exception error, Map<String,Object> props) {
+ ref_data.address = addr;
+ ref_data.error = error;
+ ref_data.props = props;
+ set(token, null, ref_data);
+ }
+ });
+ return false;
+ }
+ });
+ return ref_cache;
+ }
+
public TCFDataCache<TCFSourceRef> getLineInfo(final BigInteger addr) {
if (isDisposed()) return null;
TCFDataCache<TCFSourceRef> ref_cache;
@@ -653,6 +697,16 @@ public class TCFNodeExecContext extends TCFNode implements ISymbolOwner {
}
private void clearLookupCaches() {
+ if (syms_info_lookup_cache != null) {
+ Iterator<TCFDataCache<TCFSymFileRef>> i = syms_info_lookup_cache.values().iterator();
+ while (i.hasNext()) {
+ TCFDataCache<TCFSymFileRef> cache = i.next();
+ if (cache.isPending()) continue;
+ cache.dispose();
+ i.remove();
+ }
+ if (syms_info_lookup_cache.size() == 0) syms_info_lookup_cache = null;
+ }
if (line_info_lookup_cache != null) {
Iterator<TCFDataCache<TCFSourceRef>> i = line_info_lookup_cache.values().iterator();
while (i.hasNext()) {
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeExpression.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeExpression.java
index fe200332c..a83c10642 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeExpression.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeExpression.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.model;
+package org.eclipse.tcf.internal.debug.ui.model;
import java.math.BigInteger;
import java.util.LinkedList;
@@ -32,20 +32,20 @@ import org.eclipse.jface.viewers.TextCellEditor;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.RGB;
import org.eclipse.swt.widgets.Composite;
-import org.eclipse.tm.internal.tcf.debug.model.TCFContextState;
-import org.eclipse.tm.internal.tcf.debug.ui.Activator;
-import org.eclipse.tm.internal.tcf.debug.ui.ImageCache;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.protocol.JSON;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.tcf.services.IExpressions;
-import org.eclipse.tm.tcf.services.IMemory;
-import org.eclipse.tm.tcf.services.IMemory.MemoryError;
-import org.eclipse.tm.tcf.services.IRegisters;
-import org.eclipse.tm.tcf.services.ISymbols;
-import org.eclipse.tm.tcf.util.TCFDataCache;
-import org.eclipse.tm.tcf.util.TCFTask;
+import org.eclipse.tcf.internal.debug.model.TCFContextState;
+import org.eclipse.tcf.internal.debug.ui.Activator;
+import org.eclipse.tcf.internal.debug.ui.ImageCache;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.JSON;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.services.IExpressions;
+import org.eclipse.tcf.services.IMemory;
+import org.eclipse.tcf.services.IMemory.MemoryError;
+import org.eclipse.tcf.services.IRegisters;
+import org.eclipse.tcf.services.ISymbols;
+import org.eclipse.tcf.util.TCFDataCache;
+import org.eclipse.tcf.util.TCFTask;
public class TCFNodeExpression extends TCFNode implements IElementEditor, ICastToType, IWatchInExpressions, IDetailsProvider {
@@ -299,9 +299,9 @@ public class TCFNodeExpression extends TCFNode implements IElementEditor, ICastT
return false;
}
@Override
- public void cancel() {
+ public void reset() {
if (isValid() && getData() != null) getData().dispose();
- super.cancel();
+ super.reset();
}
@Override
public void dispose() {
@@ -757,6 +757,22 @@ public class TCFNodeExpression extends TCFNode implements IElementEditor, ICastT
if ((flags & ISymbols.SYM_FLAG_REFERENCE) != 0) s = "&";
get_base_type = true;
break;
+ case member_pointer:
+ {
+ String id = type_symbol.getContainerID();
+ if (id != null) {
+ TCFDataCache<ISymbols.Symbol> cls_cache = model.getSymbolInfoCache(id);
+ if (!cls_cache.validate(done)) return false;
+ ISymbols.Symbol cls_data = cls_cache.getData();
+ if (cls_data != null) {
+ String cls_name = cls_data.getName();
+ if (cls_name != null) s = cls_name + "::*";
+ }
+ }
+ if (s == null) s = "::*";
+ }
+ get_base_type = true;
+ break;
case array:
s = "[" + type_symbol.getLength() + "]";
get_base_type = true;
@@ -1236,6 +1252,7 @@ public class TCFNodeExpression extends TCFNode implements IElementEditor, ICastT
break;
case pointer:
case function:
+ case member_pointer:
if (level == 0) {
bf.append("Oct: ", SWT.BOLD);
bf.append(toNumberString(8, type_class, data, offs, size, big_endian));
@@ -1332,7 +1349,7 @@ public class TCFNodeExpression extends TCFNode implements IElementEditor, ICastT
appendErrorText(bf.getStringBuffer(), expression.getError());
if (bf.length() == pos) appendErrorText(bf.getStringBuffer(), value.getError());
if (bf.length() > pos) {
- bf.append(pos, 0, null, rgb_error);
+ bf.append(pos, SWT.ITALIC, null, rgb_error);
}
else {
IExpressions.Value v = value.getData();
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeLaunch.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeLaunch.java
index a497a26fb..f5060c61c 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeLaunch.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeLaunch.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.model;
+package org.eclipse.tcf.internal.debug.ui.model;
import java.util.ArrayList;
import java.util.HashMap;
@@ -19,8 +19,8 @@ import org.eclipse.debug.internal.ui.viewers.model.provisional.IChildrenCountUpd
import org.eclipse.debug.internal.ui.viewers.model.provisional.IChildrenUpdate;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IHasChildrenUpdate;
import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.tm.tcf.services.IMemory;
-import org.eclipse.tm.tcf.services.IRunControl;
+import org.eclipse.tcf.services.IMemory;
+import org.eclipse.tcf.services.IRunControl;
public class TCFNodeLaunch extends TCFNode implements ISymbolOwner {
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeModule.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeModule.java
index 9db2e4f3a..dd7d32d24 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeModule.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeModule.java
@@ -8,25 +8,36 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.model;
+package org.eclipse.tcf.internal.debug.ui.model;
import java.math.BigInteger;
+import java.util.Map;
import org.eclipse.debug.internal.ui.viewers.model.provisional.ILabelUpdate;
import org.eclipse.swt.SWT;
-import org.eclipse.tm.internal.tcf.debug.ui.ImageCache;
-import org.eclipse.tm.tcf.protocol.JSON;
-import org.eclipse.tm.tcf.services.IMemoryMap;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.tcf.core.ErrorReport;
+import org.eclipse.tcf.internal.debug.model.TCFSymFileRef;
+import org.eclipse.tcf.internal.debug.ui.ImageCache;
+import org.eclipse.tcf.protocol.JSON;
+import org.eclipse.tcf.services.IMemoryMap;
+import org.eclipse.tcf.util.TCFDataCache;
/**
* A node representing a memory region (module).
*/
public class TCFNodeModule extends TCFNode implements IDetailsProvider {
- private final IMemoryMap.MemoryRegion region;
+ private IMemoryMap.MemoryRegion region;
- protected TCFNodeModule(TCFNode parent, String id, IMemoryMap.MemoryRegion region) {
+ private static final RGB
+ rgb_error = new RGB(192, 0, 0);
+
+ protected TCFNodeModule(TCFNode parent, String id) {
super(parent, id);
+ }
+
+ void setRegion(IMemoryMap.MemoryRegion region) {
this.region = region;
}
@@ -65,13 +76,37 @@ public class TCFNodeModule extends TCFNode implements IDetailsProvider {
}
public boolean getDetailText(StyledStringBuffer bf, Runnable done) {
- bf.append("File: ", SWT.BOLD).append(region.getFileName()).append('\n');
+ String file_name = region.getFileName();
+ if (file_name != null) {
+ bf.append("File name: ", SWT.BOLD).append(file_name).append('\n');
+ TCFNodeExecContext exe = (TCFNodeExecContext)parent;
+ TCFDataCache<TCFSymFileRef> sym_cache = exe.getSymFileInfo(JSON.toBigInteger(region.getAddress()));
+ if (sym_cache != null) {
+ if (!sym_cache.validate(done)) return false;
+ TCFSymFileRef sym_data = sym_cache.getData();
+ if (sym_data != null) {
+ if (sym_data.props != null) {
+ String sym_file_name = (String)sym_data.props.get("FileName");
+ if (sym_file_name != null) bf.append("Symbol file name: ", SWT.BOLD).append(sym_file_name).append('\n');
+ @SuppressWarnings("unchecked")
+ Map<String,Object> map = (Map<String,Object>)sym_data.props.get("FileError");
+ if (map != null) {
+ String msg = TCFModel.getErrorMessage(new ErrorReport("", map), false);
+ bf.append("Symbol file error: ", SWT.BOLD).append(msg, SWT.ITALIC, null, rgb_error).append('\n');
+ }
+ }
+ if (sym_data.error != null) bf.append("Symbol file error: ", SWT.BOLD).append(
+ TCFModel.getErrorMessage(sym_data.error, false),
+ SWT.ITALIC, null, rgb_error).append('\n');
+ }
+ }
+ String section = region.getSectionName();
+ if (section != null) bf.append("File section: ", SWT.BOLD).append(section).append('\n');
+ else bf.append("File offset: ", SWT.BOLD).append(toHexString(region.getOffset())).append('\n');
+ }
bf.append("Address: ", SWT.BOLD).append(toHexString(region.getAddress())).append('\n');
bf.append("Size: ", SWT.BOLD).append(toHexString(region.getSize())).append('\n');
bf.append("Flags: ", SWT.BOLD).append(getFlagsLabel(region.getFlags())).append('\n');
- bf.append("Offset: ", SWT.BOLD).append(toHexString(region.getOffset())).append('\n');
- String sectionName = region.getSectionName();
- bf.append("Section: ", SWT.BOLD).append(sectionName != null ? sectionName : "<unknown>").append('\n');
return true;
}
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeRegister.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeRegister.java
index b49f9ecb2..2f635e6e4 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeRegister.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeRegister.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.model;
+package org.eclipse.tcf.internal.debug.ui.model;
import java.math.BigInteger;
import java.util.ArrayList;
@@ -28,12 +28,12 @@ import org.eclipse.jface.viewers.TextCellEditor;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.RGB;
import org.eclipse.swt.widgets.Composite;
-import org.eclipse.tm.internal.tcf.debug.model.TCFContextState;
-import org.eclipse.tm.internal.tcf.debug.ui.ImageCache;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.services.IRegisters;
-import org.eclipse.tm.tcf.util.TCFDataCache;
-import org.eclipse.tm.tcf.util.TCFTask;
+import org.eclipse.tcf.internal.debug.model.TCFContextState;
+import org.eclipse.tcf.internal.debug.ui.ImageCache;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.services.IRegisters;
+import org.eclipse.tcf.util.TCFDataCache;
+import org.eclipse.tcf.util.TCFTask;
public class TCFNodeRegister extends TCFNode implements IElementEditor, IWatchInExpressions, IDetailsProvider {
@@ -416,10 +416,12 @@ public class TCFNodeRegister extends TCFNode implements IElementEditor, IWatchIn
if (!s.startsWith("0")) s = "0" + s;
break;
case 16:
- int l = data.length * 2 - s.length();
- if (l < 0) l = 0;
- if (l > 16) l = 16;
- s = "0000000000000000".substring(0, l) + s;
+ if (s.length() < data.length * 2) {
+ StringBuffer bf = new StringBuffer();
+ while (bf.length() + s.length() < data.length * 2) bf.append('0');
+ bf.append(s);
+ s = bf.toString();
+ }
break;
}
return s;
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeStackFrame.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeStackFrame.java
index 250e28031..5a8d7fb51 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeStackFrame.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeStackFrame.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.model;
+package org.eclipse.tcf.internal.debug.ui.model;
import java.math.BigInteger;
@@ -21,17 +21,17 @@ import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationCont
import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerInputUpdate;
import org.eclipse.debug.ui.IDebugUIConstants;
import org.eclipse.swt.graphics.RGB;
-import org.eclipse.tm.internal.tcf.debug.model.TCFContextState;
-import org.eclipse.tm.internal.tcf.debug.model.TCFFunctionRef;
-import org.eclipse.tm.internal.tcf.debug.model.TCFSourceRef;
-import org.eclipse.tm.internal.tcf.debug.ui.ImageCache;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.protocol.JSON;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.tcf.services.IExpressions;
-import org.eclipse.tm.tcf.services.IStackTrace;
-import org.eclipse.tm.tcf.services.ISymbols;
-import org.eclipse.tm.tcf.util.TCFDataCache;
+import org.eclipse.tcf.internal.debug.model.TCFContextState;
+import org.eclipse.tcf.internal.debug.model.TCFFunctionRef;
+import org.eclipse.tcf.internal.debug.model.TCFSourceRef;
+import org.eclipse.tcf.internal.debug.ui.ImageCache;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.JSON;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.services.IExpressions;
+import org.eclipse.tcf.services.IStackTrace;
+import org.eclipse.tcf.services.ISymbols;
+import org.eclipse.tcf.util.TCFDataCache;
public class TCFNodeStackFrame extends TCFNode {
@@ -47,8 +47,6 @@ public class TCFNodeStackFrame extends TCFNode {
private final TCFData<TCFFunctionRef> func_info;
private final TCFData<BigInteger> address;
- private String hover_expression;
-
TCFNodeStackFrame(final TCFNodeExecContext parent, final String id, final boolean emulated) {
super(parent, id);
this.emulated = emulated;
@@ -190,17 +188,10 @@ public class TCFNodeStackFrame extends TCFNode {
}
TCFChildren getHoverExpressionCache(String expression) {
- if (expression != hover_expression && (expression == null || !expression.equals(hover_expression))) {
- hover_expression = expression;
- children_hover_exps.cancel();
- }
+ children_hover_exps.setExpression(expression);
return children_hover_exps;
}
- String getHoverExpression() {
- return hover_expression;
- }
-
public TCFDataCache<TCFSourceRef> getLineInfo() {
return line_info;
}
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeSymbol.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeSymbol.java
index eaed4129e..855ae0fc2 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeSymbol.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeSymbol.java
@@ -8,12 +8,12 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.model;
+package org.eclipse.tcf.internal.debug.ui.model;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.tcf.services.ISymbols;
-import org.eclipse.tm.tcf.util.TCFDataCache;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.services.ISymbols;
+import org.eclipse.tcf.util.TCFDataCache;
public class TCFNodeSymbol extends TCFNode {
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNumberFormat.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNumberFormat.java
index d0ebef67c..fd9c63c3c 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNumberFormat.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNumberFormat.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.model;
+package org.eclipse.tcf.internal.debug.ui.model;
import java.math.BigDecimal;
import java.math.BigInteger;
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFRunnable.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFRunnable.java
index ad575234c..b2ecb0ae2 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFRunnable.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFRunnable.java
@@ -8,10 +8,10 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.model;
+package org.eclipse.tcf.internal.debug.ui.model;
import org.eclipse.debug.core.IRequest;
-import org.eclipse.tm.tcf.protocol.Protocol;
+import org.eclipse.tcf.protocol.Protocol;
public abstract class TCFRunnable implements Runnable {
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFSnapshot.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFSnapshot.java
index 6963716ec..c5205f777 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFSnapshot.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFSnapshot.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.model;
+package org.eclipse.tcf.internal.debug.ui.model;
import java.util.ArrayList;
import java.util.Arrays;
@@ -25,7 +25,7 @@ import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.viewers.TreePath;
import org.eclipse.swt.graphics.FontData;
import org.eclipse.swt.graphics.RGB;
-import org.eclipse.tm.tcf.protocol.Protocol;
+import org.eclipse.tcf.protocol.Protocol;
/**
* TCFSnapshot is used to create snapshots of debug views presentation data.
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/preferences/DecoratingIntegerFieldEditor.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/preferences/DecoratingIntegerFieldEditor.java
index 52348b447..042bd10ee 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/preferences/DecoratingIntegerFieldEditor.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/preferences/DecoratingIntegerFieldEditor.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.preferences;
+package org.eclipse.tcf.internal.debug.ui.preferences;
import org.eclipse.jface.fieldassist.ControlDecoration;
import org.eclipse.jface.fieldassist.FieldDecoration;
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/preferences/IntegerWithBooleanFieldEditor.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/preferences/IntegerWithBooleanFieldEditor.java
index a0f39bb16..ca3848a76 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/preferences/IntegerWithBooleanFieldEditor.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/preferences/IntegerWithBooleanFieldEditor.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.preferences;
+package org.eclipse.tcf.internal.debug.ui.preferences;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/preferences/TCFDebugPreferencePage.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/preferences/TCFDebugPreferencePage.java
index 419732044..e5fe2e44b 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/preferences/TCFDebugPreferencePage.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/preferences/TCFDebugPreferencePage.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.preferences;
+package org.eclipse.tcf.internal.debug.ui.preferences;
import org.eclipse.jface.preference.BooleanFieldEditor;
import org.eclipse.jface.preference.FieldEditorPreferencePage;
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/preferences/TCFPreferences.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/preferences/TCFPreferences.java
index c651880b8..2c1b4911f 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/preferences/TCFPreferences.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/preferences/TCFPreferences.java
@@ -8,10 +8,10 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.preferences;
+package org.eclipse.tcf.internal.debug.ui.preferences;
import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.tm.internal.tcf.debug.ui.Activator;
+import org.eclipse.tcf.internal.debug.ui.Activator;
public class TCFPreferences {
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/preferences/TCFPreferencesInitializer.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/preferences/TCFPreferencesInitializer.java
index bdc227305..140348e61 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/preferences/TCFPreferencesInitializer.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/preferences/TCFPreferencesInitializer.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.preferences;
+package org.eclipse.tcf.internal.debug.ui.preferences;
import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
import org.eclipse.jface.preference.IPreferenceStore;
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/properties/TCFPropertyPage.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/properties/TCFPropertyPage.java
index 60cbd52da..9daac2295 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/properties/TCFPropertyPage.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/properties/TCFPropertyPage.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.properties;
+package org.eclipse.tcf.internal.debug.ui.properties;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.swt.SWT;
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/trace/TraceView.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/trace/TraceView.java
index c1c92aaff..e1dea389b 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/trace/TraceView.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/trace/TraceView.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.trace;
+package org.eclipse.tcf.internal.debug.ui.trace;
import java.io.UnsupportedEncodingException;
import java.util.Collection;
@@ -29,11 +29,11 @@ import org.eclipse.swt.widgets.MenuItem;
import org.eclipse.swt.widgets.TabFolder;
import org.eclipse.swt.widgets.TabItem;
import org.eclipse.swt.widgets.Text;
-import org.eclipse.tm.tcf.core.AbstractChannel;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IPeer;
-import org.eclipse.tm.tcf.protocol.JSON;
-import org.eclipse.tm.tcf.protocol.Protocol;
+import org.eclipse.tcf.core.AbstractChannel;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.protocol.JSON;
+import org.eclipse.tcf.protocol.Protocol;
import org.eclipse.ui.part.ViewPart;
diff --git a/plugins/org.eclipse.tm.tcf.debug/.classpath b/plugins/org.eclipse.tcf.debug/.classpath
index 01a008e0d..01a008e0d 100644
--- a/plugins/org.eclipse.tm.tcf.debug/.classpath
+++ b/plugins/org.eclipse.tcf.debug/.classpath
diff --git a/plugins/org.eclipse.tcf.debug/.options b/plugins/org.eclipse.tcf.debug/.options
new file mode 100644
index 000000000..8def388b4
--- /dev/null
+++ b/plugins/org.eclipse.tcf.debug/.options
@@ -0,0 +1,2 @@
+org.eclipse.tcf.debug/debug = false
+org.eclipse.tcf.debug/debug/tests/runcontrol = false
diff --git a/plugins/org.eclipse.tm.tcf.debug/.project b/plugins/org.eclipse.tcf.debug/.project
index 5917d14e2..16bf40f51 100644
--- a/plugins/org.eclipse.tm.tcf.debug/.project
+++ b/plugins/org.eclipse.tcf.debug/.project
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.eclipse.tm.tcf.debug</name>
+ <name>org.eclipse.tcf.debug</name>
<comment></comment>
<projects>
</projects>
diff --git a/plugins/org.eclipse.tm.tcf.debug/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.tcf.debug/.settings/org.eclipse.jdt.core.prefs
index 8d9e63139..8d9e63139 100644
--- a/plugins/org.eclipse.tm.tcf.debug/.settings/org.eclipse.jdt.core.prefs
+++ b/plugins/org.eclipse.tcf.debug/.settings/org.eclipse.jdt.core.prefs
diff --git a/plugins/org.eclipse.tm.tcf.debug/.settings/org.eclipse.jdt.ui.prefs b/plugins/org.eclipse.tcf.debug/.settings/org.eclipse.jdt.ui.prefs
index 903e1082e..903e1082e 100644
--- a/plugins/org.eclipse.tm.tcf.debug/.settings/org.eclipse.jdt.ui.prefs
+++ b/plugins/org.eclipse.tcf.debug/.settings/org.eclipse.jdt.ui.prefs
diff --git a/plugins/org.eclipse.tcf.debug/META-INF/MANIFEST.MF b/plugins/org.eclipse.tcf.debug/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..e60a675d3
--- /dev/null
+++ b/plugins/org.eclipse.tcf.debug/META-INF/MANIFEST.MF
@@ -0,0 +1,24 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.tcf.debug;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipse.tcf.internal.debug.Activator
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.debug.core,
+ org.eclipse.core.resources,
+ org.eclipse.core.filesystem;bundle-version="1.3.0"
+Import-Package: org.eclipse.tcf.core;version="1.0.0",
+ org.eclipse.tcf.protocol;version="1.0.0",
+ org.eclipse.tcf.services;version="1.0.0",
+ org.eclipse.tcf.util;version="1.0.0"
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-ActivationPolicy: lazy
+Eclipse-LazyStart: true
+Export-Package: org.eclipse.tcf.internal.debug.launch;x-friends:="org.eclipse.tcf.debug.ui,org.eclipse.tcf.cdt.ui,org.eclipse.tcf.target.ui",
+ org.eclipse.tcf.internal.debug.actions;x-friends:="org.eclipse.tcf.debug.ui,org.eclipse.tcf.cdt.ui",
+ org.eclipse.tcf.internal.debug.cmdline;x-friends:="org.eclipse.tcf.debug.ui",
+ org.eclipse.tcf.internal.debug.tests;x-friends:="org.eclipse.tcf.debug.ui",
+ org.eclipse.tcf.internal.debug.model;x-friends:="org.eclipse.tcf.debug.ui,org.eclipse.tcf.cdt.ui"
diff --git a/plugins/org.eclipse.tm.tcf.debug/TCF Test Suite.launch b/plugins/org.eclipse.tcf.debug/TCF Test Suite.launch
index 67445b8df..0d7b3166e 100644
--- a/plugins/org.eclipse.tm.tcf.debug/TCF Test Suite.launch
+++ b/plugins/org.eclipse.tcf.debug/TCF Test Suite.launch
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/Main.java"/>
+<listEntry value="/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/tests/Main.java"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="1"/>
</listAttribute>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.tm.internal.tcf.debug.tests.Main"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.tcf.internal.debug.tests.Main"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="TransportName=TCP:Host=127.0.0.1:Port=1534"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.tm.tcf.debug"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.tcf.debug"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-ea"/>
-</launchConfiguration>
+</launchConfiguration> \ No newline at end of file
diff --git a/plugins/org.eclipse.tm.tcf.debug/about.html b/plugins/org.eclipse.tcf.debug/about.html
index 6c5b3615b..6c5b3615b 100644
--- a/plugins/org.eclipse.tm.tcf.debug/about.html
+++ b/plugins/org.eclipse.tcf.debug/about.html
diff --git a/plugins/org.eclipse.tm.tcf.debug/build.properties b/plugins/org.eclipse.tcf.debug/build.properties
index f0c90740b..f0c90740b 100644
--- a/plugins/org.eclipse.tm.tcf.debug/build.properties
+++ b/plugins/org.eclipse.tcf.debug/build.properties
diff --git a/plugins/org.eclipse.tm.tcf.debug/plugin.properties b/plugins/org.eclipse.tcf.debug/plugin.properties
index f8bb35015..e349153c5 100644
--- a/plugins/org.eclipse.tm.tcf.debug/plugin.properties
+++ b/plugins/org.eclipse.tcf.debug/plugin.properties
@@ -8,6 +8,6 @@
# Contributors:
# Wind River Systems - initial implementation
###############################################################################
-pluginName = TCF/Eclipse Debugger Integration Core (Incubation)
+pluginName = TCF/Eclipse Debugger Integration Core
providerName = Eclipse CDT
diff --git a/plugins/org.eclipse.tm.tcf.debug/plugin.xml b/plugins/org.eclipse.tcf.debug/plugin.xml
index 4cd41b53a..33df924fa 100644
--- a/plugins/org.eclipse.tm.tcf.debug/plugin.xml
+++ b/plugins/org.eclipse.tcf.debug/plugin.xml
@@ -15,15 +15,15 @@
<extension
point="org.eclipse.debug.core.breakpoints">
<breakpoint
- markerType="org.eclipse.tm.tcf.debug.breakpoint.marker"
- class="org.eclipse.tm.internal.tcf.debug.model.TCFBreakpoint"
- id="org.eclipse.tm.tcf.debug.breakpoint"
+ markerType="org.eclipse.tcf.debug.breakpoint.marker"
+ class="org.eclipse.tcf.internal.debug.model.TCFBreakpoint"
+ id="org.eclipse.tcf.debug.breakpoint"
name="TCF Breakpoint">
</breakpoint>
</extension>
<extension
- id="org.eclipse.tm.tcf.debug.breakpoint.marker"
+ id="org.eclipse.tcf.debug.breakpoint.marker"
point="org.eclipse.core.resources.markers">
<super type="org.eclipse.debug.core.breakpointMarker"/>
<persistent value="true"/>
@@ -32,12 +32,12 @@
<extension
point="org.eclipse.debug.core.launchConfigurationTypes">
<launchConfigurationType
- sourceLocatorId="org.eclipse.tm.tcf.debug.SourceLocator"
+ sourceLocatorId="org.eclipse.tcf.debug.SourceLocator"
name="Target Communication Framework"
- sourcePathComputerId="org.eclipse.tm.tcf.debug.SourcePathComputer"
- delegate="org.eclipse.tm.internal.tcf.debug.launch.TCFLaunchDelegate"
+ sourcePathComputerId="org.eclipse.tcf.debug.SourcePathComputer"
+ delegate="org.eclipse.tcf.internal.debug.launch.TCFLaunchDelegate"
modes="run, debug"
- id="org.eclipse.tm.tcf.debug.LaunchConfigurationType">
+ id="org.eclipse.tcf.debug.LaunchConfigurationType">
</launchConfigurationType>
</extension>
@@ -45,16 +45,16 @@
point="org.eclipse.debug.core.sourceLocators">
<sourceLocator
name="TCF Source Lookup Director"
- class="org.eclipse.tm.internal.tcf.debug.launch.TCFSourceLookupDirector"
- id="org.eclipse.tm.tcf.debug.SourceLocator">
+ class="org.eclipse.tcf.internal.debug.launch.TCFSourceLookupDirector"
+ id="org.eclipse.tcf.debug.SourceLocator">
</sourceLocator>
</extension>
<extension
point="org.eclipse.debug.core.sourcePathComputers">
<sourcePathComputer
- class="org.eclipse.tm.internal.tcf.debug.launch.TCFSourcePathComputerDelegate"
- id="org.eclipse.tm.tcf.debug.SourcePathComputer">
+ class="org.eclipse.tcf.internal.debug.launch.TCFSourcePathComputerDelegate"
+ id="org.eclipse.tcf.debug.SourcePathComputer">
</sourcePathComputer>
</extension>
</plugin>
diff --git a/plugins/org.eclipse.tcf.debug/pom.xml b/plugins/org.eclipse.tcf.debug/pom.xml
new file mode 100644
index 000000000..b46c94fdb
--- /dev/null
+++ b/plugins/org.eclipse.tcf.debug/pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.tcf</groupId>
+ <artifactId>tcf-parent</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../../pom.xml</relativePath>
+ </parent>
+
+ <version>1.0.0-SNAPSHOT</version>
+ <artifactId>org.eclipse.tcf.debug</artifactId>
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/Activator.java b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/Activator.java
index 7aa6d5f0c..01778f9a9 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/Activator.java
+++ b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/Activator.java
@@ -8,15 +8,17 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug;
+package org.eclipse.tcf.internal.debug;
+
+import java.util.UUID;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Plugin;
import org.eclipse.core.runtime.Status;
-import org.eclipse.tm.internal.tcf.debug.launch.TCFLocalAgent;
-import org.eclipse.tm.internal.tcf.debug.launch.TCFUserDefPeer;
-import org.eclipse.tm.internal.tcf.debug.model.TCFBreakpointsModel;
-import org.eclipse.tm.tcf.protocol.Protocol;
+import org.eclipse.tcf.internal.debug.launch.TCFLocalAgent;
+import org.eclipse.tcf.internal.debug.launch.TCFUserDefPeer;
+import org.eclipse.tcf.internal.debug.model.TCFBreakpointsModel;
+import org.eclipse.tcf.protocol.Protocol;
import org.osgi.framework.BundleContext;
@@ -26,11 +28,12 @@ import org.osgi.framework.BundleContext;
public class Activator extends Plugin {
// The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.tm.tcf.debug";
+ public static final String PLUGIN_ID = "org.eclipse.tcf.debug";
// The shared instance
private static Activator plugin;
private static TCFBreakpointsModel bp_model;
+ private static final String client_id = UUID.randomUUID().toString();
public Activator() {
plugin = this;
@@ -70,6 +73,10 @@ public class Activator extends Plugin {
return bp_model;
}
+ public static String getClientID() {
+ return client_id;
+ }
+
/**
* Send error message into Eclipse log.
* @param msg - error message test
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFAction.java b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/actions/TCFAction.java
index cba7c80c6..6049b1cc5 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFAction.java
+++ b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/actions/TCFAction.java
@@ -8,10 +8,10 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.actions;
+package org.eclipse.tcf.internal.debug.actions;
-import org.eclipse.tm.internal.tcf.debug.model.TCFLaunch;
-import org.eclipse.tm.tcf.protocol.Protocol;
+import org.eclipse.tcf.internal.debug.model.TCFLaunch;
+import org.eclipse.tcf.protocol.Protocol;
/**
* TCFAction class represents user request to perform some action(s) on
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFActionStepInto.java b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/actions/TCFActionStepInto.java
index 0966ce985..92861b733 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFActionStepInto.java
+++ b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/actions/TCFActionStepInto.java
@@ -8,22 +8,22 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.actions;
+package org.eclipse.tcf.internal.debug.actions;
import java.math.BigInteger;
import java.util.HashMap;
import java.util.Map;
-import org.eclipse.tm.internal.tcf.debug.model.TCFContextState;
-import org.eclipse.tm.internal.tcf.debug.model.TCFLaunch;
-import org.eclipse.tm.internal.tcf.debug.model.TCFSourceRef;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.protocol.JSON;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.tcf.services.ILineNumbers;
-import org.eclipse.tm.tcf.services.IRunControl;
-import org.eclipse.tm.tcf.services.IRunControl.RunControlContext;
-import org.eclipse.tm.tcf.util.TCFDataCache;
+import org.eclipse.tcf.internal.debug.model.TCFContextState;
+import org.eclipse.tcf.internal.debug.model.TCFLaunch;
+import org.eclipse.tcf.internal.debug.model.TCFSourceRef;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.JSON;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.services.ILineNumbers;
+import org.eclipse.tcf.services.IRunControl;
+import org.eclipse.tcf.services.IRunControl.RunControlContext;
+import org.eclipse.tcf.util.TCFDataCache;
public abstract class TCFActionStepInto extends TCFAction implements IRunControl.RunControlListener {
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFActionStepOut.java b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/actions/TCFActionStepOut.java
index 3656395cc..090c7aaf8 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFActionStepOut.java
+++ b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/actions/TCFActionStepOut.java
@@ -8,23 +8,23 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.actions;
+package org.eclipse.tcf.internal.debug.actions;
import java.math.BigInteger;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
-import org.eclipse.tm.internal.tcf.debug.model.TCFContextState;
-import org.eclipse.tm.internal.tcf.debug.model.TCFLaunch;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.protocol.JSON;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.tcf.services.IBreakpoints;
-import org.eclipse.tm.tcf.services.IRunControl;
-import org.eclipse.tm.tcf.services.IStackTrace;
-import org.eclipse.tm.tcf.services.IRunControl.RunControlContext;
-import org.eclipse.tm.tcf.util.TCFDataCache;
+import org.eclipse.tcf.internal.debug.model.TCFContextState;
+import org.eclipse.tcf.internal.debug.model.TCFLaunch;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.JSON;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.services.IBreakpoints;
+import org.eclipse.tcf.services.IRunControl;
+import org.eclipse.tcf.services.IStackTrace;
+import org.eclipse.tcf.services.IRunControl.RunControlContext;
+import org.eclipse.tcf.util.TCFDataCache;
public abstract class TCFActionStepOut extends TCFAction implements IRunControl.RunControlListener {
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFActionStepOver.java b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/actions/TCFActionStepOver.java
index c52ae5834..bba5b42b0 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFActionStepOver.java
+++ b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/actions/TCFActionStepOver.java
@@ -8,25 +8,25 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.actions;
+package org.eclipse.tcf.internal.debug.actions;
import java.math.BigInteger;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
-import org.eclipse.tm.internal.tcf.debug.model.TCFContextState;
-import org.eclipse.tm.internal.tcf.debug.model.TCFLaunch;
-import org.eclipse.tm.internal.tcf.debug.model.TCFSourceRef;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.protocol.JSON;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.tcf.services.IBreakpoints;
-import org.eclipse.tm.tcf.services.ILineNumbers;
-import org.eclipse.tm.tcf.services.IRunControl;
-import org.eclipse.tm.tcf.services.IStackTrace;
-import org.eclipse.tm.tcf.services.IRunControl.RunControlContext;
-import org.eclipse.tm.tcf.util.TCFDataCache;
+import org.eclipse.tcf.internal.debug.model.TCFContextState;
+import org.eclipse.tcf.internal.debug.model.TCFLaunch;
+import org.eclipse.tcf.internal.debug.model.TCFSourceRef;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.JSON;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.services.IBreakpoints;
+import org.eclipse.tcf.services.ILineNumbers;
+import org.eclipse.tcf.services.IRunControl;
+import org.eclipse.tcf.services.IStackTrace;
+import org.eclipse.tcf.services.IRunControl.RunControlContext;
+import org.eclipse.tcf.util.TCFDataCache;
public abstract class TCFActionStepOver extends TCFAction implements IRunControl.RunControlListener {
diff --git a/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/cmdline/TCFCommandLine.java b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/cmdline/TCFCommandLine.java
new file mode 100644
index 000000000..13e51ca70
--- /dev/null
+++ b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/cmdline/TCFCommandLine.java
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.internal.debug.cmdline;
+
+import org.eclipse.tcf.util.TCFTask;
+
+public class TCFCommandLine {
+
+ private static final class CommandInfo {
+ final String name;
+ final Class<?> cls;
+
+ CommandInfo(String name, Class<?> cls) {
+ this.name = name;
+ this.cls = cls;
+ }
+ }
+
+ private static final CommandInfo[] command_list = {
+ new CommandInfo("step", CommandStep.class),
+ };
+
+ private class CommandStep extends TCFTask<String> {
+
+ public void run() {
+ done("OK");
+ }
+ }
+
+ public String command(String cmd) {
+ try {
+ int i = 0;
+ int l = cmd.length();
+ StringBuffer bf = new StringBuffer();
+ while (i < l) {
+ char ch = cmd.charAt(i);
+ if (ch == ' ' || ch == '#') break;
+ bf.append(ch);
+ i++;
+ }
+ if (bf.length() > 0) {
+ CommandInfo cmd_info = null;
+ String name = bf.toString();
+ for (CommandInfo c : command_list) {
+ if (c.name.startsWith(name)) {
+ if (cmd_info != null) return "Ambiguous command";
+ cmd_info = c;
+ }
+ }
+ if (cmd_info == null) return "Unknown command";
+ @SuppressWarnings("unchecked")
+ TCFTask<String> task = (TCFTask<String>)cmd_info.cls.getConstructors()[0].newInstance(this);
+ return task.get();
+ }
+ }
+ catch (Throwable x) {
+ return x.getMessage();
+ }
+ return null;
+ }
+}
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFLaunchDelegate.java b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/launch/TCFLaunchDelegate.java
index ecf35cb11..948126a85 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFLaunchDelegate.java
+++ b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/launch/TCFLaunchDelegate.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.launch;
+package org.eclipse.tcf.internal.debug.launch;
import java.io.File;
import java.util.ArrayList;
@@ -28,15 +28,15 @@ import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.ILaunch;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.model.LaunchConfigurationDelegate;
-import org.eclipse.tm.internal.tcf.debug.Activator;
-import org.eclipse.tm.internal.tcf.debug.model.ITCFConstants;
-import org.eclipse.tm.internal.tcf.debug.model.TCFLaunch;
-import org.eclipse.tm.internal.tcf.debug.model.TCFMemoryRegion;
-import org.eclipse.tm.tcf.protocol.JSON;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.tcf.services.IMemoryMap;
-import org.eclipse.tm.tcf.services.IPathMap;
-import org.eclipse.tm.tcf.util.TCFTask;
+import org.eclipse.tcf.internal.debug.Activator;
+import org.eclipse.tcf.internal.debug.model.ITCFConstants;
+import org.eclipse.tcf.internal.debug.model.TCFLaunch;
+import org.eclipse.tcf.internal.debug.model.TCFMemoryRegion;
+import org.eclipse.tcf.protocol.JSON;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.services.IMemoryMap;
+import org.eclipse.tcf.services.IPathMap;
+import org.eclipse.tcf.util.TCFTask;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFLocalAgent.java b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/launch/TCFLocalAgent.java
index b16fdb255..d0b97c8e4 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFLocalAgent.java
+++ b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/launch/TCFLocalAgent.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.launch;
+package org.eclipse.tcf.internal.debug.launch;
import java.io.File;
import java.io.FileOutputStream;
@@ -24,11 +24,11 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
-import org.eclipse.tm.internal.tcf.debug.Activator;
-import org.eclipse.tm.tcf.protocol.IPeer;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.tcf.services.ILocator;
-import org.eclipse.tm.tcf.util.TCFTask;
+import org.eclipse.tcf.internal.debug.Activator;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.services.ILocator;
+import org.eclipse.tcf.util.TCFTask;
import org.osgi.framework.Bundle;
/**
diff --git a/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/launch/TCFSourceLookupDirector.java b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/launch/TCFSourceLookupDirector.java
new file mode 100644
index 000000000..370b2df78
--- /dev/null
+++ b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/launch/TCFSourceLookupDirector.java
@@ -0,0 +1,107 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2011 Wind River Systems, Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.internal.debug.launch;
+
+import java.io.File;
+import java.net.URI;
+import java.util.Map;
+
+import org.eclipse.core.filesystem.URIUtil;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IStorage;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.debug.core.model.ISourceLocator;
+import org.eclipse.debug.core.model.IStackFrame;
+import org.eclipse.debug.core.sourcelookup.AbstractSourceLookupDirector;
+import org.eclipse.debug.core.sourcelookup.ISourceLookupDirector;
+import org.eclipse.debug.core.sourcelookup.ISourceLookupParticipant;
+import org.eclipse.debug.core.sourcelookup.containers.LocalFileStorage;
+import org.eclipse.tcf.internal.debug.model.TCFLaunch;
+import org.eclipse.tcf.services.ILineNumbers;
+import org.eclipse.tcf.services.IPathMap;
+import org.eclipse.tcf.util.TCFDataCache;
+import org.eclipse.tcf.util.TCFTask;
+
+/**
+ * TCF source lookup director.
+ * For TCF source lookup there is one source lookup participant.
+ */
+public class TCFSourceLookupDirector extends AbstractSourceLookupDirector {
+
+ public static Object lookup(final TCFLaunch launch, Object element) {
+ if (element instanceof ILineNumbers.CodeArea) {
+ element = TCFSourceLookupParticipant.toFileName((ILineNumbers.CodeArea)element);
+ }
+ Object source_element = null;
+ ISourceLocator locator = launch.getSourceLocator();
+ if (locator instanceof ISourceLookupDirector) {
+ source_element = ((ISourceLookupDirector)locator).getSourceElement(element);
+ }
+ else if (element instanceof IStackFrame) {
+ source_element = locator.getSourceElement((IStackFrame)element);
+ }
+ if (source_element == null && element instanceof String) {
+ /* Try to lookup the element using target side path mapping rules */
+ final String str = (String)element;
+ Map<String,IStorage> map = launch.getTargetPathMappingCache();
+ synchronized (map) {
+ if (map.containsKey(str)) return map.get(str);
+ }
+ IStorage storage = new TCFTask<IStorage>(launch.getChannel()) {
+ public void run() {
+ TCFDataCache<IPathMap.PathMapRule[]> cache = launch.getTargetPathMap();
+ if (cache != null) {
+ if (!cache.validate(this)) return;
+ IPathMap.PathMapRule[] data = cache.getData();
+ if (data != null) {
+ for (IPathMap.PathMapRule r : data) {
+ String fnm = TCFSourceLookupParticipant.toFileName(r, str);
+ if (fnm == null) continue;
+ File file = new File(fnm);
+ if (file.isAbsolute() && file.exists() && file.isFile()) {
+ done(new LocalFileStorage(file));
+ return;
+ }
+ }
+ }
+ }
+ done(null);
+ }
+ }.getE();
+ if (storage != null) {
+ /* Map to workspace resource */
+ IPath path = storage.getFullPath();
+ if (path != null) {
+ URI uri = URIUtil.toURI(path);
+ IFile[] arr = ResourcesPlugin.getWorkspace().getRoot().findFilesForLocationURI(uri);
+ if (arr != null && arr.length > 0) {
+ for (IFile resource : arr) {
+ if (resource.isAccessible()) {
+ storage = resource;
+ break;
+ }
+ }
+ }
+ }
+ }
+ synchronized (map) {
+ map.put(str, storage);
+ }
+ source_element = storage;
+ }
+ return source_element;
+ }
+
+ public void initializeParticipants() {
+ addParticipants(new ISourceLookupParticipant[] { new TCFSourceLookupParticipant() });
+ }
+}
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFSourceLookupParticipant.java b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/launch/TCFSourceLookupParticipant.java
index 350f72a48..a7d6776b4 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFSourceLookupParticipant.java
+++ b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/launch/TCFSourceLookupParticipant.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.launch;
+package org.eclipse.tcf.internal.debug.launch;
import java.io.File;
import java.net.InetAddress;
@@ -27,8 +27,9 @@ import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.sourcelookup.AbstractSourceLookupParticipant;
import org.eclipse.debug.core.sourcelookup.ISourceLookupDirector;
import org.eclipse.debug.core.sourcelookup.containers.LocalFileStorage;
-import org.eclipse.tm.internal.tcf.debug.launch.TCFLaunchDelegate.PathMapRule;
-import org.eclipse.tm.tcf.services.ILineNumbers;
+import org.eclipse.tcf.internal.debug.launch.TCFLaunchDelegate.PathMapRule;
+import org.eclipse.tcf.services.ILineNumbers;
+import org.eclipse.tcf.services.IPathMap;
/**
* The TCF source lookup participant knows how to translate a ILineNumbers.CodeArea
@@ -68,6 +69,26 @@ public class TCFSourceLookupParticipant extends AbstractSourceLookupParticipant
return area.file;
}
+ public static String toFileName(IPathMap.PathMapRule r, String fnm) {
+ try {
+ String src = r.getSource();
+ if (src == null) return null;
+ if (!fnm.startsWith(src)) return null;
+ String host = r.getHost();
+ if (host != null && host.length() > 0) {
+ if (!InetAddress.getLocalHost().equals(InetAddress.getByName(host))) return null;
+ }
+ String dst = r.getDestination();
+ if (dst == null || dst.length() == 0) return null;
+ int l = src.length();
+ if (dst.endsWith("/") && l < fnm.length() && fnm.charAt(l) == '/') l++;
+ return dst + fnm.substring(l);
+ }
+ catch (Exception x) {
+ return null;
+ }
+ }
+
private static boolean isAbsolutePath(String fnm) {
if (fnm.length() == 0) return false;
char ch = fnm.charAt(0);
@@ -87,17 +108,8 @@ public class TCFSourceLookupParticipant extends AbstractSourceLookupParticipant
if (path_map.length() == 0) return fnm;
ArrayList<PathMapRule> map = TCFLaunchDelegate.parsePathMapAttribute(path_map);
for (PathMapRule r : map) {
- String src = r.getSource();
- if (!fnm.startsWith(src)) continue;
- String host = r.getHost();
- if (host != null && host.length() > 0) {
- if (!InetAddress.getLocalHost().equals(InetAddress.getByName(host))) continue;
- }
- String dst = r.getDestination();
- if (dst == null || dst.length() == 0) continue;
- int l = src.length();
- if (dst.endsWith("/") && l < fnm.length() && fnm.charAt(l) == '/') l++;
- return dst + fnm.substring(l);
+ String res = toFileName(r, fnm);
+ if (res != null) return res;
}
if (fnm.startsWith("/cygdrive/")) {
fnm = fnm.substring(10, 11) + ":" + fnm.substring(11);
@@ -127,9 +139,9 @@ public class TCFSourceLookupParticipant extends AbstractSourceLookupParticipant
IFile[] arr = ResourcesPlugin.getWorkspace().getRoot().findFilesForLocationURI(uri);
if (arr != null && arr.length > 0) {
int cnt = list.size();
- for (IFile fileResource : arr) {
- if (fileResource.isAccessible()) {
- list.add(fileResource);
+ for (IFile resource : arr) {
+ if (resource.isAccessible()) {
+ list.add(resource);
}
}
if (list.size() > cnt) continue;
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFSourcePathComputerDelegate.java b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/launch/TCFSourcePathComputerDelegate.java
index 2b5b74776..e1d8368ea 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFSourcePathComputerDelegate.java
+++ b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/launch/TCFSourcePathComputerDelegate.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.launch;
+package org.eclipse.tcf.internal.debug.launch;
import java.net.URI;
import java.util.ArrayList;
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFUserDefPeer.java b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/launch/TCFUserDefPeer.java
index a045fdbf4..1eafb3dd4 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFUserDefPeer.java
+++ b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/launch/TCFUserDefPeer.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.launch;
+package org.eclipse.tcf.internal.debug.launch;
import java.io.BufferedReader;
import java.io.BufferedWriter;
@@ -21,10 +21,10 @@ import java.util.HashMap;
import java.util.Map;
import org.eclipse.core.runtime.IPath;
-import org.eclipse.tm.internal.tcf.debug.Activator;
-import org.eclipse.tm.tcf.core.AbstractPeer;
-import org.eclipse.tm.tcf.protocol.IPeer;
-import org.eclipse.tm.tcf.protocol.Protocol;
+import org.eclipse.tcf.internal.debug.Activator;
+import org.eclipse.tcf.core.AbstractPeer;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.protocol.Protocol;
/**
* The class represents manually configured (user defined) TCF peers (targets).
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/ITCFBreakpointListener.java b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/model/ITCFBreakpointListener.java
index 80ce441e1..ccabd7eb7 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/ITCFBreakpointListener.java
+++ b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/model/ITCFBreakpointListener.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.model;
+package org.eclipse.tcf.internal.debug.model;
public interface ITCFBreakpointListener {
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/ITCFConstants.java b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/model/ITCFConstants.java
index ab5d7179a..6fe4d2c83 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/ITCFConstants.java
+++ b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/model/ITCFConstants.java
@@ -8,13 +8,13 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.model;
+package org.eclipse.tcf.internal.debug.model;
public interface ITCFConstants {
/**
* Unique identifier for the TCF debug model
*/
- public static final String ID_TCF_DEBUG_MODEL = "org.eclipse.tm.tcf.debug";
+ public static final String ID_TCF_DEBUG_MODEL = "org.eclipse.tcf.debug";
}
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFBreakpoint.java b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/model/TCFBreakpoint.java
index 3a3528e6b..a612f74ef 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFBreakpoint.java
+++ b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/model/TCFBreakpoint.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.model;
+package org.eclipse.tcf.internal.debug.model;
import java.util.Map;
@@ -24,25 +24,14 @@ import org.eclipse.core.runtime.jobs.ISchedulingRule;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.model.Breakpoint;
-import org.eclipse.tm.internal.tcf.debug.Activator;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.tcf.services.IBreakpoints;
+import org.eclipse.tcf.internal.debug.Activator;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.services.IBreakpoints;
public class TCFBreakpoint extends Breakpoint {
- public static final String MARKER_TYPE = "org.eclipse.tm.tcf.debug.breakpoint.marker";
-
- private static final String[] attr_names = {
- TCFBreakpointsModel.ATTR_ADDRESS, "address",
- TCFBreakpointsModel.ATTR_FUNCTION, "location",
- TCFBreakpointsModel.ATTR_EXPRESSION, "expression",
- TCFBreakpointsModel.ATTR_CONDITION, "condition",
- TCFBreakpointsModel.ATTR_CONTEXTNAMES, "scope (names)",
- TCFBreakpointsModel.ATTR_CONTEXTIDS, "scope (IDs)",
- TCFBreakpointsModel.ATTR_EXE_PATHS, "scope (modules)",
- TCFBreakpointsModel.ATTR_STOP_GROUP, "stop group",
- };
+ public static final String MARKER_TYPE = "org.eclipse.tcf.debug.breakpoint.marker";
private static long last_id = 0;
@@ -103,27 +92,6 @@ public class TCFBreakpoint extends Breakpoint {
return ITCFConstants.ID_TCF_DEBUG_MODEL;
}
- public String getText() {
- IMarker marker = getMarker();
- if (marker == null) return null;
- StringBuffer bf = new StringBuffer();
- for (int i = 0; i < attr_names.length; i += 2) {
- String s = marker.getAttribute(attr_names[i], null);
- if (s == null || s.length() == 0) continue;
- bf.append('[');
- bf.append(attr_names[i + 1]);
- bf.append(": ");
- bf.append(s);
- bf.append(']');
- }
- if (bf.length() == 0) {
- String id = marker.getAttribute(
- ITCFConstants.ID_TCF_DEBUG_MODEL + '.' + IBreakpoints.PROP_ID, null);
- bf.append(id);
- }
- return bf.toString();
- }
-
public void notifyStatusChaged() throws CoreException {
IMarker marker = getMarker();
if (marker == null) return;
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFBreakpointsModel.java b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/model/TCFBreakpointsModel.java
index e796716cb..2c3e279ff 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFBreakpointsModel.java
+++ b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/model/TCFBreakpointsModel.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.model;
+package org.eclipse.tcf.internal.debug.model;
import java.io.IOException;
import java.util.ArrayList;
@@ -19,7 +19,6 @@ import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
-import java.util.UUID;
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IMarkerDelta;
@@ -34,11 +33,11 @@ import org.eclipse.debug.core.IBreakpointManagerListener;
import org.eclipse.debug.core.ILaunch;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.model.IBreakpoint;
-import org.eclipse.tm.internal.tcf.debug.Activator;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.tcf.services.IBreakpoints;
+import org.eclipse.tcf.internal.debug.Activator;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.services.IBreakpoints;
/**
* TCFBreakpointsModel class handles breakpoints for all active TCF launches.
@@ -56,6 +55,7 @@ public class TCFBreakpointsModel {
public static final String
ATTR_ID = ITCFConstants.ID_TCF_DEBUG_MODEL + '.' + IBreakpoints.PROP_ID,
ATTR_STATUS = ITCFConstants.ID_TCF_DEBUG_MODEL + '.' + "Status",
+ ATTR_ENABLED = IBreakpoint.ENABLED,
ATTR_INSTALL_COUNT = "org.eclipse.cdt.debug.core.installCount",
ATTR_ADDRESS = "org.eclipse.cdt.debug.core.address",
ATTR_FUNCTION = "org.eclipse.cdt.debug.core.function",
@@ -64,6 +64,7 @@ public class TCFBreakpointsModel {
ATTR_WRITE = "org.eclipse.cdt.debug.core.write",
ATTR_SIZE = "org.eclipse.cdt.debug.core.range",
ATTR_FILE = "org.eclipse.cdt.debug.core.sourceHandle",
+ ATTR_LINE = IMarker.LINE_NUMBER,
ATTR_CONDITION = "org.eclipse.cdt.debug.core.condition",
ATTR_IGNORE_COUNT = "org.eclipse.cdt.debug.core.ignoreCount",
ATTR_CONTEXTNAMES = ITCFConstants.ID_TCF_DEBUG_MODEL + '.' + IBreakpoints.PROP_CONTEXTNAMES,
@@ -74,7 +75,6 @@ public class TCFBreakpointsModel {
private final IBreakpointManager bp_manager = DebugPlugin.getDefault().getBreakpointManager();
private final HashMap<IChannel,Map<String,Object>> channels = new HashMap<IChannel,Map<String,Object>>();
private final HashMap<String,IBreakpoint> id2bp = new HashMap<String,IBreakpoint>();
- private final String client_id = UUID.randomUUID().toString();
private abstract class BreakpointUpdate implements Runnable {
@@ -185,7 +185,7 @@ public class TCFBreakpointsModel {
new BreakpointUpdate(breakpoint, false) {
@Override
void update() {
- if (s.size() == 1 && s.contains(IBreakpoint.ENABLED)) {
+ if (s.size() == 1 && s.contains(ATTR_ENABLED)) {
Boolean enabled = (Boolean)tcf_attrs.get(IBreakpoints.PROP_ENABLED);
if (enabled == null || !enabled.booleanValue()) {
service.disable(new String[]{ marker_id }, done);
@@ -229,7 +229,7 @@ public class TCFBreakpointsModel {
final Map<String,IBreakpoint> map = new HashMap<String,IBreakpoint>();
for (int i = 0; i < arr.length; i++) {
IMarker marker = arr[i].getMarker();
- Boolean b = marker.getAttribute(IBreakpoint.ENABLED, Boolean.FALSE);
+ Boolean b = marker.getAttribute(ATTR_ENABLED, Boolean.FALSE);
if (!b.booleanValue()) continue;
String id = getBreakpointID(arr[i]);
if (id == null) continue;
@@ -336,7 +336,7 @@ public class TCFBreakpointsModel {
Map<String,Object> client_data = (Map<String,Object>)properties.get(IBreakpoints.PROP_CLIENT_DATA);
if (client_data == null) return false;
String id = (String)client_data.get(TCFBreakpointsModel.CDATA_CLIENT_ID);
- return client_id.equals(id);
+ return Activator.getClientID().equals(id);
}
/**
@@ -450,7 +450,13 @@ public class TCFBreakpointsModel {
Map<String,Object> client_data = (Map<String,Object>)p.get(IBreakpoints.PROP_CLIENT_DATA);
if (client_data != null) {
Map<String,Object> m = (Map<String,Object>)client_data.get(CDATA_MARKER);
- if (m != null) return m;
+ if (m != null) {
+ m = new HashMap<String,Object>(m);
+ m.put(ATTR_ID, p.get(IBreakpoints.PROP_ID));
+ Boolean enabled = (Boolean)p.get(IBreakpoints.PROP_ENABLED);
+ m.put(ATTR_ENABLED, enabled == null ? Boolean.FALSE : enabled);
+ return m;
+ }
}
Map<String,Object> m = new HashMap<String,Object>();
for (Map.Entry<String,Object> e : p.entrySet()) {
@@ -485,8 +491,7 @@ public class TCFBreakpointsModel {
m.put(ITCFConstants.ID_TCF_DEBUG_MODEL + '.' + key, val);
}
Boolean enabled = (Boolean)p.get(IBreakpoints.PROP_ENABLED);
- if (enabled == null) m.put(IBreakpoint.ENABLED, Boolean.FALSE);
- else m.put(IBreakpoint.ENABLED, enabled);
+ m.put(ATTR_ENABLED, enabled == null ? Boolean.FALSE : enabled);
String location = (String)p.get(IBreakpoints.PROP_LOCATION);
if (location != null && location.length() > 0) {
int access_mode = IBreakpoints.ACCESSMODE_EXECUTE;
@@ -520,7 +525,7 @@ public class TCFBreakpointsModel {
}
Number line = (Number)p.get(IBreakpoints.PROP_LINE);
if (line != null) {
- m.put(IMarker.LINE_NUMBER, new Integer(line.intValue()));
+ m.put(ATTR_LINE, new Integer(line.intValue()));
Number column = (Number)p.get(IBreakpoints.PROP_COLUMN);
if (column != null) {
m.put(IMarker.CHAR_START, new Integer(column.intValue()));
@@ -556,7 +561,7 @@ public class TCFBreakpointsModel {
m.put(IBreakpoints.PROP_ID, id);
if (client_data != null) {
m.put(IBreakpoints.PROP_CLIENT_DATA, client_data);
- client_data.put(CDATA_CLIENT_ID, client_id);
+ client_data.put(CDATA_CLIENT_ID, Activator.getClientID());
if (type != null) client_data.put(CDATA_TYPE, type);
if (file != null) client_data.put(CDATA_FILE, file);
client_data.put(CDATA_MARKER, p);
@@ -577,7 +582,7 @@ public class TCFBreakpointsModel {
m.put(tcf_key, val);
}
}
- Boolean enabled = (Boolean)p.get(IBreakpoint.ENABLED);
+ Boolean enabled = (Boolean)p.get(ATTR_ENABLED);
if (enabled != null && enabled.booleanValue() && bp_manager.isEnabled()) {
m.put(IBreakpoints.PROP_ENABLED, enabled);
}
@@ -596,7 +601,7 @@ public class TCFBreakpointsModel {
else if (i < j) name = file.substring(j + 1);
}
m.put(IBreakpoints.PROP_FILE, name);
- Integer line = (Integer)p.get(IMarker.LINE_NUMBER);
+ Integer line = (Integer)p.get(ATTR_LINE);
if (line != null) {
m.put(IBreakpoints.PROP_LINE, new Integer(line.intValue()));
Integer column = (Integer)p.get(IMarker.CHAR_START);
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFBreakpointsStatus.java b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/model/TCFBreakpointsStatus.java
index f65428522..e489be911 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFBreakpointsStatus.java
+++ b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/model/TCFBreakpointsStatus.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.model;
+package org.eclipse.tcf.internal.debug.model;
import java.util.HashMap;
import java.util.HashSet;
@@ -18,9 +18,9 @@ import java.util.Set;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.debug.core.model.IBreakpoint;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.tcf.services.IBreakpoints;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.services.IBreakpoints;
public class TCFBreakpointsStatus {
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFContextState.java b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/model/TCFContextState.java
index 62eca91b2..ebff6f397 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFContextState.java
+++ b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/model/TCFContextState.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.model;
+package org.eclipse.tcf.internal.debug.model;
import java.util.Map;
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFError.java b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/model/TCFError.java
index 967b658ac..c0ed9d775 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFError.java
+++ b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/model/TCFError.java
@@ -8,11 +8,11 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.model;
+package org.eclipse.tcf.internal.debug.model;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.debug.core.DebugException;
-import org.eclipse.tm.internal.tcf.debug.Activator;
+import org.eclipse.tcf.internal.debug.Activator;
public class TCFError extends DebugException {
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFFunctionRef.java b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/model/TCFFunctionRef.java
index e76b721d3..8d2cd81bc 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFFunctionRef.java
+++ b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/model/TCFFunctionRef.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.model;
+package org.eclipse.tcf.internal.debug.model;
import java.math.BigInteger;
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFLaunch.java b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/model/TCFLaunch.java
index 885b8b18f..a5a5a1a3f 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFLaunch.java
+++ b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/model/TCFLaunch.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.model;
+package org.eclipse.tcf.internal.debug.model;
import java.io.FileInputStream;
import java.io.IOException;
@@ -23,34 +23,36 @@ import java.util.ListIterator;
import java.util.Map;
import java.util.Set;
+import org.eclipse.core.resources.IStorage;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.debug.core.DebugException;
import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.debug.core.Launch;
-import org.eclipse.tm.internal.tcf.debug.Activator;
-import org.eclipse.tm.internal.tcf.debug.actions.TCFAction;
-import org.eclipse.tm.internal.tcf.debug.launch.TCFLaunchDelegate;
-import org.eclipse.tm.internal.tcf.debug.launch.TCFLaunchDelegate.PathMapRule;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IPeer;
-import org.eclipse.tm.tcf.protocol.IService;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.tcf.services.IFileSystem;
-import org.eclipse.tm.tcf.services.IFileSystem.FileSystemException;
-import org.eclipse.tm.tcf.services.IFileSystem.IFileHandle;
-import org.eclipse.tm.tcf.services.IMemory;
-import org.eclipse.tm.tcf.services.IMemory.MemoryContext;
-import org.eclipse.tm.tcf.services.IMemoryMap;
-import org.eclipse.tm.tcf.services.IPathMap;
-import org.eclipse.tm.tcf.services.IProcesses;
-import org.eclipse.tm.tcf.services.IProcesses.ProcessContext;
-import org.eclipse.tm.tcf.services.IProcessesV1;
-import org.eclipse.tm.tcf.services.IRunControl;
-import org.eclipse.tm.tcf.services.IStreams;
-import org.eclipse.tm.tcf.util.TCFTask;
+import org.eclipse.tcf.internal.debug.Activator;
+import org.eclipse.tcf.internal.debug.actions.TCFAction;
+import org.eclipse.tcf.internal.debug.launch.TCFLaunchDelegate;
+import org.eclipse.tcf.internal.debug.launch.TCFLaunchDelegate.PathMapRule;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.protocol.IService;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.services.IFileSystem;
+import org.eclipse.tcf.services.IFileSystem.FileSystemException;
+import org.eclipse.tcf.services.IFileSystem.IFileHandle;
+import org.eclipse.tcf.services.IMemory;
+import org.eclipse.tcf.services.IMemory.MemoryContext;
+import org.eclipse.tcf.services.IMemoryMap;
+import org.eclipse.tcf.services.IPathMap;
+import org.eclipse.tcf.services.IProcesses;
+import org.eclipse.tcf.services.IProcesses.ProcessContext;
+import org.eclipse.tcf.services.IProcessesV1;
+import org.eclipse.tcf.services.IRunControl;
+import org.eclipse.tcf.services.IStreams;
+import org.eclipse.tcf.util.TCFDataCache;
+import org.eclipse.tcf.util.TCFTask;
public class TCFLaunch extends Launch {
@@ -139,7 +141,10 @@ public class TCFLaunch extends Launch {
private final LinkedList<LaunchStep> launch_steps = new LinkedList<LaunchStep>();
private final LinkedList<String> redirection_path = new LinkedList<String>();
- private ArrayList<PathMapRule> filepath_map;
+ private ArrayList<PathMapRule> host_path_map;
+ private TCFDataCache<IPathMap.PathMapRule[]> target_path_map;
+
+ private HashMap<String,IStorage> target_path_maaping_cache = new HashMap<String,IStorage>();
private Set<String> context_filter;
@@ -181,6 +186,25 @@ public class TCFLaunch extends Launch {
private void onConnected() throws Exception {
// The method is called when TCF channel is successfully connected.
+ final IPathMap path_map_service = getService(IPathMap.class);
+ target_path_map = new TCFDataCache<IPathMap.PathMapRule[]>(channel) {
+ @Override
+ protected boolean startDataRetrieval() {
+ command = path_map_service.get(new IPathMap.DoneGet() {
+ public void doneGet(IToken token, Exception error, IPathMap.PathMapRule[] map) {
+ set(token, error, map);
+ }
+ });
+ return false;
+ }
+ };
+ path_map_service.addListener(new IPathMap.PathMapListener() {
+ public void changed() {
+ target_path_map.reset();
+ target_path_maaping_cache = new HashMap<String,IStorage>();
+ }
+ });
+
final ILaunchConfiguration cfg = getLaunchConfiguration();
if (cfg != null) {
// Send file path map:
@@ -494,15 +518,18 @@ public class TCFLaunch extends Launch {
private void readPathMapConfiguration(ILaunchConfiguration cfg) throws CoreException {
String s = cfg.getAttribute(TCFLaunchDelegate.ATTR_PATH_MAP, "");
- filepath_map = TCFLaunchDelegate.parsePathMapAttribute(s);
+ host_path_map = TCFLaunchDelegate.parsePathMapAttribute(s);
s = cfg.getAttribute(ILaunchConfiguration.ATTR_SOURCE_LOCATOR_MEMENTO, "");
- filepath_map.addAll(TCFLaunchDelegate.parseSourceLocatorMemento(s));
+ host_path_map.addAll(TCFLaunchDelegate.parseSourceLocatorMemento(s));
+ int cnt = 0;
+ String id = Activator.getClientID();
+ for (PathMapRule r : host_path_map) r.getProperties().put(IPathMap.PROP_ID, id + "/" + cnt++);
}
private void downloadPathMaps(ILaunchConfiguration cfg, final Runnable done) throws Exception {
readPathMapConfiguration(cfg);
final IPathMap path_map_service = getService(IPathMap.class);
- path_map_service.set(filepath_map.toArray(new IPathMap.PathMapRule[filepath_map.size()]), new IPathMap.DoneSet() {
+ path_map_service.set(host_path_map.toArray(new IPathMap.PathMapRule[host_path_map.size()]), new IPathMap.DoneSet() {
public void doneSet(IToken token, Exception error) {
if (error != null) channel.terminate(error);
else done.run();
@@ -926,10 +953,10 @@ public class TCFLaunch extends Launch {
public void run() {
try {
if (update_memory_maps != null) update_memory_maps.run();
- if (filepath_map != null) {
+ if (host_path_map != null) {
readPathMapConfiguration(cfg);
final IPathMap path_map_service = getService(IPathMap.class);
- path_map_service.set(filepath_map.toArray(new IPathMap.PathMapRule[filepath_map.size()]), new IPathMap.DoneSet() {
+ path_map_service.set(host_path_map.toArray(new IPathMap.PathMapRule[host_path_map.size()]), new IPathMap.DoneSet() {
public void doneSet(IToken token, Exception error) {
if (error != null) channel.terminate(error);
done(false);
@@ -959,7 +986,7 @@ public class TCFLaunch extends Launch {
return process;
}
- public void writeProcessInputStream(byte[] buf, int pos, final int len) throws Exception {
+ public void writeProcessInputStream(String prs_id, byte[] buf, int pos, final int len) throws Exception {
assert Protocol.isDispatchThread();
final String id = process_input_stream_id;
if (channel.getState() != IChannel.STATE_OPEN) throw new IOException("Connection closed");
@@ -982,6 +1009,26 @@ public class TCFLaunch extends Launch {
return connecting;
}
+ public void onDetach(String prs_id) {
+ if (disconnecting) return;
+ if (process == null) return;
+ if (process_exited) return;
+ if (!prs_id.equals(process.getID())) return;
+ IProcesses processes = getService(IProcesses.class);
+ processes.removeListener(prs_listener);
+ IStreams streams = getService(IStreams.class);
+ for (String id : stream_ids.keySet()) {
+ streams.disconnect(id, new IStreams.DoneDisconnect() {
+ public void doneDisconnect(IToken token, Exception error) {
+ if (error != null) channel.terminate(error);
+ }
+ });
+ }
+ stream_ids.clear();
+ process_input_stream_id = null;
+ process = null;
+ }
+
public void onLastContextRemoved() {
ILaunchConfiguration cfg = getLaunchConfiguration();
try {
@@ -1090,9 +1137,18 @@ public class TCFLaunch extends Launch {
return process_signals;
}
- public ArrayList<PathMapRule> getFilePathMap() {
+ public ArrayList<PathMapRule> getHostPathMap() {
+ assert Protocol.isDispatchThread();
+ return host_path_map;
+ }
+
+ public TCFDataCache<IPathMap.PathMapRule[]> getTargetPathMap() {
assert Protocol.isDispatchThread();
- return filepath_map;
+ return target_path_map;
+ }
+
+ public Map<String,IStorage> getTargetPathMappingCache() {
+ return target_path_maaping_cache;
}
/**
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFMemoryRegion.java b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/model/TCFMemoryRegion.java
index 8017fe254..8ab477fb8 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFMemoryRegion.java
+++ b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/model/TCFMemoryRegion.java
@@ -8,14 +8,14 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.model;
+package org.eclipse.tcf.internal.debug.model;
import java.math.BigInteger;
import java.util.Map;
-import org.eclipse.tm.tcf.protocol.JSON;
-import org.eclipse.tm.tcf.services.IMemoryMap;
-import org.eclipse.tm.tcf.services.IMemoryMap.MemoryRegion;
+import org.eclipse.tcf.protocol.JSON;
+import org.eclipse.tcf.services.IMemoryMap;
+import org.eclipse.tcf.services.IMemoryMap.MemoryRegion;
public class TCFMemoryRegion implements MemoryRegion, Comparable<TCFMemoryRegion> {
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFSourceRef.java b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/model/TCFSourceRef.java
index 79c93a428..85c43f7ee 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFSourceRef.java
+++ b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/model/TCFSourceRef.java
@@ -8,11 +8,11 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.model;
+package org.eclipse.tcf.internal.debug.model;
import java.math.BigInteger;
-import org.eclipse.tm.tcf.services.ILineNumbers;
+import org.eclipse.tcf.services.ILineNumbers;
/**
* Objects of this class represent a mapping between an address and source code area.
diff --git a/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/model/TCFSymFileRef.java b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/model/TCFSymFileRef.java
new file mode 100644
index 000000000..d5b0b969d
--- /dev/null
+++ b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/model/TCFSymFileRef.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Wind River Systems, Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.internal.debug.model;
+
+import java.math.BigInteger;
+import java.util.Map;
+
+public class TCFSymFileRef {
+ public String context_id;
+ public int address_size;
+ public BigInteger address;
+ public Map<String,Object> props;
+ public Throwable error;
+
+ public String toString() {
+ StringBuffer bf = new StringBuffer();
+ bf.append('[');
+ bf.append(context_id);
+ bf.append(',');
+ bf.append(address_size);
+ bf.append(',');
+ bf.append(address);
+ bf.append(',');
+ bf.append(props.toString());
+ bf.append(',');
+ bf.append(error);
+ bf.append(']');
+ return bf.toString();
+ }
+}
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/ITCFTest.java b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/tests/ITCFTest.java
index 1fc67adbd..df0e6b472 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/ITCFTest.java
+++ b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/tests/ITCFTest.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.tests;
+package org.eclipse.tcf.internal.debug.tests;
/**
* Each (sub)test in TCF Test Suite should implement this interface.
@@ -26,4 +26,4 @@ interface ITCFTest {
* @return true if it is OK to resume the context.
*/
boolean canResume(String id);
-} \ No newline at end of file
+}
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/Main.java b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/tests/Main.java
index f5f0e27ec..468f10927 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/Main.java
+++ b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/tests/Main.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.tests;
+package org.eclipse.tcf.internal.debug.tests;
import java.util.ArrayList;
import java.util.Collection;
@@ -16,11 +16,11 @@ import java.util.HashMap;
import java.util.LinkedList;
import java.util.Map;
-import org.eclipse.tm.tcf.core.TransientPeer;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IEventQueue;
-import org.eclipse.tm.tcf.protocol.IPeer;
-import org.eclipse.tm.tcf.protocol.Protocol;
+import org.eclipse.tcf.core.TransientPeer;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IEventQueue;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.protocol.Protocol;
/**
* This class is user to run TCF test suite from command line.
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/RunControl.java b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/tests/RunControl.java
index e111a5907..ddfd0deda 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/RunControl.java
+++ b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/tests/RunControl.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.tests;
+package org.eclipse.tcf.internal.debug.tests;
import java.util.Collection;
import java.util.HashMap;
@@ -17,12 +17,12 @@ import java.util.Map;
import java.util.Random;
import java.util.Set;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.tcf.services.IDiagnostics;
-import org.eclipse.tm.tcf.services.IRunControl;
-import org.eclipse.tm.tcf.services.IRunControl.RunControlContext;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.services.IDiagnostics;
+import org.eclipse.tcf.services.IRunControl;
+import org.eclipse.tcf.services.IRunControl.RunControlContext;
class RunControl {
@@ -123,7 +123,7 @@ class RunControl {
getState();
startTimer();
}
- enable_trace = System.getProperty("org.eclipse.tm.tcf.debug.tracing.tests.runcontrol") != null;
+ enable_trace = System.getProperty("org.eclipse.tcf.debug.tracing.tests.runcontrol") != null;
}
private void getState() {
@@ -236,16 +236,33 @@ class RunControl {
assert resume_cmds.get(id) == null;
final String test_id = test_suite.getCanceledTests().get(id);
if (test_id != null) {
+ boolean ok = false;
if (enable_trace) System.out.println("" + channel_id + " cancel " + id);
- IDiagnostics diag = channel.getRemoteService(IDiagnostics.class);
- resume_cmds.put(id, diag.cancelTest(test_id, new IDiagnostics.DoneCancelTest() {
- public void doneCancelTest(IToken token, Throwable error) {
- assert resume_cmds.get(id) == token;
- resume_cmds.remove(id);
- if (enable_trace) System.out.println("" + channel_id + " done cancel " + error);
- if (error != null && ctx_map.get(test_id) != null) exit(error);
+ if (rnd.nextInt(4) == 0) {
+ IRunControl.RunControlContext ctx = ctx_map.get(test_id);
+ if (ctx != null && ctx.canTerminate()) {
+ resume_cmds.put(id, ctx.terminate(new IRunControl.DoneCommand() {
+ public void doneCommand(IToken token, Exception error) {
+ assert resume_cmds.get(id) == token;
+ resume_cmds.remove(id);
+ if (enable_trace) System.out.println("" + channel_id + " done cancel " + error);
+ if (error != null && ctx_map.get(test_id) != null) exit(error);
+ }
+ }));
+ ok = true;
}
- }));
+ }
+ if (!ok) {
+ IDiagnostics diag = channel.getRemoteService(IDiagnostics.class);
+ resume_cmds.put(id, diag.cancelTest(test_id, new IDiagnostics.DoneCancelTest() {
+ public void doneCancelTest(IToken token, Throwable error) {
+ assert resume_cmds.get(id) == token;
+ resume_cmds.remove(id);
+ if (enable_trace) System.out.println("" + channel_id + " done cancel " + error);
+ if (error != null && ctx_map.get(test_id) != null) exit(error);
+ }
+ }));
+ }
}
else {
IRunControl.RunControlContext ctx = ctx_map.get(id);
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TCFTestSuite.java b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/tests/TCFTestSuite.java
index 9ffec13c4..b9b6c9a23 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TCFTestSuite.java
+++ b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/tests/TCFTestSuite.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.tests;
+package org.eclipse.tcf.internal.debug.tests;
import java.io.IOException;
import java.util.ArrayList;
@@ -20,11 +20,11 @@ import java.util.List;
import java.util.Map;
import java.util.Random;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IPeer;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.tcf.services.IMemoryMap;
-import org.eclipse.tm.tcf.services.IPathMap;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.services.IMemoryMap;
+import org.eclipse.tcf.services.IPathMap;
/**
* TCF Test Suite implements stress testing of communication channels and capabilities of remote peer.
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestAttachTerminate.java b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/tests/TestAttachTerminate.java
index b258f0035..0fc73fed9 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestAttachTerminate.java
+++ b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/tests/TestAttachTerminate.java
@@ -8,18 +8,18 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.tests;
+package org.eclipse.tcf.internal.debug.tests;
import java.util.HashSet;
import java.util.Map;
import java.util.Random;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.tcf.services.IDiagnostics;
-import org.eclipse.tm.tcf.services.IRunControl;
-import org.eclipse.tm.tcf.services.IRunControl.RunControlContext;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.services.IDiagnostics;
+import org.eclipse.tcf.services.IRunControl;
+import org.eclipse.tcf.services.IRunControl.RunControlContext;
class TestAttachTerminate implements ITCFTest, IRunControl.RunControlListener {
@@ -149,4 +149,4 @@ class TestAttachTerminate implements ITCFTest, IRunControl.RunControlListener {
public void contextSuspended(String context, String pc, String reason, Map<String,Object> params) {
}
-} \ No newline at end of file
+}
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestEcho.java b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/tests/TestEcho.java
index eb4a3ff33..22444d90e 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestEcho.java
+++ b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/tests/TestEcho.java
@@ -8,14 +8,14 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.tests;
+package org.eclipse.tcf.internal.debug.tests;
import java.util.LinkedList;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IErrorReport;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.services.IDiagnostics;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IErrorReport;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.services.IDiagnostics;
class TestEcho implements ITCFTest, IDiagnostics.DoneEcho {
@@ -91,4 +91,4 @@ class TestEcho implements ITCFTest, IDiagnostics.DoneEcho {
public boolean canResume(String id) {
return true;
}
-} \ No newline at end of file
+}
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestEchoERR.java b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/tests/TestEchoERR.java
index c855fb90a..887733ec0 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestEchoERR.java
+++ b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/tests/TestEchoERR.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.tests;
+package org.eclipse.tcf.internal.debug.tests;
import java.math.BigDecimal;
import java.util.ArrayList;
@@ -16,12 +16,12 @@ import java.util.HashMap;
import java.util.LinkedList;
import java.util.Map;
-import org.eclipse.tm.tcf.core.Command;
-import org.eclipse.tm.tcf.core.ErrorReport;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IErrorReport;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.services.IDiagnostics;
+import org.eclipse.tcf.core.Command;
+import org.eclipse.tcf.core.ErrorReport;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IErrorReport;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.services.IDiagnostics;
class TestEchoERR implements ITCFTest, IDiagnostics.DoneEchoERR {
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestEchoFP.java b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/tests/TestEchoFP.java
index 69e1d3212..8e1aeea31 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestEchoFP.java
+++ b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/tests/TestEchoFP.java
@@ -8,15 +8,15 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.tests;
+package org.eclipse.tcf.internal.debug.tests;
import java.math.BigDecimal;
import java.util.LinkedList;
import java.util.Random;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.services.IDiagnostics;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.services.IDiagnostics;
class TestEchoFP implements ITCFTest, IDiagnostics.DoneEchoFP {
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestExpressions.java b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/tests/TestExpressions.java
index d59f94b5c..fd774a3de 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestExpressions.java
+++ b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/tests/TestExpressions.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.tests;
+package org.eclipse.tcf.internal.debug.tests;
import java.math.BigInteger;
import java.util.Collection;
@@ -18,16 +18,17 @@ import java.util.Map;
import java.util.Random;
import java.util.Set;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.protocol.JSON;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.tcf.services.IBreakpoints;
-import org.eclipse.tm.tcf.services.IDiagnostics;
-import org.eclipse.tm.tcf.services.IExpressions;
-import org.eclipse.tm.tcf.services.IRunControl;
-import org.eclipse.tm.tcf.services.IStackTrace;
-import org.eclipse.tm.tcf.services.ISymbols;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IErrorReport;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.JSON;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.services.IBreakpoints;
+import org.eclipse.tcf.services.IDiagnostics;
+import org.eclipse.tcf.services.IExpressions;
+import org.eclipse.tcf.services.IRunControl;
+import org.eclipse.tcf.services.IStackTrace;
+import org.eclipse.tcf.services.ISymbols;
class TestExpressions implements ITCFTest,
IRunControl.RunControlListener, IExpressions.ExpressionsListener, IBreakpoints.BreakpointsListener {
@@ -50,6 +51,7 @@ class TestExpressions implements ITCFTest,
private String process_id;
private String thread_id;
private boolean run_to_bp_done;
+ private boolean no_cpp;
private boolean test_done;
private boolean cancel_test_sent;
private IRunControl.RunControlContext test_ctx;
@@ -58,13 +60,21 @@ class TestExpressions implements ITCFTest,
private boolean waiting_suspend;
private String[] stack_trace;
private IStackTrace.StackTraceContext[] stack_frames;
- private String[] local_vars;
+ private String[] local_var_ids;
+ private final Map<String,String> global_var_ids = new HashMap<String,String>();
private final Map<String,IExpressions.Expression> expr_ctx = new HashMap<String,IExpressions.Expression>();
private final Map<String,IExpressions.Value> expr_val = new HashMap<String,IExpressions.Value>();
private final Map<String,ISymbols.Symbol> expr_sym = new HashMap<String,ISymbols.Symbol>();
private final Map<String,String[]> expr_chld = new HashMap<String,String[]>();
private final Set<String> expr_to_dispose = new HashSet<String>();
+ private static String[] global_var_names = {
+ "tcf_test_char",
+ "tcf_test_short",
+ "tcf_test_long",
+ "tcf_cpp_test_bool",
+ };
+
private static String[] test_expressions = {
"func2_local1",
"func2_local2",
@@ -110,6 +120,13 @@ class TestExpressions implements ITCFTest,
"tcf_test_array + 10",
"*(tcf_test_array + 10) | 1",
"&*(char *)(int *)0 == 0",
+ "(bool)0 == false",
+ "(bool)1 == true",
+ "sizeof(bool) == sizeof true",
+ "tcf_cpp_test_class::s_int == 1",
+ "sizeof tcf_cpp_test_class::s_int == sizeof signed",
+ "tcf_cpp_test_class::tcf_cpp_test_class_nested::s_int == 2",
+ "tcf_cpp_test_class_extension::tcf_cpp_test_class_nested::s_int == 2",
};
TestExpressions(TCFTestSuite test_suite, RunControl test_rc, IChannel channel) {
@@ -386,24 +403,24 @@ class TestExpressions implements ITCFTest,
});
return;
}
- if (local_vars == null) {
+ if (local_var_ids == null) {
expr.getChildren(stack_trace[stack_trace.length - 2], new IExpressions.DoneGetChildren() {
public void doneGetChildren(IToken token, Exception error, String[] context_ids) {
if (error != null || context_ids == null) {
// Need to continue tests even if local variables info is not available.
// TODO: need to distinguish absence of debug info from other errors.
- local_vars = new String[0];
+ local_var_ids = new String[0];
runTest();
}
else {
- local_vars = context_ids;
+ local_var_ids = context_ids;
runTest();
}
}
});
return;
}
- for (final String id : local_vars) {
+ for (final String id : local_var_ids) {
if (expr_ctx.get(id) == null) {
expr.getContext(id, new IExpressions.DoneGetContext() {
public void doneGetContext(IToken token, Exception error, IExpressions.Expression ctx) {
@@ -419,14 +436,48 @@ class TestExpressions implements ITCFTest,
return;
}
}
+ if (syms != null && local_var_ids.length > 0) {
+ for (final String nm : global_var_names) {
+ if (!global_var_ids.containsKey(nm)) {
+ syms.find(process_id, new BigInteger(suspended_pc), nm, new ISymbols.DoneFind() {
+ public void doneFind(IToken token, Exception error, String symbol_id) {
+ if (error != null) {
+ if (nm.startsWith("tcf_cpp_") && error instanceof IErrorReport &&
+ ((IErrorReport)error).getErrorCode() == IErrorReport.TCF_ERROR_SYM_NOT_FOUND) {
+
+ global_var_ids.put(nm, null);
+ no_cpp = true;
+ runTest();
+ return;
+ }
+ exit(error);
+ }
+ else if (symbol_id == null) {
+ exit(new Exception("Invalid symbol ID"));
+ }
+ else {
+ global_var_ids.put(nm, symbol_id);
+ runTest();
+ }
+ }
+ });
+ return;
+ }
+ }
+ }
for (final String txt : test_expressions) {
- if (local_vars.length == 0) {
+ if (local_var_ids.length == 0) {
// Debug info not available
- if (txt.indexOf("local") >= 0) continue;
+ if (txt.indexOf("func2_local") >= 0) continue;
if (txt.indexOf("test_struct") >= 0) continue;
if (txt.indexOf("tcf_test_array") >= 0) continue;
if (txt.indexOf("(char *)") >= 0) continue;
}
+ if (local_var_ids.length == 0 || no_cpp) {
+ // Agent is not build with C++ compiler
+ if (txt.indexOf("tcf_cpp_test") >= 0) continue;
+ if (txt.indexOf("(bool)") >= 0) continue;
+ }
if (expr_ctx.get(txt) == null) {
expr.create(stack_trace[stack_trace.length - 2], null, txt, new IExpressions.DoneCreate() {
public void doneCreate(IToken token, Exception error, IExpressions.Expression ctx) {
@@ -443,7 +494,7 @@ class TestExpressions implements ITCFTest,
return;
}
}
- for (final String id : local_vars) {
+ for (final String id : local_var_ids) {
if (expr_val.get(id) == null) {
expr.evaluate(id, new IExpressions.DoneEvaluate() {
public void doneEvaluate(IToken token, Exception error, IExpressions.Value ctx) {
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestFileSystem.java b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/tests/TestFileSystem.java
index 7c601e7e2..d7c5ea2d4 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestFileSystem.java
+++ b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/tests/TestFileSystem.java
@@ -8,24 +8,25 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.tests;
+package org.eclipse.tcf.internal.debug.tests;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.Random;
+import java.util.UUID;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.tcf.services.IFileSystem;
-import org.eclipse.tm.tcf.services.IFileSystem.DirEntry;
-import org.eclipse.tm.tcf.services.IFileSystem.FileAttrs;
-import org.eclipse.tm.tcf.services.IFileSystem.FileSystemException;
-import org.eclipse.tm.tcf.services.IFileSystem.IFileHandle;
-import org.eclipse.tm.tcf.util.TCFFileInputStream;
-import org.eclipse.tm.tcf.util.TCFFileOutputStream;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.services.IFileSystem;
+import org.eclipse.tcf.services.IFileSystem.DirEntry;
+import org.eclipse.tcf.services.IFileSystem.FileAttrs;
+import org.eclipse.tcf.services.IFileSystem.FileSystemException;
+import org.eclipse.tcf.services.IFileSystem.IFileHandle;
+import org.eclipse.tcf.util.TCFFileInputStream;
+import org.eclipse.tcf.util.TCFFileOutputStream;
class TestFileSystem implements ITCFTest, IFileSystem.DoneStat,
IFileSystem.DoneOpen, IFileSystem.DoneClose,
@@ -37,6 +38,8 @@ class TestFileSystem implements ITCFTest, IFileSystem.DoneStat,
private final TCFTestSuite test_suite;
private final int channel_id;
+ private static final String client_id = UUID.randomUUID().toString();
+
private static final int
STATE_PRE = 0,
STATE_RD_DIR = 1,
@@ -128,7 +131,7 @@ class TestFileSystem implements ITCFTest, IFileSystem.DoneStat,
else if (state == STATE_RD_DIR) {
if (entries != null) {
for (DirEntry e : entries) {
- if (e.filename.startsWith("tcf-test-" + channel_id + "-")) {
+ if (e.filename.startsWith("tcf-test-" + client_id + "-" + channel_id + "-")) {
tmp_files.add(e.filename);
}
}
@@ -177,7 +180,7 @@ class TestFileSystem implements ITCFTest, IFileSystem.DoneStat,
}
bf[i] = ch;
}
- file_name = tmp_path + "/tcf-test-" + channel_id + "-" + new String(bf) + ".tmp";
+ file_name = tmp_path + "/tcf-test-" + client_id + "-" + channel_id + "-" + new String(bf) + ".tmp";
files.open(file_name, IFileSystem.TCF_O_CREAT | IFileSystem.TCF_O_TRUNC | IFileSystem.TCF_O_WRITE, null, this);
}
else {
@@ -479,4 +482,4 @@ class TestFileSystem implements ITCFTest, IFileSystem.DoneStat,
public boolean canResume(String id) {
return true;
}
-} \ No newline at end of file
+}
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestPathMap.java b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/tests/TestPathMap.java
index f88ec68ca..b50162858 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestPathMap.java
+++ b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/tests/TestPathMap.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.tests;
+package org.eclipse.tcf.internal.debug.tests;
import java.util.ArrayList;
import java.util.HashMap;
@@ -17,10 +17,10 @@ import java.util.Map;
import java.util.Random;
import java.util.UUID;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.services.IPathMap;
-import org.eclipse.tm.tcf.services.IPathMap.PathMapRule;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.services.IPathMap;
+import org.eclipse.tcf.services.IPathMap.PathMapRule;
class TestPathMap implements ITCFTest {
@@ -195,4 +195,3 @@ class TestPathMap implements ITCFTest {
return false;
}
}
-
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestRCBP1.java b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/tests/TestRCBP1.java
index 56ed77663..6c54ddb6c 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestRCBP1.java
+++ b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/tests/TestRCBP1.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.tests;
+package org.eclipse.tcf.internal.debug.tests;
import java.math.BigInteger;
import java.util.ArrayList;
@@ -20,31 +20,31 @@ import java.util.Map;
import java.util.Random;
import java.util.Set;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IErrorReport;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.protocol.JSON;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.tcf.services.IBreakpoints;
-import org.eclipse.tm.tcf.services.IDiagnostics;
-import org.eclipse.tm.tcf.services.IDisassembly;
-import org.eclipse.tm.tcf.services.ILineNumbers;
-import org.eclipse.tm.tcf.services.IMemory;
-import org.eclipse.tm.tcf.services.IMemoryMap;
-import org.eclipse.tm.tcf.services.IPathMap;
-import org.eclipse.tm.tcf.services.IRegisters;
-import org.eclipse.tm.tcf.services.IRunControl;
-import org.eclipse.tm.tcf.services.ISymbols;
-import org.eclipse.tm.tcf.services.IDiagnostics.ISymbol;
-import org.eclipse.tm.tcf.services.IDisassembly.IDisassemblyLine;
-import org.eclipse.tm.tcf.services.ILineNumbers.CodeArea;
-import org.eclipse.tm.tcf.services.IMemory.MemoryContext;
-import org.eclipse.tm.tcf.services.IMemory.MemoryError;
-import org.eclipse.tm.tcf.services.IMemoryMap.MemoryRegion;
-import org.eclipse.tm.tcf.services.IPathMap.PathMapRule;
-import org.eclipse.tm.tcf.services.IRegisters.RegistersContext;
-import org.eclipse.tm.tcf.services.IRunControl.RunControlContext;
-import org.eclipse.tm.tcf.services.ISymbols.Symbol;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IErrorReport;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.JSON;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.services.IBreakpoints;
+import org.eclipse.tcf.services.IDiagnostics;
+import org.eclipse.tcf.services.IDisassembly;
+import org.eclipse.tcf.services.ILineNumbers;
+import org.eclipse.tcf.services.IMemory;
+import org.eclipse.tcf.services.IMemoryMap;
+import org.eclipse.tcf.services.IPathMap;
+import org.eclipse.tcf.services.IRegisters;
+import org.eclipse.tcf.services.IRunControl;
+import org.eclipse.tcf.services.ISymbols;
+import org.eclipse.tcf.services.IDiagnostics.ISymbol;
+import org.eclipse.tcf.services.IDisassembly.IDisassemblyLine;
+import org.eclipse.tcf.services.ILineNumbers.CodeArea;
+import org.eclipse.tcf.services.IMemory.MemoryContext;
+import org.eclipse.tcf.services.IMemory.MemoryError;
+import org.eclipse.tcf.services.IMemoryMap.MemoryRegion;
+import org.eclipse.tcf.services.IPathMap.PathMapRule;
+import org.eclipse.tcf.services.IRegisters.RegistersContext;
+import org.eclipse.tcf.services.IRunControl.RunControlContext;
+import org.eclipse.tcf.services.ISymbols.Symbol;
class TestRCBP1 implements ITCFTest, IRunControl.RunControlListener {
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestStreams.java b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/tests/TestStreams.java
index e066a4b47..10c3d165e 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestStreams.java
+++ b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/tests/TestStreams.java
@@ -8,15 +8,15 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.tests;
+package org.eclipse.tcf.internal.debug.tests;
import java.util.HashSet;
import java.util.Random;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.services.IDiagnostics;
-import org.eclipse.tm.tcf.services.IStreams;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.services.IDiagnostics;
+import org.eclipse.tcf.services.IStreams;
class TestStreams implements ITCFTest, IStreams.StreamsListener {
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestSysMonitor.java b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/tests/TestSysMonitor.java
index 74059492c..edc7b2d60 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestSysMonitor.java
+++ b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/tests/TestSysMonitor.java
@@ -8,16 +8,16 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.tests;
+package org.eclipse.tcf.internal.debug.tests;
import java.util.HashMap;
import java.util.HashSet;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IErrorReport;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.services.ISysMonitor;
-import org.eclipse.tm.tcf.services.ISysMonitor.SysMonitorContext;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IErrorReport;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.services.ISysMonitor;
+import org.eclipse.tcf.services.ISysMonitor.SysMonitorContext;
class TestSysMonitor implements ITCFTest {
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestTerminals.java b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/tests/TestTerminals.java
index 42b1ee6ad..daf53745f 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestTerminals.java
+++ b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/tests/TestTerminals.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.tests;
+package org.eclipse.tcf.internal.debug.tests;
import java.util.ArrayList;
import java.util.Collection;
@@ -18,13 +18,13 @@ import java.util.List;
import java.util.Map;
import java.util.Random;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.tcf.services.IProcesses;
-import org.eclipse.tm.tcf.services.IStreams;
-import org.eclipse.tm.tcf.services.ITerminals;
-import org.eclipse.tm.tcf.services.ITerminals.TerminalContext;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.services.IProcesses;
+import org.eclipse.tcf.services.IStreams;
+import org.eclipse.tcf.services.ITerminals;
+import org.eclipse.tcf.services.ITerminals.TerminalContext;
class TestTerminals implements ITCFTest {
diff --git a/plugins/org.eclipse.tm.tcf.rse/.classpath b/plugins/org.eclipse.tcf.rse/.classpath
index 01a008e0d..01a008e0d 100644
--- a/plugins/org.eclipse.tm.tcf.rse/.classpath
+++ b/plugins/org.eclipse.tcf.rse/.classpath
diff --git a/plugins/org.eclipse.tm.tcf.rse/.project b/plugins/org.eclipse.tcf.rse/.project
index 084e93e38..79dce5e36 100644
--- a/plugins/org.eclipse.tm.tcf.rse/.project
+++ b/plugins/org.eclipse.tcf.rse/.project
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.eclipse.tm.tcf.rse</name>
+ <name>org.eclipse.tcf.rse</name>
<comment></comment>
<projects>
</projects>
diff --git a/plugins/org.eclipse.tm.tcf.rse/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.tcf.rse/.settings/org.eclipse.jdt.core.prefs
index 35fc6d403..35fc6d403 100644
--- a/plugins/org.eclipse.tm.tcf.rse/.settings/org.eclipse.jdt.core.prefs
+++ b/plugins/org.eclipse.tcf.rse/.settings/org.eclipse.jdt.core.prefs
diff --git a/plugins/org.eclipse.tm.tcf.rse/.settings/org.eclipse.jdt.ui.prefs b/plugins/org.eclipse.tcf.rse/.settings/org.eclipse.jdt.ui.prefs
index 903e1082e..903e1082e 100644
--- a/plugins/org.eclipse.tm.tcf.rse/.settings/org.eclipse.jdt.ui.prefs
+++ b/plugins/org.eclipse.tcf.rse/.settings/org.eclipse.jdt.ui.prefs
diff --git a/plugins/org.eclipse.tm.tcf.rse/META-INF/MANIFEST.MF b/plugins/org.eclipse.tcf.rse/META-INF/MANIFEST.MF
index c4bb63f94..0f7abe0c1 100644
--- a/plugins/org.eclipse.tm.tcf.rse/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.tcf.rse/META-INF/MANIFEST.MF
@@ -1,9 +1,9 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.tm.tcf.rse;singleton:=true
-Bundle-Version: 0.5.0.qualifier
-Bundle-Activator: org.eclipse.tm.internal.tcf.rse.Activator
+Bundle-SymbolicName: org.eclipse.tcf.rse;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipse.tcf.internal.rse.Activator
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui,
@@ -18,14 +18,14 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.rse.subsystems.terminals.core,
org.eclipse.rse.subsystems.shells.core;bundle-version="3.1.100",
org.eclipse.core.resources;bundle-version="3.6.0",
- org.eclipse.tm.tcf;bundle-version="0.5.0",
- org.eclipse.tm.tcf.core;bundle-version="0.5.0"
+ org.eclipse.tcf;bundle-version="1.0.0",
+ org.eclipse.tcf.core;bundle-version="1.0.0"
Import-Package: org.eclipse.rse.core.filters,
org.eclipse.rse.core.model,
- org.eclipse.tm.tcf.core,
- org.eclipse.tm.tcf.protocol,
- org.eclipse.tm.tcf.services,
- org.eclipse.tm.tcf.util
+ org.eclipse.tcf.core,
+ org.eclipse.tcf.protocol,
+ org.eclipse.tcf.services,
+ org.eclipse.tcf.util
Bundle-ActivationPolicy: lazy
Eclipse-LazyStart: true
Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/plugins/org.eclipse.tm.tcf.rse/about.html b/plugins/org.eclipse.tcf.rse/about.html
index 6c5b3615b..6c5b3615b 100644
--- a/plugins/org.eclipse.tm.tcf.rse/about.html
+++ b/plugins/org.eclipse.tcf.rse/about.html
diff --git a/plugins/org.eclipse.tm.tcf.rse/build.properties b/plugins/org.eclipse.tcf.rse/build.properties
index 4785ce898..4785ce898 100644
--- a/plugins/org.eclipse.tm.tcf.rse/build.properties
+++ b/plugins/org.eclipse.tcf.rse/build.properties
diff --git a/plugins/org.eclipse.tm.tcf.rse/icons/process-r.gif b/plugins/org.eclipse.tcf.rse/icons/process-r.gif
index 87aa144a8..87aa144a8 100644
--- a/plugins/org.eclipse.tm.tcf.rse/icons/process-r.gif
+++ b/plugins/org.eclipse.tcf.rse/icons/process-r.gif
Binary files differ
diff --git a/plugins/org.eclipse.tm.tcf.rse/icons/process-s.gif b/plugins/org.eclipse.tcf.rse/icons/process-s.gif
index c1644b2ec..c1644b2ec 100644
--- a/plugins/org.eclipse.tm.tcf.rse/icons/process-s.gif
+++ b/plugins/org.eclipse.tcf.rse/icons/process-s.gif
Binary files differ
diff --git a/plugins/org.eclipse.tm.tcf.rse/icons/system-files-live.gif b/plugins/org.eclipse.tcf.rse/icons/system-files-live.gif
index 885b8a69e..885b8a69e 100644
--- a/plugins/org.eclipse.tm.tcf.rse/icons/system-files-live.gif
+++ b/plugins/org.eclipse.tcf.rse/icons/system-files-live.gif
Binary files differ
diff --git a/plugins/org.eclipse.tm.tcf.rse/icons/system-files.gif b/plugins/org.eclipse.tcf.rse/icons/system-files.gif
index 874c99262..874c99262 100644
--- a/plugins/org.eclipse.tm.tcf.rse/icons/system-files.gif
+++ b/plugins/org.eclipse.tcf.rse/icons/system-files.gif
Binary files differ
diff --git a/plugins/org.eclipse.tm.tcf.rse/icons/system-processes-live.gif b/plugins/org.eclipse.tcf.rse/icons/system-processes-live.gif
index 96a447a71..96a447a71 100644
--- a/plugins/org.eclipse.tm.tcf.rse/icons/system-processes-live.gif
+++ b/plugins/org.eclipse.tcf.rse/icons/system-processes-live.gif
Binary files differ
diff --git a/plugins/org.eclipse.tm.tcf.rse/icons/system-processes.gif b/plugins/org.eclipse.tcf.rse/icons/system-processes.gif
index e07b81aa6..e07b81aa6 100644
--- a/plugins/org.eclipse.tm.tcf.rse/icons/system-processes.gif
+++ b/plugins/org.eclipse.tcf.rse/icons/system-processes.gif
Binary files differ
diff --git a/plugins/org.eclipse.tm.tcf.rse/icons/systemshell.gif b/plugins/org.eclipse.tcf.rse/icons/systemshell.gif
index 15e833644..15e833644 100644
--- a/plugins/org.eclipse.tm.tcf.rse/icons/systemshell.gif
+++ b/plugins/org.eclipse.tcf.rse/icons/systemshell.gif
Binary files differ
diff --git a/plugins/org.eclipse.tm.tcf.rse/icons/systemshelllive.gif b/plugins/org.eclipse.tcf.rse/icons/systemshelllive.gif
index a3f79194a..a3f79194a 100644
--- a/plugins/org.eclipse.tm.tcf.rse/icons/systemshelllive.gif
+++ b/plugins/org.eclipse.tcf.rse/icons/systemshelllive.gif
Binary files differ
diff --git a/plugins/org.eclipse.tm.tcf.rse/icons/tcf.gif b/plugins/org.eclipse.tcf.rse/icons/tcf.gif
index 3198679ae..3198679ae 100644
--- a/plugins/org.eclipse.tm.tcf.rse/icons/tcf.gif
+++ b/plugins/org.eclipse.tcf.rse/icons/tcf.gif
Binary files differ
diff --git a/plugins/org.eclipse.tm.tcf.rse/icons/thread-r.gif b/plugins/org.eclipse.tcf.rse/icons/thread-r.gif
index 17d7d69df..17d7d69df 100644
--- a/plugins/org.eclipse.tm.tcf.rse/icons/thread-r.gif
+++ b/plugins/org.eclipse.tcf.rse/icons/thread-r.gif
Binary files differ
diff --git a/plugins/org.eclipse.tm.tcf.rse/icons/thread-s.gif b/plugins/org.eclipse.tcf.rse/icons/thread-s.gif
index 3fa5fe586..3fa5fe586 100644
--- a/plugins/org.eclipse.tm.tcf.rse/icons/thread-s.gif
+++ b/plugins/org.eclipse.tcf.rse/icons/thread-s.gif
Binary files differ
diff --git a/plugins/org.eclipse.tm.tcf.rse/plugin.properties b/plugins/org.eclipse.tcf.rse/plugin.properties
index e4019ec06..92ab45d1c 100644
--- a/plugins/org.eclipse.tm.tcf.rse/plugin.properties
+++ b/plugins/org.eclipse.tcf.rse/plugin.properties
@@ -8,6 +8,6 @@
# Contributors:
# Wind River Systems - initial implementation
###############################################################################
-pluginName = TCF/RSE Integration (Incubation)
+pluginName = TCF/RSE Integration
providerName = Eclipse CDT
diff --git a/plugins/org.eclipse.tm.tcf.rse/plugin.xml b/plugins/org.eclipse.tcf.rse/plugin.xml
index 343aeb900..a216b7a3c 100644
--- a/plugins/org.eclipse.tm.tcf.rse/plugin.xml
+++ b/plugins/org.eclipse.tcf.rse/plugin.xml
@@ -18,7 +18,7 @@
description="Connects using Target Communication Framework"
icon="icons/tcf.gif"
iconLive="icons/tcf.gif"
- id="org.eclipse.tm.tcf.rse.systemType"
+ id="org.eclipse.tcf.rse.systemType"
label="TCF"
name="TCF">
</systemType>
@@ -27,14 +27,14 @@
point="org.eclipse.rse.core.subsystemConfigurations">
<configuration
category="processes"
- class="org.eclipse.tm.internal.tcf.rse.processes.TCFProcessSubSystemConfiguration"
+ class="org.eclipse.tcf.internal.rse.processes.TCFProcessSubSystemConfiguration"
description="Processes"
icon="icons/system-processes.gif"
iconlive="icons/system-processes-live.gif"
- id="org.eclipse.tm.tcf.rse.Processes"
+ id="org.eclipse.tcf.rse.Processes"
name="Processes"
priority="200"
- systemTypeIds="org.eclipse.tm.tcf.rse.systemType"
+ systemTypeIds="org.eclipse.tcf.rse.systemType"
vendor="Wind River">
</configuration>
</extension>
@@ -42,14 +42,14 @@
point="org.eclipse.rse.core.subsystemConfigurations">
<configuration
category="shells"
- class="org.eclipse.tm.internal.tcf.rse.shells.TCFShellSubSystemConfiguration"
+ class="org.eclipse.tcf.internal.rse.shells.TCFShellSubSystemConfiguration"
description="Shells"
icon="icons/systemshell.gif"
iconlive="icons/systemshelllive.gif"
- id="org.eclipse.tm.tcf.rse.Shells"
+ id="org.eclipse.tcf.rse.Shells"
name="Shells"
priority="200"
- systemTypeIds="org.eclipse.tm.tcf.rse.systemType"
+ systemTypeIds="org.eclipse.tcf.rse.systemType"
vendor="Eclipse.org">
</configuration>
</extension>
@@ -57,14 +57,14 @@
point="org.eclipse.rse.core.subsystemConfigurations">
<configuration
category="files"
- class="org.eclipse.tm.internal.tcf.rse.files.TCFFileSubSystemConfiguration"
+ class="org.eclipse.tcf.internal.rse.files.TCFFileSubSystemConfiguration"
description="Files"
icon="icons/system-files.gif"
iconlive="icons/system-files-live.gif"
- id="org.eclipse.tm.tcf.rse.Files"
+ id="org.eclipse.tcf.rse.Files"
name="Files"
priority="200"
- systemTypeIds="org.eclipse.tm.tcf.rse.systemType"
+ systemTypeIds="org.eclipse.tcf.rse.systemType"
vendor="Wind River">
</configuration>
</extension>
@@ -72,19 +72,19 @@
point="org.eclipse.rse.core.subsystemConfigurations">
<configuration
category="terminals"
- class="org.eclipse.tm.internal.tcf.rse.terminals.TCFTerminalServiceSubSystemConfiguration"
+ class="org.eclipse.tcf.internal.rse.terminals.TCFTerminalServiceSubSystemConfiguration"
description="TCF Terminal Service Description"
- id="org.eclipse.tm.tcf.rse.Terminals"
+ id="org.eclipse.tcf.rse.Terminals"
name="Terminals"
priority="200"
- systemTypeIds="org.eclipse.tm.tcf.rse.systemType"
+ systemTypeIds="org.eclipse.tcf.rse.systemType"
vendor="Eclipse.org">
</configuration>
</extension>
<extension point="org.eclipse.core.runtime.adapters">
<factory
- class="org.eclipse.tm.internal.tcf.rse.processes.TCFSystemViewProcessAdapterFactory"
- adaptableType="org.eclipse.tm.internal.tcf.rse.processes.TCFRemoteProcess">
+ class="org.eclipse.tcf.internal.rse.processes.TCFSystemViewProcessAdapterFactory"
+ adaptableType="org.eclipse.tcf.internal.rse.processes.TCFRemoteProcess">
<adapter type="org.eclipse.rse.ui.view.ISystemViewElementAdapter"/>
<adapter type="org.eclipse.rse.core.subsystems.ISystemDragDropAdapter"/>
<adapter type="org.eclipse.rse.ui.view.ISystemRemoteElementAdapter"/>
diff --git a/plugins/org.eclipse.tcf.rse/pom.xml b/plugins/org.eclipse.tcf.rse/pom.xml
new file mode 100644
index 000000000..aca16e191
--- /dev/null
+++ b/plugins/org.eclipse.tcf.rse/pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.tcf</groupId>
+ <artifactId>tcf-parent</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../../pom.xml</relativePath>
+ </parent>
+
+ <version>1.0.0-SNAPSHOT</version>
+ <artifactId>org.eclipse.tcf.rse</artifactId>
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/Activator.java b/plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/Activator.java
index 794836daa..7290c23d3 100644
--- a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/Activator.java
+++ b/plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/Activator.java
@@ -7,9 +7,9 @@
*
* Contributors:
* Wind River Systems - initial API and implementation
- * Uwe Stieber (Wind River) - [271227] Fix compiler warnings in org.eclipse.tm.tcf.rse
+ * Uwe Stieber (Wind River) - [271227] Fix compiler warnings in org.eclipse.tcf.rse
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.rse;
+package org.eclipse.tcf.internal.rse;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.ui.plugin.AbstractUIPlugin;
@@ -21,7 +21,7 @@ import org.osgi.framework.BundleContext;
public class Activator extends AbstractUIPlugin {
// The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.tm.tcf.rse"; //$NON-NLS-1$
+ public static final String PLUGIN_ID = "org.eclipse.tcf.rse"; //$NON-NLS-1$
// The shared instance
private static Activator plugin;
diff --git a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/ITCFService.java b/plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/ITCFService.java
index 79f1e4624..9372988ee 100644
--- a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/ITCFService.java
+++ b/plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/ITCFService.java
@@ -11,7 +11,7 @@
* Martin Oberhuber (Wind River) - [170910] Adopt RSE ITerminalService API for SSH
* Intel Corporation - [329654] Make all sub services operate against TCF connector service
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.rse;
+package org.eclipse.tcf.internal.rse;
/**
* Markup Interface for services using the TCFConnectorService.
@@ -22,4 +22,4 @@ package org.eclipse.tm.internal.tcf.rse;
* service when needed.
*/
public interface ITCFService {
-} \ No newline at end of file
+}
diff --git a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/ITCFSessionProvider.java b/plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/ITCFSessionProvider.java
index a39e892c2..d115a1897 100644
--- a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/ITCFSessionProvider.java
+++ b/plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/ITCFSessionProvider.java
@@ -9,10 +9,9 @@
* Intel Corporation - initial API and implementation
******************************************************************************/
-package org.eclipse.tm.internal.tcf.rse;
+package org.eclipse.tcf.internal.rse;
-import org.eclipse.rse.services.files.RemoteFileException;
-import org.eclipse.tm.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IChannel;
public interface ITCFSessionProvider {
public static final int ERROR_CODE = 100; // filed error code
@@ -24,6 +23,7 @@ public interface ITCFSessionProvider {
public String getSessionUserId();
public String getSessionPassword();
public String getSessionHostName();
- public boolean isSubscribed();
- public void subscribe() throws RemoteFileException;
+ public void onStreamsConnecting();
+ public void onStreamsID(String id);
+ public void onStreamsConnected();
}
diff --git a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/ITCFSubSystem.java b/plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/ITCFSubSystem.java
index 30bc23f90..8930ecd70 100644
--- a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/ITCFSubSystem.java
+++ b/plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/ITCFSubSystem.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.rse;
+package org.eclipse.tcf.internal.rse;
import org.eclipse.rse.core.subsystems.ISubSystem;
diff --git a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/Messages.java b/plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/Messages.java
index 2ea0c0645..532562d42 100644
--- a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/Messages.java
+++ b/plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/Messages.java
@@ -10,7 +10,7 @@
* Intel Corp. - Add TCF Connection Descriptions and File System Style
* Liping Ke(Intel Corp.) - Add TCF Terminal/Shell Services Descriptions
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.rse;
+package org.eclipse.tcf.internal.rse;
import org.eclipse.osgi.util.NLS;
diff --git a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/Messages.properties b/plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/Messages.properties
index fee3cc5f4..fee3cc5f4 100644
--- a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/Messages.properties
+++ b/plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/Messages.properties
diff --git a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/TCFConnectorService.java b/plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/TCFConnectorService.java
index 905ca1563..e49cb0294 100644
--- a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/TCFConnectorService.java
+++ b/plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/TCFConnectorService.java
@@ -8,16 +8,16 @@
* Contributors:
* Wind River Systems - initial API and implementation
* Martin Oberhuber (Wind River) - [269682] Get port from RSE Property
- * Uwe Stieber (Wind River) - [271227] Fix compiler warnings in org.eclipse.tm.tcf.rse
+ * Uwe Stieber (Wind River) - [271227] Fix compiler warnings in org.eclipse.tcf.rse
* Anna Dushistova (MontaVista) - [285373] TCFConnectorService should send CommunicationsEvent.BEFORE_CONNECT and CommunicationsEvent.BEFORE_DISCONNECT
* Liping Ke (Intel Corp.)- [326490] Add authentication to the TCF Connector Service and attach stream subs/unsubs method
* Jeff Johnston (RedHat) - [350752] TCFConnectorService doesn't recognize connections with SSL transport
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.rse;
+package org.eclipse.tcf.internal.rse;
-import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
+import java.util.HashSet;
import java.util.List;
import java.util.Map;
@@ -29,23 +29,23 @@ import org.eclipse.rse.core.model.SystemSignonInformation;
import org.eclipse.rse.core.subsystems.CommunicationsEvent;
import org.eclipse.rse.services.files.RemoteFileException;
import org.eclipse.rse.ui.subsystems.StandardConnectorService;
-import org.eclipse.tm.tcf.core.AbstractPeer;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IPeer;
-import org.eclipse.tm.tcf.protocol.IService;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.tcf.services.IFileSystem;
-import org.eclipse.tm.tcf.services.ILocator;
-import org.eclipse.tm.tcf.services.IStreams;
-import org.eclipse.tm.tcf.services.ISysMonitor;
-import org.eclipse.tm.tcf.services.ITerminals;
-import org.eclipse.tm.tcf.util.TCFTask;
+import org.eclipse.tcf.core.TransientPeer;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.protocol.IService;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.services.IFileSystem;
+import org.eclipse.tcf.services.ILocator;
+import org.eclipse.tcf.services.IStreams;
+import org.eclipse.tcf.services.ISysMonitor;
+import org.eclipse.tcf.services.ITerminals;
public class TCFConnectorService extends StandardConnectorService implements ITCFSessionProvider{
public static final String PROPERTY_SET_NAME = "TCF Connection Settings"; //$NON-NLS-1$
+ public static final String PROPERTY_TRANSPORT_NAME = "Transport.Name"; //$NON-NLS-1$
public static final String PROPERTY_LOGIN_REQUIRED = "Login.Required"; //$NON-NLS-1$
public static final String PROPERTY_PWD_REQUIRED="Pwd.Required"; //$NON-NLS-1$
public static final String PROPERTY_LOGIN_PROMPT = "Login.Prompt"; //$NON-NLS-1$
@@ -58,30 +58,33 @@ public class TCFConnectorService extends StandardConnectorService implements ITC
private boolean poll_timer_started;
- private boolean bSubscribed = false;
+ private boolean streams_subscribed = false;
+ private boolean streams_connecting = false;
+ private final HashSet<String> stream_ids = new HashSet<String>();
/* subscribe the stream service on this TCP connection */
- private IStreams.StreamsListener streamListener = new IStreams.StreamsListener() {
- public void created(String stream_type, String stream_id,
- String context_id) {
+ private final IStreams.StreamsListener streams_listener = new IStreams.StreamsListener() {
+ public void created(String stream_type, String stream_id, String context_id) {
+ if (streams_connecting) {
+ stream_ids.add(stream_id);
+ }
+ else {
+ getService(IStreams.class).disconnect(stream_id, new IStreams.DoneDisconnect() {
+ public void doneDisconnect(IToken token, Exception error) {
+ if (error != null) channel.terminate(error);
+ }
+ });
+ }
}
- /**
- * Called when a stream is disposed.
- *
- * @param stream_type
- * - source type of the stream.
- * @param stream_id
- * - ID of the stream.
- */
+
public void disposed(String stream_type, String stream_id) {
+ stream_ids.remove(stream_id);
}
};
public TCFConnectorService(IHost host, int port) {
- super(Messages.TCFConnectorService_Name,
- Messages.TCFConnectorService_Description, host,
- port);
+ super(Messages.TCFConnectorService_Name, Messages.TCFConnectorService_Description, host, port);
getTCFPropertySet();
}
@@ -90,6 +93,7 @@ public class TCFConnectorService extends StandardConnectorService implements ITC
if (tcfSet == null) {
tcfSet = createPropertySet(PROPERTY_SET_NAME, Messages.PropertySet_Description);
//add default values if not set
+ tcfSet.addProperty(PROPERTY_TRANSPORT_NAME, "TCP", PropertyType.getEnumPropertyType(new String[] {"TCP", "SSL"})); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
tcfSet.addProperty(PROPERTY_LOGIN_REQUIRED, "false", PropertyType.getEnumPropertyType(new String[] {"true", "false"})); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
tcfSet.addProperty(PROPERTY_PWD_REQUIRED, "false", PropertyType.getEnumPropertyType(new String[] {"true", "false"})); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
tcfSet.addProperty(PROPERTY_LOGIN_PROMPT, "ogin: ", PropertyType.getStringPropertyType()); //$NON-NLS-1$
@@ -102,7 +106,6 @@ public class TCFConnectorService extends StandardConnectorService implements ITC
/**
* @return true if the associated connector service requires a password.
*/
-
public final boolean requiresPassword() {
return false;
}
@@ -117,8 +120,17 @@ public class TCFConnectorService extends StandardConnectorService implements ITC
synchronized (res) {
Protocol.invokeLater(new Runnable() {
public void run() {
- if (!connectTCFChannel(res, monitor))
- add_to_wait_list(this);
+ try {
+ if (!connectTCFChannel(res, monitor))
+ add_to_wait_list(this);
+ }
+ catch (Throwable x) {
+ synchronized (res) {
+ if (x instanceof Exception) res[0] = (Exception)x;
+ else res[0] = new Exception(x);
+ res.notify();
+ }
+ }
}
});
res.wait();
@@ -128,16 +140,13 @@ public class TCFConnectorService extends StandardConnectorService implements ITC
}
@Override
- protected void internalDisconnect(final IProgressMonitor monitor)
- throws Exception {
+ protected void internalDisconnect(final IProgressMonitor monitor) throws Exception {
assert !Protocol.isDispatchThread();
final Exception[] res = new Exception[1];
// Fire comm event to signal state about to change
fireCommunicationsEvent(CommunicationsEvent.BEFORE_DISCONNECT);
monitor.beginTask("Disconnecting " + getHostName(), 1); //$NON-NLS-1$
try {
- /* First UnSubscribe TCP channel */
- unsubscribe();
/* Disconnecting TCP channel */
synchronized (res) {
Protocol.invokeLater(new Runnable() {
@@ -162,11 +171,16 @@ public class TCFConnectorService extends StandardConnectorService implements ITC
public boolean isConnected() {
final boolean res[] = new boolean[1];
- Protocol.invokeAndWait(new Runnable() {
- public void run() {
- res[0] = channel != null && channel.getState() == IChannel.STATE_OPEN;
- }
- });
+ try {
+ Protocol.invokeAndWait(new Runnable() {
+ public void run() {
+ res[0] = channel != null && channel.getState() == IChannel.STATE_OPEN;
+ }
+ });
+ }
+ catch (IllegalStateException e) {
+ res[0] = false;
+ }
return res[0];
}
@@ -220,11 +234,11 @@ public class TCFConnectorService extends StandardConnectorService implements ITC
}
IPeer peer = null;
String port_str = Integer.toString(port);
+ String transport = getTCFPropertySet().getPropertyValue(TCFConnectorService.PROPERTY_TRANSPORT_NAME);
ILocator locator = Protocol.getLocator();
for (IPeer p : locator.getPeers().values()) {
Map<String, String> attrs = p.getAttributes();
- if (("TCP".equals(attrs.get(IPeer.ATTR_TRANSPORT_NAME)) || //$NON-NLS-1$
- "SSL".equals(attrs.get(IPeer.ATTR_TRANSPORT_NAME)))&& //$NON-NLS-1$
+ if (transport.equals(attrs.get(IPeer.ATTR_TRANSPORT_NAME)) && //$NON-NLS-1$
host.equalsIgnoreCase(attrs.get(IPeer.ATTR_IP_HOST)) &&
port_str.equals(attrs.get(IPeer.ATTR_IP_PORT))) {
peer = p;
@@ -235,10 +249,10 @@ public class TCFConnectorService extends StandardConnectorService implements ITC
Map<String, String> attrs = new HashMap<String, String>();
attrs.put(IPeer.ATTR_ID, "RSE:" + host + ":" + port_str); //$NON-NLS-1$ //$NON-NLS-2$
attrs.put(IPeer.ATTR_NAME, getName());
- attrs.put(IPeer.ATTR_TRANSPORT_NAME, "TCP"); //$NON-NLS-1$
+ attrs.put(IPeer.ATTR_TRANSPORT_NAME, transport);
attrs.put(IPeer.ATTR_IP_HOST, host);
attrs.put(IPeer.ATTR_IP_PORT, port_str);
- peer = new AbstractPeer(attrs);
+ peer = new TransientPeer(attrs);
}
channel = peer.openChannel();
channel.addChannelListener(new IChannel.IChannelListener() {
@@ -261,9 +275,10 @@ public class TCFConnectorService extends StandardConnectorService implements ITC
else {
run_wait_list();
}
- bSubscribed = false;
channel = null;
channel_error = null;
+ streams_subscribed = false;
+ stream_ids.clear();
}
});
@@ -330,61 +345,33 @@ public class TCFConnectorService extends StandardConnectorService implements ITC
return password;
}
- public boolean isSubscribed() {
- return bSubscribed;
- }
-
- public void unsubscribe() throws IOException {
- if (bSubscribed) {
- new TCFTask<Object>() {
- public void run() {
- IStreams streams = getService(IStreams.class);
- streams.unsubscribe(ITerminals.NAME, streamListener,
- new IStreams.DoneUnsubscribe() {
- public void doneUnsubscribe(IToken token,
- Exception error) {
- done(this);
- }
- });
- }
- }.getIO();
- bSubscribed = false;
+ public void onStreamsConnecting() {
+ if (!streams_subscribed) {
+ streams_subscribed = true;
+ IStreams streams = getService(IStreams.class);
+ if (streams != null) {
+ streams.subscribe(ITerminals.NAME, streams_listener, new IStreams.DoneSubscribe() {
+ public void doneSubscribe(IToken token, Exception error) {
+ if (error != null) channel.terminate(error);
+ }
+ });
+ }
}
-
+ streams_connecting = true;
}
- public void subscribe() throws RemoteFileException {
- try {
- new TCFTask<Object>() {
- public void run() {
- if (bSubscribed) {
- done(this);
- }
- else {
- bSubscribed = true;
- IStreams streams = getService(IStreams.class);
- streams.subscribe(ITerminals.NAME, streamListener,
- new IStreams.DoneSubscribe() {
- public void doneSubscribe(IToken token,
- Exception error) {
- if (error != null) {
- bSubscribed = false;
- error(error);
- }
- else
- done(this);
- }
-
- });
- }}
- }.getIO();
+ public void onStreamsID(String id) {
+ stream_ids.remove(id);
+ }
+ public void onStreamsConnected() {
+ streams_connecting = false;
+ for (String id : stream_ids) {
+ getService(IStreams.class).disconnect(id, new IStreams.DoneDisconnect() {
+ public void doneDisconnect(IToken token, Exception error) {
+ if (error != null) channel.terminate(error);
+ }
+ });
}
- catch (Exception e) {
- e.printStackTrace();//$NON-NLS-1$
- throw new RemoteFileException(
- "Error When Subscribe Terminal streams!", e); //$NON-NLS-1$
- }
-
}
}
diff --git a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/TCFConnectorServiceManager.java b/plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/TCFConnectorServiceManager.java
index 25b423710..28e3e0409 100644
--- a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/TCFConnectorServiceManager.java
+++ b/plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/TCFConnectorServiceManager.java
@@ -7,9 +7,9 @@
*
* Contributors:
* Wind River Systems - initial API and implementation
- * Uwe Stieber (Wind River) - [271227] Fix compiler warnings in org.eclipse.tm.tcf.rse
+ * Uwe Stieber (Wind River) - [271227] Fix compiler warnings in org.eclipse.tcf.rse
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.rse;
+package org.eclipse.tcf.internal.rse;
import org.eclipse.rse.core.model.IHost;
import org.eclipse.rse.core.subsystems.AbstractConnectorServiceManager;
diff --git a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/TCFRSETask.java b/plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/TCFRSETask.java
index 4d5e5e154..c25ee0f5a 100644
--- a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/TCFRSETask.java
+++ b/plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/TCFRSETask.java
@@ -8,10 +8,10 @@
* Contributors:
* Wind River Systems - initial API and implementation
* Martin Oberhuber (Wind River) - [238564] Adopt TM 3.0 APIs
- * Uwe Stieber (Wind River) - [271227] Fix compiler warnings in org.eclipse.tm.tcf.rse
+ * Uwe Stieber (Wind River) - [271227] Fix compiler warnings in org.eclipse.tcf.rse
* Uwe Stieber (Wind River) - [273572] SystemMessage contains exception class name instead of error message
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.rse;
+package org.eclipse.tcf.internal.rse;
import java.lang.reflect.InvocationTargetException;
import java.util.concurrent.ExecutionException;
@@ -19,7 +19,7 @@ import java.util.concurrent.ExecutionException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.tm.tcf.util.TCFTask;
+import org.eclipse.tcf.util.TCFTask;
public abstract class TCFRSETask<V> extends TCFTask<V> {
diff --git a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/files/TCFFileAdapter.java b/plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/files/TCFFileAdapter.java
index 7e35849b1..6865c43c8 100644
--- a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/files/TCFFileAdapter.java
+++ b/plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/files/TCFFileAdapter.java
@@ -9,7 +9,7 @@
* Wind River Systems - initial API and implementation
* Martin Oberhuber (Wind River) - [238564] Adopt TM 3.0 APIs
******************************************************************************/
-package org.eclipse.tm.internal.tcf.rse.files;
+package org.eclipse.tcf.internal.rse.files;
import org.eclipse.rse.services.files.IHostFile;
import org.eclipse.rse.subsystems.files.core.servicesubsystem.AbstractRemoteFile;
diff --git a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/files/TCFFileResource.java b/plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/files/TCFFileResource.java
index 81a536172..ca670d79b 100644
--- a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/files/TCFFileResource.java
+++ b/plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/files/TCFFileResource.java
@@ -8,16 +8,16 @@
* Contributors:
* Wind River Systems - initial API and implementation
* Anna Dushistova (MontaVista) - [247164][tcf] a lot of file/directory properties are not supported
- * Uwe Stieber (Wind River) - [271227] Fix compiler warnings in org.eclipse.tm.tcf.rse
+ * Uwe Stieber (Wind River) - [271227] Fix compiler warnings in org.eclipse.tcf.rse
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.rse.files;
+package org.eclipse.tcf.internal.rse.files;
import org.eclipse.rse.core.subsystems.AbstractResource;
import org.eclipse.rse.services.files.HostFilePermissions;
import org.eclipse.rse.services.files.IHostFile;
import org.eclipse.rse.services.files.IHostFilePermissions;
import org.eclipse.rse.services.files.IHostFilePermissionsContainer;
-import org.eclipse.tm.tcf.services.IFileSystem;
+import org.eclipse.tcf.services.IFileSystem;
public class TCFFileResource extends AbstractResource implements IHostFile, IHostFilePermissionsContainer{
diff --git a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/files/TCFFileService.java b/plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/files/TCFFileService.java
index afaab224b..c16ba6108 100644
--- a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/files/TCFFileService.java
+++ b/plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/files/TCFFileService.java
@@ -9,12 +9,12 @@
* Wind River Systems - initial API and implementation
* Martin Oberhuber (Wind River) - [238564] Adopt TM 3.0 APIs
* Uwe Stieber (Wind River) - [271224] NPE in TCFFileService#download
- * Uwe Stieber (Wind River) - [271227] Fix compiler warnings in org.eclipse.tm.tcf.rse
+ * Uwe Stieber (Wind River) - [271227] Fix compiler warnings in org.eclipse.tcf.rse
* Uwe Stieber (Wind River) - [274277] The TCF file service subsystem implementation is not updating the progress monitor
* Intel Corporation - [326489] Make recursive copy/delete available (delete/copy a folder contains files)
* Intel Corporation - [329654] Make all sub services operate against TCF connector service
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.rse.files;
+package org.eclipse.tcf.internal.rse.files;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
@@ -44,21 +44,21 @@ import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
import org.eclipse.rse.services.clientserver.messages.SystemOperationFailedException;
import org.eclipse.rse.services.files.AbstractFileService;
import org.eclipse.rse.services.files.IHostFile;
-import org.eclipse.tm.internal.tcf.rse.Activator;
-import org.eclipse.tm.internal.tcf.rse.ITCFService;
-import org.eclipse.tm.internal.tcf.rse.Messages;
-import org.eclipse.tm.internal.tcf.rse.TCFConnectorService;
-import org.eclipse.tm.internal.tcf.rse.TCFConnectorServiceManager;
-import org.eclipse.tm.internal.tcf.rse.TCFRSETask;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.tcf.services.IFileSystem;
-import org.eclipse.tm.tcf.services.IFileSystem.DirEntry;
-import org.eclipse.tm.tcf.services.IFileSystem.FileAttrs;
-import org.eclipse.tm.tcf.services.IFileSystem.FileSystemException;
-import org.eclipse.tm.tcf.services.IFileSystem.IFileHandle;
-import org.eclipse.tm.tcf.util.TCFFileInputStream;
-import org.eclipse.tm.tcf.util.TCFFileOutputStream;
+import org.eclipse.tcf.internal.rse.Activator;
+import org.eclipse.tcf.internal.rse.ITCFService;
+import org.eclipse.tcf.internal.rse.Messages;
+import org.eclipse.tcf.internal.rse.TCFConnectorService;
+import org.eclipse.tcf.internal.rse.TCFConnectorServiceManager;
+import org.eclipse.tcf.internal.rse.TCFRSETask;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.services.IFileSystem;
+import org.eclipse.tcf.services.IFileSystem.DirEntry;
+import org.eclipse.tcf.services.IFileSystem.FileAttrs;
+import org.eclipse.tcf.services.IFileSystem.FileSystemException;
+import org.eclipse.tcf.services.IFileSystem.IFileHandle;
+import org.eclipse.tcf.util.TCFFileInputStream;
+import org.eclipse.tcf.util.TCFFileOutputStream;
public class TCFFileService extends AbstractFileService {
diff --git a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/files/TCFFileSubSystemConfiguration.java b/plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/files/TCFFileSubSystemConfiguration.java
index 79e1dd48d..16d0a8c8f 100644
--- a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/files/TCFFileSubSystemConfiguration.java
+++ b/plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/files/TCFFileSubSystemConfiguration.java
@@ -7,11 +7,11 @@
*
* Contributors:
* Wind River Systems - initial API and implementation
- * Uwe Stieber (Wind River) - [271227] Fix compiler warnings in org.eclipse.tm.tcf.rse
+ * Uwe Stieber (Wind River) - [271227] Fix compiler warnings in org.eclipse.tcf.rse
* Intel Corp. - Add Unix File System style detection, set TRUE by default
* Intel Corporation - [329654] Make all sub services operate against TCF connector service
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.rse.files;
+package org.eclipse.tcf.internal.rse.files;
import java.util.Vector;
@@ -33,10 +33,10 @@ import org.eclipse.rse.subsystems.files.core.servicesubsystem.FileServiceSubSyst
import org.eclipse.rse.subsystems.files.core.subsystems.IHostFileToRemoteFileAdapter;
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
import org.eclipse.rse.ui.SystemBasePlugin;
-import org.eclipse.tm.internal.tcf.rse.ITCFService;
-import org.eclipse.tm.internal.tcf.rse.Messages;
-import org.eclipse.tm.internal.tcf.rse.TCFConnectorService;
-import org.eclipse.tm.internal.tcf.rse.TCFConnectorServiceManager;
+import org.eclipse.tcf.internal.rse.ITCFService;
+import org.eclipse.tcf.internal.rse.Messages;
+import org.eclipse.tcf.internal.rse.TCFConnectorService;
+import org.eclipse.tcf.internal.rse.TCFConnectorServiceManager;
public class TCFFileSubSystemConfiguration extends FileServiceSubSystemConfiguration {
diff --git a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/files/TCFRemoteFile.java b/plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/files/TCFRemoteFile.java
index 1be7f12f1..c9018d562 100644
--- a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/files/TCFRemoteFile.java
+++ b/plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/files/TCFRemoteFile.java
@@ -8,9 +8,9 @@
* Contributors:
* Wind River Systems - initial API and implementation
* Anna Dushistova (MontaVista) - [247164][tcf] a lot of file/directory properties are not supported
- * Uwe Stieber (Wind River) - [271227] Fix compiler warnings in org.eclipse.tm.tcf.rse
+ * Uwe Stieber (Wind River) - [271227] Fix compiler warnings in org.eclipse.tcf.rse
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.rse.files;
+package org.eclipse.tcf.internal.rse.files;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
diff --git a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/processes/TCFProcessAdapter.java b/plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/processes/TCFProcessAdapter.java
index 7f43ddfc6..2d27a25a6 100644
--- a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/processes/TCFProcessAdapter.java
+++ b/plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/processes/TCFProcessAdapter.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.rse.processes;
+package org.eclipse.tcf.internal.rse.processes;
import java.util.ArrayList;
import java.util.List;
diff --git a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/processes/TCFProcessResource.java b/plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/processes/TCFProcessResource.java
index 4fad1b6cd..878b73ad7 100644
--- a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/processes/TCFProcessResource.java
+++ b/plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/processes/TCFProcessResource.java
@@ -8,9 +8,9 @@
* Contributors:
* Wind River Systems - initial API and implementation
* Anna Dushistova (MontaVista) - [246996] [tcf] NullPointerException when trying to copy the process
- * Uwe Stieber (Wind River) - [271227] Fix compiler warnings in org.eclipse.tm.tcf.rse
+ * Uwe Stieber (Wind River) - [271227] Fix compiler warnings in org.eclipse.tcf.rse
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.rse.processes;
+package org.eclipse.tcf.internal.rse.processes;
import java.math.BigInteger;
import java.util.ArrayList;
@@ -24,10 +24,10 @@ import org.eclipse.rse.core.subsystems.AbstractResource;
import org.eclipse.rse.services.clientserver.IServiceConstants;
import org.eclipse.rse.services.clientserver.processes.IHostProcess;
import org.eclipse.rse.services.clientserver.processes.ISystemProcessRemoteConstants;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.tcf.services.ISysMonitor;
-import org.eclipse.tm.tcf.services.ISysMonitor.SysMonitorContext;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.services.ISysMonitor;
+import org.eclipse.tcf.services.ISysMonitor.SysMonitorContext;
public class TCFProcessResource extends AbstractResource implements IHostProcess {
diff --git a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/processes/TCFProcessService.java b/plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/processes/TCFProcessService.java
index 82f1bc622..de27d4c3a 100644
--- a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/processes/TCFProcessService.java
+++ b/plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/processes/TCFProcessService.java
@@ -8,10 +8,10 @@
* Contributors:
* Wind River Systems - initial API and implementation
* Martin Oberhuber (Wind River) - [238564] Adopt TM 3.0 APIs
- * Uwe Stieber (Wind River) - [271227] Fix compiler warnings in org.eclipse.tm.tcf.rse
+ * Uwe Stieber (Wind River) - [271227] Fix compiler warnings in org.eclipse.tcf.rse
* Intel Corporation - [329654] Make all sub services operate against TCF connector service
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.rse.processes;
+package org.eclipse.tcf.internal.rse.processes;
import java.io.IOException;
import java.util.ArrayList;
@@ -31,12 +31,12 @@ import org.eclipse.rse.services.clientserver.processes.IHostProcessFilter;
import org.eclipse.rse.services.clientserver.processes.ISystemProcessRemoteConstants;
import org.eclipse.rse.services.processes.AbstractProcessService;
import org.eclipse.rse.services.processes.IProcessService;
-import org.eclipse.tm.internal.tcf.rse.ITCFService;
-import org.eclipse.tm.internal.tcf.rse.TCFConnectorService;
-import org.eclipse.tm.internal.tcf.rse.TCFConnectorServiceManager;
-import org.eclipse.tm.internal.tcf.rse.TCFRSETask;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.services.IProcesses;
+import org.eclipse.tcf.internal.rse.ITCFService;
+import org.eclipse.tcf.internal.rse.TCFConnectorService;
+import org.eclipse.tcf.internal.rse.TCFConnectorServiceManager;
+import org.eclipse.tcf.internal.rse.TCFRSETask;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.services.IProcesses;
public class TCFProcessService extends AbstractProcessService implements IProcessService {
diff --git a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/processes/TCFProcessSubSystemConfiguration.java b/plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/processes/TCFProcessSubSystemConfiguration.java
index cd8698c0f..b472752cd 100644
--- a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/processes/TCFProcessSubSystemConfiguration.java
+++ b/plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/processes/TCFProcessSubSystemConfiguration.java
@@ -7,10 +7,10 @@
*
* Contributors:
* Wind River Systems - initial API and implementation
- * Uwe Stieber (Wind River) - [271227] Fix compiler warnings in org.eclipse.tm.tcf.rse
+ * Uwe Stieber (Wind River) - [271227] Fix compiler warnings in org.eclipse.tcf.rse
* Intel Corporation - [329654] Make all sub services operate against TCF connector service
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.rse.processes;
+package org.eclipse.tcf.internal.rse.processes;
import org.eclipse.rse.core.model.IHost;
import org.eclipse.rse.core.subsystems.IConnectorService;
@@ -19,9 +19,9 @@ import org.eclipse.rse.services.processes.IProcessService;
import org.eclipse.rse.subsystems.processes.core.subsystem.IHostProcessToRemoteProcessAdapter;
import org.eclipse.rse.subsystems.processes.servicesubsystem.ProcessServiceSubSystem;
import org.eclipse.rse.subsystems.processes.servicesubsystem.ProcessServiceSubSystemConfiguration;
-import org.eclipse.tm.internal.tcf.rse.ITCFService;
-import org.eclipse.tm.internal.tcf.rse.TCFConnectorService;
-import org.eclipse.tm.internal.tcf.rse.TCFConnectorServiceManager;
+import org.eclipse.tcf.internal.rse.ITCFService;
+import org.eclipse.tcf.internal.rse.TCFConnectorService;
+import org.eclipse.tcf.internal.rse.TCFConnectorServiceManager;
public class TCFProcessSubSystemConfiguration extends ProcessServiceSubSystemConfiguration {
diff --git a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/processes/TCFRemoteProcess.java b/plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/processes/TCFRemoteProcess.java
index 26b10dac0..a3ca85d9d 100644
--- a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/processes/TCFRemoteProcess.java
+++ b/plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/processes/TCFRemoteProcess.java
@@ -7,9 +7,9 @@
*
* Contributors:
* Wind River Systems - initial API and implementation
- * Uwe Stieber (Wind River) - [271227] Fix compiler warnings in org.eclipse.tm.tcf.rse
+ * Uwe Stieber (Wind River) - [271227] Fix compiler warnings in org.eclipse.tcf.rse
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.rse.processes;
+package org.eclipse.tcf.internal.rse.processes;
import java.util.Map;
diff --git a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/processes/TCFSystemViewProcessAdapterFactory.java b/plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/processes/TCFSystemViewProcessAdapterFactory.java
index 7a9b1771a..ca5062a1c 100644
--- a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/processes/TCFSystemViewProcessAdapterFactory.java
+++ b/plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/processes/TCFSystemViewProcessAdapterFactory.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.rse.processes;
+package org.eclipse.tcf.internal.rse.processes;
import org.eclipse.core.runtime.IAdapterFactory;
import org.eclipse.rse.core.subsystems.IRemoteObjectIdentifier;
diff --git a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/processes/TCFSystemViewRemoteProcessAdapter.java b/plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/processes/TCFSystemViewRemoteProcessAdapter.java
index cf14e0018..7a6c0f411 100644
--- a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/processes/TCFSystemViewRemoteProcessAdapter.java
+++ b/plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/processes/TCFSystemViewRemoteProcessAdapter.java
@@ -7,9 +7,9 @@
*
* Contributors:
* Wind River Systems - initial API and implementation
- * Uwe Stieber (Wind River) - [271227] Fix compiler warnings in org.eclipse.tm.tcf.rse
+ * Uwe Stieber (Wind River) - [271227] Fix compiler warnings in org.eclipse.tcf.rse
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.rse.processes;
+package org.eclipse.tcf.internal.rse.processes;
import java.math.BigInteger;
import java.text.NumberFormat;
@@ -45,9 +45,9 @@ import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
import org.eclipse.swt.dnd.Clipboard;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.tm.internal.tcf.rse.Activator;
-import org.eclipse.tm.internal.tcf.rse.Messages;
-import org.eclipse.tm.tcf.services.ISysMonitor;
+import org.eclipse.tcf.internal.rse.Activator;
+import org.eclipse.tcf.internal.rse.Messages;
+import org.eclipse.tcf.services.ISysMonitor;
import org.eclipse.ui.views.properties.IPropertyDescriptor;
diff --git a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/shells/TCFServiceCommandShell.java b/plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/shells/TCFServiceCommandShell.java
index f7c55c77d..afe05f922 100644
--- a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/shells/TCFServiceCommandShell.java
+++ b/plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/shells/TCFServiceCommandShell.java
@@ -20,7 +20,7 @@
* Liping Ke (Intel Corp.)- Adapted from org.eclipse.rse.internal.subsystems.shells.ssh.SshServiceCommandShell
* Liping Ke (Intel Corp.)- [246987] Implement TCF Shell/terminal services
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.rse.shells;
+package org.eclipse.tcf.internal.rse.shells;
import java.util.ArrayList;
import java.util.StringTokenizer;
@@ -202,5 +202,4 @@ public class TCFServiceCommandShell extends ServiceCommandShell {
super.writeToShell(cmd);
}
-
}
diff --git a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/shells/TCFShellSubSystemConfiguration.java b/plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/shells/TCFShellSubSystemConfiguration.java
index 46b5902d1..d9301512b 100644
--- a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/shells/TCFShellSubSystemConfiguration.java
+++ b/plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/shells/TCFShellSubSystemConfiguration.java
@@ -17,7 +17,7 @@
* Liping Ke (Intel Corp.)- Adapted from org.eclipse.rse.subsystems.shells.ssh.SshShellSubSystemConfiguration
* Liping Ke (Intel Corp.)- [246987] Implement TCF Shell/terminal services
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.rse.shells;
+package org.eclipse.tcf.internal.rse.shells;
import org.eclipse.rse.core.model.IHost;
import org.eclipse.rse.core.subsystems.IConnectorService;
@@ -28,12 +28,11 @@ import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCmdSubSystem;
import org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem.IServiceCommandShell;
import org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem.ShellServiceSubSystem;
import org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem.ShellServiceSubSystemConfiguration;
-import org.eclipse.tm.internal.tcf.rse.*;
-import org.eclipse.tm.internal.tcf.rse.terminals.TCFTerminalService;
+import org.eclipse.tcf.internal.rse.*;
+import org.eclipse.tcf.internal.rse.terminals.TCFTerminalService;
-public class TCFShellSubSystemConfiguration extends
- ShellServiceSubSystemConfiguration {
+public class TCFShellSubSystemConfiguration extends ShellServiceSubSystemConfiguration {
public TCFShellSubSystemConfiguration() {
super();
@@ -44,25 +43,22 @@ public class TCFShellSubSystemConfiguration extends
* Do not populate it yet though!
* @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#createSubSystemInternal(IHost)
*/
- public ISubSystem createSubSystemInternal(IHost host)
- {
- TCFConnectorService connectorService = (TCFConnectorService)getConnectorService(host);
- ISubSystem subsys = new ShellServiceSubSystem(host, connectorService, createShellService(host));
- return subsys;
+ public ISubSystem createSubSystemInternal(IHost host) {
+ TCFConnectorService connectorService = (TCFConnectorService)getConnectorService(host);
+ ISubSystem subsys = new ShellServiceSubSystem(host, connectorService, createShellService(host));
+ return subsys;
}
public IConnectorService getConnectorService(IHost host) {
return TCFConnectorServiceManager.getInstance().getConnectorService(host, getServiceImplType());
-}
+ }
- public void setConnectorService(IHost host,
- IConnectorService connectorService) {
+ public void setConnectorService(IHost host, IConnectorService connectorService) {
TCFConnectorServiceManager.getInstance().setConnectorService(host, getServiceImplType(), connectorService);
}
- public Class<ITCFService> getServiceImplType()
- {
- return ITCFService.class;
+ public Class<ITCFService> getServiceImplType() {
+ return ITCFService.class;
}
public IServiceCommandShell createRemoteCommandShell(IRemoteCmdSubSystem cmdSS, IHostShell hostShell) {
@@ -71,9 +67,6 @@ public class TCFShellSubSystemConfiguration extends
public IShellService createShellService(IHost host) {
TCFConnectorService cserv = (TCFConnectorService)getConnectorService(host);
-
return (IShellService) (new TCFTerminalService(cserv)).getAdapter(IShellService.class);
}
-
-
}
diff --git a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/shells/TCFTerminalInputStream.java b/plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/shells/TCFTerminalInputStream.java
index 2c7d44e18..a38703cf3 100644
--- a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/shells/TCFTerminalInputStream.java
+++ b/plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/shells/TCFTerminalInputStream.java
@@ -8,25 +8,25 @@
* Contributors:
* Liping Ke (Intel Corp.) - initial API and implementation
******************************************************************************/
-package org.eclipse.tm.internal.tcf.rse.shells;
+package org.eclipse.tcf.internal.rse.shells;
import java.io.IOException;
import java.io.InputStream;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.services.IStreams;
-import org.eclipse.tm.tcf.util.TCFTask;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.services.IStreams;
+import org.eclipse.tcf.util.TCFTask;
public class TCFTerminalInputStream extends InputStream {
- private IStreams streams;
- private boolean connected = true;;/* The stream is connected or not */
- String is_id;
- private int value;
+ private final TCFTerminalShell terminal;
+ private final IStreams streams;
+ private final String is_id;
+ private boolean connected = true; /* The stream is connected or not */
private boolean bEof = false;;
- public TCFTerminalInputStream(final IStreams streams, final String is_id) throws IOException{
- if (streams == null)
- throw new IOException("TCP streams is null");//$NON-NLS-1$
+ public TCFTerminalInputStream(TCFTerminalShell terminal, IStreams streams, String is_id) throws IOException{
+ if (streams == null) throw new IOException("TCP streams is null");//$NON-NLS-1$
+ this.terminal = terminal;
this.streams = streams;
this.is_id = is_id;
}
@@ -34,12 +34,10 @@ public class TCFTerminalInputStream extends InputStream {
/* read must be synchronized */
@Override
public synchronized int read() throws IOException {
- if (!connected)
- throw new IOException("istream is not connected");//$NON-NLS-1$
- if (bEof)
- return -1;
+ if (!connected) throw new IOException("istream is not connected");//$NON-NLS-1$
+ if (bEof) return -1;
try {
- new TCFTask<Object>() {
+ return new TCFTask<Integer>() {
public void run() {
streams.read(is_id, 1, new IStreams.DoneRead() {
public void doneRead(IToken token, Exception error, int lostSize,
@@ -50,45 +48,30 @@ public class TCFTerminalInputStream extends InputStream {
}
bEof = eos;
if (data != null) {
- value = (int)data[0];
+ done(data[0] & 0xff);
+ }
+ else {
+ done(-1);
}
- else
- value = -1;
- done(this);
}
});
}
}.getIO();
}
- catch (Exception e) {
- e.printStackTrace();//$NON-NLS-1$
- throw new IOException(e.getMessage());//$NON-NLS-1$
- }
- return value;
- }
-
- private static class Buffer {
- byte[] buf;
- Buffer() {
+ catch (IOException e) {
+ if (!connected) return -1;
+ throw e;
}
}
- private Buffer buffer;
public synchronized int read(byte b[], final int off, final int len) throws IOException {
-
-
- if (!connected)
- throw new IOException("istream is not connected");//$NON-NLS-1$
+ if (!connected) throw new IOException("istream is not connected");//$NON-NLS-1$
if (bEof) return -1;
- if (b == null) {
- throw new NullPointerException();
- } else if (off < 0 || len < 0 || len > b.length - off) {
- throw new IndexOutOfBoundsException();
- } else if (len == 0) {
- return 0;
- }
+ if (b == null) throw new NullPointerException();
+ if (off < 0 || len < 0 || len > b.length - off) throw new IndexOutOfBoundsException();
+ if (len == 0) return 0;
try {
- new TCFTask<Buffer>() {
+ byte[] data = new TCFTask<byte[]>() {
public void run() {
streams.read(is_id, len, new IStreams.DoneRead() {
public void doneRead(IToken token, Exception error, int lostSize,
@@ -98,43 +81,42 @@ public class TCFTerminalInputStream extends InputStream {
return;
}
bEof = eos;
- if (data != null) {
- buffer = new Buffer();
- buffer.buf = data;
-
- }
- done(buffer);
+ done(data);
}
});
}
}.getIO();
- if (buffer.buf != null) {
- int length = buffer.buf.length;
- System.arraycopy(buffer.buf, 0, b, off, length);
+ if (data != null) {
+ int length = data.length;
+ System.arraycopy(data, 0, b, off, length);
return length;
}
- else if (bEof)
- return -1;
- else return 0;
- } catch (Exception ee) {
- throw new IOException(ee.getMessage());//$NON-NLS-1$
+ if (bEof) return -1;
+ return 0;
+ }
+ catch (IOException e) {
+ if (!connected) return -1;
+ throw e;
}
}
public void close() throws IOException {
if (!connected) return;
+ connected = false;
new TCFTask<Object>() {
public void run() {
streams.disconnect(is_id, new IStreams.DoneDisconnect() {
public void doneDisconnect(IToken token, Exception error) {
- connected = false;
+ if (error != null) {
+ error(error);
+ return;
+ }
+ terminal.onInputStreamClosed();
done(this);
}
});
}
}.getIO();
- connected = false;
}
-
}
diff --git a/plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/shells/TCFTerminalOutputStream.java b/plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/shells/TCFTerminalOutputStream.java
new file mode 100644
index 000000000..0680467f1
--- /dev/null
+++ b/plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/shells/TCFTerminalOutputStream.java
@@ -0,0 +1,84 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Intel 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:
+ * Liping Ke (Intel Corp.) - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.tcf.internal.rse.shells;
+
+import java.io.IOException;
+
+import java.io.OutputStream;
+
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.services.IStreams;
+import org.eclipse.tcf.util.TCFTask;
+
+public class TCFTerminalOutputStream extends OutputStream {
+ private final TCFTerminalShell terminal;
+ private final IStreams streams;
+ private final String os_id;
+ private boolean connected = true;
+
+ public TCFTerminalOutputStream(TCFTerminalShell terminal, IStreams streams, String os_id) throws IOException{
+ if (streams == null) throw new IOException("istream is null");//$NON-NLS-1$
+ this.terminal = terminal;
+ this.streams = streams;
+ this.os_id = os_id;
+ }
+
+ @Override
+ public synchronized void write(final byte b[], final int off, final int len) throws IOException {
+ /* If eof is written, we can't write anything into the stream */
+ if (!connected) throw new IOException("stream is not connected!");//$NON-NLS-1$
+ new TCFTask<Object>() {
+ public void run() {
+ streams.write(os_id, b, off, len, new IStreams.DoneWrite() {
+ public void doneWrite(IToken token, Exception error) {
+ if (error != null) error(error);
+ else done(this);
+ }
+ });
+ }
+ }.getIO();
+ }
+
+ @Override
+ public synchronized void write(int b) throws IOException {
+ byte[] buf = new byte[1];
+ buf[0] = (byte)b;
+ write(buf, 0, 1);
+ }
+
+ /* close must be called --Need to reconsider it in the future*/
+ public void close() throws IOException {
+ if (!connected) return;
+ connected = false;
+ new TCFTask<Object>() {
+ public void run() {
+ streams.eos(os_id, new IStreams.DoneEOS() {
+ public void doneEOS(IToken token, Exception error) {
+ if (error != null) {
+ error(error);
+ return;
+ }
+ streams.disconnect(os_id, new IStreams.DoneDisconnect() {
+ public void doneDisconnect(IToken token, Exception error) {
+ if (error != null) {
+ error(error);
+ return;
+ }
+ terminal.onOutputStreamClosed();
+ done(this);
+ }
+ });
+ }
+ });
+ }
+ }.getIO();
+ }
+}
diff --git a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/shells/TCFTerminalShell.java b/plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/shells/TCFTerminalShell.java
index f180dd7a5..039eaeef7 100644
--- a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/shells/TCFTerminalShell.java
+++ b/plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/shells/TCFTerminalShell.java
@@ -11,15 +11,16 @@
* Sheldon D'souza (Celunite) - LoginThread and readUntil implementation
* Liping Ke (Intel Corp.) - For non-login mode, we don't need detect command prompt
******************************************************************************/
-package org.eclipse.tm.internal.tcf.rse.shells;
+package org.eclipse.tcf.internal.rse.shells;
import java.io.BufferedWriter;
+import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
+import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.Writer;
-import java.util.Map;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.rse.core.model.IPropertySet;
@@ -32,14 +33,14 @@ import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
import org.eclipse.rse.services.terminals.AbstractTerminalShell;
import org.eclipse.rse.services.terminals.ITerminalService;
import org.eclipse.rse.ui.SystemBasePlugin;
-import org.eclipse.tm.internal.tcf.rse.ITCFSessionProvider;
-import org.eclipse.tm.internal.tcf.rse.Messages;
-import org.eclipse.tm.internal.tcf.rse.TCFConnectorService;
-import org.eclipse.tm.internal.tcf.rse.TCFRSETask;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.services.IStreams;
-import org.eclipse.tm.tcf.services.ITerminals;
+import org.eclipse.tcf.internal.rse.ITCFSessionProvider;
+import org.eclipse.tcf.internal.rse.Messages;
+import org.eclipse.tcf.internal.rse.TCFConnectorService;
+import org.eclipse.tcf.internal.rse.TCFRSETask;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.services.IStreams;
+import org.eclipse.tcf.services.ITerminals;
public class TCFTerminalShell extends AbstractTerminalShell {
@@ -56,27 +57,26 @@ public class TCFTerminalShell extends AbstractTerminalShell {
private String fContextID;
private String in_id;
private String out_id;
- private boolean connected = false;
- private ITerminals terminal;
+ private boolean connected;
+ private boolean exited;
+ private ITerminals terminals;
+ private IStreams streams;
private int status;
private IPropertySet tcfPropertySet = null;
- private static String defaultEncoding = new java.io.InputStreamReader(new java.io.ByteArrayInputStream(new byte[0])).getEncoding();
+ private static String defaultEncoding = new InputStreamReader(new ByteArrayInputStream(new byte[0])).getEncoding();
private ITerminals.TerminalsListener listeners = new ITerminals.TerminalsListener(){
public void exited(String terminalId, int exitCode) {
-
- if(!terminalContext.getID().equals(terminalId))
- return;
- terminal.removeListener(listeners);
- TCFTerminalShell.this.connected = false;
+ if(!terminalContext.getID().equals(terminalId)) return;
+ terminals.removeListener(listeners);
+ connected = false;
+ exited = true;
}
- public void winSizeChanged(String terminalId, int newWidth,
- int newHeight) {
-
+ public void winSizeChanged(String terminalId, int newWidth, int newHeight) {
}
};
@@ -120,7 +120,8 @@ public class TCFTerminalShell extends AbstractTerminalShell {
status = readUntil(command_prompt,fInputStream);
write("\n"); //$NON-NLS-1$
}
- } else {
+ }
+ else {
status = ITCFSessionProvider.SUCCESS_CODE;
}
}
@@ -157,20 +158,19 @@ public class TCFTerminalShell extends AbstractTerminalShell {
public int getLoginStatus() {
return this.status;
}
-
}
public void write(String value) {
try {
fOutputStream.write(value.getBytes());
- } catch (Exception e) {
+ }
+ catch (Exception e) {
e.printStackTrace();
}
}
- private int login(String username, String password) throws InterruptedException
- {
- long millisToEnd = System.currentTimeMillis() + ITCFSessionProvider.TCP_CONNECT_TIMEOUT*1000;
+ private int login(String username, String password) throws InterruptedException {
+ long millisToEnd = System.currentTimeMillis() + ITCFSessionProvider.TCP_CONNECT_TIMEOUT * 1000;
LoginThread checkLogin = new LoginThread(username, password);
status = ITCFSessionProvider.ERROR_CODE;
checkLogin.start();
@@ -204,7 +204,6 @@ public class TCFTerminalShell extends AbstractTerminalShell {
final String encoding, final String[] environment,
String initialWorkingDirectory, String commandToRun)
throws SystemMessageException {
- Map<String, Object> map_ids;
Exception nestedException = null;
try {
fSessionProvider = sessionProvider;
@@ -214,22 +213,22 @@ public class TCFTerminalShell extends AbstractTerminalShell {
if (fChannel == null || fChannel.getState() != IChannel.STATE_OPEN)
throw new Exception("TCP channel is not connected!");//$NON-NLS-1$
- if (((TCFConnectorService)sessionProvider).isSubscribed() == false)
- ((TCFConnectorService)sessionProvider).subscribe();
- assert (((TCFConnectorService)sessionProvider).isSubscribed());
new TCFRSETask<ITerminals.TerminalContext>() {
public void run() {
- terminal = ((TCFConnectorService)sessionProvider).getService(ITerminals.class);
- terminal.launch(ptyType, encoding, environment, new ITerminals.DoneLaunch() {
- public void doneLaunch(IToken token, Exception error,
- ITerminals.TerminalContext ctx) {
+ terminals = ((TCFConnectorService)sessionProvider).getService(ITerminals.class);
+ streams = ((TCFConnectorService)sessionProvider).getService(IStreams.class);
+ fSessionProvider.onStreamsConnecting();
+ terminals.launch(ptyType, encoding, environment, new ITerminals.DoneLaunch() {
+ public void doneLaunch(IToken token, Exception error, ITerminals.TerminalContext ctx) {
if (ctx != null) {
terminalContext = ctx;
- terminal.addListener(listeners);
+ terminals.addListener(listeners);
}
-
+ fSessionProvider.onStreamsID(ctx.getStdInID());
+ fSessionProvider.onStreamsID(ctx.getStdOutID());
+ fSessionProvider.onStreamsConnected();
if (error != null) error(error);
else done(ctx);
}
@@ -243,24 +242,19 @@ public class TCFTerminalShell extends AbstractTerminalShell {
fContextID = terminalContext.getID();
fWidth = terminalContext.getWidth();
fHeight = terminalContext.getHeight();
- map_ids = terminalContext.getProperties();
- in_id = (String)map_ids.get(ITerminals.PROP_STDOUT_ID);
- out_id = (String)map_ids.get(ITerminals.PROP_STDIN_ID);
+ in_id = terminalContext.getStdOutID();
+ out_id = terminalContext.getStdInID();
String user = fSessionProvider.getSessionUserId();
String password = fSessionProvider.getSessionPassword();
status = ITCFSessionProvider.ERROR_CODE;
- IStreams streams = new TCFRSETask<IStreams>() {
- public void run() {
- done(((TCFConnectorService)sessionProvider).getService(IStreams.class));
- }
- }.getS(null, Messages.TCFTerminalService_Name);
- fOutputStream = new TCFTerminalOutputStream(streams, out_id);
- fInputStream = new TCFTerminalInputStream(streams, in_id);
+ fOutputStream = new TCFTerminalOutputStream(this, streams, out_id);
+ fInputStream = new TCFTerminalInputStream(this, streams, in_id);
if (fEncoding != null) {
fOutputStreamWriter = new BufferedWriter(new OutputStreamWriter(fOutputStream, encoding));
- } else {
+ }
+ else {
// default encoding == System.getProperty("file.encoding")
// TODO should try to determine remote encoding if possible
fOutputStreamWriter = new BufferedWriter(new OutputStreamWriter(fOutputStream));
@@ -269,21 +263,15 @@ public class TCFTerminalShell extends AbstractTerminalShell {
try {
status = login(user, password);
}
- finally
- {
- if ((status == ITCFSessionProvider.CONNECT_CLOSED))
- {
+ finally {
+ if ((status == ITCFSessionProvider.CONNECT_CLOSED)) {
//Give one time chance of retrying....
}
-
}
//give another chance of retrying
if ((status == ITCFSessionProvider.CONNECT_CLOSED))
{
- ((TCFConnectorService)sessionProvider).unsubscribe();
- ((TCFConnectorService)sessionProvider).subscribe();
- assert (((TCFConnectorService)sessionProvider).isSubscribed());
status = login(user, password);
}
@@ -300,8 +288,7 @@ public class TCFTerminalShell extends AbstractTerminalShell {
}
}
- catch (Exception e)
- {
+ catch (Exception e) {
e.printStackTrace();
nestedException = e;
}
@@ -312,11 +299,12 @@ public class TCFTerminalShell extends AbstractTerminalShell {
SystemMessage msg;
if (nestedException!=null) {
- msg = new SimpleSystemMessage(org.eclipse.tm.internal.tcf.rse.Activator.PLUGIN_ID,
+ msg = new SimpleSystemMessage(org.eclipse.tcf.internal.rse.Activator.PLUGIN_ID,
ICommonMessageIds.MSG_EXCEPTION_OCCURRED,
IStatus.ERROR,
CommonMessages.MSG_EXCEPTION_OCCURRED, nestedException);
- } else {
+ }
+ else {
String strErr;
if (status == ITCFSessionProvider.CONNECT_CLOSED)
strErr = "Connection closed!";//$NON-NLS-1$
@@ -325,7 +313,7 @@ public class TCFTerminalShell extends AbstractTerminalShell {
else
strErr = "Not identified Errors";//$NON-NLS-1$
- msg = new SimpleSystemMessage(org.eclipse.tm.internal.tcf.rse.Activator.PLUGIN_ID,
+ msg = new SimpleSystemMessage(org.eclipse.tcf.internal.rse.Activator.PLUGIN_ID,
ICommonMessageIds.MSG_COMM_AUTH_FAILED,
IStatus.ERROR,
strErr,
@@ -342,7 +330,8 @@ public class TCFTerminalShell extends AbstractTerminalShell {
if (isActive()) {
if ("#break".equals(command)) { //$NON-NLS-1$
command = "\u0003"; // Unicode 3 == Ctrl+C //$NON-NLS-1$
- } else {
+ }
+ else {
command += "\r\n"; //$NON-NLS-1$
}
fOutputStreamWriter.write(command);
@@ -367,16 +356,13 @@ public class TCFTerminalShell extends AbstractTerminalShell {
new TCFRSETask<Object>() {
public void run() {
terminalContext.exit(new ITerminals.DoneCommand(){
- public void doneCommand(IToken token,
- Exception error) {
- if (error != null)
- error(error);
- else {
- done(this);
- }
+ public void doneCommand(IToken token, Exception error) {
+ if (error != null) error(error);
+ else done(this);
}
});
- }}.getS(null, Messages.TCFShellService_Name); //seems no need block here. need further modification.
+ }
+ }.getS(null, Messages.TCFShellService_Name); //seems no need block here. need further modification.
}
catch (SystemMessageException e) {
e.printStackTrace();
@@ -392,7 +378,7 @@ public class TCFTerminalShell extends AbstractTerminalShell {
}
public boolean isActive() {
- if (fChannel != null && !(fChannel.getState() == IChannel.STATE_CLOSED) && connected) {
+ if (fChannel != null && fChannel.getState() != IChannel.STATE_CLOSED && connected) {
return true;
}
exit();
@@ -415,25 +401,22 @@ public class TCFTerminalShell extends AbstractTerminalShell {
new TCFRSETask<Object>() {
public void run() {
if (fChannel != null && connected) {
- terminal.setWinSize(fContextID, fWidth, fHeight, new ITerminals.DoneCommand(){
-
+ terminals.setWinSize(fContextID, fWidth, fHeight, new ITerminals.DoneCommand(){
public void doneCommand(IToken token, Exception error) {
- if (error != null)
- error(error);
- else
- done(this);
-
- }});
-
+ if (error != null) error(error);
+ else done(this);
+ }
+ });
}
else {
done(this);
}
- }}.getS(null, Messages.TCFShellService_Name);
+ }
+ }.getS(null, Messages.TCFShellService_Name);
}
catch (SystemMessageException e) {
e.printStackTrace();
- } //$NON-NLS-1$;
+ }
}
public String getDefaultEncoding() {
@@ -441,4 +424,23 @@ public class TCFTerminalShell extends AbstractTerminalShell {
return defaultEncoding;
}
+ void onInputStreamClosed() {
+ in_id = null;
+ if (out_id == null && !exited) {
+ terminalContext.exit(new ITerminals.DoneCommand(){
+ public void doneCommand(IToken token, Exception error) {
+ }
+ });
+ }
+ }
+
+ void onOutputStreamClosed() {
+ out_id = null;
+ if (in_id == null && !exited) {
+ terminalContext.exit(new ITerminals.DoneCommand(){
+ public void doneCommand(IToken token, Exception error) {
+ }
+ });
+ }
+ }
}
diff --git a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/terminals/TCFTerminalService.java b/plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/terminals/TCFTerminalService.java
index e3ee65dc4..50be055bb 100644
--- a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/terminals/TCFTerminalService.java
+++ b/plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/terminals/TCFTerminalService.java
@@ -8,49 +8,42 @@
* Contributors:
* Liping Ke(Intel Corp.) - initial API and implementation
******************************************************************************/
-package org.eclipse.tm.internal.tcf.rse.terminals;
+package org.eclipse.tcf.internal.rse.terminals;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
import org.eclipse.rse.services.terminals.AbstractTerminalService;
import org.eclipse.rse.services.terminals.ITerminalShell;
-import org.eclipse.tm.internal.tcf.rse.ITCFService;
-import org.eclipse.tm.internal.tcf.rse.ITCFSessionProvider;
-import org.eclipse.tm.internal.tcf.rse.Messages;
-import org.eclipse.tm.internal.tcf.rse.shells.TCFTerminalShell;
+import org.eclipse.tcf.internal.rse.ITCFService;
+import org.eclipse.tcf.internal.rse.ITCFSessionProvider;
+import org.eclipse.tcf.internal.rse.Messages;
+import org.eclipse.tcf.internal.rse.shells.TCFTerminalShell;
public class TCFTerminalService extends AbstractTerminalService implements ITCFService{
private final ITCFSessionProvider fSessionProvider;
- /**
- * Return the TCF property set, and fill it with default values if it has
- * not been created yet. Extender may override in order to set different
- * default values.
- *
- * @return a property set holding properties understood by the TCF
- * connector service.
- */
public ITerminalShell launchTerminal(String ptyType, String encoding,
String[] environment, String initialWorkingDirectory,
String commandToRun, IProgressMonitor monitor)
throws SystemMessageException {
- TCFTerminalShell hostShell = new TCFTerminalShell(fSessionProvider, ptyType, encoding, environment, initialWorkingDirectory, commandToRun);
- return hostShell;
+ return new TCFTerminalShell(fSessionProvider, ptyType, encoding,
+ environment, initialWorkingDirectory, commandToRun);
}
-
public TCFTerminalService(ITCFSessionProvider sessionProvider) {
fSessionProvider = sessionProvider;
}
public ITCFSessionProvider getSessionProvider() {
- return fSessionProvider;
- }
+ return fSessionProvider;
+ }
+
@Override
public String getName() {
return Messages.TCFTerminalService_Name;
}
+
@Override
public String getDescription() {
return Messages.TCFTerminalService_Description;
diff --git a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/terminals/TCFTerminalServiceSubSystemConfiguration.java b/plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/terminals/TCFTerminalServiceSubSystemConfiguration.java
index 817f1c7b2..0a97b214c 100644
--- a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/terminals/TCFTerminalServiceSubSystemConfiguration.java
+++ b/plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/terminals/TCFTerminalServiceSubSystemConfiguration.java
@@ -11,7 +11,7 @@
* Liping Ke (Intel Corp.) - Adapted from TerminalServiceSubSystemConfiguration
* Liping Ke (Intel Corp.) - TCF terminal services subsystem implementation
*******************************************************************************/
-package org.eclipse.tm.internal.tcf.rse.terminals;
+package org.eclipse.tcf.internal.rse.terminals;
import org.eclipse.rse.core.model.IHost;
import org.eclipse.rse.core.subsystems.IConnectorService;
@@ -19,9 +19,9 @@ import org.eclipse.rse.core.subsystems.ISubSystem;
import org.eclipse.rse.services.terminals.ITerminalService;
import org.eclipse.rse.subsystems.terminals.core.TerminalServiceSubSystem;
import org.eclipse.rse.subsystems.terminals.core.TerminalServiceSubSystemConfiguration;
-import org.eclipse.tm.internal.tcf.rse.ITCFService;
-import org.eclipse.tm.internal.tcf.rse.TCFConnectorService;
-import org.eclipse.tm.internal.tcf.rse.TCFConnectorServiceManager;
+import org.eclipse.tcf.internal.rse.ITCFService;
+import org.eclipse.tcf.internal.rse.TCFConnectorService;
+import org.eclipse.tcf.internal.rse.TCFConnectorServiceManager;
public class TCFTerminalServiceSubSystemConfiguration extends
TerminalServiceSubSystemConfiguration {
diff --git a/plugins/org.eclipse.tm.tcf/.classpath b/plugins/org.eclipse.tcf/.classpath
index 01a008e0d..01a008e0d 100644
--- a/plugins/org.eclipse.tm.tcf/.classpath
+++ b/plugins/org.eclipse.tcf/.classpath
diff --git a/plugins/org.eclipse.tcf/.options b/plugins/org.eclipse.tcf/.options
new file mode 100644
index 000000000..2e023f104
--- /dev/null
+++ b/plugins/org.eclipse.tcf/.options
@@ -0,0 +1,2 @@
+org.eclipse.tcf/debug = false
+org.eclipse.tcf/debug/discovery = false
diff --git a/plugins/org.eclipse.tm.tcf/.project b/plugins/org.eclipse.tcf/.project
index 63a8df535..7ca504e20 100644
--- a/plugins/org.eclipse.tm.tcf/.project
+++ b/plugins/org.eclipse.tcf/.project
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.eclipse.tm.tcf</name>
+ <name>org.eclipse.tcf</name>
<comment></comment>
<projects>
</projects>
diff --git a/plugins/org.eclipse.tm.tcf/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.tcf/.settings/org.eclipse.jdt.core.prefs
index 2532d5d37..2532d5d37 100644
--- a/plugins/org.eclipse.tm.tcf/.settings/org.eclipse.jdt.core.prefs
+++ b/plugins/org.eclipse.tcf/.settings/org.eclipse.jdt.core.prefs
diff --git a/plugins/org.eclipse.tm.tcf/.settings/org.eclipse.jdt.ui.prefs b/plugins/org.eclipse.tcf/.settings/org.eclipse.jdt.ui.prefs
index 903e1082e..903e1082e 100644
--- a/plugins/org.eclipse.tm.tcf/.settings/org.eclipse.jdt.ui.prefs
+++ b/plugins/org.eclipse.tcf/.settings/org.eclipse.jdt.ui.prefs
diff --git a/plugins/org.eclipse.tcf/META-INF/MANIFEST.MF b/plugins/org.eclipse.tcf/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..de66a4c64
--- /dev/null
+++ b/plugins/org.eclipse.tcf/META-INF/MANIFEST.MF
@@ -0,0 +1,16 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-Vendor: %providerName
+Bundle-SymbolicName: org.eclipse.tcf;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-ActivationPolicy: lazy
+Eclipse-LazyStart: true
+Require-Bundle: org.eclipse.core.runtime
+Bundle-Activator: org.eclipse.tcf.Activator
+Import-Package: org.eclipse.tcf.core;version="1.0.0",
+ org.eclipse.tcf.protocol;version="1.0.0"
+Export-Package: org.eclipse.tcf.extensions;version="1.0.0",
+ org.eclipse.tcf.ssl;version="1.0.0"
diff --git a/plugins/org.eclipse.tm.tcf/about.html b/plugins/org.eclipse.tcf/about.html
index 6c5b3615b..6c5b3615b 100644
--- a/plugins/org.eclipse.tm.tcf/about.html
+++ b/plugins/org.eclipse.tcf/about.html
diff --git a/plugins/org.eclipse.tm.tcf/build.properties b/plugins/org.eclipse.tcf/build.properties
index 21c006cd1..21c006cd1 100644
--- a/plugins/org.eclipse.tm.tcf/build.properties
+++ b/plugins/org.eclipse.tcf/build.properties
diff --git a/plugins/org.eclipse.tm.tcf.core/plugin.properties b/plugins/org.eclipse.tcf/plugin.properties
index 02e1dd53c..067414980 100644
--- a/plugins/org.eclipse.tm.tcf.core/plugin.properties
+++ b/plugins/org.eclipse.tcf/plugin.properties
@@ -8,6 +8,6 @@
# Contributors:
# Wind River Systems - initial implementation
###############################################################################
-pluginName = Target Communication Framework (TCF) Core (Incubation)
+pluginName = Target Communication Framework (TCF)
providerName = Eclipse CDT
diff --git a/plugins/org.eclipse.tm.tcf/plugin.xml b/plugins/org.eclipse.tcf/plugin.xml
index e0e8468d4..e0e8468d4 100644
--- a/plugins/org.eclipse.tm.tcf/plugin.xml
+++ b/plugins/org.eclipse.tcf/plugin.xml
diff --git a/plugins/org.eclipse.tm.tcf/pom.xml b/plugins/org.eclipse.tcf/pom.xml
index dd8e983e3..c0cc19149 100644
--- a/plugins/org.eclipse.tm.tcf/pom.xml
+++ b/plugins/org.eclipse.tcf/pom.xml
@@ -7,11 +7,11 @@
<parent>
<groupId>org.eclipse.tcf</groupId>
<artifactId>tcf-parent</artifactId>
- <version>0.5.0-SNAPSHOT</version>
+ <version>1.0.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
- <version>0.5.0-SNAPSHOT</version>
- <artifactId>org.eclipse.tm.tcf</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <artifactId>org.eclipse.tcf</artifactId>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/plugins/org.eclipse.tm.tcf/schema/serviceProviders.exsd b/plugins/org.eclipse.tcf/schema/serviceProviders.exsd
index a53e3d23d..5067d631b 100644
--- a/plugins/org.eclipse.tm.tcf/schema/serviceProviders.exsd
+++ b/plugins/org.eclipse.tcf/schema/serviceProviders.exsd
@@ -1,9 +1,9 @@
<?xml version='1.0' encoding='UTF-8'?>
<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.tm.tcf" xmlns="http://www.w3.org/2001/XMLSchema">
+<schema targetNamespace="org.eclipse.tcf" xmlns="http://www.w3.org/2001/XMLSchema">
<annotation>
<appInfo>
- <meta.schema plugin="org.eclipse.tm.tcf" id="serviceProviders" name="TCF Service Providers"/>
+ <meta.schema plugin="org.eclipse.tcf" id="serviceProviders" name="TCF Service Providers"/>
</appInfo>
<documentation>
This extension point is used to allow the contribution of new TCF service providers.
@@ -64,10 +64,10 @@
<attribute name="class" type="string" use="required">
<annotation>
<documentation>
- The fully qualified name of the service provider class. Must implement &lt;samp&gt;org.eclipse.tm.tcf.protocol.IServiceProvider&lt;/samp&gt;
+ The fully qualified name of the service provider class. Must implement &lt;samp&gt;org.eclipse.tcf.protocol.IServiceProvider&lt;/samp&gt;
</documentation>
<appInfo>
- <meta.attribute kind="java" basedOn=":org.eclipse.tm.tcf.protocol.IServiceProvider"/>
+ <meta.attribute kind="java" basedOn=":org.eclipse.tcf.protocol.IServiceProvider"/>
</appInfo>
</annotation>
</attribute>
@@ -89,7 +89,7 @@
<meta.section type="apiinfo"/>
</appInfo>
<documentation>
- Plug-ins that want to extend this extension point, the referenced class must implement the &lt;samp&gt;org.eclipse.tm.tcf.protocol.IServiceProvider&lt;/samp&gt; interface.
+ Plug-ins that want to extend this extension point, the referenced class must implement the &lt;samp&gt;org.eclipse.tcf.protocol.IServiceProvider&lt;/samp&gt; interface.
</documentation>
</annotation>
diff --git a/plugins/org.eclipse.tm.tcf/schema/startup.exsd b/plugins/org.eclipse.tcf/schema/startup.exsd
index 511a4ce91..998b04d30 100644
--- a/plugins/org.eclipse.tm.tcf/schema/startup.exsd
+++ b/plugins/org.eclipse.tcf/schema/startup.exsd
@@ -1,9 +1,9 @@
<?xml version='1.0' encoding='UTF-8'?>
<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.tm.tcf">
+<schema targetNamespace="org.eclipse.tcf">
<annotation>
<appInfo>
- <meta.schema plugin="org.eclipse.tm.tcf" id="startup" name="TCF Startup"/>
+ <meta.schema plugin="org.eclipse.tcf" id="startup" name="TCF Startup"/>
</appInfo>
<documentation>
This extension point is used to register plugins
diff --git a/plugins/org.eclipse.tm.tcf/src/org/eclipse/tm/tcf/Activator.java b/plugins/org.eclipse.tcf/src/org/eclipse/tcf/Activator.java
index a106d9c42..1d5d69891 100644
--- a/plugins/org.eclipse.tm.tcf/src/org/eclipse/tm/tcf/Activator.java
+++ b/plugins/org.eclipse.tcf/src/org/eclipse/tcf/Activator.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.tcf;
+package org.eclipse.tcf;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExtension;
@@ -17,11 +17,11 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Plugin;
import org.eclipse.core.runtime.Status;
-import org.eclipse.tm.tcf.internal.extensions.TcfServiceProvidersExtensionPointManager;
-import org.eclipse.tm.tcf.core.ChannelTCP;
-import org.eclipse.tm.tcf.protocol.ILogger;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.tcf.ssl.TCFSecurityManager;
+import org.eclipse.tcf.internal.extensions.TcfServiceProvidersExtensionPointManager;
+import org.eclipse.tcf.core.ChannelTCP;
+import org.eclipse.tcf.protocol.ILogger;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.ssl.TCFSecurityManager;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
import org.osgi.framework.BundleEvent;
@@ -33,7 +33,7 @@ import org.osgi.framework.BundleListener;
*/
public class Activator extends Plugin {
- public static final String PLUGIN_ID = "org.eclipse.tm.tcf"; //$NON-NLS-1$
+ public static final String PLUGIN_ID = "org.eclipse.tcf"; //$NON-NLS-1$
private static Activator plugin;
private static boolean debug;
@@ -77,9 +77,9 @@ public class Activator extends Plugin {
super.start(context);
debug = Platform.inDebugMode();
- TRACE = "true".equals(Platform.getDebugOption("org.eclipse.tm.tcf/debug")); //$NON-NLS-1$
- if (TRACE && "true".equals(Platform.getDebugOption("org.eclipse.tm.tcf/debug/discovery"))) {
- System.setProperty("org.eclipse.tm.tcf.core.tracing.discovery", "true");
+ TRACE = "true".equals(Platform.getDebugOption("org.eclipse.tcf/debug")); //$NON-NLS-1$
+ if (TRACE && "true".equals(Platform.getDebugOption("org.eclipse.tcf/debug/discovery"))) {
+ System.setProperty("org.eclipse.tcf.core.tracing.discovery", "true");
}
ChannelTCP.setSSLContext(TCFSecurityManager.createSSLContext());
diff --git a/plugins/org.eclipse.tm.tcf/src/org/eclipse/tm/tcf/EventQueue.java b/plugins/org.eclipse.tcf/src/org/eclipse/tcf/EventQueue.java
index e24f7a73d..fe01bae53 100644
--- a/plugins/org.eclipse.tm.tcf/src/org/eclipse/tm/tcf/EventQueue.java
+++ b/plugins/org.eclipse.tcf/src/org/eclipse/tcf/EventQueue.java
@@ -8,15 +8,15 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.tcf;
+package org.eclipse.tcf;
import java.util.LinkedList;
import org.eclipse.core.runtime.jobs.IJobChangeEvent;
import org.eclipse.core.runtime.jobs.IJobChangeListener;
import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.tm.tcf.protocol.IEventQueue;
-import org.eclipse.tm.tcf.protocol.Protocol;
+import org.eclipse.tcf.protocol.IEventQueue;
+import org.eclipse.tcf.protocol.Protocol;
/**
@@ -126,4 +126,4 @@ class EventQueue implements IEventQueue, Runnable {
if (l0 > 100) l0 = 100;
return l0;
}
-} \ No newline at end of file
+}
diff --git a/plugins/org.eclipse.tm.tcf/src/org/eclipse/tm/tcf/extensions/TcfAbstractExtensionPointManager.java b/plugins/org.eclipse.tcf/src/org/eclipse/tcf/extensions/TcfAbstractExtensionPointManager.java
index 75cf854d4..3bf010fdd 100644
--- a/plugins/org.eclipse.tm.tcf/src/org/eclipse/tm/tcf/extensions/TcfAbstractExtensionPointManager.java
+++ b/plugins/org.eclipse.tcf/src/org/eclipse/tcf/extensions/TcfAbstractExtensionPointManager.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.tcf.extensions;
+package org.eclipse.tcf.extensions;
import java.util.ArrayList;
import java.util.Arrays;
@@ -26,8 +26,8 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
import org.eclipse.osgi.util.NLS;
-import org.eclipse.tm.tcf.Activator;
-import org.eclipse.tm.tcf.internal.nls.TcfPluginMessages;
+import org.eclipse.tcf.Activator;
+import org.eclipse.tcf.internal.nls.TcfPluginMessages;
/**
diff --git a/plugins/org.eclipse.tm.tcf/src/org/eclipse/tm/tcf/extensions/TcfExtensionPointComparator.java b/plugins/org.eclipse.tcf/src/org/eclipse/tcf/extensions/TcfExtensionPointComparator.java
index a6b71ecd0..ab988562f 100644
--- a/plugins/org.eclipse.tm.tcf/src/org/eclipse/tm/tcf/extensions/TcfExtensionPointComparator.java
+++ b/plugins/org.eclipse.tcf/src/org/eclipse/tcf/extensions/TcfExtensionPointComparator.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.tcf.extensions;
+package org.eclipse.tcf.extensions;
import java.util.Comparator;
@@ -19,7 +19,7 @@ import org.eclipse.core.runtime.IExtension;
* always read in the same order.
* <p>
* The order of the extensions is defined as following:<br>
- * <ul><li>Extensions contributed by the TCF core plug-ins (<code>org.eclipse.tm.tcf.*</code>)
+ * <ul><li>Extensions contributed by the TCF core plug-ins (<code>org.eclipse.tcf.*</code>)
* in ascending alphabetic order and</li>
* <li>Extensions contributed by any other plug-in in ascending alphabetic order.</li>
* <li>Extensions contributed by the same plug-in in ascending alphabetic order by the
@@ -27,7 +27,7 @@ import org.eclipse.core.runtime.IExtension;
* </ul>
*/
public class TcfExtensionPointComparator implements Comparator<IExtension> {
- private final static String TCF_PLUGIN_PATTERN = "org.eclipse.tm.tcf.*"; //$NON-NLS-1$
+ private final static String TCF_PLUGIN_PATTERN = "org.eclipse.tcf.*"; //$NON-NLS-1$
/* (non-Javadoc)
* @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
diff --git a/plugins/org.eclipse.tm.tcf/src/org/eclipse/tm/tcf/extensions/TcfExtensionProxy.java b/plugins/org.eclipse.tcf/src/org/eclipse/tcf/extensions/TcfExtensionProxy.java
index ebf20726b..3a42c01a8 100644
--- a/plugins/org.eclipse.tm.tcf/src/org/eclipse/tm/tcf/extensions/TcfExtensionProxy.java
+++ b/plugins/org.eclipse.tcf/src/org/eclipse/tcf/extensions/TcfExtensionProxy.java
@@ -8,15 +8,15 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.tcf.extensions;
+package org.eclipse.tcf.extensions;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.osgi.util.NLS;
-import org.eclipse.tm.tcf.Activator;
-import org.eclipse.tm.tcf.internal.nls.TcfPluginMessages;
+import org.eclipse.tcf.Activator;
+import org.eclipse.tcf.internal.nls.TcfPluginMessages;
/**
* TCF extension proxy implementation. The use of the proxy asures the
diff --git a/plugins/org.eclipse.tm.tcf/src/org/eclipse/tm/tcf/internal/extensions/TcfServiceProvidersExtensionPointManager.java b/plugins/org.eclipse.tcf/src/org/eclipse/tcf/internal/extensions/TcfServiceProvidersExtensionPointManager.java
index 39d0ce0b9..c84950c55 100644
--- a/plugins/org.eclipse.tm.tcf/src/org/eclipse/tm/tcf/internal/extensions/TcfServiceProvidersExtensionPointManager.java
+++ b/plugins/org.eclipse.tcf/src/org/eclipse/tcf/internal/extensions/TcfServiceProvidersExtensionPointManager.java
@@ -8,17 +8,17 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.tcf.internal.extensions;
+package org.eclipse.tcf.internal.extensions;
import java.util.Map;
-import org.eclipse.tm.tcf.extensions.TcfAbstractExtensionPointManager;
-import org.eclipse.tm.tcf.extensions.TcfExtensionProxy;
-import org.eclipse.tm.tcf.protocol.IServiceProvider;
-import org.eclipse.tm.tcf.protocol.Protocol;
+import org.eclipse.tcf.extensions.TcfAbstractExtensionPointManager;
+import org.eclipse.tcf.extensions.TcfExtensionProxy;
+import org.eclipse.tcf.protocol.IServiceProvider;
+import org.eclipse.tcf.protocol.Protocol;
/**
- * Extension point manager implementation for "org.eclipse.tm.tcf.serviceProviders".
+ * Extension point manager implementation for "org.eclipse.tcf.serviceProviders".
*/
public class TcfServiceProvidersExtensionPointManager extends TcfAbstractExtensionPointManager<IServiceProvider> {
/*
@@ -36,15 +36,15 @@ public class TcfServiceProvidersExtensionPointManager extends TcfAbstractExtensi
}
/* (non-Javadoc)
- * @see org.eclipse.tm.tcf.extensions.TcfAbstractExtensionPointManager#getExtensionPointId()
+ * @see org.eclipse.tcf.extensions.TcfAbstractExtensionPointManager#getExtensionPointId()
*/
@Override
protected String getExtensionPointId() {
- return "org.eclipse.tm.tcf.serviceProviders"; //$NON-NLS-1$
+ return "org.eclipse.tcf.serviceProviders"; //$NON-NLS-1$
}
/* (non-Javadoc)
- * @see org.eclipse.tm.tcf.extensions.TcfAbstractExtensionPointManager#getConfigurationElementName()
+ * @see org.eclipse.tcf.extensions.TcfAbstractExtensionPointManager#getConfigurationElementName()
*/
@Override
protected String getConfigurationElementName() {
diff --git a/plugins/org.eclipse.tm.tcf/src/org/eclipse/tm/tcf/internal/nls/TcfPluginMessages.java b/plugins/org.eclipse.tcf/src/org/eclipse/tcf/internal/nls/TcfPluginMessages.java
index ddd68a1f8..71a6bb360 100644
--- a/plugins/org.eclipse.tm.tcf/src/org/eclipse/tm/tcf/internal/nls/TcfPluginMessages.java
+++ b/plugins/org.eclipse.tcf/src/org/eclipse/tcf/internal/nls/TcfPluginMessages.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.tcf.internal.nls;
+package org.eclipse.tcf.internal.nls;
import org.eclipse.osgi.util.NLS;
@@ -18,7 +18,7 @@ import org.eclipse.osgi.util.NLS;
public class TcfPluginMessages extends NLS {
// The plug-in resouce bundle name
- private static final String BUNDLE_NAME = "org.eclipse.tm.tcf.internal.tcf.TcfPluginMessages"; //$NON-NLS-1$
+ private static final String BUNDLE_NAME = "org.eclipse.tcf.internal.TcfPluginMessages"; //$NON-NLS-1$
/**
* Static constructor.
diff --git a/plugins/org.eclipse.tm.tcf/src/org/eclipse/tm/tcf/internal/nls/TcfPluginMessages.properties b/plugins/org.eclipse.tcf/src/org/eclipse/tcf/internal/nls/TcfPluginMessages.properties
index a16b7c2bf..5c19e7349 100644
--- a/plugins/org.eclipse.tm.tcf/src/org/eclipse/tm/tcf/internal/nls/TcfPluginMessages.properties
+++ b/plugins/org.eclipse.tcf/src/org/eclipse/tcf/internal/nls/TcfPluginMessages.properties
@@ -9,7 +9,7 @@
# Wind River Systems - initial API and implementation
###############################################################################
#
-# org.eclipse.tm.tcf
+# org.eclipse.tcf
# Externalized Strings.
#
diff --git a/plugins/org.eclipse.tm.tcf/src/org/eclipse/tm/tcf/ssl/TCFSecurityManager.java b/plugins/org.eclipse.tcf/src/org/eclipse/tcf/ssl/TCFSecurityManager.java
index 55974d7b5..4bd55cb66 100644
--- a/plugins/org.eclipse.tm.tcf/src/org/eclipse/tm/tcf/ssl/TCFSecurityManager.java
+++ b/plugins/org.eclipse.tcf/src/org/eclipse/tcf/ssl/TCFSecurityManager.java
@@ -8,7 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.tcf.ssl;
+package org.eclipse.tcf.ssl;
import java.io.BufferedInputStream;
import java.io.BufferedReader;
@@ -33,9 +33,9 @@ import javax.net.ssl.TrustManager;
import javax.net.ssl.X509ExtendedKeyManager;
import javax.net.ssl.X509TrustManager;
-import org.eclipse.tm.tcf.Activator;
-import org.eclipse.tm.tcf.core.Base64;
-import org.eclipse.tm.tcf.protocol.Protocol;
+import org.eclipse.tcf.Activator;
+import org.eclipse.tcf.core.Base64;
+import org.eclipse.tcf.protocol.Protocol;
/**
diff --git a/plugins/org.eclipse.tm.tcf.cdt.ui/pom.xml b/plugins/org.eclipse.tm.tcf.cdt.ui/pom.xml
deleted file mode 100644
index 26334d8c3..000000000
--- a/plugins/org.eclipse.tm.tcf.cdt.ui/pom.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
- xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.eclipse.tcf</groupId>
- <artifactId>tcf-parent</artifactId>
- <version>0.5.0-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent>
-
- <version>0.5.0-SNAPSHOT</version>
- <artifactId>org.eclipse.tm.tcf.cdt.ui</artifactId>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/plugins/org.eclipse.tm.tcf.core/META-INF/MANIFEST.MF b/plugins/org.eclipse.tm.tcf.core/META-INF/MANIFEST.MF
deleted file mode 100644
index 24b343890..000000000
--- a/plugins/org.eclipse.tm.tcf.core/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,18 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-Vendor: %providerName
-Bundle-SymbolicName: org.eclipse.tm.tcf.core;singleton:=true
-Bundle-Version: 0.5.0.qualifier
-Bundle-Localization: plugin
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Bundle-ActivationPolicy: lazy
-Eclipse-LazyStart: true
-Bundle-Activator: org.eclipse.tm.internal.tcf.Activator
-Import-Package: org.osgi.framework,
- org.osgi.service.packageadmin,
- org.osgi.util.tracker
-Export-Package: org.eclipse.tm.tcf.core;version="0.4.0",
- org.eclipse.tm.tcf.protocol;version="0.5.0",
- org.eclipse.tm.tcf.services;version="0.5.0",
- org.eclipse.tm.tcf.util;version="0.4.0"
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/pom.xml b/plugins/org.eclipse.tm.tcf.debug.ui/pom.xml
deleted file mode 100644
index b38e7fcf3..000000000
--- a/plugins/org.eclipse.tm.tcf.debug.ui/pom.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
- xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.eclipse.tcf</groupId>
- <artifactId>tcf-parent</artifactId>
- <version>0.5.0-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent>
-
- <version>0.5.0-SNAPSHOT</version>
- <artifactId>org.eclipse.tm.tcf.debug.ui</artifactId>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/adapters/TCFNodePropertySource.java b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/adapters/TCFNodePropertySource.java
deleted file mode 100644
index 918090087..000000000
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/adapters/TCFNodePropertySource.java
+++ /dev/null
@@ -1,191 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.adapters;
-
-import java.math.BigInteger;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.TimeUnit;
-
-import org.eclipse.tm.internal.tcf.debug.model.TCFContextState;
-import org.eclipse.tm.internal.tcf.debug.model.TCFSourceRef;
-import org.eclipse.tm.internal.tcf.debug.ui.Activator;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNode;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNodeExecContext;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNodeExecContext.MemoryRegion;
-import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNodeStackFrame;
-import org.eclipse.tm.tcf.protocol.JSON;
-import org.eclipse.tm.tcf.services.IRunControl;
-import org.eclipse.tm.tcf.services.IStackTrace;
-import org.eclipse.tm.tcf.util.TCFDataCache;
-import org.eclipse.tm.tcf.util.TCFTask;
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-import org.eclipse.ui.views.properties.IPropertySource;
-import org.eclipse.ui.views.properties.PropertyDescriptor;
-
-/**
- * Adapts TCFNode to IPropertySource.
- */
-public class TCFNodePropertySource implements IPropertySource {
-
- private final TCFNode fNode;
- private final Map<String, Object> fProperties = new HashMap<String, Object>();
- private IPropertyDescriptor[] fDescriptors;
-
- public TCFNodePropertySource(TCFNode node) {
- fNode = node;
- }
-
- public Object getEditableValue() {
- return null;
- }
-
- public IPropertyDescriptor[] getPropertyDescriptors() {
- if (fDescriptors == null) {
- try {
- final List<IPropertyDescriptor> descriptors = new ArrayList<IPropertyDescriptor>();
- fDescriptors = new TCFTask<IPropertyDescriptor[]>(fNode.getChannel()) {
- public void run() {
- if (fNode instanceof TCFNodeExecContext) {
- getExecContextDescriptors((TCFNodeExecContext) fNode);
- } else if (fNode instanceof TCFNodeStackFrame) {
- getFrameDescriptors((TCFNodeStackFrame) fNode);
- } else {
- done(descriptors.toArray(new IPropertyDescriptor[descriptors.size()]));
- }
- }
-
- private void getFrameDescriptors(TCFNodeStackFrame frameNode) {
- TCFDataCache<IStackTrace.StackTraceContext> ctx_cache = frameNode.getStackTraceContext();
- TCFDataCache<TCFSourceRef> line_info_cache = frameNode.getLineInfo();
- if (!validateAll(ctx_cache, line_info_cache)) return;
- IStackTrace.StackTraceContext ctx = ctx_cache.getData();
- if (ctx != null) {
- Map<String, Object> props = ctx.getProperties();
- for (String key : props.keySet()) {
- Object value = props.get(key);
- if (value instanceof Number) {
- value = toHexAddrString((Number) value);
- }
- addDescriptor("Context", key, value);
- }
- }
- TCFSourceRef sourceRef = line_info_cache.getData();
- if (sourceRef != null) {
- if (sourceRef.area != null) {
- addDescriptor("Source", "Directory", sourceRef.area.directory);
- addDescriptor("Source", "File", sourceRef.area.file);
- addDescriptor("Source", "Line", sourceRef.area.start_line);
- }
- if (sourceRef.error != null) {
- addDescriptor("Source", "Error", sourceRef.error);
- }
- }
- done(descriptors.toArray(new IPropertyDescriptor[descriptors.size()]));
- }
- private void getExecContextDescriptors(TCFNodeExecContext exeNode) {
- TCFDataCache<IRunControl.RunControlContext> ctx_cache = exeNode.getRunContext();
- TCFDataCache<TCFContextState> state_cache = exeNode.getState();
- TCFDataCache<MemoryRegion[]> mem_map_cache = exeNode.getMemoryMap();
- if (!validateAll(ctx_cache, state_cache, mem_map_cache)) return;
- IRunControl.RunControlContext ctx = ctx_cache.getData();
- if (ctx != null) {
- Map<String, Object> props = ctx.getProperties();
- for (String key : props.keySet()) {
- Object value = props.get(key);
- if (value instanceof Number) {
- value = toHexAddrString((Number) value);
- }
- addDescriptor("Context", key, value);
- }
- }
- TCFContextState state = state_cache.getData();
- if (state != null) {
- addDescriptor("State", "Suspended", state.is_suspended);
- if (state.is_suspended) {
- addDescriptor("State", "Suspend reason", state.suspend_reason);
- addDescriptor("State", "PC", toHexAddrString(new BigInteger(state.suspend_pc)));
- }
- addDescriptor("State", "Active", !exeNode.isNotActive());
- }
- MemoryRegion[] mem_map = mem_map_cache.getData();
- if (mem_map != null && mem_map.length > 0) {
- int idx = 0;
- for (MemoryRegion region : mem_map) {
- Map<String, Object> props = region.region.getProperties();
- for (String key : props.keySet()) {
- Object value = props.get(key);
- if (value instanceof Number) {
- value = toHexAddrString((Number) value);
- }
- addDescriptor("MemoryRegion["+idx+']', key, value);
- }
- idx++;
- }
- }
- done(descriptors.toArray(new IPropertyDescriptor[descriptors.size()]));
- }
- private void addDescriptor(String category, String key, Object value) {
- String id = category + '.' + key;
- PropertyDescriptor desc = new PropertyDescriptor(id, key);
- desc.setCategory(category);
- descriptors.add(desc);
- fProperties.put(id, value);
- }
- boolean validateAll(TCFDataCache<?> ... caches) {
- TCFDataCache<?> pending = null;
- for (TCFDataCache<?> cache : caches) {
- if (!cache.validate()) {
- pending = cache;
- }
- }
- if (pending != null) {
- pending.wait(this);
- return false;
- }
- return true;
- }
- }.get(5, TimeUnit.SECONDS);
- }
- catch (Exception e) {
- Activator.log("Error retrieving property data", e);
- fDescriptors = new IPropertyDescriptor[0];
- }
- }
- return fDescriptors;
- }
-
- public Object getPropertyValue(final Object id) {
- return fProperties.get(id);
- }
-
- public boolean isPropertySet(Object id) {
- return false;
- }
-
- public void resetPropertyValue(Object id) {
- }
-
- public void setPropertyValue(Object id, Object value) {
- }
-
- private static String toHexAddrString(Number num) {
- BigInteger n = JSON.toBigInteger(num);
- String s = n.toString(16);
- int sz = s.length() > 8 ? 16 : 8;
- int l = sz - s.length();
- if (l < 0) l = 0;
- if (l > 16) l = 16;
- return "0x0000000000000000".substring(0, 2 + l) + s;
- }
-}
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenModules.java b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenModules.java
deleted file mode 100644
index c5fd30e26..000000000
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenModules.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.model;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.services.IMemoryMap;
-
-/**
- * Provides and caches memory regions (modules) for a context.
- */
-public class TCFChildrenModules extends TCFChildren {
-
- public TCFChildrenModules(TCFNode node) {
- super(node, 128);
- }
-
- void onMemoryMapChanged() {
- reset();
- }
-
- @Override
- protected boolean startDataRetrieval() {
- assert command == null;
- IMemoryMap mmap = node.model.getLaunch().getService(IMemoryMap.class);
- if (mmap == null) {
- set(null, null, null);
- return true;
- }
- command = mmap.get(node.id, new IMemoryMap.DoneGet() {
- public void doneGet(IToken token, Exception error, IMemoryMap.MemoryRegion[] map) {
- Map<String, TCFNode> data = new HashMap<String, TCFNode>();
- if (map != null) {
- for (IMemoryMap.MemoryRegion region : map) {
- String id = node.id + ".Module-" + region.getFileName() + '@' + region.getAddress();
- TCFNodeModule module = (TCFNodeModule) node.model.getNode(id);
- if (module == null) {
- module = new TCFNodeModule(node, id, region);
- }
- data.put(id, module);
- }
- }
- set(token, error, data);
- }
- });
- return false;
- }
-}
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFDetailPane.java b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFDetailPane.java
deleted file mode 100644
index 114ac6907..000000000
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFDetailPane.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2011 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.model;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-
-import org.eclipse.debug.ui.IDetailPane;
-import org.eclipse.jface.text.Document;
-import org.eclipse.jface.text.ITextPresentationListener;
-import org.eclipse.jface.text.TextPresentation;
-import org.eclipse.jface.text.source.SourceViewer;
-import org.eclipse.jface.text.source.SourceViewerConfiguration;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.StyleRange;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.ui.IWorkbenchPartSite;
-
-/**
- * This detail pane uses a source viewer to display detailed information about the current
- * selection.
- */
-public class TCFDetailPane implements IDetailPane {
-
- public static final String ID = "org.eclipse.tm.tcf.debug.DetailPaneFactory";
- public static final String NAME = "TCF Detail Pane";
- public static final String DESC = "TCF Detail Pane";
-
- private SourceViewer source_viewer;
- private Display display;
- private int generation;
- @SuppressWarnings("unused")
- private IWorkbenchPartSite part_site;
- private final Document document = new Document();
- private final ArrayList<StyleRange> style_ranges = new ArrayList<StyleRange>();
- private final HashMap<RGB,Color> colors = new HashMap<RGB,Color>();
-
- private final ITextPresentationListener presentation_listener = new ITextPresentationListener() {
- public void applyTextPresentation(TextPresentation presentation) {
- for (StyleRange r : style_ranges) presentation.addStyleRange(r);
- }
- };
-
- public Control createControl(Composite parent) {
- assert source_viewer == null;
- source_viewer = new SourceViewer(parent, null, SWT.V_SCROLL | SWT.H_SCROLL);
- source_viewer.configure(new SourceViewerConfiguration());
- source_viewer.setDocument(document);
- source_viewer.setEditable(false);
- source_viewer.addTextPresentationListener(presentation_listener);
- Control control = source_viewer.getControl();
- GridData gd = new GridData(GridData.FILL_BOTH);
- control.setLayoutData(gd);
- display = control.getDisplay();
- return control;
- }
-
- public void display(IStructuredSelection selection) {
- if (source_viewer == null) return;
- generation++;
- final int g = generation;
- final ArrayList<TCFNode> nodes = new ArrayList<TCFNode>();
- if (selection != null) {
- Iterator<?> iterator = selection.iterator();
- while (iterator.hasNext()) {
- Object next = iterator.next();
- if (next instanceof TCFNode) nodes.add((TCFNode)next);
- }
- }
- Protocol.invokeLater(new Runnable() {
- public void run() {
- if (g != generation) return;
- final StyledStringBuffer s = getDetailText(nodes, this);
- if (s == null) return;
- display.asyncExec(new Runnable() {
- public void run() {
- if (g != generation) return;
- document.set(getStyleRanges(s));
- }
- });
- }
- });
- }
-
- private StyledStringBuffer getDetailText(ArrayList<TCFNode> nodes, Runnable done) {
- StyledStringBuffer bf = new StyledStringBuffer();
- for (TCFNode n : nodes) {
- if (n instanceof IDetailsProvider) {
- if (!((IDetailsProvider)n).getDetailText(bf, done)) return null;
- }
- }
- return bf;
- }
-
- private String getStyleRanges(StyledStringBuffer s) {
- style_ranges.clear();
- for (StyledStringBuffer.Style x : s.getStyle()) {
- style_ranges.add(new StyleRange(x.pos, x.len, getColor(x.fg), getColor(x.bg), x.font));
- }
- return s.toString();
- }
-
- private Color getColor(RGB rgb) {
- if (rgb == null) return null;
- Color c = colors.get(rgb);
- if (c == null) colors.put(rgb, c = new Color(display, rgb));
- return c;
- }
-
- public void dispose() {
- for (Color c : colors.values()) c.dispose();
- colors.clear();
- if (source_viewer == null) return;
- generation++;
- if (source_viewer.getControl() != null) {
- source_viewer.getControl().dispose();
- }
- source_viewer = null;
- }
-
- public String getDescription() {
- return DESC;
- }
-
- public String getID() {
- return ID;
- }
-
- public String getName() {
- return NAME;
- }
-
- public void init(IWorkbenchPartSite part_site) {
- this.part_site = part_site;
- }
-
- public boolean setFocus() {
- if (source_viewer == null) return false;
- source_viewer.getTextWidget().setFocus();
- return true;
- }
-}
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModelPresentation.java b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModelPresentation.java
deleted file mode 100644
index ffa3e2a29..000000000
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModelPresentation.java
+++ /dev/null
@@ -1,171 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2010 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.ui.model;
-
-import java.net.URI;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Map;
-
-import org.eclipse.core.filesystem.EFS;
-import org.eclipse.core.filesystem.URIUtil;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.resources.IStorage;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.debug.core.model.ILineBreakpoint;
-import org.eclipse.debug.core.model.IValue;
-import org.eclipse.debug.ui.IDebugModelPresentation;
-import org.eclipse.debug.ui.IValueDetailListener;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.tm.internal.tcf.debug.model.TCFBreakpoint;
-import org.eclipse.tm.internal.tcf.debug.model.TCFBreakpointsModel;
-import org.eclipse.tm.internal.tcf.debug.ui.Activator;
-import org.eclipse.tm.internal.tcf.debug.ui.ImageCache;
-import org.eclipse.tm.tcf.services.IBreakpoints;
-import org.eclipse.tm.tcf.util.TCFTask;
-import org.eclipse.ui.IEditorDescriptor;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorRegistry;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.ide.FileStoreEditorInput;
-import org.eclipse.ui.part.FileEditorInput;
-
-
-public class TCFModelPresentation implements IDebugModelPresentation {
-
- private final Collection<ILabelProviderListener> listeners = new HashSet<ILabelProviderListener>();
-
- private static final TCFModelPresentation default_instance = new TCFModelPresentation();
-
- public static TCFModelPresentation getDefault() {
- return default_instance;
- }
-
- public void addListener(ILabelProviderListener listener) {
- listeners.add(listener);
- }
-
- public void removeListener(ILabelProviderListener listener) {
- listeners.remove(listener);
- }
-
- public void dispose() {
- }
-
- public void computeDetail(IValue value, IValueDetailListener listener) {
- }
-
- public Image getImage(Object element) {
- ImageDescriptor descriptor = null;
- if (element instanceof TCFBreakpoint) {
- final TCFBreakpoint breakpoint = (TCFBreakpoint)element;
- descriptor = ImageCache.getImageDescriptor(ImageCache.IMG_BREAKPOINT_DISABLED);
- try {
- if (breakpoint.isEnabled()) {
- descriptor = new TCFTask<ImageDescriptor>() {
- public void run() {
- boolean installed = false;
- boolean warning = false;
- boolean error = false;
- ImageDescriptor d = ImageCache.getImageDescriptor(ImageCache.IMG_BREAKPOINT_ENABLED);
- for (Map<String,Object> map : Activator.getAnnotationManager().getBreakpointStatus(breakpoint).values()) {
- if (map != null) {
- if ((String)map.get(IBreakpoints.STATUS_ERROR) != null) error = true;
- Object planted = map.get(IBreakpoints.STATUS_INSTANCES);
- if (planted != null) {
- @SuppressWarnings("unchecked")
- Collection<Map<String,Object>> list = (Collection<Map<String,Object>>)planted;
- for (Map<String,Object> m : list) {
- if (m.get(IBreakpoints.INSTANCE_ERROR) == null) installed = true;
- else warning = true;
- }
- }
- }
- }
- if (warning) d = ImageCache.addOverlay(d, ImageCache.IMG_BREAKPOINT_WARNING, 9, 8);
- if (installed) d = ImageCache.addOverlay(d, ImageCache.IMG_BREAKPOINT_INSTALLED, 0, 8);
- if (error) d = ImageCache.addOverlay(d, ImageCache.IMG_BREAKPOINT_ERROR, 9, 8);
- done(d);
- }
- }.getE();
- }
- if (breakpoint.getMarker().getAttribute(TCFBreakpointsModel.ATTR_CONDITION, null) != null) {
- descriptor = ImageCache.addOverlay(descriptor, ImageCache.IMG_BREAKPOINT_CONDITIONAL);
- }
- }
- catch (Throwable x) {
- }
- }
- if (descriptor != null) return ImageCache.getImage(descriptor);
- return null;
- }
-
- public String getText(Object element) {
- String text = null;
- if (element instanceof TCFBreakpoint) {
- final TCFBreakpoint breakpoint = (TCFBreakpoint)element;
- text = breakpoint.getText();
- String status = new TCFTask<String>() {
- public void run() {
- done(Activator.getAnnotationManager().getBreakpointStatusText(breakpoint));
- }
- }.getE();
- if (status != null) text += " (" + status + ")";
- }
- return text;
- }
-
- public void setAttribute(String attribute, Object value) {
- }
-
- public boolean isLabelProperty(Object element, String property) {
- return true;
- }
-
- public String getEditorId(IEditorInput input, Object element) {
- String id = null;
- if (input != null) {
- IEditorRegistry registry = PlatformUI.getWorkbench().getEditorRegistry();
- IEditorDescriptor descriptor = registry.getDefaultEditor(input.getName());
- if (descriptor != null) id = descriptor.getId();
- }
- return id;
- }
-
- public IEditorInput getEditorInput(Object element) {
- if (element instanceof ILineBreakpoint) {
- element = ((ILineBreakpoint)element).getMarker();
- }
- if (element instanceof IMarker) {
- element = ((IMarker)element).getResource();
- }
- if (element instanceof IFile) {
- return new FileEditorInput((IFile)element);
- }
- if (element instanceof IStorage) {
- IPath fullPath = ((IStorage)element).getFullPath();
- URI uri = URIUtil.toURI(fullPath);
- if (uri != null) {
- try {
- return new FileStoreEditorInput(EFS.getStore(uri));
- }
- catch (CoreException e) {
- Activator.log(e);
- }
- }
- }
- return null;
- }
-}
diff --git a/plugins/org.eclipse.tm.tcf.debug/.options b/plugins/org.eclipse.tm.tcf.debug/.options
deleted file mode 100644
index 7013dfe4f..000000000
--- a/plugins/org.eclipse.tm.tcf.debug/.options
+++ /dev/null
@@ -1,2 +0,0 @@
-org.eclipse.tm.tcf.debug/debug = false
-org.eclipse.tm.tcf.debug/debug/tests/runcontrol = false
diff --git a/plugins/org.eclipse.tm.tcf.debug/META-INF/MANIFEST.MF b/plugins/org.eclipse.tm.tcf.debug/META-INF/MANIFEST.MF
deleted file mode 100644
index 95bb5bf60..000000000
--- a/plugins/org.eclipse.tm.tcf.debug/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,23 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.tm.tcf.debug;singleton:=true
-Bundle-Version: 0.5.0.qualifier
-Bundle-Activator: org.eclipse.tm.internal.tcf.debug.Activator
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.debug.core,
- org.eclipse.core.resources,
- org.eclipse.core.filesystem;bundle-version="1.3.0"
-Import-Package: org.eclipse.tm.tcf.core;version="0.4.0",
- org.eclipse.tm.tcf.protocol;version="0.5.0",
- org.eclipse.tm.tcf.services;version="0.5.0",
- org.eclipse.tm.tcf.util;version="0.4.0"
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Bundle-ActivationPolicy: lazy
-Eclipse-LazyStart: true
-Export-Package: org.eclipse.tm.internal.tcf.debug.launch;x-friends:="org.eclipse.tm.tcf.debug.ui,org.eclipse.tm.tcf.cdt.ui,org.eclipse.tcf.target.ui",
- org.eclipse.tm.internal.tcf.debug.actions;x-friends:="org.eclipse.tm.tcf.debug.ui,org.eclipse.tm.tcf.cdt.ui",
- org.eclipse.tm.internal.tcf.debug.tests;x-friends:="org.eclipse.tm.tcf.debug.ui",
- org.eclipse.tm.internal.tcf.debug.model;x-friends:="org.eclipse.tm.tcf.debug.ui,org.eclipse.tm.tcf.cdt.ui"
diff --git a/plugins/org.eclipse.tm.tcf.debug/agent/GNU/Linux/i386/agent b/plugins/org.eclipse.tm.tcf.debug/agent/GNU/Linux/i386/agent
deleted file mode 100644
index d3d3e7ca6..000000000
--- a/plugins/org.eclipse.tm.tcf.debug/agent/GNU/Linux/i386/agent
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.tm.tcf.debug/agent/Windows/i386/agent.exe b/plugins/org.eclipse.tm.tcf.debug/agent/Windows/i386/agent.exe
deleted file mode 100644
index fb5961d78..000000000
--- a/plugins/org.eclipse.tm.tcf.debug/agent/Windows/i386/agent.exe
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFSourceLookupDirector.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFSourceLookupDirector.java
deleted file mode 100644
index 48cc08230..000000000
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFSourceLookupDirector.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2010 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.internal.tcf.debug.launch;
-
-import org.eclipse.debug.core.model.ISourceLocator;
-import org.eclipse.debug.core.model.IStackFrame;
-import org.eclipse.debug.core.sourcelookup.AbstractSourceLookupDirector;
-import org.eclipse.debug.core.sourcelookup.ISourceLookupDirector;
-import org.eclipse.debug.core.sourcelookup.ISourceLookupParticipant;
-import org.eclipse.tm.tcf.services.ILineNumbers;
-
-/**
- * TCF source lookup director.
- * For TCF source lookup there is one source lookup participant.
- */
-public class TCFSourceLookupDirector extends AbstractSourceLookupDirector {
-
- public static Object lookup(ISourceLocator locator, Object element) {
- Object source_element = null;
- if (locator instanceof ISourceLookupDirector) {
- if (element instanceof ILineNumbers.CodeArea) {
- String file_name = TCFSourceLookupParticipant.toFileName((ILineNumbers.CodeArea)element);
- if (file_name != null) source_element = ((ISourceLookupDirector)locator).getSourceElement(file_name);
- }
- else {
- source_element = ((ISourceLookupDirector)locator).getSourceElement(element);
- }
- }
- else if (element instanceof IStackFrame) {
- source_element = locator.getSourceElement((IStackFrame)element);
- }
- return source_element;
- }
-
- public void initializeParticipants() {
- addParticipants(new ISourceLookupParticipant[] { new TCFSourceLookupParticipant() });
- }
-}
diff --git a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/shells/TCFTerminalOutputStream.java b/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/shells/TCFTerminalOutputStream.java
deleted file mode 100644
index ffb0bae22..000000000
--- a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/shells/TCFTerminalOutputStream.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Intel 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:
- * Liping Ke (Intel Corp.) - initial API and implementation
- ******************************************************************************/
-package org.eclipse.tm.internal.tcf.rse.shells;
-
-import java.io.IOException;
-
-import java.io.OutputStream;
-
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.services.IStreams;
-import org.eclipse.tm.tcf.util.TCFTask;
-
-public class TCFTerminalOutputStream extends OutputStream {
-
- private final IStreams streams;
- private boolean connected = true;
- private boolean write_eof;
- String os_id;
-
- public TCFTerminalOutputStream(final IStreams streams, final String os_id) throws IOException{
- if (streams == null) throw new IOException("istream is null");//$NON-NLS-1$
- this.streams = streams;
- this.os_id = os_id;
- write_eof = false;
- }
-
- @Override
- public synchronized void write(final byte b[], final int off, final int len) throws IOException {
- /* If eof is written, we can't write anything into the stream */
- if (!connected || write_eof)
- throw new IOException("stream is not connected or write_eof already!");//$NON-NLS-1$
- try {
- new TCFTask<Object>() {
- public void run() {
- streams.write(os_id, b, off, len, new IStreams.DoneWrite() {
- public void doneWrite(IToken token, Exception error) {
- if (error != null) error(error);
- done(this);
- }
- });
-
- }
- }.getIO();
- }
- catch (Exception e)
- {
- throw new IOException(e.getMessage());//$NON-NLS-1$
- }
- }
-
- @Override
- public synchronized void write(int b) throws IOException {
-
- try {
- final byte[] buf = new byte[1];
- buf[0] = (byte)b;
- this.write(buf, 0, 1);
- }
- catch(IOException ioe) {
- throw new IOException(ioe.getMessage());//$NON-NLS-1$
- }
-
- }
-
- /* close must be called --Need to reconsider it in the future*/
- public void close() throws IOException {
- if (!connected)
- return;
- try {
- new TCFTask<Object>() {
- public void run() {
- streams.eos(os_id, new IStreams.DoneEOS() {
- public void doneEOS(IToken token, Exception error) {
- write_eof = true;
- done(this);
- }
- });
- }
- }.getIO();
- new TCFTask<Object>() {
- public void run() {
- streams.disconnect(os_id, new IStreams.DoneDisconnect() {
- public void doneDisconnect(IToken token, Exception error) {
- connected = false;
- done(this);
- }
- });
-
- }
- }.getIO();
- }
- catch(Exception e) {
- throw new IOException(e.getMessage()); //$NON-NLS-1$
- }
- }
-
-}
diff --git a/plugins/org.eclipse.tm.tcf/.options b/plugins/org.eclipse.tm.tcf/.options
deleted file mode 100644
index 38d422df7..000000000
--- a/plugins/org.eclipse.tm.tcf/.options
+++ /dev/null
@@ -1,2 +0,0 @@
-org.eclipse.tm.tcf/debug = false
-org.eclipse.tm.tcf/debug/discovery = false
diff --git a/plugins/org.eclipse.tm.tcf/META-INF/MANIFEST.MF b/plugins/org.eclipse.tm.tcf/META-INF/MANIFEST.MF
deleted file mode 100644
index 2d91d5c0e..000000000
--- a/plugins/org.eclipse.tm.tcf/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,16 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-Vendor: %providerName
-Bundle-SymbolicName: org.eclipse.tm.tcf;singleton:=true
-Bundle-Version: 0.5.0.qualifier
-Bundle-Localization: plugin
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Bundle-ActivationPolicy: lazy
-Eclipse-LazyStart: true
-Require-Bundle: org.eclipse.core.runtime
-Bundle-Activator: org.eclipse.tm.tcf.Activator
-Import-Package: org.eclipse.tm.tcf.core;version="0.4.0",
- org.eclipse.tm.tcf.protocol;version="0.5.0"
-Export-Package: org.eclipse.tm.tcf.extensions;version="0.4.0",
- org.eclipse.tm.tcf.ssl;version="0.4.0"
diff --git a/pom.xml b/pom.xml
index d2ee3ca99..0dcaebe5b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -10,7 +10,7 @@
<groupId>org.eclipse.tcf</groupId>
<artifactId>tcf-parent</artifactId>
- <version>0.5.0-SNAPSHOT</version>
+ <version>1.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>TCF Parent</name>
@@ -38,58 +38,63 @@
</licenses>
<modules>
- <module>plugins/org.eclipse.tm.tcf</module>
- <module>plugins/org.eclipse.tm.tcf.core</module>
- <module>plugins/org.eclipse.tm.tcf.debug</module>
- <module>plugins/org.eclipse.tm.tcf.debug.ui</module>
- <module>plugins/org.eclipse.tm.tcf.cdt.ui</module>
- <module>plugins/org.eclipse.tm.tcf.rse</module>
+ <module>plugins/org.eclipse.tcf</module>
+ <module>plugins/org.eclipse.tcf.core</module>
+ <module>plugins/org.eclipse.tcf.debug</module>
+ <module>plugins/org.eclipse.tcf.debug.ui</module>
+ <module>plugins/org.eclipse.tcf.cdt.ui</module>
+ <module>plugins/org.eclipse.tcf.rse</module>
- <module>features/org.eclipse.tm.tcf.feature</module>
- <module>features/org.eclipse.tm.tcf.sdk.feature</module>
- <module>features/org.eclipse.tm.tcf.cdt.feature</module>
- <module>features/org.eclipse.tm.tcf.cdt.sdk.feature</module>
- <module>features/org.eclipse.tm.tcf.rse.feature</module>
- <module>features/org.eclipse.tm.tcf.rse.sdk.feature</module>
+ <module>features/org.eclipse.tcf.feature</module>
+ <module>features/org.eclipse.tcf.sdk.feature</module>
+ <module>features/org.eclipse.tcf.cdt.feature</module>
+ <module>features/org.eclipse.tcf.cdt.sdk.feature</module>
+ <module>features/org.eclipse.tcf.rse.feature</module>
+ <module>features/org.eclipse.tcf.rse.sdk.feature</module>
- <module>target_explorer/plugins/org.eclipse.tm.te.runtime</module>
- <module>target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent</module>
- <module>target_explorer/plugins/org.eclipse.tm.te.runtime.model</module>
- <module>target_explorer/plugins/org.eclipse.tm.te.runtime.persistence</module>
- <module>target_explorer/plugins/org.eclipse.tm.te.runtime.services</module>
- <module>target_explorer/plugins/org.eclipse.tm.te.runtime.statushandler</module>
- <module>target_explorer/plugins/org.eclipse.tm.te.runtime.stepper</module>
- <module>target_explorer/plugins/org.eclipse.tm.te.core</module>
- <module>target_explorer/plugins/org.eclipse.tm.te.ui</module>
- <module>target_explorer/plugins/org.eclipse.tm.te.ui.controls</module>
- <module>target_explorer/plugins/org.eclipse.tm.te.ui.forms</module>
- <module>target_explorer/plugins/org.eclipse.tm.te.ui.swt</module>
- <module>target_explorer/plugins/org.eclipse.tm.te.ui.terminals</module>
- <module>target_explorer/plugins/org.eclipse.tm.te.ui.terminals.process</module>
- <module>target_explorer/plugins/org.eclipse.tm.te.ui.terminals.ssh</module>
- <module>target_explorer/plugins/org.eclipse.tm.te.ui.views</module>
- <module>target_explorer/plugins/org.eclipse.tm.te.tcf.core</module>
- <module>target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem</module>
- <module>target_explorer/plugins/org.eclipse.tm.te.tcf.locator</module>
- <module>target_explorer/plugins/org.eclipse.tm.te.tcf.log.core</module>
- <module>target_explorer/plugins/org.eclipse.tm.te.tcf.processes.core</module>
- <module>target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui</module>
- <module>target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.core</module>
- <module>target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.ui</module>
- <module>target_explorer/plugins/org.eclipse.tm.te.tcf.ui</module>
+ <module>target_explorer/plugins/org.eclipse.tcf.te.runtime</module>
+ <module>target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent</module>
+ <module>target_explorer/plugins/org.eclipse.tcf.te.runtime.model</module>
+ <module>target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence</module>
+ <module>target_explorer/plugins/org.eclipse.tcf.te.runtime.services</module>
+ <module>target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler</module>
+ <module>target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper</module>
+ <module>target_explorer/plugins/org.eclipse.tcf.te.core</module>
+ <module>target_explorer/plugins/org.eclipse.tcf.te.launch.core</module>
+ <module>target_explorer/plugins/org.eclipse.tcf.te.launch.ui</module>
+ <module>target_explorer/plugins/org.eclipse.tcf.te.ui</module>
+ <module>target_explorer/plugins/org.eclipse.tcf.te.ui.controls</module>
+ <module>target_explorer/plugins/org.eclipse.tcf.te.ui.forms</module>
+ <module>target_explorer/plugins/org.eclipse.tcf.te.ui.swt</module>
+ <module>target_explorer/plugins/org.eclipse.tcf.te.ui.terminals</module>
+ <module>target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process</module>
+ <module>target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh</module>
+ <module>target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet</module>
+ <module>target_explorer/plugins/org.eclipse.tcf.te.ui.views</module>
+ <module>target_explorer/plugins/org.eclipse.tcf.te.tcf.core</module>
+ <module>target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting</module>
+ <module>target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core</module>
+ <module>target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui</module>
+ <module>target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem</module>
+ <module>target_explorer/plugins/org.eclipse.tcf.te.tcf.locator</module>
+ <module>target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core</module>
+ <module>target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core</module>
+ <module>target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui</module>
+ <module>target_explorer/plugins/org.eclipse.tcf.te.tcf.services.contexts</module>
+ <module>target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core</module>
+ <module>target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.ui</module>
+ <module>target_explorer/plugins/org.eclipse.tcf.te.tcf.ui</module>
+ <module>target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console</module>
+ <module>target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views</module>
- <module>target_explorer/features/org.eclipse.tm.te.feature</module>
- <module>target_explorer/features/org.eclipse.tm.te.sdk.feature</module>
- <module>target_explorer/features/org.eclipse.tm.te.cdt.feature</module>
- <module>target_explorer/features/org.eclipse.tm.te.cdt.sdk.feature</module>
- <module>target_explorer/features/org.eclipse.tm.te.tcf.feature</module>
- <module>target_explorer/features/org.eclipse.tm.te.tcf.sdk.feature</module>
+ <module>target_explorer/features/org.eclipse.tcf.te.feature</module>
+ <module>target_explorer/features/org.eclipse.tcf.te.sdk.feature</module>
+ <module>target_explorer/features/org.eclipse.tcf.te.cdt.feature</module>
+ <module>target_explorer/features/org.eclipse.tcf.te.cdt.sdk.feature</module>
+ <module>target_explorer/features/org.eclipse.tcf.te.tcf.feature</module>
+ <module>target_explorer/features/org.eclipse.tcf.te.tcf.sdk.feature</module>
-<!--
- <module>target_explorer/plugins/org.eclipse.tm.te.tests</module>
--->
-
- <module>features/org.eclipse.tm.tcf.repo</module>
+ <module>features/org.eclipse.tcf.repo</module>
</modules>
<repositories>
@@ -266,4 +271,4 @@
</plugins>
</pluginManagement>
</build>
-</project>
+</project> \ No newline at end of file
diff --git a/target_explorer/plugins/org.eclipse.tm.te.core/.classpath b/target_explorer/experimental/plugins/org.eclipse.tcf.te.ui.sequoyah.vnc/.classpath
index 8a8f1668c..8a8f1668c 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.core/.classpath
+++ b/target_explorer/experimental/plugins/org.eclipse.tcf.te.ui.sequoyah.vnc/.classpath
diff --git a/target_explorer/experimental/plugins/org.eclipse.tcf.te.ui.sequoyah.vnc/.project b/target_explorer/experimental/plugins/org.eclipse.tcf.te.ui.sequoyah.vnc/.project
new file mode 100644
index 000000000..5e7e23909
--- /dev/null
+++ b/target_explorer/experimental/plugins/org.eclipse.tcf.te.ui.sequoyah.vnc/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.tcf.te.ui.sequoyah.vnc</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/target_explorer/experimental/plugins/org.eclipse.tcf.te.ui.sequoyah.vnc/.settings/org.eclipse.jdt.core.prefs b/target_explorer/experimental/plugins/org.eclipse.tcf.te.ui.sequoyah.vnc/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..8702c3fb1
--- /dev/null
+++ b/target_explorer/experimental/plugins/org.eclipse.tcf.te.ui.sequoyah.vnc/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,362 @@
+#Thu Dec 01 09:27:41 CET 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+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.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.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=enabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=enabled
+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.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=warning
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
+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=warning
+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=enabled
+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.unusedObjectAllocation=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
+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.6
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=0
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=0
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=0
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=0
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=0
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=true
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
+org.eclipse.jdt.core.formatter.comment.line_length=100
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=4
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=4
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=true
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=true
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=true
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=true
+org.eclipse.jdt.core.formatter.lineSplit=100
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=true
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/target_explorer/experimental/plugins/org.eclipse.tcf.te.ui.sequoyah.vnc/.settings/org.eclipse.jdt.ui.prefs b/target_explorer/experimental/plugins/org.eclipse.tcf.te.ui.sequoyah.vnc/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 000000000..3e41b2673
--- /dev/null
+++ b/target_explorer/experimental/plugins/org.eclipse.tcf.te.ui.sequoyah.vnc/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,4 @@
+#Thu Dec 01 09:27:41 CET 2011
+eclipse.preferences.version=1
+formatter_profile=_Target Explorer Java STD
+formatter_settings_version=12
diff --git a/target_explorer/experimental/plugins/org.eclipse.tcf.te.ui.sequoyah.vnc/META-INF/MANIFEST.MF b/target_explorer/experimental/plugins/org.eclipse.tcf.te.ui.sequoyah.vnc/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..1247c435c
--- /dev/null
+++ b/target_explorer/experimental/plugins/org.eclipse.tcf.te.ui.sequoyah.vnc/META-INF/MANIFEST.MF
@@ -0,0 +1,20 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.tcf.te.ui.sequoyah.vnc;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipse.tcf.te.ui.sequoyah.vnc.activator.UIPlugin
+Bundle-Vendor: %providerName
+Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
+ org.eclipse.ui;bundle-version="3.7.0",
+ org.eclipse.tcf.core;bundle-version="1.0.0",
+ org.eclipse.tcf.te.core;bundle-version="1.0.0",
+ org.eclipse.tcf.te.runtime;bundle-version="1.0.0",
+ org.eclipse.tcf.te.tcf.locator;bundle-version="1.0.0",
+ org.eclipse.tcf.te.ui;bundle-version="1.0.0",
+ org.eclipse.tcf.te.ui.views;bundle-version="1.0.0",
+ org.eclipse.sequoyah.vnc.vncviewer;bundle-version="1.0.0",
+ org.eclipse.sequoyah.vnc.vncviewer.vncviews;bundle-version="1.0.0"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
+Bundle-Localization: plugin
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.process/build.properties b/target_explorer/experimental/plugins/org.eclipse.tcf.te.ui.sequoyah.vnc/build.properties
index 8665ac2ff..8665ac2ff 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.process/build.properties
+++ b/target_explorer/experimental/plugins/org.eclipse.tcf.te.ui.sequoyah.vnc/build.properties
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/plugin.properties b/target_explorer/experimental/plugins/org.eclipse.tcf.te.ui.sequoyah.vnc/plugin.properties
index b6921ad9e..1a0f4ef69 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/plugin.properties
+++ b/target_explorer/experimental/plugins/org.eclipse.tcf.te.ui.sequoyah.vnc/plugin.properties
@@ -8,15 +8,11 @@
# Wind River Systems - initial API and implementation
##################################################################################
-pluginName = Target Explorer, TCF Processes Extensions UI
+pluginName = Target Explorer, Sequoyah VNC Viewer Extensions UI
providerName = Eclipse.org
-# ***** Editor Pages *****
-
-ProcessExplorerEditorPage.name=Processes
-
# ***** Command Contributions *****
-Processes.command.launch.name=Run Remote Process Command
-Processes.command.launch.label=&Run Remote Process...
-Processes.command.launch.tooltip=Execute the specified process image on the selected peer.
+command.launch.name=Launch VNC Viewer Command
+command.launch.label=Launch VNC Viewer...
+command.launch.tooltip=Opens a VNC Viewer on the selected peer.
diff --git a/target_explorer/experimental/plugins/org.eclipse.tcf.te.ui.sequoyah.vnc/plugin.xml b/target_explorer/experimental/plugins/org.eclipse.tcf.te.ui.sequoyah.vnc/plugin.xml
new file mode 100644
index 000000000..38f1bc837
--- /dev/null
+++ b/target_explorer/experimental/plugins/org.eclipse.tcf.te.ui.sequoyah.vnc/plugin.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+
+<!-- Menu contributions -->
+ <extension point="org.eclipse.ui.menus">
+ <menuContribution locationURI="popup:org.eclipse.tcf.te.ui.views.TargetExplorer#Popup?after=group.launch">
+ <command
+ commandId="org.eclipse.tcf.te.ui.sequoyah.vnc.command.launch"
+ helpContextId="org.eclipse.tcf.te.ui.sequoyah.vnc.command.launch"
+ icon="platform:/plugin/org.eclipse.sequoyah.vnc.vncviewer.vncviews/icons/vncMonitor.gif"
+ id="org.eclipse.tcf.te.ui.terminals.commands.launch"
+ label="%command.launch.label"
+ style="push"
+ tooltip="%command.launch.tooltip">
+ <visibleWhen checkEnabled="false">
+ <with variable="selection">
+ <count value="1"/>
+ <iterate operator="and" ifEmpty="false">
+ <instanceof value="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel"/>
+ </iterate>
+ </with>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ </extension>
+
+<!-- Command contributions -->
+ <extension point="org.eclipse.ui.commands">
+ <command
+ categoryId="org.eclipse.tcf.te.ui.commands.category"
+ helpContextId="org.eclipse.tcf.te.ui.sequoyah.vnc.command.launch"
+ id="org.eclipse.tcf.te.ui.sequoyah.vnc.command.launch"
+ name="%command.launch.name">
+ </command>
+ </extension>
+
+<!-- Handler contributions -->
+ <extension point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.tcf.te.ui.sequoyah.vnc.handler.LaunchVNCCommandHandler"
+ commandId="org.eclipse.tcf.te.ui.sequoyah.vnc.command.launch">
+ </handler>
+ </extension>
+
+</plugin>
diff --git a/target_explorer/experimental/plugins/org.eclipse.tcf.te.ui.sequoyah.vnc/src/org/eclipse/tcf/te/ui/sequoyah/vnc/activator/UIPlugin.java b/target_explorer/experimental/plugins/org.eclipse.tcf.te.ui.sequoyah.vnc/src/org/eclipse/tcf/te/ui/sequoyah/vnc/activator/UIPlugin.java
new file mode 100644
index 000000000..8edba82f6
--- /dev/null
+++ b/target_explorer/experimental/plugins/org.eclipse.tcf.te.ui.sequoyah.vnc/src/org/eclipse/tcf/te/ui/sequoyah/vnc/activator/UIPlugin.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.sequoyah.vnc.activator;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class UIPlugin extends AbstractUIPlugin {
+ // The shared instance
+ private static UIPlugin plugin;
+
+ /**
+ * The constructor
+ */
+ public UIPlugin() {
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static UIPlugin getDefault() {
+ return plugin;
+ }
+
+ /**
+ * Convenience method which returns the unique identifier of this plugin.
+ */
+ public static String getUniqueIdentifier() {
+ if (getDefault() != null && getDefault().getBundle() != null) {
+ return getDefault().getBundle().getSymbolicName();
+ }
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+}
diff --git a/target_explorer/experimental/plugins/org.eclipse.tcf.te.ui.sequoyah.vnc/src/org/eclipse/tcf/te/ui/sequoyah/vnc/handler/LaunchVNCCommandHandler.java b/target_explorer/experimental/plugins/org.eclipse.tcf.te.ui.sequoyah.vnc/src/org/eclipse/tcf/te/ui/sequoyah/vnc/handler/LaunchVNCCommandHandler.java
new file mode 100644
index 000000000..c9d10e114
--- /dev/null
+++ b/target_explorer/experimental/plugins/org.eclipse.tcf.te.ui.sequoyah.vnc/src/org/eclipse/tcf/te/ui/sequoyah/vnc/handler/LaunchVNCCommandHandler.java
@@ -0,0 +1,167 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.sequoyah.vnc.handler;
+
+import java.io.IOException;
+import java.util.concurrent.atomic.AtomicReference;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+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.dialogs.MessageDialog;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.sequoyah.vnc.vncviewer.vncviews.views.Messages;
+import org.eclipse.sequoyah.vnc.vncviewer.vncviews.views.VNCViewerView;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+/**
+ * Launch terminal command handler implementation.
+ */
+public class LaunchVNCCommandHandler extends AbstractHandler {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+ */
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ // Get the current selection
+ ISelection selection = HandlerUtil.getCurrentSelection(event);
+
+ if (selection instanceof IStructuredSelection && !selection.isEmpty()) {
+ Object element = ((IStructuredSelection)selection).getFirstElement();
+ if (element instanceof IPeerModel) {
+ final IPeerModel peerModel = (IPeerModel)element;
+ final AtomicReference<String> ip = new AtomicReference<String>();
+
+ Runnable runnable = new Runnable() {
+ @Override
+ public void run() {
+ ip.set(peerModel.getPeer().getAttributes().get(IPeer.ATTR_IP_HOST));
+ }
+ };
+
+ if (Protocol.isDispatchThread()) runnable.run();
+ else Protocol.invokeAndWait(runnable);
+
+ IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+ try {
+ page.showView("org.eclipse.sequoyah.vnc.vncviewer.vncviews.views.VNCViewerView"); //$NON-NLS-1$
+
+ VNCViewerView.start(ip.get(), 5900, "VNC 3.7", "123456", false); //$NON-NLS-1$ //$NON-NLS-2$
+ } catch (Exception e) { /* ignored on purpose */ }
+ }
+ }
+
+ return null;
+ }
+
+ // Copied over the connect job implementation from org.eclipse.sequoyah.vnc.vncviewer.vncviews.views.OpenConnectionDialog.
+ // As it would preferable to use the OpenConnectionDialog directly, it has some bad layout and does not allow to preset
+ // the dialog fields from outside. To get rid of the connect job implementation here, we have to try to get in some extension
+ // to the dialog to make it more pretty.
+
+ public class ConnectJob extends Job{
+ final String host;
+ final int port;
+ final String password;
+ final String version;
+ final boolean isBypassProxy;
+
+ public ConnectJob(String host,int port,String password,String version,boolean isBypassProxy){
+ super(Messages.OpenConnectionDialog_1+host+":"+port); //$NON-NLS-1$
+ this.host=host;
+ this.port=port;
+ this.password=password;
+ this.version=version;
+ this.isBypassProxy=isBypassProxy;
+
+ }
+
+ @Override
+ public IStatus run(IProgressMonitor monitor) {
+ monitor.beginTask(Messages.OpenConnectionDialog_2, 2);
+ if(VNCViewerView.getSWTRemoteDisplay().isActive()){
+ if(isStopExistingClient()){
+ VNCViewerView.stop();
+ try {
+ VNCViewerView.stopProtocol();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }else{
+ monitor.done();
+ return Status.OK_STATUS;
+ }
+ }
+
+ if(!isStepNeeded(monitor, Messages.OpenConnectionDialog_3)){
+ return Status.CANCEL_STATUS;
+ }
+
+ VNCViewerView.start(host, port, version, password,isBypassProxy);
+ monitor.done();
+ return Status.OK_STATUS;
+ }
+
+ private boolean isStepNeeded(IProgressMonitor monitor,String stepName){
+ if(!monitor.isCanceled()){
+ monitor.worked(1);
+ monitor.setTaskName(stepName);
+ return true;
+ }
+ return false;
+ }
+ }
+
+ public boolean isStopExistingClient() {
+ final Display display = Display.getDefault();
+ RunnableMessageDialog msgd = new RunnableMessageDialog(display);
+ display.syncExec(msgd);
+ return msgd.returnCode==0;
+ }
+
+ private class RunnableMessageDialog implements Runnable{
+ private Display display;
+ int returnCode;
+
+ public RunnableMessageDialog(Display display){
+ this.display=display;
+ }
+
+ @Override
+ public void run() {
+
+ MessageDialog dialog =
+ new MessageDialog(display.getActiveShell(),
+ Messages.OpenConnectionDialog_6,
+ null,
+ Messages.OpenConnectionDialog_7 + VNCViewerView.getCurrentHost()
+ + ":" + VNCViewerView.getCurrentPort() + "?", //$NON-NLS-1$ //$NON-NLS-2$
+ MessageDialog.QUESTION,
+ new String[]{Messages.OpenConnectionDialog_10,Messages.OpenConnectionDialog_11},
+ 0);
+ dialog.open();
+ returnCode=dialog.getReturnCode();
+ }
+
+ }
+
+}
diff --git a/target_explorer/features/org.eclipse.tm.te.cdt.feature/.project b/target_explorer/features/org.eclipse.tcf.te.cdt.feature/.project
index 82b7393ec..4d2399e93 100644
--- a/target_explorer/features/org.eclipse.tm.te.cdt.feature/.project
+++ b/target_explorer/features/org.eclipse.tcf.te.cdt.feature/.project
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.eclipse.tm.te.cdt.feature</name>
+ <name>org.eclipse.tcf.te.cdt.feature</name>
<comment></comment>
<projects>
</projects>
diff --git a/target_explorer/features/org.eclipse.tm.te.cdt.feature/build.properties b/target_explorer/features/org.eclipse.tcf.te.cdt.feature/build.properties
index a601e3050..a601e3050 100644
--- a/target_explorer/features/org.eclipse.tm.te.cdt.feature/build.properties
+++ b/target_explorer/features/org.eclipse.tcf.te.cdt.feature/build.properties
diff --git a/target_explorer/features/org.eclipse.tm.te.cdt.feature/epl-v10.html b/target_explorer/features/org.eclipse.tcf.te.cdt.feature/epl-v10.html
index b6a0ff4b8..b6a0ff4b8 100644
--- a/target_explorer/features/org.eclipse.tm.te.cdt.feature/epl-v10.html
+++ b/target_explorer/features/org.eclipse.tcf.te.cdt.feature/epl-v10.html
diff --git a/target_explorer/features/org.eclipse.tm.te.cdt.feature/feature.properties b/target_explorer/features/org.eclipse.tcf.te.cdt.feature/feature.properties
index e7218a14a..9ff8bb10b 100644
--- a/target_explorer/features/org.eclipse.tm.te.cdt.feature/feature.properties
+++ b/target_explorer/features/org.eclipse.tcf.te.cdt.feature/feature.properties
@@ -14,7 +14,7 @@
# This file should be translated.
# "featureName" property - name of the feature
-featureName=Target Explorer (Incubation), CDT based Extensions
+featureName=Target Explorer, CDT based Extensions
# "featureProvide" property - name of the company that provides the feature
featureProvider=Eclipse.org
diff --git a/target_explorer/features/org.eclipse.tm.te.cdt.feature/feature.xml b/target_explorer/features/org.eclipse.tcf.te.cdt.feature/feature.xml
index 5e27def83..65cfceb59 100644
--- a/target_explorer/features/org.eclipse.tm.te.cdt.feature/feature.xml
+++ b/target_explorer/features/org.eclipse.tcf.te.cdt.feature/feature.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<feature
- id="org.eclipse.tm.te.cdt.feature"
+ id="org.eclipse.tcf.te.cdt.feature"
label="%featureName"
version="1.0.0.qualifier"
provider-name="%featureProvider">
@@ -22,11 +22,11 @@
<import plugin="org.eclipse.ui" version="3.7.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.tm.terminal" version="3.1.1" match="greaterOrEqual"/>
<import plugin="org.eclipse.cdt.core" version="5.3.1" match="greaterOrEqual"/>
- <import feature="org.eclipse.tm.tcf.feature" version="0.5.0" match="greaterOrEqual"/>
+ <import feature="org.eclipse.tcf.feature" version="1.0.0" match="greaterOrEqual"/>
</requires>
<plugin
- id="org.eclipse.tm.te.ui.terminals.process"
+ id="org.eclipse.tcf.te.ui.terminals.process"
download-size="0"
install-size="0"
version="0.0.0"
diff --git a/target_explorer/features/org.eclipse.tm.te.cdt.feature/license.html b/target_explorer/features/org.eclipse.tcf.te.cdt.feature/license.html
index 693054086..693054086 100644
--- a/target_explorer/features/org.eclipse.tm.te.cdt.feature/license.html
+++ b/target_explorer/features/org.eclipse.tcf.te.cdt.feature/license.html
diff --git a/target_explorer/features/org.eclipse.tm.te.cdt.feature/pom.xml b/target_explorer/features/org.eclipse.tcf.te.cdt.feature/pom.xml
index b322eb163..19471efd5 100644
--- a/target_explorer/features/org.eclipse.tm.te.cdt.feature/pom.xml
+++ b/target_explorer/features/org.eclipse.tcf.te.cdt.feature/pom.xml
@@ -7,11 +7,11 @@
<parent>
<groupId>org.eclipse.tcf</groupId>
<artifactId>tcf-parent</artifactId>
- <version>0.5.0-SNAPSHOT</version>
+ <version>1.0.0-SNAPSHOT</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<version>1.0.0.qualifier</version>
- <artifactId>org.eclipse.tm.te.cdt.feature</artifactId>
+ <artifactId>org.eclipse.tcf.te.cdt.feature</artifactId>
<packaging>eclipse-feature</packaging>
</project>
diff --git a/target_explorer/features/org.eclipse.tm.te.cdt.sdk.feature/.project b/target_explorer/features/org.eclipse.tcf.te.cdt.sdk.feature/.project
index bd07e8ebc..d1deff858 100644
--- a/target_explorer/features/org.eclipse.tm.te.cdt.sdk.feature/.project
+++ b/target_explorer/features/org.eclipse.tcf.te.cdt.sdk.feature/.project
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.eclipse.tm.te.cdt.sdk.feature</name>
+ <name>org.eclipse.tcf.te.cdt.sdk.feature</name>
<comment></comment>
<projects>
</projects>
diff --git a/target_explorer/features/org.eclipse.tm.te.cdt.sdk.feature/build.properties b/target_explorer/features/org.eclipse.tcf.te.cdt.sdk.feature/build.properties
index 0418e5c04..0418e5c04 100644
--- a/target_explorer/features/org.eclipse.tm.te.cdt.sdk.feature/build.properties
+++ b/target_explorer/features/org.eclipse.tcf.te.cdt.sdk.feature/build.properties
diff --git a/target_explorer/features/org.eclipse.tm.te.cdt.sdk.feature/epl-v10.html b/target_explorer/features/org.eclipse.tcf.te.cdt.sdk.feature/epl-v10.html
index b6a0ff4b8..b6a0ff4b8 100644
--- a/target_explorer/features/org.eclipse.tm.te.cdt.sdk.feature/epl-v10.html
+++ b/target_explorer/features/org.eclipse.tcf.te.cdt.sdk.feature/epl-v10.html
diff --git a/target_explorer/features/org.eclipse.tm.te.cdt.sdk.feature/feature.properties b/target_explorer/features/org.eclipse.tcf.te.cdt.sdk.feature/feature.properties
index c139c17ec..4b974d8f2 100644
--- a/target_explorer/features/org.eclipse.tm.te.cdt.sdk.feature/feature.properties
+++ b/target_explorer/features/org.eclipse.tcf.te.cdt.sdk.feature/feature.properties
@@ -14,7 +14,7 @@
# This file should be translated.
# "featureName" property - name of the feature
-featureName=Target Explorer (Incubation) SDK, CDT based Extensions
+featureName=Target Explorer SDK, CDT based Extensions
# "featureProvide" property - name of the company that provides the feature
featureProvider=Eclipse.org
diff --git a/target_explorer/features/org.eclipse.tm.te.cdt.sdk.feature/feature.xml b/target_explorer/features/org.eclipse.tcf.te.cdt.sdk.feature/feature.xml
index fceba3431..f712964d0 100644
--- a/target_explorer/features/org.eclipse.tm.te.cdt.sdk.feature/feature.xml
+++ b/target_explorer/features/org.eclipse.tcf.te.cdt.sdk.feature/feature.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<feature
- id="org.eclipse.tm.te.cdt.sdk.feature"
+ id="org.eclipse.tcf.te.cdt.sdk.feature"
label="%featureName"
version="1.0.0.qualifier"
provider-name="%featureProvider">
@@ -18,12 +18,12 @@
</license>
<requires>
- <import feature="org.eclipse.tm.te.sdk.feature" version="1.0.0" match="greaterOrEqual"/>
- <import feature="org.eclipse.tm.te.cdt.feature" version="1.0.0" match="greaterOrEqual"/>
+ <import feature="org.eclipse.tcf.te.sdk.feature" version="1.0.0" match="greaterOrEqual"/>
+ <import feature="org.eclipse.tcf.te.cdt.feature" version="1.0.0" match="greaterOrEqual"/>
</requires>
<plugin
- id="org.eclipse.tm.te.ui.terminals.process.source"
+ id="org.eclipse.tcf.te.ui.terminals.process.source"
download-size="0"
install-size="0"
version="0.0.0"
diff --git a/target_explorer/features/org.eclipse.tm.te.cdt.sdk.feature/license.html b/target_explorer/features/org.eclipse.tcf.te.cdt.sdk.feature/license.html
index 693054086..693054086 100644
--- a/target_explorer/features/org.eclipse.tm.te.cdt.sdk.feature/license.html
+++ b/target_explorer/features/org.eclipse.tcf.te.cdt.sdk.feature/license.html
diff --git a/target_explorer/features/org.eclipse.tm.te.cdt.sdk.feature/pom.xml b/target_explorer/features/org.eclipse.tcf.te.cdt.sdk.feature/pom.xml
index 2cb103d6d..5a72eb2bb 100644
--- a/target_explorer/features/org.eclipse.tm.te.cdt.sdk.feature/pom.xml
+++ b/target_explorer/features/org.eclipse.tcf.te.cdt.sdk.feature/pom.xml
@@ -7,11 +7,11 @@
<parent>
<groupId>org.eclipse.tcf</groupId>
<artifactId>tcf-parent</artifactId>
- <version>0.5.0-SNAPSHOT</version>
+ <version>1.0.0-SNAPSHOT</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<version>1.0.0.qualifier</version>
- <artifactId>org.eclipse.tm.te.cdt.sdk.feature</artifactId>
+ <artifactId>org.eclipse.tcf.te.cdt.sdk.feature</artifactId>
<packaging>eclipse-feature</packaging>
</project>
diff --git a/target_explorer/features/org.eclipse.tm.te.feature/.project b/target_explorer/features/org.eclipse.tcf.te.feature/.project
index 07f880732..c9801e7ea 100644
--- a/target_explorer/features/org.eclipse.tm.te.feature/.project
+++ b/target_explorer/features/org.eclipse.tcf.te.feature/.project
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.eclipse.tm.te.feature</name>
+ <name>org.eclipse.tcf.te.feature</name>
<comment></comment>
<projects>
</projects>
diff --git a/target_explorer/features/org.eclipse.tm.te.feature/build.properties b/target_explorer/features/org.eclipse.tcf.te.feature/build.properties
index a601e3050..a601e3050 100644
--- a/target_explorer/features/org.eclipse.tm.te.feature/build.properties
+++ b/target_explorer/features/org.eclipse.tcf.te.feature/build.properties
diff --git a/target_explorer/features/org.eclipse.tm.te.feature/epl-v10.html b/target_explorer/features/org.eclipse.tcf.te.feature/epl-v10.html
index b6a0ff4b8..b6a0ff4b8 100644
--- a/target_explorer/features/org.eclipse.tm.te.feature/epl-v10.html
+++ b/target_explorer/features/org.eclipse.tcf.te.feature/epl-v10.html
diff --git a/target_explorer/features/org.eclipse.tm.te.feature/feature.properties b/target_explorer/features/org.eclipse.tcf.te.feature/feature.properties
index c0c445160..268b0905e 100644
--- a/target_explorer/features/org.eclipse.tm.te.feature/feature.properties
+++ b/target_explorer/features/org.eclipse.tcf.te.feature/feature.properties
@@ -14,7 +14,7 @@
# This file should be translated.
# "featureName" property - name of the feature
-featureName=Target Explorer (Incubation)
+featureName=Target Explorer
# "featureProvide" property - name of the company that provides the feature
featureProvider=Eclipse.org
diff --git a/target_explorer/features/org.eclipse.tm.te.feature/feature.xml b/target_explorer/features/org.eclipse.tcf.te.feature/feature.xml
index 8187aa1a3..9a6596a01 100644
--- a/target_explorer/features/org.eclipse.tm.te.feature/feature.xml
+++ b/target_explorer/features/org.eclipse.tcf.te.feature/feature.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<feature
- id="org.eclipse.tm.te.feature"
+ id="org.eclipse.tcf.te.feature"
label="%featureName"
version="1.0.0.qualifier"
provider-name="%featureProvider">
@@ -27,109 +27,134 @@
<import plugin="org.eclipse.tm.terminal" version="3.1.1" match="greaterOrEqual"/>
<import plugin="org.eclipse.tm.terminal.telnet" version="2.1.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.tm.terminal.view" version="2.2.0" match="greaterOrEqual"/>
+ <import plugin="org.eclipse.tm.terminal.ssh" version="2.1.0" match="greaterOrEqual"/>
+ <import plugin="org.eclipse.equinox.security" version="1.1.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.ui.navigator" version="3.5.100" match="greaterOrEqual"/>
+ <import feature="org.eclipse.tcf.feature" version="1.0.0.qualifier"/>
</requires>
<plugin
- id="org.eclipse.tm.te.runtime"
+ id="org.eclipse.tcf.te.core"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
- id="org.eclipse.tm.te.runtime.concurrent"
+ id="org.eclipse.tcf.te.launch.core"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
- id="org.eclipse.tm.te.runtime.model"
+ id="org.eclipse.tcf.te.launch.ui"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
- id="org.eclipse.tm.te.runtime.persistence"
+ id="org.eclipse.tcf.te.runtime"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
- id="org.eclipse.tm.te.runtime.services"
+ id="org.eclipse.tcf.te.runtime.concurrent"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
- id="org.eclipse.tm.te.runtime.statushandler"
+ id="org.eclipse.tcf.te.runtime.model"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
- id="org.eclipse.tm.te.runtime.stepper"
+ id="org.eclipse.tcf.te.runtime.persistence"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
- id="org.eclipse.tm.te.core"
+ id="org.eclipse.tcf.te.runtime.services"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
- id="org.eclipse.tm.te.ui"
+ id="org.eclipse.tcf.te.runtime.statushandler"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
- id="org.eclipse.tm.te.ui.controls"
+ id="org.eclipse.tcf.te.runtime.stepper"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+
+ <plugin
+ id="org.eclipse.tcf.te.ui"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.tcf.te.ui.controls"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.tcf.te.ui.forms"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
- id="org.eclipse.tm.te.ui.forms"
+ id="org.eclipse.tcf.te.ui.swt"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
- id="org.eclipse.tm.te.ui.swt"
+ id="org.eclipse.tcf.te.ui.terminals"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
- id="org.eclipse.tm.te.ui.terminals"
+ id="org.eclipse.tcf.te.ui.terminals.ssh"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
- id="org.eclipse.tm.te.ui.terminals.ssh"
+ id="org.eclipse.tcf.te.ui.terminals.telnet"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
- id="org.eclipse.tm.te.ui.views"
+ id="org.eclipse.tcf.te.ui.views"
download-size="0"
install-size="0"
version="0.0.0"
diff --git a/target_explorer/features/org.eclipse.tm.te.feature/license.html b/target_explorer/features/org.eclipse.tcf.te.feature/license.html
index 693054086..693054086 100644
--- a/target_explorer/features/org.eclipse.tm.te.feature/license.html
+++ b/target_explorer/features/org.eclipse.tcf.te.feature/license.html
diff --git a/target_explorer/features/org.eclipse.tm.te.feature/pom.xml b/target_explorer/features/org.eclipse.tcf.te.feature/pom.xml
index 389cd5363..01140ef94 100644
--- a/target_explorer/features/org.eclipse.tm.te.feature/pom.xml
+++ b/target_explorer/features/org.eclipse.tcf.te.feature/pom.xml
@@ -7,11 +7,11 @@
<parent>
<groupId>org.eclipse.tcf</groupId>
<artifactId>tcf-parent</artifactId>
- <version>0.5.0-SNAPSHOT</version>
+ <version>1.0.0-SNAPSHOT</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<version>1.0.0.qualifier</version>
- <artifactId>org.eclipse.tm.te.feature</artifactId>
+ <artifactId>org.eclipse.tcf.te.feature</artifactId>
<packaging>eclipse-feature</packaging>
</project>
diff --git a/target_explorer/features/org.eclipse.tm.te.rcp.feature/.project b/target_explorer/features/org.eclipse.tcf.te.rcp.feature/.project
index 0b158d9c7..0e2b14656 100644
--- a/target_explorer/features/org.eclipse.tm.te.rcp.feature/.project
+++ b/target_explorer/features/org.eclipse.tcf.te.rcp.feature/.project
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.eclipse.tm.te.rcp.feature</name>
+ <name>org.eclipse.tcf.te.rcp.feature</name>
<comment></comment>
<projects>
</projects>
diff --git a/target_explorer/features/org.eclipse.tm.te.rcp.feature/build.properties b/target_explorer/features/org.eclipse.tcf.te.rcp.feature/build.properties
index f81919125..f81919125 100644
--- a/target_explorer/features/org.eclipse.tm.te.rcp.feature/build.properties
+++ b/target_explorer/features/org.eclipse.tcf.te.rcp.feature/build.properties
diff --git a/target_explorer/features/org.eclipse.tm.te.rcp.feature/epl-v10.html b/target_explorer/features/org.eclipse.tcf.te.rcp.feature/epl-v10.html
index b6a0ff4b8..b6a0ff4b8 100644
--- a/target_explorer/features/org.eclipse.tm.te.rcp.feature/epl-v10.html
+++ b/target_explorer/features/org.eclipse.tcf.te.rcp.feature/epl-v10.html
diff --git a/target_explorer/features/org.eclipse.tm.te.rcp.feature/feature.properties b/target_explorer/features/org.eclipse.tcf.te.rcp.feature/feature.properties
index 81a87c416..48a36176f 100644
--- a/target_explorer/features/org.eclipse.tm.te.rcp.feature/feature.properties
+++ b/target_explorer/features/org.eclipse.tcf.te.rcp.feature/feature.properties
@@ -14,7 +14,7 @@
# This file should be translated.
# "featureName" property - name of the feature
-featureName=Target Explorer (Incubation)
+featureName=Target Explorer
# "featureProvide" property - name of the company that provides the feature
featureProvider=Eclipse.org
diff --git a/target_explorer/features/org.eclipse.tm.te.rcp.feature/feature.xml b/target_explorer/features/org.eclipse.tcf.te.rcp.feature/feature.xml
index f9fa9c5f1..768f82e03 100644
--- a/target_explorer/features/org.eclipse.tm.te.rcp.feature/feature.xml
+++ b/target_explorer/features/org.eclipse.tcf.te.rcp.feature/feature.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<feature
- id="org.eclipse.tm.te.rcp.feature"
+ id="org.eclipse.tcf.te.rcp.feature"
label="%featureName"
version="1.0.0.qualifier"
provider-name="%featureProvider"
- plugin="org.eclipse.tm.te.rcp">
+ plugin="org.eclipse.tcf.te.rcp">
<description>
%description
@@ -23,7 +23,7 @@
version="0.0.0"/>
<includes
- id="org.eclipse.tm.te.feature"
+ id="org.eclipse.tcf.te.feature"
version="0.0.0"/>
<requires>
diff --git a/target_explorer/features/org.eclipse.tm.te.rcp.feature/license.html b/target_explorer/features/org.eclipse.tcf.te.rcp.feature/license.html
index 693054086..693054086 100644
--- a/target_explorer/features/org.eclipse.tm.te.rcp.feature/license.html
+++ b/target_explorer/features/org.eclipse.tcf.te.rcp.feature/license.html
diff --git a/target_explorer/features/org.eclipse.tm.te.sdk.feature/pom.xml b/target_explorer/features/org.eclipse.tcf.te.rcp.feature/pom.xml
index 35f7c7815..3171410b4 100644
--- a/target_explorer/features/org.eclipse.tm.te.sdk.feature/pom.xml
+++ b/target_explorer/features/org.eclipse.tcf.te.rcp.feature/pom.xml
@@ -7,11 +7,11 @@
<parent>
<groupId>org.eclipse.tcf</groupId>
<artifactId>tcf-parent</artifactId>
- <version>0.5.0-SNAPSHOT</version>
+ <version>1.0.0-SNAPSHOT</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<version>1.0.0.qualifier</version>
- <artifactId>org.eclipse.tm.te.sdk.feature</artifactId>
+ <artifactId>org.eclipse.tcf.te.rcp.feature</artifactId>
<packaging>eclipse-feature</packaging>
</project>
diff --git a/target_explorer/features/org.eclipse.tm.te.sdk.feature/.project b/target_explorer/features/org.eclipse.tcf.te.sdk.feature/.project
index 6dd4130ad..13075b5ef 100644
--- a/target_explorer/features/org.eclipse.tm.te.sdk.feature/.project
+++ b/target_explorer/features/org.eclipse.tcf.te.sdk.feature/.project
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.eclipse.tm.te.sdk.feature</name>
+ <name>org.eclipse.tcf.te.sdk.feature</name>
<comment></comment>
<projects>
</projects>
diff --git a/target_explorer/features/org.eclipse.tm.te.sdk.feature/build.properties b/target_explorer/features/org.eclipse.tcf.te.sdk.feature/build.properties
index 0418e5c04..0418e5c04 100644
--- a/target_explorer/features/org.eclipse.tm.te.sdk.feature/build.properties
+++ b/target_explorer/features/org.eclipse.tcf.te.sdk.feature/build.properties
diff --git a/target_explorer/features/org.eclipse.tm.te.sdk.feature/epl-v10.html b/target_explorer/features/org.eclipse.tcf.te.sdk.feature/epl-v10.html
index b6a0ff4b8..b6a0ff4b8 100644
--- a/target_explorer/features/org.eclipse.tm.te.sdk.feature/epl-v10.html
+++ b/target_explorer/features/org.eclipse.tcf.te.sdk.feature/epl-v10.html
diff --git a/target_explorer/features/org.eclipse.tm.te.sdk.feature/feature.properties b/target_explorer/features/org.eclipse.tcf.te.sdk.feature/feature.properties
index 2f246ede3..0d537689e 100644
--- a/target_explorer/features/org.eclipse.tm.te.sdk.feature/feature.properties
+++ b/target_explorer/features/org.eclipse.tcf.te.sdk.feature/feature.properties
@@ -14,7 +14,7 @@
# This file should be translated.
# "featureName" property - name of the feature
-featureName=Target Explorer (Incubation) SDK
+featureName=Target Explorer SDK
# "featureProvide" property - name of the company that provides the feature
featureProvider=Eclipse.org
diff --git a/target_explorer/features/org.eclipse.tcf.te.sdk.feature/feature.xml b/target_explorer/features/org.eclipse.tcf.te.sdk.feature/feature.xml
new file mode 100644
index 000000000..b9778e6c8
--- /dev/null
+++ b/target_explorer/features/org.eclipse.tcf.te.sdk.feature/feature.xml
@@ -0,0 +1,150 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.tcf.te.sdk.feature"
+ label="%featureName"
+ version="1.0.0.qualifier"
+ provider-name="%featureProvider">
+
+ <description>
+ %description
+ </description>
+
+ <copyright>
+ %copyright
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <requires>
+ <import feature="org.eclipse.tcf.te.feature" version="1.0.0" match="greaterOrEqual"/>
+ </requires>
+
+ <plugin
+ id="org.eclipse.tcf.te.core.source"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.tcf.te.launch.core.source"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.tcf.te.launch.ui.source"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.tcf.te.runtime.source"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.tcf.te.runtime.concurrent.source"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.tcf.te.runtime.model.source"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.tcf.te.runtime.persistence.source"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.tcf.te.runtime.services.source"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.tcf.te.runtime.statushandler.source"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.tcf.te.runtime.stepper.source"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.tcf.te.ui.source"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.tcf.te.ui.controls.source"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.tcf.te.ui.forms.source"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.tcf.te.ui.swt.source"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.tcf.te.ui.terminals.source"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.tcf.te.ui.terminals.ssh.source"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.tcf.te.ui.terminals.telnet.source"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.tcf.te.ui.views.source"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
diff --git a/target_explorer/features/org.eclipse.tm.te.sdk.feature/license.html b/target_explorer/features/org.eclipse.tcf.te.sdk.feature/license.html
index 693054086..693054086 100644
--- a/target_explorer/features/org.eclipse.tm.te.sdk.feature/license.html
+++ b/target_explorer/features/org.eclipse.tcf.te.sdk.feature/license.html
diff --git a/target_explorer/features/org.eclipse.tm.te.rcp.feature/pom.xml b/target_explorer/features/org.eclipse.tcf.te.sdk.feature/pom.xml
index d2f00dd24..f5dfe82c9 100644
--- a/target_explorer/features/org.eclipse.tm.te.rcp.feature/pom.xml
+++ b/target_explorer/features/org.eclipse.tcf.te.sdk.feature/pom.xml
@@ -7,11 +7,11 @@
<parent>
<groupId>org.eclipse.tcf</groupId>
<artifactId>tcf-parent</artifactId>
- <version>0.5.0-SNAPSHOT</version>
+ <version>1.0.0-SNAPSHOT</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<version>1.0.0.qualifier</version>
- <artifactId>org.eclipse.tm.te.rcp.feature</artifactId>
+ <artifactId>org.eclipse.tcf.te.sdk.feature</artifactId>
<packaging>eclipse-feature</packaging>
</project>
diff --git a/target_explorer/features/org.eclipse.tm.te.tcf.feature/.project b/target_explorer/features/org.eclipse.tcf.te.tcf.feature/.project
index 67c962593..f291d6596 100644
--- a/target_explorer/features/org.eclipse.tm.te.tcf.feature/.project
+++ b/target_explorer/features/org.eclipse.tcf.te.tcf.feature/.project
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.eclipse.tm.te.tcf.feature</name>
+ <name>org.eclipse.tcf.te.tcf.feature</name>
<comment></comment>
<projects>
</projects>
diff --git a/target_explorer/features/org.eclipse.tm.te.tcf.feature/build.properties b/target_explorer/features/org.eclipse.tcf.te.tcf.feature/build.properties
index a601e3050..a601e3050 100644
--- a/target_explorer/features/org.eclipse.tm.te.tcf.feature/build.properties
+++ b/target_explorer/features/org.eclipse.tcf.te.tcf.feature/build.properties
diff --git a/target_explorer/features/org.eclipse.tm.te.tcf.feature/epl-v10.html b/target_explorer/features/org.eclipse.tcf.te.tcf.feature/epl-v10.html
index b6a0ff4b8..b6a0ff4b8 100644
--- a/target_explorer/features/org.eclipse.tm.te.tcf.feature/epl-v10.html
+++ b/target_explorer/features/org.eclipse.tcf.te.tcf.feature/epl-v10.html
diff --git a/target_explorer/features/org.eclipse.tm.te.tcf.feature/feature.properties b/target_explorer/features/org.eclipse.tcf.te.tcf.feature/feature.properties
index eed8a453f..dfd48af8f 100644
--- a/target_explorer/features/org.eclipse.tm.te.tcf.feature/feature.properties
+++ b/target_explorer/features/org.eclipse.tcf.te.tcf.feature/feature.properties
@@ -14,7 +14,7 @@
# This file should be translated.
# "featureName" property - name of the feature
-featureName=Target Explorer (Incubation), TCF
+featureName=Target Explorer, TCF
# "featureProvide" property - name of the company that provides the feature
featureProvider=Eclipse.org
diff --git a/target_explorer/features/org.eclipse.tm.te.tcf.feature/feature.xml b/target_explorer/features/org.eclipse.tcf.te.tcf.feature/feature.xml
index a02e92d3a..02160cc0d 100644
--- a/target_explorer/features/org.eclipse.tm.te.tcf.feature/feature.xml
+++ b/target_explorer/features/org.eclipse.tcf.te.tcf.feature/feature.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<feature
- id="org.eclipse.tm.te.tcf.feature"
+ id="org.eclipse.tcf.te.tcf.feature"
label="%featureName"
version="1.0.0.qualifier"
provider-name="%featureProvider">
@@ -24,72 +24,112 @@
<import plugin="org.eclipse.ui.navigator" version="3.5.100" match="greaterOrEqual"/>
<import plugin="org.eclipse.core.filesystem" version="1.3.100" match="greaterOrEqual"/>
<import plugin="org.eclipse.ui.ide" version="3.7.0" match="greaterOrEqual"/>
- <import plugin="org.eclipse.core.expressions" version="3.4.300" match="greaterOrEqual"/>
- <import feature="org.eclipse.tm.tcf.feature" version="0.5.0" match="greaterOrEqual"/>
- <import feature="org.eclipse.tm.te.feature" version="1.0.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.compare" version="3.5.200" match="greaterOrEqual"/>
<import plugin="org.eclipse.text" version="3.5.100" match="greaterOrEqual"/>
<import plugin="org.eclipse.ui.workbench.texteditor" version="3.7.0" match="greaterOrEqual"/>
+ <import plugin="org.eclipse.core.expressions" version="3.4.300" match="greaterOrEqual"/>
+ <import feature="org.eclipse.tcf.feature" version="1.0.0" match="greaterOrEqual"/>
+ <import feature="org.eclipse.tcf.te.feature" version="1.0.0" match="greaterOrEqual"/>
+ <import plugin="org.eclipse.tm.terminal" version="3.1.1" match="greaterOrEqual"/>
</requires>
<plugin
- id="org.eclipse.tm.te.tcf.core"
+ id="org.eclipse.tcf.te.tcf.core"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.tcf.te.tcf.core.scripting"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"/>
+
+ <plugin
+ id="org.eclipse.tcf.te.tcf.filesystem"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.tcf.te.tcf.launch.core"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"/>
+
+ <plugin
+ id="org.eclipse.tcf.te.tcf.launch.ui"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"/>
+
+ <plugin
+ id="org.eclipse.tcf.te.tcf.locator"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.tcf.te.tcf.log.core"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
- id="org.eclipse.tm.te.tcf.filesystem"
+ id="org.eclipse.tcf.te.tcf.processes.core"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
- id="org.eclipse.tm.te.tcf.locator"
+ id="org.eclipse.tcf.te.tcf.processes.ui"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
- id="org.eclipse.tm.te.tcf.log.core"
+ id="org.eclipse.tcf.te.tcf.services.contexts"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
- id="org.eclipse.tm.te.tcf.processes.core"
+ id="org.eclipse.tcf.te.tcf.terminals.core"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
- id="org.eclipse.tm.te.tcf.processes.ui"
+ id="org.eclipse.tcf.te.tcf.terminals.ui"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
- id="org.eclipse.tm.te.tcf.terminals.core"
+ id="org.eclipse.tcf.te.tcf.ui"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
- id="org.eclipse.tm.te.tcf.terminals.ui"
+ id="org.eclipse.tcf.te.tcf.ui.console"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
- id="org.eclipse.tm.te.tcf.ui"
+ id="org.eclipse.tcf.te.tcf.ui.views"
download-size="0"
install-size="0"
version="0.0.0"
diff --git a/target_explorer/features/org.eclipse.tm.te.tcf.feature/license.html b/target_explorer/features/org.eclipse.tcf.te.tcf.feature/license.html
index 693054086..693054086 100644
--- a/target_explorer/features/org.eclipse.tm.te.tcf.feature/license.html
+++ b/target_explorer/features/org.eclipse.tcf.te.tcf.feature/license.html
diff --git a/target_explorer/features/org.eclipse.tcf.te.tcf.feature/pom.xml b/target_explorer/features/org.eclipse.tcf.te.tcf.feature/pom.xml
new file mode 100644
index 000000000..5c9257397
--- /dev/null
+++ b/target_explorer/features/org.eclipse.tcf.te.tcf.feature/pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.tcf</groupId>
+ <artifactId>tcf-parent</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../../../pom.xml</relativePath>
+ </parent>
+
+ <version>1.0.0.qualifier</version>
+ <artifactId>org.eclipse.tcf.te.tcf.feature</artifactId>
+ <packaging>eclipse-feature</packaging>
+</project>
diff --git a/target_explorer/features/org.eclipse.tm.te.tcf.rcp.feature/.project b/target_explorer/features/org.eclipse.tcf.te.tcf.rcp.feature/.project
index 475b9be0c..6b0cf44e3 100644
--- a/target_explorer/features/org.eclipse.tm.te.tcf.rcp.feature/.project
+++ b/target_explorer/features/org.eclipse.tcf.te.tcf.rcp.feature/.project
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.eclipse.tm.te.tcf.rcp.feature</name>
+ <name>org.eclipse.tcf.te.tcf.rcp.feature</name>
<comment></comment>
<projects>
</projects>
diff --git a/target_explorer/features/org.eclipse.tm.te.tcf.rcp.feature/build.properties b/target_explorer/features/org.eclipse.tcf.te.tcf.rcp.feature/build.properties
index f81919125..f81919125 100644
--- a/target_explorer/features/org.eclipse.tm.te.tcf.rcp.feature/build.properties
+++ b/target_explorer/features/org.eclipse.tcf.te.tcf.rcp.feature/build.properties
diff --git a/target_explorer/features/org.eclipse.tm.te.tcf.rcp.feature/epl-v10.html b/target_explorer/features/org.eclipse.tcf.te.tcf.rcp.feature/epl-v10.html
index b6a0ff4b8..b6a0ff4b8 100644
--- a/target_explorer/features/org.eclipse.tm.te.tcf.rcp.feature/epl-v10.html
+++ b/target_explorer/features/org.eclipse.tcf.te.tcf.rcp.feature/epl-v10.html
diff --git a/target_explorer/features/org.eclipse.tm.te.tcf.rcp.feature/feature.properties b/target_explorer/features/org.eclipse.tcf.te.tcf.rcp.feature/feature.properties
index 06c1524c1..c5b310110 100644
--- a/target_explorer/features/org.eclipse.tm.te.tcf.rcp.feature/feature.properties
+++ b/target_explorer/features/org.eclipse.tcf.te.tcf.rcp.feature/feature.properties
@@ -14,7 +14,7 @@
# This file should be translated.
# "featureName" property - name of the feature
-featureName=Target Explorer (Incubation), TCF
+featureName=Target Explorer, TCF
# "featureProvide" property - name of the company that provides the feature
featureProvider=Eclipse.org
diff --git a/target_explorer/features/org.eclipse.tm.te.tcf.rcp.feature/feature.xml b/target_explorer/features/org.eclipse.tcf.te.tcf.rcp.feature/feature.xml
index 9b7199a1f..0b65ad190 100644
--- a/target_explorer/features/org.eclipse.tm.te.tcf.rcp.feature/feature.xml
+++ b/target_explorer/features/org.eclipse.tcf.te.tcf.rcp.feature/feature.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<feature
- id="org.eclipse.tm.te.tcf.rcp.feature"
+ id="org.eclipse.tcf.te.tcf.rcp.feature"
label="%featureName"
version="1.0.0.qualifier"
provider-name="%featureProvider"
- plugin="org.eclipse.tm.te.rcp">
+ plugin="org.eclipse.tcf.te.rcp">
<description>
%description
@@ -23,7 +23,7 @@
version="0.0.0"/>
<includes
- id="org.eclipse.tm.te.tcf.feature"
+ id="org.eclipse.tcf.te.tcf.feature"
version="0.0.0"/>
<requires>
diff --git a/target_explorer/features/org.eclipse.tm.te.tcf.rcp.feature/license.html b/target_explorer/features/org.eclipse.tcf.te.tcf.rcp.feature/license.html
index 693054086..693054086 100644
--- a/target_explorer/features/org.eclipse.tm.te.tcf.rcp.feature/license.html
+++ b/target_explorer/features/org.eclipse.tcf.te.tcf.rcp.feature/license.html
diff --git a/target_explorer/features/org.eclipse.tcf.te.tcf.rcp.feature/pom.xml b/target_explorer/features/org.eclipse.tcf.te.tcf.rcp.feature/pom.xml
new file mode 100644
index 000000000..35cb80480
--- /dev/null
+++ b/target_explorer/features/org.eclipse.tcf.te.tcf.rcp.feature/pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.tcf</groupId>
+ <artifactId>tcf-parent</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../../../pom.xml</relativePath>
+ </parent>
+
+ <version>1.0.0.qualifier</version>
+ <artifactId>org.eclipse.tcf.te.tcf.rcp.feature</artifactId>
+ <packaging>eclipse-feature</packaging>
+</project>
diff --git a/target_explorer/features/org.eclipse.tcf.te.tcf.sdk.feature/.project b/target_explorer/features/org.eclipse.tcf.te.tcf.sdk.feature/.project
new file mode 100644
index 000000000..56ed8c898
--- /dev/null
+++ b/target_explorer/features/org.eclipse.tcf.te.tcf.sdk.feature/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.tcf.te.tcf.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>
+ <filteredResources>
+ <filter>
+ <id>1311579318584</id>
+ <name></name>
+ <type>10</type>
+ <matcher>
+ <id>org.eclipse.ui.ide.multiFilter</id>
+ <arguments>1.0-name-matches-false-false-target</arguments>
+ </matcher>
+ </filter>
+ </filteredResources>
+</projectDescription>
diff --git a/target_explorer/features/org.eclipse.tm.te.tcf.sdk.feature/build.properties b/target_explorer/features/org.eclipse.tcf.te.tcf.sdk.feature/build.properties
index 7293e4644..7293e4644 100644
--- a/target_explorer/features/org.eclipse.tm.te.tcf.sdk.feature/build.properties
+++ b/target_explorer/features/org.eclipse.tcf.te.tcf.sdk.feature/build.properties
diff --git a/target_explorer/features/org.eclipse.tm.te.tcf.sdk.feature/epl-v10.html b/target_explorer/features/org.eclipse.tcf.te.tcf.sdk.feature/epl-v10.html
index b6a0ff4b8..b6a0ff4b8 100644
--- a/target_explorer/features/org.eclipse.tm.te.tcf.sdk.feature/epl-v10.html
+++ b/target_explorer/features/org.eclipse.tcf.te.tcf.sdk.feature/epl-v10.html
diff --git a/target_explorer/features/org.eclipse.tm.te.tcf.sdk.feature/feature.properties b/target_explorer/features/org.eclipse.tcf.te.tcf.sdk.feature/feature.properties
index e3974663c..24a0ee930 100644
--- a/target_explorer/features/org.eclipse.tm.te.tcf.sdk.feature/feature.properties
+++ b/target_explorer/features/org.eclipse.tcf.te.tcf.sdk.feature/feature.properties
@@ -14,7 +14,7 @@
# This file should be translated.
# "featureName" property - name of the feature
-featureName=Target Explorer (Incubation) SDK, TCF
+featureName=Target Explorer SDK, TCF
# "featureProvide" property - name of the company that provides the feature
featureProvider=Eclipse.org
diff --git a/target_explorer/features/org.eclipse.tm.te.sdk.feature/feature.xml b/target_explorer/features/org.eclipse.tcf.te.tcf.sdk.feature/feature.xml
index 83694f0d3..37cc5be9f 100644
--- a/target_explorer/features/org.eclipse.tm.te.sdk.feature/feature.xml
+++ b/target_explorer/features/org.eclipse.tcf.te.tcf.sdk.feature/feature.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<feature
- id="org.eclipse.tm.te.sdk.feature"
+ id="org.eclipse.tcf.te.tcf.sdk.feature"
label="%featureName"
version="1.0.0.qualifier"
provider-name="%featureProvider">
@@ -18,112 +18,112 @@
</license>
<requires>
- <import feature="org.eclipse.tm.te.feature" version="1.0.0" match="greaterOrEqual"/>
+ <import feature="org.eclipse.tcf.te.sdk.feature" version="1.0.0" match="greaterOrEqual"/>
+ <import feature="org.eclipse.tcf.te.tcf.feature" version="1.0.0" match="greaterOrEqual"/>
</requires>
<plugin
- id="org.eclipse.tm.te.runtime.source"
+ id="org.eclipse.tcf.te.tcf.core.source"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
- id="org.eclipse.tm.te.runtime.concurrent.source"
+ id="org.eclipse.tcf.te.tcf.core.scripting.source"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
- id="org.eclipse.tm.te.runtime.model.source"
+ id="org.eclipse.tcf.te.tcf.filesystem.source"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
- id="org.eclipse.tm.te.runtime.persistence.source"
+ id="org.eclipse.tcf.te.tcf.launch.core.source"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
- id="org.eclipse.tm.te.runtime.services.source"
+ id="org.eclipse.tcf.te.tcf.launch.ui.source"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
- id="org.eclipse.tm.te.runtime.statushandler.source"
+ id="org.eclipse.tcf.te.tcf.locator.source"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
- id="org.eclipse.tm.te.runtime.stepper.source"
+ id="org.eclipse.tcf.te.tcf.log.core.source"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
- id="org.eclipse.tm.te.core.source"
+ id="org.eclipse.tcf.te.tcf.processes.core.source"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
- id="org.eclipse.tm.te.ui.source"
+ id="org.eclipse.tcf.te.tcf.processes.ui.source"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
- id="org.eclipse.tm.te.ui.controls.source"
+ id="org.eclipse.tcf.te.tcf.services.contexts.source"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
- id="org.eclipse.tm.te.ui.forms.source"
+ id="org.eclipse.tcf.te.tcf.terminals.core.source"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
- id="org.eclipse.tm.te.ui.swt.source"
+ id="org.eclipse.tcf.te.tcf.terminals.ui.source"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
- id="org.eclipse.tm.te.ui.terminals.source"
+ id="org.eclipse.tcf.te.tcf.ui.source"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
- id="org.eclipse.tm.te.ui.terminals.ssh.source"
+ id="org.eclipse.tcf.te.tcf.ui.console.source"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
- id="org.eclipse.tm.te.ui.views.source"
+ id="org.eclipse.tcf.te.tcf.ui.views.source"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
-
</feature>
diff --git a/target_explorer/features/org.eclipse.tm.te.tcf.sdk.feature/license.html b/target_explorer/features/org.eclipse.tcf.te.tcf.sdk.feature/license.html
index 693054086..693054086 100644
--- a/target_explorer/features/org.eclipse.tm.te.tcf.sdk.feature/license.html
+++ b/target_explorer/features/org.eclipse.tcf.te.tcf.sdk.feature/license.html
diff --git a/target_explorer/features/org.eclipse.tcf.te.tcf.sdk.feature/pom.xml b/target_explorer/features/org.eclipse.tcf.te.tcf.sdk.feature/pom.xml
new file mode 100644
index 000000000..d849e700c
--- /dev/null
+++ b/target_explorer/features/org.eclipse.tcf.te.tcf.sdk.feature/pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.tcf</groupId>
+ <artifactId>tcf-parent</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../../../pom.xml</relativePath>
+ </parent>
+
+ <version>1.0.0.qualifier</version>
+ <artifactId>org.eclipse.tcf.te.tcf.sdk.feature</artifactId>
+ <packaging>eclipse-feature</packaging>
+</project>
diff --git a/target_explorer/features/org.eclipse.tm.te.tcf.feature/pom.xml b/target_explorer/features/org.eclipse.tm.te.tcf.feature/pom.xml
deleted file mode 100644
index 74f85746a..000000000
--- a/target_explorer/features/org.eclipse.tm.te.tcf.feature/pom.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
- xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.eclipse.tcf</groupId>
- <artifactId>tcf-parent</artifactId>
- <version>0.5.0-SNAPSHOT</version>
- <relativePath>../../../pom.xml</relativePath>
- </parent>
-
- <version>1.0.0.qualifier</version>
- <artifactId>org.eclipse.tm.te.tcf.feature</artifactId>
- <packaging>eclipse-feature</packaging>
-</project>
diff --git a/target_explorer/features/org.eclipse.tm.te.tcf.rcp.feature/pom.xml b/target_explorer/features/org.eclipse.tm.te.tcf.rcp.feature/pom.xml
deleted file mode 100644
index b6a67eff6..000000000
--- a/target_explorer/features/org.eclipse.tm.te.tcf.rcp.feature/pom.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
- xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.eclipse.tcf</groupId>
- <artifactId>tcf-parent</artifactId>
- <version>0.5.0-SNAPSHOT</version>
- <relativePath>../../../pom.xml</relativePath>
- </parent>
-
- <version>1.0.0.qualifier</version>
- <artifactId>org.eclipse.tm.te.tcf.rcp.feature</artifactId>
- <packaging>eclipse-feature</packaging>
-</project>
diff --git a/target_explorer/features/org.eclipse.tm.te.tcf.sdk.feature/.project b/target_explorer/features/org.eclipse.tm.te.tcf.sdk.feature/.project
deleted file mode 100644
index ee1e5ef07..000000000
--- a/target_explorer/features/org.eclipse.tm.te.tcf.sdk.feature/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.tm.te.tcf.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>
- <filteredResources>
- <filter>
- <id>1311579318584</id>
- <name></name>
- <type>10</type>
- <matcher>
- <id>org.eclipse.ui.ide.multiFilter</id>
- <arguments>1.0-name-matches-false-false-target</arguments>
- </matcher>
- </filter>
- </filteredResources>
-</projectDescription>
diff --git a/target_explorer/features/org.eclipse.tm.te.tcf.sdk.feature/feature.xml b/target_explorer/features/org.eclipse.tm.te.tcf.sdk.feature/feature.xml
deleted file mode 100644
index f9f3e8515..000000000
--- a/target_explorer/features/org.eclipse.tm.te.tcf.sdk.feature/feature.xml
+++ /dev/null
@@ -1,88 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.tm.te.tcf.sdk.feature"
- label="%featureName"
- version="1.0.0.qualifier"
- provider-name="%featureProvider">
-
- <description>
- %description
- </description>
-
- <copyright>
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <requires>
- <import feature="org.eclipse.tm.te.sdk.feature" version="1.0.0" match="greaterOrEqual"/>
- <import feature="org.eclipse.tm.te.tcf.feature" version="1.0.0" match="greaterOrEqual"/>
- </requires>
-
- <plugin
- id="org.eclipse.tm.te.tcf.core.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.tm.te.tcf.filesystem.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.tm.te.tcf.locator.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.tm.te.tcf.log.core.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.tm.te.tcf.processes.core.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.tm.te.tcf.processes.ui.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.tm.te.tcf.terminals.core.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.tm.te.tcf.terminals.ui.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.tm.te.tcf.ui.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
-</feature>
diff --git a/target_explorer/features/org.eclipse.tm.te.tcf.sdk.feature/pom.xml b/target_explorer/features/org.eclipse.tm.te.tcf.sdk.feature/pom.xml
deleted file mode 100644
index e0af8d68a..000000000
--- a/target_explorer/features/org.eclipse.tm.te.tcf.sdk.feature/pom.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
- xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.eclipse.tcf</groupId>
- <artifactId>tcf-parent</artifactId>
- <version>0.5.0-SNAPSHOT</version>
- <relativePath>../../../pom.xml</relativePath>
- </parent>
-
- <version>1.0.0.qualifier</version>
- <artifactId>org.eclipse.tm.te.tcf.sdk.feature</artifactId>
- <packaging>eclipse-feature</packaging>
-</project>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/.classpath b/target_explorer/plugins/org.eclipse.tcf.te.core/.classpath
index 8a8f1668c..8a8f1668c 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/.classpath
+++ b/target_explorer/plugins/org.eclipse.tcf.te.core/.classpath
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.core/.options b/target_explorer/plugins/org.eclipse.tcf.te.core/.options
new file mode 100644
index 000000000..70c4f94f0
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.core/.options
@@ -0,0 +1 @@
+org.eclipse.tcf.te.core/debugmode = 0
diff --git a/target_explorer/plugins/org.eclipse.tm.te.core/.project b/target_explorer/plugins/org.eclipse.tcf.te.core/.project
index de76b4bc4..33df94b26 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.core/.project
+++ b/target_explorer/plugins/org.eclipse.tcf.te.core/.project
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.eclipse.tm.te.core</name>
+ <name>org.eclipse.tcf.te.core</name>
<comment></comment>
<projects>
</projects>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.core/.settings/org.eclipse.jdt.core.prefs b/target_explorer/plugins/org.eclipse.tcf.te.core/.settings/org.eclipse.jdt.core.prefs
index 8c6bafedf..8c6bafedf 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.core/.settings/org.eclipse.jdt.core.prefs
+++ b/target_explorer/plugins/org.eclipse.tcf.te.core/.settings/org.eclipse.jdt.core.prefs
diff --git a/target_explorer/plugins/org.eclipse.tm.te.core/.settings/org.eclipse.jdt.ui.prefs b/target_explorer/plugins/org.eclipse.tcf.te.core/.settings/org.eclipse.jdt.ui.prefs
index a8480b3b5..a8480b3b5 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.core/.settings/org.eclipse.jdt.ui.prefs
+++ b/target_explorer/plugins/org.eclipse.tcf.te.core/.settings/org.eclipse.jdt.ui.prefs
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.core/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.core/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..27bdfda4c
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.core/META-INF/MANIFEST.MF
@@ -0,0 +1,23 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.tcf.te.core;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipse.tcf.te.core.activator.CoreBundleActivator
+Bundle-Vendor: %providerName
+Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
+ org.eclipse.core.expressions;bundle-version="3.4.300",
+ org.eclipse.tcf.te.runtime;bundle-version="1.0.0",
+ org.eclipse.tcf.te.runtime.stepper;bundle-version="1.0.0",
+ org.eclipse.tcf.te.runtime.services;bundle-version="1.0.0",
+ org.eclipse.tcf.te.runtime.persistence;bundle-version="1.0.0",
+ org.eclipse.tcf.te.runtime.model;bundle-version="1.0.0"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
+Bundle-Localization: plugin
+Export-Package: org.eclipse.tcf.te.core.activator;x-internal:=true,
+ org.eclipse.tcf.te.core.adapters,
+ org.eclipse.tcf.te.core.async,
+ org.eclipse.tcf.te.core.async.interfaces,
+ org.eclipse.tcf.te.core.nls;x-internal:=true,
+ org.eclipse.tcf.te.core.utils.text
diff --git a/target_explorer/plugins/org.eclipse.tm.te.core/build.properties b/target_explorer/plugins/org.eclipse.tcf.te.core/build.properties
index 73a5119ed..73a5119ed 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.core/build.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.core/build.properties
diff --git a/target_explorer/plugins/org.eclipse.tm.te.core/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.core/plugin.properties
index 3303cbe06..3303cbe06 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.core/plugin.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.core/plugin.properties
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.core/plugin.xml b/target_explorer/plugins/org.eclipse.tcf.te.core/plugin.xml
new file mode 100644
index 000000000..857bb9f08
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.core/plugin.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+
+<!-- Adapter factory contributions -->
+ <extension point="org.eclipse.core.runtime.adapters">
+ <factory
+ adaptableType="org.eclipse.tcf.te.runtime.model.interfaces.IModelNode"
+ class="org.eclipse.tcf.te.core.adapters.AdapterFactory">
+ <adapter type="org.eclipse.tcf.te.runtime.persistence.interfaces.IPersistable"/>
+ <adapter type="org.eclipse.tcf.te.runtime.persistence.interfaces.IPersistableNameProvider"/>
+ </factory>
+ </extension>
+
+<!-- Property tester contributions -->
+ <extension point="org.eclipse.core.expressions.propertyTesters">
+ <propertyTester
+ class="org.eclipse.tcf.te.core.adapters.PropertyTester"
+ id="org.eclipse.tcf.te.core.adapters.PropertyTester"
+ namespace="org.eclipse.tcf.te.core"
+ properties="hasAdapter,canAdaptTo"
+ type="java.lang.Object">
+ </propertyTester>
+
+ </extension>
+
+</plugin>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.rcp/pom.xml b/target_explorer/plugins/org.eclipse.tcf.te.core/pom.xml
index 88557ffef..91fbb7ac5 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.rcp/pom.xml
+++ b/target_explorer/plugins/org.eclipse.tcf.te.core/pom.xml
@@ -7,11 +7,11 @@
<parent>
<groupId>org.eclipse.tcf</groupId>
<artifactId>tcf-parent</artifactId>
- <version>0.5.0-SNAPSHOT</version>
+ <version>1.0.0-SNAPSHOT</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<version>1.0.0.qualifier</version>
- <artifactId>org.eclipse.tm.te.rcp</artifactId>
+ <artifactId>org.eclipse.tcf.te.core</artifactId>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/activator/CoreBundleActivator.java b/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/activator/CoreBundleActivator.java
index 3a73659ed..58c9765be 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/activator/CoreBundleActivator.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/activator/CoreBundleActivator.java
@@ -7,9 +7,9 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.core.activator;
+package org.eclipse.tcf.te.core.activator;
-import org.eclipse.tm.te.runtime.tracing.TraceHandler;
+import org.eclipse.tcf.te.runtime.tracing.TraceHandler;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/adapters/AdapterFactory.java b/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/adapters/AdapterFactory.java
index 95a76dfd8..54e6c5e9c 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/adapters/AdapterFactory.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/adapters/AdapterFactory.java
@@ -7,21 +7,25 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.core.adapters;
+package org.eclipse.tcf.te.core.adapters;
import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.tm.te.runtime.model.interfaces.IModelNode;
-import org.eclipse.tm.te.runtime.persistence.interfaces.IPersistable;
+import org.eclipse.tcf.te.runtime.model.interfaces.IModelNode;
+import org.eclipse.tcf.te.runtime.persistence.interfaces.IPersistable;
+import org.eclipse.tcf.te.runtime.persistence.interfaces.IPersistableNameProvider;
/**
* Adapter factory implementation.
*/
public class AdapterFactory implements IAdapterFactory {
- // The single instance adapter references
- private final IPersistable modelNodePersistableAdapter = new ModelNodePersistableAdapter();
+ // Reference to the persistable adapter to use
+ private final IPersistable persistableAdapter = new ModelNodePersistableAdapter();
+ // Reference to the persistable name provider adapter to use
+ private final IPersistableNameProvider persistableNameProvider = new ModelNodePersistableNameProvider();
private static final Class<?>[] CLASSES = new Class[] {
- IPersistable.class
+ IPersistable.class,
+ IPersistableNameProvider.class
};
/* (non-Javadoc)
@@ -31,7 +35,10 @@ public class AdapterFactory implements IAdapterFactory {
public Object getAdapter(Object adaptableObject, Class adapterType) {
if (adaptableObject instanceof IModelNode) {
if (IPersistable.class.equals(adapterType)) {
- return modelNodePersistableAdapter;
+ return persistableAdapter;
+ }
+ if (IPersistableNameProvider.class.equals(adapterType)) {
+ return persistableNameProvider;
}
}
return null;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/adapters/ModelNodePersistableAdapter.java b/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/adapters/ModelNodePersistableAdapter.java
new file mode 100644
index 000000000..e3f281eab
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/adapters/ModelNodePersistableAdapter.java
@@ -0,0 +1,356 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.core.adapters;
+
+import java.io.IOException;
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.net.URI;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.tcf.te.core.activator.CoreBundleActivator;
+import org.eclipse.tcf.te.core.nls.Messages;
+import org.eclipse.tcf.te.runtime.model.factory.Factory;
+import org.eclipse.tcf.te.runtime.model.interfaces.IContainerModelNode;
+import org.eclipse.tcf.te.runtime.model.interfaces.IModelNode;
+import org.eclipse.tcf.te.runtime.persistence.PersistenceDelegateManager;
+import org.eclipse.tcf.te.runtime.persistence.interfaces.IPersistable;
+import org.eclipse.tcf.te.runtime.persistence.interfaces.IPersistableNameProvider;
+import org.eclipse.tcf.te.runtime.persistence.interfaces.IPersistableNodeProperties;
+import org.eclipse.tcf.te.runtime.persistence.interfaces.IPersistenceDelegate;
+import org.osgi.framework.Bundle;
+
+/**
+ * Model node persistable adapter implementation.
+ */
+public class ModelNodePersistableAdapter implements IPersistable {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.persistence.interfaces.IPersistable#getStorageID()
+ */
+ @Override
+ public String getStorageID() {
+ return "org.eclipse.tcf.te.runtime.persistence.properties"; //$NON-NLS-1$
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.persistence.interfaces.IPersistable#getURI(java.lang.Object)
+ */
+ @Override
+ public URI getURI(Object data) {
+ Assert.isNotNull(data);
+
+ URI uri = null;
+
+ // Only model nodes are supported
+ if (data instanceof IModelNode) {
+ IModelNode node = (IModelNode) data;
+
+ IPath path = null;
+
+ // Try to adapt the node to the IPersistableNameProvider interface first
+ IPersistableNameProvider provider = (IPersistableNameProvider)node.getAdapter(IPersistableNameProvider.class);
+ if (provider != null) {
+ String name = provider.getName(node);
+ if (name != null && !"".equals(name.trim())) path = getRoot().append(name.trim()); //$NON-NLS-1$
+ }
+
+ if (path == null) {
+ // If the path could not be determined via the IPersistableNameProvider interface, check for the node id
+ if (node.getStringProperty(IModelNode.PROPERTY_ID) != null && !"".equals(node.getStringProperty(IModelNode.PROPERTY_ID).trim())) { //$NON-NLS-1$
+ path = getRoot().append(makeValidFileSystemName(node.getStringProperty(IModelNode.PROPERTY_ID).trim()));
+ }
+ // If the id is not set, check for the node name
+ else if (node.getName() != null && !"".equals(node.getName().trim())) { //$NON-NLS-1$
+ path = getRoot().append(makeValidFileSystemName(node.getName().trim()));
+ }
+ // If the name is not set, check for an URI
+ else if (node.getProperty(IPersistableNodeProperties.PROPERTY_URI) != null) {
+ Object candidate = node.getProperty(IPersistableNodeProperties.PROPERTY_URI);
+ if (candidate instanceof URI) uri = (URI)candidate;
+ else if (candidate instanceof String && !"".equals(((String)candidate).trim())) { //$NON-NLS-1$
+ uri = URI.create(((String)candidate).trim());
+ }
+ }
+ // No name and no explicit path is set -> use the UUID
+ else if (node.getUUID() != null) {
+ path = getRoot().append(makeValidFileSystemName(node.getUUID().toString().trim()));
+ }
+ }
+
+ if (path != null) {
+ if (!"ini".equals(path.getFileExtension())) path = path.addFileExtension("ini"); //$NON-NLS-1$ //$NON-NLS-2$
+ uri = path.toFile().toURI();
+ }
+ }
+
+ return uri;
+ }
+
+ /**
+ * Make a valid file system name from the given name.
+ *
+ * @param name The original name. Must not be <code>null</code>.
+ * @return The valid file system name.
+ */
+ protected String makeValidFileSystemName(String name) {
+ Assert.isNotNull(name);
+ return name.replaceAll("\\W", "_"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ /**
+ * Returns the root location.
+ *
+ * @return The root location or <code>null</code> if it cannot be determined.
+ */
+ public IPath getRoot() {
+ IPath location = null;
+
+ // Try the bundles state location first (not available if launched with -data @none).
+ try {
+ IPath path = Platform.getStateLocation(CoreBundleActivator.getContext().getBundle()).append(".store"); //$NON-NLS-1$
+ if (!path.toFile().exists()) path.toFile().mkdirs();
+ if (path.toFile().canRead() && path.toFile().isDirectory()) {
+ location = path;
+ }
+ } catch (IllegalStateException e) {
+ // Workspace less environments (-data @none)
+ // The users local target definition persistence directory is $HOME/.tcf/.store.
+ IPath path = new Path(System.getProperty("user.home")).append(".tcf/.store"); //$NON-NLS-1$ //$NON-NLS-2$
+ if (!path.toFile().exists()) path.toFile().mkdirs();
+ if (path.toFile().canRead() && path.toFile().isDirectory()) {
+ location = path;
+ }
+ }
+
+ return location;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.persistence.interfaces.IPersistable#getInterfaceType(java.lang.Object)
+ */
+ @SuppressWarnings("restriction")
+ @Override
+ public String getInterfaceTypeName(Object data) {
+ if (data instanceof IContainerModelNode) {
+ return org.eclipse.tcf.te.runtime.model.activator.CoreBundleActivator.getUniqueIdentifier() + ":" + IContainerModelNode.class.getName(); //$NON-NLS-1$
+ } else if (data instanceof IModelNode) {
+ return org.eclipse.tcf.te.runtime.model.activator.CoreBundleActivator.getUniqueIdentifier() + ":" + IModelNode.class.getName(); //$NON-NLS-1$
+ }
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.persistence.interfaces.IPersistable#exportFrom(java.lang.Object)
+ */
+ @Override
+ public Map<String, Object> exportFrom(Object data) throws IOException {
+ Assert.isNotNull(data);
+
+ // Create a new map instance that will hold the exported properties
+ Map<String, Object> result = new HashMap<String, Object>();
+
+ // Only model nodes are supported
+ if (data instanceof IModelNode && !((IModelNode)data).isEmpty()) {
+ // Get a snapshot of all properties
+ Map<String, Object> properties = ((IModelNode)data).getProperties();
+ // And export the properties to the result map
+ exportFromMap(properties, result);
+ }
+
+ // If the result map is empty, return null
+ return !result.isEmpty() ? result : null;
+ }
+
+ /**
+ * Exports the properties of a map from the given source into the given
+ * destination.
+ *
+ * @param src The map to export the properties from. Must not be <code>null</code>.
+ * @param dst The map to write the exported properties to. Must not be <code>null</code>.
+ *
+ * @throws IOException - if the operation fails.
+ */
+ @SuppressWarnings("unchecked")
+ protected void exportFromMap(Map<String, Object> src, Map<String, Object> dst) throws IOException {
+ Assert.isNotNull(src);
+ Assert.isNotNull(dst);
+
+ // Loop all properties and check for transient or complex properties
+ for (String key : src.keySet()) {
+ if (key.contains(".transient")) continue; //$NON-NLS-1$
+
+ // Get the property value
+ Object value = src.get(key);
+
+ // If the value is null, no need to go any further
+ if (value == null) continue;
+
+ // For String, Integer, Boolean, etc ... export them as string
+ boolean isSimpleType = value instanceof String || value instanceof Boolean || value instanceof Integer || value instanceof Long
+ || value instanceof Float || value instanceof Double;
+ if (isSimpleType) {
+ dst.put(key, value.toString());
+ continue;
+ }
+
+ // BigInteger, BigDecimal ... probably needs special handling, for now, export them as string
+ boolean isBigType = value instanceof BigInteger || value instanceof BigDecimal;
+ if (isBigType) {
+ dst.put(key, value.toString());
+ continue;
+ }
+
+ // For Lists and Arrays, do a deepToString
+ boolean isListType = value instanceof List<?> || value instanceof Object[];
+ if (isListType) {
+ dst.put(key, Arrays.deepToString(value instanceof List<?> ? ((List<?>)value).toArray() : (Object[])value));
+ continue;
+ }
+
+ // For Maps, create a new destination map and call ourself
+ boolean isMapType = value instanceof Map<?,?>;
+ if (isMapType) {
+ Map<String, Object> result = new HashMap<String, Object>();
+ exportFromMap((Map<String, Object>)value, result);
+ if (!result.isEmpty()) dst.put(key, result);
+ continue;
+ }
+
+ // For anything remaining, check if the value object type can be adapted to
+ // an IPersistable itself
+ IPersistable persistable = value instanceof IAdaptable ? (IPersistable)((IAdaptable)value).getAdapter(IPersistable.class) : null;
+ if (persistable == null) persistable = (IPersistable)Platform.getAdapterManager().getAdapter(value, IPersistable.class);
+ if (persistable != null) {
+ String storageID = persistable.getStorageID();
+ URI uri = persistable.getURI(value);
+ String interfaceTypeName = persistable.getInterfaceTypeName(value);
+
+ // Check if the persistable returns complete information to create the reference
+ if (storageID == null) {
+ throw new IOException(NLS.bind(Messages.ModelNodePersistableAdapter_export_invalidPersistable, value.getClass().getCanonicalName(), "storageID")); //$NON-NLS-1$
+ }
+ if (uri == null) {
+ throw new IOException(NLS.bind(Messages.ModelNodePersistableAdapter_export_invalidPersistable, value.getClass().getCanonicalName(), "uri")); //$NON-NLS-1$
+ }
+ if (interfaceTypeName == null) {
+ throw new IOException(NLS.bind(Messages.ModelNodePersistableAdapter_export_invalidPersistable, value.getClass().getCanonicalName(), "interfaceTypeName")); //$NON-NLS-1$
+ }
+
+ // Create a reference object
+ Map<String, String> reference = new HashMap<String, String>();
+ reference.put("storageID", storageID); //$NON-NLS-1$
+ reference.put("uri", uri.toString()); //$NON-NLS-1$
+ reference.put("interfaceType", interfaceTypeName); //$NON-NLS-1$
+
+ IPersistenceDelegate delegate = PersistenceDelegateManager.getInstance().getDelegate(storageID, false);
+ if (delegate != null) {
+ delegate.write(uri, persistable.exportFrom(value));
+ dst.put("reference:" + key, reference); //$NON-NLS-1$
+ continue;
+ }
+ }
+
+ // Falling through down here is a problem. We should never end up here,
+ // because it means we have no idea on how to persist an object
+ throw new IOException(NLS.bind(Messages.ModelNodePersistableAdapter_export_unknownType, value.getClass().getCanonicalName(), key));
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.persistence.interfaces.IPersistable#importTo(java.lang.Object, java.util.Map)
+ */
+ @Override
+ public void importTo(Object data, Map<String, Object> external) throws IOException {
+ Assert.isNotNull(data);
+ Assert.isNotNull(external);
+
+ // Only model nodes are supported
+ if (data instanceof IModelNode) {
+ IModelNode node = (IModelNode) data;
+ for (String key : external.keySet()) {
+ // Get the property value
+ Object value = external.get(key);
+
+ // Check for reference objects
+ if (key.startsWith("reference:") && value instanceof Map<?,?>) { //$NON-NLS-1$
+ // Cut the "reference:" from the key
+ String newKey = key.substring(10);
+
+ @SuppressWarnings("unchecked")
+ Map<String, String> reference = (Map<String, String>)value;
+
+ // Get the storage id and the URI from the reference
+ String storageID = reference.get("storageID"); //$NON-NLS-1$
+ String uriString = reference.get("uri"); //$NON-NLS-1$
+ String interfaceTypeName = reference.get("interfaceType"); //$NON-NLS-1$
+
+ // Check if the reference returns complete information to read the referenced storage
+ if (storageID == null) {
+ throw new IOException(NLS.bind(Messages.ModelNodePersistableAdapter_import_invalidReference, "storageID")); //$NON-NLS-1$
+ }
+ if (uriString == null) {
+ throw new IOException(NLS.bind(Messages.ModelNodePersistableAdapter_import_invalidReference, "uri")); //$NON-NLS-1$
+ }
+ if (interfaceTypeName == null) {
+ throw new IOException(NLS.bind(Messages.ModelNodePersistableAdapter_import_invalidReference, "interfaceType")); //$NON-NLS-1$
+ }
+
+ // Get the persistence delegate
+ IPersistenceDelegate delegate = PersistenceDelegateManager.getInstance().getDelegate(storageID, false);
+ if (delegate != null) {
+ URI uri = URI.create(uriString);
+ Map<String, Object> referenceData = delegate.read(uri);
+ if (referenceData != null && !referenceData.isEmpty()) {
+ try {
+ // Now, we have to recreate the object
+
+ // Separate the bundleId from the interface name
+ String[] pieces = interfaceTypeName.split(":", 2); //$NON-NLS-1$
+ String bundleId = pieces.length > 1 ? pieces[0] : null;
+ if (pieces.length > 1) interfaceTypeName = pieces[1];
+
+ // Determine the bundle to use for loading the class
+ Bundle bundle = bundleId != null && !"".equals(bundleId.trim()) ? Platform.getBundle(bundleId.trim()) : CoreBundleActivator.getContext().getBundle(); //$NON-NLS-1$
+
+ Class<? extends IModelNode> interfaceType = (Class<? extends IModelNode>)bundle.loadClass(interfaceTypeName);
+ IModelNode referenceNode = Factory.getInstance().newInstance(interfaceType);
+
+ IPersistable persistable = (IPersistable)referenceNode.getAdapter(IPersistable.class);
+ if (persistable == null) persistable = (IPersistable)Platform.getAdapterManager().getAdapter(referenceNode, IPersistable.class);
+ if (persistable != null) {
+ persistable.importTo(referenceNode, referenceData);
+ referenceNode.setProperty(IPersistableNodeProperties.PROPERTY_URI, uriString);
+ node.setProperty(newKey, referenceNode);
+ }
+ } catch (ClassNotFoundException e) {
+ throw new IOException(NLS.bind(Messages.ModelNodePersistableAdapter_import_cannotLoadClass, interfaceTypeName), e);
+ }
+ }
+ }
+ }
+ // Not a reference object -> store the object as is to the node
+ else {
+ node.setProperty(key, value);
+ }
+ }
+ }
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/adapters/ModelNodePersistableNameProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/adapters/ModelNodePersistableNameProvider.java
new file mode 100644
index 000000000..d11980e9f
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/adapters/ModelNodePersistableNameProvider.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.core.adapters;
+
+import org.eclipse.tcf.te.runtime.model.interfaces.IModelNode;
+import org.eclipse.tcf.te.runtime.persistence.interfaces.IPersistableNameProvider;
+
+/**
+ * Model node persistable name provider implementation.
+ */
+public class ModelNodePersistableNameProvider implements IPersistableNameProvider {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.persistence.interfaces.IPersistableNameProvider#getName(java.lang.Object)
+ */
+ @Override
+ public String getName(Object data) {
+ String name = null;
+
+ // Only model nodes are supported
+ if (data instanceof IModelNode) {
+ IModelNode node = (IModelNode)data;
+
+ // Check for the id property first.
+ name = node.getStringProperty(IModelNode.PROPERTY_ID);
+ // If the id is not set, check for the node name
+ if (name == null || "".equals(name.trim())) { //$NON-NLS-1$
+ name = node.getName();
+ }
+ }
+
+ return name;
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/adapters/PropertyTester.java b/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/adapters/PropertyTester.java
new file mode 100644
index 000000000..1f6d50041
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/adapters/PropertyTester.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.core.adapters;
+
+import org.eclipse.core.runtime.IAdapterManager;
+import org.eclipse.core.runtime.Platform;
+
+/**
+ * Adapter helper property tester implementation.
+ */
+public class PropertyTester extends org.eclipse.core.expressions.PropertyTester {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.expressions.IPropertyTester#test(java.lang.Object, java.lang.String, java.lang.Object[], java.lang.Object)
+ */
+ @Override
+ public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
+ IAdapterManager manager = Platform.getAdapterManager();
+ if (manager == null) return false;
+
+ // "hasAdapter": Checks if the adapter given by the arguments is registered for the given receiver
+ if ("hasAdapter".equals(property)) { //$NON-NLS-1$
+ // The class to adapt to is within the expected value
+ String adapterType = expectedValue instanceof String ? (String)expectedValue : null;
+ if (adapterType != null) {
+ return manager.hasAdapter(receiver, adapterType);
+ }
+ }
+ if ("canAdaptTo".equals(property)) { //$NON-NLS-1$
+ // Read the arguments and look for "forceAdapterLoad"
+ boolean forceAdapterLoad = false;
+ for (Object arg : args) {
+ if (arg instanceof String && "forceAdapterLoad".equalsIgnoreCase((String)arg)) { //$NON-NLS-1$
+ forceAdapterLoad = true;
+ }
+ }
+
+ // The class to adapt to is within the expected value
+ String adapterType = expectedValue instanceof String ? (String)expectedValue : null;
+ if (adapterType != null) {
+ Object adapter = manager.getAdapter(receiver, adapterType);
+ if (adapter != null) return true;
+
+ // No adapter. This can happen too if the plug-in contributing the adapter
+ // factory hasn't been loaded yet.
+ if (forceAdapterLoad) adapter = manager.loadAdapter(receiver, adapterType);
+ if (adapter != null) return true;
+ }
+ }
+
+ return false;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/async/AbstractAsyncExecutable.java b/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/async/AbstractAsyncExecutable.java
index fae9c0eed..b5d6ab6c4 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/async/AbstractAsyncExecutable.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/async/AbstractAsyncExecutable.java
@@ -7,14 +7,14 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.core.async;
+package org.eclipse.tcf.te.core.async;
import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.tm.te.core.async.interfaces.IAsyncExecutable;
-import org.eclipse.tm.te.runtime.callback.Callback;
-import org.eclipse.tm.te.runtime.interfaces.callback.ICallback;
-import org.eclipse.tm.te.runtime.properties.PropertiesContainer;
-import org.eclipse.tm.te.runtime.utils.ProgressHelper;
+import org.eclipse.tcf.te.core.async.interfaces.IAsyncExecutable;
+import org.eclipse.tcf.te.runtime.callback.Callback;
+import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback;
+import org.eclipse.tcf.te.runtime.properties.PropertiesContainer;
+import org.eclipse.tcf.te.runtime.utils.ProgressHelper;
/**
* Abstract asynchronous executable implementation.
@@ -30,7 +30,7 @@ public abstract class AbstractAsyncExecutable extends PropertiesContainer implem
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.core.async.interfaces.IAsyncExecutable#execute(org.eclipse.tm.te.runtime.interfaces.callback.ICallback)
+ * @see org.eclipse.tcf.te.core.async.interfaces.IAsyncExecutable#execute(org.eclipse.tcf.te.runtime.interfaces.callback.ICallback)
*/
@Override
public final void execute(ICallback callback) {
@@ -38,7 +38,7 @@ public abstract class AbstractAsyncExecutable extends PropertiesContainer implem
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.core.async.interfaces.IAsyncExecutable#execute(org.eclipse.core.runtime.IProgressMonitor, int, org.eclipse.tm.te.runtime.interfaces.callback.ICallback)
+ * @see org.eclipse.tcf.te.core.async.interfaces.IAsyncExecutable#execute(org.eclipse.core.runtime.IProgressMonitor, int, org.eclipse.tcf.te.runtime.interfaces.callback.ICallback)
*/
@Override
public final void execute(IProgressMonitor progress, int ticksToUse, ICallback callback) {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/async/AbstractAsyncExecutableJob.java b/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/async/AbstractAsyncExecutableJob.java
index 4abd2a781..87e0e6b4c 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/async/AbstractAsyncExecutableJob.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/async/AbstractAsyncExecutableJob.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.core.async;
+package org.eclipse.tcf.te.core.async;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
@@ -15,11 +15,11 @@ import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.IJobManager;
import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.tm.te.core.async.interfaces.IAsyncExecutable;
-import org.eclipse.tm.te.runtime.callback.Callback;
-import org.eclipse.tm.te.runtime.interfaces.IConditionTester;
-import org.eclipse.tm.te.runtime.interfaces.callback.ICallback;
-import org.eclipse.tm.te.runtime.utils.ProgressHelper;
+import org.eclipse.tcf.te.core.async.interfaces.IAsyncExecutable;
+import org.eclipse.tcf.te.runtime.callback.Callback;
+import org.eclipse.tcf.te.runtime.interfaces.IConditionTester;
+import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback;
+import org.eclipse.tcf.te.runtime.utils.ProgressHelper;
/**
* Abstract asynchronous executable job implementation.
@@ -149,7 +149,7 @@ public abstract class AbstractAsyncExecutableJob extends Job implements IAsyncEx
protected abstract int getJobTicks();
/* (non-Javadoc)
- * @see org.eclipse.tm.te.core.async.interfaces.IAsyncExecutable#execute(org.eclipse.tm.te.runtime.interfaces.callback.ICallback)
+ * @see org.eclipse.tcf.te.core.async.interfaces.IAsyncExecutable#execute(org.eclipse.tcf.te.runtime.interfaces.callback.ICallback)
*/
@Override
public final void execute(ICallback callback) {
@@ -157,7 +157,7 @@ public abstract class AbstractAsyncExecutableJob extends Job implements IAsyncEx
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.core.async.interfaces.IAsyncExecutable#execute(org.eclipse.core.runtime.IProgressMonitor, int, org.eclipse.tm.te.runtime.interfaces.callback.ICallback)
+ * @see org.eclipse.tcf.te.core.async.interfaces.IAsyncExecutable#execute(org.eclipse.core.runtime.IProgressMonitor, int, org.eclipse.tcf.te.runtime.interfaces.callback.ICallback)
*/
@Override
public final void execute(IProgressMonitor progress, int ticksToUse, ICallback callback) {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/async/AbstractAsyncExecutableStepperJob.java b/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/async/AbstractAsyncExecutableStepperJob.java
index 0c12489cf..6f1d901a6 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/async/AbstractAsyncExecutableStepperJob.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/async/AbstractAsyncExecutableStepperJob.java
@@ -7,16 +7,16 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.core.async;
+package org.eclipse.tcf.te.core.async;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
-import org.eclipse.tm.te.core.async.interfaces.IAsyncExecutable;
-import org.eclipse.tm.te.runtime.callback.Callback;
-import org.eclipse.tm.te.runtime.interfaces.callback.ICallback;
-import org.eclipse.tm.te.runtime.utils.ProgressHelper;
+import org.eclipse.tcf.te.core.async.interfaces.IAsyncExecutable;
+import org.eclipse.tcf.te.runtime.callback.Callback;
+import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback;
+import org.eclipse.tcf.te.runtime.utils.ProgressHelper;
/**
* Abstract asynchronous executable stepper job.
@@ -50,7 +50,7 @@ public abstract class AbstractAsyncExecutableStepperJob extends AbstractAsyncExe
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.core.async.AbstractAsyncExecutableJob#getJobTicks()
+ * @see org.eclipse.tcf.te.core.async.AbstractAsyncExecutableJob#getJobTicks()
*/
@Override
protected int getJobTicks() {
@@ -58,7 +58,7 @@ public abstract class AbstractAsyncExecutableStepperJob extends AbstractAsyncExe
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.core.async.AbstractAsyncExecutableJob#internalExecute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.tm.te.runtime.interfaces.callback.ICallback)
+ * @see org.eclipse.tcf.te.core.async.AbstractAsyncExecutableJob#internalExecute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.tcf.te.runtime.interfaces.callback.ICallback)
*/
@Override
protected final void internalExecute(final IProgressMonitor monitor, final ICallback callback) {
@@ -70,7 +70,7 @@ public abstract class AbstractAsyncExecutableStepperJob extends AbstractAsyncExe
private int index = 0;
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.callback.Callback#internalDone(java.lang.Object, org.eclipse.core.runtime.IStatus)
+ * @see org.eclipse.tcf.te.runtime.callback.Callback#internalDone(java.lang.Object, org.eclipse.core.runtime.IStatus)
*/
@Override
protected void internalDone(Object caller, IStatus status) {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/async/AsyncCallbackCollector.java b/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/async/AsyncCallbackCollector.java
index f0fb15908..94000d9f3 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/async/AsyncCallbackCollector.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/async/AsyncCallbackCollector.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.core.async;
+package org.eclipse.tcf.te.core.async;
import java.util.concurrent.ExecutionException;
@@ -15,9 +15,9 @@ import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.core.runtime.Status;
-import org.eclipse.tm.te.core.activator.CoreBundleActivator;
-import org.eclipse.tm.te.runtime.callback.Callback;
-import org.eclipse.tm.te.runtime.interfaces.callback.ICallback;
+import org.eclipse.tcf.te.core.activator.CoreBundleActivator;
+import org.eclipse.tcf.te.runtime.callback.Callback;
+import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback;
/**
* The asynchronous callback collector is an extension to the asynchronous callback handler. The
@@ -80,7 +80,7 @@ public class AsyncCallbackCollector extends AsyncCallbackHandler {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.callback.Callback#internalDone(java.lang.Object, org.eclipse.core.runtime.IStatus)
+ * @see org.eclipse.tcf.te.runtime.callback.Callback#internalDone(java.lang.Object, org.eclipse.core.runtime.IStatus)
*/
@Override
protected void internalDone(Object caller, IStatus status) {
@@ -132,7 +132,7 @@ public class AsyncCallbackCollector extends AsyncCallbackHandler {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.core.async.AsyncCallbackHandler#addCallback(org.eclipse.tm.te.runtime.interfaces.callback.ICallback)
+ * @see org.eclipse.tcf.te.core.async.AsyncCallbackHandler#addCallback(org.eclipse.tcf.te.runtime.interfaces.callback.ICallback)
*/
@Override
public final synchronized void addCallback(ICallback callback) {
@@ -175,7 +175,7 @@ public class AsyncCallbackCollector extends AsyncCallbackHandler {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.core.async.AsyncCallbackHandler#removeCallback(org.eclipse.tm.te.runtime.interfaces.callback.ICallback)
+ * @see org.eclipse.tcf.te.core.async.AsyncCallbackHandler#removeCallback(org.eclipse.tcf.te.runtime.interfaces.callback.ICallback)
*/
@Override
public final synchronized void removeCallback(ICallback callback) {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/async/AsyncCallbackHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/async/AsyncCallbackHandler.java
index 8ea299ebc..22b9a6bc2 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/async/AsyncCallbackHandler.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/async/AsyncCallbackHandler.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.core.async;
+package org.eclipse.tcf.te.core.async;
import java.util.Hashtable;
import java.util.Iterator;
@@ -16,8 +16,8 @@ import java.util.Map;
import java.util.Vector;
import org.eclipse.core.runtime.Platform;
-import org.eclipse.tm.te.runtime.interfaces.IConditionTester;
-import org.eclipse.tm.te.runtime.interfaces.callback.ICallback;
+import org.eclipse.tcf.te.runtime.interfaces.IConditionTester;
+import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback;
/**
* Common implementation to handle and wait for asynchronous callback's.
@@ -27,7 +27,7 @@ public class AsyncCallbackHandler {
private final IConditionTester conditionTester;
private Throwable error;
- private final static boolean TRACING_ENABLED = Boolean.parseBoolean(Platform.getDebugOption("org.eclipse.tm.te.runtime/trace/callbacks")); //$NON-NLS-1$
+ private final static boolean TRACING_ENABLED = Boolean.parseBoolean(Platform.getDebugOption("org.eclipse.tcf.te.runtime/trace/callbacks")); //$NON-NLS-1$
// This map will track who have added a specific callback to the handler.
// This is for internal debugging purpose only.
@@ -171,7 +171,7 @@ public class AsyncCallbackHandler {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.IConditionTester#cleanup()
+ * @see org.eclipse.tcf.te.runtime.interfaces.IConditionTester#cleanup()
*/
@Override
public void cleanup() {
@@ -181,7 +181,7 @@ public class AsyncCallbackHandler {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.IConditionTester#isConditionFulfilled()
+ * @see org.eclipse.tcf.te.runtime.interfaces.IConditionTester#isConditionFulfilled()
*/
@Override
public boolean isConditionFulfilled() {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/async/interfaces/IAsyncExecutable.java b/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/async/interfaces/IAsyncExecutable.java
index 57c84be6b..949bc0b34 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/async/interfaces/IAsyncExecutable.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/async/interfaces/IAsyncExecutable.java
@@ -7,10 +7,10 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.core.async.interfaces;
+package org.eclipse.tcf.te.core.async.interfaces;
import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.tm.te.runtime.interfaces.callback.ICallback;
+import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback;
/**
* Describes a common interface of an encapsulated executable.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/nls/Messages.java b/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/nls/Messages.java
index b698232ec..ae2936030 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/nls/Messages.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/nls/Messages.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.core.nls;
+package org.eclipse.tcf.te.core.nls;
import org.eclipse.osgi.util.NLS;
@@ -17,7 +17,7 @@ import org.eclipse.osgi.util.NLS;
public class Messages extends NLS {
// The plug-in resource bundle name
- private static final String BUNDLE_NAME = "org.eclipse.tm.te.core.nls.Messages"; //$NON-NLS-1$
+ private static final String BUNDLE_NAME = "org.eclipse.tcf.te.core.nls.Messages"; //$NON-NLS-1$
/**
* Static constructor.
@@ -34,4 +34,9 @@ public class Messages extends NLS {
public static String ConnectStrategyStepExecutor_warning_stepFailed;
public static String ConnectStrategyStepExecutor_error_stepFailed;
public static String ConnectStrategyStepExecutor_stepFailed_debugInfo;
+
+ public static String ModelNodePersistableAdapter_export_invalidPersistable;
+ public static String ModelNodePersistableAdapter_export_unknownType;
+ public static String ModelNodePersistableAdapter_import_invalidReference;
+ public static String ModelNodePersistableAdapter_import_cannotLoadClass;
}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/nls/Messages.properties b/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/nls/Messages.properties
index 93ac9664f..f80734b73 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/nls/Messages.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/nls/Messages.properties
@@ -1,5 +1,5 @@
#
-# org.eclipse.tm.te.core
+# org.eclipse.tcf.te.core
# Externalized Strings.
#
@@ -17,3 +17,8 @@ Context: {1}\n\
Connect Strategy: {2}\n\
Connect Step: {3}
ConnectStrategyStepExecutor_stepFailed_debugInfo=Debug info:\n{0}
+
+ModelNodePersistableAdapter_export_invalidPersistable=Persistable for object type ''{0}'' provides incomplete information for property ''{1}''.
+ModelNodePersistableAdapter_export_unknownType=No strategy to persist an object of type ''{0}'', key = ''{1}''.
+ModelNodePersistableAdapter_import_invalidReference=Reference provides incomplete information for property ''{0}'' to restore the object.
+ModelNodePersistableAdapter_import_cannotLoadClass=Cannot load class for name ''{0}''
diff --git a/target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/utils/text/StringUtil.java b/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/utils/text/StringUtil.java
index 5eb050ace..0f78e3ad1 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/utils/text/StringUtil.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/utils/text/StringUtil.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.core.utils.text;
+package org.eclipse.tcf.te.core.utils.text;
import java.io.IOException;
import java.io.StreamTokenizer;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.model/.classpath b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/.classpath
index 8a8f1668c..8a8f1668c 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.model/.classpath
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/.classpath
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/.options b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/.options
new file mode 100644
index 000000000..fa594cfd9
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/.options
@@ -0,0 +1 @@
+org.eclipse.tcf.te.launch.core/debugmode = 0
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/.project b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/.project
new file mode 100644
index 000000000..7b9e78974
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.tcf.te.launch.core</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/target_explorer/plugins/org.eclipse.tcf.te.launch.core/.settings/org.eclipse.jdt.core.prefs b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3b56239a2
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,362 @@
+#Thu Jan 05 15:30:33 CET 2012
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+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.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.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=enabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=enabled
+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.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=warning
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
+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=warning
+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=enabled
+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.unusedObjectAllocation=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
+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.6
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=0
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=0
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=0
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=0
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=0
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=true
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
+org.eclipse.jdt.core.formatter.comment.line_length=100
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=4
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=4
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=true
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=true
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=true
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=true
+org.eclipse.jdt.core.formatter.lineSplit=100
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=true
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/.settings/org.eclipse.jdt.ui.prefs b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 000000000..ff27c7cc8
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,4 @@
+#Thu Jan 05 15:30:28 CET 2012
+eclipse.preferences.version=1
+formatter_profile=_Target Explorer Java STD
+formatter_settings_version=12
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..5b606e5f9
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/META-INF/MANIFEST.MF
@@ -0,0 +1,12 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.tcf.te.launch.core;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipse.tcf.te.launch.core.activator.CoreBundleActivator
+Bundle-Vendor: %providerName
+Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
+ org.eclipse.tcf.te.runtime;bundle-version="1.0.0"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
+Bundle-Localization: plugin
diff --git a/target_explorer/plugins/org.eclipse.tm.te.rcp.application/build.properties b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/build.properties
index f4ae97015..f4ae97015 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.rcp.application/build.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/build.properties
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/plugin.properties
index d225d6c8e..455ca43d9 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/plugin.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/plugin.properties
@@ -8,5 +8,5 @@
# Wind River Systems - initial API and implementation
##################################################################################
-pluginName = Target Explorer, Stepper plug-in
+pluginName = Target Explorer, Launching, Core
providerName = Eclipse.org
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/pom.xml b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/pom.xml
new file mode 100644
index 000000000..41fdbd202
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.tcf</groupId>
+ <artifactId>tcf-parent</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../../../pom.xml</relativePath>
+ </parent>
+
+ <version>1.0.0.qualifier</version>
+ <artifactId>org.eclipse.tcf.te.launch.core</artifactId>
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/activator/CoreBundleActivator.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/activator/CoreBundleActivator.java
new file mode 100644
index 000000000..bfc498f29
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/activator/CoreBundleActivator.java
@@ -0,0 +1,75 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.launch.core.activator;
+
+import org.eclipse.tcf.te.runtime.tracing.TraceHandler;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class CoreBundleActivator implements BundleActivator {
+ // The bundle context
+ private static BundleContext context;
+ // The trace handler instance
+ private static TraceHandler traceHandler;
+
+ /**
+ * Returns the bundle context
+ *
+ * @return the bundle context
+ */
+ public static BundleContext getContext() {
+ return context;
+ }
+
+ /**
+ * Convenience method which returns the unique identifier of this plugin.
+ */
+ public static String getUniqueIdentifier() {
+ if (getContext() != null && getContext().getBundle() != null) {
+ return getContext().getBundle().getSymbolicName();
+ }
+ return null;
+ }
+
+ /**
+ * Returns the bundles trace handler.
+ *
+ * @return The bundles trace handler.
+ */
+ public static TraceHandler getTraceHandler() {
+ if (traceHandler == null) {
+ traceHandler = new TraceHandler(getUniqueIdentifier());
+ }
+ return traceHandler;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext bundleContext) throws Exception {
+ CoreBundleActivator.context = bundleContext;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext bundleContext) throws Exception {
+ CoreBundleActivator.context = null;
+ traceHandler = null;
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/nls/Messages.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/nls/Messages.java
new file mode 100644
index 000000000..6caa47de2
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/nls/Messages.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.launch.core.nls;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * Launch Core Plug-in externalized strings management.
+ */
+public class Messages extends NLS {
+
+ // The plug-in resource bundle name
+ private static final String BUNDLE_NAME = "org.eclipse.tcf.te.launch.core.nls.Messages"; //$NON-NLS-1$
+
+ /**
+ * Static constructor.
+ */
+ static {
+ // Load message values from bundle file
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ // **** Declare externalized string id's down here *****
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/nls/Messages.properties b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/nls/Messages.properties
new file mode 100644
index 000000000..5192a3c8f
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/nls/Messages.properties
@@ -0,0 +1,5 @@
+#
+# org.eclipse.tcf.te.launch.core
+# Externalized Strings.
+#
+
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.persistence/.classpath b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/.classpath
index 8a8f1668c..8a8f1668c 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.persistence/.classpath
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/.classpath
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/.options b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/.options
new file mode 100644
index 000000000..19982608e
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/.options
@@ -0,0 +1 @@
+org.eclipse.tcf.te.launch.ui/debugmode = 0
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/.project b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/.project
new file mode 100644
index 000000000..3771f2ed0
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.tcf.te.launch.ui</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/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/.settings/org.eclipse.jdt.core.prefs b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..b0e6c2bb6
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,362 @@
+#Thu Jan 05 15:30:45 CET 2012
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+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.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.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=enabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=enabled
+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.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=warning
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
+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=warning
+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=enabled
+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.unusedObjectAllocation=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
+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.6
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=0
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=0
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=0
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=0
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=0
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=true
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
+org.eclipse.jdt.core.formatter.comment.line_length=100
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=4
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=4
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=true
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=true
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=true
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=true
+org.eclipse.jdt.core.formatter.lineSplit=100
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=true
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/.settings/org.eclipse.jdt.ui.prefs b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 000000000..9e356a1a8
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,4 @@
+#Thu Jan 05 15:30:44 CET 2012
+eclipse.preferences.version=1
+formatter_profile=_Target Explorer Java STD
+formatter_settings_version=12
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..5ec3e1481
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/META-INF/MANIFEST.MF
@@ -0,0 +1,15 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.tcf.te.launch.ui;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipe.tcf.te.launch.ui.activator.UIPlugin
+Bundle-Vendor: %providerName
+Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
+ org.eclipse.ui;bundle-version="3.7.0",
+ org.eclipse.debug.core;bundle-version="3.7.0",
+ org.eclipse.debug.ui;bundle-version="3.7.101",
+ org.eclipse.tcf.te.runtime;bundle-version="1.0.0"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
+Bundle-Localization: plugin
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/build.properties b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/build.properties
index 73a5119ed..73a5119ed 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/build.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/build.properties
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/plugin.properties
new file mode 100644
index 000000000..23de3b105
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/plugin.properties
@@ -0,0 +1,12 @@
+##################################################################################
+# Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+# This program and the accompanying materials are made available under the terms
+# of the Eclipse Public License v1.0 which accompanies this distribution, and is
+# available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Wind River Systems - initial API and implementation
+##################################################################################
+
+pluginName = Target Explorer, Launching, UI
+providerName = Eclipse.org
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/plugin.xml b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/plugin.xml
new file mode 100644
index 000000000..17f57fb7f
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/plugin.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+
+<!-- Command contributions -->
+ <extension point="org.eclipse.ui.commands">
+ <command
+ categoryId="org.eclipse.tcf.te.ui.commands.category"
+ description="%Command.showInDebugView.description"
+ helpContextId="org.eclipse.tcf.te.launch.command_ShowInDebugView"
+ id="org.eclipse.tcf.te.launch.command.showInDebugView"
+ name="%Command.showInDebugView.name">
+ </command>
+ </extension>
+ <extension
+ point="org.eclipse.ui.commandImages">
+ <image
+ commandId="org.eclipse.tcf.te.launch.command.showInDebugView"
+ icon="platform:/plugin/org.eclipse.debug.ui/icons/full/eview16/debug_view.gif">
+ </image>
+ </extension>
+
+</plugin>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/pom.xml b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/pom.xml
new file mode 100644
index 000000000..e4204b68d
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.tcf</groupId>
+ <artifactId>tcf-parent</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../../../pom.xml</relativePath>
+ </parent>
+
+ <version>1.0.0.qualifier</version>
+ <artifactId>org.eclipse.tcf.te.launch.ui</artifactId>
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipe/tcf/te/launch/ui/activator/UIPlugin.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipe/tcf/te/launch/ui/activator/UIPlugin.java
new file mode 100644
index 000000000..855dd8147
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipe/tcf/te/launch/ui/activator/UIPlugin.java
@@ -0,0 +1,114 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipe.tcf.te.launch.ui.activator;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.ImageRegistry;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.tcf.te.runtime.tracing.TraceHandler;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class UIPlugin extends AbstractUIPlugin {
+ // The shared instance
+ private static UIPlugin plugin;
+ // The trace handler instance
+ private static TraceHandler traceHandler;
+
+ /**
+ * The constructor
+ */
+ public UIPlugin() {
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static UIPlugin getDefault() {
+ return plugin;
+ }
+
+ /**
+ * Convenience method which returns the unique identifier of this plugin.
+ */
+ public static String getUniqueIdentifier() {
+ if (getDefault() != null && getDefault().getBundle() != null) {
+ return getDefault().getBundle().getSymbolicName();
+ }
+ return null;
+ }
+
+ /**
+ * Returns the bundles trace handler.
+ *
+ * @return The bundles trace handler.
+ */
+ public static TraceHandler getTraceHandler() {
+ if (traceHandler == null) {
+ traceHandler = new TraceHandler(getUniqueIdentifier());
+ }
+ return traceHandler;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ traceHandler = null;
+ super.stop(context);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#initializeImageRegistry(org.eclipse.jface.resource.ImageRegistry)
+ */
+ @Override
+ protected void initializeImageRegistry(ImageRegistry registry) {
+ }
+
+ /**
+ * Loads the image registered under the specified key from the image
+ * registry and returns the <code>Image</code> object instance.
+ *
+ * @param key The key the image is registered with.
+ * @return The <code>Image</code> object instance or <code>null</code>.
+ */
+ public static Image getImage(String key) {
+ return getDefault().getImageRegistry().get(key);
+ }
+
+ /**
+ * Loads the image registered under the specified key from the image
+ * registry and returns the <code>ImageDescriptor</code> object instance.
+ *
+ * @param key The key the image is registered with.
+ * @return The <code>ImageDescriptor</code> object instance or <code>null</code>.
+ */
+ public static ImageDescriptor getImageDescriptor(String key) {
+ return getDefault().getImageRegistry().getDescriptor(key);
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipe/tcf/te/launch/ui/nls/Messages.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipe/tcf/te/launch/ui/nls/Messages.java
new file mode 100644
index 000000000..4001bd380
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipe/tcf/te/launch/ui/nls/Messages.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipe.tcf.te.launch.ui.nls;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * Launch UI Plug-in externalized strings management.
+ */
+public class Messages extends NLS {
+
+ // The plug-in resource bundle name
+ private static final String BUNDLE_NAME = "org.eclipse.tcf.te.launch.ui.nls.Messages"; //$NON-NLS-1$
+
+ /**
+ * Static constructor.
+ */
+ static {
+ // Load message values from bundle file
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ // **** Declare externalized string id's down here *****
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipe/tcf/te/launch/ui/nls/Messages.properties b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipe/tcf/te/launch/ui/nls/Messages.properties
new file mode 100644
index 000000000..5343e9cc3
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipe/tcf/te/launch/ui/nls/Messages.properties
@@ -0,0 +1,5 @@
+#
+# org.eclipse.tcf.te.launch.ui
+# Externalized Strings.
+#
+
diff --git a/target_explorer/plugins/org.eclipse.tm.te.rcp.application/.classpath b/target_explorer/plugins/org.eclipse.tcf.te.rcp.application/.classpath
index 2d1a4302f..2d1a4302f 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.rcp.application/.classpath
+++ b/target_explorer/plugins/org.eclipse.tcf.te.rcp.application/.classpath
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.rcp.application/.project b/target_explorer/plugins/org.eclipse.tcf.te.rcp.application/.project
new file mode 100644
index 000000000..2118081c0
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.rcp.application/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.tcf.te.rcp.application</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/target_explorer/plugins/org.eclipse.tm.te.rcp.application/.settings/org.eclipse.jdt.core.prefs b/target_explorer/plugins/org.eclipse.tcf.te.rcp.application/.settings/org.eclipse.jdt.core.prefs
index 84143716c..84143716c 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.rcp.application/.settings/org.eclipse.jdt.core.prefs
+++ b/target_explorer/plugins/org.eclipse.tcf.te.rcp.application/.settings/org.eclipse.jdt.core.prefs
diff --git a/target_explorer/plugins/org.eclipse.tm.te.rcp.application/.settings/org.eclipse.jdt.ui.prefs b/target_explorer/plugins/org.eclipse.tcf.te.rcp.application/.settings/org.eclipse.jdt.ui.prefs
index 6c0b70599..6c0b70599 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.rcp.application/.settings/org.eclipse.jdt.ui.prefs
+++ b/target_explorer/plugins/org.eclipse.tcf.te.rcp.application/.settings/org.eclipse.jdt.ui.prefs
diff --git a/target_explorer/plugins/org.eclipse.tm.te.rcp.application/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.rcp.application/META-INF/MANIFEST.MF
index 72f82175d..4f228f679 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.rcp.application/META-INF/MANIFEST.MF
+++ b/target_explorer/plugins/org.eclipse.tcf.te.rcp.application/META-INF/MANIFEST.MF
@@ -1,9 +1,9 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.tm.te.rcp.application;singleton:=true
+Bundle-SymbolicName: org.eclipse.tcf.te.rcp.application;singleton:=true
Bundle-Version: 1.0.0.qualifier
-Bundle-Activator: org.eclipse.tm.te.rcp.application.activator.UIPlugin
+Bundle-Activator: org.eclipse.tcf.te.rcp.application.activator.UIPlugin
Bundle-Vendor: %providerName
Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
org.eclipse.ui;bundle-version="3.7.0",
@@ -11,5 +11,5 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ActivationPolicy: lazy
Bundle-Localization: plugin
-Export-Package: org.eclipse.tm.te.rcp.application;version="1.0.0",
- org.eclipse.tm.te.rcp.application.nls;version="1.0.0"
+Export-Package: org.eclipse.tcf.te.rcp.application;version="1.0.0",
+ org.eclipse.tcf.te.rcp.application.nls;version="1.0.0"
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.model/build.properties b/target_explorer/plugins/org.eclipse.tcf.te.rcp.application/build.properties
index f4ae97015..f4ae97015 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.model/build.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.rcp.application/build.properties
diff --git a/target_explorer/plugins/org.eclipse.tm.te.rcp.application/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.rcp.application/plugin.properties
index e5e75d8f2..e5e75d8f2 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.rcp.application/plugin.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.rcp.application/plugin.properties
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.rcp.application/pom.xml b/target_explorer/plugins/org.eclipse.tcf.te.rcp.application/pom.xml
new file mode 100644
index 000000000..8a479f2d3
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.rcp.application/pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.tcf</groupId>
+ <artifactId>tcf-parent</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../../../pom.xml</relativePath>
+ </parent>
+
+ <version>1.0.0.qualifier</version>
+ <artifactId>org.eclipse.tcf.te.rcp.application</artifactId>
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.rcp.application/src/org/eclipse/tm/te/rcp/application/Application.java b/target_explorer/plugins/org.eclipse.tcf.te.rcp.application/src/org/eclipse/tcf/te/rcp/application/Application.java
index 618e234e0..951ad9abc 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.rcp.application/src/org/eclipse/tm/te/rcp/application/Application.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.rcp.application/src/org/eclipse/tcf/te/rcp/application/Application.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.rcp.application;
+package org.eclipse.tcf.te.rcp.application;
import org.eclipse.core.runtime.Platform;
import org.eclipse.equinox.app.IApplication;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.rcp.application/src/org/eclipse/tm/te/rcp/application/ApplicationActionBarAdvisor.java b/target_explorer/plugins/org.eclipse.tcf.te.rcp.application/src/org/eclipse/tcf/te/rcp/application/ApplicationActionBarAdvisor.java
index 25b5592a4..dbe00bf17 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.rcp.application/src/org/eclipse/tm/te/rcp/application/ApplicationActionBarAdvisor.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.rcp.application/src/org/eclipse/tcf/te/rcp/application/ApplicationActionBarAdvisor.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.rcp.application;
+package org.eclipse.tcf.te.rcp.application;
import org.eclipse.core.runtime.Platform;
import org.eclipse.jface.action.ActionContributionItem;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.rcp.application/src/org/eclipse/tm/te/rcp/application/ApplicationWorkbenchAdvisor.java b/target_explorer/plugins/org.eclipse.tcf.te.rcp.application/src/org/eclipse/tcf/te/rcp/application/ApplicationWorkbenchAdvisor.java
index 3925fcb3b..f16de5b36 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.rcp.application/src/org/eclipse/tm/te/rcp/application/ApplicationWorkbenchAdvisor.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.rcp.application/src/org/eclipse/tcf/te/rcp/application/ApplicationWorkbenchAdvisor.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.rcp.application;
+package org.eclipse.tcf.te.rcp.application;
import java.text.Collator;
@@ -20,7 +20,7 @@ import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;
-import org.eclipse.tm.te.rcp.application.nls.Messages;
+import org.eclipse.tcf.te.rcp.application.nls.Messages;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.application.IWorkbenchConfigurer;
import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
@@ -35,7 +35,7 @@ import org.eclipse.ui.internal.PluginActionBuilder;
@SuppressWarnings("restriction")
public class ApplicationWorkbenchAdvisor extends WorkbenchAdvisor {
- private final static String PERSPECTIVE_ID = "org.eclipse.tm.te.ui.perspective"; //$NON-NLS-1$
+ private final static String PERSPECTIVE_ID = "org.eclipse.tcf.te.ui.perspective"; //$NON-NLS-1$
private static ApplicationWorkbenchAdvisor workbenchAdvisor = null;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.rcp.application/src/org/eclipse/tm/te/rcp/application/ApplicationWorkbenchWindowAdvisor.java b/target_explorer/plugins/org.eclipse.tcf.te.rcp.application/src/org/eclipse/tcf/te/rcp/application/ApplicationWorkbenchWindowAdvisor.java
index cfe8a6f2d..b55a4b5ed 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.rcp.application/src/org/eclipse/tm/te/rcp/application/ApplicationWorkbenchWindowAdvisor.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.rcp.application/src/org/eclipse/tcf/te/rcp/application/ApplicationWorkbenchWindowAdvisor.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.rcp.application;
+package org.eclipse.tcf.te.rcp.application;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IProduct;
@@ -28,8 +28,8 @@ import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.ToolBar;
-import org.eclipse.tm.te.rcp.application.activator.UIPlugin;
-import org.eclipse.tm.te.rcp.application.nls.Messages;
+import org.eclipse.tcf.te.rcp.application.activator.UIPlugin;
+import org.eclipse.tcf.te.rcp.application.nls.Messages;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IEditorReference;
import org.eclipse.ui.IPageListener;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.rcp.application/src/org/eclipse/tm/te/rcp/application/activator/UIPlugin.java b/target_explorer/plugins/org.eclipse.tcf.te.rcp.application/src/org/eclipse/tcf/te/rcp/application/activator/UIPlugin.java
index 3e8a31f1e..5cc503063 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.rcp.application/src/org/eclipse/tm/te/rcp/application/activator/UIPlugin.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.rcp.application/src/org/eclipse/tcf/te/rcp/application/activator/UIPlugin.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.rcp.application.activator;
+package org.eclipse.tcf.te.rcp.application.activator;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.rcp.application/src/org/eclipse/tm/te/rcp/application/nls/Messages.java b/target_explorer/plugins/org.eclipse.tcf.te.rcp.application/src/org/eclipse/tcf/te/rcp/application/nls/Messages.java
index 6f6320211..0c30dad23 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.rcp.application/src/org/eclipse/tm/te/rcp/application/nls/Messages.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.rcp.application/src/org/eclipse/tcf/te/rcp/application/nls/Messages.java
@@ -8,7 +8,7 @@
* of this software may be licensed only pursuant to the terms
* of an applicable Wind River license agreement.
*/
-package org.eclipse.tm.te.rcp.application.nls;
+package org.eclipse.tcf.te.rcp.application.nls;
import org.eclipse.osgi.util.NLS;
@@ -20,7 +20,7 @@ import org.eclipse.osgi.util.NLS;
public class Messages extends NLS {
// The plug-in resource bundle name
- private static final String BUNDLE_NAME = "org.eclipse.tm.te.rcp.internal.nls.Messages"; //$NON-NLS-1$
+ private static final String BUNDLE_NAME = "org.eclipse.tcf.te.rcp.internal.nls.Messages"; //$NON-NLS-1$
/**
* Static constructor.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.rcp.application/src/org/eclipse/tm/te/rcp/application/nls/Messages.properties b/target_explorer/plugins/org.eclipse.tcf.te.rcp.application/src/org/eclipse/tcf/te/rcp/application/nls/Messages.properties
index fb56c2f1e..ca2af3f93 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.rcp.application/src/org/eclipse/tm/te/rcp/application/nls/Messages.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.rcp.application/src/org/eclipse/tcf/te/rcp/application/nls/Messages.properties
@@ -1,5 +1,5 @@
#
-# org.eclipse.tm.te.rcp.application
+# org.eclipse.tcf.te.rcp.application
# Externalized Strings.
#
diff --git a/target_explorer/plugins/org.eclipse.tm.te.rcp/.classpath b/target_explorer/plugins/org.eclipse.tcf.te.rcp/.classpath
index 64c5e31b7..64c5e31b7 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.rcp/.classpath
+++ b/target_explorer/plugins/org.eclipse.tcf.te.rcp/.classpath
diff --git a/target_explorer/plugins/org.eclipse.tm.te.rcp/.project b/target_explorer/plugins/org.eclipse.tcf.te.rcp/.project
index 70e3a2fe8..d9ec31760 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.rcp/.project
+++ b/target_explorer/plugins/org.eclipse.tcf.te.rcp/.project
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.eclipse.tm.te.rcp</name>
+ <name>org.eclipse.tcf.te.rcp</name>
<comment></comment>
<projects>
</projects>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.rcp/.settings/org.eclipse.jdt.core.prefs b/target_explorer/plugins/org.eclipse.tcf.te.rcp/.settings/org.eclipse.jdt.core.prefs
index b4d40f12e..b4d40f12e 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.rcp/.settings/org.eclipse.jdt.core.prefs
+++ b/target_explorer/plugins/org.eclipse.tcf.te.rcp/.settings/org.eclipse.jdt.core.prefs
diff --git a/target_explorer/plugins/org.eclipse.tm.te.rcp/.settings/org.eclipse.jdt.ui.prefs b/target_explorer/plugins/org.eclipse.tcf.te.rcp/.settings/org.eclipse.jdt.ui.prefs
index 93f6bc7a3..93f6bc7a3 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.rcp/.settings/org.eclipse.jdt.ui.prefs
+++ b/target_explorer/plugins/org.eclipse.tcf.te.rcp/.settings/org.eclipse.jdt.ui.prefs
diff --git a/target_explorer/plugins/org.eclipse.tm.te.rcp/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.rcp/META-INF/MANIFEST.MF
index 08cb52753..6901a91cb 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.rcp/META-INF/MANIFEST.MF
+++ b/target_explorer/plugins/org.eclipse.tcf.te.rcp/META-INF/MANIFEST.MF
@@ -1,14 +1,14 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.tm.te.rcp;singleton:=true
+Bundle-SymbolicName: org.eclipse.tcf.te.rcp;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Vendor: %providerName
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-Localization: plugin
Bundle-ActivationPolicy: lazy
-Bundle-Activator: org.eclipse.tm.te.rcp.activator.ProductBundleActivator
+Bundle-Activator: org.eclipse.tcf.te.rcp.activator.ProductBundleActivator
Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
org.eclipse.ui;bundle-version="3.7.0",
org.eclipse.ui.ide;bundle-version="3.7.0",
- org.eclipse.tm.te.rcp.application;bundle-version="1.0.0"
+ org.eclipse.tcf.te.rcp.application;bundle-version="1.0.0"
diff --git a/target_explorer/plugins/org.eclipse.tm.te.rcp/build.properties b/target_explorer/plugins/org.eclipse.tcf.te.rcp/build.properties
index 0fff6fa34..0fff6fa34 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.rcp/build.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.rcp/build.properties
diff --git a/target_explorer/plugins/org.eclipse.tm.te.rcp/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.rcp/plugin.properties
index 6f3e42374..6f3e42374 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.rcp/plugin.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.rcp/plugin.properties
diff --git a/target_explorer/plugins/org.eclipse.tm.te.rcp/plugin.xml b/target_explorer/plugins/org.eclipse.tcf.te.rcp/plugin.xml
index 573950204..d77f13290 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.rcp/plugin.xml
+++ b/target_explorer/plugins/org.eclipse.tcf.te.rcp/plugin.xml
@@ -5,7 +5,7 @@
<!-- Eclipse product contributions -->
<extension id="TargetExplorer" point="org.eclipse.core.runtime.products">
<product
- application="org.eclipse.tm.te.rcp.TargetExplorer"
+ application="org.eclipse.tcf.te.rcp.TargetExplorer"
description="%productBlurb"
name="%productName">
<property name="aboutText" value="%productBlurb"/>
@@ -36,7 +36,7 @@
point="org.eclipse.ui.intro">
<introProductBinding
introId="org.eclipse.ui.intro.universal"
- productId="org.eclipse.tm.te.rcp.TargetExplorer">
+ productId="org.eclipse.tcf.te.rcp.TargetExplorer">
</introProductBinding>
</extension> -->
@@ -46,7 +46,7 @@
cardinality="singleton-global"
thread="main"
visible="true">
- <run class="org.eclipse.tm.te.rcp.application.Application"/>
+ <run class="org.eclipse.tcf.te.rcp.application.Application"/>
</application>
</extension>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.rcp/plugin_customization.ini b/target_explorer/plugins/org.eclipse.tcf.te.rcp/plugin_customization.ini
index 3b33cc945..3b33cc945 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.rcp/plugin_customization.ini
+++ b/target_explorer/plugins/org.eclipse.tcf.te.rcp/plugin_customization.ini
diff --git a/target_explorer/plugins/org.eclipse.tm.te.core/pom.xml b/target_explorer/plugins/org.eclipse.tcf.te.rcp/pom.xml
index ed6fa952a..74a104387 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.core/pom.xml
+++ b/target_explorer/plugins/org.eclipse.tcf.te.rcp/pom.xml
@@ -7,11 +7,11 @@
<parent>
<groupId>org.eclipse.tcf</groupId>
<artifactId>tcf-parent</artifactId>
- <version>0.5.0-SNAPSHOT</version>
+ <version>1.0.0-SNAPSHOT</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<version>1.0.0.qualifier</version>
- <artifactId>org.eclipse.tm.te.core</artifactId>
+ <artifactId>org.eclipse.tcf.te.rcp</artifactId>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.rcp/products/TargetExplorer.product b/target_explorer/plugins/org.eclipse.tcf.te.rcp/products/TargetExplorer.product
index a7dc724cb..2088010ce 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.rcp/products/TargetExplorer.product
+++ b/target_explorer/plugins/org.eclipse.tcf.te.rcp/products/TargetExplorer.product
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<?pde version="3.5"?>
-<product name="%productName" uid="org.eclipse.tm.te.rcp.targetexplorer" id="org.eclipse.tm.te.rcp.TargetExplorer" application="org.eclipse.tm.te.rcp.TargetExplorer" version="1.0.0.qualifier" useFeatures="false" includeLaunchers="true">
+<product name="%productName" uid="org.eclipse.tcf.te.rcp.targetexplorer" id="org.eclipse.tcf.te.rcp.TargetExplorer" application="org.eclipse.tcf.te.rcp.TargetExplorer" version="1.0.0.qualifier" useFeatures="false" includeLaunchers="true">
<aboutInfo>
<text>
@@ -83,13 +83,13 @@
<plugin id="org.eclipse.swt.win32.win32.x86" fragment="true"/>
<plugin id="org.eclipse.swt.win32.win32.x86_64" fragment="true"/>
<plugin id="org.eclipse.text"/>
- <plugin id="org.eclipse.tm.te.rcp"/>
- <plugin id="org.eclipse.tm.te.rcp.application"/>
- <plugin id="org.eclipse.tm.te.runtime"/>
- <plugin id="org.eclipse.tm.te.ui"/>
- <plugin id="org.eclipse.tm.te.ui.forms"/>
- <plugin id="org.eclipse.tm.te.ui.swt"/>
- <plugin id="org.eclipse.tm.te.ui.views"/>
+ <plugin id="org.eclipse.tcf.te.rcp"/>
+ <plugin id="org.eclipse.tcf.te.rcp.application"/>
+ <plugin id="org.eclipse.tcf.te.runtime"/>
+ <plugin id="org.eclipse.tcf.te.ui"/>
+ <plugin id="org.eclipse.tcf.te.ui.forms"/>
+ <plugin id="org.eclipse.tcf.te.ui.swt"/>
+ <plugin id="org.eclipse.tcf.te.ui.views"/>
<plugin id="org.eclipse.ui"/>
<plugin id="org.eclipse.ui.forms"/>
<plugin id="org.eclipse.ui.ide"/>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.rcp/products/TargetExplorer_TCF.product b/target_explorer/plugins/org.eclipse.tcf.te.rcp/products/TargetExplorer_TCF.product
index 1f1194a46..5a3d4b39a 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.rcp/products/TargetExplorer_TCF.product
+++ b/target_explorer/plugins/org.eclipse.tcf.te.rcp/products/TargetExplorer_TCF.product
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<?pde version="3.5"?>
-<product name="%productName" uid="org.eclipse.tm.te.rcp.targetexplorer.tcf" id="org.eclipse.tm.te.rcp.TargetExplorer" application="org.eclipse.tm.te.rcp.TargetExplorer" version="1.0.0.qualifier" useFeatures="false" includeLaunchers="true">
+<product name="%productName" uid="org.eclipse.tcf.te.rcp.targetexplorer.tcf" id="org.eclipse.tcf.te.rcp.TargetExplorer" application="org.eclipse.tcf.te.rcp.TargetExplorer" version="1.0.0.qualifier" useFeatures="false" includeLaunchers="true">
<aboutInfo>
<text>
@@ -83,20 +83,20 @@
<plugin id="org.eclipse.swt.win32.win32.x86" fragment="true"/>
<plugin id="org.eclipse.swt.win32.win32.x86_64" fragment="true"/>
<plugin id="org.eclipse.text"/>
- <plugin id="org.eclipse.tm.tcf.core"/>
- <plugin id="org.eclipse.tm.te.rcp"/>
- <plugin id="org.eclipse.tm.te.rcp.application"/>
- <plugin id="org.eclipse.tm.te.runtime"/>
- <plugin id="org.eclipse.tm.te.runtime.persistence"/>
- <plugin id="org.eclipse.tm.te.tcf.core"/>
- <plugin id="org.eclipse.tm.te.tcf.filesystem"/>
- <plugin id="org.eclipse.tm.te.tcf.locator"/>
- <plugin id="org.eclipse.tm.te.tcf.ui"/>
- <plugin id="org.eclipse.tm.te.ui"/>
- <plugin id="org.eclipse.tm.te.ui.controls"/>
- <plugin id="org.eclipse.tm.te.ui.forms"/>
- <plugin id="org.eclipse.tm.te.ui.swt"/>
- <plugin id="org.eclipse.tm.te.ui.views"/>
+ <plugin id="org.eclipse.tcf.core"/>
+ <plugin id="org.eclipse.tcf.te.rcp"/>
+ <plugin id="org.eclipse.tcf.te.rcp.application"/>
+ <plugin id="org.eclipse.tcf.te.runtime"/>
+ <plugin id="org.eclipse.tcf.te.runtime.persistence"/>
+ <plugin id="org.eclipse.tcf.te.tcf.core"/>
+ <plugin id="org.eclipse.tcf.te.tcf.filesystem"/>
+ <plugin id="org.eclipse.tcf.te.tcf.locator"/>
+ <plugin id="org.eclipse.tcf.te.tcf.ui"/>
+ <plugin id="org.eclipse.tcf.te.ui"/>
+ <plugin id="org.eclipse.tcf.te.ui.controls"/>
+ <plugin id="org.eclipse.tcf.te.ui.forms"/>
+ <plugin id="org.eclipse.tcf.te.ui.swt"/>
+ <plugin id="org.eclipse.tcf.te.ui.views"/>
<plugin id="org.eclipse.ui"/>
<plugin id="org.eclipse.ui.forms"/>
<plugin id="org.eclipse.ui.ide"/>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.rcp/src/org/eclipse/tm/te/rcp/activator/ProductBundleActivator.java b/target_explorer/plugins/org.eclipse.tcf.te.rcp/src/org/eclipse/tcf/te/rcp/activator/ProductBundleActivator.java
index ea22642f4..18b1456d3 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.rcp/src/org/eclipse/tm/te/rcp/activator/ProductBundleActivator.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.rcp/src/org/eclipse/tcf/te/rcp/activator/ProductBundleActivator.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.rcp.activator;
+package org.eclipse.tcf.te.rcp.activator;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.services/.classpath b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/.classpath
index 8a8f1668c..8a8f1668c 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.services/.classpath
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/.classpath
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/.options b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/.options
new file mode 100644
index 000000000..7f70160a4
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/.options
@@ -0,0 +1 @@
+org.eclipse.tcf.te.runtime.concurrent/debugmode = 0
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/.project b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/.project
index fc075fd30..b244be733 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/.project
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/.project
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.eclipse.tm.te.runtime.concurrent</name>
+ <name>org.eclipse.tcf.te.runtime.concurrent</name>
<comment></comment>
<projects>
</projects>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/.settings/org.eclipse.jdt.core.prefs b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/.settings/org.eclipse.jdt.core.prefs
index adf6f4442..adf6f4442 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/.settings/org.eclipse.jdt.core.prefs
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/.settings/org.eclipse.jdt.core.prefs
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/.settings/org.eclipse.jdt.ui.prefs b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/.settings/org.eclipse.jdt.ui.prefs
index 07c6724a9..07c6724a9 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/.settings/org.eclipse.jdt.ui.prefs
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/.settings/org.eclipse.jdt.ui.prefs
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..051f94fa2
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/META-INF/MANIFEST.MF
@@ -0,0 +1,20 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.tcf.te.runtime.concurrent;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipse.tcf.te.runtime.concurrent.activator.CoreBundleActivator
+Bundle-Vendor: %providerName
+Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
+ org.eclipse.tcf.te.runtime;bundle-version="1.0.0"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
+Bundle-Localization: plugin
+Export-Package: org.eclipse.tcf.te.runtime.concurrent,
+ org.eclipse.tcf.te.runtime.concurrent.activator;x-internal:=true,
+ org.eclipse.tcf.te.runtime.concurrent.event,
+ org.eclipse.tcf.te.runtime.concurrent.executors,
+ org.eclipse.tcf.te.runtime.concurrent.factories,
+ org.eclipse.tcf.te.runtime.concurrent.interfaces,
+ org.eclipse.tcf.te.runtime.concurrent.nls;x-internal:=true,
+ org.eclipse.tcf.te.runtime.concurrent.util
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.persistence/build.properties b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/build.properties
index 73a5119ed..73a5119ed 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.persistence/build.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/build.properties
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/plugin.properties
index 1cec4c8ab..1cec4c8ab 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/plugin.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/plugin.properties
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/plugin.xml b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/plugin.xml
index 7ca9c1168..8a2021cf2 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/plugin.xml
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/plugin.xml
@@ -7,12 +7,12 @@
<extension-point id="executorUtilDelegates" name="%ExtensionPoint.executorUtilDelegates.name" schema="schema/executorUtilDelegates.exsd"/>
<!-- Executor service contributions -->
- <extension point="org.eclipse.tm.te.runtime.concurrent.executorServices">
+ <extension point="org.eclipse.tcf.te.runtime.concurrent.executorServices">
<executorService
- id="org.eclipse.tm.te.runtime.concurrent.executors.singleThreaded"
+ id="org.eclipse.tcf.te.runtime.concurrent.executors.singleThreaded"
label="Single Threaded Executor">
<class
- class="org.eclipse.tm.te.runtime.concurrent.executors.SingleThreadedExecutorService">
+ class="org.eclipse.tcf.te.runtime.concurrent.executors.SingleThreadedExecutorService">
<parameter
name="threadPoolNamePrefix"
value="Target Explorer Single Thread Executor">
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/pom.xml b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/pom.xml
index 580047150..f1e135524 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/pom.xml
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/pom.xml
@@ -7,11 +7,11 @@
<parent>
<groupId>org.eclipse.tcf</groupId>
<artifactId>tcf-parent</artifactId>
- <version>0.5.0-SNAPSHOT</version>
+ <version>1.0.0-SNAPSHOT</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<version>1.0.0.qualifier</version>
- <artifactId>org.eclipse.tm.te.runtime.concurrent</artifactId>
+ <artifactId>org.eclipse.tcf.te.runtime.concurrent</artifactId>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/schema/executorServices.exsd b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/schema/executorServices.exsd
index 608a3e0d3..f5df3cf14 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/schema/executorServices.exsd
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/schema/executorServices.exsd
@@ -1,9 +1,9 @@
<?xml version='1.0' encoding='UTF-8'?>
<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.tm.te.runtime.concurrent" xmlns="http://www.w3.org/2001/XMLSchema">
+<schema targetNamespace="org.eclipse.tcf.te.runtime.concurrent" xmlns="http://www.w3.org/2001/XMLSchema">
<annotation>
<appinfo>
- <meta.schema plugin="org.eclipse.tm.te.runtime.concurrent" id="executorServices" name="Executor Services"/>
+ <meta.schema plugin="org.eclipse.tcf.te.runtime.concurrent" id="executorServices" name="Executor Services"/>
</appinfo>
<documentation>
This extension point is used to contribute executor services.
@@ -75,12 +75,12 @@
<attribute name="class" type="string">
<annotation>
<documentation>
- The class that implements &lt;code&gt;org.eclipse.tm.te.runtime.concurrent.interfaces.IExecutor&lt;/code&gt; or extends &lt;code&gt;org.eclipse.tm.te.runtime.concurrent.executors.AbstractDelegatingExecutorService&lt;/code&gt;.
+ The class that implements &lt;code&gt;org.eclipse.tcf.te.runtime.concurrent.interfaces.IExecutor&lt;/code&gt; or extends &lt;code&gt;org.eclipse.tcf.te.runtime.concurrent.executors.AbstractDelegatingExecutorService&lt;/code&gt;.
&lt;p&gt;
The executor service implementation class must be specified either by the class attribute or the class child element!
</documentation>
<appinfo>
- <meta.attribute kind="java" basedOn="org.eclipse.tm.te.runtime.concurrent.executors.AbstractDelegatingExecutorService:org.eclipse.tm.te.runtime.concurrent.interfaces.IExecutor"/>
+ <meta.attribute kind="java" basedOn="org.eclipse.tcf.te.runtime.concurrent.executors.AbstractDelegatingExecutorService:org.eclipse.tcf.te.runtime.concurrent.interfaces.IExecutor"/>
</appinfo>
</annotation>
</attribute>
@@ -108,12 +108,12 @@ The executor service implementation class must be specified either by the class
<attribute name="class" type="string">
<annotation>
<documentation>
- The class that implements &lt;code&gt;org.eclipse.tm.te.runtime.concurrent.interfaces.IExecutor&lt;/code&gt; or extends &lt;code&gt;org.eclipse.tm.te.runtime.concurrent.executors.AbstractDelegatingExecutorService&lt;/code&gt;.
+ The class that implements &lt;code&gt;org.eclipse.tcf.te.runtime.concurrent.interfaces.IExecutor&lt;/code&gt; or extends &lt;code&gt;org.eclipse.tcf.te.runtime.concurrent.executors.AbstractDelegatingExecutorService&lt;/code&gt;.
&lt;p&gt;
The executor service implementation class must be specified either by the class attribute or the class child element!
</documentation>
<appinfo>
- <meta.attribute kind="java" basedOn="org.eclipse.tm.te.runtime.concurrent.executors.AbstractDelegatingExecutorService:org.eclipse.tm.te.runtime.concurrent.interfaces.IExecutor"/>
+ <meta.attribute kind="java" basedOn="org.eclipse.tcf.te.runtime.concurrent.executors.AbstractDelegatingExecutorService:org.eclipse.tcf.te.runtime.concurrent.interfaces.IExecutor"/>
</appinfo>
</annotation>
</attribute>
@@ -161,10 +161,10 @@ The executor service implementation class must be specified either by the class
This is an example of the extension point usage:
&lt;p&gt;
&lt;pre&gt;&lt;code&gt;
- &lt;extension point=&quot;org.eclipse.tm.te.runtime.concurrent.executorServices&quot;&gt;
+ &lt;extension point=&quot;org.eclipse.tcf.te.runtime.concurrent.executorServices&quot;&gt;
&lt;executorService
- id=&quot;org.eclipse.tm.te.runtime.concurrent.executors.singleThreaded&quot;
- class=&quot;org.eclipse.tm.te.runtime.concurrent.executors.SingleThreadedExecutorService&quot;
+ id=&quot;org.eclipse.tcf.te.runtime.concurrent.executors.singleThreaded&quot;
+ class=&quot;org.eclipse.tcf.te.runtime.concurrent.executors.SingleThreadedExecutorService&quot;
label=&quot;Single Threaded Executor Service&quot;&gt;
&lt;/exectorService&gt;
&lt;/extension&gt;
@@ -177,7 +177,7 @@ The executor service implementation class must be specified either by the class
<meta.section type="apiinfo"/>
</appinfo>
<documentation>
- The provider of a executor service must implement &lt;samp&gt;org.eclipse.tm.te.runtime.concurrent.interfaces.IExecutor&lt;/samp&gt;.
+ The provider of a executor service must implement &lt;samp&gt;org.eclipse.tcf.te.runtime.concurrent.interfaces.IExecutor&lt;/samp&gt;.
</documentation>
</annotation>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/schema/executorUtilDelegates.exsd b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/schema/executorUtilDelegates.exsd
index d69521522..3fc2655b4 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/schema/executorUtilDelegates.exsd
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/schema/executorUtilDelegates.exsd
@@ -1,9 +1,9 @@
<?xml version='1.0' encoding='UTF-8'?>
<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.tm.te.runtime.concurrent" xmlns="http://www.w3.org/2001/XMLSchema">
+<schema targetNamespace="org.eclipse.tcf.te.runtime.concurrent" xmlns="http://www.w3.org/2001/XMLSchema">
<annotation>
<appinfo>
- <meta.schema plugin="org.eclipse.tm.te.runtime.concurrent" id="executorUtilDelegates" name="Executor Utility Delegates"/>
+ <meta.schema plugin="org.eclipse.tcf.te.runtime.concurrent" id="executorUtilDelegates" name="Executor Utility Delegates"/>
</appinfo>
<documentation>
This extension point is used to contribute executor utility delegates.
@@ -75,12 +75,12 @@
<attribute name="class" type="string">
<annotation>
<documentation>
- The class that implements &lt;code&gt;org.eclipse.tm.te.runtime.concurrent.interfaces.IExecutorUtilDelegate&lt;/code&gt;.
+ The class that implements &lt;code&gt;org.eclipse.tcf.te.runtime.concurrent.interfaces.IExecutorUtilDelegate&lt;/code&gt;.
&lt;p&gt;
The executor utility delegate implementation class must be specified either by the class attribute or the class child element!
</documentation>
<appinfo>
- <meta.attribute kind="java" basedOn=":org.eclipse.tm.te.runtime.concurrent.interfaces.IExecutorUtilDelegate"/>
+ <meta.attribute kind="java" basedOn=":org.eclipse.tcf.te.runtime.concurrent.interfaces.IExecutorUtilDelegate"/>
</appinfo>
</annotation>
</attribute>
@@ -108,12 +108,12 @@ The executor utility delegate implementation class must be specified either by t
<attribute name="class" type="string">
<annotation>
<documentation>
- The class that implements &lt;code&gt;org.eclipse.tm.te.runtime.concurrent.interfaces.IExecutorUtilDelegate&lt;/code&gt;.
+ The class that implements &lt;code&gt;org.eclipse.tcf.te.runtime.concurrent.interfaces.IExecutorUtilDelegate&lt;/code&gt;.
&lt;p&gt;
The executor utility delegate implementation class must be specified either by the class attribute or the class child element!
</documentation>
<appinfo>
- <meta.attribute kind="java" basedOn=":org.eclipse.tm.te.runtime.concurrent.interfaces.IExecutorUtilDelegate"/>
+ <meta.attribute kind="java" basedOn=":org.eclipse.tcf.te.runtime.concurrent.interfaces.IExecutorUtilDelegate"/>
</appinfo>
</annotation>
</attribute>
@@ -161,10 +161,10 @@ The executor utility delegate implementation class must be specified either by t
This is an example of the extension point usage:
&lt;p&gt;
&lt;pre&gt;&lt;code&gt;
- &lt;extension point=&quot;org.eclipse.tm.te.runtime.concurrent.executorUtilDelegates&quot;&gt;
+ &lt;extension point=&quot;org.eclipse.tcf.te.runtime.concurrent.executorUtilDelegates&quot;&gt;
&lt;executorUtilDelegate
- id=&quot;org.eclipse.tm.te.runtime.concurrent.executor.delegates.swt&quot;
- class=&quot;org.eclipse.tm.te.ui.swt.executor.delegates.SWTExecutorUtilDelegate&quot;
+ id=&quot;org.eclipse.tcf.te.runtime.concurrent.executor.delegates.swt&quot;
+ class=&quot;org.eclipse.tcf.te.ui.swt.executor.delegates.SWTExecutorUtilDelegate&quot;
label=&quot;SWT Executor Utility Delegate&quot;&gt;
&lt;/exectorUtilDelegate&gt;
&lt;/extension&gt;
@@ -177,7 +177,7 @@ The executor utility delegate implementation class must be specified either by t
<meta.section type="apiinfo"/>
</appinfo>
<documentation>
- The provider of a executor utility delegates must implement &lt;samp&gt;org.eclipse.tm.te.runtime.concurrent.interfaces.IExecutorUtilDelegate&lt;/samp&gt;.
+ The provider of a executor utility delegates must implement &lt;samp&gt;org.eclipse.tcf.te.runtime.concurrent.interfaces.IExecutorUtilDelegate&lt;/samp&gt;.
</documentation>
</annotation>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/src/org/eclipse/tm/te/runtime/concurrent/Executors.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/Executors.java
index 75ab9318c..2344035b1 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/src/org/eclipse/tm/te/runtime/concurrent/Executors.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/Executors.java
@@ -7,16 +7,16 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.concurrent;
+package org.eclipse.tcf.te.runtime.concurrent;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import org.eclipse.core.runtime.Assert;
-import org.eclipse.tm.te.runtime.concurrent.interfaces.IExecutor;
-import org.eclipse.tm.te.runtime.extensions.AbstractExtensionPointManager;
-import org.eclipse.tm.te.runtime.extensions.ExecutableExtensionProxy;
+import org.eclipse.tcf.te.runtime.concurrent.interfaces.IExecutor;
+import org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager;
+import org.eclipse.tcf.te.runtime.extensions.ExecutableExtensionProxy;
/**
@@ -31,15 +31,15 @@ public final class Executors {
protected static class ExecutorServiceExtensionPointManager extends AbstractExtensionPointManager<IExecutor> {
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.extensions.AbstractExtensionPointManager#getExtensionPointId()
+ * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#getExtensionPointId()
*/
@Override
protected String getExtensionPointId() {
- return "org.eclipse.tm.te.runtime.concurrent.executorServices"; //$NON-NLS-1$
+ return "org.eclipse.tcf.te.runtime.concurrent.executorServices"; //$NON-NLS-1$
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.extensions.AbstractExtensionPointManager#getConfigurationElementName()
+ * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#getConfigurationElementName()
*/
@Override
protected String getConfigurationElementName() {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.services/src/org/eclipse/tm/te/runtime/services/activator/CoreBundleActivator.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/activator/CoreBundleActivator.java
index 26e266672..fe896a055 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.services/src/org/eclipse/tm/te/runtime/services/activator/CoreBundleActivator.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/activator/CoreBundleActivator.java
@@ -7,9 +7,9 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.services.activator;
+package org.eclipse.tcf.te.runtime.concurrent.activator;
-import org.eclipse.tm.te.runtime.tracing.TraceHandler;
+import org.eclipse.tcf.te.runtime.tracing.TraceHandler;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/src/org/eclipse/tm/te/runtime/concurrent/event/ExecutorThreadNotificationListener.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/event/ExecutorThreadNotificationListener.java
index 07d7ec279..74229359f 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/src/org/eclipse/tm/te/runtime/concurrent/event/ExecutorThreadNotificationListener.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/event/ExecutorThreadNotificationListener.java
@@ -7,12 +7,12 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.concurrent.event;
+package org.eclipse.tcf.te.runtime.concurrent.event;
import org.eclipse.core.runtime.PlatformObject;
-import org.eclipse.tm.te.runtime.concurrent.util.ExecutorsUtil;
-import org.eclipse.tm.te.runtime.interfaces.events.IEventFireDelegate;
-import org.eclipse.tm.te.runtime.interfaces.events.IEventListener;
+import org.eclipse.tcf.te.runtime.concurrent.util.ExecutorsUtil;
+import org.eclipse.tcf.te.runtime.interfaces.events.IEventFireDelegate;
+import org.eclipse.tcf.te.runtime.interfaces.events.IEventListener;
/**
* Abstract notification listener implementation executing the
@@ -21,7 +21,7 @@ import org.eclipse.tm.te.runtime.interfaces.events.IEventListener;
public abstract class ExecutorThreadNotificationListener extends PlatformObject implements IEventListener, IEventFireDelegate {
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.events.IEventFireDelegate#fire(java.lang.Runnable)
+ * @see org.eclipse.tcf.te.runtime.interfaces.events.IEventFireDelegate#fire(java.lang.Runnable)
*/
@Override
public final void fire(Runnable runnable) {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/src/org/eclipse/tm/te/runtime/concurrent/executors/AbstractDelegatingExecutorService.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/executors/AbstractDelegatingExecutorService.java
index 756b4a7d9..e5df0a65f 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/src/org/eclipse/tm/te/runtime/concurrent/executors/AbstractDelegatingExecutorService.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/executors/AbstractDelegatingExecutorService.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.concurrent.executors;
+package org.eclipse.tcf.te.runtime.concurrent.executors;
import java.util.Collection;
import java.util.List;
@@ -26,10 +26,10 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
import org.eclipse.osgi.util.NLS;
-import org.eclipse.tm.te.runtime.concurrent.activator.CoreBundleActivator;
-import org.eclipse.tm.te.runtime.concurrent.interfaces.IExecutor;
-import org.eclipse.tm.te.runtime.concurrent.nls.Messages;
-import org.eclipse.tm.te.runtime.extensions.ExecutableExtension;
+import org.eclipse.tcf.te.runtime.concurrent.activator.CoreBundleActivator;
+import org.eclipse.tcf.te.runtime.concurrent.interfaces.IExecutor;
+import org.eclipse.tcf.te.runtime.concurrent.nls.Messages;
+import org.eclipse.tcf.te.runtime.extensions.ExecutableExtension;
/**
* Abstract delegating execution service implementation.
@@ -42,7 +42,7 @@ public abstract class AbstractDelegatingExecutorService extends ExecutableExtens
private String threadPoolNamePrefix;
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.extensions.ExecutableExtension#doSetInitializationData(org.eclipse.core.runtime.IConfigurationElement, java.lang.String, java.lang.Object)
+ * @see org.eclipse.tcf.te.runtime.extensions.ExecutableExtension#doSetInitializationData(org.eclipse.core.runtime.IConfigurationElement, java.lang.String, java.lang.Object)
*/
@Override
public void doSetInitializationData(IConfigurationElement config, String propertyName, Object data) throws CoreException {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/src/org/eclipse/tm/te/runtime/concurrent/executors/SingleThreadedExecutorService.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/executors/SingleThreadedExecutorService.java
index e9dbe05c5..a2f21c3b5 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/src/org/eclipse/tm/te/runtime/concurrent/executors/SingleThreadedExecutorService.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/executors/SingleThreadedExecutorService.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.concurrent.executors;
+package org.eclipse.tcf.te.runtime.concurrent.executors;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.ExecutorService;
@@ -17,9 +17,9 @@ import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
-import org.eclipse.tm.te.runtime.concurrent.factories.SingleThreadThreadFactory;
-import org.eclipse.tm.te.runtime.concurrent.interfaces.INestableExecutor;
-import org.eclipse.tm.te.runtime.concurrent.interfaces.ISingleThreadedExecutor;
+import org.eclipse.tcf.te.runtime.concurrent.factories.SingleThreadThreadFactory;
+import org.eclipse.tcf.te.runtime.concurrent.interfaces.INestableExecutor;
+import org.eclipse.tcf.te.runtime.concurrent.interfaces.ISingleThreadedExecutor;
/**
* A single threaded executor service implementation.
@@ -62,7 +62,7 @@ public class SingleThreadedExecutorService extends AbstractDelegatingExecutorSer
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.concurrent.interfaces.INestableExecutor#getMaxDepth()
+ * @see org.eclipse.tcf.te.runtime.concurrent.interfaces.INestableExecutor#getMaxDepth()
*/
@Override
public int getMaxDepth() {
@@ -70,7 +70,7 @@ public class SingleThreadedExecutorService extends AbstractDelegatingExecutorSer
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.concurrent.interfaces.INestableExecutor#readAndExecute()
+ * @see org.eclipse.tcf.te.runtime.concurrent.interfaces.INestableExecutor#readAndExecute()
*/
@Override
public boolean readAndExecute() {
@@ -137,7 +137,7 @@ public class SingleThreadedExecutorService extends AbstractDelegatingExecutorSer
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.concurrent.executors.AbstractDelegatingExecutorService#createExecutorServiceDelegate()
+ * @see org.eclipse.tcf.te.runtime.concurrent.executors.AbstractDelegatingExecutorService#createExecutorServiceDelegate()
*/
@Override
protected ExecutorService createExecutorServiceDelegate() {
@@ -146,7 +146,7 @@ public class SingleThreadedExecutorService extends AbstractDelegatingExecutorSer
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.concurrent.interfaces.ISingleThreadedExecutor#isExecutorThread()
+ * @see org.eclipse.tcf.te.runtime.concurrent.interfaces.ISingleThreadedExecutor#isExecutorThread()
*/
@Override
public final boolean isExecutorThread() {
@@ -154,7 +154,7 @@ public class SingleThreadedExecutorService extends AbstractDelegatingExecutorSer
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.concurrent.interfaces.ISingleThreadedExecutor#isExecutorThread(java.lang.Thread)
+ * @see org.eclipse.tcf.te.runtime.concurrent.interfaces.ISingleThreadedExecutor#isExecutorThread(java.lang.Thread)
*/
@Override
public final boolean isExecutorThread(Thread thread) {
@@ -165,7 +165,7 @@ public class SingleThreadedExecutorService extends AbstractDelegatingExecutorSer
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.concurrent.interfaces.INestableExecutor#getMaxDepth()
+ * @see org.eclipse.tcf.te.runtime.concurrent.interfaces.INestableExecutor#getMaxDepth()
*/
@Override
public int getMaxDepth() {
@@ -176,7 +176,7 @@ public class SingleThreadedExecutorService extends AbstractDelegatingExecutorSer
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.concurrent.interfaces.INestableExecutor#readAndExecute()
+ * @see org.eclipse.tcf.te.runtime.concurrent.interfaces.INestableExecutor#readAndExecute()
*/
@Override
public boolean readAndExecute() {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/src/org/eclipse/tm/te/runtime/concurrent/factories/SingleThreadThreadFactory.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/factories/SingleThreadThreadFactory.java
index 8789dbf85..3cf533f25 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/src/org/eclipse/tm/te/runtime/concurrent/factories/SingleThreadThreadFactory.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/factories/SingleThreadThreadFactory.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.concurrent.factories;
+package org.eclipse.tcf.te.runtime.concurrent.factories;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.atomic.AtomicInteger;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/src/org/eclipse/tm/te/runtime/concurrent/interfaces/IExecutor.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/interfaces/IExecutor.java
index 71e831321..9311c5537 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/src/org/eclipse/tm/te/runtime/concurrent/interfaces/IExecutor.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/interfaces/IExecutor.java
@@ -7,11 +7,11 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.concurrent.interfaces;
+package org.eclipse.tcf.te.runtime.concurrent.interfaces;
import java.util.concurrent.Executor;
-import org.eclipse.tm.te.runtime.interfaces.extensions.IExecutableExtension;
+import org.eclipse.tcf.te.runtime.interfaces.extensions.IExecutableExtension;
/**
* Execution interface declaration.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/src/org/eclipse/tm/te/runtime/concurrent/interfaces/IExecutorUtilDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/interfaces/IExecutorUtilDelegate.java
index 7846c2c9a..7292f40da 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/src/org/eclipse/tm/te/runtime/concurrent/interfaces/IExecutorUtilDelegate.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/interfaces/IExecutorUtilDelegate.java
@@ -7,9 +7,9 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.concurrent.interfaces;
+package org.eclipse.tcf.te.runtime.concurrent.interfaces;
-import org.eclipse.tm.te.runtime.interfaces.extensions.IExecutableExtension;
+import org.eclipse.tcf.te.runtime.interfaces.extensions.IExecutableExtension;
/**
* Executor utility delegate interface declaration.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/src/org/eclipse/tm/te/runtime/concurrent/interfaces/INestableExecutor.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/interfaces/INestableExecutor.java
index 5fd483e67..af7171f9e 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/src/org/eclipse/tm/te/runtime/concurrent/interfaces/INestableExecutor.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/interfaces/INestableExecutor.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.concurrent.interfaces;
+package org.eclipse.tcf.te.runtime.concurrent.interfaces;
import java.util.concurrent.Executor;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/src/org/eclipse/tm/te/runtime/concurrent/interfaces/ISingleThreadedExecutor.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/interfaces/ISingleThreadedExecutor.java
index 046174156..5ce6ab275 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/src/org/eclipse/tm/te/runtime/concurrent/interfaces/ISingleThreadedExecutor.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/interfaces/ISingleThreadedExecutor.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.concurrent.interfaces;
+package org.eclipse.tcf.te.runtime.concurrent.interfaces;
import java.util.concurrent.Executor;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/src/org/eclipse/tm/te/runtime/concurrent/nls/Messages.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/nls/Messages.java
index 69909d366..652586645 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/src/org/eclipse/tm/te/runtime/concurrent/nls/Messages.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/nls/Messages.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.concurrent.nls;
+package org.eclipse.tcf.te.runtime.concurrent.nls;
import org.eclipse.osgi.util.NLS;
@@ -17,7 +17,7 @@ import org.eclipse.osgi.util.NLS;
public class Messages extends NLS {
// The plug-in resource bundle name
- private static final String BUNDLE_NAME = "org.eclipse.tm.te.runtime.concurrent.nls.Messages"; //$NON-NLS-1$
+ private static final String BUNDLE_NAME = "org.eclipse.tcf.te.runtime.concurrent.nls.Messages"; //$NON-NLS-1$
/**
* Static constructor.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/src/org/eclipse/tm/te/runtime/concurrent/nls/Messages.properties b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/nls/Messages.properties
index d36bd1fe5..6e7b09de1 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/src/org/eclipse/tm/te/runtime/concurrent/nls/Messages.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/nls/Messages.properties
@@ -1,5 +1,5 @@
#
-# org.eclipse.tm.te.runtime.concurrent
+# org.eclipse.tcf.te.runtime.concurrent
# Externalized Strings.
#
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/src/org/eclipse/tm/te/runtime/concurrent/util/ExecutorsUtil.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/util/ExecutorsUtil.java
index 90cdd0320..f07026c03 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/src/org/eclipse/tm/te/runtime/concurrent/util/ExecutorsUtil.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/util/ExecutorsUtil.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.concurrent.util;
+package org.eclipse.tcf.te.runtime.concurrent.util;
import java.util.ArrayList;
import java.util.Collection;
@@ -16,13 +16,13 @@ import java.util.concurrent.ExecutorService;
import java.util.concurrent.atomic.AtomicBoolean;
import org.eclipse.core.runtime.Assert;
-import org.eclipse.tm.te.runtime.concurrent.Executors;
-import org.eclipse.tm.te.runtime.concurrent.interfaces.IExecutorUtilDelegate;
-import org.eclipse.tm.te.runtime.concurrent.interfaces.INestableExecutor;
-import org.eclipse.tm.te.runtime.concurrent.interfaces.ISingleThreadedExecutor;
-import org.eclipse.tm.te.runtime.extensions.AbstractExtensionPointManager;
-import org.eclipse.tm.te.runtime.extensions.ExecutableExtensionProxy;
-import org.eclipse.tm.te.runtime.interfaces.IConditionTester;
+import org.eclipse.tcf.te.runtime.concurrent.Executors;
+import org.eclipse.tcf.te.runtime.concurrent.interfaces.IExecutorUtilDelegate;
+import org.eclipse.tcf.te.runtime.concurrent.interfaces.INestableExecutor;
+import org.eclipse.tcf.te.runtime.concurrent.interfaces.ISingleThreadedExecutor;
+import org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager;
+import org.eclipse.tcf.te.runtime.extensions.ExecutableExtensionProxy;
+import org.eclipse.tcf.te.runtime.interfaces.IConditionTester;
/**
@@ -37,15 +37,15 @@ public final class ExecutorsUtil {
protected static class ExecutorUtilDelegateExtensionPointManager extends AbstractExtensionPointManager<IExecutorUtilDelegate> {
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.extensions.AbstractExtensionPointManager#getExtensionPointId()
+ * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#getExtensionPointId()
*/
@Override
protected String getExtensionPointId() {
- return "org.eclipse.tm.te.runtime.concurrent.executorUtilDelegates"; //$NON-NLS-1$
+ return "org.eclipse.tcf.te.runtime.concurrent.executorUtilDelegates"; //$NON-NLS-1$
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.extensions.AbstractExtensionPointManager#getConfigurationElementName()
+ * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#getConfigurationElementName()
*/
@Override
protected String getConfigurationElementName() {
@@ -110,9 +110,9 @@ public final class ExecutorsUtil {
* Static constructor.
*/
static {
- EXECUTOR = (ISingleThreadedExecutor) Executors.getSharedExecutor("org.eclipse.tm.te.runtime.concurrent.executors.singleThreaded"); //$NON-NLS-1$
+ EXECUTOR = (ISingleThreadedExecutor) Executors.getSharedExecutor("org.eclipse.tcf.te.runtime.concurrent.executors.singleThreaded"); //$NON-NLS-1$
Assert.isNotNull(EXECUTOR);
- UI_EXECUTOR = (ISingleThreadedExecutor) Executors.getSharedExecutor("org.eclipse.tm.te.ui.executors.SWTDisplay"); //$NON-NLS-1$
+ UI_EXECUTOR = (ISingleThreadedExecutor) Executors.getSharedExecutor("org.eclipse.tcf.te.ui.executors.SWTDisplay"); //$NON-NLS-1$
}
/**
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.statushandler/.classpath b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/.classpath
index 8a8f1668c..8a8f1668c 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.statushandler/.classpath
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/.classpath
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/.options b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/.options
new file mode 100644
index 000000000..979100749
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/.options
@@ -0,0 +1 @@
+org.eclipse.tcf.te.runtime.model/debugmode = 0
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/.project b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/.project
new file mode 100644
index 000000000..d20deabc9
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.tcf.te.runtime.model</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/target_explorer/plugins/org.eclipse.tm.te.runtime.model/.settings/org.eclipse.jdt.core.prefs b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/.settings/org.eclipse.jdt.core.prefs
index 3408909dd..3408909dd 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.model/.settings/org.eclipse.jdt.core.prefs
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/.settings/org.eclipse.jdt.core.prefs
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.model/.settings/org.eclipse.jdt.ui.prefs b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/.settings/org.eclipse.jdt.ui.prefs
index 90bc6ea78..90bc6ea78 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.model/.settings/org.eclipse.jdt.ui.prefs
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/.settings/org.eclipse.jdt.ui.prefs
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..b4025fdc1
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/META-INF/MANIFEST.MF
@@ -0,0 +1,19 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.tcf.te.runtime.model;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipse.tcf.te.runtime.model.activator.CoreBundleActivator
+Bundle-Vendor: %providerName
+Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
+ org.eclipse.tcf.te.runtime;bundle-version="1.0.0"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
+Bundle-Localization: plugin
+Export-Package: org.eclipse.tcf.te.runtime.model,
+ org.eclipse.tcf.te.runtime.model.activator;x-internal:=true,
+ org.eclipse.tcf.te.runtime.model.factory,
+ org.eclipse.tcf.te.runtime.model.interfaces,
+ org.eclipse.tcf.te.runtime.model.interfaces.factory,
+ org.eclipse.tcf.te.runtime.model.internal.factory;x-internal:=true,
+ org.eclipse.tcf.te.runtime.model.nls;x-internal:=true
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.services/build.properties b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/build.properties
index 73a5119ed..73a5119ed 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.services/build.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/build.properties
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.model/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/plugin.properties
index 49eafce1b..49eafce1b 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.model/plugin.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/plugin.properties
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/plugin.xml b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/plugin.xml
new file mode 100644
index 000000000..34249eeb3
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/plugin.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension-point id="factoryDelegates" name="Model Node Factory Delegates" schema="schema/factoryDelegates.exsd"/>
+
+</plugin>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/pom.xml b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/pom.xml
new file mode 100644
index 000000000..04d86d6aa
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.tcf</groupId>
+ <artifactId>tcf-parent</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../../../pom.xml</relativePath>
+ </parent>
+
+ <version>1.0.0.qualifier</version>
+ <artifactId>org.eclipse.tcf.te.runtime.model</artifactId>
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.core/schema/connectionTypes.exsd b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/schema/factoryDelegates.exsd
index b78d73e1a..33854922f 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.core/schema/connectionTypes.exsd
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/schema/factoryDelegates.exsd
@@ -1,12 +1,12 @@
<?xml version='1.0' encoding='UTF-8'?>
<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.tm.te.core" xmlns="http://www.w3.org/2001/XMLSchema">
+<schema targetNamespace="org.eclipse.tcf.te.runtime.model" xmlns="http://www.w3.org/2001/XMLSchema">
<annotation>
<appinfo>
- <meta.schema plugin="org.eclipse.tm.te.core" id="connectionTypes" name="Connection Types"/>
+ <meta.schema plugin="org.eclipse.tcf.te.runtime.model" id="factoryDelegates" name="Model Node Factory Delegates"/>
</appinfo>
<documentation>
- This extension point is used to contribute connection types.
+ This extension point is used to contribute model node factory delegates.
</documentation>
</annotation>
@@ -18,7 +18,7 @@
</annotation>
<complexType>
<sequence>
- <element ref="connectionType" minOccurs="1" maxOccurs="unbounded"/>
+ <element ref="delegate" minOccurs="1" maxOccurs="unbounded"/>
</sequence>
<attribute name="point" type="string" use="required">
<annotation>
@@ -47,86 +47,50 @@
</complexType>
</element>
- <element name="connectionType">
+ <element name="delegate">
<annotation>
<documentation>
- Declares a Target Explorer connection type contribution.
+ Declares a model node factory delegate contribution.
</documentation>
</annotation>
<complexType>
<sequence>
<element ref="class" minOccurs="0" maxOccurs="1"/>
- <element ref="description" minOccurs="0" maxOccurs="1"/>
+ <element ref="nodeType" minOccurs="1" maxOccurs="unbounded"/>
</sequence>
<attribute name="id" type="string" use="required">
<annotation>
<documentation>
- The unique id of the connection type contribution.
+ The unique id of the model node factory delegate contribution.
</documentation>
</annotation>
</attribute>
- <attribute name="label" type="string" use="required">
+ <attribute name="label" type="string">
<annotation>
<documentation>
- The label representing the connection type within the UI.
+ The label representing the model node factory delegate.
</documentation>
</annotation>
</attribute>
<attribute name="class" type="string">
<annotation>
<documentation>
- The connection type class that implements &lt;code&gt;org.eclipse.tm.te.core.connection.interfaces.IConnectionType&lt;/code&gt; or extends &lt;code&gt;org.eclipse.tm.te.core.connection.ConnectionType&lt;/code&gt;.
+ The class that implements &lt;code&gt;org.eclipse.tcf.te.runtime.model.interfaces.factory.IFactoryDelegate&lt;/code&gt; or extends &lt;code&gt;org.eclipse.tcf.te.runtime.model.factory.AbstractFactoryDelegate&lt;/code&gt;.
&lt;p&gt;
-The connection type implementation class must be specified either by the class attribute or the class child element!
+The model node factory delegate implementation class must be specified either by the class attribute or the class child element!
</documentation>
<appinfo>
- <meta.attribute kind="java" basedOn="org.eclipse.tm.te.core.connection.ConnectionType:org.eclipse.tm.te.core.connection.interfaces.IConnectionType"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="isEnabled" type="boolean" use="default" value="true">
- <annotation>
- <documentation>
- Setting this attribute to &lt;code&gt;false&lt;/code&gt; disables this connection type explicitly. If set to &lt;code&gt;true&lt;/code&gt;, the connection type may be still disabled by other conditions like disabled capabilities.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="shortName" type="string">
- <annotation>
- <documentation>
- An optional short name for the connection type for default naming of connections and launches.
-&lt;p&gt;
-Can be specified as parameter if the connection type implementation class is specified with the class child element. The parameter key is &quot;shortname&quot;.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="categoryId" type="string">
- <annotation>
- <documentation>
- The category id this connection type will be sorted in within the new connection wizard.
-&lt;p&gt;
-Can be specified as parameter if the connection type implementation class is specified with the class child element. The parameter key is &quot;categoryId&quot;.
- </documentation>
- <appinfo>
- <meta.attribute kind="identifier" basedOn="org.eclipse.rse.ui.newConnectionWizards/category/@id"/>
+ <meta.attribute kind="java" basedOn="org.eclipse.tcf.te.runtime.model.factory.AbstractFactoryDelegate:org.eclipse.tcf.te.runtime.model.interfaces.factory.IFactoryDelegate"/>
</appinfo>
</annotation>
</attribute>
</complexType>
</element>
- <element name="description" type="string">
- <annotation>
- <documentation>
- A short description of the connection type to be presented in the UI.
- </documentation>
- </annotation>
- </element>
-
<element name="class">
<annotation>
<documentation>
- &lt;p&gt;Used when creating an &lt;code&gt;IExecutableExtension&lt;/code&gt; with a named parameter, or more than one.&lt;/p&gt;
+ Used when creating an &lt;code&gt;IExecutableExtension&lt;/code&gt; with a named parameter, or more than one.
</documentation>
</annotation>
<complexType>
@@ -136,12 +100,12 @@ Can be specified as parameter if the connection type implementation class is spe
<attribute name="class" type="string">
<annotation>
<documentation>
- The connection type class that implements &lt;code&gt;org.eclipse.tm.te.core.connection.interfaces.IConnectionType&lt;/code&gt; or extends &lt;code&gt;org.eclipse.tm.te.core.connection.ConnectionType&lt;/code&gt;.
+ The class that implements &lt;code&gt;org.eclipse.tcf.te.runtime.model.interfaces.factory.IFactoryDelegate&lt;/code&gt; or extends &lt;code&gt;org.eclipse.tcf.te.runtime.model.factory.AbstractFactoryDelegate&lt;/code&gt;.
&lt;p&gt;
-The connection type implementation class must be specified either by the class attribute or the class child element!
+The model node factory delegate implementation class must be specified either by the class attribute or the class child element!
</documentation>
<appinfo>
- <meta.attribute kind="java" basedOn="org.eclipse.tm.te.core.connection.ConnectionType:org.eclipse.tm.te.core.connection.interfaces.IConnectionType"/>
+ <meta.attribute kind="java" basedOn="org.eclipse.tcf.te.runtime.model.factory.AbstractFactoryDelegate:org.eclipse.tcf.te.runtime.model.interfaces.factory.IFactoryDelegate"/>
</appinfo>
</annotation>
</attribute>
@@ -151,7 +115,7 @@ The connection type implementation class must be specified either by the class a
<element name="parameter">
<annotation>
<documentation>
- &lt;p&gt;A parameter for an &lt;code&gt;IExecutableExtension&lt;/code&gt;.&lt;/p&gt;
+ A parameter for an &lt;code&gt;IExecutableExtension&lt;/code&gt;.
</documentation>
</annotation>
<complexType>
@@ -172,6 +136,33 @@ The connection type implementation class must be specified either by the class a
</complexType>
</element>
+ <element name="nodeType">
+ <annotation>
+ <documentation>
+ The node type interface implemented by nodes created by the factory delegate.
+ </documentation>
+ </annotation>
+ <complexType>
+ <attribute name="class" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn=":org.eclipse.tcf.te.runtime.model.interfaces.IModelNode"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="bundleId" type="string">
+ <annotation>
+ <documentation>
+ The unique id of the bundle which contains the class loader required to load the node type class. If not specified, the plugin&apos;s own class loader is used.
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
<annotation>
<appinfo>
<meta.section type="since"/>
@@ -189,14 +180,14 @@ The connection type implementation class must be specified either by the class a
This is an example of the extension point usage:
&lt;p&gt;
&lt;pre&gt;&lt;code&gt;
- &lt;extension point=&quot;org.eclipse.tm.te.core.connectionTypes&quot;&gt;
- &lt;connectionType
- id=&quot;org.eclipse.tm.te.core.connection.ssh&quot;
- class=&quot;org.eclipse.tm.te.core.connection.types.SSHConnectionType&quot;
- shortName=&quot;SSH&quot;
- label=&quot;SSH Connection&quot;
- isEnabled=&quot;true&quot;&gt;
- &lt;/connectionType&gt;
+ &lt;extension point=&quot;org.eclipse.tcf.te.runtime.model.factoryDelegates&quot;&gt;
+ &lt;delegate
+ id=&quot;org.eclipse.tcf.te.runtime.model.factory.modelNode&quot;
+ class=&quot;org.eclipse.tcf.te.runtime.model.internal.ModelNodeFactoryDelegate&quot;
+ label=&quot;Model Node Factory Delegate&quot;&gt;
+ &lt;nodeType class=&quot;org.eclipse.tcf.te.runtime.model.interfaces.IModelNode&quot;/&gt;
+ &lt;nodeType class=&quot;org.eclipse.tcf.te.runtime.model.interfaces.IContainerModelNode&quot;/&gt;
+ &lt;/delegate&gt;
&lt;/extension&gt;
&lt;/code&gt;&lt;/pre&gt;
</documentation>
@@ -207,7 +198,7 @@ The connection type implementation class must be specified either by the class a
<meta.section type="apiinfo"/>
</appinfo>
<documentation>
- The provider of a connection type must implement &lt;samp&gt;org.eclipse.tm.te.core.interfaces.IConnectionType&lt;/samp&gt;.
+ The provider of a model node factory delegate must implement &lt;samp&gt;org.eclipse.tcf.te.runtime.model.interfaces.factory.IFactoryDelegate&lt;/samp&gt;.
</documentation>
</annotation>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.model/src/org/eclipse/tm/te/runtime/model/ContainerModelNode.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/ContainerModelNode.java
index 99318eea2..35ee8901c 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.model/src/org/eclipse/tm/te/runtime/model/ContainerModelNode.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/ContainerModelNode.java
@@ -7,10 +7,9 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.model;
+package org.eclipse.tcf.te.runtime.model;
import java.util.ArrayList;
-import java.util.EventObject;
import java.util.List;
import java.util.UUID;
import java.util.concurrent.locks.Lock;
@@ -18,9 +17,8 @@ import java.util.concurrent.locks.ReentrantLock;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.tm.te.runtime.events.EventManager;
-import org.eclipse.tm.te.runtime.model.interfaces.IContainerModelNode;
-import org.eclipse.tm.te.runtime.model.interfaces.IModelNode;
+import org.eclipse.tcf.te.runtime.model.interfaces.IContainerModelNode;
+import org.eclipse.tcf.te.runtime.model.interfaces.IModelNode;
/**
* A common (data) model container node implementation.
@@ -48,7 +46,7 @@ public class ContainerModelNode extends ModelNode implements IContainerModelNode
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.nodes.IContainerModelNode#getChildren()
+ * @see org.eclipse.tcf.te.runtime.interfaces.nodes.IContainerModelNode#getChildren()
*/
@Override
public IModelNode[] getChildren() {
@@ -74,7 +72,7 @@ public class ContainerModelNode extends ModelNode implements IContainerModelNode
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.nodes.IContainerModelNode#getChildren(java.lang.Class)
+ * @see org.eclipse.tcf.te.runtime.interfaces.nodes.IContainerModelNode#getChildren(java.lang.Class)
*/
@Override
@SuppressWarnings("unchecked")
@@ -100,7 +98,7 @@ public class ContainerModelNode extends ModelNode implements IContainerModelNode
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.nodes.IContainerModelNode#hasChildren()
+ * @see org.eclipse.tcf.te.runtime.interfaces.nodes.IContainerModelNode#hasChildren()
*/
@Override
public boolean hasChildren() {
@@ -110,7 +108,7 @@ public class ContainerModelNode extends ModelNode implements IContainerModelNode
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.nodes.IContainerModelNode#add(org.eclipse.tm.te.runtime.interfaces.nodes.IModelNode)
+ * @see org.eclipse.tcf.te.runtime.interfaces.nodes.IContainerModelNode#add(org.eclipse.tcf.te.runtime.interfaces.nodes.IModelNode)
*/
@Override
public boolean add(IModelNode node) {
@@ -129,16 +127,14 @@ public class ContainerModelNode extends ModelNode implements IContainerModelNode
childListLock.unlock();
}
- EventObject event = newEvent(this, NOTIFY_ADDED, null, new IModelNode[] { node });
- if (event != null) EventManager.getInstance().fireEvent(event);
-
+ fireChangeEvent(NOTIFY_ADDED, null, new IModelNode[] { node });
return true;
}
return false;
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.nodes.IContainerModelNode#remove(org.eclipse.tm.te.runtime.interfaces.nodes.IModelNode, boolean)
+ * @see org.eclipse.tcf.te.runtime.interfaces.nodes.IContainerModelNode#remove(org.eclipse.tcf.te.runtime.interfaces.nodes.IModelNode, boolean)
*/
@Override
public boolean remove(IModelNode node, boolean recursive) {
@@ -152,15 +148,14 @@ public class ContainerModelNode extends ModelNode implements IContainerModelNode
try { childListLock.lock(); removed = childList.remove(node); } finally { childListLock.unlock(); }
// Unlink the parent and fire the removed notification if the element got removed
if (removed) {
- EventObject event = newEvent(this, NOTIFY_REMOVED, new IModelNode[] { node }, null);
- if (event != null) EventManager.getInstance().fireEvent(event);
+ fireChangeEvent(NOTIFY_REMOVED, new IModelNode[] { node }, null);
}
return removed;
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.nodes.IContainerModelNode#removeAll(java.lang.Class)
+ * @see org.eclipse.tcf.te.runtime.interfaces.nodes.IContainerModelNode#removeAll(java.lang.Class)
*/
@Override
public <T> boolean removeAll(Class<T> nodeType) {
@@ -176,15 +171,14 @@ public class ContainerModelNode extends ModelNode implements IContainerModelNode
}
if (removed) {
- EventObject event = newEvent(this, NOTIFY_REMOVED, children, null);
- if (event != null) EventManager.getInstance().fireEvent(event);
+ fireChangeEvent(NOTIFY_REMOVED, children, null);
}
return removed;
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.nodes.IContainerModelNode#clear()
+ * @see org.eclipse.tcf.te.runtime.interfaces.nodes.IContainerModelNode#clear()
*/
@Override
public boolean clear() {
@@ -208,15 +202,25 @@ public class ContainerModelNode extends ModelNode implements IContainerModelNode
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.nodes.IContainerModelNode#size()
+ * @see org.eclipse.tcf.te.runtime.interfaces.nodes.IContainerModelNode#size()
*/
@Override
public int size() {
- return childList.size();
+ int size = 0;
+ try { childListLock.lock(); size = childList.size(); } finally { childListLock.unlock(); }
+ return size;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.properties.PropertiesContainer#isEmpty()
+ */
+ @Override
+ public boolean isEmpty() {
+ return super.isEmpty() && !hasChildren();
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.nodes.IContainerModelNode#contains(org.eclipse.tm.te.runtime.interfaces.nodes.IModelNode)
+ * @see org.eclipse.tcf.te.runtime.interfaces.nodes.IContainerModelNode#contains(org.eclipse.tcf.te.runtime.interfaces.nodes.IModelNode)
*/
@Override
public boolean contains(IModelNode node) {
@@ -244,7 +248,7 @@ public class ContainerModelNode extends ModelNode implements IContainerModelNode
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.nodes.ModelNode#contains(org.eclipse.core.runtime.jobs.ISchedulingRule)
+ * @see org.eclipse.tcf.te.runtime.nodes.ModelNode#contains(org.eclipse.core.runtime.jobs.ISchedulingRule)
*/
@Override
public boolean contains(ISchedulingRule rule) {
@@ -272,7 +276,7 @@ public class ContainerModelNode extends ModelNode implements IContainerModelNode
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.nodes.ModelNode#isConflicting(org.eclipse.core.runtime.jobs.ISchedulingRule)
+ * @see org.eclipse.tcf.te.runtime.nodes.ModelNode#isConflicting(org.eclipse.core.runtime.jobs.ISchedulingRule)
*/
@Override
public boolean isConflicting(ISchedulingRule rule) {
@@ -301,18 +305,23 @@ public class ContainerModelNode extends ModelNode implements IContainerModelNode
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.nodes.ModelNode#find(java.util.UUID)
+ * @see org.eclipse.tcf.te.runtime.nodes.ModelNode#find(java.util.UUID)
*/
@Override
public IModelNode find(UUID uuid) {
IModelNode find = super.find(uuid);
if (find != null) return find;
- for (IModelNode child : childList) {
- find = child.find(uuid);
- if (find != null) {
- return find;
+ try {
+ childListLock.lock();
+ for (IModelNode child : childList) {
+ find = child.find(uuid);
+ if (find != null) {
+ return find;
+ }
}
+ } finally {
+ childListLock.unlock();
}
return find;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.model/src/org/eclipse/tm/te/runtime/model/MessageModelNode.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/MessageModelNode.java
index 682f273b5..0fb0d17ae 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.model/src/org/eclipse/tm/te/runtime/model/MessageModelNode.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/MessageModelNode.java
@@ -7,10 +7,10 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.model;
+package org.eclipse.tcf.te.runtime.model;
import org.eclipse.core.runtime.IStatus;
-import org.eclipse.tm.te.runtime.model.activator.CoreBundleActivator;
+import org.eclipse.tcf.te.runtime.model.activator.CoreBundleActivator;
/**
* A common (data) model node representing a message.
@@ -69,7 +69,7 @@ public class MessageModelNode extends ModelNode {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.nodes.PropertiesContainer#setProperty(java.lang.String, java.lang.Object)
+ * @see org.eclipse.tcf.te.runtime.nodes.PropertiesContainer#setProperty(java.lang.String, java.lang.Object)
*/
@Override
public boolean setProperty(String key, Object value) {
@@ -78,7 +78,7 @@ public class MessageModelNode extends ModelNode {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.nodes.ModelNode#getImageId()
+ * @see org.eclipse.tcf.te.runtime.nodes.ModelNode#getImageId()
*/
@Override
public String getImageId() {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.model/src/org/eclipse/tm/te/runtime/model/ModelNode.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/ModelNode.java
index 910f1b642..35ea1dfbd 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.model/src/org/eclipse/tm/te/runtime/model/ModelNode.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/ModelNode.java
@@ -7,19 +7,19 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.model;
+package org.eclipse.tcf.te.runtime.model;
import java.util.UUID;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.tm.te.runtime.activator.CoreBundleActivator;
-import org.eclipse.tm.te.runtime.interfaces.tracing.ITraceIds;
-import org.eclipse.tm.te.runtime.model.interfaces.IContainerModelNode;
-import org.eclipse.tm.te.runtime.model.interfaces.IModelNode;
-import org.eclipse.tm.te.runtime.model.interfaces.IModelNodeProvider;
-import org.eclipse.tm.te.runtime.properties.PropertiesContainer;
+import org.eclipse.tcf.te.runtime.activator.CoreBundleActivator;
+import org.eclipse.tcf.te.runtime.interfaces.tracing.ITraceIds;
+import org.eclipse.tcf.te.runtime.model.interfaces.IContainerModelNode;
+import org.eclipse.tcf.te.runtime.model.interfaces.IModelNode;
+import org.eclipse.tcf.te.runtime.model.interfaces.IModelNodeProvider;
+import org.eclipse.tcf.te.runtime.properties.PropertiesContainer;
/**
* A common (data) model node implementation.
@@ -49,7 +49,7 @@ public class ModelNode extends PropertiesContainer implements IModelNode, IModel
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.nodes.IModelNode#getParent()
+ * @see org.eclipse.tcf.te.runtime.interfaces.nodes.IModelNode#getParent()
*/
@Override
public final IContainerModelNode getParent() {
@@ -58,14 +58,15 @@ public class ModelNode extends PropertiesContainer implements IModelNode, IModel
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.nodes.IModelNode#getParent(java.lang.Class)
+ * @see org.eclipse.tcf.te.runtime.model.interfaces.IModelNode#getParent(java.lang.Class)
*/
- @Override
- public final IContainerModelNode getParent(Class<?> nodeType) {
+ @SuppressWarnings("unchecked")
+ @Override
+ public final <V extends IContainerModelNode> V getParent(Class<V> nodeType) {
Assert.isTrue(checkThreadAccess(), "Illegal Thread Access"); //$NON-NLS-1$
if (this.parent != null) {
if (nodeType.isInstance(this.parent)) {
- return this.parent;
+ return (V)this.parent;
}
return this.parent.getParent(nodeType);
}
@@ -73,7 +74,7 @@ public class ModelNode extends PropertiesContainer implements IModelNode, IModel
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.nodes.IModelNode#setParent(org.eclipse.tm.te.runtime.interfaces.nodes.IContainerModelNode)
+ * @see org.eclipse.tcf.te.runtime.interfaces.nodes.IModelNode#setParent(org.eclipse.tcf.te.runtime.interfaces.nodes.IContainerModelNode)
*/
@Override
public final void setParent(IContainerModelNode parent) {
@@ -85,7 +86,7 @@ public class ModelNode extends PropertiesContainer implements IModelNode, IModel
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.nodes.IModelNode#move(org.eclipse.tm.te.runtime.interfaces.nodes.IContainerModelNode)
+ * @see org.eclipse.tcf.te.runtime.interfaces.nodes.IModelNode#move(org.eclipse.tcf.te.runtime.interfaces.nodes.IContainerModelNode)
*/
@Override
public final void move(IContainerModelNode newParent) {
@@ -111,7 +112,7 @@ public class ModelNode extends PropertiesContainer implements IModelNode, IModel
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.nodes.IModelNode#isVisible()
+ * @see org.eclipse.tcf.te.runtime.interfaces.nodes.IModelNode#isVisible()
*/
@Override
public boolean isVisible() {
@@ -119,7 +120,7 @@ public class ModelNode extends PropertiesContainer implements IModelNode, IModel
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.nodes.IModelNode#getError()
+ * @see org.eclipse.tcf.te.runtime.interfaces.nodes.IModelNode#getError()
*/
@Override
public String getError() {
@@ -127,7 +128,7 @@ public class ModelNode extends PropertiesContainer implements IModelNode, IModel
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.nodes.IModelNode#getName()
+ * @see org.eclipse.tcf.te.runtime.interfaces.nodes.IModelNode#getName()
*/
@Override
public String getName() {
@@ -136,18 +137,7 @@ public class ModelNode extends PropertiesContainer implements IModelNode, IModel
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.nodes.PropertiesContainer#getProperty(java.lang.String)
- */
- @Override
- public Object getProperty(String key) {
- if (PROPERTY_NAME.equals(key)) {
- return getName();
- }
- return super.getProperty(key);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.nodes.IModelNode#getDescription()
+ * @see org.eclipse.tcf.te.runtime.interfaces.nodes.IModelNode#getDescription()
*/
@Override
public String[] getDescription() {
@@ -155,7 +145,7 @@ public class ModelNode extends PropertiesContainer implements IModelNode, IModel
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.nodes.IModelNode#getImageId()
+ * @see org.eclipse.tcf.te.runtime.interfaces.nodes.IModelNode#getImageId()
*/
@Override
public String getImageId() {
@@ -163,7 +153,7 @@ public class ModelNode extends PropertiesContainer implements IModelNode, IModel
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.nodes.PropertiesContainer#toString()
+ * @see org.eclipse.tcf.te.runtime.nodes.PropertiesContainer#toString()
*/
@Override
public String toString() {
@@ -177,7 +167,7 @@ public class ModelNode extends PropertiesContainer implements IModelNode, IModel
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.nodes.PropertiesContainer#dropEvent(java.lang.Object, java.lang.String, java.lang.Object, java.lang.Object)
+ * @see org.eclipse.tcf.te.runtime.nodes.PropertiesContainer#dropEvent(java.lang.Object, java.lang.String, java.lang.Object, java.lang.Object)
*/
@Override
protected boolean dropEvent(Object source, String key, Object oldValue, Object newValue) {
@@ -198,7 +188,7 @@ public class ModelNode extends PropertiesContainer implements IModelNode, IModel
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.nodes.IModelNodeProvider#getModelNode()
+ * @see org.eclipse.tcf.te.runtime.interfaces.nodes.IModelNodeProvider#getModelNode()
*/
@Override
public final IModelNode getModelNode() {
@@ -240,7 +230,7 @@ public class ModelNode extends PropertiesContainer implements IModelNode, IModel
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.nodes.IModelNode#setDirty(boolean)
+ * @see org.eclipse.tcf.te.runtime.interfaces.nodes.IModelNode#setDirty(boolean)
*/
@Override
public final void setDirty(boolean dirty) {
@@ -249,7 +239,7 @@ public class ModelNode extends PropertiesContainer implements IModelNode, IModel
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.nodes.IModelNode#isDirty()
+ * @see org.eclipse.tcf.te.runtime.interfaces.nodes.IModelNode#isDirty()
*/
@Override
public final boolean isDirty() {
@@ -258,7 +248,7 @@ public class ModelNode extends PropertiesContainer implements IModelNode, IModel
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.nodes.IModelNode#setPending(boolean)
+ * @see org.eclipse.tcf.te.runtime.interfaces.nodes.IModelNode#setPending(boolean)
*/
@Override
public final void setPending(boolean pending) {
@@ -267,7 +257,7 @@ public class ModelNode extends PropertiesContainer implements IModelNode, IModel
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.nodes.IModelNode#isPending()
+ * @see org.eclipse.tcf.te.runtime.interfaces.nodes.IModelNode#isPending()
*/
@Override
public final boolean isPending() {
@@ -276,7 +266,7 @@ public class ModelNode extends PropertiesContainer implements IModelNode, IModel
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.nodes.IModelNode#find(java.util.UUID)
+ * @see org.eclipse.tcf.te.runtime.interfaces.nodes.IModelNode#find(java.util.UUID)
*/
@Override
public IModelNode find(UUID uuid) {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.model/src/org/eclipse/tm/te/runtime/model/PendingOperationModelNode.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/PendingOperationModelNode.java
index d7de627ab..30381cf67 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.model/src/org/eclipse/tm/te/runtime/model/PendingOperationModelNode.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/PendingOperationModelNode.java
@@ -7,15 +7,15 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.model;
+package org.eclipse.tcf.te.runtime.model;
-import org.eclipse.tm.te.runtime.model.nls.Messages;
+import org.eclipse.tcf.te.runtime.model.nls.Messages;
/**
* An immutable model node to visualize a pending operation.
*/
-public final class PendingOperationModelNode extends MessageModelNode {
+public class PendingOperationModelNode extends MessageModelNode {
/**
* Constructor.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.model/src/org/eclipse/tm/te/runtime/model/activator/CoreBundleActivator.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/activator/CoreBundleActivator.java
index 5538009d3..da0130667 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.model/src/org/eclipse/tm/te/runtime/model/activator/CoreBundleActivator.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/activator/CoreBundleActivator.java
@@ -7,9 +7,9 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.model.activator;
+package org.eclipse.tcf.te.runtime.model.activator;
-import org.eclipse.tm.te.runtime.tracing.TraceHandler;
+import org.eclipse.tcf.te.runtime.tracing.TraceHandler;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/factory/AbstractFactoryDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/factory/AbstractFactoryDelegate.java
new file mode 100644
index 000000000..f2dc3d5ff
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/factory/AbstractFactoryDelegate.java
@@ -0,0 +1,21 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.runtime.model.factory;
+
+import org.eclipse.tcf.te.runtime.extensions.ExecutableExtension;
+import org.eclipse.tcf.te.runtime.model.interfaces.factory.IFactoryDelegate;
+
+
+/**
+ * Abstract model node factory delegate implementation.
+ */
+public abstract class AbstractFactoryDelegate extends ExecutableExtension implements IFactoryDelegate {
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/factory/Factory.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/factory/Factory.java
new file mode 100644
index 000000000..b4c47aad7
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/factory/Factory.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.runtime.model.factory;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.PlatformObject;
+import org.eclipse.tcf.te.runtime.model.interfaces.IModelNode;
+import org.eclipse.tcf.te.runtime.model.interfaces.factory.IFactory;
+import org.eclipse.tcf.te.runtime.model.interfaces.factory.IFactoryDelegate;
+import org.eclipse.tcf.te.runtime.model.internal.factory.FactoryDelegateManager;
+
+/**
+ * Model node factory implementation.
+ */
+public final class Factory extends PlatformObject implements IFactory {
+ private final FactoryDelegateManager manager = new FactoryDelegateManager();
+
+ /*
+ * Thread save singleton instance creation.
+ */
+ private static class LazyInstance {
+ public static Factory instance = new Factory();
+ }
+
+ /**
+ * Returns the singleton instance of the service manager.
+ */
+ public static Factory getInstance() {
+ return LazyInstance.instance;
+ }
+
+ /**
+ * Constructor.
+ */
+ Factory() {
+ super();
+ }
+
+ /**
+ * Creates an new instance of the model node object implementing
+ * the specified node interface.
+ *
+ * @param nodeInterface The node interface to be implemented by the model node object to create.
+ * Must not be <code>null</code>.
+ * @return The model not object implementing the specified node interface or <code>null</code>.
+ */
+ @Override
+ public <V extends IModelNode> V newInstance(Class<V> nodeInterface) {
+ Assert.isNotNull(nodeInterface);
+
+ // Determine the model node factory delegate to use
+ IFactoryDelegate delegate = manager.getFactoryDelegate(nodeInterface);
+ // Return the model node instance
+ return delegate != null ? (V)delegate.newInstance(nodeInterface) : null;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.model/src/org/eclipse/tm/te/runtime/model/interfaces/IContainerModelNode.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/interfaces/IContainerModelNode.java
index c5afd1765..91775dfb5 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.model/src/org/eclipse/tm/te/runtime/model/interfaces/IContainerModelNode.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/interfaces/IContainerModelNode.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.model.interfaces;
+package org.eclipse.tcf.te.runtime.model.interfaces;
import java.util.List;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.model/src/org/eclipse/tm/te/runtime/model/interfaces/IModelNode.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/interfaces/IModelNode.java
index 93e596eac..0e727f6ad 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.model/src/org/eclipse/tm/te/runtime/model/interfaces/IModelNode.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/interfaces/IModelNode.java
@@ -7,12 +7,12 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.model.interfaces;
+package org.eclipse.tcf.te.runtime.model.interfaces;
import java.util.UUID;
import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
/**
* A common (data) model node.
@@ -24,6 +24,13 @@ import org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer;
public interface IModelNode extends IPropertiesContainer, ISchedulingRule {
/**
+ * Property: Model node id. For use for identifying the node externally.
+ * It can be identical to the node object instance UUID, but
+ * can be any other string or might be not even set.
+ */
+ public static final String PROPERTY_ID = "id"; //$NON-NLS-1$
+
+ /**
* Property: Model node name. May be used to represent the node
* in UI widgets.
*/
@@ -53,37 +60,40 @@ public interface IModelNode extends IPropertiesContainer, ISchedulingRule {
public static final String PROPERTY_ERROR = "error"; //$NON-NLS-1$
/**
- * Returns the parent node.
- * @return The parent
+ * Returns the parent model node.
+ *
+ * @return The model parent
*/
public IContainerModelNode getParent();
/**
- * Returns the first parent node that implements the given type
- * or <code>null</code> if no matching parent can be found.
+ * Returns the first parent node that implements the given type or <code>null</code> if no
+ * matching parent can be found.
*
* @param nodeType The interface/class the parent needs to implement/extend.
* @return The parent or <code>null</code>.
*/
- public IContainerModelNode getParent(Class<?> nodeType);
+ public <V extends IContainerModelNode> V getParent(Class<V> nodeType);
/**
- * Associated the given container model node as parent. The parent node
- * can be set only once.
+ * Associated the given model node as parent node.
+ * <p>
+ * <b>Note:</b> The parent node can be set only once.
*
- * @param parent The parent container model node.
- * @throws <code>IllegalStateException</code> if the node had been associated already with a parent.
+ * @param parent The parent model node.
+ * @throws <code>IllegalStateException</code> if the node had been associated already with a
+ * parent.
*/
public void setParent(IContainerModelNode parent) throws IllegalStateException;
/**
- * Moves the model node to the specified new parent container. If the model
- * node is associated with a parent container, the node will be removed from
- * the old parent container node non-recursive.
+ * Moves the model node to the specified new parent container. If the model node is associated
+ * with a parent container, the node will be removed from the old parent container node
+ * non-recursive.
* <p>
- * <b>Note:</b> The method will trigger 2 change events, a {@link IContainerModelNode#NOTIFY_REMOVED}
- * notification for the old parent (if any) and a {@link IContainerModelNode#NOTIFY_ADDED} notification
- * for the new parent container.
+ * <b>Note:</b> The method will trigger 2 change events, a
+ * {@link IContainerModelNode#NOTIFY_REMOVED} notification for the old parent (if any) and a
+ * {@link IContainerModelNode#NOTIFY_ADDED} notification for the new parent container.
*
* @param newParent The new parent container. Must not be <code>null</code>.
* @throws IllegalStateException if the move of the node failed.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.model/src/org/eclipse/tm/te/runtime/model/interfaces/IModelNodeProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/interfaces/IModelNodeProvider.java
index 64ee3ae77..d57ed53d8 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.model/src/org/eclipse/tm/te/runtime/model/interfaces/IModelNodeProvider.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/interfaces/IModelNodeProvider.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.model.interfaces;
+package org.eclipse.tcf.te.runtime.model.interfaces;
import org.eclipse.core.runtime.IAdaptable;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/interfaces/factory/IFactory.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/interfaces/factory/IFactory.java
new file mode 100644
index 000000000..0c1b5b407
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/interfaces/factory/IFactory.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.runtime.model.interfaces.factory;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.tcf.te.runtime.model.interfaces.IModelNode;
+
+/**
+ * Interface to be implemented by model node factories.
+ */
+public interface IFactory extends IAdaptable {
+
+ /**
+ * Creates an new instance of an node object implementing the specified node interface.
+ *
+ * @param nodeInterface The node interface to be implemented by the node object to be created.
+ * Must not be <code>null</code>.
+ * @return The node object implementing the specified node interface or <code>null</code>.
+ */
+ public <V extends IModelNode> V newInstance(Class<V> nodeInterface);
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/interfaces/factory/IFactoryDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/interfaces/factory/IFactoryDelegate.java
new file mode 100644
index 000000000..18cead26f
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/interfaces/factory/IFactoryDelegate.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.runtime.model.interfaces.factory;
+
+import org.eclipse.tcf.te.runtime.interfaces.extensions.IExecutableExtension;
+import org.eclipse.tcf.te.runtime.model.interfaces.IModelNode;
+
+/**
+ * Interface to be implemented by model node factory delegates.
+ */
+public interface IFactoryDelegate extends IExecutableExtension {
+
+ /**
+ * Returns a new instance of an node object implementing the given node interface.
+ *
+ * @param nodeInterface The node interface to be implemented by the node object to be created.
+ * Must not be <code>null</code>.
+ * @return The node object implementing the specified node interface or <code>null</code>.
+ */
+ public <V extends IModelNode> V newInstance(Class<V> nodeInterface);
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/internal/factory/FactoryDelegateManager.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/internal/factory/FactoryDelegateManager.java
new file mode 100644
index 000000000..1e5e00354
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/internal/factory/FactoryDelegateManager.java
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.runtime.model.internal.factory;
+
+import java.util.Collection;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager;
+import org.eclipse.tcf.te.runtime.extensions.ExecutableExtensionProxy;
+import org.eclipse.tcf.te.runtime.model.interfaces.IModelNode;
+import org.eclipse.tcf.te.runtime.model.interfaces.factory.IFactoryDelegate;
+
+
+/**
+ * Model node factory delegate extension point manager implementation.
+ */
+public class FactoryDelegateManager extends AbstractExtensionPointManager<IFactoryDelegate> {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#getExtensionPointId()
+ */
+ @Override
+ protected String getExtensionPointId() {
+ return "org.eclipse.tcf.te.runtime.model.factoryDelegates"; //$NON-NLS-1$
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#getConfigurationElementName()
+ */
+ @Override
+ protected String getConfigurationElementName() {
+ return "delegate"; //$NON-NLS-1$
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#doCreateExtensionProxy(org.eclipse.core.runtime.IConfigurationElement)
+ */
+ @Override
+ protected ExecutableExtensionProxy<IFactoryDelegate> doCreateExtensionProxy(IConfigurationElement element) throws CoreException {
+ return new FactoryDelegateProxy(element);
+ }
+
+ /**
+ * Returns the model node factory delegate for the given node type.
+ * <p>
+ * <b>Note:</b> The first factory delegate declaring the given node type
+ * as supported will be returned.
+ *
+ * @param nodeType The node type. Must not be <code>null</code>.
+ * @return The model node factory delegate or <code>null</code>.
+ */
+ public IFactoryDelegate getFactoryDelegate(Class<? extends IModelNode> nodeType) {
+ Assert.isNotNull(nodeType);
+
+ IFactoryDelegate delegate = null;
+
+ Collection<ExecutableExtensionProxy<IFactoryDelegate>> delegates = getExtensions().values();
+ for (ExecutableExtensionProxy<IFactoryDelegate> candidate : delegates) {
+ if (!(candidate instanceof FactoryDelegateProxy)) continue;
+ if (((FactoryDelegateProxy)candidate).getNodeTypes().contains(nodeType)) {
+ delegate = candidate.getInstance();
+ break;
+ }
+ }
+
+ return delegate;
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/internal/factory/FactoryDelegateProxy.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/internal/factory/FactoryDelegateProxy.java
new file mode 100644
index 000000000..05af0cc82
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/internal/factory/FactoryDelegateProxy.java
@@ -0,0 +1,107 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.runtime.model.internal.factory;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.tcf.te.runtime.activator.CoreBundleActivator;
+import org.eclipse.tcf.te.runtime.extensions.ExecutableExtensionProxy;
+import org.eclipse.tcf.te.runtime.model.interfaces.IModelNode;
+import org.eclipse.tcf.te.runtime.model.interfaces.factory.IFactoryDelegate;
+import org.eclipse.tcf.te.runtime.model.nls.Messages;
+import org.osgi.framework.Bundle;
+
+/**
+ * Model node factory delegate executable extension proxy implementation.
+ */
+public class FactoryDelegateProxy extends ExecutableExtensionProxy<IFactoryDelegate> {
+ // The list of node types supported by the model node factory delegate
+ private final List<Class<? extends IModelNode>> nodeTypes = new ArrayList<Class<? extends IModelNode>>();
+ // Flag to mark if the node types has been loaded
+ private boolean nodeTypesLoaded = false;
+
+ /**
+ * Constructor.
+ *
+ * @param element The configuration element. Must not be <code>null</code>.
+ * @throws CoreException In case the configuration element attribute <i>id</i> is <code>null</code> or empty.
+ */
+ public FactoryDelegateProxy(IConfigurationElement element) throws CoreException {
+ super(element);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param id The id for this instance.
+ * @param instance The instance to add to proxy.
+ */
+ public FactoryDelegateProxy(String id, IFactoryDelegate instance) {
+ super(id, instance);
+ }
+
+ /**
+ * Returns the list of node types supported by the model node factory.
+ *
+ * @return The unmodifiable list of node types.
+ */
+ public List<Class<? extends IModelNode>> getNodeTypes() {
+ if (!nodeTypesLoaded) loadNodeTypes();
+ return Collections.unmodifiableList(nodeTypes);
+ }
+
+ /**
+ * Load the node types.
+ */
+ protected void loadNodeTypes() {
+ IConfigurationElement element = getConfigurationElement();
+ Assert.isNotNull(element);
+
+ nodeTypes.clear();
+
+ IConfigurationElement[] nodeTypeElements = element.getChildren("nodeType"); //$NON-NLS-1$
+ if (nodeTypeElements != null && nodeTypeElements.length > 0) {
+ for (IConfigurationElement nodeTypeElement : nodeTypeElements) {
+ try {
+ String type = nodeTypeElement.getAttribute("class"); //$NON-NLS-1$
+ String bundleId = nodeTypeElement.getAttribute("bundleId"); //$NON-NLS-1$
+
+ // If a bundle id got specified, use the specified bundle to load the node type class
+ Bundle bundle = bundleId != null ? bundle = Platform.getBundle(bundleId) : null;
+ // If we don't have a bundle to load from yet, fallback to the declaring bundle
+ if (bundle == null) bundle = Platform.getBundle(element.getDeclaringExtension().getNamespaceIdentifier());
+ // And finally, use our own bundle to load the class.
+ // This fallback is expected to never be used.
+ if (bundle == null) bundle = CoreBundleActivator.getContext().getBundle();
+
+ // Try to load the node type class now.
+ Class<? extends IModelNode> typeClass = (Class<? extends IModelNode>)(bundle != null ? bundle.loadClass(type) : Class.forName(type));
+ this.nodeTypes.add(typeClass);
+ }
+ catch (Exception e) {
+ IStatus status = new Status(IStatus.WARNING, CoreBundleActivator.getUniqueIdentifier(),
+ NLS.bind(Messages.FactoryDelegateProxy_warning_failedToLoadNodeType, nodeTypeElement.getAttribute("class"), element.getDeclaringExtension().getUniqueIdentifier()), e); //$NON-NLS-1$
+ Platform.getLog(CoreBundleActivator.getContext().getBundle()).log(status);
+ }
+ }
+ }
+
+ nodeTypesLoaded = true;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.model/src/org/eclipse/tm/te/runtime/model/nls/Messages.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/nls/Messages.java
index 955297a79..b739d0ce9 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.model/src/org/eclipse/tm/te/runtime/model/nls/Messages.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/nls/Messages.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.model.nls;
+package org.eclipse.tcf.te.runtime.model.nls;
import org.eclipse.osgi.util.NLS;
@@ -17,7 +17,7 @@ import org.eclipse.osgi.util.NLS;
public class Messages extends NLS {
// The plug-in resource bundle name
- private static final String BUNDLE_NAME = "org.eclipse.tm.te.runtime.model.nls.Messages"; //$NON-NLS-1$
+ private static final String BUNDLE_NAME = "org.eclipse.tcf.te.runtime.model.nls.Messages"; //$NON-NLS-1$
/**
* Static constructor.
@@ -30,4 +30,6 @@ public class Messages extends NLS {
// **** Declare externalized string id's down here *****
public static String PendingOperationModelNode_label;
+
+ public static String FactoryDelegateProxy_warning_failedToLoadNodeType;
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/nls/Messages.properties b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/nls/Messages.properties
new file mode 100644
index 000000000..74497992b
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/nls/Messages.properties
@@ -0,0 +1,8 @@
+#
+# org.eclipse.tcf.te.runtime.model
+# Externalized Strings.
+#
+
+PendingOperationModelNode_label=Pending...
+
+FactoryDelegateProxy_warning_failedToLoadNodeType=Cannot create node type ''{0}'' for model node factory delegate ''{1}''.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/.classpath b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/.classpath
index 8a8f1668c..8a8f1668c 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/.classpath
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/.classpath
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/.project b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/.project
new file mode 100644
index 000000000..c8b533f3a
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.tcf.te.runtime.persistence</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/target_explorer/plugins/org.eclipse.tm.te.runtime.persistence/.settings/org.eclipse.jdt.core.prefs b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/.settings/org.eclipse.jdt.core.prefs
index d83c9d218..d83c9d218 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.persistence/.settings/org.eclipse.jdt.core.prefs
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/.settings/org.eclipse.jdt.core.prefs
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.persistence/.settings/org.eclipse.jdt.ui.prefs b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/.settings/org.eclipse.jdt.ui.prefs
index 658605512..658605512 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.persistence/.settings/org.eclipse.jdt.ui.prefs
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/.settings/org.eclipse.jdt.ui.prefs
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..8de8fe87d
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/META-INF/MANIFEST.MF
@@ -0,0 +1,17 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.tcf.te.runtime.persistence;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipse.tcf.te.runtime.persistence.activator.CoreBundleActivator
+Bundle-Vendor: %providerName
+Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
+ org.eclipse.tcf.te.runtime;bundle-version="1.0.0",
+ org.eclipse.tcf.te.runtime.services;bundle-version="1.0.0"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
+Bundle-Localization: plugin
+Export-Package: org.eclipse.tcf.te.runtime.persistence,
+ org.eclipse.tcf.te.runtime.persistence.activator;x-internal:=true,
+ org.eclipse.tcf.te.runtime.persistence.interfaces,
+ org.eclipse.tcf.te.runtime.persistence.properties
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/build.properties b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/build.properties
index 73a5119ed..73a5119ed 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/build.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/build.properties
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.persistence/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/plugin.properties
index ef6554b93..ef6554b93 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.persistence/plugin.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/plugin.properties
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/plugin.xml b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/plugin.xml
new file mode 100644
index 000000000..5b298f250
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/plugin.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+
+<!-- Extension points -->
+ <extension-point id="delegates" name="%ExtensionPoint.delegates.name" schema="schema/delegates.exsd"/>
+
+<!-- Persistence delegate contributions -->
+ <extension point="org.eclipse.tcf.te.runtime.persistence.delegates">
+ <delegate
+ class="org.eclipse.tcf.te.runtime.persistence.properties.PropertiesFilePersistenceDelegate"
+ id="org.eclipse.tcf.te.runtime.persistence.properties"
+ label="%PropertiesFilePersistenceDelegate.label">
+ </delegate>
+ </extension>
+
+<!-- Service contributions -->
+ <extension point="org.eclipse.tcf.te.runtime.services.services">
+ <service
+ class="org.eclipse.tcf.te.runtime.persistence.services.PersistenceService"
+ id="org.eclipse.tcf.te.runtime.services.persistence">
+ <serviceType class="org.eclipse.tcf.te.runtime.persistence.interfaces.IPersistenceService"/>
+ </service>
+ </extension>
+
+</plugin>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.persistence/pom.xml b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/pom.xml
index e9ade5819..25ade798e 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.persistence/pom.xml
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/pom.xml
@@ -7,11 +7,11 @@
<parent>
<groupId>org.eclipse.tcf</groupId>
<artifactId>tcf-parent</artifactId>
- <version>0.5.0-SNAPSHOT</version>
+ <version>1.0.0-SNAPSHOT</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<version>1.0.0.qualifier</version>
- <artifactId>org.eclipse.tm.te.runtime.persistence</artifactId>
+ <artifactId>org.eclipse.tcf.te.runtime.persistence</artifactId>
<packaging>eclipse-plugin</packaging>
</project> \ No newline at end of file
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.persistence/schema/delegates.exsd b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/schema/delegates.exsd
index e503a9fb2..4b1bcb64e 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.persistence/schema/delegates.exsd
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/schema/delegates.exsd
@@ -1,9 +1,9 @@
<?xml version='1.0' encoding='UTF-8'?>
<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.tm.te.runtime.persistence" xmlns="http://www.w3.org/2001/XMLSchema">
+<schema targetNamespace="org.eclipse.tcf.te.runtime.persistence" xmlns="http://www.w3.org/2001/XMLSchema">
<annotation>
<appinfo>
- <meta.schema plugin="org.eclipse.tm.te.runtime.persistence" id="delegates" name="Target Explorer Persistence Delegates"/>
+ <meta.schema plugin="org.eclipse.tcf.te.runtime.persistence" id="delegates" name="Target Explorer Persistence Delegates"/>
</appinfo>
<documentation>
This extension point is used to allow the contribution of new Target Explorer persistence delegates.
@@ -75,12 +75,12 @@
<attribute name="class" type="string">
<annotation>
<documentation>
- The class that implements &lt;code&gt;org.eclipse.tm.te.runtime.persistence.interfaces.IPersistenceDelegate&lt;/code&gt; or extends &lt;code&gt;org.eclipse.tm.te.runtime.persistence.AbstractPersistenceDelegate&lt;/code&gt;.
+ The class that implements &lt;code&gt;org.eclipse.tcf.te.runtime.persistence.interfaces.IPersistenceDelegate&lt;/code&gt; or extends &lt;code&gt;org.eclipse.tcf.te.runtime.persistence.AbstractPersistenceDelegate&lt;/code&gt;.
&lt;p&gt;
The persistence delegate implementation class must be specified either by the class attribute or the class child element!
</documentation>
<appinfo>
- <meta.attribute kind="java" basedOn="org.eclipse.tm.te.runtime.persistence.AbstractPersistenceDelegate:org.eclipse.tm.te.runtime.persistence.interfaces.IPersistenceDelegate"/>
+ <meta.attribute kind="java" basedOn="org.eclipse.tcf.te.runtime.persistence.AbstractPersistenceDelegate:org.eclipse.tcf.te.runtime.persistence.interfaces.IPersistenceDelegate"/>
</appinfo>
</annotation>
</attribute>
@@ -108,12 +108,12 @@ The persistence delegate implementation class must be specified either by the cl
<attribute name="class" type="string">
<annotation>
<documentation>
- The class that implements &lt;code&gt;org.eclipse.tm.te.runtime.persistence.interfaces.IPersistenceDelegate&lt;/code&gt; or extends &lt;code&gt;org.eclipse.tm.te.runtime.persistence.AbstractPersistenceDelegate&lt;/code&gt;.
+ The class that implements &lt;code&gt;org.eclipse.tcf.te.runtime.persistence.interfaces.IPersistenceDelegate&lt;/code&gt; or extends &lt;code&gt;org.eclipse.tcf.te.runtime.persistence.AbstractPersistenceDelegate&lt;/code&gt;.
&lt;p&gt;
The persistence delegate implementation class must be specified either by the class attribute or the class child element!
</documentation>
<appinfo>
- <meta.attribute kind="java" basedOn="org.eclipse.tm.te.runtime.persistence.AbstractPersistenceDelegate:org.eclipse.tm.te.runtime.persistence.interfaces.IPersistenceDelegate"/>
+ <meta.attribute kind="java" basedOn="org.eclipse.tcf.te.runtime.persistence.AbstractPersistenceDelegate:org.eclipse.tcf.te.runtime.persistence.interfaces.IPersistenceDelegate"/>
</appinfo>
</annotation>
</attribute>
@@ -159,10 +159,10 @@ The persistence delegate implementation class must be specified either by the cl
</appinfo>
<documentation>
&lt;pre&gt;
- &lt;extension point=&quot;org.eclipse.tm.te.runtime.persistence.delegates&quot;&gt;
+ &lt;extension point=&quot;org.eclipse.tcf.te.runtime.persistence.delegates&quot;&gt;
&lt;delegate
- class=&quot;org.eclipse.tm.te.runtime.persistence.PropertiesFilePersistenceDelegate&quot;
- id=&quot;org.eclipse.tm.te.runtime.persistence.properties&quot;&gt;
+ class=&quot;org.eclipse.tcf.te.runtime.persistence.PropertiesFilePersistenceDelegate&quot;
+ id=&quot;org.eclipse.tcf.te.runtime.persistence.properties&quot;&gt;
&lt;/delegate&gt;
&lt;/extension&gt;
&lt;/pre&gt;
@@ -174,7 +174,7 @@ The persistence delegate implementation class must be specified either by the cl
<meta.section type="apiinfo"/>
</appinfo>
<documentation>
- Plug-ins that want to extend this extension point, the referenced class must implement the &lt;samp&gt;org.eclipse.tm.te.runtime.persistence.interfaces.IPersistenceDelegate&lt;/samp&gt; interface.
+ Plug-ins that want to extend this extension point, the referenced class must implement the &lt;samp&gt;org.eclipse.tcf.te.runtime.persistence.interfaces.IPersistenceDelegate&lt;/samp&gt; interface.
</documentation>
</annotation>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.persistence/src/org/eclipse/tm/te/runtime/persistence/AbstractPersistenceDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/AbstractPersistenceDelegate.java
index 437a2b4ae..dd04fb2ca 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.persistence/src/org/eclipse/tm/te/runtime/persistence/AbstractPersistenceDelegate.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/AbstractPersistenceDelegate.java
@@ -7,10 +7,10 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.persistence;
+package org.eclipse.tcf.te.runtime.persistence;
-import org.eclipse.tm.te.runtime.extensions.ExecutableExtension;
-import org.eclipse.tm.te.runtime.persistence.interfaces.IPersistenceDelegate;
+import org.eclipse.tcf.te.runtime.persistence.interfaces.IPersistenceDelegate;
+import org.eclipse.tcf.te.runtime.extensions.ExecutableExtension;
/**
* Abstract persistence delegate implementation.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.persistence/src/org/eclipse/tm/te/runtime/persistence/PersistenceDelegateManager.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/PersistenceDelegateManager.java
index 61e9fdd4e..802f94cb9 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.persistence/src/org/eclipse/tm/te/runtime/persistence/PersistenceDelegateManager.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/PersistenceDelegateManager.java
@@ -7,15 +7,15 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.persistence;
+package org.eclipse.tcf.te.runtime.persistence;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
-import org.eclipse.tm.te.runtime.persistence.interfaces.IPersistenceDelegate;
-import org.eclipse.tm.te.runtime.extensions.AbstractExtensionPointManager;
-import org.eclipse.tm.te.runtime.extensions.ExecutableExtensionProxy;
+import org.eclipse.tcf.te.runtime.persistence.interfaces.IPersistenceDelegate;
+import org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager;
+import org.eclipse.tcf.te.runtime.extensions.ExecutableExtensionProxy;
/**
* Persistence delegate manager implementation.
@@ -44,15 +44,15 @@ public class PersistenceDelegateManager extends AbstractExtensionPointManager<IP
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.extensions.AbstractExtensionPointManager#getExtensionPointId()
+ * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#getExtensionPointId()
*/
@Override
protected String getExtensionPointId() {
- return "org.eclipse.tm.te.runtime.persistence.delegates"; //$NON-NLS-1$
+ return "org.eclipse.tcf.te.runtime.persistence.delegates"; //$NON-NLS-1$
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.extensions.AbstractExtensionPointManager#getConfigurationElementName()
+ * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#getConfigurationElementName()
*/
@Override
protected String getConfigurationElementName() {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.persistence/src/org/eclipse/tm/te/runtime/persistence/activator/CoreBundleActivator.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/activator/CoreBundleActivator.java
index 38aeea65b..1a5393afe 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.persistence/src/org/eclipse/tm/te/runtime/persistence/activator/CoreBundleActivator.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/activator/CoreBundleActivator.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.persistence.activator;
+package org.eclipse.tcf.te.runtime.persistence.activator;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.persistence/src/org/eclipse/tm/te/runtime/persistence/interfaces/IPersistable.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/interfaces/IPersistable.java
index bf7a591ce..17368c32a 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.persistence/src/org/eclipse/tm/te/runtime/persistence/interfaces/IPersistable.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/interfaces/IPersistable.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.persistence.interfaces;
+package org.eclipse.tcf.te.runtime.persistence.interfaces;
import java.io.IOException;
import java.net.URI;
@@ -41,6 +41,18 @@ public interface IPersistable {
public URI getURI(Object data);
/**
+ * Returns the interface type name to use for recreating the object from the
+ * persisted object representation.
+ * <p>
+ * <b>Note:</b> The returned string is expected in the format <code>&quot;&lt;bundleId&gt;:&lt;full qualified interface type name&gt;&quot;</code>.
+ * If the bundle id is not present, it is very likely that the object recreation will fail with a {@link ClassNotFoundException}.
+ *
+ * @param data The data object. Must not be <code>null</code>.
+ * @return The interface type or <code>null</code>.
+ */
+ public String getInterfaceTypeName(Object data);
+
+ /**
* Exports the given data object to an external representation.
* <p>
* As a general guide line, it is expected that the external representation contains only base
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/interfaces/IPersistableNameProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/interfaces/IPersistableNameProvider.java
new file mode 100644
index 000000000..2ab45f64d
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/interfaces/IPersistableNameProvider.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.runtime.persistence.interfaces;
+
+/**
+ * Interface to be implemented by persistable elements which requires a
+ * custom persistence store naming schema.
+ */
+public interface IPersistableNameProvider {
+
+ /**
+ * Returns the name to use to store the data object to the persistence storage.
+ * <p>
+ * <b>Note:</b> The name returned by this method is expected to be a valid name to the persistence
+ * storage provider. The name will be passed on as returned.
+ *
+ * @param data The data object. Must not be <code>null</code>.
+ * @return The persistable name for the given data object or <code<null</code>.
+ */
+ public String getName(Object data);
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/interfaces/IPersistableNodeProperties.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/interfaces/IPersistableNodeProperties.java
new file mode 100644
index 000000000..cb5058d33
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/interfaces/IPersistableNodeProperties.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.runtime.persistence.interfaces;
+
+/**
+ * Persistable node property constants.
+ */
+public interface IPersistableNodeProperties {
+
+ /**
+ * The URI of the node in a persistence storage.
+ * <p>
+ * This property can be used by persistable implementations to store the URI to remember from
+ * where a node got restored or written to.
+ * <p>
+ * The property itself is a transient property.
+ */
+ public static final String PROPERTY_URI = "URI.transient"; //$NON-NLS-1$
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.persistence/src/org/eclipse/tm/te/runtime/persistence/interfaces/IPersistenceDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/interfaces/IPersistenceDelegate.java
index 07bc3eef4..915680503 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.persistence/src/org/eclipse/tm/te/runtime/persistence/interfaces/IPersistenceDelegate.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/interfaces/IPersistenceDelegate.java
@@ -7,13 +7,13 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.persistence.interfaces;
+package org.eclipse.tcf.te.runtime.persistence.interfaces;
import java.io.IOException;
import java.net.URI;
import java.util.Map;
-import org.eclipse.tm.te.runtime.interfaces.extensions.IExecutableExtension;
+import org.eclipse.tcf.te.runtime.interfaces.extensions.IExecutableExtension;
/**
* Interface to be implemented by persistence delegates.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.persistence/src/org/eclipse/tm/te/runtime/persistence/interfaces/IPersistenceService.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/interfaces/IPersistenceService.java
index 8b5b25e61..67b77254f 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.persistence/src/org/eclipse/tm/te/runtime/persistence/interfaces/IPersistenceService.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/interfaces/IPersistenceService.java
@@ -7,11 +7,12 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.persistence.interfaces;
+package org.eclipse.tcf.te.runtime.persistence.interfaces;
import java.io.IOException;
+import java.net.URI;
-import org.eclipse.tm.te.runtime.services.interfaces.IService;
+import org.eclipse.tcf.te.runtime.services.interfaces.IService;
/**
* A service for persisting elements to a persistence store.
@@ -54,4 +55,14 @@ public interface IPersistenceService extends IService {
*/
public boolean delete(Object data) throws IOException;
+ /**
+ * Returns the persistence storage URI for the given data object. The persistence delegate to
+ * use will be determined by adapting the given data object to an {@link IPersistable}.
+ *
+ * @param data The data object. Must not be <code>null</code>.
+ * @return The URI or <code>null</code>.
+ *
+ * @throws IOException - if the operation fails
+ */
+ public URI getURI(Object data) throws IOException;
}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.persistence/src/org/eclipse/tm/te/runtime/persistence/properties/PropertiesFilePersistenceDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/properties/PropertiesFilePersistenceDelegate.java
index a4739a1d7..8522891c2 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.persistence/src/org/eclipse/tm/te/runtime/persistence/properties/PropertiesFilePersistenceDelegate.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/properties/PropertiesFilePersistenceDelegate.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.persistence.properties;
+package org.eclipse.tcf.te.runtime.persistence.properties;
import java.io.BufferedReader;
import java.io.BufferedWriter;
@@ -30,7 +30,7 @@ import java.util.regex.Pattern;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
-import org.eclipse.tm.te.runtime.persistence.AbstractPersistenceDelegate;
+import org.eclipse.tcf.te.runtime.persistence.AbstractPersistenceDelegate;
/**
* Properties file persistence delegate implementation.
@@ -40,7 +40,7 @@ import org.eclipse.tm.te.runtime.persistence.AbstractPersistenceDelegate;
public class PropertiesFilePersistenceDelegate extends AbstractPersistenceDelegate {
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.persistence.interfaces.IPersistenceDelegate#write(java.net.URI, java.util.Map)
+ * @see org.eclipse.tcf.te.runtime.persistence.interfaces.IPersistenceDelegate#write(java.net.URI, java.util.Map)
*/
@Override
public void write(URI uri, Map<String, Object> data) throws IOException {
@@ -77,7 +77,7 @@ public class PropertiesFilePersistenceDelegate extends AbstractPersistenceDelega
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.persistence.interfaces.IPersistenceDelegate#delete(java.net.URI)
+ * @see org.eclipse.tcf.te.runtime.persistence.interfaces.IPersistenceDelegate#delete(java.net.URI)
*/
@Override
public boolean delete(URI uri) throws IOException {
@@ -106,7 +106,7 @@ public class PropertiesFilePersistenceDelegate extends AbstractPersistenceDelega
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.persistence.interfaces.IPersistenceDelegate#read(java.net.URI)
+ * @see org.eclipse.tcf.te.runtime.persistence.interfaces.IPersistenceDelegate#read(java.net.URI)
*/
@Override
public Map<String, Object> read(URI uri) throws IOException {
@@ -224,7 +224,8 @@ public class PropertiesFilePersistenceDelegate extends AbstractPersistenceDelega
while (line != null) {
Matcher matcher = SECTION.matcher(line);
if (matcher.matches()) {
- currentSection = matcher.group(1).toLowerCase();
+ // Section names are case-sensitive too
+ currentSection = matcher.group(1);
if (sections.get(currentSection) == null) {
sections.put(currentSection, new HashMap<String, Object>());
}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.persistence/src/org/eclipse/tm/te/runtime/persistence/services/PersistenceService.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/services/PersistenceService.java
index 58a3c1a08..cf4d9fe29 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.persistence/src/org/eclipse/tm/te/runtime/persistence/services/PersistenceService.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/services/PersistenceService.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.persistence.services;
+package org.eclipse.tcf.te.runtime.persistence.services;
import java.io.IOException;
import java.net.URI;
@@ -16,11 +16,11 @@ import java.util.Map;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.Platform;
-import org.eclipse.tm.te.runtime.persistence.PersistenceDelegateManager;
-import org.eclipse.tm.te.runtime.persistence.interfaces.IPersistable;
-import org.eclipse.tm.te.runtime.persistence.interfaces.IPersistenceDelegate;
-import org.eclipse.tm.te.runtime.persistence.interfaces.IPersistenceService;
-import org.eclipse.tm.te.runtime.services.AbstractService;
+import org.eclipse.tcf.te.runtime.persistence.PersistenceDelegateManager;
+import org.eclipse.tcf.te.runtime.persistence.interfaces.IPersistable;
+import org.eclipse.tcf.te.runtime.persistence.interfaces.IPersistenceDelegate;
+import org.eclipse.tcf.te.runtime.persistence.interfaces.IPersistenceService;
+import org.eclipse.tcf.te.runtime.services.AbstractService;
/**
* Persistence service implementation.
@@ -28,7 +28,7 @@ import org.eclipse.tm.te.runtime.services.AbstractService;
public class PersistenceService extends AbstractService implements IPersistenceService {
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.persistence.interfaces.IPersistenceService#write(java.lang.Object)
+ * @see org.eclipse.tcf.te.runtime.persistence.interfaces.IPersistenceService#write(java.lang.Object)
*/
@Override
public void write(Object data) throws IOException {
@@ -63,7 +63,7 @@ public class PersistenceService extends AbstractService implements IPersistenceS
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.persistence.interfaces.IPersistenceService#read(java.lang.Object)
+ * @see org.eclipse.tcf.te.runtime.persistence.interfaces.IPersistenceService#read(java.lang.Object)
*/
@Override
public void read(Object data) throws IOException {
@@ -97,7 +97,7 @@ public class PersistenceService extends AbstractService implements IPersistenceS
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.persistence.interfaces.IPersistenceService#delete(java.lang.Object)
+ * @see org.eclipse.tcf.te.runtime.persistence.interfaces.IPersistenceService#delete(java.lang.Object)
*/
@Override
public boolean delete(Object data) throws IOException {
@@ -124,4 +124,29 @@ public class PersistenceService extends AbstractService implements IPersistenceS
// Pass on to the delegate for deleting
return delegate.delete(uri);
}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.persistence.interfaces.IPersistenceService#getURI(java.lang.Object)
+ */
+ @Override
+ public URI getURI(Object data) throws IOException {
+ Assert.isNotNull(data);
+
+ // Determine the persistable element for the given data object
+ IPersistable persistable = data instanceof IPersistable ? (IPersistable)data : null;
+ // If the element isn't a persistable by itself, try to adapt the element
+ if (persistable == null) persistable = data instanceof IAdaptable ? (IPersistable) ((IAdaptable)data).getAdapter(IPersistable.class) : null;
+ if (persistable == null) persistable = (IPersistable) Platform.getAdapterManager().getAdapter(data, IPersistable.class);
+
+ // If the persistable could be still not determined, throw an IOException
+ if (persistable == null) throw new IOException("'data' must be adaptable to IPersistable."); //$NON-NLS-1$
+
+ // Determine the persistence delegate
+ IPersistenceDelegate delegate = persistable.getStorageID() != null ? PersistenceDelegateManager.getInstance().getDelegate(persistable.getStorageID(), false) : null;
+ // If the persistence delegate could not be determined, throw an IOException
+ if (delegate == null) throw new IOException("The persistence delegate for ID '" + persistable.getStorageID() + "' cannot be determined."); //$NON-NLS-1$ //$NON-NLS-2$
+
+ // Determine the URI
+ return persistable.getURI(data);
+ }
}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime/.classpath b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/.classpath
index 8a8f1668c..8a8f1668c 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime/.classpath
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/.classpath
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/.options b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/.options
new file mode 100644
index 000000000..dcef8fbd3
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/.options
@@ -0,0 +1 @@
+org.eclipse.tcf.te.runtime.services/debugmode = 0
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/.project b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/.project
new file mode 100644
index 000000000..4f9bc8b71
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.tcf.te.runtime.services</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/target_explorer/plugins/org.eclipse.tm.te.runtime.services/.settings/org.eclipse.jdt.core.prefs b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/.settings/org.eclipse.jdt.core.prefs
index 938113232..938113232 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.services/.settings/org.eclipse.jdt.core.prefs
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/.settings/org.eclipse.jdt.core.prefs
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.services/.settings/org.eclipse.jdt.ui.prefs b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/.settings/org.eclipse.jdt.ui.prefs
index 0cba94897..0cba94897 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.services/.settings/org.eclipse.jdt.ui.prefs
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/.settings/org.eclipse.jdt.ui.prefs
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..9ed781314
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/META-INF/MANIFEST.MF
@@ -0,0 +1,18 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.tcf.te.runtime.services;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipse.tcf.te.runtime.services.activator.CoreBundleActivator
+Bundle-Vendor: %providerName
+Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
+ org.eclipse.core.expressions;bundle-version="3.4.300",
+ org.eclipse.tcf.te.runtime;bundle-version="1.0.0"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
+Bundle-Localization: plugin
+Export-Package: org.eclipse.tcf.te.runtime.services,
+ org.eclipse.tcf.te.runtime.services.activator;x-internal:=true,
+ org.eclipse.tcf.te.runtime.services.interfaces,
+ org.eclipse.tcf.te.runtime.services.interfaces.constants,
+ org.eclipse.tcf.te.runtime.services.nls;x-internal:=true
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime/build.properties b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/build.properties
index 73a5119ed..73a5119ed 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime/build.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/build.properties
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.services/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/plugin.properties
index 7b6d31e6c..7b6d31e6c 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.services/plugin.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/plugin.properties
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/plugin.xml b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/plugin.xml
new file mode 100644
index 000000000..8521aa65a
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/plugin.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+
+<!-- Extension points -->
+ <extension-point id="services" name="Service Contributions" schema="schema/services.exsd"/>
+
+<!-- Property tester contributions -->
+ <extension point="org.eclipse.core.expressions.propertyTesters">
+ <propertyTester
+ class="org.eclipse.tcf.te.runtime.services.internal.PropertyTester"
+ id="org.eclipse.tcf.te.runtime.services.PropertyTester"
+ namespace="org.eclipse.tcf.te.runtime.services"
+ properties="hasService"
+ type="java.lang.Object">
+ </propertyTester>
+
+ </extension>
+
+</plugin>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/pom.xml b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/pom.xml
new file mode 100644
index 000000000..4b0229b41
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.tcf</groupId>
+ <artifactId>tcf-parent</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../../../pom.xml</relativePath>
+ </parent>
+
+ <version>1.0.0.qualifier</version>
+ <artifactId>org.eclipse.tcf.te.runtime.services</artifactId>
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.services/schema/services.exsd b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/schema/services.exsd
index fedf0c39b..5247e16bd 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.services/schema/services.exsd
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/schema/services.exsd
@@ -1,15 +1,19 @@
<?xml version='1.0' encoding='UTF-8'?>
<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.tm.te.runtime.services" xmlns="http://www.w3.org/2001/XMLSchema">
+<schema targetNamespace="org.eclipse.tcf.te.runtime.services" xmlns="http://www.w3.org/2001/XMLSchema">
<annotation>
<appinfo>
- <meta.schema plugin="org.eclipse.tm.te.runtime.services" id="services" name="Services"/>
+ <meta.schema plugin="org.eclipse.tcf.te.runtime.services" id="services" name="Services"/>
</appinfo>
<documentation>
This extension point is used to contribute services.
+&lt;p&gt;
+If a enablement expression is specified, the service context is passed in as default variable for evaluation. The service context is not expected to be iteratable or countable. Service contributions without a enablement expression are always enabled and are considered for any service context, including &quot;null&quot;.
</documentation>
</annotation>
+ <include schemaLocation="schema://org.eclipse.core.expressions/schema/expressionLanguage.exsd"/>
+
<element name="extension">
<annotation>
<appinfo>
@@ -18,8 +22,7 @@
</annotation>
<complexType>
<sequence>
- <element ref="connectionTypeServices" minOccurs="0" maxOccurs="unbounded"/>
- <element ref="genericServices" minOccurs="0" maxOccurs="unbounded"/>
+ <element ref="service" minOccurs="1" maxOccurs="unbounded"/>
</sequence>
<attribute name="point" type="string" use="required">
<annotation>
@@ -48,39 +51,6 @@
</complexType>
</element>
- <element name="connectionTypeServices">
- <complexType>
- <sequence>
- <element ref="service" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="connectionTypeId" type="string" use="required">
- <annotation>
- <documentation>
- The unique id of the connection type contribution.
- </documentation>
- <appinfo>
- <meta.attribute kind="identifier" basedOn="org.eclipse.tm.te.core.connectionTypes/connectionType/@id"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="genericServices">
- <complexType>
- <sequence>
- <element ref="service" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
- An optional unique id to bind the service to. If no id is specified, the service contribution is added to the list of global unbound services.
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
<element name="service">
<annotation>
<documentation>
@@ -89,25 +59,25 @@
</annotation>
<complexType>
<sequence>
- <element ref="class" minOccurs="0" maxOccurs="1"/>
+ <element ref="enablement" minOccurs="0" maxOccurs="1"/>
<element ref="serviceType" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attribute name="class" type="string">
<annotation>
<documentation>
- The class that implements &lt;code&gt;org.eclipse.tm.te.runtime.interfaces.services.IService&lt;/code&gt; or extends &lt;code&gt;org.eclipse.tm.te.runtime.services.AbstractService&lt;/code&gt;.
+ The class that implements &lt;code&gt;org.eclipse.tcf.te.runtime.interfaces.services.IService&lt;/code&gt; or extends &lt;code&gt;org.eclipse.tcf.te.runtime.services.AbstractService&lt;/code&gt;.
&lt;p&gt;
The service implementation class must be specified either by the class attribute or the class child element!
</documentation>
<appinfo>
- <meta.attribute kind="java" basedOn="org.eclipse.tm.te.runtime.services.AbstractService:org.eclipse.tm.te.runtime.interfaces.services.IService"/>
+ <meta.attribute kind="java" basedOn="org.eclipse.tcf.te.runtime.services.AbstractService:org.eclipse.tcf.te.runtime.interfaces.services.IService"/>
</appinfo>
</annotation>
</attribute>
- <attribute name="plugin" type="string">
+ <attribute name="id" type="string" use="required">
<annotation>
<documentation>
- The name of the requested contributing bundle if different from the bundle declaring the contribution.
+ The unique id of the service contribution.
</documentation>
</annotation>
</attribute>
@@ -127,12 +97,12 @@ The service implementation class must be specified either by the class attribute
<attribute name="class" type="string">
<annotation>
<documentation>
- The class that implements &lt;code&gt;org.eclipse.tm.te.runtime.interfaces.services.IService&lt;/code&gt; or extends &lt;code&gt;org.eclipse.tm.te.runtime.services.AbstractService&lt;/code&gt;.
+ The class that implements &lt;code&gt;org.eclipse.tcf.te.runtime.interfaces.services.IService&lt;/code&gt; or extends &lt;code&gt;org.eclipse.tcf.te.runtime.services.AbstractService&lt;/code&gt;.
&lt;p&gt;
The service implementation class must be specified either by the class attribute or the class child element!
</documentation>
<appinfo>
- <meta.attribute kind="java" basedOn="org.eclipse.tm.te.runtime.services.AbstractService:org.eclipse.tm.te.runtime.interfaces.services.IService"/>
+ <meta.attribute kind="java" basedOn="org.eclipse.tcf.te.runtime.services.AbstractService:org.eclipse.tcf.te.runtime.interfaces.services.IService"/>
</appinfo>
</annotation>
</attribute>
@@ -176,14 +146,14 @@ The service implementation class must be specified either by the class attribute
</documentation>
<appinfo>
- <meta.attribute kind="java" basedOn=":org.eclipse.tm.te.runtime.interfaces.services.IService"/>
+ <meta.attribute kind="java" basedOn=":org.eclipse.tcf.te.runtime.interfaces.services.IService"/>
</appinfo>
</annotation>
</attribute>
<attribute name="bundleId" type="string">
<annotation>
<documentation>
- The unique id of the bundle which contains the class loader required to load the service type class. If not specified, the plugin&apos;s own class loader is used.
+ The unique id of the bundle which contains the class loader required to load the service type class. If not specified, the plug-in&apos;s own class loader is used.
</documentation>
</annotation>
</attribute>
@@ -207,12 +177,11 @@ The service implementation class must be specified either by the class attribute
This is an example of the extension point usage:
&lt;p&gt;
&lt;pre&gt;&lt;code&gt;
- &lt;extension point=&quot;org.eclipse.tm.te.runtime.services&quot;&gt;
+ &lt;extension point=&quot;org.eclipse.tcf.te.runtime.services&quot;&gt;
&lt;service
- id=&quot;org.eclipse.tm.te.runtime.service.myService&quot;
- class=&quot;org.eclipse.tm.te.runtime.service.MyServiceImpl&quot;
- label=&quot;Service Contribution Example&quot;&gt;
- &lt;serviceType class=&quot;org.eclipse.tm.te.runtime.interfaces.services.IMyServiceInterface&quot;/&gt;
+ id=&quot;org.eclipse.tcf.te.runtime.service.myService&quot;
+ class=&quot;org.eclipse.tcf.te.runtime.service.MyServiceImpl&quot;&gt;
+ &lt;serviceType class=&quot;org.eclipse.tcf.te.runtime.interfaces.services.IMyServiceInterface&quot;/&gt;
&lt;/service&gt;
&lt;/extension&gt;
&lt;/code&gt;&lt;/pre&gt;
@@ -224,7 +193,7 @@ The service implementation class must be specified either by the class attribute
<meta.section type="apiinfo"/>
</appinfo>
<documentation>
- The provider of a service must implement &lt;samp&gt;org.eclipse.tm.te.runtime.interfaces.services.IService&lt;/samp&gt;.
+ The provider of a service must implement &lt;samp&gt;org.eclipse.tcf.te.runtime.interfaces.services.IService&lt;/samp&gt;.
</documentation>
</annotation>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.services/src/org/eclipse/tm/te/runtime/services/AbstractService.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/AbstractService.java
index 624c0fdd3..bc3ebfcb5 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.services/src/org/eclipse/tm/te/runtime/services/AbstractService.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/AbstractService.java
@@ -7,10 +7,10 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.services;
+package org.eclipse.tcf.te.runtime.services;
import org.eclipse.core.runtime.PlatformObject;
-import org.eclipse.tm.te.runtime.services.interfaces.IService;
+import org.eclipse.tcf.te.runtime.services.interfaces.IService;
/**
* Abstract service implementation.
@@ -26,7 +26,7 @@ public abstract class AbstractService extends PlatformObject implements IService
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.services.IService#setId(java.lang.String)
+ * @see org.eclipse.tcf.te.runtime.interfaces.services.IService#setId(java.lang.String)
*/
@Override
public final void setId(String id) {
@@ -34,7 +34,7 @@ public abstract class AbstractService extends PlatformObject implements IService
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.services.IService#getId()
+ * @see org.eclipse.tcf.te.runtime.interfaces.services.IService#getId()
*/
@Override
public final String getId() {
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/AbstractServiceManager.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/AbstractServiceManager.java
new file mode 100644
index 000000000..6318c37e8
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/AbstractServiceManager.java
@@ -0,0 +1,426 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.runtime.services;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.expressions.EvaluationContext;
+import org.eclipse.core.expressions.EvaluationResult;
+import org.eclipse.core.expressions.Expression;
+import org.eclipse.core.expressions.ExpressionConverter;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExecutableExtension;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.tcf.te.runtime.nls.Messages;
+import org.eclipse.tcf.te.runtime.services.activator.CoreBundleActivator;
+import org.eclipse.tcf.te.runtime.services.interfaces.IService;
+
+/**
+ * Abstract service manager implementation.
+ */
+public abstract class AbstractServiceManager {
+
+ // Map for all contributed services stored by their respective unique id
+ private Map<String, ServiceProxy> services = new HashMap<String, ServiceProxy>();
+
+ /**
+ * Proxy to provide lazy loading of contributing plug-ins.
+ */
+ protected class ServiceProxy implements IExecutableExtension {
+ // Reference to the configuration element
+ private IConfigurationElement configElement = null;
+ // The id of the service contribution
+ public String id;
+ // The class implementing the service
+ public String clazz;
+ // The service instance
+ private IService service = null;
+ // The list of service types the service is implementing
+ private List<Class<? extends IService>> serviceTypes = new ArrayList<Class<? extends IService>>();
+ // The converted expression
+ private Expression expression;
+
+ /**
+ * Constructor.
+ */
+ protected ServiceProxy() {
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.runtime.IExecutableExtension#setInitializationData(org.eclipse.core.runtime.IConfigurationElement, java.lang.String, java.lang.Object)
+ */
+ @Override
+ public void setInitializationData(IConfigurationElement config, String propertyName, Object data) throws CoreException {
+ Assert.isNotNull(config);
+ this.configElement = config;
+
+ // Initialize the id field by reading the <id> extension attribute.
+ // Throws an exception if the id is empty or null.
+ id = config != null ? config.getAttribute("id") : null; //$NON-NLS-1$
+ if (id == null || (id != null && "".equals(id.trim()))) { //$NON-NLS-1$
+ throw new CoreException(new Status(IStatus.ERROR,
+ CoreBundleActivator.getUniqueIdentifier(),
+ NLS.bind(Messages.Extension_error_missingRequiredAttribute, "id", config.getContributor().getName()))); //$NON-NLS-1$
+ }
+
+ // Read the class attribute. If null, check for the class sub element
+ clazz = config.getAttribute("class"); //$NON-NLS-1$
+ if (clazz == null) {
+ IConfigurationElement[] children = config.getChildren("class"); //$NON-NLS-1$
+ // Single element definition assumed (see extension point schema)
+ if (children.length > 0) {
+ clazz = children[0].getAttribute("class"); //$NON-NLS-1$
+ }
+ }
+
+ // Read the "enablement" sub element of the extension
+ IConfigurationElement[] children = configElement.getChildren("enablement"); //$NON-NLS-1$
+ // Only one "enablement" element is expected
+ if (children != null && children.length > 0) {
+ expression = ExpressionConverter.getDefault().perform(children[0]);
+ }
+ }
+
+ /**
+ * Add a type to the proxy. Types are used unless the proxy is instantiated to provide lazy
+ * loading of services. After instantiated, a service will be identified only by its type
+ * and implementing or extending interfaces or super-types.
+ *
+ * @param serviceType The type to add.
+ */
+ public void addType(Class<? extends IService> serviceType) {
+ Assert.isNotNull(serviceType);
+ if (service == null && serviceTypes != null && !serviceTypes.contains(serviceType)) {
+ serviceTypes.add(serviceType);
+ }
+ }
+
+ /**
+ * Return the real service instance for this proxy.
+ */
+ protected IService getService(boolean unique) {
+ if ((service == null || unique) && configElement != null) {
+ try {
+ // Create the service class instance via the configuration element
+ Object service = configElement.createExecutableExtension("class"); //$NON-NLS-1$
+ if (service instanceof IService) {
+ if (unique) {
+ return (IService)service;
+ }
+ else if (service instanceof IService) {
+ this.service = (IService)service;
+ }
+ else {
+ IStatus status = new Status(IStatus.ERROR, CoreBundleActivator.getUniqueIdentifier(), "Service '" + service.getClass().getName() + "' not of type IService."); //$NON-NLS-1$ //$NON-NLS-2$
+ Platform.getLog(CoreBundleActivator.getContext().getBundle()).log(status);
+ }
+ }
+ }
+ catch (CoreException e) {
+ IStatus status = new Status(IStatus.ERROR, CoreBundleActivator.getUniqueIdentifier(), "Cannot create service '" + clazz + "'.", e); //$NON-NLS-1$ //$NON-NLS-2$
+ Platform.getLog(CoreBundleActivator.getContext().getBundle()).log(status);
+ }
+ if (serviceTypes != null) {
+ serviceTypes.clear();
+ }
+ serviceTypes = null;
+ }
+ return service;
+ }
+
+ /**
+ * Check whether this proxy holds a service that is suitable for the given type.
+ *
+ * @param serviceType The service type. Must not be <code>null</code>.
+ * @return <code>True</code> if the proxy holds a suitable service, <code>false</code> otherwise.
+ */
+ protected boolean isMatching(Class<? extends IService> serviceType) {
+ Assert.isNotNull(serviceType);
+
+ if (service != null) {
+ return serviceType.isInstance(service);
+ }
+ else if (configElement != null) {
+ if (serviceType.getClass().getName().equals(clazz)) {
+ return true;
+ }
+ for (Class<? extends IService> type : serviceTypes) {
+ if (type.equals(serviceType)) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Check whether this proxy holds a service that is suitable for the given type.
+ *
+ * @param serviceTypeName The service type name. Must not be <code>null</code>.
+ * @return <code>True</code> if the proxy holds a suitable service, <code>false</code> otherwise.
+ */
+ protected boolean isMatching(String serviceTypeName) {
+ Assert.isNotNull(serviceTypeName);
+
+ if (service != null) {
+ Class<?>[] interfaces = service.getClass().getInterfaces();
+ for (Class<?> interfaze : interfaces) {
+ if (serviceTypeName.equals(interfaze.getName())) {
+ return true;
+ }
+ }
+ }
+ else if (configElement != null) {
+ if (serviceTypeName.equals(clazz)) {
+ return true;
+ }
+ for (Class<? extends IService> type : serviceTypes) {
+ if (serviceTypeName.equals(type.getName())) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Returns if or if not the service contribution is enabled for the given service context.
+ * <p>
+ * If the given service context is <code>null</code>, only globally unbound services are
+ * enabled.
+ *
+ * @param context The service context or <code>null</code>.
+ * @return <code>True</code> if the service contribution is enabled for the given service
+ * context, <code>false</code> otherwise.
+ */
+ protected boolean isEnabled(Object context) {
+ if (context == null) {
+ return getEnablement() == null;
+ }
+
+ Expression enablement = getEnablement();
+
+ // The service contribution is enabled by default if no expression is specified.
+ boolean enabled = enablement == null;
+
+ if (enablement != null) {
+ // Set the default variable to the service context.
+ EvaluationContext evalContext = new EvaluationContext(null, context);
+ // Evaluate the expression
+ try {
+ enabled = enablement.evaluate(evalContext).equals(EvaluationResult.TRUE);
+ } catch (CoreException e) {
+ IStatus status = new Status(IStatus.ERROR, CoreBundleActivator.getUniqueIdentifier(), e.getLocalizedMessage(), e);
+ Platform.getLog(CoreBundleActivator.getContext().getBundle()).log(status);
+ }
+ }
+
+ return enabled;
+ }
+
+ /**
+ * Returns the id of the service contribution.
+ *
+ * @return The service contribution id.
+ */
+ protected String getId() {
+ return id;
+ }
+
+ /**
+ * Returns the enablement expression.
+ *
+ * @return The enablement expression or <code>null</code>.
+ */
+ protected Expression getEnablement() {
+ return expression;
+ }
+
+ public boolean equals(IService service) {
+ return clazz.equals(service.getClass());
+ }
+
+ public boolean equals(ServiceProxy proxy) {
+ return clazz.equals(proxy.clazz);
+ }
+ }
+
+ /**
+ * Constructor.
+ */
+ protected AbstractServiceManager() {
+ loadServices();
+ }
+
+ /**
+ * Creates a new service proxy instance and initialize it.
+ *
+ * @param config The configuration element. Must not be <code>null</code>.
+ * @return The new service proxy instance.
+ */
+ protected ServiceProxy getServiceProxy(IConfigurationElement config) {
+ Assert.isNotNull(config);
+ ServiceProxy proxy = new ServiceProxy();
+ try {
+ proxy.setInitializationData(config, null, null);
+ } catch (CoreException e) {
+ if (Platform.inDebugMode()) {
+ Platform.getLog(CoreBundleActivator.getContext().getBundle()).log(e.getStatus());
+ }
+ }
+ return proxy;
+ }
+
+ /**
+ * Get a service for the given service context that implements at least the needed service type.
+ * <p>
+ * If an interface type is given, the service with the highest implementation is returned. This
+ * may result in a random selection depending on the extension registration order, especially
+ * when a service interface is implemented two times in different hierarchy paths. If a class
+ * type is given, if available, the service of exactly that class is returned. Otherwise the
+ * highest implementation is returned.
+ *
+ * @param context The service context or <code>null</code>.
+ * @param serviceType The service type the service should at least implement or extend.
+ *
+ * @return The service or <code>null</code>.
+ */
+ public <V extends IService> V getService(Object context, Class<? extends V> serviceType) {
+ return getService(context, serviceType, false);
+ }
+
+ /**
+ * Get a service for the given service context that implements at least the needed service type.
+ * <p>
+ * If an interface type is given, the service with the highest implementation is returned. This
+ * may result in a random selection depending on the extension registration order, especially
+ * when a service interface is implemented two times in different hierarchy paths. If a class
+ * type is given, if available, the service of exactly that class is returned. Otherwise the
+ * highest implementation is returned.
+ *
+ * @param context The service context or <code>null</code>.
+ * @param serviceType The service type the service should at least implement or extend.
+ * @param unique <code>true</code> if a new instance of the service is needed.
+ *
+ * @return The service or <code>null</code>.
+ */
+ @SuppressWarnings("unchecked")
+ public <V extends IService> V getService(Object context, Class<? extends V> serviceType, boolean unique) {
+ Assert.isNotNull(serviceType);
+
+ Collection<ServiceProxy> proxies = services.values();
+ if (proxies != null && !proxies.isEmpty()) {
+ List<ServiceProxy> candidates = new ArrayList<ServiceProxy>();
+ boolean isInterface = serviceType.isInterface();
+ for (ServiceProxy proxy : proxies) {
+ if (proxy.isMatching(serviceType) && proxy.isEnabled(context)) {
+ if (!isInterface && proxy.equals(serviceType)) {
+ V service = (V)proxy.getService(unique);
+ service.setId(proxy.getId());
+ return service;
+ }
+ candidates.add(proxy);
+ }
+ }
+
+ V service = null;
+ if (!candidates.isEmpty()) {
+ service = (V)candidates.get(0).getService(unique);
+ service.setId(candidates.get(0).getId());
+ }
+
+ return service;
+ }
+
+ return null;
+ }
+
+ /**
+ * Get a service list for the given service context that implements at least the needed service type.
+ *
+ * @param context The service context or <code>null</code>.
+ * @param serviceType The service type the service should at least implement or extend.
+ * @param unique <code>true</code> if a new instance of the service is needed.
+ *
+ * @return The service list or empty list.
+ */
+ public IService[] getServices(Object context, Class<? extends IService> serviceType, boolean unique) {
+ Assert.isNotNull(serviceType);
+
+ Collection<ServiceProxy> proxies = services.values();
+ List<IService> services = new ArrayList<IService>();
+ if (proxies != null && !proxies.isEmpty()) {
+ List<ServiceProxy> candidates = new ArrayList<ServiceProxy>();
+ for (ServiceProxy proxy : proxies) {
+ if (proxy.isMatching(serviceType) && proxy.isEnabled(context)) {
+ candidates.add(proxy);
+ }
+ }
+ for (ServiceProxy serviceProxy : candidates) {
+ IService service = serviceProxy.getService(unique);
+ service.setId(serviceProxy.getId());
+ services.add(service);
+ }
+ }
+ return services.toArray(new IService[services.size()]);
+ }
+
+ /**
+ * Adds the given service to the service proxy map.
+ */
+ protected void addService(ServiceProxy proxy) {
+ Assert.isNotNull(services);
+ Assert.isNotNull(proxy);
+
+ String id = proxy.getId();
+ Assert.isNotNull(id);
+ services.put(id, proxy);
+ }
+
+ /**
+ * Returns if or if not a service contribution for the given service context, implementing the
+ * given service type, exist.
+ *
+ * @param context The service context or <code>null</code>.
+ * @param serviceTypeName The name of a service type the service should at least implement or extend.
+ *
+ * @return <code>True</code> if a matching service contribution exist, <code>false</code> otherwise.
+ */
+ public boolean hasService(Object context, String serviceTypeName) {
+ Assert.isNotNull(serviceTypeName);
+
+ // Get all service contributions
+ Collection<ServiceProxy> proxies = services.values();
+ if (proxies != null && !proxies.isEmpty()) {
+ for (ServiceProxy proxy : proxies) {
+ if (proxy.isMatching(serviceTypeName) && proxy.isEnabled(context)) {
+ return true;
+ }
+ }
+ }
+
+ return false;
+ }
+
+
+ /**
+ * Loads the contributed services into proxies (lazy loading!!) and adds them to this manager;
+ */
+ protected abstract void loadServices();
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.services/src/org/eclipse/tm/te/runtime/services/ServiceManager.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/ServiceManager.java
index 86909e4d4..eda0acb4e 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.services/src/org/eclipse/tm/te/runtime/services/ServiceManager.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/ServiceManager.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.services;
+package org.eclipse.tcf.te.runtime.services;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExtension;
@@ -16,16 +16,16 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
import org.eclipse.osgi.util.NLS;
-import org.eclipse.tm.te.runtime.activator.CoreBundleActivator;
-import org.eclipse.tm.te.runtime.services.interfaces.IService;
-import org.eclipse.tm.te.runtime.services.nls.Messages;
+import org.eclipse.tcf.te.runtime.activator.CoreBundleActivator;
+import org.eclipse.tcf.te.runtime.services.interfaces.IService;
+import org.eclipse.tcf.te.runtime.services.nls.Messages;
import org.osgi.framework.Bundle;
/**
* Common service manager implementation, handling the extension point
- * <code>org.eclipse.tm.te.runtime.services</code>.
+ * <code>org.eclipse.tcf.te.runtime.services</code>.
*/
-public class ServiceManager extends AbstractServiceManager<IService> {
+public class ServiceManager extends AbstractServiceManager {
/*
* Thread save singleton instance creation.
*/
@@ -60,8 +60,8 @@ public class ServiceManager extends AbstractServiceManager<IService> {
* @param serviceType The service type the service should at least implement or extend.
* @return The service or <code>null</code>.
*/
- public <V extends IService> V getService(Class<V> serviceType, boolean unique) {
- return (V)super.getService("", serviceType, unique); //$NON-NLS-1$
+ public <V extends IService> V getService(Class<? extends V> serviceType, boolean unique) {
+ return super.getService(null, serviceType, unique);
}
/**
@@ -77,17 +77,17 @@ public class ServiceManager extends AbstractServiceManager<IService> {
* @param serviceType The service type the service should at least implement or extend.
* @return The service or <code>null</code>.
*/
- public <V extends IService> V getService(Class<V> serviceType) {
- return (V)super.getService("", serviceType); //$NON-NLS-1$
+ public <V extends IService> V getService(Class<? extends V> serviceType) {
+ return super.getService(null, serviceType);
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.services.AbstractServiceManager#loadServices()
+ * @see org.eclipse.tcf.te.runtime.services.AbstractServiceManager#loadServices()
*/
@SuppressWarnings("unchecked")
@Override
protected void loadServices() {
- IExtensionPoint ep = Platform.getExtensionRegistry().getExtensionPoint("org.eclipse.tm.te.runtime.services.services"); //$NON-NLS-1$
+ IExtensionPoint ep = Platform.getExtensionRegistry().getExtensionPoint("org.eclipse.tcf.te.runtime.services.services"); //$NON-NLS-1$
if (ep != null) {
IExtension[] extensions = ep.getExtensions();
if (extensions != null) {
@@ -95,33 +95,9 @@ public class ServiceManager extends AbstractServiceManager<IService> {
IConfigurationElement[] configElements = extension.getConfigurationElements();
if (configElements != null) {
for (IConfigurationElement configElement : configElements) {
- // Determine the unique id to bind the service contributions to.
- String id = null;
-
- if ("connectionTypeServices".equals(configElement.getName())) { //$NON-NLS-1$
- id = configElement.getAttribute("connectionTypeId"); //$NON-NLS-1$
-
- // For a connection type service declaration, the connection type id is mandatory
- if (id == null || "".equals(id)) { //$NON-NLS-1$
- IStatus status = new Status(IStatus.WARNING, CoreBundleActivator.getUniqueIdentifier(),
- NLS.bind(Messages.ServiceManager_warning_skippedConnectionTypeService, configElement.getDeclaringExtension().getNamespaceIdentifier()));
- Platform.getLog(CoreBundleActivator.getContext().getBundle()).log(status);
- continue;
- }
- }
- else if ("genericServices".equals(configElement.getName())) { //$NON-NLS-1$
- id = configElement.getAttribute("id"); //$NON-NLS-1$
- }
-
- // Normalize the id
- if (id == null) id = ""; //$NON-NLS-1$
-
- // Get the service contributions
- IConfigurationElement[] services = configElement.getChildren("service"); //$NON-NLS-1$
- // Process the service contributions
- for (IConfigurationElement service : services) {
- ServiceProxy proxy = getServiceProxy(service);
- IConfigurationElement[] serviceTypes = service.getChildren("serviceType"); //$NON-NLS-1$
+ if ("service".equals(configElement.getName())) { //$NON-NLS-1$
+ ServiceProxy proxy = getServiceProxy(configElement);
+ IConfigurationElement[] serviceTypes = configElement.getChildren("serviceType"); //$NON-NLS-1$
if (serviceTypes != null && serviceTypes.length > 0) {
for (IConfigurationElement serviceType : serviceTypes) {
try {
@@ -142,16 +118,12 @@ public class ServiceManager extends AbstractServiceManager<IService> {
}
catch (Exception e) {
IStatus status = new Status(IStatus.WARNING, CoreBundleActivator.getUniqueIdentifier(),
- NLS.bind(Messages.ServiceManager_warning_failedToLoadServiceType, serviceType.getAttribute("class"), service.getAttribute("class")), e); //$NON-NLS-1$ //$NON-NLS-2$
+ NLS.bind(Messages.ServiceManager_warning_failedToLoadServiceType, serviceType.getAttribute("class"), configElement.getAttribute("class")), e); //$NON-NLS-1$ //$NON-NLS-2$
Platform.getLog(CoreBundleActivator.getContext().getBundle()).log(status);
}
}
}
- if (!addService(id, proxy)) {
- IStatus status = new Status(IStatus.WARNING, CoreBundleActivator.getUniqueIdentifier(),
- NLS.bind(Messages.ServiceManager_warning_failedToBindService, proxy.clazz, id), null);
- Platform.getLog(CoreBundleActivator.getContext().getBundle()).log(status);
- }
+ addService(proxy);
}
}
}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/src/org/eclipse/tm/te/runtime/concurrent/activator/CoreBundleActivator.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/activator/CoreBundleActivator.java
index f97644d9f..7f19640cb 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/src/org/eclipse/tm/te/runtime/concurrent/activator/CoreBundleActivator.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/activator/CoreBundleActivator.java
@@ -7,9 +7,9 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.concurrent.activator;
+package org.eclipse.tcf.te.runtime.services.activator;
-import org.eclipse.tm.te.runtime.tracing.TraceHandler;
+import org.eclipse.tcf.te.runtime.tracing.TraceHandler;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/IDebugService.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/IDebugService.java
new file mode 100644
index 000000000..b5fc8e4d7
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/IDebugService.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.runtime.services.interfaces;
+
+import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+
+/**
+ * Debug service.
+ * <p>
+ * Allow to start and control the debugger for a set of given debug contexts.
+ */
+public interface IDebugService extends IService {
+
+ /**
+ * Launches a debug session for the given context and attaches to it. The attach
+ * can be parameterized via the data properties.
+ *
+ * @param context The debug context. Must not be <code>null</code>.
+ * @param data The data properties to parameterize the attach. Must not be <code>null</code>.
+ * @param callback The callback to invoke once the operation completed. Must not be <code>null</code>.
+ */
+ public void attach(Object context, IPropertiesContainer data, ICallback callback);
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/IPropertiesAccessService.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/IPropertiesAccessService.java
new file mode 100644
index 000000000..4b2eba006
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/IPropertiesAccessService.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.runtime.services.interfaces;
+
+import java.util.Map;
+
+/**
+ * Properties access service.
+ * <p>
+ * Allows generic access to properties of a given context without having
+ * to know all the details and limitations for accessing the desired properties.
+ */
+public interface IPropertiesAccessService extends IService {
+
+ /**
+ * Returns a unmodifiable map containing the target addresses and ports for the given context,
+ * if it can be determined.
+ * <p>
+ * A context may return multiple target addresses and ports if the context can be reached using
+ * different connection methods.
+ * <p>
+ * <b>Note:</b>
+ * <ul>
+ * <li>See the constants defined in the properties access constants interface for default
+ * address and port types.</li>
+ * <li>The target address returned must <b>not</b> necessarily be an IP address.</li>
+ * <li>The values of the address or port properties might be <code>null</code>.</li>
+ * </ul>
+ *
+ * @param context The context to get the target addresses and ports from. Must not be <code>null</code>.
+ * @return The unmodifiable map containing the target addresses and ports, or <code>null</code>.
+ */
+ public Map<String, String> getTargetAddress(Object context);
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.services/src/org/eclipse/tm/te/runtime/services/interfaces/IService.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/IService.java
index 309864681..1250dd518 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.services/src/org/eclipse/tm/te/runtime/services/interfaces/IService.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/IService.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.services.interfaces;
+package org.eclipse.tcf.te.runtime.services.interfaces;
/**
* Common service.
@@ -15,7 +15,7 @@ package org.eclipse.tm.te.runtime.services.interfaces;
public interface IService {
/**
- * Sets the id this service is registered to.
+ * Sets the service contribution id.
* <p>
* <b>Note:</b> Once set to a non-null value, the service id cannot be changed anymore.
*
@@ -24,7 +24,7 @@ public interface IService {
public void setId(String id);
/**
- * Returns the id this service is registered to.
+ * Returns the service contribution id.
*
* @return The id or <code>null</code> if the service id is not yet set.
*/
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.services/src/org/eclipse/tm/te/runtime/services/interfaces/ITerminalService.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/ITerminalService.java
index 0aeda85d3..71285a516 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.services/src/org/eclipse/tm/te/runtime/services/interfaces/ITerminalService.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/ITerminalService.java
@@ -7,10 +7,10 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.services.interfaces;
+package org.eclipse.tcf.te.runtime.services.interfaces;
-import org.eclipse.tm.te.runtime.interfaces.callback.ICallback;
-import org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
/**
* Terminals service.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.services/src/org/eclipse/tm/te/runtime/services/interfaces/constants/ILineSeparatorConstants.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/constants/ILineSeparatorConstants.java
index 7ff707278..5aaa3f2ee 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.services/src/org/eclipse/tm/te/runtime/services/interfaces/constants/ILineSeparatorConstants.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/constants/ILineSeparatorConstants.java
@@ -7,12 +7,12 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.services.interfaces.constants;
+package org.eclipse.tcf.te.runtime.services.interfaces.constants;
/**
* Line separator constants.
* <p>
- * Copied from <code>org.eclipse.tm.internal.terminal.local.ILocalTerminalSettings</code>.
+ * Copied from <code>org.eclipse.tcf.internal.terminal.local.ILocalTerminalSettings</code>.
*/
public interface ILineSeparatorConstants {
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/constants/IPropertiesAccessServiceConstants.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/constants/IPropertiesAccessServiceConstants.java
new file mode 100644
index 000000000..31c35a4a2
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/constants/IPropertiesAccessServiceConstants.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.runtime.services.interfaces.constants;
+
+/**
+ * Defines the properties access service constants.
+ */
+public interface IPropertiesAccessServiceConstants {
+
+ /**
+ * Target name.
+ * <p>
+ * The target name is not meant to be identical with the targets network name. It can
+ * be the targets network name, but it can be any other string identifying the target
+ * to the user as well. The name is for display only, it is not meant to be used for
+ * communicating with the target.
+ */
+ public static String PROP_NAME = "name"; //$NON-NLS-1$
+
+ /**
+ * Target agent address.
+ * <p>
+ * <i>The value is typically the address an agent running at the target.</i>
+ */
+ public static String PROP_ADDRESS = "address"; //$NON-NLS-1$
+
+ /**
+ * Target agent port.
+ * <p>
+ * <i>The value is typically the port an agent running at the target.</i>
+ */
+ public static String PROP_PORT = "port"; //$NON-NLS-1$
+
+ /**
+ * Target address to be used to construct a SSH connection.
+ * <p>
+ * If not specified, clients should fall back to {@link PROP_ADDRESS}.
+ */
+ public static String PROP_SSH_ADDRESS = "ssh.address"; //$NON-NLS-1$
+
+ /**
+ * Target port to be used to construct a SSH connection.
+ * <p>
+ * If not specified, clients should assume the default "22".
+ */
+ public static String PROP_SSH_PORT = "ssh.port"; //$NON-NLS-1$
+
+ /**
+ * Target address to be used to construct a telnet connection.
+ * <p>
+ * If not specified, clients should fall back to {@link PROP_ADDRESS}.
+ */
+ public static String PROP_TELNET_ADDRESS = "telnet.address"; //$NON-NLS-1$
+
+ /**
+ * Target port to be used to construct a telnet connection.
+ * <p>
+ * If not specified, clients should assume the default "23".
+ */
+ public static String PROP_TELNET_PORT = "telnet.port"; //$NON-NLS-1$
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.services/src/org/eclipse/tm/te/runtime/services/interfaces/constants/ITerminalsConnectorConstants.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/constants/ITerminalsConnectorConstants.java
index e03d2d5c0..462956a0b 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.services/src/org/eclipse/tm/te/runtime/services/interfaces/constants/ITerminalsConnectorConstants.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/constants/ITerminalsConnectorConstants.java
@@ -8,7 +8,7 @@
* Wind River Systems - initial API and implementation
* Max Weninger (Wind River) - [361352] [TERMINALS][SSH] Add SSH terminal support
*******************************************************************************/
-package org.eclipse.tm.te.runtime.services.interfaces.constants;
+package org.eclipse.tcf.te.runtime.services.interfaces.constants;
/**
* Defines the terminals connector constants.
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/internal/PropertyTester.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/internal/PropertyTester.java
new file mode 100644
index 000000000..4343a565f
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/internal/PropertyTester.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.runtime.services.internal;
+
+import org.eclipse.tcf.te.runtime.services.ServiceManager;
+
+
+/**
+ * Services plug-in property tester implementation.
+ */
+public class PropertyTester extends org.eclipse.core.expressions.PropertyTester {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.expressions.IPropertyTester#test(java.lang.Object, java.lang.String, java.lang.Object[], java.lang.Object)
+ */
+ @Override
+ public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
+
+ // "hasService": Checks if a given service type is available for the given receiver.
+ if ("hasService".equals(property)) { //$NON-NLS-1$
+ // The service type class name is within the expected value
+ String serviceTypeName = expectedValue instanceof String ? (String)expectedValue : null;
+ if (serviceTypeName != null) {
+ return ServiceManager.getInstance().hasService(receiver, serviceTypeName);
+ }
+ }
+
+ return false;
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.services/src/org/eclipse/tm/te/runtime/services/nls/Messages.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/nls/Messages.java
index c00c801d7..c9d7cf8de 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.services/src/org/eclipse/tm/te/runtime/services/nls/Messages.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/nls/Messages.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.services.nls;
+package org.eclipse.tcf.te.runtime.services.nls;
import org.eclipse.osgi.util.NLS;
@@ -17,7 +17,7 @@ import org.eclipse.osgi.util.NLS;
public class Messages extends NLS {
// The plug-in resource bundle name
- private static final String BUNDLE_NAME = "org.eclipse.tm.te.runtime.services.nls.Messages"; //$NON-NLS-1$
+ private static final String BUNDLE_NAME = "org.eclipse.tcf.te.runtime.services.nls.Messages"; //$NON-NLS-1$
/**
* Static constructor.
@@ -31,5 +31,4 @@ public class Messages extends NLS {
public static String ServiceManager_warning_skippedConnectionTypeService;
public static String ServiceManager_warning_failedToLoadServiceType;
- public static String ServiceManager_warning_failedToBindService;
}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.services/src/org/eclipse/tm/te/runtime/services/nls/Messages.properties b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/nls/Messages.properties
index 82fe11e75..4ac999203 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.services/src/org/eclipse/tm/te/runtime/services/nls/Messages.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/nls/Messages.properties
@@ -1,9 +1,8 @@
#
-# org.eclipse.tm.te.runtime.services
+# org.eclipse.tcf.te.runtime.services
# Externalized Strings.
#
ServiceManager_warning_skippedConnectionTypeService=Skipped connection type service contributions from contributor ''{0}''. \
Reason: Missing mandatory connection type id.
ServiceManager_warning_failedToLoadServiceType=Cannot create service type ''{0}'' for service ''{1}''.
-ServiceManager_warning_failedToBindService=Failed to bind service ''{0}'' to id ''{1}''.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.core/.classpath b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/.classpath
index 8a8f1668c..8a8f1668c 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.core/.classpath
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/.classpath
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.statushandler/.project b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/.project
index 3bd96ec2d..2ee415694 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.statushandler/.project
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/.project
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.eclipse.tm.te.runtime.statushandler</name>
+ <name>org.eclipse.tcf.te.runtime.statushandler</name>
<comment></comment>
<projects>
</projects>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.statushandler/.settings/org.eclipse.jdt.core.prefs b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/.settings/org.eclipse.jdt.core.prefs
index 5992dd796..5992dd796 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.statushandler/.settings/org.eclipse.jdt.core.prefs
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/.settings/org.eclipse.jdt.core.prefs
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.statushandler/.settings/org.eclipse.jdt.ui.prefs b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/.settings/org.eclipse.jdt.ui.prefs
index 77a583d8f..77a583d8f 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.statushandler/.settings/org.eclipse.jdt.ui.prefs
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/.settings/org.eclipse.jdt.ui.prefs
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..bf79e3f88
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/META-INF/MANIFEST.MF
@@ -0,0 +1,18 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.tcf.te.runtime.statushandler;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipse.tcf.te.runtime.statushandler.activator.CoreBundleActivator
+Bundle-Vendor: %providerName
+Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
+ org.eclipse.core.expressions;bundle-version="3.4.300",
+ org.eclipse.tcf.te.runtime;bundle-version="1.0.0"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
+Bundle-Localization: plugin
+Export-Package: org.eclipse.tcf.te.runtime.statushandler,
+ org.eclipse.tcf.te.runtime.statushandler.activator;x-internal:=true,
+ org.eclipse.tcf.te.runtime.statushandler.interfaces,
+ org.eclipse.tcf.te.runtime.statushandler.internal;x-internal:=true,
+ org.eclipse.tcf.te.runtime.statushandler.nls
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.statushandler/build.properties b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/build.properties
index e35945197..e35945197 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.statushandler/build.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/build.properties
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.statushandler/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/plugin.properties
index 3399d316b..ee1c54216 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.statushandler/plugin.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/plugin.properties
@@ -13,5 +13,5 @@ providerName = Eclipse.org
# ***** Extension Points *****
-ExtensionPoint.handlers.name=Target Explorer Status Handlers Extension Point
-ExtensionPoint.bindings.name=Target Explorer Status Handler Bindings Extension Point
+ExtensionPoint.handlers.name=Status Handlers Extension Point
+ExtensionPoint.bindings.name=Status Handler Bindings Extension Point
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.statushandler/plugin.xml b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/plugin.xml
index 7ab4a47d6..7ab4a47d6 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.statushandler/plugin.xml
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/plugin.xml
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/pom.xml b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/pom.xml
new file mode 100644
index 000000000..9d5831d40
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.tcf</groupId>
+ <artifactId>tcf-parent</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../../../pom.xml</relativePath>
+ </parent>
+
+ <version>1.0.0.qualifier</version>
+ <artifactId>org.eclipse.tcf.te.runtime.statushandler</artifactId>
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.statushandler/schema/bindings.exsd b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/schema/bindings.exsd
index fa47e63d5..1265f1a70 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.statushandler/schema/bindings.exsd
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/schema/bindings.exsd
@@ -1,9 +1,9 @@
<?xml version='1.0' encoding='UTF-8'?>
<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.tm.te.runtime.statushandler" xmlns="http://www.w3.org/2001/XMLSchema">
+<schema targetNamespace="org.eclipse.tcf.te.runtime.statushandler" xmlns="http://www.w3.org/2001/XMLSchema">
<annotation>
<appinfo>
- <meta.schema plugin="org.eclipse.tm.te.runtime.statushandler" id="bindings" name="%ExtensionPoint.handlers.name"/>
+ <meta.schema plugin="org.eclipse.tcf.te.runtime.statushandler" id="bindings" name="Status Handler Bindings Extension Point"/>
</appinfo>
<documentation>
This extension point is used to declare the Target Explorer status handler bindings.
@@ -74,7 +74,7 @@
The unique id of the referenced status handler.
</documentation>
<appinfo>
- <meta.attribute kind="identifier" basedOn="org.eclipse.tm.te.runtime.statushandler.handlers/handler/@id"/>
+ <meta.attribute kind="identifier" basedOn="org.eclipse.tcf.te.runtime.statushandler.handlers/handler/@id"/>
</appinfo>
</annotation>
</attribute>
@@ -96,10 +96,10 @@
</appinfo>
<documentation>
&lt;pre&gt;
- &lt;extension point=&quot;org.eclipse.tm.te.runtime.statushandler.bindings&quot;&gt;
+ &lt;extension point=&quot;org.eclipse.tcf.te.runtime.statushandler.bindings&quot;&gt;
&lt;binding
- id=&quot;org.eclipse.tm.te.ui.statushandler.binding.NotificationPopupStatusHandler&quot;
- pageId=&quot;org.eclipse.tm.te.ui.statushandler.NotificationPopupStatusHandler&quot;&gt;
+ id=&quot;org.eclipse.tcf.te.ui.statushandler.binding.NotificationPopupStatusHandler&quot;
+ handlerId=&quot;org.eclipse.tcf.te.ui.statushandler.NotificationPopupStatusHandler&quot;&gt;
&lt;enablement&gt;
...
&lt;/enablement&gt;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.statushandler/schema/handlers.exsd b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/schema/handlers.exsd
index 27a909d9c..faf5d9fb4 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.statushandler/schema/handlers.exsd
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/schema/handlers.exsd
@@ -1,9 +1,9 @@
<?xml version='1.0' encoding='UTF-8'?>
<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.tm.te.runtime.statushandler" xmlns="http://www.w3.org/2001/XMLSchema">
+<schema targetNamespace="org.eclipse.tcf.te.runtime.statushandler" xmlns="http://www.w3.org/2001/XMLSchema">
<annotation>
<appinfo>
- <meta.schema plugin="org.eclipse.tm.te.runtime.statushandler" id="handlers" name="Target Explorer Status Handler Extension Point"/>
+ <meta.schema plugin="org.eclipse.tcf.te.runtime.statushandler" id="handlers" name="Status Handler Extension Point"/>
</appinfo>
<documentation>
This extension point is used to allow the contribution of new Target Explorer status handler.
@@ -75,12 +75,12 @@
<attribute name="class" type="string">
<annotation>
<documentation>
- The class that implements &lt;code&gt;org.eclipse.tm.te.runtime.statushandler.interfaces.IStatusHandler&lt;/code&gt; or extends &lt;code&gt;org.eclipse.tm.te.runtime.statushandler.AbstractStatusHandler&lt;/code&gt;.
+ The class that implements &lt;code&gt;org.eclipse.tcf.te.runtime.statushandler.interfaces.IStatusHandler&lt;/code&gt; or extends &lt;code&gt;org.eclipse.tcf.te.runtime.statushandler.AbstractStatusHandler&lt;/code&gt;.
&lt;p&gt;
The status handler implementation class must be specified either by the class attribute or the class child element!
</documentation>
<appinfo>
- <meta.attribute kind="java" basedOn="org.eclipse.tm.te.runtime.statushandler.AbstractStatusHandler:org.eclipse.tm.te.runtime.statushandler.interfaces.IStatusHandler"/>
+ <meta.attribute kind="java" basedOn="org.eclipse.tcf.te.runtime.statushandler.AbstractStatusHandler:org.eclipse.tcf.te.runtime.statushandler.interfaces.IStatusHandler"/>
</appinfo>
</annotation>
</attribute>
@@ -108,12 +108,12 @@ The status handler implementation class must be specified either by the class at
<attribute name="class" type="string">
<annotation>
<documentation>
- The class that implements &lt;code&gt;org.eclipse.tm.te.runtime.statushandler.interfaces.IStatusHandler&lt;/code&gt; or extends &lt;code&gt;org.eclipse.tm.te.runtime.statushandler.AbstractStatusHandler&lt;/code&gt;.
+ The class that implements &lt;code&gt;org.eclipse.tcf.te.runtime.statushandler.interfaces.IStatusHandler&lt;/code&gt; or extends &lt;code&gt;org.eclipse.tcf.te.runtime.statushandler.AbstractStatusHandler&lt;/code&gt;.
&lt;p&gt;
The status handler implementation class must be specified either by the class attribute or the class child element!
</documentation>
<appinfo>
- <meta.attribute kind="java" basedOn="org.eclipse.tm.te.runtime.statushandler.AbstractStatusHandler:org.eclipse.tm.te.runtime.statushandler.interfaces.IStatusHandler"/>
+ <meta.attribute kind="java" basedOn="org.eclipse.tcf.te.runtime.statushandler.AbstractStatusHandler:org.eclipse.tcf.te.runtime.statushandler.interfaces.IStatusHandler"/>
</appinfo>
</annotation>
</attribute>
@@ -159,10 +159,10 @@ The status handler implementation class must be specified either by the class at
</appinfo>
<documentation>
&lt;pre&gt;
- &lt;extension point=&quot;org.eclipse.tm.te.runtime.statushandler.handlers&quot;&gt;
+ &lt;extension point=&quot;org.eclipse.tcf.te.runtime.statushandler.handlers&quot;&gt;
&lt;handler
- class=&quot;org.eclipse.tm.te.ui.statushandler.NotificationPopupStatusHandler&quot;
- id=&quot;org.eclipse.tm.te.ui.statushandler.NotificationPopupStatusHandler&quot;&gt;
+ class=&quot;org.eclipse.tcf.te.ui.statushandler.NotificationPopupStatusHandler&quot;
+ id=&quot;org.eclipse.tcf.te.ui.statushandler.NotificationPopupStatusHandler&quot;&gt;
&lt;/handler&gt;
&lt;/extension&gt;
&lt;/pre&gt;
@@ -174,7 +174,7 @@ The status handler implementation class must be specified either by the class at
<meta.section type="apiinfo"/>
</appinfo>
<documentation>
- Plug-ins that want to extend this extension point, the referenced class must implement the &lt;samp&gt;org.eclipse.tm.te.runtime.statushandler.interfaces.IStatusHandler&lt;/samp&gt; interface.
+ Plug-ins that want to extend this extension point, the referenced class must implement the &lt;samp&gt;org.eclipse.tcf.te.runtime.statushandler.interfaces.IStatusHandler&lt;/samp&gt; interface.
</documentation>
</annotation>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.statushandler/src/org/eclipse/tm/te/runtime/statushandler/AbstractStatusHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/AbstractStatusHandler.java
index 77a4f53d3..1283fd4c8 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.statushandler/src/org/eclipse/tm/te/runtime/statushandler/AbstractStatusHandler.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/AbstractStatusHandler.java
@@ -7,10 +7,10 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.statushandler;
+package org.eclipse.tcf.te.runtime.statushandler;
-import org.eclipse.tm.te.runtime.statushandler.interfaces.IStatusHandler;
-import org.eclipse.tm.te.runtime.extensions.ExecutableExtension;
+import org.eclipse.tcf.te.runtime.statushandler.interfaces.IStatusHandler;
+import org.eclipse.tcf.te.runtime.extensions.ExecutableExtension;
/**
* Abstract status handler implementation.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.statushandler/src/org/eclipse/tm/te/runtime/statushandler/StatusHandlerManager.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/StatusHandlerManager.java
index bfb3017f2..89647f93d 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.statushandler/src/org/eclipse/tm/te/runtime/statushandler/StatusHandlerManager.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/StatusHandlerManager.java
@@ -7,19 +7,19 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.statushandler;
+package org.eclipse.tcf.te.runtime.statushandler;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import org.eclipse.core.runtime.Assert;
-import org.eclipse.tm.te.runtime.extensions.AbstractExtensionPointManager;
-import org.eclipse.tm.te.runtime.extensions.ExecutableExtensionProxy;
-import org.eclipse.tm.te.runtime.statushandler.interfaces.IStatusHandler;
-import org.eclipse.tm.te.runtime.statushandler.interfaces.IStatusHandlerConstants;
-import org.eclipse.tm.te.runtime.statushandler.internal.StatusHandlerBinding;
-import org.eclipse.tm.te.runtime.statushandler.internal.StatusHandlerBindingExtensionPointManager;
+import org.eclipse.tcf.te.runtime.statushandler.interfaces.IStatusHandler;
+import org.eclipse.tcf.te.runtime.statushandler.interfaces.IStatusHandlerConstants;
+import org.eclipse.tcf.te.runtime.statushandler.internal.StatusHandlerBinding;
+import org.eclipse.tcf.te.runtime.statushandler.internal.StatusHandlerBindingExtensionPointManager;
+import org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager;
+import org.eclipse.tcf.te.runtime.extensions.ExecutableExtensionProxy;
/**
* Status handler manager implementation.
@@ -48,15 +48,15 @@ public final class StatusHandlerManager extends AbstractExtensionPointManager<IS
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.extensions.AbstractExtensionPointManager#getExtensionPointId()
+ * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#getExtensionPointId()
*/
@Override
protected String getExtensionPointId() {
- return "org.eclipse.tm.te.runtime.statushandler.handlers"; //$NON-NLS-1$
+ return "org.eclipse.tcf.te.runtime.statushandler.handlers"; //$NON-NLS-1$
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.extensions.AbstractExtensionPointManager#getConfigurationElementName()
+ * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#getConfigurationElementName()
*/
@Override
protected String getConfigurationElementName() {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.statushandler/src/org/eclipse/tm/te/runtime/statushandler/activator/CoreBundleActivator.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/activator/CoreBundleActivator.java
index c92d8f248..046630261 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.statushandler/src/org/eclipse/tm/te/runtime/statushandler/activator/CoreBundleActivator.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/activator/CoreBundleActivator.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.statushandler.activator;
+package org.eclipse.tcf.te.runtime.statushandler.activator;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.statushandler/src/org/eclipse/tm/te/runtime/statushandler/interfaces/IStatusHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/interfaces/IStatusHandler.java
index 50f0c172f..1c85bb335 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.statushandler/src/org/eclipse/tm/te/runtime/statushandler/interfaces/IStatusHandler.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/interfaces/IStatusHandler.java
@@ -7,11 +7,11 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.statushandler.interfaces;
+package org.eclipse.tcf.te.runtime.statushandler.interfaces;
import org.eclipse.core.runtime.IStatus;
-import org.eclipse.tm.te.runtime.interfaces.extensions.IExecutableExtension;
-import org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.runtime.interfaces.extensions.IExecutableExtension;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
/**
* Interface to be implemented by status handler contributions.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.statushandler/src/org/eclipse/tm/te/runtime/statushandler/interfaces/IStatusHandlerConstants.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/interfaces/IStatusHandlerConstants.java
index 00d1dc1de..ac92e91d1 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.statushandler/src/org/eclipse/tm/te/runtime/statushandler/interfaces/IStatusHandlerConstants.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/interfaces/IStatusHandlerConstants.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.statushandler.interfaces;
+package org.eclipse.tcf.te.runtime.statushandler.interfaces;
/**
* Status handler constants.
@@ -17,7 +17,7 @@ public interface IStatusHandlerConstants {
/**
* The id of the default status handler.
*/
- public final static String ID_DEFAUT_HANDLER = "org.eclipse.tm.te.statushandler.default"; //$NON-NLS-1$
+ public final static String ID_DEFAUT_HANDLER = "org.eclipse.tcf.te.statushandler.default"; //$NON-NLS-1$
/**
* The status to handle is a question (yes/no) (value 0x100).
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.statushandler/src/org/eclipse/tm/te/runtime/statushandler/internal/StatusHandlerBinding.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/internal/StatusHandlerBinding.java
index c755db294..923f455e5 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.statushandler/src/org/eclipse/tm/te/runtime/statushandler/internal/StatusHandlerBinding.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/internal/StatusHandlerBinding.java
@@ -7,13 +7,13 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.statushandler.internal;
+package org.eclipse.tcf.te.runtime.statushandler.internal;
import org.eclipse.core.expressions.Expression;
import org.eclipse.core.expressions.ExpressionConverter;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.tm.te.runtime.extensions.ExecutableExtension;
+import org.eclipse.tcf.te.runtime.extensions.ExecutableExtension;
/**
* Status handler binding implementation.
@@ -25,7 +25,7 @@ public class StatusHandlerBinding extends ExecutableExtension {
private Expression expression;
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.extensions.ExecutableExtension#doSetInitializationData(org.eclipse.core.runtime.IConfigurationElement, java.lang.String, java.lang.Object)
+ * @see org.eclipse.tcf.te.runtime.extensions.ExecutableExtension#doSetInitializationData(org.eclipse.core.runtime.IConfigurationElement, java.lang.String, java.lang.Object)
*/
@Override
public void doSetInitializationData(IConfigurationElement config, String propertyName, Object data) throws CoreException {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.statushandler/src/org/eclipse/tm/te/runtime/statushandler/internal/StatusHandlerBindingExtensionPointManager.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/internal/StatusHandlerBindingExtensionPointManager.java
index 7a0246ffe..fe8fd2462 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.statushandler/src/org/eclipse/tm/te/runtime/statushandler/internal/StatusHandlerBindingExtensionPointManager.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/internal/StatusHandlerBindingExtensionPointManager.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.statushandler.internal;
+package org.eclipse.tcf.te.runtime.statushandler.internal;
import java.util.ArrayList;
import java.util.Collection;
@@ -21,9 +21,9 @@ import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
-import org.eclipse.tm.te.runtime.statushandler.activator.CoreBundleActivator;
-import org.eclipse.tm.te.runtime.extensions.AbstractExtensionPointManager;
-import org.eclipse.tm.te.runtime.extensions.ExecutableExtensionProxy;
+import org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager;
+import org.eclipse.tcf.te.runtime.extensions.ExecutableExtensionProxy;
+import org.eclipse.tcf.te.runtime.statushandler.activator.CoreBundleActivator;
/**
@@ -53,15 +53,15 @@ public class StatusHandlerBindingExtensionPointManager extends AbstractExtension
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.extensions.AbstractExtensionPointManager#getExtensionPointId()
+ * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#getExtensionPointId()
*/
@Override
protected String getExtensionPointId() {
- return "org.eclipse.tm.te.runtime.statushandler.bindings"; //$NON-NLS-1$
+ return "org.eclipse.tcf.te.runtime.statushandler.bindings"; //$NON-NLS-1$
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.extensions.AbstractExtensionPointManager#getConfigurationElementName()
+ * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#getConfigurationElementName()
*/
@Override
protected String getConfigurationElementName() {
@@ -69,13 +69,13 @@ public class StatusHandlerBindingExtensionPointManager extends AbstractExtension
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.extensions.AbstractExtensionPointManager#doCreateExtensionProxy(org.eclipse.core.runtime.IConfigurationElement)
+ * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#doCreateExtensionProxy(org.eclipse.core.runtime.IConfigurationElement)
*/
@Override
protected ExecutableExtensionProxy<StatusHandlerBinding> doCreateExtensionProxy(IConfigurationElement element) throws CoreException {
return new ExecutableExtensionProxy<StatusHandlerBinding>(element) {
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.extensions.ExecutableExtensionProxy#newInstance()
+ * @see org.eclipse.tcf.te.runtime.extensions.ExecutableExtensionProxy#newInstance()
*/
@Override
public StatusHandlerBinding newInstance() {
@@ -104,8 +104,7 @@ public class StatusHandlerBindingExtensionPointManager extends AbstractExtension
for (StatusHandlerBinding binding : getBindings()) {
Expression enablement = binding.getEnablement();
- // The page binding is applicable by default if no expression
- // is specified.
+ // The binding is applicable by default if no expression is specified.
boolean isApplicable = enablement == null;
if (enablement != null) {
@@ -121,13 +120,12 @@ public class StatusHandlerBindingExtensionPointManager extends AbstractExtension
Platform.getLog(CoreBundleActivator.getContext().getBundle()).log(status);
}
} else {
- // The enablement is false by definition if no
- // handler context is not given.
+ // The enablement is false by definition if no handler context is given.
isApplicable = false;
}
}
- // Add the page if applicable
+ // Add the binding if applicable
if (isApplicable) applicable.add(binding);
}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.statushandler/src/org/eclipse/tm/te/runtime/statushandler/nls/Messages.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/nls/Messages.java
index 708ffd27a..8715718ac 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.statushandler/src/org/eclipse/tm/te/runtime/statushandler/nls/Messages.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/nls/Messages.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.statushandler.nls;
+package org.eclipse.tcf.te.runtime.statushandler.nls;
import org.eclipse.osgi.util.NLS;
@@ -17,7 +17,7 @@ import org.eclipse.osgi.util.NLS;
public class Messages extends NLS {
// The plug-in resource bundle name
- private static final String BUNDLE_NAME = "org.eclipse.tm.te.runtime.statushandler.nls.Messages"; //$NON-NLS-1$
+ private static final String BUNDLE_NAME = "org.eclipse.tcf.te.runtime.statushandler.nls.Messages"; //$NON-NLS-1$
/**
* Static constructor.
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/nls/Messages.properties b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/nls/Messages.properties
new file mode 100644
index 000000000..ee58f3955
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/nls/Messages.properties
@@ -0,0 +1,4 @@
+#
+# org.eclipse.tcf.te.runtime.statushandler
+# Externalized Strings.
+#
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/.classpath b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/.classpath
index 8a8f1668c..8a8f1668c 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/.classpath
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/.classpath
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/.options b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/.options
new file mode 100644
index 000000000..8239b28b3
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/.options
@@ -0,0 +1,3 @@
+org.eclipse.tcf.te.runtime.stepper/debugmode = 0
+org.eclipse.tcf.te.runtime.stepper/trace/stepping = false
+org.eclipse.tcf.te.runtime.stepper/profile/stepping = false
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/.project b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/.project
new file mode 100644
index 000000000..84020ee63
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.tcf.te.runtime.stepper</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/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/.settings/org.eclipse.jdt.core.prefs b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/.settings/org.eclipse.jdt.core.prefs
index 5cc1e7f84..5cc1e7f84 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/.settings/org.eclipse.jdt.core.prefs
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/.settings/org.eclipse.jdt.core.prefs
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/.settings/org.eclipse.jdt.ui.prefs b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/.settings/org.eclipse.jdt.ui.prefs
index f86ccc5f3..f86ccc5f3 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/.settings/org.eclipse.jdt.ui.prefs
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/.settings/org.eclipse.jdt.ui.prefs
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..250316d93
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/META-INF/MANIFEST.MF
@@ -0,0 +1,22 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.tcf.te.runtime.stepper;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipse.tcf.te.runtime.stepper.activator.CoreBundleActivator
+Bundle-Vendor: %providerName
+Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
+ org.eclipse.core.expressions;bundle-version="3.4.300",
+ org.eclipse.tcf.te.runtime;bundle-version="1.0.0",
+ org.eclipse.tcf.te.runtime.concurrent;bundle-version="1.0.0"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
+Bundle-Localization: plugin
+Export-Package: org.eclipse.tcf.te.runtime.stepper,
+ org.eclipse.tcf.te.runtime.stepper.activator;x-internal:=true,
+ org.eclipse.tcf.te.runtime.stepper.extensions,
+ org.eclipse.tcf.te.runtime.stepper.extensions.manager,
+ org.eclipse.tcf.te.runtime.stepper.interfaces,
+ org.eclipse.tcf.te.runtime.stepper.interfaces.tracing,
+ org.eclipse.tcf.te.runtime.stepper.nls;x-internal:=true,
+ org.eclipse.tcf.te.runtime.stepper.stepper
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.log.core/build.properties b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/build.properties
index 73a5119ed..73a5119ed 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.log.core/build.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/build.properties
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/plugin.properties
new file mode 100644
index 000000000..8d2c1b579
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/plugin.properties
@@ -0,0 +1,17 @@
+##################################################################################
+# Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+# This program and the accompanying materials are made available under the terms
+# of the Eclipse Public License v1.0 which accompanies this distribution, and is
+# available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Wind River Systems - initial API and implementation
+##################################################################################
+
+pluginName = Target Explorer, Stepper plug-in
+providerName = Eclipse.org
+
+# ***** Steppers *****
+
+MultiContextStepper.name=Multi Context Stepper
+SingleContextStepper.name=Single Context Stepper
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/plugin.xml b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/plugin.xml
new file mode 100644
index 000000000..e9191deca
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/plugin.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+
+<!-- Extension Points -->
+ <extension-point id="steppers" name="Steppers" schema="schema/steppers.exsd"/>
+ <extension-point id="steps" name="Steps" schema="schema/steps.exsd"/>
+ <extension-point id="stepGroups" name="Step Groups" schema="schema/stepGroups.exsd"/>
+ <extension-point id="stepBindings" name="Step Bindings" schema="schema/stepBindings.exsd"/>
+
+<!-- Stepper contributions -->
+ <extension point="org.eclipse.tcf.te.runtime.stepper.steppers">
+ <stepper
+ id="org.eclipse.tcf.te.runtime.stepper.multiContext"
+ class="org.eclipse.tcf.te.runtime.stepper.stepper.MultiContextStepper"
+ label="%MultiContextStepper.name"/>
+ <stepper
+ id="org.eclipse.tcf.te.runtime.stepper.singleContext"
+ class="org.eclipse.tcf.te.runtime.stepper.stepper.SingleContextStepper"
+ label="%SingleContextStepper.name"/>
+ </extension>
+
+</plugin>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/pom.xml b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/pom.xml
new file mode 100644
index 000000000..1a9113aa6
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.tcf</groupId>
+ <artifactId>tcf-parent</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../../../pom.xml</relativePath>
+ </parent>
+
+ <version>1.0.0.qualifier</version>
+ <artifactId>org.eclipse.tcf.te.runtime.stepper</artifactId>
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.core/schema/connectionTypeBindings.exsd b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/schema/stepBindings.exsd
index 37d18d94c..fcb6b1ff4 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.core/schema/connectionTypeBindings.exsd
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/schema/stepBindings.exsd
@@ -1,12 +1,14 @@
<?xml version='1.0' encoding='UTF-8'?>
<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.tm.te.core" xmlns="http://www.w3.org/2001/XMLSchema">
+<schema targetNamespace="org.eclipse.tcf.te.runtime.stepper" xmlns="http://www.w3.org/2001/XMLSchema">
<annotation>
<appinfo>
- <meta.schema plugin="org.eclipse.tm.te.core" id="connectionTypeBindings" name="Connection Type Bindings"/>
+ <meta.schema plugin="org.eclipse.tcf.te.runtime.stepper" id="stepBindings" name="Step Bindings Extension Point"/>
</appinfo>
<documentation>
- This extension point is used to contribute connection types bindings.
+ This extension point is used to declare step bindings.
+&lt;p&gt;
+&lt;b&gt;Note:&lt;/b&gt; For the enablement expression evaluation, the default variable is the same as &quot;activeContexts&quot;, and the variable is iterable. The variable is set to the list of contexts the executing stepper is associated with.
</documentation>
</annotation>
@@ -20,77 +22,59 @@
</annotation>
<complexType>
<sequence>
- <element ref="connectionTypeBinding" minOccurs="1" maxOccurs="unbounded"/>
+ <element ref="binding" minOccurs="1" maxOccurs="unbounded"/>
</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="connectionTypeBinding">
+ <element name="binding">
<annotation>
<documentation>
- Declares a connection type binding.
+ Declares a step binding.
</documentation>
</annotation>
<complexType>
<sequence>
- <element ref="connectStrategy" minOccurs="0" maxOccurs="unbounded"/>
- <element ref="enablement" minOccurs="0" maxOccurs="unbounded"/>
+ <element ref="enablement" minOccurs="0" maxOccurs="1"/>
</sequence>
- <attribute name="connectionTypeId" type="string" use="required">
- <annotation>
- <documentation>
- The full qualified id of the connection type contribution.
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="connectStrategy">
- <annotation>
- <documentation>
- The connect strategy to bind to the connection type.
- </documentation>
- </annotation>
- <complexType>
<attribute name="id" type="string" use="required">
<annotation>
<documentation>
- The full qualified id of the connect strategy contribution.
+ The unique id of the step binding contribution.
</documentation>
- <appinfo>
- <meta.attribute kind="identifier" basedOn="org.eclipse.tm.te.core.connectStrategies/connectStrategy/@id"/>
- </appinfo>
</annotation>
</attribute>
- <attribute name="overwrite" type="string">
+ <attribute name="stepId" type="string" use="required">
<annotation>
<documentation>
- The full qualified id of the connect strategy contribution to overwrite by this contribution.
+ The unique id of the referenced step.
</documentation>
<appinfo>
- <meta.attribute kind="identifier" basedOn="org.eclipse.tm.te.core.connectStrategies/connectStrategy/@id"/>
+ <meta.attribute kind="identifier" basedOn="org.eclipse.tcf.te.runtime.stepper.steps/step/@id"/>
</appinfo>
</annotation>
</attribute>
@@ -111,15 +95,16 @@
<meta.section type="examples"/>
</appinfo>
<documentation>
- This is an example of the extension point usage:
-&lt;p&gt;
-&lt;pre&gt;
- &lt;connectionTypeBinding connectionTypeId=&quot;org.eclipse.tm.te.core.connection.ssh&quot;&gt;
+ &lt;pre&gt;
+ &lt;extension point=&quot;org.eclipse.tcf.te.runtime.stepper.stepBindings&quot;&gt;
+ &lt;binding
+ id=&quot;org.eclipse.tcf.te.ui.stepper.step.binding.OpenChannelStep&quot;
+ stepId=&quot;org.eclipse.tcf.te.ui.stepper.step.OpenChannelStep&quot;&gt;
&lt;enablement&gt;
- ...
+ ...
&lt;/enablement&gt;
- ...
- &lt;/connectionTypeBinding&gt;
+ &lt;/binding&gt;
+ &lt;/extension&gt;
&lt;/pre&gt;
</documentation>
</annotation>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/schema/stepGroups.exsd b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/schema/stepGroups.exsd
index d2fe50bbe..36e1c1b35 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/schema/stepGroups.exsd
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/schema/stepGroups.exsd
@@ -1,9 +1,9 @@
<?xml version='1.0' encoding='UTF-8'?>
<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.tm.te.runtime.stepper" xmlns="http://www.w3.org/2001/XMLSchema">
+<schema targetNamespace="org.eclipse.tcf.te.runtime.stepper" xmlns="http://www.w3.org/2001/XMLSchema">
<annotation>
<appinfo>
- <meta.schema plugin="org.eclipse.tm.te.runtime.stepper" id="stepGroups" name="Step Groups"/>
+ <meta.schema plugin="org.eclipse.tcf.te.runtime.stepper" id="stepGroups" name="Step Groups Extension Point"/>
</appinfo>
<documentation>
This extension point is used to contribute step groups.
@@ -12,6 +12,8 @@ A step group bundles a set of single steps and/or other step groups into a more
</documentation>
</annotation>
+ <include schemaLocation="schema://org.eclipse.core.expressions/schema/expressionLanguage.exsd"/>
+
<element name="extension">
<annotation>
<appinfo>
@@ -88,19 +90,19 @@ A step group bundles a set of single steps and/or other step groups into a more
Specify an unique step group id to virtually copy the references section from. None of the other step group attributes are inherited.
</documentation>
<appinfo>
- <meta.attribute kind="identifier" basedOn="org.eclipse.tm.te.runtime.stepper.stepGroups/stepGroup/@id"/>
+ <meta.attribute kind="identifier" basedOn="org.eclipse.tcf.te.runtime.stepper.stepGroups/stepGroup/@id"/>
</appinfo>
</annotation>
</attribute>
<attribute name="iterator" type="string">
<annotation>
<documentation>
- The class that implements &lt;code&gt;org.eclipse.tm.te.runtime.stepper.interfaces.IContextStepGroupIterator&lt;/code&gt;.
+ The class that implements &lt;code&gt;org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStepGroupIterator&lt;/code&gt;.
&lt;p&gt;
The step group iterator implementation class can be specified either by the iterator attribute or the iterator child element!
</documentation>
<appinfo>
- <meta.attribute kind="java" basedOn=":org.eclipse.tm.te.runtime.stepper.interfaces.IContextStepGroupIterator"/>
+ <meta.attribute kind="java" basedOn=":org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStepGroupIterator"/>
</appinfo>
</annotation>
</attribute>
@@ -128,12 +130,12 @@ The step group iterator implementation class can be specified either by the iter
<attribute name="class" type="string">
<annotation>
<documentation>
- The class that implements &lt;code&gt;org.eclipse.tm.te.runtime.stepper.interfaces.IContextStepGroupIterator&lt;/code&gt;.
+ The class that implements &lt;code&gt;org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStepGroupIterator&lt;/code&gt;.
&lt;p&gt;
The step group iterator implementation class can be specified either by the iterator attribute or the iterator child element!
</documentation>
<appinfo>
- <meta.attribute kind="java" basedOn=":org.eclipse.tm.te.runtime.stepper.interfaces.IContextStepGroupIterator"/>
+ <meta.attribute kind="java" basedOn=":org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStepGroupIterator"/>
</appinfo>
</annotation>
</attribute>
@@ -187,8 +189,9 @@ The step group iterator implementation class can be specified either by the iter
</documentation>
</annotation>
<complexType>
- <sequence minOccurs="0" maxOccurs="unbounded">
- <element ref="requires"/>
+ <sequence>
+ <element ref="requires" minOccurs="0" maxOccurs="unbounded"/>
+ <element ref="enablement" minOccurs="0" maxOccurs="1"/>
</sequence>
<attribute name="id" type="string" use="required">
<annotation>
@@ -311,21 +314,21 @@ Use the form &lt;i&gt;&amp;quot;id##secondaryId&amp;quot;&lt;/i&gt; to identify
This is an example of the extension point usage:
&lt;p&gt;
&lt;pre&gt;
-&lt;extension point=&quot;org.eclipse.tm.te.runtime.stepper.stepGroups&quot;&gt;
+&lt;extension point=&quot;org.eclipse.tcf.te.runtime.stepper.stepGroups&quot;&gt;
&lt;stepGroup
locked=&quot;false&quot;
- id=&quot;org.eclipse.tm.te.tcf.processes.group.launchProcess&quot;
+ id=&quot;org.eclipse.tcf.te.tcf.processes.group.launchProcess&quot;
label=&quot;Launch Process on a Target&quot;&gt;
&lt;description&gt;
Transfer a process image to a target and initiate the process execution.
&lt;/description&gt;
&lt;references&gt;
&lt;reference
- id=&quot;org.eclipse.tm.te.tcf.filesystem.copy&quot;
+ id=&quot;org.eclipse.tcf.te.tcf.filesystem.copy&quot;
removable=&quot;true&quot; hidden=&quot;false&quot; disable=&quot;false&quot;
singleton=&quot;true&quot;/&gt;
&lt;reference
- id=&quot;org.eclipse.tm.te.tcf.processes.steps.startProcess&quot;
+ id=&quot;org.eclipse.tcf.te.tcf.processes.steps.startProcess&quot;
removable=&quot;false&quot; hidden=&quot;true&quot; disable=&quot;false&quot;
singleton=&quot;false&quot;/&gt;
&lt;/stepGroup&gt;
@@ -339,7 +342,7 @@ Use the form &lt;i&gt;&amp;quot;id##secondaryId&amp;quot;&lt;/i&gt; to identify
<meta.section type="apiinfo"/>
</appinfo>
<documentation>
- The provider of a step group must implement &lt;samp&gt;org.eclipse.tm.te.runtime.stepper.interfaces.IContextStepGroup&lt;/samp&gt;.
+ The provider of a step group must implement &lt;samp&gt;org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStepGroup&lt;/samp&gt;.
</documentation>
</annotation>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/schema/steppers.exsd b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/schema/steppers.exsd
index 694cfb219..ad434a8ab 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/schema/steppers.exsd
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/schema/steppers.exsd
@@ -1,9 +1,9 @@
<?xml version='1.0' encoding='UTF-8'?>
<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.tm.te.runtime.stepper" xmlns="http://www.w3.org/2001/XMLSchema">
+<schema targetNamespace="org.eclipse.tcf.te.runtime.stepper" xmlns="http://www.w3.org/2001/XMLSchema">
<annotation>
<appinfo>
- <meta.schema plugin="org.eclipse.tm.te.runtime.stepper" id="steppers" name="Steppers"/>
+ <meta.schema plugin="org.eclipse.tcf.te.runtime.stepper" id="steppers" name="Steppers Extension Point"/>
</appinfo>
<documentation>
This extension point is used to contribute stepper.
@@ -81,12 +81,12 @@ Stepper must be runnable in worker threads.
<attribute name="class" type="string">
<annotation>
<documentation>
- The class that implements &lt;code&gt;org.eclipse.tm.te.runtime.stepper.interfaces.IStepper&lt;/code&gt; or extends &lt;code&gt;org.eclipse.tm.te.runtime.stepper.AbstractContextStepper&lt;/code&gt;.
+ The class that implements &lt;code&gt;org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStepper&lt;/code&gt; or extends &lt;code&gt;org.eclipse.tcf.te.runtime.stepper.AbstractContextStepper&lt;/code&gt;.
&lt;p&gt;
The stepper implementation class must be specified either by the class attribute or the class child element!
</documentation>
<appinfo>
- <meta.attribute kind="java" basedOn="org.eclipse.tm.te.runtime.stepper.AbstractContextStepper:org.eclipse.tm.te.runtime.stepper.interfaces.IStepper"/>
+ <meta.attribute kind="java" basedOn="org.eclipse.tcf.te.runtime.stepper.AbstractContextStepper:org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStepper"/>
</appinfo>
</annotation>
</attribute>
@@ -114,12 +114,12 @@ The stepper implementation class must be specified either by the class attribute
<attribute name="class" type="string">
<annotation>
<documentation>
- The class that implements &lt;code&gt;org.eclipse.tm.te.runtime.stepper.interfaces.IStepper&lt;/code&gt; or extends &lt;code&gt;org.eclipse.tm.te.runtime.stepper.AbstractContextStepper&lt;/code&gt;.
+ The class that implements &lt;code&gt;org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStepper&lt;/code&gt; or extends &lt;code&gt;org.eclipse.tcf.te.runtime.stepper.AbstractContextStepper&lt;/code&gt;.
&lt;p&gt;
The stepper implementation class must be specified either by the class attribute or the class child element!
</documentation>
<appinfo>
- <meta.attribute kind="java" basedOn="org.eclipse.tm.te.runtime.stepper.AbstractContextStepper:org.eclipse.tm.te.runtime.stepper.interfaces.IStepper"/>
+ <meta.attribute kind="java" basedOn="org.eclipse.tcf.te.runtime.stepper.AbstractContextStepper:org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStepper"/>
</appinfo>
</annotation>
</attribute>
@@ -167,10 +167,10 @@ The stepper implementation class must be specified either by the class attribute
This is an example of the extension point usage:
&lt;p&gt;
&lt;pre&gt;
-&lt;extension point=&quot;org.eclipse.tm.te.runtime.stepper.steppers&quot;&gt;
+&lt;extension point=&quot;org.eclipse.tcf.te.runtime.stepper.steppers&quot;&gt;
&lt;stepper
- id=&quot;org.eclipse.tm.te.runtime.stepper.default&quot;
- class=&quot;org.eclipse.tm.te.runtime.stepper.DefaultStepper&quot;
+ id=&quot;org.eclipse.tcf.te.runtime.stepper.default&quot;
+ class=&quot;org.eclipse.tcf.te.runtime.stepper.DefaultStepper&quot;
label=&quot;Default Stepper&quot;&gt;
&lt;/stepper&gt;
&lt;/extension&gt;
@@ -183,7 +183,7 @@ The stepper implementation class must be specified either by the class attribute
<meta.section type="apiinfo"/>
</appinfo>
<documentation>
- The provider of a stepper must implement &lt;samp&gt;org.eclipse.tm.te.runtime.stepper.interfaces.IStepper&lt;/samp&gt;.
+ The provider of a stepper must implement &lt;samp&gt;org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStepper&lt;/samp&gt;.
</documentation>
</annotation>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/schema/steps.exsd b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/schema/steps.exsd
index 5418cb79e..deafedb30 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/schema/steps.exsd
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/schema/steps.exsd
@@ -1,9 +1,9 @@
<?xml version='1.0' encoding='UTF-8'?>
<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.tm.te.runtime.stepper" xmlns="http://www.w3.org/2001/XMLSchema">
+<schema targetNamespace="org.eclipse.tcf.te.runtime.stepper" xmlns="http://www.w3.org/2001/XMLSchema">
<annotation>
<appinfo>
- <meta.schema plugin="org.eclipse.tm.te.runtime.stepper" id="steps" name="Steps"/>
+ <meta.schema plugin="org.eclipse.tcf.te.runtime.stepper" id="steps" name="Steps Extension Point"/>
</appinfo>
<documentation>
This extension point is used to contribute steps.
@@ -78,12 +78,12 @@ A step step defines a specific functionality to be executed during execution of
<attribute name="class" type="string">
<annotation>
<documentation>
- The class that implements &lt;code&gt;org.eclipse.tm.te.runtime.stepper.interfaces.IContextStep&lt;/code&gt; or extends &lt;code&gt;org.eclipse.tm.te.runtime.stepper.AbstractContextStep&lt;/code&gt;.
+ The class that implements &lt;code&gt;org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStep&lt;/code&gt; or extends &lt;code&gt;org.eclipse.tcf.te.runtime.stepper.AbstractContextStep&lt;/code&gt;.
&lt;p&gt;
The step implementation class must be specified either by the class attribute or the class child element!
</documentation>
<appinfo>
- <meta.attribute kind="java" basedOn="org.eclipse.tm.te.runtime.stepper.AbstractContextStep:org.eclipse.tm.te.runtime.stepper.interfaces.IContextStep"/>
+ <meta.attribute kind="java" basedOn="org.eclipse.tcf.te.runtime.stepper.AbstractContextStep:org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStep"/>
</appinfo>
</annotation>
</attribute>
@@ -111,12 +111,12 @@ The step implementation class must be specified either by the class attribute or
<attribute name="class" type="string">
<annotation>
<documentation>
- The class that implements &lt;code&gt;org.eclipse.tm.te.runtime.stepper.interfaces.IContextStep&lt;/code&gt; or extends &lt;code&gt;org.eclipse.tm.te.runtime.stepper.AbstractContextStep&lt;/code&gt;.
+ The class that implements &lt;code&gt;org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStep&lt;/code&gt; or extends &lt;code&gt;org.eclipse.tcf.te.runtime.stepper.AbstractContextStep&lt;/code&gt;.
&lt;p&gt;
The step implementation class must be specified either by the class attribute or the class child element!
</documentation>
<appinfo>
- <meta.attribute kind="java" basedOn="org.eclipse.tm.te.runtime.stepper.AbstractContextStep:org.eclipse.tm.te.runtime.stepper.interfaces.IContextStep"/>
+ <meta.attribute kind="java" basedOn="org.eclipse.tcf.te.runtime.stepper.AbstractContextStep:org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStep"/>
</appinfo>
</annotation>
</attribute>
@@ -160,7 +160,7 @@ The step implementation class must be specified either by the class attribute or
The unique id of the required step or step group.
</documentation>
<appinfo>
- <meta.attribute kind="identifier" basedOn="org.eclipse.tm.te.runtime.stepper.steps/step/@id"/>
+ <meta.attribute kind="identifier" basedOn="org.eclipse.tcf.te.runtime.stepper.steps/step/@id"/>
</appinfo>
</annotation>
</attribute>
@@ -184,10 +184,10 @@ The step implementation class must be specified either by the class attribute or
This is an example of the extension point usage:
&lt;p&gt;
&lt;pre&gt;
-&lt;extension point=&quot;org.eclipse.tm.te.runtime.stepper.steps&quot;&gt;
+&lt;extension point=&quot;org.eclipse.tcf.te.runtime.stepper.steps&quot;&gt;
&lt;step
- id=&quot;org.eclipse.tm.te.tcf.filesystem.copy&quot;
- class=&quot;org.eclipse.tm.te.tcf.filesystem.steps.CopyStep&quot;
+ id=&quot;org.eclipse.tcf.te.tcf.filesystem.copy&quot;
+ class=&quot;org.eclipse.tcf.te.tcf.filesystem.steps.CopyStep&quot;
label=&quot;Copy Files between Host and Target&quot;&gt;
&lt;description&gt;
Copy one or more files between the host and the target in both directions.
@@ -203,7 +203,7 @@ The step implementation class must be specified either by the class attribute or
<meta.section type="apiinfo"/>
</appinfo>
<documentation>
- The provider of a step must implement &lt;samp&gt;org.eclipse.tm.te.runtime.stepper.interfaces.IContextStep&lt;/samp&gt;.
+ The provider of a step must implement &lt;samp&gt;org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStep&lt;/samp&gt;.
</documentation>
</annotation>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/FullQualifiedId.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/FullQualifiedId.java
index a503222a6..fb7fb052c 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/FullQualifiedId.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/FullQualifiedId.java
@@ -7,13 +7,13 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.stepper;
+package org.eclipse.tcf.te.runtime.stepper;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.core.runtime.Assert;
-import org.eclipse.tm.te.runtime.stepper.interfaces.IFullQualifiedId;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.IFullQualifiedId;
/**
* Full qualified id implementation.
@@ -103,7 +103,7 @@ public class FullQualifiedId implements IFullQualifiedId {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.stepper.interfaces.IFullQualifiedId#createChildId(java.lang.String, java.lang.String, java.lang.String)
+ * @see org.eclipse.tcf.te.runtime.stepper.interfaces.IFullQualifiedId#createChildId(java.lang.String, java.lang.String, java.lang.String)
*/
@Override
public IFullQualifiedId createChildId(String type, String id, String secondaryId) {
@@ -111,7 +111,7 @@ public class FullQualifiedId implements IFullQualifiedId {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.stepper.interfaces.IFullQualifiedId#getType()
+ * @see org.eclipse.tcf.te.runtime.stepper.interfaces.IFullQualifiedId#getType()
*/
@Override
public String getType() {
@@ -119,7 +119,7 @@ public class FullQualifiedId implements IFullQualifiedId {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.stepper.interfaces.IFullQualifiedId#getId()
+ * @see org.eclipse.tcf.te.runtime.stepper.interfaces.IFullQualifiedId#getId()
*/
@Override
public String getId() {
@@ -127,7 +127,7 @@ public class FullQualifiedId implements IFullQualifiedId {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.stepper.interfaces.IFullQualifiedId#getSecondaryId()
+ * @see org.eclipse.tcf.te.runtime.stepper.interfaces.IFullQualifiedId#getSecondaryId()
*/
@Override
public String getSecondaryId() {
@@ -135,7 +135,7 @@ public class FullQualifiedId implements IFullQualifiedId {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.stepper.interfaces.IFullQualifiedId#getParentId()
+ * @see org.eclipse.tcf.te.runtime.stepper.interfaces.IFullQualifiedId#getParentId()
*/
@Override
public IFullQualifiedId getParentId() {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/StepperAttributeUtil.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/StepperAttributeUtil.java
index f565e5c83..85515ea93 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/StepperAttributeUtil.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/StepperAttributeUtil.java
@@ -7,12 +7,12 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.stepper;
+package org.eclipse.tcf.te.runtime.stepper;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer;
-import org.eclipse.tm.te.runtime.stepper.interfaces.IFullQualifiedId;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.IFullQualifiedId;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
/**
* A stepper attributes utility provides a set of static methods
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/StepperManager.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/StepperManager.java
index ba43d85a1..9789297d4 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/StepperManager.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/StepperManager.java
@@ -7,11 +7,12 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.stepper;
+package org.eclipse.tcf.te.runtime.stepper;
-import org.eclipse.tm.te.runtime.stepper.internal.extensions.StepExtensionPointManager;
-import org.eclipse.tm.te.runtime.stepper.internal.extensions.StepGroupExtensionPointManager;
-import org.eclipse.tm.te.runtime.stepper.internal.extensions.StepperExtensionPointManager;
+import org.eclipse.tcf.te.runtime.stepper.extensions.manager.StepBindingsExtensionPointManager;
+import org.eclipse.tcf.te.runtime.stepper.extensions.manager.StepExtensionPointManager;
+import org.eclipse.tcf.te.runtime.stepper.extensions.manager.StepGroupExtensionPointManager;
+import org.eclipse.tcf.te.runtime.stepper.extensions.manager.StepperExtensionPointManager;
/**
* Central manager providing access to the stepper, steps and step groups
@@ -20,6 +21,7 @@ import org.eclipse.tm.te.runtime.stepper.internal.extensions.StepperExtensionPoi
public final class StepperManager {
// References to the extension point managers
private final StepExtensionPointManager stepExtManager = new StepExtensionPointManager();
+ private final StepBindingsExtensionPointManager stepBindingsExtManager = new StepBindingsExtensionPointManager();
private final StepperExtensionPointManager stepperExtManager = new StepperExtensionPointManager();
private final StepGroupExtensionPointManager stepGroupExtManager = new StepGroupExtensionPointManager();
@@ -70,4 +72,13 @@ public final class StepperManager {
public StepGroupExtensionPointManager getStepGroupExtManager() {
return stepGroupExtManager;
}
+
+ /**
+ * Returns the step bindings extension point manager instance.
+ *
+ * @return The step bindings extension point manager instance.
+ */
+ public StepBindingsExtensionPointManager getStepBindingsExtManager() {
+ return stepBindingsExtManager;
+ }
}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/activator/CoreBundleActivator.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/activator/CoreBundleActivator.java
index 23c9b9a03..6744469e0 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/activator/CoreBundleActivator.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/activator/CoreBundleActivator.java
@@ -7,9 +7,9 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.stepper.activator;
+package org.eclipse.tcf.te.runtime.stepper.activator;
-import org.eclipse.tm.te.runtime.tracing.TraceHandler;
+import org.eclipse.tcf.te.runtime.tracing.TraceHandler;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/extensions/AbstractContextStep.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/AbstractContextStep.java
index aefb757fe..bee21a04e 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/extensions/AbstractContextStep.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/AbstractContextStep.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.stepper.extensions;
+package org.eclipse.tcf.te.runtime.stepper.extensions;
import java.util.ArrayList;
import java.util.List;
@@ -20,16 +20,16 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.MultiStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.osgi.util.NLS;
-import org.eclipse.tm.te.runtime.extensions.ExecutableExtension;
-import org.eclipse.tm.te.runtime.interfaces.callback.ICallback;
-import org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer;
-import org.eclipse.tm.te.runtime.stepper.StepperAttributeUtil;
-import org.eclipse.tm.te.runtime.stepper.activator.CoreBundleActivator;
-import org.eclipse.tm.te.runtime.stepper.interfaces.IContext;
-import org.eclipse.tm.te.runtime.stepper.interfaces.IContextStep;
-import org.eclipse.tm.te.runtime.stepper.interfaces.IExtendedContextStep;
-import org.eclipse.tm.te.runtime.stepper.interfaces.IFullQualifiedId;
-import org.eclipse.tm.te.runtime.stepper.nls.Messages;
+import org.eclipse.tcf.te.runtime.stepper.StepperAttributeUtil;
+import org.eclipse.tcf.te.runtime.stepper.activator.CoreBundleActivator;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.IContext;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStep;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.IExtendedContextStep;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.IFullQualifiedId;
+import org.eclipse.tcf.te.runtime.stepper.nls.Messages;
+import org.eclipse.tcf.te.runtime.extensions.ExecutableExtension;
+import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
/**
* An abstract step implementation.
@@ -57,7 +57,7 @@ public abstract class AbstractContextStep extends ExecutableExtension implements
public final static String SUFFIX_OPERATIONAL = "operational"; //$NON-NLS-1$
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.stepper.interfaces.IExtendedContextStep#isSingleton()
+ * @see org.eclipse.tcf.te.runtime.stepper.interfaces.IExtendedContextStep#isSingleton()
*/
@Override
public boolean isSingleton() {
@@ -65,7 +65,7 @@ public abstract class AbstractContextStep extends ExecutableExtension implements
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.extensions.ExecutableExtension#doSetInitializationData(org.eclipse.core.runtime.IConfigurationElement, java.lang.String, java.lang.Object)
+ * @see org.eclipse.tcf.te.runtime.extensions.ExecutableExtension#doSetInitializationData(org.eclipse.core.runtime.IConfigurationElement, java.lang.String, java.lang.Object)
*/
@Override
public void doSetInitializationData(IConfigurationElement config, String propertyName, Object data) throws CoreException {
@@ -90,7 +90,7 @@ public abstract class AbstractContextStep extends ExecutableExtension implements
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.stepper.interfaces.IExtendedContextStep#initializeFrom(org.eclipse.tm.te.runtime.stepper.interfaces.IContext, org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer, org.eclipse.tm.te.runtime.stepper.interfaces.IFullQualifiedId, org.eclipse.core.runtime.IProgressMonitor)
+ * @see org.eclipse.tcf.te.runtime.stepper.interfaces.IExtendedContextStep#initializeFrom(org.eclipse.tcf.te.runtime.stepper.interfaces.IContext, org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer, org.eclipse.tcf.te.runtime.stepper.interfaces.IFullQualifiedId, org.eclipse.core.runtime.IProgressMonitor)
*/
@Override
public void initializeFrom(IContext context, IPropertiesContainer data, IFullQualifiedId fullQualifiedId, IProgressMonitor monitor) {
@@ -104,7 +104,7 @@ public abstract class AbstractContextStep extends ExecutableExtension implements
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.stepper.interfaces.IExtendedContextStep#cleanup(org.eclipse.tm.te.runtime.stepper.interfaces.IContext, org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer, org.eclipse.tm.te.runtime.stepper.interfaces.IFullQualifiedId, org.eclipse.core.runtime.IProgressMonitor)
+ * @see org.eclipse.tcf.te.runtime.stepper.interfaces.IExtendedContextStep#cleanup(org.eclipse.tcf.te.runtime.stepper.interfaces.IContext, org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer, org.eclipse.tcf.te.runtime.stepper.interfaces.IFullQualifiedId, org.eclipse.core.runtime.IProgressMonitor)
*/
@Override
public void cleanup(IContext context, IPropertiesContainer data, IFullQualifiedId fullQualifiedId, IProgressMonitor monitor) {
@@ -113,7 +113,7 @@ public abstract class AbstractContextStep extends ExecutableExtension implements
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.stepper.interfaces.IExtendedContextStep#rollback(org.eclipse.tm.te.runtime.stepper.interfaces.IContext, org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer, org.eclipse.core.runtime.IStatus, org.eclipse.tm.te.runtime.stepper.interfaces.IFullQualifiedId, org.eclipse.core.runtime.IProgressMonitor, org.eclipse.tm.te.runtime.interfaces.callback.ICallback)
+ * @see org.eclipse.tcf.te.runtime.stepper.interfaces.IExtendedContextStep#rollback(org.eclipse.tcf.te.runtime.stepper.interfaces.IContext, org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer, org.eclipse.core.runtime.IStatus, org.eclipse.tcf.te.runtime.stepper.interfaces.IFullQualifiedId, org.eclipse.core.runtime.IProgressMonitor, org.eclipse.tcf.te.runtime.interfaces.callback.ICallback)
*/
@Override
public void rollback(IContext context, IPropertiesContainer data, IStatus status, IFullQualifiedId fullQualifiedId, IProgressMonitor monitor, ICallback callback) {
@@ -121,7 +121,7 @@ public abstract class AbstractContextStep extends ExecutableExtension implements
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.stepper.interfaces.IContextStep#getTotalWork(org.eclipse.tm.te.runtime.stepper.interfaces.IContext, org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer)
+ * @see org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStep#getTotalWork(org.eclipse.tcf.te.runtime.stepper.interfaces.IContext, org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer)
*/
@Override
public int getTotalWork(IContext context, IPropertiesContainer data) {
@@ -129,7 +129,7 @@ public abstract class AbstractContextStep extends ExecutableExtension implements
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.stepper.interfaces.IContextStep#getDependencies()
+ * @see org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStep#getDependencies()
*/
@Override
public String[] getDependencies() {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/extensions/AbstractContextStepExecutor.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/AbstractContextStepExecutor.java
index c801f0390..1c02471dd 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/extensions/AbstractContextStepExecutor.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/AbstractContextStepExecutor.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.stepper.extensions;
+package org.eclipse.tcf.te.runtime.stepper.extensions;
import java.util.Date;
@@ -17,19 +17,19 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.core.runtime.Status;
-import org.eclipse.tm.te.runtime.callback.Callback;
-import org.eclipse.tm.te.runtime.concurrent.util.ExecutorsUtil;
-import org.eclipse.tm.te.runtime.interfaces.ISharedConstants;
-import org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer;
-import org.eclipse.tm.te.runtime.stepper.activator.CoreBundleActivator;
-import org.eclipse.tm.te.runtime.stepper.interfaces.IContext;
-import org.eclipse.tm.te.runtime.stepper.interfaces.IContextStep;
-import org.eclipse.tm.te.runtime.stepper.interfaces.IContextStepExecutor;
-import org.eclipse.tm.te.runtime.stepper.interfaces.IExtendedContextStep;
-import org.eclipse.tm.te.runtime.stepper.interfaces.IFullQualifiedId;
-import org.eclipse.tm.te.runtime.stepper.interfaces.tracing.ITraceIds;
-import org.eclipse.tm.te.runtime.utils.ProgressHelper;
-import org.eclipse.tm.te.runtime.utils.StatusHelper;
+import org.eclipse.tcf.te.runtime.stepper.activator.CoreBundleActivator;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.IContext;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStep;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStepExecutor;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.IExtendedContextStep;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.IFullQualifiedId;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.tracing.ITraceIds;
+import org.eclipse.tcf.te.runtime.callback.Callback;
+import org.eclipse.tcf.te.runtime.concurrent.util.ExecutorsUtil;
+import org.eclipse.tcf.te.runtime.interfaces.ISharedConstants;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.runtime.utils.ProgressHelper;
+import org.eclipse.tcf.te.runtime.utils.StatusHelper;
/**
* Step executor implementation.
@@ -42,22 +42,22 @@ import org.eclipse.tm.te.runtime.utils.StatusHelper;
* instance for handling.
* <p>
* If the step to execute is of type {@link IExtendedContextStep}, the step executor is calling
- * {@link IExtendedContextStep#initializeFrom(org.eclipse.tm.te.runtime.stepper.interfaces.IContext, Object, org.eclipse.tm.te.runtime.stepper.interfaces.IFullQualifiedId, IProgressMonitor)} and
- * {@link IExtendedContextStep#validateExecute(org.eclipse.tm.te.runtime.stepper.interfaces.IContext, Object, org.eclipse.tm.te.runtime.stepper.interfaces.IFullQualifiedId, IProgressMonitor)} before calling
- * {@link IContextStep#execute(org.eclipse.tm.te.runtime.stepper.interfaces.IContext, Object, org.eclipse.tm.te.runtime.stepper.interfaces.IFullQualifiedId, IProgressMonitor, org.eclipse.tm.te.runtime.interfaces.callback.ICallback)}.
+ * {@link IExtendedContextStep#initializeFrom(org.eclipse.tcf.te.runtime.stepper.interfaces.IContext, Object, org.eclipse.tcf.te.runtime.stepper.interfaces.IFullQualifiedId, IProgressMonitor)} and
+ * {@link IExtendedContextStep#validateExecute(org.eclipse.tcf.te.runtime.stepper.interfaces.IContext, Object, org.eclipse.tcf.te.runtime.stepper.interfaces.IFullQualifiedId, IProgressMonitor)} before calling
+ * {@link IContextStep#execute(org.eclipse.tcf.te.runtime.stepper.interfaces.IContext, Object, org.eclipse.tcf.te.runtime.stepper.interfaces.IFullQualifiedId, IProgressMonitor, org.eclipse.tcf.te.runtime.interfaces.callback.ICallback)}.
* <p>
* The methods will be called within the current step executor thread.
* <p>
* The stepper implementation can be traced and profiled by setting the debug options:
* <ul>
- * <li><i>org.eclipse.tm.te.runtime.stepper/trace/stepping</i></li>
- * <li><i>org.eclipse.tm.te.runtime.stepper/profile/stepping</i></li>
+ * <li><i>org.eclipse.tcf.te.runtime.stepper/trace/stepping</i></li>
+ * <li><i>org.eclipse.tcf.te.runtime.stepper/profile/stepping</i></li>
* </ul>
*/
public abstract class AbstractContextStepExecutor implements IContextStepExecutor {
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.stepper.interfaces.IContextStepExecutor#execute(org.eclipse.tm.te.runtime.stepper.interfaces.IContextStep, org.eclipse.tm.te.runtime.stepper.interfaces.IFullQualifiedId, org.eclipse.tm.te.runtime.stepper.interfaces.IContext, org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer, org.eclipse.core.runtime.IProgressMonitor)
+ * @see org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStepExecutor#execute(org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStep, org.eclipse.tcf.te.runtime.stepper.interfaces.IFullQualifiedId, org.eclipse.tcf.te.runtime.stepper.interfaces.IContext, org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer, org.eclipse.core.runtime.IProgressMonitor)
*/
@Override
public final void execute(IContextStep step, IFullQualifiedId id, final IContext context, final IPropertiesContainer data, IProgressMonitor progress) throws CoreException {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/extensions/AbstractContextStepGroup.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/AbstractContextStepGroup.java
index d8ab17b3a..04ca6c7be 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/extensions/AbstractContextStepGroup.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/AbstractContextStepGroup.java
@@ -7,15 +7,15 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.stepper.extensions;
+package org.eclipse.tcf.te.runtime.stepper.extensions;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.tm.te.runtime.extensions.ExecutableExtension;
-import org.eclipse.tm.te.runtime.extensions.ExecutableExtensionProxy;
-import org.eclipse.tm.te.runtime.stepper.interfaces.IContextStepGroup;
-import org.eclipse.tm.te.runtime.stepper.interfaces.IContextStepGroupIterator;
-import org.eclipse.tm.te.runtime.stepper.interfaces.IContextStepGroupable;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStepGroup;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStepGroupIterator;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStepGroupable;
+import org.eclipse.tcf.te.runtime.extensions.ExecutableExtension;
+import org.eclipse.tcf.te.runtime.extensions.ExecutableExtensionProxy;
/**
* Abstract context step group implementation.
@@ -37,7 +37,7 @@ public abstract class AbstractContextStepGroup extends ExecutableExtension imple
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.stepper.interfaces.IContextStepGroup#isLocked()
+ * @see org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStepGroup#isLocked()
*/
@Override
public boolean isLocked() {
@@ -45,7 +45,7 @@ public abstract class AbstractContextStepGroup extends ExecutableExtension imple
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.extensions.ExecutableExtension#doSetInitializationData(org.eclipse.core.runtime.IConfigurationElement, java.lang.String, java.lang.Object)
+ * @see org.eclipse.tcf.te.runtime.extensions.ExecutableExtension#doSetInitializationData(org.eclipse.core.runtime.IConfigurationElement, java.lang.String, java.lang.Object)
*/
@Override
public void doSetInitializationData(IConfigurationElement config, String propertyName, Object data) throws CoreException {
@@ -62,7 +62,7 @@ public abstract class AbstractContextStepGroup extends ExecutableExtension imple
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.stepper.interfaces.IContextStepGroup#getStepGroupIterator()
+ * @see org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStepGroup#getStepGroupIterator()
*/
@Override
public IContextStepGroupIterator getStepGroupIterator() {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/extensions/AbstractContextStepper.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/AbstractContextStepper.java
index 83d8084df..48bea514b 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/extensions/AbstractContextStepper.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/AbstractContextStepper.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.stepper.extensions;
+package org.eclipse.tcf.te.runtime.stepper.extensions;
import java.text.MessageFormat;
import java.util.ArrayList;
@@ -23,33 +23,32 @@ import org.eclipse.core.runtime.MultiStatus;
import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.core.runtime.Status;
import org.eclipse.osgi.util.NLS;
-import org.eclipse.tm.te.runtime.callback.Callback;
-import org.eclipse.tm.te.runtime.concurrent.util.ExecutorsUtil;
-import org.eclipse.tm.te.runtime.extensions.ExecutableExtension;
-import org.eclipse.tm.te.runtime.interfaces.ISharedConstants;
-import org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer;
-import org.eclipse.tm.te.runtime.stepper.StepperAttributeUtil;
-import org.eclipse.tm.te.runtime.stepper.activator.CoreBundleActivator;
-import org.eclipse.tm.te.runtime.stepper.interfaces.IContext;
-import org.eclipse.tm.te.runtime.stepper.interfaces.IContextManipulator;
-import org.eclipse.tm.te.runtime.stepper.interfaces.IContextStep;
-import org.eclipse.tm.te.runtime.stepper.interfaces.IContextStepExecutor;
-import org.eclipse.tm.te.runtime.stepper.interfaces.IContextStepGroup;
-import org.eclipse.tm.te.runtime.stepper.interfaces.IContextStepGroupIterator;
-import org.eclipse.tm.te.runtime.stepper.interfaces.IContextStepGroupable;
-import org.eclipse.tm.te.runtime.stepper.interfaces.IExtendedContextStep;
-import org.eclipse.tm.te.runtime.stepper.interfaces.IFullQualifiedId;
-import org.eclipse.tm.te.runtime.stepper.interfaces.IStepper;
-import org.eclipse.tm.te.runtime.stepper.interfaces.IVariantDelegate;
-import org.eclipse.tm.te.runtime.stepper.interfaces.tracing.ITraceIds;
-import org.eclipse.tm.te.runtime.stepper.nls.Messages;
-import org.eclipse.tm.te.runtime.utils.ProgressHelper;
-import org.eclipse.tm.te.runtime.utils.StatusHelper;
+import org.eclipse.tcf.te.runtime.callback.Callback;
+import org.eclipse.tcf.te.runtime.concurrent.util.ExecutorsUtil;
+import org.eclipse.tcf.te.runtime.extensions.ExecutableExtension;
+import org.eclipse.tcf.te.runtime.interfaces.ISharedConstants;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.runtime.stepper.StepperAttributeUtil;
+import org.eclipse.tcf.te.runtime.stepper.activator.CoreBundleActivator;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.IContext;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.IContextManipulator;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStep;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStepExecutor;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStepGroup;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStepGroupIterator;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStepGroupable;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStepper;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.IExtendedContextStep;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.IFullQualifiedId;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.tracing.ITraceIds;
+import org.eclipse.tcf.te.runtime.stepper.nls.Messages;
+import org.eclipse.tcf.te.runtime.utils.ProgressHelper;
+import org.eclipse.tcf.te.runtime.utils.StatusHelper;
/**
* An abstract stepper implementation.
*/
-public abstract class AbstractContextStepper extends ExecutableExtension implements IStepper, IContextManipulator {
+public abstract class AbstractContextStepper extends ExecutableExtension implements IContextStepper, IContextManipulator {
private boolean initialized = false;
private boolean finished = false;
@@ -60,7 +59,10 @@ public abstract class AbstractContextStepper extends ExecutableExtension impleme
private IContext activeContext = null;
private boolean cancelable = true;
- protected class ExecutedContextStep {
+ /**
+ * Internal helper describing a fully executed step.
+ */
+ protected final class ExecutedContextStep {
final IFullQualifiedId id;
final IContextStep step;
@@ -78,45 +80,50 @@ public abstract class AbstractContextStepper extends ExecutableExtension impleme
}
/**
- * Returns the name of what is executed by the stepper.
+ * Returns a name to describe what is executed by the stepper.
+ *
+ * @return A name.
*/
protected abstract String getName();
/**
- * Returns the type if what is executed by the stepper.
- */
- protected abstract String getType();
-
- /**
- * Returns the sub type if what is executed by the stepper.
- */
- protected abstract String getSubType();
-
- /**
- * Returns the contexts the stepper is working with.
+ * Returns the contexts the stepper is associated with.
+ *
+ * @return An array of context objects or an empty list.
*/
protected abstract IContext[] getContexts();
/**
- * Returns the variant delegate to use or <code>null</code>.
+ * Creates a new instance of the step executor to use for executing a step.
+ *
+ * @param step The step. Must not be <code>null</code>.
+ * @param secondaryId The secondary id or <code>null</code>.
+ * @param fullQualifiedStepId The fully qualified step id. Must not be <code>null</code>.
+ *
+ * @return The step executor instance.
*/
- protected abstract IVariantDelegate getVariantDelegate() throws CoreException;
+ protected abstract IContextStepExecutor doCreateStepExecutor(IContextStep step, String secondaryId, IFullQualifiedId fullQualifiedStepId);
/**
- * Creates a new instance of the step executor to use for executing a step.
+ * Returns the id of the step group to execute by the stepper.
+ *
+ * @return The step group id.
*/
- protected abstract IContextStepExecutor doCreateStepExecutor(IContextStep step, String secondaryId, IFullQualifiedId fullQualifiedStepId);
+ protected abstract String getStepGroupId();
/**
- * Returns the step group for the given arguments.
+ * Returns the step group for the given step group id.
+ *
+ * @param The step group id. Must not be <code>null</code>:
+ * @return The step group or <code>null</code>.
*/
- protected abstract IContextStepGroup getStepGroup(String type, String subType, String variant);
+ protected abstract IContextStepGroup getStepGroup(String id);
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.stepper.interfaces.IStepper#initialize(org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer, org.eclipse.tm.te.runtime.stepper.interfaces.IFullQualifiedId, org.eclipse.core.runtime.IProgressMonitor)
+ * @see org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStepper#initialize(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer, org.eclipse.tcf.te.runtime.stepper.interfaces.IFullQualifiedId, org.eclipse.core.runtime.IProgressMonitor)
*/
@Override
- public void initialize(IPropertiesContainer data, IFullQualifiedId fullQualifiedId, IProgressMonitor monitor) throws IllegalStateException {
+ public final void initialize(IPropertiesContainer data, IFullQualifiedId fullQualifiedId, IProgressMonitor monitor) throws IllegalStateException {
Assert.isNotNull(data);
Assert.isNotNull(fullQualifiedId);
Assert.isNotNull(monitor);
@@ -138,15 +145,30 @@ public abstract class AbstractContextStepper extends ExecutableExtension impleme
this.activeContext = null;
this.activeContextId = null;
+ // call the hook for the subclasses to initialize themselves
+ onInitialize(data, fullQualifiedId, monitor);
+
setInitialized();
CoreBundleActivator.getTraceHandler().trace("AbstractContextStepper#initialize:" //$NON-NLS-1$
- + " type='" + getType() + "'" //$NON-NLS-1$ //$NON-NLS-2$
- + ", mode='" + getSubType() + "'", //$NON-NLS-1$ //$NON-NLS-2$
+ + " data = " + data, //$NON-NLS-1$
0, ITraceIds.TRACE_STEPPING, IStatus.WARNING, this);
}
/**
+ * Hook for subclasses to overwrite if subclasses wants to initialize their own state.
+ *
+ * @param data The data. Must not be <code>null</code>.
+ * @param fullQualifiedId The full qualified id of this stepper.
+ * @param monitor The progress monitor. Must not be <code>null</code>.
+ */
+ protected void onInitialize(IPropertiesContainer data, IFullQualifiedId fullQualifiedId, IProgressMonitor monitor) {
+ Assert.isNotNull(data);
+ Assert.isNotNull(fullQualifiedId);
+ Assert.isNotNull(monitor);
+ }
+
+ /**
* Marks the stepper to be fully initialized.
*/
protected final void setInitialized() {
@@ -154,7 +176,7 @@ public abstract class AbstractContextStepper extends ExecutableExtension impleme
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.stepper.interfaces.IStepper#isInitialized()
+ * @see org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStepper#isInitialized()
*/
@Override
public final boolean isInitialized() {
@@ -254,8 +276,8 @@ public abstract class AbstractContextStepper extends ExecutableExtension impleme
}
/**
- * Returns the currently associated data. The method returns
- * <code>null</code> if the stepper is not in initialized state.
+ * Returns the currently associated data. The method returns <code>null</code> if the stepper is
+ * not in initialized state.
*
* @return The data or <code>null</code>
*/
@@ -293,7 +315,7 @@ public abstract class AbstractContextStepper extends ExecutableExtension impleme
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.stepper.interfaces.IStepper#isFinished()
+ * @see org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStepper#isFinished()
*/
@Override
public final boolean isFinished() {
@@ -301,7 +323,7 @@ public abstract class AbstractContextStepper extends ExecutableExtension impleme
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.stepper.interfaces.IStepper#cleanup()
+ * @see org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStepper#cleanup()
*/
@Override
public void cleanup() {
@@ -333,7 +355,7 @@ public abstract class AbstractContextStepper extends ExecutableExtension impleme
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.stepper.interfaces.IStepper#execute()
+ * @see org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStepper#execute()
*/
@Override
public final void execute() throws CoreException {
@@ -406,32 +428,22 @@ public abstract class AbstractContextStepper extends ExecutableExtension impleme
protected void internalExecute(List<IStatus> statusContainer) throws CoreException {
Assert.isNotNull(statusContainer);
- // Get the variant delegate
- IVariantDelegate variantDelegate = getVariantDelegate();
- String[] variants = null;
- if (variantDelegate != null) {
- // Determine the valid variants
- variants = variantDelegate.getValidVariants(getActiveContext(), getData());
+ // Get the step group id
+ String stepGroupId = getStepGroupId();
+
+ // If no step group id is available, throw an exception
+ if (stepGroupId == null) {
+ throw new CoreException(new Status(IStatus.ERROR, CoreBundleActivator.getUniqueIdentifier(),
+ NLS.bind(Messages.AbstractContextStepper_error_missingStepGroupId, getName())));
}
// Get the step group
- IContextStepGroup stepGroup = null;
- if (variants != null) {
- for (String variant : variants) {
- stepGroup = getStepGroup(getType(), getSubType(), variant);
- if (stepGroup != null) {
- break;
- }
- }
- }
- if (stepGroup == null) {
- stepGroup = getStepGroup(getType(), getSubType(), null);
- }
+ IContextStepGroup stepGroup = getStepGroup(stepGroupId);
// If no step group could be found for any of the valid variants, throw an exception
if (stepGroup == null) {
throw new CoreException(new Status(IStatus.ERROR, CoreBundleActivator.getUniqueIdentifier(),
- NLS.bind(Messages.AbstractContextStepper_error_missingStepGroup, getName())));
+ NLS.bind(Messages.AbstractContextStepper_error_missingStepGroup, stepGroupId)));
}
// Initialize the progress monitor
@@ -465,9 +477,12 @@ public abstract class AbstractContextStepper extends ExecutableExtension impleme
throw new CoreException(StatusHelper.getStatus(new OperationCanceledException()));
}
- CoreBundleActivator.getTraceHandler().trace("AbstractContextStepper#execute: step group: '" + stepGroup.getLabel() + "'", //$NON-NLS-1$ //$NON-NLS-2$
+ CoreBundleActivator.getTraceHandler().trace("AbstractContextStepper#executeStepGroup: step group: '" + stepGroup.getLabel() + "'", //$NON-NLS-1$ //$NON-NLS-2$
0, ITraceIds.TRACE_STEPPING, IStatus.WARNING, this);
+ // Resolve the steps to execute
+ IContextStepGroupable[] groupables = stepGroup.getSteps(getContexts());
+
IContextStepGroupIterator iterator = stepGroup.getStepGroupIterator();
IFullQualifiedId fullQualifiedIterationId = fullQualifiedGroupId;
int iteration = 0;
@@ -496,8 +511,7 @@ public abstract class AbstractContextStepper extends ExecutableExtension impleme
}
}
}
- // Get the list of steps or step groups to execute.
- IContextStepGroupable[] groupables = stepGroup.getSteps(getType(), getSubType());
+ // Execute the steps or step groups.
for (IContextStepGroupable groupable : groupables) {
executeGroupable(groupable, statusContainer, executedSteps, fullQualifiedIterationId);
}
@@ -636,8 +650,8 @@ public abstract class AbstractContextStepper extends ExecutableExtension impleme
MessageFormat.format(Messages.AbstractContextStepper_error_requiredStepNotExecuted,
NLS.bind((groupable.getExtension() instanceof IContextStep
? Messages.AbstractContextStepper_error_step
- : Messages.AbstractContextStepper_error_requiredStepOrGroup), dependency),
- NLS.bind(Messages.AbstractContextStepper_error_typeAndSubtype, getType(), getSubType()))));
+ : Messages.AbstractContextStepper_error_requiredStepOrGroup), dependency)
+ )));
}
// Recursive checking is not necessary here as the step or step group
@@ -702,7 +716,7 @@ public abstract class AbstractContextStepper extends ExecutableExtension impleme
int totalWork = 0;
// Loop the group steps and summarize the returned total work
- IContextStepGroupable[] groupables = stepGroup.getSteps(getType(), getSubType());
+ IContextStepGroupable[] groupables = stepGroup.getSteps(getContexts());
for (IContextStepGroupable groupable : groupables) {
int work = groupable.getExtension() instanceof IContextStep
? ((IContextStep)groupable.getExtension()).getTotalWork(getActiveContext(), getData())
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/ContextStepExecutor.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/ContextStepExecutor.java
new file mode 100644
index 000000000..df5ee8b40
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/ContextStepExecutor.java
@@ -0,0 +1,122 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.runtime.stepper.extensions;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.IContext;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStep;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.IFullQualifiedId;
+import org.eclipse.tcf.te.runtime.stepper.nls.Messages;
+
+/**
+ * Context step executor implementation.
+ * <p>
+ * The step executor is responsible for initiating the execution of a single step. The executor
+ * creates and associated the step callback and blocks the execution till the executed step invoked
+ * the callback.
+ * <p>
+ * The step executor is passing any status thrown by the executed step to the parent stepper
+ * instance for handling.
+ * <p>
+ * If the step to execute is of type {@link AbstractContextStep}, the step executor is calling
+ * {@link AbstractContextStep#initializeFrom(IContext, IPropertiesContainer, IFullQualifiedId, IProgressMonitor)}
+ * and
+ * {@link AbstractContextStep#validateExecute(IContext, IPropertiesContainer, IFullQualifiedId, IProgressMonitor)}
+ * before calling
+ * {@link IContextStep#execute(IContext, IPropertiesContainer, IFullQualifiedId, IProgressMonitor, ICallback)}.
+ * <p>
+ * The methods will be called within the current step executor thread.
+ * <p>
+ * The stepper implementation can be traced and profiled by setting the debug options:
+ * <ul>
+ * <li><i>org.eclipse.tcf.te.runtime.stepper/trace/stepping</i></li>
+ * <li><i>org.eclipse.tcf.te.runtime.stepper/profile/stepping</i></li>
+ * </ul>
+ */
+public class ContextStepExecutor extends AbstractContextStepExecutor {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.stepper.extensions.AbstractContextStepExecutor#formatMessage(java.lang.String, int, org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStep, org.eclipse.tcf.te.runtime.stepper.interfaces.IFullQualifiedId, org.eclipse.tcf.te.runtime.stepper.interfaces.IContext, org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer)
+ */
+ @Override
+ protected String formatMessage(String message, int severity, IContextStep step, IFullQualifiedId id, IContext context, IPropertiesContainer data) {
+ String template = null;
+
+ switch (severity) {
+ case IStatus.INFO:
+ template = Messages.ContextStepExecutor_info_stepFailed;
+ break;
+ case IStatus.WARNING:
+ template = Messages.ContextStepExecutor_warning_stepFailed;
+ break;
+ case IStatus.ERROR:
+ template = Messages.ContextStepExecutor_error_stepFailed;
+ break;
+ }
+
+ // If we cannot determine the formatted message template, just return the message as is
+ if (template == null) {
+ return message;
+ }
+
+ // Check the message for additions
+ message = checkMessage(message);
+
+ // Split the message. The first sentence is shown more prominent on the top,
+ // the rest as additional information below the step information.
+ String[] splittedMsg = message != null ? message.split("[\t\n\r\f]+", 2) : new String[] { null, null }; //$NON-NLS-1$
+
+ // Format the core message
+ String formattedMessage = NLS.bind(template,
+ new String[] { splittedMsg[0],
+ context.getContextName(),
+ context.getContextInfo(),
+ (step.getLabel() != null && step.getLabel().trim().length() > 0 ? step.getLabel() : step.getId())
+ });
+
+ // If we have more information available, append them
+ if (splittedMsg.length > 1 && splittedMsg[1] != null && !"".equals(splittedMsg[1])) { //$NON-NLS-1$
+ formattedMessage += "\n\n" + splittedMsg[1]; //$NON-NLS-1$
+ }
+
+ // In debug mode, there is even more information to add
+ if (Platform.inDebugMode()) {
+ formattedMessage += "\n\n" + NLS.bind(Messages.ContextStepExecutor_stepFailed_debugInfo, id.toString()); //$NON-NLS-1$
+ }
+
+ return formattedMessage;
+ }
+
+ /* (non-Javadoc)
+ * @see com.windriver.ide.target.core.stepper.AbstractTargetContextStepExecutor#isExceptionMessageFormatted(java.lang.String)
+ */
+ @Override
+ protected boolean isExceptionMessageFormatted(String message) {
+ assert message != null;
+ return message.startsWith(Messages.ContextStepExecutor_checkPoint_normalizationNeeded);
+ }
+
+ /**
+ * Check for additions to add to the message.
+ * <p>
+ * <i>Reserved for future use. Currently returns the message unmodified.</i>
+ *
+ * @param message The message or <code>null</code>.
+ * @return The checked message.
+ */
+ protected String checkMessage(String message) {
+ return message;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/extensions/ContextStepGroup.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/ContextStepGroup.java
index 626301c7d..f61d8d0db 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/extensions/ContextStepGroup.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/ContextStepGroup.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.stepper.extensions;
+package org.eclipse.tcf.te.runtime.stepper.extensions;
import java.text.MessageFormat;
import java.util.ArrayList;
@@ -22,15 +22,16 @@ import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.osgi.util.NLS;
-import org.eclipse.tm.te.runtime.interfaces.extensions.IExecutableExtension;
-import org.eclipse.tm.te.runtime.stepper.StepperManager;
-import org.eclipse.tm.te.runtime.stepper.activator.CoreBundleActivator;
-import org.eclipse.tm.te.runtime.stepper.interfaces.IContextStep;
-import org.eclipse.tm.te.runtime.stepper.interfaces.IContextStepGroup;
-import org.eclipse.tm.te.runtime.stepper.interfaces.IContextStepGroupable;
-import org.eclipse.tm.te.runtime.stepper.interfaces.IExtendedContextStep;
-import org.eclipse.tm.te.runtime.stepper.interfaces.tracing.ITraceIds;
-import org.eclipse.tm.te.runtime.stepper.nls.Messages;
+import org.eclipse.tcf.te.runtime.interfaces.extensions.IExecutableExtension;
+import org.eclipse.tcf.te.runtime.stepper.StepperManager;
+import org.eclipse.tcf.te.runtime.stepper.activator.CoreBundleActivator;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.IContext;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStep;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStepGroup;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStepGroupable;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.IExtendedContextStep;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.tracing.ITraceIds;
+import org.eclipse.tcf.te.runtime.stepper.nls.Messages;
/**
* A default step group implementation.
@@ -57,6 +58,7 @@ public class ContextStepGroup extends AbstractContextStepGroup {
private boolean singleton;
private final List<String> dependencies = new ArrayList<String>();
+
/**
* Returns the id of the referenced step or step group.
*
@@ -293,7 +295,7 @@ public class ContextStepGroup extends AbstractContextStepGroup {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.stepper.AbstractContextStepGroup#isLocked()
+ * @see org.eclipse.tcf.te.runtime.stepper.AbstractContextStepGroup#isLocked()
*/
@Override
public boolean isLocked() {
@@ -318,19 +320,18 @@ public class ContextStepGroup extends AbstractContextStepGroup {
}
/**
- * Check for duplicates of the referenced step or step group. The check
- * will fail if multiple occurrence of a step or step group are found and
- * the step or step group is supposed to be a singleton.
+ * Check for duplicates of the referenced step or step group. The check will fail if multiple
+ * occurrence of a step or step group are found and the step or step group is supposed to be a
+ * singleton.
*
* @param steps The list of steps. Must not be <code>null</code>.
* @param reference The reference. Must not be <code>null</code>.
- * @param type The type id. Must not be <code>null</code>.
- * @param mode The sub type id. Must not be <code>null</code>.
*
* @throws CoreException If multiple occurrences of singleton references are found.
*/
- protected void checkForDuplicates(List<IContextStepGroupable> steps, ReferenceSubElement reference, String type, String mode) throws CoreException {
- assert steps != null && reference != null;
+ protected void checkForDuplicates(List<IContextStepGroupable> steps, ReferenceSubElement reference) throws CoreException {
+ Assert.isNotNull(steps);
+ Assert.isNotNull(reference);
// If the reference overwrites another reference, it is not a duplicate
String overwrite = reference.getOverwrite();
@@ -359,8 +360,7 @@ public class ContextStepGroup extends AbstractContextStepGroup {
CoreBundleActivator.getUniqueIdentifier(),
MessageFormat.format(Messages.ContextStepGroup_error_multipleSingletonOccurrences,
NLS.bind(Messages.ContextStepGroup_error_stepGroup, getLabel()),
- NLS.bind(Messages.ContextStepGroup_error_referencedStepOrGroup, reference.getId()),
- NLS.bind(Messages.ContextStepGroup_error_typeAndMode, type, mode))
+ NLS.bind(Messages.ContextStepGroup_error_referencedStepOrGroup, reference.getId()))
));
}
}
@@ -376,7 +376,10 @@ public class ContextStepGroup extends AbstractContextStepGroup {
* @return The list of affected groupable's or an empty list.
*/
protected List<IContextStepGroupable> onOverwrite(List<IContextStepGroupable> steps, String oldId, IExecutableExtension replacement, ReferenceSubElement reference) {
- assert steps != null && oldId != null && replacement != null && reference != null;
+ Assert.isNotNull(steps);
+ Assert.isNotNull(oldId);
+ Assert.isNotNull(replacement);
+ Assert.isNotNull(reference);
List<IContextStepGroupable> affected = new ArrayList<IContextStepGroupable>();
@@ -434,7 +437,10 @@ public class ContextStepGroup extends AbstractContextStepGroup {
* @return The list of affected groupable's or an empty list.
*/
protected List<IContextStepGroupable> onInsertBefore(List<IContextStepGroupable> steps, String id, IExecutableExtension newStep, ReferenceSubElement reference) {
- assert steps != null && id != null && newStep != null && reference != null;
+ Assert.isNotNull(steps);
+ Assert.isNotNull(id);
+ Assert.isNotNull(newStep);
+ Assert.isNotNull(reference);
List<IContextStepGroupable> affected = new ArrayList<IContextStepGroupable>();
@@ -492,7 +498,10 @@ public class ContextStepGroup extends AbstractContextStepGroup {
* @return The list of affected groupable's or an empty list.
*/
protected List<IContextStepGroupable> onInsertAfter(List<IContextStepGroupable> steps, String id, IExecutableExtension newStep, ReferenceSubElement reference) {
- assert steps != null && id != null && newStep != null && reference != null;
+ Assert.isNotNull(steps);
+ Assert.isNotNull(id);
+ Assert.isNotNull(newStep);
+ Assert.isNotNull(reference);
List<IContextStepGroupable> affected = new ArrayList<IContextStepGroupable>();
@@ -536,11 +545,11 @@ public class ContextStepGroup extends AbstractContextStepGroup {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.stepper.interfaces.IContextStepGroup#getSteps(java.lang.String, java.lang.String)
+ * @see org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStepGroup#getSteps(org.eclipse.tcf.te.runtime.stepper.interfaces.IContext[])
*/
@Override
- public IContextStepGroupable[] getSteps(String type, String mode) throws CoreException {
- assert type != null && mode != null;
+ public IContextStepGroupable[] getSteps(IContext[] contexts) throws CoreException {
+ Assert.isNotNull(contexts);
// The list of resolved steps for the specified type and mode
List<IContextStepGroupable> steps = new ArrayList<IContextStepGroupable>();
@@ -556,13 +565,12 @@ public class ContextStepGroup extends AbstractContextStepGroup {
CoreBundleActivator.getUniqueIdentifier(),
MessageFormat.format(Messages.ContextStepGroup_error_missingBaseStepGroup,
NLS.bind(Messages.ContextStepGroup_error_stepGroup, getLabel()),
- NLS.bind(Messages.ContextStepGroup_error_referencedBaseGroup, getBaseOn()),
- NLS.bind(Messages.ContextStepGroup_error_typeAndMode, type, mode))
+ NLS.bind(Messages.ContextStepGroup_error_referencedBaseGroup, getBaseOn()))
));
}
// Add all the steps from the base step group now to the list
- steps.addAll(Arrays.asList(baseStepGroup.getSteps(type, mode)));
+ steps.addAll(Arrays.asList(baseStepGroup.getSteps(contexts)));
}
// Now process the references and modify the steps list accordingly
@@ -579,31 +587,29 @@ public class ContextStepGroup extends AbstractContextStepGroup {
CoreBundleActivator.getUniqueIdentifier(),
MessageFormat.format(Messages.ContextStepGroup_error_missingReferencedStep,
NLS.bind(Messages.ContextStepGroup_error_stepGroup, getLabel()),
- NLS.bind(Messages.ContextStepGroup_error_referencedStepOrGroup, reference.getId()),
- NLS.bind(Messages.ContextStepGroup_error_typeAndMode, type, mode))
+ NLS.bind(Messages.ContextStepGroup_error_referencedStepOrGroup, reference.getId()))
));
}
- // Check if the step is valid for the current launch configuration type and mode.
+ // Check if the step is valid for the current contexts.
if (candidate instanceof IContextStep) {
- boolean valid = isValidStep(candidate.getId(), type, mode);
+ boolean valid = isValidStep(candidate.getId(), contexts);
if (!valid) {
CoreBundleActivator.getTraceHandler().trace(
"StepGroup#getSteps: SKIPPED step = '" + candidate.getLabel() + "'." //$NON-NLS-1$ //$NON-NLS-2$
- + " Not valid for type id '" + type + "'" //$NON-NLS-1$ //$NON-NLS-2$
- + " and mode '" + mode + "'", //$NON-NLS-1$ //$NON-NLS-2$
+ + " Not valid for contexts '" + Arrays.deepToString(contexts), //$NON-NLS-1$
0, ITraceIds.TRACE_STEPPING, IStatus.WARNING, this);
continue;
}
}
// Check for duplicates of singleton references.
- checkForDuplicates(steps, reference, type, mode);
+ checkForDuplicates(steps, reference);
// Check for the steps own dependencies to be valid for the current type id and mode
if (candidate instanceof IContextStep) {
- checkForDependenciesValid((IContextStep) candidate, type, mode);
+ checkForDependenciesValid((IContextStep) candidate, contexts);
}
// Will contain the list of affected groupables from the whole list
@@ -662,7 +668,7 @@ public class ContextStepGroup extends AbstractContextStepGroup {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.extensions.ExecutableExtension#setInitializationData(org.eclipse.core.runtime.IConfigurationElement, java.lang.String, java.lang.Object)
+ * @see org.eclipse.tcf.te.runtime.extensions.ExecutableExtension#setInitializationData(org.eclipse.core.runtime.IConfigurationElement, java.lang.String, java.lang.Object)
*/
@Override
public void setInitializationData(IConfigurationElement config, String propertyName, Object data) throws CoreException {
@@ -671,7 +677,7 @@ public class ContextStepGroup extends AbstractContextStepGroup {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.stepper.extensions.AbstractContextStepGroup#doSetInitializationData(org.eclipse.core.runtime.IConfigurationElement, java.lang.String, java.lang.Object)
+ * @see org.eclipse.tcf.te.runtime.stepper.extensions.AbstractContextStepGroup#doSetInitializationData(org.eclipse.core.runtime.IConfigurationElement, java.lang.String, java.lang.Object)
*/
@Override
public void doSetInitializationData(IConfigurationElement config, String propertyName, Object data) throws CoreException {
@@ -726,13 +732,13 @@ public class ContextStepGroup extends AbstractContextStepGroup {
* and valid for the given type id and mode.
*
* @param step The step. Must not be <code>null</code>.
- * @param type The type id. Must not be <code>null</code>.
- * @param mode The mode. Must not be <code>null</code>.
+ * @param contexts The array of context objects. Must be not <code>null</code>.
*
* @throws CoreException If a required step or step group is not available or not valid.
*/
- protected void checkForDependenciesValid(IContextStep step, String type, String mode) throws CoreException {
- assert step != null && type != null && mode != null;
+ protected void checkForDependenciesValid(IContextStep step, IContext[] contexts) throws CoreException {
+ Assert.isNotNull(step);
+ Assert.isNotNull(contexts);
String[] dependencies = step.getDependencies();
for (String dependency : dependencies) {
@@ -748,27 +754,25 @@ public class ContextStepGroup extends AbstractContextStepGroup {
CoreBundleActivator.getUniqueIdentifier(),
MessageFormat.format(Messages.ContextStepGroup_error_missingRequiredStep,
NLS.bind(Messages.ContextStepGroup_error_step, step.getLabel()),
- NLS.bind(Messages.ContextStepGroup_error_requiredStepOrGroup, dependency),
- NLS.bind(Messages.ContextStepGroup_error_typeAndMode, type, mode))
+ NLS.bind(Messages.ContextStepGroup_error_requiredStepOrGroup, dependency))
));
}
// If the candidate a step, validate the step
if (candidate instanceof IContextStep) {
IContextStep candidateStep = (IContextStep)candidate;
- boolean valid = isValidStep(candidateStep.getId(), type, mode);
+ boolean valid = isValidStep(candidateStep.getId(), contexts);
if (!valid) {
throw new CoreException(new Status(IStatus.ERROR,
CoreBundleActivator.getUniqueIdentifier(),
MessageFormat.format(Messages.ContextStepGroup_error_invalidRequiredStep,
NLS.bind(Messages.ContextStepGroup_error_step, step.getLabel()),
- NLS.bind(Messages.ContextStepGroup_error_requiredStep, dependency),
- NLS.bind(Messages.ContextStepGroup_error_typeAndMode, type, mode))
+ NLS.bind(Messages.ContextStepGroup_error_requiredStep, dependency))
));
}
// Step is valid -> recursively check required steps.
- checkForDependenciesValid(candidateStep, type, mode);
+ checkForDependenciesValid(candidateStep, contexts);
}
}
}
@@ -798,17 +802,16 @@ public class ContextStepGroup extends AbstractContextStepGroup {
}
/**
- * Returns if or if not the step identified by the given id is valid.
- * <p>
- * <b>Note:</b> The default implementation returns always <code>true</code>.
+ * Returns if or if not the step identified by the given id is valid for
+ * the given contexts.
*
* @param id The step id. Must not be <code>null</code>.
- * @param type The type id. Must not be <code>null</code>.
- * @param mode The mode. Must not be <code>null</code>.
+ * @param contexts The array of context objects or <code>null</code>.
*
* @return <code>True</code> if the step is valid, <code>false</code> otherwise.
*/
- protected boolean isValidStep(String id, String type, String mode) {
- return true;
+ protected boolean isValidStep(String id, IContext[] contexts) {
+ Assert.isNotNull(id);
+ return StepperManager.getInstance().getStepBindingsExtManager().isStepEnabled(id, contexts);
}
}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/extensions/ContextStepGroupable.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/ContextStepGroupable.java
index 58901087e..e52246d5c 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/extensions/ContextStepGroupable.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/ContextStepGroupable.java
@@ -7,15 +7,15 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.stepper.extensions;
+package org.eclipse.tcf.te.runtime.stepper.extensions;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.eclipse.core.runtime.Assert;
-import org.eclipse.tm.te.runtime.interfaces.extensions.IExecutableExtension;
-import org.eclipse.tm.te.runtime.stepper.interfaces.IContextStepGroupable;
+import org.eclipse.tcf.te.runtime.interfaces.extensions.IExecutableExtension;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStepGroupable;
/**
* Context step groupable implementation.
@@ -52,7 +52,7 @@ public class ContextStepGroupable implements IContextStepGroupable {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.stepper.interfaces.IContextStepGroupable#getExtension()
+ * @see org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStepGroupable#getExtension()
*/
@Override
public IExecutableExtension getExtension() {
@@ -70,7 +70,7 @@ public class ContextStepGroupable implements IContextStepGroupable {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.stepper.interfaces.IContextStepGroupable#getSecondaryId()
+ * @see org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStepGroupable#getSecondaryId()
*/
@Override
public String getSecondaryId() {
@@ -87,7 +87,7 @@ public class ContextStepGroupable implements IContextStepGroupable {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.stepper.interfaces.IContextStepGroupable#isDisabled()
+ * @see org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStepGroupable#isDisabled()
*/
@Override
public boolean isDisabled() {
@@ -108,7 +108,7 @@ public class ContextStepGroupable implements IContextStepGroupable {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.stepper.interfaces.IContextStepGroupable#isHidden()
+ * @see org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStepGroupable#isHidden()
*/
@Override
public boolean isHidden() {
@@ -129,7 +129,7 @@ public class ContextStepGroupable implements IContextStepGroupable {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.stepper.interfaces.IContextStepGroupable#isRemovable()
+ * @see org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStepGroupable#isRemovable()
*/
@Override
public boolean isRemovable() {
@@ -150,7 +150,7 @@ public class ContextStepGroupable implements IContextStepGroupable {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.stepper.interfaces.IContextStepGroupable#isSingleton()
+ * @see org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStepGroupable#isSingleton()
*/
@Override
public boolean isSingleton() {
@@ -158,7 +158,7 @@ public class ContextStepGroupable implements IContextStepGroupable {
}
/**
- * Sets if or if not the launch step is a singleton. Singleton steps can occur in step groups
+ * Sets if or if not the step is a singleton. Singleton steps can occur in step groups
* only once. Multiple occurrences are forbidden.
*
* @param singleton Specify <code>true</code> if the step is a singleton, <code>false</code> otherwise.
@@ -169,7 +169,7 @@ public class ContextStepGroupable implements IContextStepGroupable {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.stepper.interfaces.IContextStepGroupable#getDependencies()
+ * @see org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStepGroupable#getDependencies()
*/
@Override
public String[] getDependencies() {
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/manager/StepBinding.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/manager/StepBinding.java
new file mode 100644
index 000000000..575602d27
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/manager/StepBinding.java
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.runtime.stepper.extensions.manager;
+
+import org.eclipse.core.expressions.Expression;
+import org.eclipse.core.expressions.ExpressionConverter;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.tcf.te.runtime.extensions.ExecutableExtension;
+
+/**
+ * Step binding implementation.
+ */
+public final class StepBinding extends ExecutableExtension {
+ // The mandatory step identifier
+ private String stepId;
+ // The converted expression
+ private Expression expression;
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.extensions.ExecutableExtension#doSetInitializationData(org.eclipse.core.runtime.IConfigurationElement, java.lang.String, java.lang.Object)
+ */
+ @Override
+ public void doSetInitializationData(IConfigurationElement config, String propertyName, Object data) throws CoreException {
+ super.doSetInitializationData(config, propertyName, data);
+
+ // Initialize the step id field.
+ // Throws an exception if the step id is empty or null.
+ stepId = config != null ? config.getAttribute("stepId") : null; //$NON-NLS-1$
+ if (stepId == null || (stepId != null && "".equals(stepId.trim()))) { //$NON-NLS-1$
+ throw createMissingMandatoryAttributeException("stepId", config.getContributor().getName()); //$NON-NLS-1$
+ }
+
+ // Read the sub elements of the extension
+ IConfigurationElement[] children = config != null ? config.getChildren() : null;
+ // The "enablement" element is the only expected one
+ if (children != null && children.length > 0) {
+ expression = ExpressionConverter.getDefault().perform(children[0]);
+ }
+ }
+
+ /**
+ * Returns the step id which is associated with this binding.
+ *
+ * @return The step id.
+ */
+ public String getStepId() {
+ return stepId;
+ }
+
+ /**
+ * Returns the enablement expression which is associated with this binding.
+ *
+ * @return The enablement expression or <code>null</code>.
+ */
+ public Expression getEnablement() {
+ return expression;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/manager/StepBindingsExtensionPointManager.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/manager/StepBindingsExtensionPointManager.java
new file mode 100644
index 000000000..3b491727c
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/manager/StepBindingsExtensionPointManager.java
@@ -0,0 +1,185 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.runtime.stepper.extensions.manager;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.core.expressions.EvaluationContext;
+import org.eclipse.core.expressions.EvaluationResult;
+import org.eclipse.core.expressions.Expression;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager;
+import org.eclipse.tcf.te.runtime.extensions.ExecutableExtensionProxy;
+import org.eclipse.tcf.te.runtime.stepper.activator.CoreBundleActivator;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.IContext;
+
+
+/**
+ * Step bindings extension point manager implementation.
+ */
+public final class StepBindingsExtensionPointManager extends AbstractExtensionPointManager<StepBinding> {
+
+ /**
+ * Constructor.
+ */
+ public StepBindingsExtensionPointManager() {
+ super();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#getExtensionPointId()
+ */
+ @Override
+ protected String getExtensionPointId() {
+ return "org.eclipse.tcf.te.runtime.stepper.stepBindings"; //$NON-NLS-1$
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#getConfigurationElementName()
+ */
+ @Override
+ protected String getConfigurationElementName() {
+ return "binding"; //$NON-NLS-1$
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#doCreateExtensionProxy(org.eclipse.core.runtime.IConfigurationElement)
+ */
+ @Override
+ protected ExecutableExtensionProxy<StepBinding> doCreateExtensionProxy(IConfigurationElement element) throws CoreException {
+ return new ExecutableExtensionProxy<StepBinding>(element) {
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.extensions.ExecutableExtensionProxy#newInstance()
+ */
+ @Override
+ public StepBinding newInstance() {
+ StepBinding instance = new StepBinding();
+ try {
+ instance.setInitializationData(getConfigurationElement(), null, null);
+ } catch (CoreException e) {
+ IStatus status = new Status(IStatus.ERROR, CoreBundleActivator.getUniqueIdentifier(),
+ e.getLocalizedMessage(), e);
+ Platform.getLog(CoreBundleActivator.getContext().getBundle()).log(status);
+ }
+ return instance;
+ }
+ };
+ }
+
+ /**
+ * Returns if or if not the step identified by the given step id is enabled for the
+ * given context.
+ * <p>
+ * <b>Note:</b> A step is considered enabled if
+ * <ul>
+ * <li>There is no step binding contribution for the given step id. Or</li>
+ * <li>At least one of the bindings has not enablement sub element. Or</li>
+ * <li>At least one of the bindings enablement sub element evaluates to <code>true</code>.</li>
+ * </ul>
+ *
+ * @param stepId The step id. Must not be <code>null</code>.
+ * @param contexts The context objects or <code>null</code>.
+ * @return The list of applicable editor page bindings or an empty array.
+ */
+ public boolean isStepEnabled(String stepId, IContext[] contexts) {
+ Assert.isNotNull(stepId);
+
+ // Flag is set to true at the first binding matching the given step id
+ boolean hasStepBinding = false;
+ boolean enabled = false;
+
+ for (StepBinding binding : getStepBindings()) {
+ // Ignore all bindings not matching the given step id.
+ if (!stepId.equals(binding.getStepId())) continue;
+
+ // OK. There is at least one binding contribution for the given step id.
+ hasStepBinding = true;
+
+ // Get the enablement.
+ Expression enablement = binding.getEnablement();
+
+ // The binding is applicable by default if no expression is specified.
+ enabled = enablement == null;
+
+ if (enablement != null) {
+ if (contexts != null) {
+ // To satisfy the "isIterable" and "isCountable" needs of the expression
+ // evaluator, pass on the contexts as collection.
+ List<IContext> variableValue = Arrays.asList(contexts);
+ // Set the default variable to the context.
+ EvaluationContext evalContext = new EvaluationContext(null, variableValue);
+ // Initialize the evaluation context named variables
+ evalContext.addVariable("activeContexts", variableValue); //$NON-NLS-1$
+ // Evaluate the expression
+ try {
+ enabled = enablement.evaluate(evalContext).equals(EvaluationResult.TRUE);
+ } catch (CoreException e) {
+ IStatus status = new Status(IStatus.ERROR, CoreBundleActivator.getUniqueIdentifier(),
+ e.getLocalizedMessage(), e);
+ Platform.getLog(CoreBundleActivator.getContext().getBundle()).log(status);
+ }
+ } else {
+ // The enablement is false by definition if no context is given.
+ enabled = false;
+ }
+ }
+
+ // Break the loop if the step is found enabled
+ if (enabled) break;
+ }
+
+ return !hasStepBinding || enabled;
+ }
+
+ /**
+ * Returns the list of all contributed step bindings.
+ *
+ * @return The list of contributed step bindings, or an empty array.
+ */
+ public StepBinding[] getStepBindings() {
+ List<StepBinding> contributions = new ArrayList<StepBinding>();
+ Collection<ExecutableExtensionProxy<StepBinding>> statusHandlerBindings = getExtensions().values();
+ for (ExecutableExtensionProxy<StepBinding> statusHandlerBinding : statusHandlerBindings) {
+ StepBinding instance = statusHandlerBinding.getInstance();
+ if (instance != null && !contributions.contains(instance)) {
+ contributions.add(instance);
+ }
+ }
+
+ return contributions.toArray(new StepBinding[contributions.size()]);
+ }
+
+ /**
+ * Returns the step binding identified by its unique id. If no step
+ * binding with the specified id is registered, <code>null</code> is returned.
+ *
+ * @param id The unique id of the step binding or <code>null</code>
+ *
+ * @return The step binding instance or <code>null</code>.
+ */
+ public StepBinding getBinding(String id) {
+ StepBinding contribution = null;
+ if (getExtensions().containsKey(id)) {
+ ExecutableExtensionProxy<StepBinding> proxy = getExtensions().get(id);
+ // Get the extension instance
+ contribution = proxy.getInstance();
+ }
+
+ return contribution;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/internal/extensions/StepExtensionPointManager.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/manager/StepExtensionPointManager.java
index 9a68b880d..268dd214f 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/internal/extensions/StepExtensionPointManager.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/manager/StepExtensionPointManager.java
@@ -7,32 +7,32 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.stepper.internal.extensions;
+package org.eclipse.tcf.te.runtime.stepper.extensions.manager;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import org.eclipse.core.runtime.Assert;
-import org.eclipse.tm.te.runtime.extensions.AbstractExtensionPointManager;
-import org.eclipse.tm.te.runtime.extensions.ExecutableExtensionProxy;
-import org.eclipse.tm.te.runtime.stepper.interfaces.IContextStep;
+import org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager;
+import org.eclipse.tcf.te.runtime.extensions.ExecutableExtensionProxy;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStep;
/**
* Step extension point manager implementation.
*/
-public class StepExtensionPointManager extends AbstractExtensionPointManager<IContextStep> {
+public final class StepExtensionPointManager extends AbstractExtensionPointManager<IContextStep> {
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.extensions.AbstractExtensionPointManager#getExtensionPointId()
+ * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#getExtensionPointId()
*/
@Override
protected String getExtensionPointId() {
- return "org.eclipse.tm.te.runtime.stepper.steps"; //$NON-NLS-1$
+ return "org.eclipse.tcf.te.runtime.stepper.steps"; //$NON-NLS-1$
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.extensions.AbstractExtensionPointManager#getConfigurationElementName()
+ * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#getConfigurationElementName()
*/
@Override
protected String getConfigurationElementName() {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/internal/extensions/StepGroupExtensionPointManager.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/manager/StepGroupExtensionPointManager.java
index bd3fa31ab..589cc86ed 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/internal/extensions/StepGroupExtensionPointManager.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/manager/StepGroupExtensionPointManager.java
@@ -7,32 +7,35 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.stepper.internal.extensions;
+package org.eclipse.tcf.te.runtime.stepper.extensions.manager;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
import java.util.Map;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.tm.te.runtime.extensions.AbstractExtensionPointManager;
-import org.eclipse.tm.te.runtime.extensions.ExecutableExtensionProxy;
-import org.eclipse.tm.te.runtime.stepper.interfaces.IContextStepGroup;
+import org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager;
+import org.eclipse.tcf.te.runtime.extensions.ExecutableExtensionProxy;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStepGroup;
/**
* Step group extension manager implementation.
*/
-public class StepGroupExtensionPointManager extends AbstractExtensionPointManager<IContextStepGroup> {
+public final class StepGroupExtensionPointManager extends AbstractExtensionPointManager<IContextStepGroup> {
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.extensions.AbstractExtensionPointManager#getExtensionPointId()
+ * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#getExtensionPointId()
*/
@Override
protected String getExtensionPointId() {
- return "org.eclipse.tm.te.runtime.stepper.stepGroups"; //$NON-NLS-1$
+ return "org.eclipse.tcf.te.runtime.stepper.stepGroups"; //$NON-NLS-1$
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.extensions.AbstractExtensionPointManager#getConfigurationElementName()
+ * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#getConfigurationElementName()
*/
@Override
protected String getConfigurationElementName() {
@@ -40,7 +43,7 @@ public class StepGroupExtensionPointManager extends AbstractExtensionPointManage
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.extensions.AbstractExtensionPointManager#doCreateExtensionProxy(org.eclipse.core.runtime.IConfigurationElement)
+ * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#doCreateExtensionProxy(org.eclipse.core.runtime.IConfigurationElement)
*/
@Override
protected ExecutableExtensionProxy<IContextStepGroup> doCreateExtensionProxy(IConfigurationElement element) throws CoreException {
@@ -48,6 +51,27 @@ public class StepGroupExtensionPointManager extends AbstractExtensionPointManage
}
/**
+ * Returns the list of all contributed step groups.
+ *
+ * @param unique If <code>true</code>, the method returns new instances for each
+ * contributed step group.
+ *
+ * @return The list of contributed step groups, or an empty array.
+ */
+ public IContextStepGroup[] getStepGroups(boolean unique) {
+ List<IContextStepGroup> contributions = new ArrayList<IContextStepGroup>();
+ Collection<ExecutableExtensionProxy<IContextStepGroup>> delegates = getExtensions().values();
+ for (ExecutableExtensionProxy<IContextStepGroup> delegate : delegates) {
+ IContextStepGroup instance = unique ? delegate.newInstance() : delegate.getInstance();
+ if (instance != null && !contributions.contains(instance)) {
+ contributions.add(instance);
+ }
+ }
+
+ return contributions.toArray(new IContextStepGroup[contributions.size()]);
+ }
+
+ /**
* Returns the step group identified by its unique id. If no step group with the specified id is
* registered, <code>null</code> is returned.
*
@@ -69,7 +93,7 @@ public class StepGroupExtensionPointManager extends AbstractExtensionPointManage
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.extensions.AbstractExtensionPointManager#doStoreExtensionTo(java.util.Map, org.eclipse.tm.te.runtime.extensions.ExecutableExtensionProxy, org.eclipse.core.runtime.IConfigurationElement)
+ * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#doStoreExtensionTo(java.util.Map, org.eclipse.tcf.te.runtime.extensions.ExecutableExtensionProxy, org.eclipse.core.runtime.IConfigurationElement)
*/
@Override
protected void doStoreExtensionTo(Map<String, ExecutableExtensionProxy<IContextStepGroup>> extensions, ExecutableExtensionProxy<IContextStepGroup> candidate, IConfigurationElement element) throws CoreException {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/internal/extensions/StepGroupExtensionProxy.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/manager/StepGroupExtensionProxy.java
index 0b6c1ffd2..d7e97fe22 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/internal/extensions/StepGroupExtensionProxy.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/manager/StepGroupExtensionProxy.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.stepper.internal.extensions;
+package org.eclipse.tcf.te.runtime.stepper.extensions.manager;
import java.util.ArrayList;
import java.util.List;
@@ -16,15 +16,15 @@ import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.Platform;
-import org.eclipse.tm.te.runtime.extensions.ExecutableExtensionProxy;
-import org.eclipse.tm.te.runtime.stepper.activator.CoreBundleActivator;
-import org.eclipse.tm.te.runtime.stepper.extensions.ContextStepGroup;
-import org.eclipse.tm.te.runtime.stepper.interfaces.IContextStepGroup;
+import org.eclipse.tcf.te.runtime.extensions.ExecutableExtensionProxy;
+import org.eclipse.tcf.te.runtime.stepper.activator.CoreBundleActivator;
+import org.eclipse.tcf.te.runtime.stepper.extensions.ContextStepGroup;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStepGroup;
/**
* Step group extension proxy implementation.
*/
-public class StepGroupExtensionProxy extends ExecutableExtensionProxy<IContextStepGroup> {
+public final class StepGroupExtensionProxy extends ExecutableExtensionProxy<IContextStepGroup> {
private List<IConfigurationElement> groupExtensions = new ArrayList<IConfigurationElement>();
/**
@@ -47,7 +47,7 @@ public class StepGroupExtensionProxy extends ExecutableExtensionProxy<IContextSt
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.extensions.ExecutableExtensionProxy#newInstance()
+ * @see org.eclipse.tcf.te.runtime.extensions.ExecutableExtensionProxy#newInstance()
*/
@Override
public IContextStepGroup newInstance() {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/internal/extensions/StepperExtensionPointManager.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/manager/StepperExtensionPointManager.java
index 1d60e9cd0..bc8e6484b 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/internal/extensions/StepperExtensionPointManager.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/manager/StepperExtensionPointManager.java
@@ -7,32 +7,32 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.stepper.internal.extensions;
+package org.eclipse.tcf.te.runtime.stepper.extensions.manager;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import org.eclipse.core.runtime.Assert;
-import org.eclipse.tm.te.runtime.extensions.AbstractExtensionPointManager;
-import org.eclipse.tm.te.runtime.extensions.ExecutableExtensionProxy;
-import org.eclipse.tm.te.runtime.stepper.interfaces.IStepper;
+import org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager;
+import org.eclipse.tcf.te.runtime.extensions.ExecutableExtensionProxy;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStepper;
/**
* Stepper extension point manager implementation.
*/
-public class StepperExtensionPointManager extends AbstractExtensionPointManager<IStepper> {
+public final class StepperExtensionPointManager extends AbstractExtensionPointManager<IContextStepper> {
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.extensions.AbstractExtensionPointManager#getExtensionPointId()
+ * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#getExtensionPointId()
*/
@Override
protected String getExtensionPointId() {
- return "org.eclipse.tm.te.runtime.stepper.steppers"; //$NON-NLS-1$
+ return "org.eclipse.tcf.te.runtime.stepper.steppers"; //$NON-NLS-1$
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.extensions.AbstractExtensionPointManager#getConfigurationElementName()
+ * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#getConfigurationElementName()
*/
@Override
protected String getConfigurationElementName() {
@@ -47,17 +47,17 @@ public class StepperExtensionPointManager extends AbstractExtensionPointManager<
*
* @return The list of contributed stepper, or an empty array.
*/
- public IStepper[] getStepper(boolean unique) {
- List<IStepper> contributions = new ArrayList<IStepper>();
- Collection<ExecutableExtensionProxy<IStepper>> delegates = getExtensions().values();
- for (ExecutableExtensionProxy<IStepper> delegate : delegates) {
- IStepper instance = unique ? delegate.newInstance() : delegate.getInstance();
+ public IContextStepper[] getStepper(boolean unique) {
+ List<IContextStepper> contributions = new ArrayList<IContextStepper>();
+ Collection<ExecutableExtensionProxy<IContextStepper>> delegates = getExtensions().values();
+ for (ExecutableExtensionProxy<IContextStepper> delegate : delegates) {
+ IContextStepper instance = unique ? delegate.newInstance() : delegate.getInstance();
if (instance != null && !contributions.contains(instance)) {
contributions.add(instance);
}
}
- return contributions.toArray(new IStepper[contributions.size()]);
+ return contributions.toArray(new IContextStepper[contributions.size()]);
}
/**
@@ -69,11 +69,11 @@ public class StepperExtensionPointManager extends AbstractExtensionPointManager<
*
* @return The stepper instance or <code>null</code>.
*/
- public IStepper getStepper(String id, boolean unique) {
+ public IContextStepper getStepper(String id, boolean unique) {
Assert.isNotNull(id);
- IStepper contribution = null;
+ IContextStepper contribution = null;
if (getExtensions().containsKey(id)) {
- ExecutableExtensionProxy<IStepper> proxy = getExtensions().get(id);
+ ExecutableExtensionProxy<IContextStepper> proxy = getExtensions().get(id);
// Get the extension instance
contribution = unique ? proxy.newInstance() : proxy.getInstance();
}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/interfaces/IContext.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IContext.java
index 3af100fe1..264ff6d44 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/interfaces/IContext.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IContext.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.stepper.interfaces;
+package org.eclipse.tcf.te.runtime.stepper.interfaces;
import org.eclipse.core.runtime.IAdaptable;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/interfaces/IContextManipulator.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IContextManipulator.java
index 0fcb558df..61bb81817 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/interfaces/IContextManipulator.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IContextManipulator.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.stepper.interfaces;
+package org.eclipse.tcf.te.runtime.stepper.interfaces;
/**
* A step or step group capable of modifying the context the steps or step
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/interfaces/IContextStep.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IContextStep.java
index 168ef34f9..ee2f428bc 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/interfaces/IContextStep.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IContextStep.java
@@ -7,13 +7,13 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.stepper.interfaces;
+package org.eclipse.tcf.te.runtime.stepper.interfaces;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
-import org.eclipse.tm.te.runtime.interfaces.callback.ICallback;
-import org.eclipse.tm.te.runtime.interfaces.extensions.IExecutableExtension;
-import org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback;
+import org.eclipse.tcf.te.runtime.interfaces.extensions.IExecutableExtension;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
/**
* A single step associated with a context.
@@ -22,8 +22,8 @@ import org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer;
* finished, the passed in <b>callback must be invoked</b>. The parent launch
* stepper suspend the step sequence execution till the callback is invoked.
* <p>
- * Context steps signals the execution state to the parent launch stepper via
- * the <code>IStatus</code> object passed to the callback as first argument.
+ * Context steps signals the execution state to the parent stepper via the
+ * <code>IStatus</code> object passed to the callback as first argument.
* The status object is mandatory and cannot be <code>null</code>. If the step
* execution succeeds, an status with severity {@link IStatus#OK} is expected.
*/
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/interfaces/IContextStepExecutor.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IContextStepExecutor.java
index 7e90440b4..f5a977ca1 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/interfaces/IContextStepExecutor.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IContextStepExecutor.java
@@ -7,11 +7,11 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.stepper.interfaces;
+package org.eclipse.tcf.te.runtime.stepper.interfaces;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
/**
* A step executor.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/interfaces/IContextStepGroup.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IContextStepGroup.java
index b13bc8382..09d3ae664 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/interfaces/IContextStepGroup.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IContextStepGroup.java
@@ -7,10 +7,10 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.stepper.interfaces;
+package org.eclipse.tcf.te.runtime.stepper.interfaces;
import org.eclipse.core.runtime.CoreException;
-import org.eclipse.tm.te.runtime.interfaces.extensions.IExecutableExtension;
+import org.eclipse.tcf.te.runtime.interfaces.extensions.IExecutableExtension;
/**
@@ -28,17 +28,15 @@ public interface IContextStepGroup extends IExecutableExtension {
public boolean isLocked();
/**
- * Returns the list of steps or step groups enlisted in the group for the specified stepper,
- * type and sub type.
- *
- * @param type The type id. Must be not <code>null</code>.
- * @param subType The sub type Must be not <code>null</code>.
+ * Returns the list of steps or step groups enlisted and enabled in the group for the
+ * given contexts.
*
+ * @param contexts The array of context objects. Must be not <code>null</code>.
* @return The list of steps and step groups or an empty array.
*
* @throws CoreException If the steps cannot be determined.
*/
- public IContextStepGroupable[] getSteps(String type, String subType) throws CoreException;
+ public IContextStepGroupable[] getSteps(IContext[] contexts) throws CoreException;
/**
* Return the step group iterator or <code>null</code>. The step group iterator can be used to
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/interfaces/IContextStepGroupIterator.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IContextStepGroupIterator.java
index 124029fc9..2d1da0289 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/interfaces/IContextStepGroupIterator.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IContextStepGroupIterator.java
@@ -7,12 +7,12 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.stepper.interfaces;
+package org.eclipse.tcf.te.runtime.stepper.interfaces;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.tm.te.runtime.interfaces.extensions.IExecutableExtension;
-import org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.runtime.interfaces.extensions.IExecutableExtension;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
/**
* A step group iterator.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/interfaces/IContextStepGroupable.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IContextStepGroupable.java
index 6e49d7f56..723dfde91 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/interfaces/IContextStepGroupable.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IContextStepGroupable.java
@@ -7,9 +7,9 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.stepper.interfaces;
+package org.eclipse.tcf.te.runtime.stepper.interfaces;
-import org.eclipse.tm.te.runtime.interfaces.extensions.IExecutableExtension;
+import org.eclipse.tcf.te.runtime.interfaces.extensions.IExecutableExtension;
/**
* A step groupable.
@@ -73,7 +73,7 @@ public interface IContextStepGroupable {
* If one of the listed dependencies have not been executed before, the execution of the
* groupable will fail.
* <p>
- * The launch step or launch step group id might be fully qualified using the form
+ * The step or step group id might be fully qualified using the form
* <code>&quot;primaryId##secondaryId</code>. The <code>secondaryId</code> is optional.
*
* @return The list of dependencies or an empty list.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/interfaces/IStepper.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IContextStepper.java
index 7a1fb99d4..4e48b1e80 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/interfaces/IStepper.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IContextStepper.java
@@ -7,28 +7,27 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.stepper.interfaces;
+package org.eclipse.tcf.te.runtime.stepper.interfaces;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.tm.te.runtime.interfaces.IConditionTester;
-import org.eclipse.tm.te.runtime.interfaces.extensions.IExecutableExtension;
-import org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.runtime.interfaces.IConditionTester;
+import org.eclipse.tcf.te.runtime.interfaces.extensions.IExecutableExtension;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
/**
* A stepper.
* <p>
- * Stepper are executing a set of steps and/or step groups read from a given type for the current
- * sub type. The stepper is responsible for handling any exceptions which occurred during step
- * execution.
+ * Stepper are executing a set of steps and/or step groups for the given context(s). The stepper is
+ * responsible for handling any exceptions which occurred during step execution.
* <p>
- * Stepper are synchronous where steps are asynchronous.
+ * <b>Note:</b> Stepper are synchronous where steps are asynchronous.
* <p>
* Stepper must run in worker threads.
*/
-public interface IStepper extends IExecutableExtension {
+public interface IContextStepper extends IExecutableExtension {
public static final String ID_TYPE_STEPPER_ID = "Stepper"; //$NON-NLS-1$
public static final String ID_TYPE_CONTEXT_ID = "Context"; //$NON-NLS-1$
@@ -40,27 +39,27 @@ public interface IStepper extends IExecutableExtension {
* Condition Tester to test for finished execution of the associated stepper.
*/
public static class ExecutionFinishedConditionTester implements IConditionTester {
- private final IStepper stepper;
+ private final IContextStepper stepper;
/**
* Constructor.
*
* @param stepper The stepper. Must not be <code>null</code>.
*/
- public ExecutionFinishedConditionTester(IStepper stepper) {
+ public ExecutionFinishedConditionTester(IContextStepper stepper) {
Assert.isNotNull(stepper);
this.stepper = stepper;
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.IConditionTester#cleanup()
+ * @see org.eclipse.tcf.te.runtime.interfaces.IConditionTester#cleanup()
*/
@Override
public void cleanup() {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.IConditionTester#isConditionFulfilled()
+ * @see org.eclipse.tcf.te.runtime.interfaces.IConditionTester#isConditionFulfilled()
*/
@Override
public boolean isConditionFulfilled() {
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IContextStepperProperties.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IContextStepperProperties.java
new file mode 100644
index 000000000..d648584c8
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IContextStepperProperties.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.runtime.stepper.interfaces;
+
+/**
+ * Common stepper configuration property definitions.
+ * <p>
+ * Stepper are configured by setting properties within the properties container passed to the stepper via the
+ * {@link IContextStepper#initialize(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer, IFullQualifiedId, org.eclipse.core.runtime.IProgressMonitor)}
+ * call.
+ */
+public interface IContextStepperProperties {
+
+ /**
+ * The id of the step group to execute by the stepper.
+ * <p>
+ * Type: String
+ */
+ public static final String PROP_STEP_GROUP_ID = "stepGroupID"; //$NON-NLS-1$
+
+ /**
+ * A name describing to the user what the stepper is executing.
+ * <p>
+ * Type: String
+ */
+ public static final String PROP_NAME = "name"; //$NON-NLS-1$
+
+ /**
+ * The context objects the stepper is working on.
+ * <p>
+ * Type: Array of {@link IContext}
+ */
+ public static final String PROP_CONTEXTS = "contexts"; //$NON-NLS-1$
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/interfaces/IExtendedContextStep.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IExtendedContextStep.java
index 7e4622a9a..a13e1a54d 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/interfaces/IExtendedContextStep.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IExtendedContextStep.java
@@ -7,13 +7,13 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.stepper.interfaces;
+package org.eclipse.tcf.te.runtime.stepper.interfaces;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
-import org.eclipse.tm.te.runtime.interfaces.callback.ICallback;
-import org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
/**
* Extended single step providing additional life cycle methods.
@@ -46,7 +46,7 @@ public interface IExtendedContextStep extends IContextStep {
* Validate execution conditions.
* <p>
* This method is called from
- * {@link #execute(IContext, Object, IFullQualifiedId, IProgressMonitor, org.eclipse.tm.te.runtime.interfaces.callback.ICallback)}
+ * {@link #execute(IContext, Object, IFullQualifiedId, IProgressMonitor, org.eclipse.tcf.te.runtime.interfaces.callback.ICallback)}
* after the step initialization. If any execution condition is not fulfilled, the method should
* throw an {@link CoreException} to signal the failure.
*
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/interfaces/IFullQualifiedId.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IFullQualifiedId.java
index 11882fed7..765f85e81 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/interfaces/IFullQualifiedId.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IFullQualifiedId.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.stepper.interfaces;
+package org.eclipse.tcf.te.runtime.stepper.interfaces;
/**
* A unique, hierarchically id used by steps, step groups and others.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/interfaces/IVariantDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IVariantDelegate.java
index fff92271b..f6efb45c7 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/interfaces/IVariantDelegate.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IVariantDelegate.java
@@ -7,10 +7,10 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.stepper.interfaces;
+package org.eclipse.tcf.te.runtime.stepper.interfaces;
-import org.eclipse.tm.te.runtime.interfaces.extensions.IExecutableExtension;
-import org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.runtime.interfaces.extensions.IExecutableExtension;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
/**
* The variant delegate is providing variants to the main modes. Variants can influence the executed
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/interfaces/tracing/ITraceIds.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/tracing/ITraceIds.java
index bb433d34d..4f526483d 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/interfaces/tracing/ITraceIds.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/tracing/ITraceIds.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.stepper.interfaces.tracing;
+package org.eclipse.tcf.te.runtime.stepper.interfaces.tracing;
/**
* Stepper Runtime plug-in trace slot identifiers.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/nls/Messages.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/nls/Messages.java
index 314555f08..446dc827b 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/nls/Messages.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/nls/Messages.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.stepper.nls;
+package org.eclipse.tcf.te.runtime.stepper.nls;
import org.eclipse.osgi.util.NLS;
@@ -17,7 +17,7 @@ import org.eclipse.osgi.util.NLS;
public class Messages extends NLS {
// The plug-in resource bundle name
- private static final String BUNDLE_NAME = "org.eclipse.tm.te.runtime.stepper.nls.Messages"; //$NON-NLS-1$
+ private static final String BUNDLE_NAME = "org.eclipse.tcf.te.runtime.stepper.nls.Messages"; //$NON-NLS-1$
/**
* Static constructor.
@@ -32,7 +32,6 @@ public class Messages extends NLS {
public static String AbstractContextStep_error_missingRequiredAttribute;
public static String AbstractContextStep_warning_stepFinishedWithWarnings;
- public static String AbstractContextStepper_error_typeAndSubtype;
public static String AbstractContextStepper_error_stepGroup;
public static String AbstractContextStepper_error_step;
public static String AbstractContextStepper_error_referencedBaseGroup;
@@ -40,7 +39,9 @@ public class Messages extends NLS {
public static String AbstractContextStepper_error_requiredStepOrGroup;
public static String AbstractContextStepper_error_requiredStep;
public static String AbstractContextStepper_error_initializeNotCalled;
+ public static String AbstractContextStepper_error_missingStepGroupId;
public static String AbstractContextStepper_error_missingStepGroup;
+ public static String AbstractContextStepper_error_missingSteps;
public static String AbstractContextStepper_multiStatus_finishedWithWarnings;
public static String AbstractContextStepper_multiStatus_finishedWithErrors;
public static String AbstractContextStepper_error_missingRequiredStep;
@@ -51,11 +52,16 @@ public class Messages extends NLS {
public static String ContextStepGroup_error_missingRequiredStep;
public static String ContextStepGroup_error_invalidRequiredStep;
public static String ContextStepGroup_error_multipleSingletonOccurrences;
- public static String ContextStepGroup_error_typeAndMode;
public static String ContextStepGroup_error_step;
public static String ContextStepGroup_error_stepGroup;
public static String ContextStepGroup_error_requiredStep;
public static String ContextStepGroup_error_referencedBaseGroup;
public static String ContextStepGroup_error_referencedStepOrGroup;
public static String ContextStepGroup_error_requiredStepOrGroup;
+
+ public static String ContextStepExecutor_checkPoint_normalizationNeeded;
+ public static String ContextStepExecutor_info_stepFailed;
+ public static String ContextStepExecutor_warning_stepFailed;
+ public static String ContextStepExecutor_error_stepFailed;
+ public static String ContextStepExecutor_stepFailed_debugInfo;
}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/nls/Messages.properties b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/nls/Messages.properties
index c54d8c5f4..02ffe82ce 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/src/org/eclipse/tm/te/runtime/stepper/nls/Messages.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/nls/Messages.properties
@@ -1,12 +1,11 @@
#
-# org.eclipse.tm.te.runtime.stepper
+# org.eclipse.tcf.te.runtime.stepper
# Externalized Strings.
#
AbstractContextStep_error_missingRequiredAttribute=Required attribute "{0}" missing for extension "{1}"!
AbstractContextStep_warning_stepFinishedWithWarnings=Step ''{0}'' finished with warnings.
-AbstractContextStepper_error_typeAndSubtype=Type:\n\t{0}\nSubtype:\n\t{1}
AbstractContextStepper_error_stepGroup=Step group:\n\t{0}
AbstractContextStepper_error_step=Step:\n\t{0}
AbstractContextStepper_error_referencedBaseGroup=Referenced Base Step Group:\n\t{0}
@@ -14,7 +13,9 @@ AbstractContextStepper_error_referencedStepOrGroup=Referenced Step or Step Group
AbstractContextStepper_error_requiredStepOrGroup=Required Step or Step Group:\n\t{0}
AbstractContextStepper_error_requiredStep=Required Step:\n\t{0}
AbstractContextStepper_error_initializeNotCalled=initialize(...) must be called before execute()!
-AbstractContextStepper_error_missingStepGroup=Execution failed. No steps configured for ''{0}''.
+AbstractContextStepper_error_missingStepGroupId=Execution failed. Missing step group id for ''{0}''.
+AbstractContextStepper_error_missingStepGroup=Execution failed. Missing step group for id ''{0}''.
+AbstractContextStepper_error_missingSteps=Execution failed. No steps enabled for ''{0}''.
AbstractContextStepper_multiStatus_finishedWithWarnings=''{0}'' completed with warnings or information.
AbstractContextStepper_multiStatus_finishedWithErrors=''{0}'' failed.
AbstractContextStepper_error_missingRequiredStep=Step execution failed. \
@@ -27,10 +28,21 @@ ContextStepGroup_error_missingReferencedStep=Cannot determine steps for executio
ContextStepGroup_error_missingRequiredStep=Invalid step. Required step or step group does not exist.\n\n{0}\n{1}\n\n{2}
ContextStepGroup_error_invalidRequiredStep=Invalid step. Required step is invalid.\n\n{0}\n{1}\n\n{2}
ContextStepGroup_error_multipleSingletonOccurrences=Cannot determine steps for execution. Only one reference allowed.\n\n{0}\n{1}\n\n{2}
-ContextStepGroup_error_typeAndMode=Type:\n\t{0}\nMode:\n\t{1}
ContextStepGroup_error_step=Step:\n\t{0}
ContextStepGroup_error_stepGroup=Step group:\n\t{0}
ContextStepGroup_error_requiredStep=Required Step:\n\t{0}
ContextStepGroup_error_referencedBaseGroup=Referenced Base Step Group:\n\t{0}
ContextStepGroup_error_referencedStepOrGroup=Referenced Step or Step Group:\n\t{0}
ContextStepGroup_error_requiredStepOrGroup=Required Step or Step Group:\n\t{0}
+
+ContextStepExecutor_checkPoint_normalizationNeeded=Step finished with this
+ContextStepExecutor_info_stepFailed=Step finished with this information: {0}\n\n\
+Context: {1}\n\{2}\n\
+Step: {3}
+ContextStepExecutor_warning_stepFailed=Step finished with this warning: {0}\n\n\
+Context: {1}\n\{2}\n\
+Step: {3}
+ContextStepExecutor_error_stepFailed=Step finished with this error: {0}\n\n\
+Context: {1}\n\{2}\n\
+Step: {3}
+ContextStepExecutor_stepFailed_debugInfo=Debug info:\n{0}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/stepper/MultiContextStepper.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/stepper/MultiContextStepper.java
new file mode 100644
index 000000000..52efff779
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/stepper/MultiContextStepper.java
@@ -0,0 +1,126 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.runtime.stepper.stepper;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.runtime.stepper.StepperAttributeUtil;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.IContext;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.IContextManipulator;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.IFullQualifiedId;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStepper;
+
+/**
+ * A stepper implementation capable of handling multiple contexts.
+ * <p>
+ * The multi context stepper will sequential loop all configured contexts and invoke a single
+ * context stepper for each context.
+ */
+public class MultiContextStepper extends SingleContextStepper {
+
+ private List<IContextStepper> steppers = new ArrayList<IContextStepper>();
+
+ public static final String CONTEXT_COUNT = "contextCount"; //$NON-NLS-1$
+ public static final String CONTEXT_INDEX = "contextIndex"; //$NON-NLS-1$
+
+ /**
+ * Constructor.
+ */
+ public MultiContextStepper() {
+ super();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.stepper.extensions.AbstractContextStepper#onInitialize(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer, org.eclipse.tcf.te.runtime.stepper.interfaces.IFullQualifiedId, org.eclipse.core.runtime.IProgressMonitor)
+ */
+ @Override
+ protected void onInitialize(IPropertiesContainer data, IFullQualifiedId fullQualifiedId, IProgressMonitor monitor) {
+ super.onInitialize(data, fullQualifiedId, monitor);
+
+ IContext[] contexts = getContexts();
+ for (IContext context : contexts) {
+ if (context == null) continue;
+
+ // Get the stepper to be used for this context object
+ IContextStepper stepper = getStepper(context);
+ Assert.isNotNull(stepper);
+
+ // Build up a new fully qualified id
+ IFullQualifiedId id = fullQualifiedId.createChildId(ID_TYPE_STEPPER_ID,
+ (stepper.getId() != null ? stepper.getId() : "org.eclipse.tcf.te.runtime.stepper.singleContext"), //$NON-NLS-1$
+ "" + steppers.size()); //$NON-NLS-1$
+
+ // Initialize the stepper
+ stepper.initialize(data, id, monitor);
+
+ // Associate the context and context id with the calculated id
+ StepperAttributeUtil.setProperty(IContextManipulator.CONTEXT, id, data, context);
+ StepperAttributeUtil.setProperty(IContextManipulator.CONTEXT_ID, id, data, context.getContextId());
+
+ // Add the stepper to the list
+ steppers.add(stepper);
+ }
+ data.setProperty("MULTI_CONTEXT", Boolean.toString(steppers.size() > 1)); //$NON-NLS-1$
+ }
+
+ /**
+ * Returns the stepper to be used for the given target context.
+ * <p>
+ * <b>Note:</b> The default implementation does always return a new single context stepper
+ * instance.
+ *
+ * @param context The context. Must not be <code>null</code>.
+ * @return The stepper instance.
+ */
+ protected IContextStepper getStepper(IContext context) {
+ Assert.isNotNull(context);
+ return new SingleContextStepper();
+ }
+
+ /* (non-Javadoc)
+ * @see com.windriver.ide.target.core.stepper.AbstractTargetContextStepper#internalExecute(java.util.List)
+ */
+ @Override
+ protected void internalExecute(List<IStatus> statusContainer) throws CoreException {
+ int i = 0;
+ StepperAttributeUtil.setProperty(CONTEXT_COUNT, null, getData(), steppers.size());
+ for (IContextStepper stepper : steppers) {
+ StepperAttributeUtil.setProperty(CONTEXT_INDEX, null, getData(), i++);
+ try {
+ stepper.execute();
+ }
+ catch (CoreException e) {
+ if (isCancelable() && getMonitor() != null && getMonitor().isCanceled()) {
+ throw e;
+ }
+ statusContainer.add(e.getStatus());
+ }
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.stepper.extensions.AbstractContextStepper#cleanup()
+ */
+ @Override
+ public void cleanup() {
+ super.cleanup();
+
+ for (IContextStepper stepper : steppers) {
+ stepper.cleanup();
+ }
+ steppers.clear();
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/stepper/SingleContextStepper.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/stepper/SingleContextStepper.java
new file mode 100644
index 000000000..6dabc167c
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/stepper/SingleContextStepper.java
@@ -0,0 +1,107 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.runtime.stepper.stepper;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.tcf.te.runtime.stepper.StepperManager;
+import org.eclipse.tcf.te.runtime.stepper.activator.CoreBundleActivator;
+import org.eclipse.tcf.te.runtime.stepper.extensions.AbstractContextStepper;
+import org.eclipse.tcf.te.runtime.stepper.extensions.ContextStepExecutor;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.IContext;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStep;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStepExecutor;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStepGroup;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStepperProperties;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.IFullQualifiedId;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.tracing.ITraceIds;
+
+/**
+ * A single context stepper implementation.
+ * <p>
+ * The single context stepper implementation applies following assumptions:
+ * <ul>
+ * <li>The step group to execute needs to be passed to the stepper via the properties container
+ * given by the {@link #onInitialize(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer, org.eclipse.tcf.te.runtime.stepper.interfaces.IFullQualifiedId, org.eclipse.core.runtime.IProgressMonitor)}
+ * call.</li>
+ * <li>The stepper executes single steps through {@link DefaultStepExecutor}.
+ * <li>The stepper stops the step group execution if the progress monitor is set to canceled
+ * or a status with severity {@link IStatus#CANCEL} is thrown by a single step.
+ * <li>The stepper stops the step group execution on first error.</li>
+ * <li>The stepper collect warnings and information thrown by the single steps till the
+ * end of the step group execution. Warnings and information are not stopping the execution.</li>
+ * <li>The stepper ignores any status thrown by the single steps with severity {@link IStatus#OK}.</li>
+ * <li>A single stepper instance can execute only one step group at a time.</li>
+ * </ul>
+ * <p>
+ * The stepper implementation can be traced and profiled by setting the debug options:
+ * <ul>
+ * <li><i>org.eclipse.tcf.te.runtime.stepper/trace/stepping</i></li>
+ * <li><i>org.eclipse.tcf.te.runtime.stepper/profile/stepping</i></li>
+ * </ul>
+ */
+public class SingleContextStepper extends AbstractContextStepper {
+
+ /**
+ * Constructor.
+ */
+ public SingleContextStepper() {
+ super();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.stepper.extensions.AbstractContextStepper#getName()
+ */
+ @Override
+ protected String getName() {
+ return getData() != null ? getData().getStringProperty(IContextStepperProperties.PROP_NAME) : null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.stepper.extensions.AbstractContextStepper#getContexts()
+ */
+ @Override
+ protected IContext[] getContexts() {
+ return getData() != null && getData().getProperty(IContextStepperProperties.PROP_CONTEXTS) != null ? (IContext[])getData().getProperty(IContextStepperProperties.PROP_CONTEXTS) : new IContext[0];
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.stepper.extensions.AbstractContextStepper#getStepGroupId()
+ */
+ @Override
+ protected String getStepGroupId() {
+ return getData() != null ? getData().getStringProperty(IContextStepperProperties.PROP_STEP_GROUP_ID) : null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.stepper.extensions.AbstractContextStepper#getStepGroup(java.lang.String)
+ */
+ @Override
+ protected IContextStepGroup getStepGroup(String id) {
+ Assert.isNotNull(id);
+
+ CoreBundleActivator.getTraceHandler().trace("SingleContextStepper#getStepGroup:" //$NON-NLS-1$
+ + " id = '" + id + "'", //$NON-NLS-1$ //$NON-NLS-2$
+ 0, ITraceIds.TRACE_STEPPING, IStatus.WARNING, this);
+
+ return StepperManager.getInstance().getStepGroupExtManager().getStepGroup(id, false);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.stepper.extensions.AbstractContextStepper#doCreateStepExecutor(org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStep, java.lang.String, org.eclipse.tcf.te.runtime.stepper.interfaces.IFullQualifiedId)
+ */
+ @Override
+ protected IContextStepExecutor doCreateStepExecutor(IContextStep step, String secondaryId, IFullQualifiedId fullQualifiedStepId) {
+ Assert.isNotNull(step);
+ Assert.isNotNull(secondaryId);
+ Assert.isNotNull(fullQualifiedStepId);
+ return new ContextStepExecutor();
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/.classpath b/target_explorer/plugins/org.eclipse.tcf.te.runtime/.classpath
index 8a8f1668c..8a8f1668c 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/.classpath
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/.classpath
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime/.options b/target_explorer/plugins/org.eclipse.tcf.te.runtime/.options
new file mode 100644
index 000000000..8007ca6e8
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/.options
@@ -0,0 +1,3 @@
+org.eclipse.tcf.te.runtime/debugmode = 0
+org.eclipse.tcf.te.runtime/trace/events = false
+org.eclipse.tcf.te.runtime/trace/callbacks = false \ No newline at end of file
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.forms/.project b/target_explorer/plugins/org.eclipse.tcf.te.runtime/.project
index 95f1a892d..bc051fabc 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.forms/.project
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/.project
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.eclipse.tm.te.ui.forms</name>
+ <name>org.eclipse.tcf.te.runtime</name>
<comment></comment>
<projects>
</projects>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime/.settings/org.eclipse.jdt.core.prefs b/target_explorer/plugins/org.eclipse.tcf.te.runtime/.settings/org.eclipse.jdt.core.prefs
index c55229c20..c55229c20 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime/.settings/org.eclipse.jdt.core.prefs
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/.settings/org.eclipse.jdt.core.prefs
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime/.settings/org.eclipse.jdt.ui.prefs b/target_explorer/plugins/org.eclipse.tcf.te.runtime/.settings/org.eclipse.jdt.ui.prefs
index f0cb789c8..f0cb789c8 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime/.settings/org.eclipse.jdt.ui.prefs
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/.settings/org.eclipse.jdt.ui.prefs
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.runtime/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..efbc17b77
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/META-INF/MANIFEST.MF
@@ -0,0 +1,30 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.tcf.te.runtime;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipse.tcf.te.runtime.activator.CoreBundleActivator
+Bundle-Vendor: %providerName
+Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
+ org.eclipse.core.expressions;bundle-version="3.4.300"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
+Bundle-Localization: plugin
+Export-Package: org.eclipse.tcf.te.runtime.activator,
+ org.eclipse.tcf.te.runtime.callback,
+ org.eclipse.tcf.te.runtime.events,
+ org.eclipse.tcf.te.runtime.extensions,
+ org.eclipse.tcf.te.runtime.interfaces,
+ org.eclipse.tcf.te.runtime.interfaces.callback,
+ org.eclipse.tcf.te.runtime.interfaces.events,
+ org.eclipse.tcf.te.runtime.interfaces.extensions,
+ org.eclipse.tcf.te.runtime.interfaces.properties,
+ org.eclipse.tcf.te.runtime.interfaces.tracing,
+ org.eclipse.tcf.te.runtime.interfaces.workingsets,
+ org.eclipse.tcf.te.runtime.internal;x-internal:=true,
+ org.eclipse.tcf.te.runtime.nls,
+ org.eclipse.tcf.te.runtime.preferences,
+ org.eclipse.tcf.te.runtime.properties,
+ org.eclipse.tcf.te.runtime.tracing,
+ org.eclipse.tcf.te.runtime.utils,
+ org.eclipse.tcf.te.runtime.utils.net
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/build.properties b/target_explorer/plugins/org.eclipse.tcf.te.runtime/build.properties
index 73a5119ed..73a5119ed 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/build.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/build.properties
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.runtime/plugin.properties
index 9c7916135..9c7916135 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime/plugin.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/plugin.properties
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime/plugin.xml b/target_explorer/plugins/org.eclipse.tcf.te.runtime/plugin.xml
new file mode 100644
index 000000000..a438a00c9
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/plugin.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+
+<!-- Extension points -->
+ <extension-point id="eventListeners" name="Event Listener Contributions" schema="schema/eventListeners.exsd"/>
+
+<!-- Eclipse core expressions property tester -->
+ <extension point="org.eclipse.core.expressions.propertyTesters">
+ <propertyTester
+ class="org.eclipse.tcf.te.runtime.internal.PreferencesPropertyTester"
+ id="org.eclipse.tcf.te.runtime.PreferencesPropertyTester"
+ namespace="org.eclipse.tcf.te.runtime"
+ properties="preference"
+ type="java.lang.Object">
+ </propertyTester>
+
+ <propertyTester
+ class="org.eclipse.tcf.te.runtime.internal.PropertiesContainerPropertyTester"
+ id="org.eclipse.tcf.te.runtime.PropertiesContainerPropertyTester"
+ namespace="org.eclipse.tcf.te.runtime"
+ properties="isProperty"
+ type="org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer">
+ </propertyTester>
+ </extension>
+
+<!-- Event listener contributions -->
+ <extension point="org.eclipse.tcf.te.runtime.eventListeners">
+ <eventListener class="org.eclipse.tcf.te.runtime.internal.DebugEventListener"/>
+ </extension>
+
+</plugin>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.core/pom.xml b/target_explorer/plugins/org.eclipse.tcf.te.runtime/pom.xml
index c47fb6349..7f2d0777d 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.core/pom.xml
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/pom.xml
@@ -7,11 +7,11 @@
<parent>
<groupId>org.eclipse.tcf</groupId>
<artifactId>tcf-parent</artifactId>
- <version>0.5.0-SNAPSHOT</version>
+ <version>1.0.0-SNAPSHOT</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<version>1.0.0.qualifier</version>
- <artifactId>org.eclipse.tm.te.tcf.core</artifactId>
+ <artifactId>org.eclipse.tcf.te.runtime</artifactId>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime/schema/eventListeners.exsd b/target_explorer/plugins/org.eclipse.tcf.te.runtime/schema/eventListeners.exsd
index a0db136e1..8669faf2b 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime/schema/eventListeners.exsd
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/schema/eventListeners.exsd
@@ -1,9 +1,9 @@
<?xml version='1.0' encoding='UTF-8'?>
<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.tm.te.runtime" xmlns="http://www.w3.org/2001/XMLSchema">
+<schema targetNamespace="org.eclipse.tcf.te.runtime" xmlns="http://www.w3.org/2001/XMLSchema">
<annotation>
<appinfo>
- <meta.schema plugin="org.eclipse.tm.te.runtime" id="eventListeners" name="Event Listeners"/>
+ <meta.schema plugin="org.eclipse.tcf.te.runtime" id="eventListeners" name="Event Listeners"/>
</appinfo>
<documentation>
This extension point is used to contribute event listeners.
@@ -56,10 +56,10 @@
<attribute name="class" type="string" use="required">
<annotation>
<documentation>
- A fully qualified name of the Java class implementing &lt;code&gt;org.eclipse.tm.te.runtime.interfaces.events.IEventListener&lt;/code&gt;.
+ A fully qualified name of the Java class implementing &lt;code&gt;org.eclipse.tcf.te.runtime.interfaces.events.IEventListener&lt;/code&gt;.
</documentation>
<appinfo>
- <meta.attribute kind="java" basedOn=":org.eclipse.tm.te.runtime.interfaces.events.IEventListener"/>
+ <meta.attribute kind="java" basedOn=":org.eclipse.tcf.te.runtime.interfaces.events.IEventListener"/>
</appinfo>
</annotation>
</attribute>
@@ -134,9 +134,9 @@
The following is an example of this extension point&apos;s usage:
&lt;p&gt;
&lt;pre&gt;
- &lt;extension point=&quot;org.eclipse.tm.te.runtime.eventListeners&quot;&gt;
+ &lt;extension point=&quot;org.eclipse.tcf.te.runtime.eventListeners&quot;&gt;
&lt;eventListener
- class=&quot;org.eclipse.tm.te.ui.MyEventListener&quot;
+ class=&quot;org.eclipse.tcf.te.ui.MyEventListener&quot;
forcePluginActivation=&quot;false&quot;&gt;
&lt;eventType class=&quot;org.eclipse.tme.te.runtime.events.PropertyChangeEvent&quot;/&gt;
&lt;/eventListener&gt;
@@ -150,7 +150,7 @@
<meta.section type="apiinfo"/>
</appinfo>
<documentation>
- The provider of a event listener must implement &lt;samp&gt;org.eclipse.tm.te.runtime.interfaces.events.IEventListener&lt;/samp&gt;.
+ The provider of a event listener must implement &lt;samp&gt;org.eclipse.tcf.te.runtime.interfaces.events.IEventListener&lt;/samp&gt;.
</documentation>
</annotation>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/activator/CoreBundleActivator.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/activator/CoreBundleActivator.java
index a8ca3f56e..6a3a94656 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/activator/CoreBundleActivator.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/activator/CoreBundleActivator.java
@@ -7,9 +7,9 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.activator;
+package org.eclipse.tcf.te.runtime.activator;
-import org.eclipse.tm.te.runtime.tracing.TraceHandler;
+import org.eclipse.tcf.te.runtime.tracing.TraceHandler;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/callback/Callback.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/callback/Callback.java
index 53da00558..1b1cf7ec7 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/callback/Callback.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/callback/Callback.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.callback;
+package org.eclipse.tcf.te.runtime.callback;
import java.util.Arrays;
import java.util.List;
@@ -17,11 +17,11 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.core.runtime.Status;
-import org.eclipse.tm.te.runtime.activator.CoreBundleActivator;
-import org.eclipse.tm.te.runtime.interfaces.IConditionTester;
-import org.eclipse.tm.te.runtime.interfaces.callback.ICallback;
-import org.eclipse.tm.te.runtime.properties.PropertiesContainer;
-import org.eclipse.tm.te.runtime.utils.ProgressHelper;
+import org.eclipse.tcf.te.runtime.activator.CoreBundleActivator;
+import org.eclipse.tcf.te.runtime.interfaces.IConditionTester;
+import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback;
+import org.eclipse.tcf.te.runtime.properties.PropertiesContainer;
+import org.eclipse.tcf.te.runtime.utils.ProgressHelper;
/**
* Default implementation of the <code>ICallback</code> interface.
@@ -70,7 +70,7 @@ public class Callback extends PropertiesContainer implements ICallback {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.IConditionTester#isConditionFulfilled()
+ * @see org.eclipse.tcf.te.runtime.interfaces.IConditionTester#isConditionFulfilled()
*/
@Override
public boolean isConditionFulfilled() {
@@ -81,7 +81,7 @@ public class Callback extends PropertiesContainer implements ICallback {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.IConditionTester#cleanup()
+ * @see org.eclipse.tcf.te.runtime.interfaces.IConditionTester#cleanup()
*/
@Override
public void cleanup() {
@@ -146,7 +146,7 @@ public class Callback extends PropertiesContainer implements ICallback {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.callback.ICallback#done(java.lang.Object, org.eclipse.core.runtime.IStatus)
+ * @see org.eclipse.tcf.te.runtime.interfaces.callback.ICallback#done(java.lang.Object, org.eclipse.core.runtime.IStatus)
*/
@Override
public final void done(Object caller, IStatus status) {
@@ -280,7 +280,7 @@ public class Callback extends PropertiesContainer implements ICallback {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.callback.ICallback#isDone()
+ * @see org.eclipse.tcf.te.runtime.interfaces.callback.ICallback#isDone()
*/
@Override
public final boolean isDone() {
@@ -288,7 +288,7 @@ public class Callback extends PropertiesContainer implements ICallback {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.callback.ICallback#addParentCallback(org.eclipse.tm.te.runtime.interfaces.callback.ICallback)
+ * @see org.eclipse.tcf.te.runtime.interfaces.callback.ICallback#addParentCallback(org.eclipse.tcf.te.runtime.interfaces.callback.ICallback)
*/
@Override
public void addParentCallback(ICallback callback) {
@@ -301,7 +301,7 @@ public class Callback extends PropertiesContainer implements ICallback {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.callback.ICallback#setResult(java.lang.Object)
+ * @see org.eclipse.tcf.te.runtime.interfaces.callback.ICallback#setResult(java.lang.Object)
*/
@Override
public void setResult(Object result) {
@@ -309,7 +309,7 @@ public class Callback extends PropertiesContainer implements ICallback {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.callback.ICallback#getResult()
+ * @see org.eclipse.tcf.te.runtime.interfaces.callback.ICallback#getResult()
*/
@Override
public Object getResult() {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/events/ChangeEvent.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/events/ChangeEvent.java
index 33a2f28e1..2d238950e 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/events/ChangeEvent.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/events/ChangeEvent.java
@@ -7,12 +7,12 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.events;
+package org.eclipse.tcf.te.runtime.events;
import java.util.EventObject;
-import org.eclipse.tm.te.runtime.activator.CoreBundleActivator;
-import org.eclipse.tm.te.runtime.interfaces.tracing.ITraceIds;
+import org.eclipse.tcf.te.runtime.activator.CoreBundleActivator;
+import org.eclipse.tcf.te.runtime.interfaces.tracing.ITraceIds;
/**
* Common change event implementation.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/events/DisposedEvent.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/events/DisposedEvent.java
index fc8eee27c..7b0df0619 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/events/DisposedEvent.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/events/DisposedEvent.java
@@ -7,12 +7,12 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.events;
+package org.eclipse.tcf.te.runtime.events;
import java.util.EventObject;
-import org.eclipse.tm.te.runtime.activator.CoreBundleActivator;
-import org.eclipse.tm.te.runtime.interfaces.tracing.ITraceIds;
+import org.eclipse.tcf.te.runtime.activator.CoreBundleActivator;
+import org.eclipse.tcf.te.runtime.interfaces.tracing.ITraceIds;
/**
* Event used to signal the disposal of an element.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/events/EventManager.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/events/EventManager.java
index d38686eee..3cd413306 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/events/EventManager.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/events/EventManager.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.events;
+package org.eclipse.tcf.te.runtime.events;
import java.util.ArrayList;
import java.util.EventListener;
@@ -20,10 +20,10 @@ import org.eclipse.core.runtime.IExtension;
import org.eclipse.core.runtime.IExtensionPoint;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
-import org.eclipse.tm.te.runtime.activator.CoreBundleActivator;
-import org.eclipse.tm.te.runtime.interfaces.events.IEventFireDelegate;
-import org.eclipse.tm.te.runtime.interfaces.events.IEventListener;
-import org.eclipse.tm.te.runtime.interfaces.tracing.ITraceIds;
+import org.eclipse.tcf.te.runtime.activator.CoreBundleActivator;
+import org.eclipse.tcf.te.runtime.interfaces.events.IEventFireDelegate;
+import org.eclipse.tcf.te.runtime.interfaces.events.IEventListener;
+import org.eclipse.tcf.te.runtime.interfaces.tracing.ITraceIds;
import org.osgi.framework.Bundle;
@@ -336,7 +336,7 @@ public final class EventManager {
* Register change listeners defined by extension.
*/
private void addExtensionPointNotificationListeners() {
- IExtensionPoint ep = Platform.getExtensionRegistry().getExtensionPoint("org.eclipse.tm.te.runtime.eventListeners"); //$NON-NLS-1$
+ IExtensionPoint ep = Platform.getExtensionRegistry().getExtensionPoint("org.eclipse.tcf.te.runtime.eventListeners"); //$NON-NLS-1$
if (ep != null) {
IExtension[] extensions = ep.getExtensions();
if (extensions != null && extensions.length > 0) {
@@ -495,7 +495,7 @@ public final class EventManager {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.events.IEventListener#eventFired(java.util.EventObject)
+ * @see org.eclipse.tcf.te.runtime.interfaces.events.IEventListener#eventFired(java.util.EventObject)
*/
@Override
public void eventFired(EventObject event) {
@@ -507,7 +507,7 @@ public final class EventManager {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.events.IEventFireDelegate#fire(java.lang.Runnable)
+ * @see org.eclipse.tcf.te.runtime.interfaces.events.IEventFireDelegate#fire(java.lang.Runnable)
*/
@Override
public void fire(Runnable runnable) {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/extensions/AbstractExtensionPointManager.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/extensions/AbstractExtensionPointManager.java
index 20b181269..336f3b0c5 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/extensions/AbstractExtensionPointManager.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/extensions/AbstractExtensionPointManager.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.extensions;
+package org.eclipse.tcf.te.runtime.extensions;
import java.util.ArrayList;
import java.util.Arrays;
@@ -26,8 +26,8 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
import org.eclipse.osgi.util.NLS;
-import org.eclipse.tm.te.runtime.activator.CoreBundleActivator;
-import org.eclipse.tm.te.runtime.nls.Messages;
+import org.eclipse.tcf.te.runtime.activator.CoreBundleActivator;
+import org.eclipse.tcf.te.runtime.nls.Messages;
/**
* Abstract extension point manager implementation.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/extensions/ExecutableExtension.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/extensions/ExecutableExtension.java
index 983564b44..3859e43b7 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/extensions/ExecutableExtension.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/extensions/ExecutableExtension.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.extensions;
+package org.eclipse.tcf.te.runtime.extensions;
import java.util.Hashtable;
@@ -18,9 +18,9 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.PlatformObject;
import org.eclipse.core.runtime.Status;
import org.eclipse.osgi.util.NLS;
-import org.eclipse.tm.te.runtime.activator.CoreBundleActivator;
-import org.eclipse.tm.te.runtime.interfaces.extensions.IExecutableExtension;
-import org.eclipse.tm.te.runtime.nls.Messages;
+import org.eclipse.tcf.te.runtime.activator.CoreBundleActivator;
+import org.eclipse.tcf.te.runtime.interfaces.extensions.IExecutableExtension;
+import org.eclipse.tcf.te.runtime.nls.Messages;
/**
* Executable extension implementation.
@@ -111,7 +111,7 @@ public class ExecutableExtension extends PlatformObject implements IExecutableEx
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.extensions.IExecutableExtension#getId()
+ * @see org.eclipse.tcf.te.runtime.interfaces.extensions.IExecutableExtension#getId()
*/
@Override
public String getId() {
@@ -119,7 +119,7 @@ public class ExecutableExtension extends PlatformObject implements IExecutableEx
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.extensions.IExecutableExtension#getLabel()
+ * @see org.eclipse.tcf.te.runtime.interfaces.extensions.IExecutableExtension#getLabel()
*/
@Override
public String getLabel() {
@@ -127,7 +127,7 @@ public class ExecutableExtension extends PlatformObject implements IExecutableEx
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.extensions.IExecutableExtension#getDescription()
+ * @see org.eclipse.tcf.te.runtime.interfaces.extensions.IExecutableExtension#getDescription()
*/
@Override
public String getDescription() {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/extensions/ExecutableExtensionProxy.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/extensions/ExecutableExtensionProxy.java
index 345f11baf..3b3100195 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/extensions/ExecutableExtensionProxy.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/extensions/ExecutableExtensionProxy.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.extensions;
+package org.eclipse.tcf.te.runtime.extensions;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.CoreException;
@@ -16,8 +16,8 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
import org.eclipse.osgi.util.NLS;
-import org.eclipse.tm.te.runtime.activator.CoreBundleActivator;
-import org.eclipse.tm.te.runtime.nls.Messages;
+import org.eclipse.tcf.te.runtime.activator.CoreBundleActivator;
+import org.eclipse.tcf.te.runtime.nls.Messages;
/**
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/extensions/ExtensionPointComparator.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/extensions/ExtensionPointComparator.java
index 2af3730ed..df602dd1d 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/extensions/ExtensionPointComparator.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/extensions/ExtensionPointComparator.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.extensions;
+package org.eclipse.tcf.te.runtime.extensions;
import java.util.Comparator;
@@ -19,14 +19,14 @@ import org.eclipse.core.runtime.IExtension;
* The comparator assure that extension are read in a predictable order.
* <p>
* The order of the extensions is defined as following:<br>
- * <ul><li>Extensions contributed by Target Explorer plug-ins (<code>org.eclipse.tm.te.*</code>)
+ * <ul><li>Extensions contributed by Target Explorer plug-ins (<code>org.eclipse.tcf.te.*</code>)
* in ascending alphabetic order and</li>
* <li>Extensions contributed by any other plug-in in ascending alphabetic order.</li>
* <li>Extensions contributed by the same plug-in in ascending alphabetic order by the
* extensions unique id</li>
*/
public class ExtensionPointComparator implements Comparator<IExtension> {
- private final static String TARGET_EXPLORER_PLUGINS_PATTERN = "org.eclipse.tm.te."; //$NON-NLS-1$
+ private final static String TARGET_EXPLORER_PLUGINS_PATTERN = "org.eclipse.tcf.te."; //$NON-NLS-1$
/* (non-Javadoc)
* @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/interfaces/IConditionTester.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/interfaces/IConditionTester.java
index 4b200a9ff..7edfc79dd 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/interfaces/IConditionTester.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/interfaces/IConditionTester.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.interfaces;
+package org.eclipse.tcf.te.runtime.interfaces;
/**
* This interface must be implemented by callers of the executors utilities
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/internal/navigator/LabelProviderDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/interfaces/IDisposable.java
index ac9e88d9f..dcb2a3b66 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/internal/navigator/LabelProviderDelegate.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/interfaces/IDisposable.java
@@ -1,21 +1,21 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.te.ui.views.internal.navigator;
-
-import org.eclipse.jface.viewers.LabelProvider;
-
-
-/**
- * Label provider delegate implementation.
- */
-public class LabelProviderDelegate extends LabelProvider {
-
-
-}
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.runtime.interfaces;
+
+/**
+ * A disposable artifact.
+ */
+public interface IDisposable {
+
+ /**
+ * Dispose the artifact.
+ */
+ public void dispose();
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/interfaces/ISharedConstants.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/interfaces/ISharedConstants.java
index ff2538f90..dba2d0842 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/interfaces/ISharedConstants.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/interfaces/ISharedConstants.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.interfaces;
+package org.eclipse.tcf.te.runtime.interfaces;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/interfaces/callback/ICallback.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/interfaces/callback/ICallback.java
index 1c1b5dfaf..5514c31ef 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/interfaces/callback/ICallback.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/interfaces/callback/ICallback.java
@@ -7,12 +7,12 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.interfaces.callback;
+package org.eclipse.tcf.te.runtime.interfaces.callback;
import javax.security.auth.callback.Callback;
import org.eclipse.core.runtime.IStatus;
-import org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
/**
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/interfaces/events/IEventFireDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/interfaces/events/IEventFireDelegate.java
index 3eb6d5938..305550280 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/interfaces/events/IEventFireDelegate.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/interfaces/events/IEventFireDelegate.java
@@ -8,7 +8,7 @@
* of this software may be licensed only pursuant to the terms
* of an applicable Wind River license agreement.
*/
-package org.eclipse.tm.te.runtime.interfaces.events;
+package org.eclipse.tcf.te.runtime.interfaces.events;
/**
* Common interface for notification fire delegate listeners.<br>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/interfaces/events/IEventListener.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/interfaces/events/IEventListener.java
index c5c9135f7..23ed2b413 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/interfaces/events/IEventListener.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/interfaces/events/IEventListener.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.interfaces.events;
+package org.eclipse.tcf.te.runtime.interfaces.events;
import java.util.EventListener;
import java.util.EventObject;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/interfaces/extensions/IExecutableExtension.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/interfaces/extensions/IExecutableExtension.java
index 9374a5288..4b8de1540 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/interfaces/extensions/IExecutableExtension.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/interfaces/extensions/IExecutableExtension.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.interfaces.extensions;
+package org.eclipse.tcf.te.runtime.interfaces.extensions;
/**
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/interfaces/properties/IPropertiesContainer.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/interfaces/properties/IPropertiesContainer.java
index cc4a2b8af..fcdb1316d 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/interfaces/properties/IPropertiesContainer.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/interfaces/properties/IPropertiesContainer.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.interfaces.properties;
+package org.eclipse.tcf.te.runtime.interfaces.properties;
import java.util.Map;
import java.util.UUID;
@@ -42,8 +42,20 @@ public interface IPropertiesContainer extends IAdaptable {
public boolean changeEventsEnabled();
/**
+ * Fires a change event with the given parameter.
+ *
+ * @param key The property key. Must not be <code>null</code>.
+ * @param oldValue The old properties value, or <code>null</code>.
+ * @param newValue The new properties value, or <code>null</code>.
+ */
+ public void fireChangeEvent(String key, Object oldValue, Object newValue);
+
+ /**
* Set the properties from the given map. Calling this method
* will overwrite all previous set properties.
+ * <p>
+ * <b>Note:</b> The method will have no effect if the given properties are the
+ * same as the already set properties.
*
* @param properties The map of properties to set. Must not be <code>null</code>.
*/
@@ -214,6 +226,13 @@ public interface IPropertiesContainer extends IAdaptable {
public void clearProperties();
/**
+ * Returns whether this properties container is empty or not.
+ *
+ * @return <code>True</code> if the properties container is empty, <code>false</code> if not.
+ */
+ public boolean isEmpty();
+
+ /**
* Test if the property value stored under the given property is equal ignoring the case to the given
* expected string value.
*
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/interfaces/tracing/ITraceIds.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/interfaces/tracing/ITraceIds.java
index 87debe517..f9fe03e7c 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/interfaces/tracing/ITraceIds.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/interfaces/tracing/ITraceIds.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.interfaces.tracing;
+package org.eclipse.tcf.te.runtime.interfaces.tracing;
/**
* Runtime plug-in trace slot identifiers.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/interfaces/workingsets/IWorkingSetElement.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/interfaces/workingsets/IWorkingSetElement.java
index c95f859c6..fdeba61e1 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/interfaces/workingsets/IWorkingSetElement.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/interfaces/workingsets/IWorkingSetElement.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.interfaces.workingsets;
+package org.eclipse.tcf.te.runtime.interfaces.workingsets;
import org.eclipse.core.runtime.IAdaptable;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/internal/DebugEventListener.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/internal/DebugEventListener.java
index ca4b43121..ab56d02ee 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/internal/DebugEventListener.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/internal/DebugEventListener.java
@@ -7,14 +7,14 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.internal;
+package org.eclipse.tcf.te.runtime.internal;
import java.util.EventObject;
import org.eclipse.core.runtime.IStatus;
-import org.eclipse.tm.te.runtime.activator.CoreBundleActivator;
-import org.eclipse.tm.te.runtime.interfaces.events.IEventListener;
-import org.eclipse.tm.te.runtime.interfaces.tracing.ITraceIds;
+import org.eclipse.tcf.te.runtime.activator.CoreBundleActivator;
+import org.eclipse.tcf.te.runtime.interfaces.events.IEventListener;
+import org.eclipse.tcf.te.runtime.interfaces.tracing.ITraceIds;
/**
* Event listener for internal debugging purpose.
@@ -22,7 +22,7 @@ import org.eclipse.tm.te.runtime.interfaces.tracing.ITraceIds;
public class DebugEventListener implements IEventListener {
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.events.IEventListener#eventFired(java.util.EventObject)
+ * @see org.eclipse.tcf.te.runtime.interfaces.events.IEventListener#eventFired(java.util.EventObject)
*/
@Override
public void eventFired(EventObject event) {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/internal/PreferencesPropertyTester.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/internal/PreferencesPropertyTester.java
index a119f4e9f..7b9f164a1 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/internal/PreferencesPropertyTester.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/internal/PreferencesPropertyTester.java
@@ -7,12 +7,12 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.internal;
+package org.eclipse.tcf.te.runtime.internal;
import org.eclipse.core.expressions.PropertyTester;
import org.eclipse.core.runtime.Platform;
-import org.eclipse.tm.te.runtime.activator.CoreBundleActivator;
-import org.eclipse.tm.te.runtime.preferences.ScopedEclipsePreferences;
+import org.eclipse.tcf.te.runtime.activator.CoreBundleActivator;
+import org.eclipse.tcf.te.runtime.preferences.ScopedEclipsePreferences;
/**
* Preferences property tester implementation.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/internal/PropertiesContainerPropertyTester.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/internal/PropertiesContainerPropertyTester.java
index 2735def4d..34f1bf449 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/internal/PropertiesContainerPropertyTester.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/internal/PropertiesContainerPropertyTester.java
@@ -7,11 +7,11 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.internal;
+package org.eclipse.tcf.te.runtime.internal;
import org.eclipse.core.expressions.PropertyTester;
import org.eclipse.core.runtime.Assert;
-import org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
/**
* Property tester implementation for objects of type {@link IPropertiesContainer}.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/nls/Messages.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/nls/Messages.java
index 7763b0a82..bd95b364f 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/nls/Messages.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/nls/Messages.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.nls;
+package org.eclipse.tcf.te.runtime.nls;
import org.eclipse.osgi.util.NLS;
@@ -17,7 +17,7 @@ import org.eclipse.osgi.util.NLS;
public class Messages extends NLS {
// The plug-in resource bundle name
- private static final String BUNDLE_NAME = "org.eclipse.tm.te.runtime.nls.Messages"; //$NON-NLS-1$
+ private static final String BUNDLE_NAME = "org.eclipse.tcf.te.runtime.nls.Messages"; //$NON-NLS-1$
/**
* Static constructor.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/nls/Messages.properties b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/nls/Messages.properties
index 0867746ba..f8468eb14 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/nls/Messages.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/nls/Messages.properties
@@ -1,5 +1,5 @@
#
-# org.eclipse.tm.te.runtime
+# org.eclipse.tcf.te.runtime
# Externalized Strings.
#
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/preferences/ScopedEclipsePreferences.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/preferences/ScopedEclipsePreferences.java
index 7d3c9ff20..cfb68e4fa 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/preferences/ScopedEclipsePreferences.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/preferences/ScopedEclipsePreferences.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.preferences;
+package org.eclipse.tcf.te.runtime.preferences;
import java.io.OutputStream;
import java.util.Map;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/properties/PropertiesContainer.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/properties/PropertiesContainer.java
index dbf478b23..e85c7a387 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/properties/PropertiesContainer.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/properties/PropertiesContainer.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.properties;
+package org.eclipse.tcf.te.runtime.properties;
import java.util.Collections;
import java.util.EventObject;
@@ -19,11 +19,11 @@ import java.util.UUID;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.PlatformObject;
-import org.eclipse.tm.te.runtime.activator.CoreBundleActivator;
-import org.eclipse.tm.te.runtime.events.ChangeEvent;
-import org.eclipse.tm.te.runtime.events.EventManager;
-import org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer;
-import org.eclipse.tm.te.runtime.interfaces.tracing.ITraceIds;
+import org.eclipse.tcf.te.runtime.activator.CoreBundleActivator;
+import org.eclipse.tcf.te.runtime.events.ChangeEvent;
+import org.eclipse.tcf.te.runtime.events.EventManager;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.runtime.interfaces.tracing.ITraceIds;
/**
* A generic properties container implementation.
@@ -66,7 +66,7 @@ public class PropertiesContainer extends PlatformObject implements IPropertiesCo
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.IPropertiesContainer#getUUID()
+ * @see org.eclipse.tcf.te.runtime.interfaces.IPropertiesContainer#getUUID()
*/
@Override
public final UUID getUUID() {
@@ -126,7 +126,7 @@ public class PropertiesContainer extends PlatformObject implements IPropertiesCo
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.nodes.IPropertiesContainer#setChangeEventsEnabled(boolean)
+ * @see org.eclipse.tcf.te.runtime.interfaces.nodes.IPropertiesContainer#setChangeEventsEnabled(boolean)
*/
@Override
public final boolean setChangeEventsEnabled(boolean enabled) {
@@ -136,19 +136,29 @@ public class PropertiesContainer extends PlatformObject implements IPropertiesCo
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.nodes.IPropertiesContainer#changeEventsEnabled()
+ * @see org.eclipse.tcf.te.runtime.interfaces.nodes.IPropertiesContainer#changeEventsEnabled()
*/
@Override
public final boolean changeEventsEnabled() {
return changeEventsEnabled;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer#fireChangeEvent(java.lang.String, java.lang.Object, java.lang.Object)
+ */
+ @Override
+ public void fireChangeEvent(String key, Object oldValue, Object newValue) {
+ Assert.isNotNull(key);
+ EventObject event = newEvent(this, key, oldValue, newValue);
+ if (event != null) EventManager.getInstance().fireEvent(event);
+ }
+
/**
* Creates a new property change notification event object. The event object is initialized
* with the given parameter.
* <p>
- * This method is typically called from {@link #setProperty(String, Object)} in case the
- * property changed it's value. <code>Null</code> is returned if no event should be fired.
+ * This method is typically called from {@link #fireChangeEvent(String, Object, Object)}.
+ * <code>Null</code> is returned if no event should be fired.
*
* @param source The source object. Must not be <code>null</code>.
* @param key The property key. Must not be <code>null</code>.
@@ -157,7 +167,7 @@ public class PropertiesContainer extends PlatformObject implements IPropertiesCo
*
* @return The new property change notification event instance or <code>null</code>.
*/
- public final EventObject newEvent(Object source, String key, Object oldValue, Object newValue) {
+ private final EventObject newEvent(Object source, String key, Object oldValue, Object newValue) {
Assert.isNotNull(source);
Assert.isNotNull(key);
@@ -227,7 +237,7 @@ public class PropertiesContainer extends PlatformObject implements IPropertiesCo
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.IPropertiesContainer#getProperties()
+ * @see org.eclipse.tcf.te.runtime.interfaces.IPropertiesContainer#getProperties()
*/
@Override
public Map<String, Object> getProperties() {
@@ -236,7 +246,7 @@ public class PropertiesContainer extends PlatformObject implements IPropertiesCo
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.IPropertiesContainer#getProperty(java.lang.String)
+ * @see org.eclipse.tcf.te.runtime.interfaces.IPropertiesContainer#getProperty(java.lang.String)
*/
@Override
public Object getProperty(String key) {
@@ -245,7 +255,7 @@ public class PropertiesContainer extends PlatformObject implements IPropertiesCo
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.IPropertiesContainer#getBooleanProperty(java.lang.String)
+ * @see org.eclipse.tcf.te.runtime.interfaces.IPropertiesContainer#getBooleanProperty(java.lang.String)
*/
@Override
public final boolean getBooleanProperty(String key) {
@@ -262,7 +272,7 @@ public class PropertiesContainer extends PlatformObject implements IPropertiesCo
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.IPropertiesContainer#getLongProperty(java.lang.String)
+ * @see org.eclipse.tcf.te.runtime.interfaces.IPropertiesContainer#getLongProperty(java.lang.String)
*/
@Override
public final long getLongProperty(String key) {
@@ -283,7 +293,7 @@ public class PropertiesContainer extends PlatformObject implements IPropertiesCo
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.IPropertiesContainer#getIntProperty(java.lang.String)
+ * @see org.eclipse.tcf.te.runtime.interfaces.IPropertiesContainer#getIntProperty(java.lang.String)
*/
@Override
public final int getIntProperty(String key) {
@@ -298,7 +308,7 @@ public class PropertiesContainer extends PlatformObject implements IPropertiesCo
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.IPropertiesContainer#getStringProperty(java.lang.String)
+ * @see org.eclipse.tcf.te.runtime.interfaces.IPropertiesContainer#getStringProperty(java.lang.String)
*/
@Override
public final String getStringProperty(String key) {
@@ -308,7 +318,7 @@ public class PropertiesContainer extends PlatformObject implements IPropertiesCo
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.IPropertiesContainer#getFloatProperty(java.lang.String)
+ * @see org.eclipse.tcf.te.runtime.interfaces.IPropertiesContainer#getFloatProperty(java.lang.String)
*/
@Override
public final float getFloatProperty(String key) {
@@ -323,7 +333,7 @@ public class PropertiesContainer extends PlatformObject implements IPropertiesCo
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.IPropertiesContainer#getDoubleProperty(java.lang.String)
+ * @see org.eclipse.tcf.te.runtime.interfaces.IPropertiesContainer#getDoubleProperty(java.lang.String)
*/
@Override
public final double getDoubleProperty(String key) {
@@ -339,16 +349,21 @@ public class PropertiesContainer extends PlatformObject implements IPropertiesCo
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.IPropertiesContainer#setProperties(java.util.Map)
+ * @see org.eclipse.tcf.te.runtime.interfaces.IPropertiesContainer#setProperties(java.util.Map)
*/
@Override
public final void setProperties(Map<String, Object> properties) {
Assert.isTrue(checkThreadAccess(), "Illegal Thread Access"); //$NON-NLS-1$
Assert.isNotNull(properties);
+ // Change the properties only if they have changed really
+ if (this.properties.equals(properties)) return;
+
+ // Clear out all old properties
this.properties.clear();
+ // Apply everything from the given properties
this.properties.putAll(properties);
-
+ // And signal the change
postSetProperties(properties);
}
@@ -362,12 +377,11 @@ public class PropertiesContainer extends PlatformObject implements IPropertiesCo
Assert.isTrue(checkThreadAccess(), "Illegal Thread Access"); //$NON-NLS-1$
Assert.isNotNull(properties);
- EventObject event = newEvent(this, "properties", null, properties); //$NON-NLS-1$
- if (event != null) EventManager.getInstance().fireEvent(event);
+ fireChangeEvent("properties", null, properties); //$NON-NLS-1$
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.IPropertiesContainer#setProperty(java.lang.String, boolean)
+ * @see org.eclipse.tcf.te.runtime.interfaces.IPropertiesContainer#setProperty(java.lang.String, boolean)
*/
@Override
public final boolean setProperty(String key, boolean value) {
@@ -379,7 +393,7 @@ public class PropertiesContainer extends PlatformObject implements IPropertiesCo
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.IPropertiesContainer#setProperty(java.lang.String, long)
+ * @see org.eclipse.tcf.te.runtime.interfaces.IPropertiesContainer#setProperty(java.lang.String, long)
*/
@Override
public final boolean setProperty(String key, long value) {
@@ -391,7 +405,7 @@ public class PropertiesContainer extends PlatformObject implements IPropertiesCo
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.IPropertiesContainer#setProperty(java.lang.String, int)
+ * @see org.eclipse.tcf.te.runtime.interfaces.IPropertiesContainer#setProperty(java.lang.String, int)
*/
@Override
public final boolean setProperty(String key, int value) {
@@ -403,7 +417,7 @@ public class PropertiesContainer extends PlatformObject implements IPropertiesCo
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.IPropertiesContainer#setProperty(java.lang.String, float)
+ * @see org.eclipse.tcf.te.runtime.interfaces.IPropertiesContainer#setProperty(java.lang.String, float)
*/
@Override
public final boolean setProperty(String key, float value) {
@@ -415,7 +429,7 @@ public class PropertiesContainer extends PlatformObject implements IPropertiesCo
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.IPropertiesContainer#setProperty(java.lang.String, double)
+ * @see org.eclipse.tcf.te.runtime.interfaces.IPropertiesContainer#setProperty(java.lang.String, double)
*/
@Override
public final boolean setProperty(String key, double value) {
@@ -427,7 +441,7 @@ public class PropertiesContainer extends PlatformObject implements IPropertiesCo
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.IPropertiesContainer#setProperty(java.lang.String, java.lang.Object)
+ * @see org.eclipse.tcf.te.runtime.interfaces.IPropertiesContainer#setProperty(java.lang.String, java.lang.Object)
*/
@Override
public boolean setProperty(String key, Object value) {
@@ -459,12 +473,11 @@ public class PropertiesContainer extends PlatformObject implements IPropertiesCo
Assert.isTrue(checkThreadAccess(), "Illegal Thread Access"); //$NON-NLS-1$
Assert.isNotNull(key);
- EventObject event = newEvent(this, key, oldValue, value);
- if (event != null) EventManager.getInstance().fireEvent(event);
+ fireChangeEvent(key, oldValue, value);
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.IPropertiesContainer#clearProperties()
+ * @see org.eclipse.tcf.te.runtime.interfaces.IPropertiesContainer#clearProperties()
*/
@Override
public final void clearProperties() {
@@ -473,7 +486,16 @@ public class PropertiesContainer extends PlatformObject implements IPropertiesCo
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.IPropertiesContainer#isProperty(java.lang.String, long)
+ * @see org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer#isEmpty()
+ */
+ @Override
+ public boolean isEmpty() {
+ Assert.isTrue(checkThreadAccess(), "Illegal Thread Access"); //$NON-NLS-1$
+ return properties.isEmpty();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.interfaces.IPropertiesContainer#isProperty(java.lang.String, long)
*/
@Override
public final boolean isProperty(String key, long value) {
@@ -481,7 +503,7 @@ public class PropertiesContainer extends PlatformObject implements IPropertiesCo
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.IPropertiesContainer#isProperty(java.lang.String, boolean)
+ * @see org.eclipse.tcf.te.runtime.interfaces.IPropertiesContainer#isProperty(java.lang.String, boolean)
*/
@Override
public final boolean isProperty(String key, boolean value) {
@@ -489,7 +511,7 @@ public class PropertiesContainer extends PlatformObject implements IPropertiesCo
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.IPropertiesContainer#isProperty(java.lang.String, int)
+ * @see org.eclipse.tcf.te.runtime.interfaces.IPropertiesContainer#isProperty(java.lang.String, int)
*/
@Override
public final boolean isProperty(String key, int value) {
@@ -497,7 +519,7 @@ public class PropertiesContainer extends PlatformObject implements IPropertiesCo
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.IPropertiesContainer#isProperty(java.lang.String, float)
+ * @see org.eclipse.tcf.te.runtime.interfaces.IPropertiesContainer#isProperty(java.lang.String, float)
*/
@Override
public final boolean isProperty(String key, float value) {
@@ -505,7 +527,7 @@ public class PropertiesContainer extends PlatformObject implements IPropertiesCo
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.IPropertiesContainer#isProperty(java.lang.String, double)
+ * @see org.eclipse.tcf.te.runtime.interfaces.IPropertiesContainer#isProperty(java.lang.String, double)
*/
@Override
public final boolean isProperty(String key, double value) {
@@ -513,7 +535,7 @@ public class PropertiesContainer extends PlatformObject implements IPropertiesCo
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.IPropertiesContainer#isPropertyIgnoreCase(java.lang.String, java.lang.String)
+ * @see org.eclipse.tcf.te.runtime.interfaces.IPropertiesContainer#isPropertyIgnoreCase(java.lang.String, java.lang.String)
*/
@Override
public final boolean isPropertyIgnoreCase(String key, String value) {
@@ -522,7 +544,7 @@ public class PropertiesContainer extends PlatformObject implements IPropertiesCo
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.IPropertiesContainer#isProperty(java.lang.String, java.lang.Object)
+ * @see org.eclipse.tcf.te.runtime.interfaces.IPropertiesContainer#isProperty(java.lang.String, java.lang.Object)
*/
@Override
public final boolean isProperty(String key, Object value) {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/tracing/TraceHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/tracing/TraceHandler.java
index b322c4585..12e1df46e 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/tracing/TraceHandler.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/tracing/TraceHandler.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.tracing;
+package org.eclipse.tcf.te.runtime.tracing;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IStatus;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/utils/Host.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/utils/Host.java
index 19d589cfb..1fb00f631 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/utils/Host.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/utils/Host.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.utils;
+package org.eclipse.tcf.te.runtime.utils;
import java.io.BufferedReader;
import java.io.File;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/utils/ProgressHelper.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/utils/ProgressHelper.java
index 05b0e29f6..b57290401 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/utils/ProgressHelper.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/utils/ProgressHelper.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.utils;
+package org.eclipse.tcf.te.runtime.utils;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IProgressMonitor;
@@ -16,10 +16,10 @@ import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.tm.te.runtime.activator.CoreBundleActivator;
-import org.eclipse.tm.te.runtime.callback.Callback;
-import org.eclipse.tm.te.runtime.interfaces.callback.ICallback;
-import org.eclipse.tm.te.runtime.interfaces.tracing.ITraceIds;
+import org.eclipse.tcf.te.runtime.activator.CoreBundleActivator;
+import org.eclipse.tcf.te.runtime.callback.Callback;
+import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback;
+import org.eclipse.tcf.te.runtime.interfaces.tracing.ITraceIds;
/**
* Helper implementation to deal with progress monitors and callbacks.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/utils/StatusHelper.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/utils/StatusHelper.java
index 670b2d474..b8aa731f1 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime/src/org/eclipse/tm/te/runtime/utils/StatusHelper.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/utils/StatusHelper.java
@@ -7,13 +7,13 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.runtime.utils;
+package org.eclipse.tcf.te.runtime.utils;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.core.runtime.Status;
-import org.eclipse.tm.te.runtime.activator.CoreBundleActivator;
+import org.eclipse.tcf.te.runtime.activator.CoreBundleActivator;
/**
* Helper implementation to deal with status objects and throwable's.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/utils/IPAddressUtil.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/utils/net/IPAddressUtil.java
index f396ae45e..617450d8d 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/utils/IPAddressUtil.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/utils/net/IPAddressUtil.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.locator.utils;
+package org.eclipse.tcf.te.runtime.utils.net;
import java.net.InetAddress;
import java.net.NetworkInterface;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.log.core/.classpath b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/.classpath
index 8a8f1668c..8a8f1668c 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.log.core/.classpath
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/.classpath
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/.options b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/.options
new file mode 100644
index 000000000..e91fe02ea
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/.options
@@ -0,0 +1 @@
+org.eclipse.tcf.te.tcf.core.scripting/debugmode = 0
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/.project b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/.project
new file mode 100644
index 000000000..c9c936c42
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.tcf.te.tcf.core.scripting</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/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/.settings/org.eclipse.jdt.core.prefs b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..b3cb7eb44
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,362 @@
+#Tue Dec 13 10:49:22 CET 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+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.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.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=enabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=enabled
+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.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=warning
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
+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=warning
+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=enabled
+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.unusedObjectAllocation=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
+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.6
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=0
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=0
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=0
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=0
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=0
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=true
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
+org.eclipse.jdt.core.formatter.comment.line_length=100
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=4
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=4
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=true
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=true
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=true
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=true
+org.eclipse.jdt.core.formatter.lineSplit=100
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=true
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/.settings/org.eclipse.jdt.ui.prefs b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 000000000..4163f4e9a
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,4 @@
+#Tue Dec 13 10:49:21 CET 2011
+eclipse.preferences.version=1
+formatter_profile=_Target Explorer Java STD
+formatter_settings_version=12
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..4b84f66ea
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/META-INF/MANIFEST.MF
@@ -0,0 +1,20 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.tcf.te.tcf.core.scripting;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipse.tcf.te.tcf.core.scripting.activator.CoreBundleActivator
+Bundle-Vendor: %providerName
+Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
+ org.eclipse.tcf.core;bundle-version="1.0.0",
+ org.eclipse.tcf.te.runtime;bundle-version="1.0.0",
+ org.eclipse.tcf.te.tcf.core;bundle-version="1.0.0"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
+Bundle-Localization: plugin
+Export-Package: org.eclipse.tcf.te.tcf.core.scripting.activator;x-internal:=true,
+ org.eclipse.tcf.te.tcf.core.scripting.events,
+ org.eclipse.tcf.te.tcf.core.scripting.interfaces,
+ org.eclipse.tcf.te.tcf.core.scripting.launcher,
+ org.eclipse.tcf.te.tcf.core.scripting.nls;x-internal:=true,
+ org.eclipse.tcf.te.tcf.core.scripting.parser
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.core/build.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/build.properties
index f4ae97015..f4ae97015 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.core/build.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/build.properties
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/plugin.properties
new file mode 100644
index 000000000..b74f02e8e
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/plugin.properties
@@ -0,0 +1,12 @@
+##################################################################################
+# Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+# This program and the accompanying materials are made available under the terms
+# of the Eclipse Public License v1.0 which accompanies this distribution, and is
+# available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Wind River Systems - initial API and implementation
+##################################################################################
+
+pluginName = Target Explorer, TCF Scripting Core Plug-in
+providerName = Eclipse.org
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/pom.xml b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/pom.xml
new file mode 100644
index 000000000..313bdbe39
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.tcf</groupId>
+ <artifactId>tcf-parent</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../../../pom.xml</relativePath>
+ </parent>
+
+ <version>1.0.0.qualifier</version>
+ <artifactId>org.eclipse.tcf.te.tcf.core.scripting</artifactId>
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/src/org/eclipse/tcf/te/tcf/core/scripting/activator/CoreBundleActivator.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/src/org/eclipse/tcf/te/tcf/core/scripting/activator/CoreBundleActivator.java
new file mode 100644
index 000000000..bf314f308
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/src/org/eclipse/tcf/te/tcf/core/scripting/activator/CoreBundleActivator.java
@@ -0,0 +1,73 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.core.scripting.activator;
+
+import org.eclipse.tcf.te.runtime.tracing.TraceHandler;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class CoreBundleActivator implements BundleActivator {
+ // The bundle context
+ private static BundleContext context;
+ // The trace handler instance
+ private static TraceHandler traceHandler;
+
+ /**
+ * Returns the bundle context
+ *
+ * @return the bundle context
+ */
+ public static BundleContext getContext() {
+ return context;
+ }
+
+ /**
+ * Convenience method which returns the unique identifier of this plugin.
+ */
+ public static String getUniqueIdentifier() {
+ if (getContext() != null && getContext().getBundle() != null) {
+ return getContext().getBundle().getSymbolicName();
+ }
+ return null;
+ }
+
+ /**
+ * Returns the bundles trace handler.
+ *
+ * @return The bundles trace handler.
+ */
+ public static TraceHandler getTraceHandler() {
+ if (traceHandler == null) {
+ traceHandler = new TraceHandler(getUniqueIdentifier());
+ }
+ return traceHandler;
+ }
+
+ /* (non-Javadoc)
+ * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext bundleContext) throws Exception {
+ CoreBundleActivator.context = bundleContext;
+ }
+
+ /* (non-Javadoc)
+ * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext bundleContext) throws Exception {
+ CoreBundleActivator.context = null;
+ traceHandler = null;
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/src/org/eclipse/tcf/te/tcf/core/scripting/events/ScriptEvent.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/src/org/eclipse/tcf/te/tcf/core/scripting/events/ScriptEvent.java
new file mode 100644
index 000000000..87e7ad85c
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/src/org/eclipse/tcf/te/tcf/core/scripting/events/ScriptEvent.java
@@ -0,0 +1,98 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.core.scripting.events;
+
+import java.util.EventObject;
+
+/**
+ * Script event implementation.
+ */
+public class ScriptEvent extends EventObject {
+ private static final long serialVersionUID = -5350037587555199985L;
+
+ /**
+ * Script event types.
+ */
+ public static enum Type { START, OUTPUT, STOP }
+
+ /**
+ * Immutable script event message.
+ */
+ public static final class Message {
+ /** The message type */
+ public final char type;
+ /** The message text */
+ public final String text;
+
+ /**
+ * Constructor.
+ */
+ public Message(char type, String text) {
+ this.type = type;
+ this.text = text;
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString() {
+ StringBuilder buffer = new StringBuilder(getClass().getName());
+ buffer.append(": type = '"); //$NON-NLS-1$
+ buffer.append(type);
+ buffer.append("', text = '"); //$NON-NLS-1$
+ buffer.append(text);
+ buffer.append("'"); //$NON-NLS-1$
+
+ return buffer.toString();
+ }
+ }
+
+
+ private Type type;
+ private Message message;
+
+
+ /**
+ * Constructor.
+ *
+ * @param source The source object. Must not be <code>null</code>.
+ * @param type The script event type. Must not be <code>null</code>.
+ * @param message The script event message or <code>null</code>.
+ *
+ * @exception IllegalArgumentException if type == null.
+ */
+ public ScriptEvent(Object source, Type type, Message message) {
+ super(source);
+
+ if (type == null) throw new IllegalArgumentException("null type"); //$NON-NLS-1$
+ this.type = type;
+
+ this.message = message;
+ }
+
+ /**
+ * Returns the script event type.
+ *
+ * @return The script event type.
+ */
+ public Type getType() {
+ return type;
+ }
+
+ /**
+ * Returns the script event message.
+ *
+ * @return The script event message or <code>null</code>.
+ */
+ public Message getMessage() {
+ return message;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/src/org/eclipse/tcf/te/tcf/core/scripting/interfaces/IScriptLauncher.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/src/org/eclipse/tcf/te/tcf/core/scripting/interfaces/IScriptLauncher.java
new file mode 100644
index 000000000..54c722233
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/src/org/eclipse/tcf/te/tcf/core/scripting/interfaces/IScriptLauncher.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.core.scripting.interfaces;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+
+/**
+ * Interface to be implemented by script launcher implementations.
+ */
+public interface IScriptLauncher extends IAdaptable {
+
+ /**
+ * Executes a script defined by the given properties at the specified peer.
+ *
+ * @param peer The peer. Must not be <code>null</code>.
+ * @param params The script properties. Must not be <code>null</code>.
+ * @param callback The callback or <code>null</code>.
+ */
+ public void launch(IPeer peer, IPropertiesContainer properties, ICallback callback);
+
+ /**
+ * Disposes the script launcher instance.
+ */
+ public void dispose();
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/src/org/eclipse/tcf/te/tcf/core/scripting/interfaces/IScriptLauncherProperties.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/src/org/eclipse/tcf/te/tcf/core/scripting/interfaces/IScriptLauncherProperties.java
new file mode 100644
index 000000000..01a9969a9
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/src/org/eclipse/tcf/te/tcf/core/scripting/interfaces/IScriptLauncherProperties.java
@@ -0,0 +1,23 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.core.scripting.interfaces;
+
+/**
+ * Script launcher properties identifiers.
+ */
+public interface IScriptLauncherProperties {
+
+ /**
+ * Property denoting the script to execute.
+ * <p>
+ * The property type is {@link String}.
+ */
+ public static String PROP_SCRIPT = "script.script"; //$NON-NLS-1$
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/src/org/eclipse/tcf/te/tcf/core/scripting/launcher/ScriptLauncher.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/src/org/eclipse/tcf/te/tcf/core/scripting/launcher/ScriptLauncher.java
new file mode 100644
index 000000000..4f1f44f26
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/src/org/eclipse/tcf/te/tcf/core/scripting/launcher/ScriptLauncher.java
@@ -0,0 +1,399 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.core.scripting.launcher;
+
+import java.io.IOException;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.PlatformObject;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.tcf.core.AbstractChannel;
+import org.eclipse.tcf.core.AbstractChannel.TraceListener;
+import org.eclipse.tcf.core.Command;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IChannel.IChannelListener;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.protocol.IService;
+import org.eclipse.tcf.te.runtime.callback.Callback;
+import org.eclipse.tcf.te.runtime.events.EventManager;
+import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.tcf.core.Tcf;
+import org.eclipse.tcf.te.tcf.core.interfaces.IChannelManager;
+import org.eclipse.tcf.te.tcf.core.scripting.activator.CoreBundleActivator;
+import org.eclipse.tcf.te.tcf.core.scripting.events.ScriptEvent;
+import org.eclipse.tcf.te.tcf.core.scripting.interfaces.IScriptLauncher;
+import org.eclipse.tcf.te.tcf.core.scripting.interfaces.IScriptLauncherProperties;
+import org.eclipse.tcf.te.tcf.core.scripting.nls.Messages;
+import org.eclipse.tcf.te.tcf.core.scripting.parser.Parser;
+import org.eclipse.tcf.te.tcf.core.scripting.parser.Token;
+import org.eclipse.tcf.te.tcf.core.util.JSONUtils;
+
+/**
+ * Script launcher implementation.
+ */
+public class ScriptLauncher extends PlatformObject implements IScriptLauncher {
+ // The channel instance
+ /* default */ IChannel channel;
+ // The process properties instance
+ private IPropertiesContainer properties;
+
+ // The callback instance
+ private ICallback callback;
+
+ // The channel trace listener instance
+ /* default */ TraceListener traceListener;
+
+ /**
+ * Constructor.
+ */
+ public ScriptLauncher() {
+ super();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.core.scripting.interfaces.IScriptLauncher#dispose()
+ */
+ @Override
+ public void dispose() {
+ if (channel != null) {
+ // Remove the trace listener
+ if (traceListener != null) { ((AbstractChannel)channel).removeTraceListener(traceListener); traceListener = null; }
+
+ // Close the channel as all disposal is done
+ Tcf.getChannelManager().closeChannel(channel);
+
+ // Fire the stop event
+ ScriptEvent event = new ScriptEvent(ScriptLauncher.this, ScriptEvent.Type.STOP, null);
+ EventManager.getInstance().fireEvent(event);
+
+ // Dissociate the channel
+ channel = null;
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.core.scripting.interfaces.IScriptLauncher#launch(org.eclipse.tcf.protocol.IPeer, org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer, org.eclipse.tcf.te.runtime.interfaces.callback.ICallback)
+ */
+ @Override
+ public void launch(final IPeer peer, final IPropertiesContainer properties, final ICallback callback) {
+ Assert.isNotNull(peer);
+ Assert.isNotNull(properties);
+
+ // Normalize the callback
+ if (callback == null) {
+ this.callback = new Callback() {
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.callback.Callback#internalDone(java.lang.Object, org.eclipse.core.runtime.IStatus)
+ */
+ @Override
+ public void internalDone(Object caller, IStatus status) {
+ }
+ };
+ }
+ else {
+ this.callback = callback;
+ }
+
+ // Remember the process properties
+ this.properties = properties;
+
+ // Open a dedicated channel to the given peer
+ Tcf.getChannelManager().openChannel(peer, true, new IChannelManager.DoneOpenChannel() {
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.core.interfaces.IChannelManager.DoneOpenChannel#doneOpenChannel(java.lang.Throwable, org.eclipse.tcf.protocol.IChannel)
+ */
+ @Override
+ public void doneOpenChannel(Throwable error, IChannel channel) {
+ if (error == null) {
+ ScriptLauncher.this.channel = channel;
+
+ // Fire the start event
+ ScriptEvent event = new ScriptEvent(ScriptLauncher.this, ScriptEvent.Type.START, null);
+ EventManager.getInstance().fireEvent(event);
+
+ // Attach a channel listener so we can dispose ourself if the channel
+ // is closed from the remote side.
+ channel.addChannelListener(new IChannelListener() {
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.protocol.IChannel.IChannelListener#onChannelOpened()
+ */
+ @Override
+ public void onChannelOpened() {
+ }
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.protocol.IChannel.IChannelListener#onChannelClosed(java.lang.Throwable)
+ */
+ @Override
+ public void onChannelClosed(Throwable error) {
+ if (traceListener != null) { ((AbstractChannel)ScriptLauncher.this.channel).removeTraceListener(traceListener); traceListener = null; }
+ if (error != null) {
+ IStatus status = new Status(IStatus.ERROR, CoreBundleActivator.getUniqueIdentifier(),
+ NLS.bind(Messages.ScriptLauncher_error_channelConnectFailed, peer.getID(), error.getLocalizedMessage()),
+ error);
+ invokeCallback(status, null);
+ }
+ }
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.protocol.IChannel.IChannelListener#congestionLevel(int)
+ */
+ @Override
+ public void congestionLevel(int level) {
+ }
+ });
+
+ // Create the trace listener instance
+ traceListener = new TraceListener() {
+
+ @Override
+ public void onMessageSent(char type, String token, String service, String name, byte[] data) {
+ if (isFiltered(type, name)) return;
+ String message = formatMessage(type, token, service, name, data, false);
+ ScriptEvent event = new ScriptEvent(ScriptLauncher.this, ScriptEvent.Type.OUTPUT, new ScriptEvent.Message(type, message));
+ EventManager.getInstance().fireEvent(event);
+ }
+
+ @Override
+ public void onMessageReceived(char type, String token, String service, String name, byte[] data) {
+ if (isFiltered(type, name)) return;
+ String message = formatMessage(type, token, service, name, data, true);
+ ScriptEvent event = new ScriptEvent(ScriptLauncher.this, ScriptEvent.Type.OUTPUT, new ScriptEvent.Message(type, message));
+ EventManager.getInstance().fireEvent(event);
+ }
+
+ @Override
+ public void onChannelClosed(Throwable error) {
+ }
+
+ /**
+ * Checks if a given message is filtered. Filtered messages are not send to
+ * the script output console.
+ *
+ * @param type The message type.
+ * @param name The message name.
+ *
+ * @return <code>True</code> if the message is filtered, <code>false</code> otherwise.
+ */
+ private boolean isFiltered(char type, String name) {
+ boolean filtered = false;
+
+ // Filter out the heart beat and framework messages
+ if (type == 'F' || (name != null && name.toLowerCase().contains("heartbeat"))) { //$NON-NLS-1$
+ filtered = true;
+ }
+
+ return filtered;
+ }
+
+ /**
+ * Format the trace message.
+ */
+ protected String formatMessage(char type, String token, String service, String name, byte[] data, boolean received) {
+ // Decode the arguments again for tracing purpose
+ String args = JSONUtils.decodeStringFromByteArray(data);
+
+ // Construct the full message
+ //
+ // The message format is: [<---|--->] <type> <token> <service>#<name> <args>
+ StringBuilder message = new StringBuilder();
+ message.append(received ? "<---" : "--->"); //$NON-NLS-1$ //$NON-NLS-2$
+ message.append(" ").append(Character.valueOf(type)); //$NON-NLS-1$
+ if (token != null) message.append(" ").append(token); //$NON-NLS-1$
+ if (service != null) message.append(" ").append(service); //$NON-NLS-1$
+ if (name != null) message.append(" ").append(name); //$NON-NLS-1$
+ if (args != null && args.trim().length() > 0) message.append(" ").append(args.trim()); //$NON-NLS-1$
+
+ return message.toString();
+ }
+ };
+
+ // Register the trace listener
+ ((AbstractChannel)channel).addTraceListener(traceListener);
+
+ // Check if the channel is in connected state
+ if (channel.getState() != IChannel.STATE_OPEN) {
+ IStatus status = new Status(IStatus.ERROR, CoreBundleActivator.getUniqueIdentifier(),
+ Messages.ScriptLauncher_error_channelNotConnected,
+ new IllegalStateException());
+ invokeCallback(status, null);
+ return;
+ }
+
+ // Do some very basic sanity checking on the script properties
+ if (properties.getStringProperty(IScriptLauncherProperties.PROP_SCRIPT) == null) {
+ IStatus status = new Status(IStatus.ERROR, CoreBundleActivator.getUniqueIdentifier(),
+ Messages.ScriptLauncher_error_missingScript,
+ new IllegalArgumentException(IScriptLauncherProperties.PROP_SCRIPT));
+ invokeCallback(status, null);
+ return;
+ }
+
+ // Execute the launch now
+ executeLaunch();
+ } else {
+ IStatus status = new Status(IStatus.ERROR, CoreBundleActivator.getUniqueIdentifier(),
+ NLS.bind(Messages.ScriptLauncher_error_channelConnectFailed, peer.getID(), error.getLocalizedMessage()),
+ error);
+ invokeCallback(status, null);
+ }
+ }
+ });
+ }
+
+ /**
+ * Executes the script launch.
+ */
+ protected void executeLaunch() {
+ // Get the script properties container
+ final IPropertiesContainer properties = getProperties();
+ if (properties == null) {
+ // This is an illegal argument. Properties must be set
+ IStatus status = new Status(IStatus.ERROR, CoreBundleActivator.getUniqueIdentifier(),
+ NLS.bind(Messages.ScriptLauncher_error_illegalNullArgument, "properties"), //$NON-NLS-1$
+ new IllegalArgumentException());
+ invokeCallback(status, null);
+ return;
+ }
+
+ // Get the script to execute
+ String script = properties.getStringProperty(IScriptLauncherProperties.PROP_SCRIPT);
+ if (script == null || "".equals(script.trim())) { //$NON-NLS-1$
+ IStatus status = new Status(IStatus.ERROR, CoreBundleActivator.getUniqueIdentifier(),
+ Messages.ScriptLauncher_error_missingScript,
+ new IllegalArgumentException(IScriptLauncherProperties.PROP_SCRIPT));
+ invokeCallback(status, null);
+ return;
+ }
+
+ // Create the script parser instance
+ Parser parser = new Parser(script);
+ try {
+ // Parse the script
+ Token[] tokens = parser.parse();
+
+ // And execute the tokens extracted, one by one sequentially
+ if (tokens != null && tokens.length > 0) {
+ executeToken(tokens, 0);
+ } else {
+ invokeCallback(Status.OK_STATUS, null);
+ return;
+ }
+ } catch (IOException e) {
+ IStatus status = new Status(IStatus.ERROR, CoreBundleActivator.getUniqueIdentifier(),
+ NLS.bind(Messages.ScriptLauncher_error_parsingScript, e.getLocalizedMessage()),
+ e);
+ invokeCallback(status, null);
+ return;
+ }
+ }
+
+ /**
+ * Executes the token at the given index.
+ *
+ * @param tokens The tokens. Must not be <code>null</code>.
+ * @param index The index.
+ */
+ @SuppressWarnings("unused")
+ protected void executeToken(final Token[] tokens, final int index) {
+ Assert.isNotNull(tokens);
+
+ if (index < 0 || index >= tokens.length) {
+ IStatus status = new Status(IStatus.ERROR, CoreBundleActivator.getUniqueIdentifier(),
+ NLS.bind(Messages.ScriptLauncher_error_illegalIndex, Integer.valueOf(index)),
+ new IllegalArgumentException("index")); //$NON-NLS-1$
+ invokeCallback(status, null);
+ return;
+ }
+
+ Token token = tokens[index];
+
+ IService service = channel.getRemoteService(token.getServiceName());
+ if (service != null) {
+ new Command(channel, service, token.getCommandName(), token.getArguments()) {
+
+ @Override
+ public void done(Exception error, Object[] args) {
+ if (error == null) {
+ // Execute the next token
+ int nextIndex = index + 1;
+ if (nextIndex == tokens.length) {
+ // All tokens executed
+ invokeCallback(Status.OK_STATUS, null);
+ } else {
+ executeToken(tokens, nextIndex);
+ }
+ } else {
+ // Stop the execution
+ IStatus status = new Status(IStatus.ERROR, CoreBundleActivator.getUniqueIdentifier(),
+ NLS.bind(Messages.ScriptLauncher_error_parsingScript, error.getLocalizedMessage()),
+ error);
+ invokeCallback(status, null);
+ }
+ }
+ };
+ } else {
+ IStatus status = new Status(IStatus.ERROR, CoreBundleActivator.getUniqueIdentifier(),
+ NLS.bind(Messages.ScriptLauncher_error_serviceNotAvailable, token.getServiceName(), channel.getRemotePeer().getID()),
+ null);
+ invokeCallback(status, null);
+ }
+ }
+
+ /**
+ * Invoke the callback with the given parameters. If the given status severity
+ * is {@link IStatus#ERROR}, the process launcher object is disposed automatically.
+ *
+ * @param status The status. Must not be <code>null</code>.
+ * @param result The result object or <code>null</code>.
+ */
+ protected void invokeCallback(IStatus status, Object result) {
+ // Dispose the process launcher if we report an error
+ if (status.getSeverity() == IStatus.ERROR) {
+ dispose();
+ }
+
+ // Invoke the callback
+ ICallback callback = getCallback();
+ if (callback != null) {
+ callback.setResult(result);
+ callback.done(this, status);
+ }
+ }
+
+ /**
+ * Returns the channel instance.
+ *
+ * @return The channel instance or <code>null</code> if none.
+ */
+ public final IChannel getChannel() {
+ return channel;
+ }
+
+ /**
+ * Returns the process properties container.
+ *
+ * @return The process properties container or <code>null</code> if none.
+ */
+ public final IPropertiesContainer getProperties() {
+ return properties;
+ }
+
+ /**
+ * Returns the callback instance.
+ *
+ * @return The callback instance or <code>null</code> if none.
+ */
+ protected final ICallback getCallback() {
+ return callback;
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/src/org/eclipse/tcf/te/tcf/core/scripting/nls/Messages.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/src/org/eclipse/tcf/te/tcf/core/scripting/nls/Messages.java
new file mode 100644
index 000000000..b3e63f5cb
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/src/org/eclipse/tcf/te/tcf/core/scripting/nls/Messages.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.core.scripting.nls;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * Target Explorer TCF processes extensions core plug-in externalized strings management.
+ */
+public class Messages extends NLS {
+
+ // The plug-in resource bundle name
+ private static final String BUNDLE_NAME = "org.eclipse.tcf.te.tcf.core.scripting.nls.Messages"; //$NON-NLS-1$
+
+ /**
+ * Static constructor.
+ */
+ static {
+ // Load message values from bundle file
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ // **** Declare externalized string id's down here *****
+
+ public static String ScriptLauncher_error_channelConnectFailed;
+ public static String ScriptLauncher_error_channelNotConnected;
+ public static String ScriptLauncher_error_missingScript;
+ public static String ScriptLauncher_error_illegalNullArgument;
+ public static String ScriptLauncher_error_illegalIndex;
+ public static String ScriptLauncher_error_parsingScript;
+ public static String ScriptLauncher_error_executionFailed;
+ public static String ScriptLauncher_error_serviceNotAvailable;
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/src/org/eclipse/tcf/te/tcf/core/scripting/nls/Messages.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/src/org/eclipse/tcf/te/tcf/core/scripting/nls/Messages.properties
new file mode 100644
index 000000000..a467585bf
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/src/org/eclipse/tcf/te/tcf/core/scripting/nls/Messages.properties
@@ -0,0 +1,13 @@
+#
+# org.eclipse.tcf.te.tcf.scripting.core
+# Externalized Strings.
+#
+
+ScriptLauncher_error_channelConnectFailed=Failed to connect channel for peer ''{0}''.\n\nPossible Cause:\n{1}
+ScriptLauncher_error_channelNotConnected=Channel is not connected!
+ScriptLauncher_error_missingScript=Illegal argument: Script must be specified!
+ScriptLauncher_error_illegalNullArgument=Illegal argument: ''{0}'' has to be not null.
+ScriptLauncher_error_illegalIndex=Illegal index ''{0}''.
+ScriptLauncher_error_parsingScript=Parsing of the script failed.\n\nPossible Cause:\n{0}
+ScriptLauncher_error_executionFailed=Script execution failed.\n\nPossible Cause:\n{0}
+ScriptLauncher_error_serviceNotAvailable=Script execution failed.\n\nPossible Cause:\nService ''{0}'' is not available on peer ''{1}''.
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/src/org/eclipse/tcf/te/tcf/core/scripting/parser/Parser.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/src/org/eclipse/tcf/te/tcf/core/scripting/parser/Parser.java
new file mode 100644
index 000000000..087765d99
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/src/org/eclipse/tcf/te/tcf/core/scripting/parser/Parser.java
@@ -0,0 +1,242 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.core.scripting.parser;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.StringReader;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.StringTokenizer;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.tcf.protocol.JSON;
+
+/**
+ * Script parser implementation.
+ */
+public class Parser {
+ // Reference to the script to parse
+ private final String script;
+
+ // Define some patterns to match the lines against
+ private static final Pattern EMPTY_LINE = Pattern.compile("\\s*"); //$NON-NLS-1$
+ private static final Pattern COMMENT_LINE = Pattern.compile("\\s*#.*"); //$NON-NLS-1$
+ private static final Pattern CONNECT_LINE = Pattern.compile("\\s*connect\\s+.*"); //$NON-NLS-1$
+ private static final Pattern COMMAND_LINE = Pattern.compile("\\s*tcf\\s+(\\w+)\\s+(\\w+)(.*)"); //$NON-NLS-1$
+
+ /**
+ * Constructor.
+ */
+ public Parser(String script) {
+ Assert.isNotNull(script);
+ this.script = script;
+ }
+
+ /**
+ * Parse the given script and returns the extracted command tokens.
+ *
+ * @return The list of command tokens found in the script, or an empty list.
+ * @throws IOException - if the script parsing fails.
+ */
+ public Token[] parse() throws IOException {
+ List<Token> tokens = new ArrayList<Token>();
+
+ BufferedReader reader = new BufferedReader(new StringReader(script));
+
+ String line;
+ while ((line = reader.readLine()) != null) {
+ // All the following lines are ignored if matched
+ if (EMPTY_LINE.matcher(line).matches()) continue;
+ if (COMMENT_LINE.matcher(line).matches()) continue;
+ if (CONNECT_LINE.matcher(line).matches()) continue;
+
+ // If it is a command line, get the groups from it
+ Matcher matcher = COMMAND_LINE.matcher(line);
+ if (matcher.matches()) {
+ String serviceName = matcher.group(1).trim();
+ String commandName = matcher.group(2).trim();
+ String arguments = matcher.group(3);
+
+ // Create a new token
+ Token token = new Token();
+ token.setServiceName(serviceName);
+ token.setCommandName(commandName);
+
+ // Parse the arguments
+ parseArguments(token, arguments);
+
+ // Add the token to the list
+ tokens.add(token);
+ }
+ }
+
+ reader.close();
+
+ return tokens.toArray(new Token[tokens.size()]);
+ }
+
+ /**
+ * Parse the arguments string and add the extracted arguments
+ * to the given token.
+ *
+ * @param token The token. Must not be <code>null</code>.
+ * @param arguments The arguments string or <code>null</code>.
+ */
+ protected void parseArguments(Token token, String arguments) {
+ Assert.isNotNull(token);
+
+ if (arguments == null || "".equals(arguments.trim())) { //$NON-NLS-1$
+ return;
+ }
+
+ // Tokenize by space, but do special handling for maps and lists
+ StringTokenizer tokenizer = new StringTokenizer(arguments, " "); //$NON-NLS-1$
+ while (tokenizer.hasMoreTokens()) {
+ String tok = tokenizer.nextToken();
+ if (tok == null || "".equals(tok.trim())) continue; //$NON-NLS-1$
+
+ if (tok.startsWith("\"")) { //$NON-NLS-1$
+ // String type
+
+ String fullTok = tok;
+ boolean complete = isComplete(fullTok, '"', '"');
+ while (!complete && tokenizer.hasMoreTokens()) {
+ fullTok = fullTok + " " + tokenizer.nextToken(); //$NON-NLS-1$
+ complete = isComplete(fullTok, '"', '"');
+ }
+
+ if (complete) {
+ fullTok = fullTok.trim();
+ if (fullTok.startsWith("\"")) fullTok = fullTok.substring(1); //$NON-NLS-1$
+ if (fullTok.endsWith("\"")) fullTok = fullTok.substring(0, fullTok.length() - 1); //$NON-NLS-1$
+ token.addArgument(fullTok);
+ continue;
+ }
+ }
+
+ if ("true".equalsIgnoreCase(tok) || "false".equalsIgnoreCase(tok)) { //$NON-NLS-1$ //$NON-NLS-2$
+ token.addArgument(Boolean.valueOf(tok));
+ continue;
+ }
+
+ try {
+ Integer i = Integer.decode(tok);
+ token.addArgument(i);
+ continue;
+ } catch (NumberFormatException e) { /* ignored on purpose */ }
+
+ try {
+ Long l = Long.decode(tok);
+ token.addArgument(l);
+ continue;
+ } catch (NumberFormatException e) { /* ignored on purpose */ }
+
+ try {
+ Float f = Float.valueOf(tok);
+ token.addArgument(f);
+ continue;
+ } catch (NumberFormatException e) { /* ignored on purpose */ }
+
+ try {
+ Double d = Double.valueOf(tok);
+ token.addArgument(d);
+ continue;
+ } catch (NumberFormatException e) { /* ignored on purpose */ }
+
+ // If it starts with '{' or '[', it's a map or list type
+ if (tok.startsWith("{")) { //$NON-NLS-1$
+ // Map type
+
+ String fullTok = tok;
+ boolean complete = isComplete(fullTok, '{', '}');
+ while (!complete && tokenizer.hasMoreTokens()) {
+ fullTok = fullTok + " " + tokenizer.nextToken(); //$NON-NLS-1$
+ complete = isComplete(fullTok, '{', '}');
+ }
+
+ if (complete) {
+ fullTok = fullTok + "\0"; //$NON-NLS-1$
+ try {
+ Object[] args = JSON.parseSequence(fullTok.getBytes());
+ if (args != null) {
+ for (Object arg : args) {
+ if (arg != null) token.addArgument(arg);
+ }
+ continue;
+ }
+ } catch (IOException e) { /* ignored on purpose */ e.printStackTrace(); }
+ }
+ }
+
+ if (tok.startsWith("[")) { //$NON-NLS-1$
+ // List type
+
+ String fullTok = tok;
+ boolean complete = isComplete(fullTok, '[', ']');
+ while (!complete && tokenizer.hasMoreTokens()) {
+ fullTok = fullTok + " " + tokenizer.nextToken(); //$NON-NLS-1$
+ complete = isComplete(fullTok, '[', ']');
+ }
+
+ if (complete) {
+ fullTok = fullTok + "\0"; //$NON-NLS-1$
+ try {
+ Object[] args = JSON.parseSequence(fullTok.getBytes());
+ if (args != null) {
+ for (Object arg : args) {
+ if (arg != null) token.addArgument(arg);
+ }
+ continue;
+ }
+ } catch (IOException e) { /* ignored on purpose */ }
+ }
+ }
+
+ // Add the argument token as is
+ token.addArgument(tok);
+ }
+ }
+
+ /**
+ * Counts the number of opening and closing characters inside the given
+ * string and returns <code>true</code> if the number matches.
+ *
+ * @param tok The arguments token. Must not be <code>null</code>.
+ * @param opening The opening character.
+ * @param closing The closing character.
+ *
+ * @return <code>True</code> if the number of opening characters matches the number of closing characters, <code>false</code> otherwise.
+ */
+ protected boolean isComplete(String tok, char opening, char closing) {
+ Assert.isNotNull(tok);
+
+ int countOpening = 0;
+ int countClosing = 0;
+
+ boolean same = opening == closing;
+
+ for (int i = 0; i < tok.length(); i++) {
+ char c = tok.charAt(i);
+
+ if (c == opening && same) {
+ if (countOpening > countClosing) countClosing++;
+ else countOpening++;
+ } else {
+ if (c == opening) { countOpening++; continue; }
+ if (c == closing) { countClosing++; continue; }
+ }
+ }
+
+ return countOpening > 0 && countOpening == countClosing;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/src/org/eclipse/tcf/te/tcf/core/scripting/parser/Token.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/src/org/eclipse/tcf/te/tcf/core/scripting/parser/Token.java
new file mode 100644
index 000000000..18c838c43
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/src/org/eclipse/tcf/te/tcf/core/scripting/parser/Token.java
@@ -0,0 +1,91 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.core.scripting.parser;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.Assert;
+
+/**
+ * Script token. Created by the script parser on parsing the script.
+ */
+public final class Token {
+ // The service name
+ private String serviceName;
+ // The command name
+ private String commandName;
+ // The command arguments
+ private List<Object> arguments;
+
+ /**
+ * Constructor.
+ */
+ public Token() {
+ }
+
+ /**
+ * Sets the service name.
+ *
+ * @param serviceName The service name. Must not be <code>null</code>.
+ */
+ public void setServiceName(String serviceName) {
+ Assert.isNotNull(serviceName);
+ this.serviceName = serviceName;
+ }
+
+ /**
+ * Gets the service name.
+ *
+ * @return The service name or <code>null</code>.
+ */
+ public String getServiceName() {
+ return serviceName;
+ }
+
+ /**
+ * Sets the command name.
+ *
+ * @param commandName The command name. Must not be <code>null</code>.
+ */
+ public void setCommandName(String commandName) {
+ Assert.isNotNull(commandName);
+ this.commandName = commandName;
+ }
+
+ /**
+ * Returns the command name.
+ *
+ * @return The command name or <code>null</code>.
+ */
+ public String getCommandName() {
+ return commandName;
+ }
+
+ /**
+ * Adds an argument to the command arguments list.
+ *
+ * @param arg The argument. Must not be <code>null</code>.
+ */
+ public void addArgument(Object arg) {
+ Assert.isNotNull(arg);
+ if (arguments == null) arguments = new ArrayList<Object>();
+ arguments.add(arg);
+ }
+
+ /**
+ * Returns the command arguments.
+ *
+ * @return The command arguments or an empty array.
+ */
+ public Object[] getArguments() {
+ return arguments != null ? arguments.toArray() : new Object[0];
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.core/.classpath b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/.classpath
index 8a8f1668c..8a8f1668c 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.core/.classpath
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/.classpath
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/.options b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/.options
new file mode 100644
index 000000000..910e6f7d1
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/.options
@@ -0,0 +1,3 @@
+org.eclipse.tcf.te.tcf.core/debugmode = 0
+org.eclipse.tcf.te.tcf.core/trace/channels = false
+org.eclipse.tcf.te.tcf.core/trace/channelManager = false
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.core/.project b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/.project
index 864152e2f..ad68b6b11 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.core/.project
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/.project
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.eclipse.tm.te.tcf.core</name>
+ <name>org.eclipse.tcf.te.tcf.core</name>
<comment></comment>
<projects>
</projects>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.core/.settings/org.eclipse.jdt.core.prefs b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/.settings/org.eclipse.jdt.core.prefs
index c56a6854b..c56a6854b 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.core/.settings/org.eclipse.jdt.core.prefs
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/.settings/org.eclipse.jdt.core.prefs
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.core/.settings/org.eclipse.jdt.ui.prefs b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/.settings/org.eclipse.jdt.ui.prefs
index 434836052..434836052 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.core/.settings/org.eclipse.jdt.ui.prefs
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/.settings/org.eclipse.jdt.ui.prefs
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..8b9fe7517
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/META-INF/MANIFEST.MF
@@ -0,0 +1,30 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.tcf.te.tcf.core;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipse.tcf.te.tcf.core.activator.CoreBundleActivator
+Bundle-Vendor: %providerName
+Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
+ org.eclipse.tcf.core;bundle-version="1.0.0",
+ org.eclipse.tcf.te.runtime;bundle-version="1.0.0",
+ org.eclipse.tcf.te.core;bundle-version="1.0.0"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
+Bundle-Localization: plugin
+Export-Package: org.eclipse.tcf.te.tcf.core,
+ org.eclipse.tcf.te.tcf.core.activator;x-internal:=true,
+ org.eclipse.tcf.te.tcf.core.async,
+ org.eclipse.tcf.te.tcf.core.concurrent,
+ org.eclipse.tcf.te.tcf.core.concurrent.interfaces,
+ org.eclipse.tcf.te.tcf.core.concurrent.internal;x-internal:=true,
+ org.eclipse.tcf.te.tcf.core.interfaces,
+ org.eclipse.tcf.te.tcf.core.interfaces.tracing,
+ org.eclipse.tcf.te.tcf.core.internal;x-internal:=true,
+ org.eclipse.tcf.te.tcf.core.internal.utils;x-internal:=true,
+ org.eclipse.tcf.te.tcf.core.listeners;x-internal:=true,
+ org.eclipse.tcf.te.tcf.core.listeners.interfaces,
+ org.eclipse.tcf.te.tcf.core.nls;x-internal:=true,
+ org.eclipse.tcf.te.tcf.core.streams,
+ org.eclipse.tcf.te.tcf.core.util,
+ org.eclipse.tcf.te.tcf.core.util.persistence
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.core/build.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/build.properties
index 30b2fc40b..30b2fc40b 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.core/build.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/build.properties
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.core/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/plugin.properties
index ff3ae2476..ff3ae2476 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.core/plugin.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/plugin.properties
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.core/plugin.xml b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/plugin.xml
index 7d5c60d61..994d0debe 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.core/plugin.xml
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/plugin.xml
@@ -3,8 +3,8 @@
<plugin>
<!-- TCF framework startup participant -->
- <extension point="org.eclipse.tm.tcf.startup">
- <class name="org.eclipse.tm.te.tcf.core.internal.Startup"/>
+ <extension point="org.eclipse.tcf.startup">
+ <class name="org.eclipse.tcf.te.tcf.core.internal.Startup"/>
</extension>
</plugin>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/pom.xml b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/pom.xml
new file mode 100644
index 000000000..bbc6d0d4c
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.tcf</groupId>
+ <artifactId>tcf-parent</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../../../pom.xml</relativePath>
+ </parent>
+
+ <version>1.0.0.qualifier</version>
+ <artifactId>org.eclipse.tcf.te.tcf.core</artifactId>
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.core/src/org/eclipse/tm/te/tcf/core/Tcf.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/Tcf.java
index dd59470aa..1e10366a4 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.core/src/org/eclipse/tm/te/tcf/core/Tcf.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/Tcf.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.core;
+package org.eclipse.tcf.te.tcf.core;
import java.util.ArrayList;
import java.util.List;
@@ -15,16 +15,15 @@ import java.util.List;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IAdapterManager;
import org.eclipse.core.runtime.Platform;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.tcf.protocol.Protocol.ChannelOpenListener;
-import org.eclipse.tm.te.tcf.core.interfaces.IChannelManager;
-import org.eclipse.tm.te.tcf.core.interfaces.listeners.IChannelStateChangeListener;
-import org.eclipse.tm.te.tcf.core.interfaces.listeners.IProtocolStateChangeListener;
-import org.eclipse.tm.te.tcf.core.internal.ChannelManager;
-import org.eclipse.tm.te.tcf.core.internal.Startup;
-import org.eclipse.tm.te.tcf.core.internal.interfaces.IChannelOpenListener;
-import org.eclipse.tm.te.tcf.core.internal.listener.InternalChannelOpenListener;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.protocol.Protocol.ChannelOpenListener;
+import org.eclipse.tcf.te.tcf.core.interfaces.IChannelManager;
+import org.eclipse.tcf.te.tcf.core.internal.ChannelManager;
+import org.eclipse.tcf.te.tcf.core.internal.Startup;
+import org.eclipse.tcf.te.tcf.core.listeners.interfaces.IChannelOpenListener;
+import org.eclipse.tcf.te.tcf.core.listeners.interfaces.IChannelStateChangeListener;
+import org.eclipse.tcf.te.tcf.core.listeners.interfaces.IProtocolStateChangeListener;
/**
@@ -188,7 +187,7 @@ public final class Tcf {
// Create and register the global channel open listener
if (tcf.channelOpenListener == null) {
- tcf.channelOpenListener = new InternalChannelOpenListener();
+ tcf.channelOpenListener = new org.eclipse.tcf.te.tcf.core.listeners.ChannelOpenListener();
Protocol.addChannelOpenListener(tcf.channelOpenListener);
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/activator/CoreBundleActivator.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/activator/CoreBundleActivator.java
new file mode 100644
index 000000000..e8ac5c042
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/activator/CoreBundleActivator.java
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.core.activator;
+
+import org.eclipse.tcf.te.runtime.tracing.TraceHandler;
+import org.eclipse.tcf.te.tcf.core.internal.Startup;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class CoreBundleActivator implements BundleActivator {
+ // The bundle context
+ private static BundleContext context;
+ // The trace handler instance
+ private static TraceHandler traceHandler;
+
+ /**
+ * Returns the bundle context
+ *
+ * @return the bundle context
+ */
+ public static BundleContext getContext() {
+ return context;
+ }
+
+ /**
+ * Convenience method which returns the unique identifier of this plugin.
+ */
+ public static String getUniqueIdentifier() {
+ if (getContext() != null && getContext().getBundle() != null) {
+ return getContext().getBundle().getSymbolicName();
+ }
+ return null;
+ }
+
+ /**
+ * Returns the bundles trace handler.
+ *
+ * @return The bundles trace handler.
+ */
+ public static TraceHandler getTraceHandler() {
+ if (traceHandler == null) {
+ traceHandler = new TraceHandler(getUniqueIdentifier());
+ }
+ return traceHandler;
+ }
+
+ /* (non-Javadoc)
+ * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext bundleContext) throws Exception {
+ CoreBundleActivator.context = bundleContext;
+ }
+
+ /* (non-Javadoc)
+ * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext bundleContext) throws Exception {
+ CoreBundleActivator.context = null;
+ // Mark the core framework as not started anymore
+ Startup.setStarted(false);
+ traceHandler = null;
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/async/CallbackInvocationDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/async/CallbackInvocationDelegate.java
new file mode 100644
index 000000000..adcc36247
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/async/CallbackInvocationDelegate.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.core.async;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.te.core.async.AsyncCallbackCollector;
+
+/**
+ * Asynchronous callback collector callback invocation delegate implementation.
+ * <p>
+ * The delegate invokes callbacks within the TCF dispatch thread.
+ */
+public class CallbackInvocationDelegate implements AsyncCallbackCollector.ICallbackInvocationDelegate {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.core.async.AsyncCallbackCollector.ICallbackInvocationDelegate#invoke(java.lang.Runnable)
+ */
+ @Override
+ public void invoke(Runnable runnable) {
+ Assert.isNotNull(runnable);
+ if (Protocol.isDispatchThread()) runnable.run();
+ else Protocol.invokeLater(runnable);
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/concurrent/BlockingCallProxy.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/concurrent/BlockingCallProxy.java
new file mode 100644
index 000000000..86aee910d
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/concurrent/BlockingCallProxy.java
@@ -0,0 +1,243 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.core.concurrent;
+
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Method;
+import java.lang.reflect.Proxy;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.te.tcf.core.concurrent.interfaces.IProxyDescriptor;
+import org.eclipse.tcf.te.tcf.core.concurrent.internal.DefaultProxyDescriptor;
+
+/**
+ * BlockingCallProxy is a utility class. It can create an instance of a proxy class for the specified
+ * interface that dispatches method invocations to the delegate object. This delegate object must
+ * implement the same interface.
+ * <p>
+ * When the method dispatched is an asynchronous invocation which calls back in the dispatching
+ * thread, the proxy instance will block the method call until the callback happens.
+ * <p>
+ * Take IFileSystem service as an example. The following method in it:
+ * <pre>
+ * IToken read(IFileHandle handle, long offset, int len, DoneRead done);
+ * </pre>
+ * <p>
+ * This is an asynchronous method which will return immediately after its invocation. When the read
+ * operation is done, the callback parameter "done", which implements the interface
+ * <code>DoneRead</code>, is invoked to pass back the reading result.
+ * <p>
+ * Now if you want to invoke this method and wait for the result, you can use the following code
+ * with this class:
+ *
+ * <pre>
+ * IFileSystem service = ... // Get the file system service.
+ * IFileSystem proxy = BlockingCallProxy.newInstance(IFileSystem.class, service);
+ * final byte[][] result = new byte[1][];
+ * proxy.read(handle, offset, len, new DoneRead(){
+ * public void doneRead(IToken token, FileSystemException error, byte[] data, boolean eof) {
+ * if(error == null)
+ * result[0] = data; //Save the reading result.
+ * }
+ * });
+ * output.write(result[0]); // Now use the reading result.
+ * ...
+ * </pre>
+ *
+ * In the above code, the line that does the read operation over the proxy object will block and
+ * will not return until "doneRead" of the callback is called. The line that follows the read
+ * operation can safely consume the read data.
+ * <p>
+ * <em>Note that all method call over the proxy must be made <b>OUTSIDE</b> of
+ * the dispatching thread.</em> If it is called inside of the dispatching thread, the call will be
+ * blocked forever.
+ * <p>
+ * The methods that require blocking invocation are those which have a callback parameter. The callback
+ * parameter is identified by a IProxyDescriptor which could tell which parameter is the callback.
+ *
+ * @see IProxyDescriptor
+ * @see org.eclipse.tcf.services.IFileSystem
+ * @see DefaultProxyDescriptor
+ */
+public class BlockingCallProxy implements InvocationHandler {
+ // The default timeout waiting for blocked invocations.
+ private static final long DEFAULT_TIMEOUT = 60000L;
+
+ /**
+ * Create an instance of a proxy class for the specified interface that dispatches method
+ * invocations to the delegate object. This delegate object must implement the same interface.
+ *
+ * @param proxyInterface The proxy interface for the proxy class.
+ * @param delegate The delegate object which the proxy dispatches the method invocations to.
+ * @return The proxy instance.
+ */
+ public static <T> T newInstance(Class<T> proxyInterface, T delegate) {
+ return newInstance(proxyInterface, DefaultProxyDescriptor.getProxyDescriptor(proxyInterface), delegate);
+ }
+
+ /**
+ * Create an instance of a proxy class for the specified interface that dispatches method
+ * invocations to the delegate object. This delegate object must implement the same interface.
+ *
+ * @param proxyInterface The proxy interface for the proxy class.
+ * @param proxyDescriptor The proxy descriptor for the proxy class.
+ * @param delegate The delegate object which the proxy dispatches the method invocations to.
+ * @return The proxy instance.
+ */
+ public static <T> T newInstance(Class<T> proxyInterface, IProxyDescriptor proxyDescriptor, T delegate) {
+ Assert.isTrue(proxyInterface != null && delegate != null);
+ ClassLoader classLoader = proxyInterface.getClassLoader();
+ InvocationHandler handler = new BlockingCallProxy(proxyDescriptor, delegate);
+ return (T) Proxy.newProxyInstance(classLoader, new Class[] { proxyInterface }, handler);
+ }
+
+ // The timeout waiting for blocked invocations.
+ private long timeout;
+ // Callback descriptor
+ private IProxyDescriptor proxyDescriptor;
+ // The delegate object which the proxy dispatches the method invocations to.
+ /* default */ Object delegate;
+
+ /**
+ * Create an instance of BlockingCall as the dynamic invocation handler of the proxy class.
+ *
+ * @param delegate The delegate object which the proxy dispatches the method invocations to.
+ */
+ private BlockingCallProxy(IProxyDescriptor proxyDescriptor, Object delegate) {
+ this.timeout = DEFAULT_TIMEOUT;
+ this.delegate = delegate;
+ this.proxyDescriptor = proxyDescriptor;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see java.lang.reflect.InvocationHandler#invoke(java.lang.Object, java.lang.reflect.Method,
+ * java.lang.Object[])
+ */
+ @Override
+ public Object invoke(Object proxy, final Method method, final Object[] args) throws Throwable {
+ Assert.isTrue(!Protocol.isDispatchThread());
+ Rendezvous rendezvous = prepareArguments(method, args);
+ if (proxyDescriptor.isDispatchMethod(method)) {
+ // If the method should be called inside the dispatching thread.
+ return dispatchCall(method, args, rendezvous);
+ }
+ // Call it directly.
+ return directCall(method, args, rendezvous);
+ }
+
+ /**
+ * Prepare the proxy calling arguments based on the invocation method and its arguments.
+ * If the method being invoked is a proxy method, then replace the callback argument with
+ * a dynamic generated proxy that could delegate the invocation and unblock the callback.
+ * Return a rendezvous object to be used to block the call. If it is not a proxy method, then
+ * just return null object.
+ *
+ * @param method The method being called.
+ * @param args The invocation arguments.
+ * @return The rendezvous object of the proxy call or null if no blocking is needed.
+ */
+ private Rendezvous prepareArguments(final Method method, final Object[] args) {
+ if (proxyDescriptor.isProxyMethod(method)) {
+ // Find the callback parameter index.
+ int index = proxyDescriptor.getCallbackIndex(method);
+ if (index != -1) {
+ // Replace the callback with a proxy that block the call.
+ Rendezvous rendezvous = new Rendezvous();
+ Class<?>[] aTypes = method.getParameterTypes();
+ args[index] = Proxy.newProxyInstance(aTypes[index].getClassLoader(),
+ new Class[] { aTypes[index] }, new DoneHandler(rendezvous, args[index]));
+ return rendezvous;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * The invocation handler of the callback proxy. Used to delegate the callback invocation
+ * and unblock the rendezvous object.
+ */
+ private class DoneHandler implements InvocationHandler {
+ // The callback handler that delegates the invocation.
+ private Object done;
+ // The rendezvous that unblocks the invocation.
+ private Rendezvous rendezvous;
+ /**
+ * Constructor with the two arguments to initialize the two fields.
+ *
+ * @param rendezvous The rendezvous object to unblock the invocation
+ * @param done The callback handler that delegates the invocation.
+ */
+ public DoneHandler(Rendezvous rendezvous, Object done) {
+ this.rendezvous = rendezvous;
+ this.done = done;
+ }
+ /*
+ * (non-Javadoc)
+ * @see java.lang.reflect.InvocationHandler#invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[])
+ */
+ @Override
+ public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
+ Object result = method.invoke(done, args);
+ rendezvous.arrive();
+ return result;
+ }
+ }
+
+ /**
+ * Invoke the call directly in the current thread, using the rendezvous object to block the call.
+ * If the rendezvous object is null, then just invoke the call directly.
+ *
+ * @param method The method to be invoked.
+ * @param args The argument of the invocation.
+ * @param rendezvous The rendezvous object to wait for the call.
+ * @return The invocation result.
+ * @throws Throwable Thrown during invocation.
+ */
+ private Object directCall(Method method, Object[] args, Rendezvous rendezvous) throws Throwable {
+ Object ret = method.invoke(delegate, args);
+ if (rendezvous != null) {
+ rendezvous.waiting(timeout);
+ }
+ return ret;
+ }
+
+ /**
+ * Dispatch the method invocation in the dispatching thread, using the rendezvous object to block
+ * the call. If the rendezvous object is null, then just invoke the call in the dispatching thread.
+ *
+ * @param method The method to be invoked.
+ * @param args The argument of the invocation.
+ * @param rendezvous The rendezvous object to wait for the call.
+ * @return The invocation result.
+ * @throws Throwable Thrown during invocation.
+ */
+ private Object dispatchCall(final Method method, final Object[] args, final Rendezvous rendezvous) throws Throwable {
+ final Object[] returns = new Object[1];
+ final Exception[] exceptions = new Exception[1];
+ Protocol.invokeAndWait(new Runnable() {
+ @Override
+ public void run() {
+ try {
+ returns[0] = method.invoke(delegate, args);
+ }
+ catch (Exception e) {
+ exceptions[0] = e;
+ }
+ }
+ });
+ if (rendezvous != null) {
+ rendezvous.waiting(timeout);
+ }
+ if (exceptions[0] != null) throw exceptions[0];
+ return returns[0];
+ }
+} \ No newline at end of file
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/url/Rendezvous.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/concurrent/Rendezvous.java
index c64d6ed69..da158e020 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/url/Rendezvous.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/concurrent/Rendezvous.java
@@ -7,7 +7,9 @@
* Contributors:
* William Chen (Wind River)- [345387]Open the remote files with a proper editor
*******************************************************************************/
-package org.eclipse.tm.te.tcf.filesystem.internal.url;
+package org.eclipse.tcf.te.tcf.core.concurrent;
+
+import java.util.concurrent.TimeoutException;
/**
* A helper class used to synchronize producer and consumer threads. It is used
@@ -74,9 +76,9 @@ public class Rendezvous {
* another thread or until it is timed out.
*
* @param timeout The timeout time.
- * @throws InterruptedException The waiting has timed out.
+ * @throws TimeoutException The waiting has timed out.
*/
- public synchronized void waiting(long timeout) throws InterruptedException {
+ public synchronized void waiting(long timeout) throws TimeoutException {
long now = System.currentTimeMillis();
while (!arrived && (timeout <= 0 || System.currentTimeMillis() - now < timeout)) {
try {
@@ -85,7 +87,7 @@ public class Rendezvous {
}
}
if (!arrived)
- throw new InterruptedException();
+ throw new TimeoutException();
}
/**
@@ -94,7 +96,7 @@ public class Rendezvous {
*
* @throws InterruptedException The waiting has timed out.
*/
- public synchronized void waiting() throws InterruptedException {
+ public synchronized void waiting() throws TimeoutException {
waiting(0);
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/concurrent/interfaces/IProxyDescriptor.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/concurrent/interfaces/IProxyDescriptor.java
new file mode 100644
index 000000000..bea30efa5
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/concurrent/interfaces/IProxyDescriptor.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.core.concurrent.interfaces;
+
+import java.lang.reflect.Method;
+
+import org.eclipse.tcf.te.tcf.core.concurrent.BlockingCallProxy;
+import org.eclipse.tcf.te.tcf.core.concurrent.internal.DefaultProxyDescriptor;
+
+/**
+ * The proxy descriptor to describe a proxy interface, providing which method should be
+ * executed in the dispatching thread, which method is a proxy method that
+ * should be handled by BlockingProxy and get the index of the callback of a specified
+ * proxy method.
+ *
+ * @see BlockingCallProxy
+ * @see DefaultProxyDescriptor
+ */
+public interface IProxyDescriptor {
+ /**
+ * Check if the method should be called inside the dispatching thread. .
+ *
+ * @param method The method to be checked.
+ * @return true if it should be called inside the dispatching thread.
+ */
+ boolean isDispatchMethod(Method method);
+
+ /**
+ * Return if the method requires blocking invocation. The method requires blocking invocation if
+ * it has a callback parameter called in the dispatching thread.
+ *
+ * @param method The method to check.
+ * @return true if it requires a blocking invocation.
+ */
+ boolean isProxyMethod(Method method);
+
+ /**
+ * Get the index of the callback parameter.
+ *
+ * @param method The method to search the callback parameter.
+ * @return The callback paramter's index.
+ */
+ int getCallbackIndex(Method method);
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/concurrent/internal/DefaultProxyDescriptor.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/concurrent/internal/DefaultProxyDescriptor.java
new file mode 100644
index 000000000..0cbd8c640
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/concurrent/internal/DefaultProxyDescriptor.java
@@ -0,0 +1,115 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.core.concurrent.internal;
+
+import java.lang.reflect.Method;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.tcf.te.tcf.core.concurrent.BlockingCallProxy;
+import org.eclipse.tcf.te.tcf.core.concurrent.interfaces.IProxyDescriptor;
+
+/**
+ * The default proxy descriptor for proxy interfaces. It assumes the method with a parameter
+ * whose type is an interface, and whose name has a segment of "$Done", is the proxy method.
+ *
+ * @see BlockingCallProxy
+ * @see IProxyDescriptor
+ */
+public class DefaultProxyDescriptor implements IProxyDescriptor {
+ // Descriptor cache to store known proxy descriptors.
+ private static Map<Class<?>, IProxyDescriptor> descriptorCache;
+
+ /**
+ * Get a default proxy descriptor from the cache using the class as the key.
+ * If no such proxy descriptor is found, then create a default proxy descriptor for it
+ * and cache it.
+ *
+ * @param proxyInterface The proxy interface.
+ * @return A default proxy descriptor for the proxy interface.
+ */
+ public static IProxyDescriptor getProxyDescriptor(Class<?> proxyInterface) {
+ if(descriptorCache == null) {
+ descriptorCache = Collections.synchronizedMap(new HashMap<Class<?>, IProxyDescriptor>());
+ }
+ IProxyDescriptor descriptor = descriptorCache.get(proxyInterface);
+ if(descriptor == null) {
+ descriptor = new DefaultProxyDescriptor(proxyInterface);
+ descriptorCache.put(proxyInterface, descriptor);
+ }
+ return descriptor;
+ }
+
+ // The callback map used to identify the proxy methods.
+ private Map<Method, Integer> callbacks;
+ /**
+ * Constructor using the proxy interface.
+ *
+ * @param proxyInterface The proxy interface.
+ */
+ private DefaultProxyDescriptor(Class<?> proxyInterface) {
+ callbacks = Collections.synchronizedMap(new HashMap<Method, Integer>());
+ Method[] methods = proxyInterface.getDeclaredMethods();
+ if(methods != null && methods.length > 0) {
+ for(Method method : methods) {
+ int index = findCallbackIndex(method);
+ if(index != -1) {
+ callbacks.put(method, Integer.valueOf(index));
+ }
+ }
+ }
+ }
+
+ /**
+ * Find the index of the callback parameter in the specified method.
+ *
+ * @param method The method to be checked.
+ * @return the index of the callback parameter or -1 if there's no callback parameter.
+ */
+ private int findCallbackIndex(Method method) {
+ Class<?>[] pTypes = method.getParameterTypes();
+ if (pTypes != null && pTypes.length > 0) {
+ for (int i = 0; i < pTypes.length; i++) {
+ Class<?> type = pTypes[i];
+ if (type.isInterface() && type.getName().indexOf("$Done") != -1) return i; //$NON-NLS-1$
+ }
+ }
+ return -1;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.core.util.IProxyDescriptor#isDispatchMethod(java.lang.reflect.Method)
+ */
+ @Override
+ public boolean isDispatchMethod(Method method) {
+ return isProxyMethod(method);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.core.util.IProxyDescriptor#isProxyMethod(java.lang.reflect.Method)
+ */
+ @Override
+ public boolean isProxyMethod(Method method) {
+ return getCallbackIndex(method) != -1;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.core.util.IProxyDescriptor#getCallbackIndex(java.lang.reflect.Method)
+ */
+ @Override
+ public int getCallbackIndex(Method method) {
+ Integer integer = callbacks.get(method);
+ return integer == null ? -1 : integer.intValue();
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/interfaces/IChannelManager.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/interfaces/IChannelManager.java
new file mode 100644
index 000000000..735a9605d
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/interfaces/IChannelManager.java
@@ -0,0 +1,99 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.core.interfaces;
+
+import java.util.Map;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IPeer;
+
+/**
+ * TCF channel manager public API declaration.
+ */
+public interface IChannelManager extends IAdaptable {
+
+ /**
+ * Client call back interface for openChannel(...).
+ */
+ interface DoneOpenChannel {
+ /**
+ * Called when the channel fully opened or failed to open.
+ *
+ * @param error The error description if operation failed, <code>null</code> if succeeded.
+ * @param channel The channel object or <code>null</code>.
+ */
+ void doneOpenChannel(Throwable error, IChannel channel);
+ }
+
+ /**
+ * Opens a new channel to communicate with the given peer.
+ * <p>
+ * If <code>forceNew</code> is <code>true</code>, a new and not reference counted channel is
+ * opened and returned. The returned channel must be closed by the caller himself. The channel
+ * manager is not keeping track of non reference counted channels.
+ * <p>
+ * Reference counted channels are cached by the channel manager and must be closed via {@link #closeChannel(IChannel)}.
+ * <p>
+ * The method can be called from any thread context.
+ *
+ * @param peer The peer. Must not be <code>null</code>.
+ * @param done The client callback. Must not be <code>null</code>.
+ */
+ public void openChannel(IPeer peer, boolean forceNew, DoneOpenChannel done);
+
+ /**
+ * Opens a new channel to communicate with the peer described by the given peer attributes.
+ * <p>
+ * If <code>forceNew</code> is <code>true</code>, a new and not reference counted channel is
+ * opened and returned. The returned channel must be closed by the caller himself. The channel
+ * manager is not keeping track of non reference counted channels.
+ * <p>
+ * Reference counted channels are cached by the channel manager and must be closed via {@link #closeChannel(IChannel)}.
+ * <p>
+ * The method can be called from any thread context.
+ *
+ * @param peerAttributes The peer attributes. Must not be <code>null</code>.
+ * @param done The client callback. Must not be <code>null</code>.
+ */
+ public void openChannel(Map<String, String> peerAttributes, boolean forceNew, DoneOpenChannel done);
+
+ /**
+ * Returns the shared channel instance for the given peer. Channels retrieved using this
+ * method cannot be closed by the caller.
+ * <p>
+ * Callers of this method are expected to test for the current channel state themselves.
+ * <p>
+ * The method can be called from any thread context.
+ *
+ * @param peer The peer. Must not be <code>null</code>.
+ * @return The channel instance or <code>null</code>.
+ */
+ public IChannel getChannel(IPeer peer);
+
+ /**
+ * Closes the given channel.
+ * <p>
+ * If the given channel is a reference counted channel, the channel will be closed if the reference counter
+ * reaches 0. For non reference counted channels, the channel is closed immediately.
+ * <p>
+ * The method can be called from any thread context.
+ *
+ * @param channel The channel. Must not be <code>null</code>.
+ */
+ public void closeChannel(IChannel channel);
+
+ /**
+ * Close all open channel, no matter of the current reference count.
+ * <p>
+ * The method can be called from any thread context.
+ */
+ public void closeAll();
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.core/src/org/eclipse/tm/te/tcf/core/interfaces/ITransportTypes.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/interfaces/ITransportTypes.java
index aff014710..b218febea 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.core/src/org/eclipse/tm/te/tcf/core/interfaces/ITransportTypes.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/interfaces/ITransportTypes.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.core.interfaces;
+package org.eclipse.tcf.te.tcf.core.interfaces;
/**
* Declaration of the TCF transport type constants.
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/interfaces/tracing/ITraceIds.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/interfaces/tracing/ITraceIds.java
new file mode 100644
index 000000000..2bbb1ebdd
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/interfaces/tracing/ITraceIds.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.core.interfaces.tracing;
+
+/**
+ * TCF core plug-in trace slot identifiers.
+ */
+public interface ITraceIds {
+
+ /**
+ * If activated, tracing information about channel open/close is printed out.
+ */
+ public static String TRACE_CHANNELS = "trace/channels"; //$NON-NLS-1$
+
+ /**
+ * If activated, tracing information about the channel manager is printed out.
+ */
+ public static String TRACE_CHANNEL_MANAGER = "trace/channelManager"; //$NON-NLS-1$
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/ChannelManager.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/ChannelManager.java
new file mode 100644
index 000000000..2fbb73529
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/ChannelManager.java
@@ -0,0 +1,444 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.core.internal;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.atomic.AtomicReference;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.PlatformObject;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.tcf.core.AbstractPeer;
+import org.eclipse.tcf.core.TransientPeer;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.te.tcf.core.activator.CoreBundleActivator;
+import org.eclipse.tcf.te.tcf.core.interfaces.IChannelManager;
+import org.eclipse.tcf.te.tcf.core.interfaces.tracing.ITraceIds;
+import org.eclipse.tcf.te.tcf.core.nls.Messages;
+
+
+/**
+ * TCF channel manager implementation.
+ */
+public final class ChannelManager extends PlatformObject implements IChannelManager {
+ // The map of reference counters per peer id
+ /* default */ final Map<String, AtomicInteger> refCounters = new HashMap<String, AtomicInteger>();
+ // The map of channels per peer id
+ /* default */ final Map<String, IChannel> channels = new HashMap<String, IChannel>();
+
+ /**
+ * The channel monitor keeps watching the channel after it got successfully opened.
+ * If the channel is closing eventually, the channel monitor cleans out the reference
+ * counter and the channels map.
+ */
+ private final class ChannelMonitor implements IChannel.IChannelListener {
+ // Reference to the monitored channel
+ private final IChannel channel;
+ // Reference to the peer id the channel got opened for
+ private final String id;
+
+ /**
+ * Constructor.
+ *
+ * @param The peer id. Must not be <code>null</code>.
+ * @param The channel. Must not be <code>null</code>.
+ */
+ public ChannelMonitor(String id, IChannel channel) {
+ Assert.isNotNull(id);
+ Assert.isNotNull(channel);
+
+ this.id = id;
+ this.channel = channel;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.protocol.IChannel.IChannelListener#onChannelOpened()
+ */
+ @Override
+ public void onChannelOpened() {
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.protocol.IChannel.IChannelListener#onChannelClosed(java.lang.Throwable)
+ */
+ @Override
+ public void onChannelClosed(Throwable error) {
+ // Remove ourself
+ channel.removeChannelListener(this);
+ // Clean the reference counter and the channel map
+ channels.remove(id);
+ refCounters.remove(id);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.protocol.IChannel.IChannelListener#congestionLevel(int)
+ */
+ @Override
+ public void congestionLevel(int level) {
+ }
+ }
+
+ /**
+ * Constructor.
+ */
+ public ChannelManager() {
+ super();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.core.interfaces.IChannelManager#openChannel(org.eclipse.tcf.protocol.IPeer, boolean, org.eclipse.tcf.te.tcf.core.interfaces.IChannelManager.DoneOpenChannel)
+ */
+ @Override
+ public void openChannel(final IPeer peer, final boolean forceNew, final DoneOpenChannel done) {
+ Runnable runnable = new Runnable() {
+ @Override
+ public void run() {
+ internalOpenChannel(peer, forceNew, done);
+ }
+ };
+ if (Protocol.isDispatchThread()) runnable.run();
+ else Protocol.invokeLater(runnable);
+ }
+
+ /**
+ * Internal implementation of {@link #openChannel(IPeer, org.eclipse.tcf.te.tcf.core.interfaces.IChannelManager.DoneOpenChannel)}.
+ * <p>
+ * If <code>forceNew</code> is <code>true</code>, a new and not reference counted channel is opened and returned. The returned
+ * channel must be closed by the caller himself. The channel manager is not keeping track of non reference counted channels.
+ * <p>
+ * Reference counted channels are cached by the channel manager and must be closed via {@link #closeChannel(IChannel)} .
+ * <p>
+ * Method must be called within the TCF dispatch thread.
+ *
+ * @param peer The peer. Must not be <code>null</code>.
+ * @param forceNew Specify <code>true</code> to force opening a new channel, <code>false</code> otherwise.
+ * @param done The client callback. Must not be <code>null</code>.
+ */
+ /* default */ void internalOpenChannel(final IPeer peer, final boolean forceNew, final DoneOpenChannel done) {
+ Assert.isNotNull(peer);
+ Assert.isNotNull(done);
+ Assert.isTrue(Protocol.isDispatchThread(), "Illegal Thread Access"); //$NON-NLS-1$
+
+ // The channel instance to return
+ IChannel channel = null;
+
+ // Get the peer id
+ final String id = peer.getID();
+
+ if (CoreBundleActivator.getTraceHandler().isSlotEnabled(0, ITraceIds.TRACE_CHANNEL_MANAGER)) {
+ CoreBundleActivator.getTraceHandler().trace(NLS.bind(Messages.ChannelManager_openChannel_message, id, Boolean.valueOf(forceNew)),
+ 0, ITraceIds.TRACE_CHANNEL_MANAGER, IStatus.INFO, this);
+ }
+
+ // Check if there is already a channel opened to this peer
+ channel = !forceNew ? channels.get(id) : null;
+ if (channel != null && (channel.getState() == IChannel.STATE_OPEN || channel.getState() == IChannel.STATE_OPENING)) {
+ // Increase the reference count
+ AtomicInteger counter = refCounters.get(id);
+ if (counter == null) {
+ counter = new AtomicInteger(0);
+ refCounters.put(id, counter);
+ }
+ counter.incrementAndGet();
+
+ if (CoreBundleActivator.getTraceHandler().isSlotEnabled(0, ITraceIds.TRACE_CHANNEL_MANAGER)) {
+ CoreBundleActivator.getTraceHandler().trace(NLS.bind(Messages.ChannelManager_openChannel_reuse_message, id, counter.toString()),
+ 0, ITraceIds.TRACE_CHANNEL_MANAGER, IStatus.INFO, this);
+ }
+ } else if (channel != null) {
+ // Channel is not in open state -> drop the instance
+ channel = null;
+ channels.remove(id);
+ refCounters.remove(id);
+ }
+
+ // Opens a new channel if necessary
+ if (channel == null) {
+ if (CoreBundleActivator.getTraceHandler().isSlotEnabled(0, ITraceIds.TRACE_CHANNEL_MANAGER)) {
+ CoreBundleActivator.getTraceHandler().trace(NLS.bind(Messages.ChannelManager_openChannel_new_message, id),
+ 0, ITraceIds.TRACE_CHANNEL_MANAGER, IStatus.INFO, this);
+ }
+
+ channel = peer.openChannel();
+
+ if (channel != null) {
+ if (!forceNew) channels.put(id, channel);
+ if (!forceNew) refCounters.put(id, new AtomicInteger(1));
+
+ // Register the channel listener
+ final IChannel finChannel = channel;
+ channel.addChannelListener(new IChannel.IChannelListener() {
+
+ @Override
+ public void onChannelOpened() {
+ // Remove ourself as listener from the channel
+ finChannel.removeChannelListener(this);
+ // Register the channel monitor
+ finChannel.addChannelListener(new ChannelMonitor(id, finChannel));
+
+ if (CoreBundleActivator.getTraceHandler().isSlotEnabled(0, ITraceIds.TRACE_CHANNEL_MANAGER)) {
+ CoreBundleActivator.getTraceHandler().trace(NLS.bind(Messages.ChannelManager_openChannel_success_message, id),
+ 0, ITraceIds.TRACE_CHANNEL_MANAGER, IStatus.INFO, this);
+ }
+
+ // Channel opening succeeded
+ done.doneOpenChannel(null, finChannel);
+ }
+
+ @Override
+ public void onChannelClosed(Throwable error) {
+ // Remove ourself as listener from the channel
+ finChannel.removeChannelListener(this);
+ // Clean the reference counter and the channel map
+ channels.remove(id);
+ refCounters.remove(id);
+
+ if (CoreBundleActivator.getTraceHandler().isSlotEnabled(0, ITraceIds.TRACE_CHANNEL_MANAGER)) {
+ CoreBundleActivator.getTraceHandler().trace(NLS.bind(Messages.ChannelManager_openChannel_failed_message, id, error),
+ 0, ITraceIds.TRACE_CHANNEL_MANAGER, IStatus.INFO, this);
+ }
+
+ // Channel opening failed
+ done.doneOpenChannel(error, finChannel);
+ }
+
+ @Override
+ public void congestionLevel(int level) {
+ // ignored
+ }
+ });
+ } else {
+ // Channel is null? Something went terrible wrong.
+ done.doneOpenChannel(new Exception("Unexpected null return value from IPeer#openChannel()!"), null); //$NON-NLS-1$
+ }
+
+ } else {
+ // Wait for the channel to be fully opened if still in "OPENING" state
+ if (channel.getState() == IChannel.STATE_OPENING) {
+ final IChannel finChannel = channel;
+ channel.addChannelListener(new IChannel.IChannelListener() {
+
+ @Override
+ public void onChannelOpened() {
+ done.doneOpenChannel(null, finChannel);
+ }
+
+ @Override
+ public void onChannelClosed(Throwable error) {
+ done.doneOpenChannel(error, finChannel);
+ }
+
+ @Override
+ public void congestionLevel(int level) {
+ }
+ });
+ }
+ else {
+ done.doneOpenChannel(null, channel);
+ }
+ }
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.core.interfaces.IChannelManager#openChannel(java.util.Map, boolean, org.eclipse.tcf.te.tcf.core.interfaces.IChannelManager.DoneOpenChannel)
+ */
+ @Override
+ public void openChannel(final Map<String, String> peerAttributes, final boolean forceNew, final DoneOpenChannel done) {
+ Runnable runnable = new Runnable() {
+ @Override
+ public void run() {
+ internalOpenChannel(peerAttributes, forceNew, done);
+ }
+ };
+ if (Protocol.isDispatchThread()) runnable.run();
+ else Protocol.invokeLater(runnable);
+ }
+
+ /**
+ * Internal implementation of {@link #openChannel(Map, org.eclipse.tcf.te.tcf.core.interfaces.IChannelManager.DoneOpenChannel)}.
+ * <p>
+ * Method must be called within the TCF dispatch thread.
+ *
+ * @param peerAttributes The peer attributes. Must not be <code>null</code>.
+ * @param forceNew Specify <code>true</code> to force opening a new channel, <code>false</code> otherwise.
+ * @param done The client callback. Must not be <code>null</code>.
+ */
+ /* default */ void internalOpenChannel(final Map<String, String> peerAttributes, final boolean forceNew, final DoneOpenChannel done) {
+ Assert.isNotNull(peerAttributes);
+ Assert.isNotNull(done);
+ Assert.isTrue(Protocol.isDispatchThread(), "Illegal Thread Access"); //$NON-NLS-1$
+ internalOpenChannel(getOrCreatePeerInstance(peerAttributes), forceNew, done);
+ }
+
+ /**
+ * Tries to find an existing peer instance or create an new {@link IPeer}
+ * instance if not found.
+ * <p>
+ * <b>Note:</b> This method must be invoked at the TCF dispatch thread.
+ *
+ * @param peerAttributes The peer attributes. Must not be <code>null</code>.
+ * @return The peer instance.
+ */
+ private IPeer getOrCreatePeerInstance(final Map<String, String> peerAttributes) {
+ Assert.isNotNull(peerAttributes);
+ Assert.isTrue(Protocol.isDispatchThread(), "Illegal Thread Access"); //$NON-NLS-1$
+
+ // Get the peer id from the properties
+ String peerId = peerAttributes.get(IPeer.ATTR_ID);
+ Assert.isNotNull(peerId);
+
+ // Check if we shall open the peer transient
+ boolean isTransient = peerAttributes.containsKey("transient") ? Boolean.parseBoolean(peerAttributes.remove("transient")) : false; //$NON-NLS-1$ //$NON-NLS-2$
+
+ // Look the peer via the Locator Service.
+ IPeer peer = Protocol.getLocator().getPeers().get(peerId);
+ // If not peer could be found, create a new one
+ if (peer == null) {
+ peer = isTransient ? new TransientPeer(peerAttributes) : new AbstractPeer(peerAttributes);
+
+ if (CoreBundleActivator.getTraceHandler().isSlotEnabled(0, ITraceIds.TRACE_CHANNEL_MANAGER)) {
+ CoreBundleActivator.getTraceHandler().trace(NLS.bind(Messages.ChannelManager_createPeer_new_message, peerId, Boolean.valueOf(isTransient)),
+ 0, ITraceIds.TRACE_CHANNEL_MANAGER, IStatus.INFO, this);
+ }
+ }
+
+ // Return the peer instance
+ return peer;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.core.interfaces.IChannelManager#getChannel(org.eclipse.tcf.protocol.IPeer)
+ */
+ @Override
+ public IChannel getChannel(final IPeer peer) {
+ final AtomicReference<IChannel> channel = new AtomicReference<IChannel>();
+ Runnable runnable = new Runnable() {
+ @Override
+ public void run() {
+ channel.set(internalGetChannel(peer));
+ }
+ };
+ if (Protocol.isDispatchThread()) runnable.run();
+ else Protocol.invokeAndWait(runnable);
+
+ return channel.get();
+ }
+
+ /**
+ * Returns the shared channel instance for the given peer.
+ * <p>
+ * <b>Note:</b> This method must be invoked at the TCF dispatch thread.
+ *
+ * @param peer The peer. Must not be <code>null</code>.
+ * @return The channel instance or <code>null</code>.
+ */
+ public IChannel internalGetChannel(IPeer peer) {
+ Assert.isNotNull(peer);
+ Assert.isTrue(Protocol.isDispatchThread(), "Illegal Thread Access"); //$NON-NLS-1$
+ return channels.get(peer.getID());
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.core.interfaces.IChannelManager#closeChannel(org.eclipse.tcf.protocol.IChannel)
+ */
+ @Override
+ public void closeChannel(final IChannel channel) {
+ Runnable runnable = new Runnable() {
+ @Override
+ public void run() {
+ internalCloseChannel(channel);
+ }
+ };
+ if (Protocol.isDispatchThread()) runnable.run();
+ else Protocol.invokeLater(runnable);
+ }
+
+ /**
+ * Closes the given channel.
+ * <p>
+ * If the given channel is a reference counted channel, the channel will be closed if the reference counter
+ * reaches 0. For non reference counted channels, the channel is closed immediately.
+ * <p>
+ * <b>Note:</b> This method must be invoked at the TCF dispatch thread.
+ *
+ * @param channel The channel. Must not be <code>null</code>.
+ */
+ /* default */ void internalCloseChannel(IChannel channel) {
+ Assert.isNotNull(channel);
+ Assert.isTrue(Protocol.isDispatchThread(), "Illegal Thread Access"); //$NON-NLS-1$
+
+ // Get the id of the remote peer
+ String id = channel.getRemotePeer().getID();
+
+ if (CoreBundleActivator.getTraceHandler().isSlotEnabled(0, ITraceIds.TRACE_CHANNEL_MANAGER)) {
+ CoreBundleActivator.getTraceHandler().trace(NLS.bind(Messages.ChannelManager_closeChannel_message, id),
+ 0, ITraceIds.TRACE_CHANNEL_MANAGER, IStatus.INFO, this);
+ }
+
+ // Get the reference counter
+ AtomicInteger counter = refCounters.get(id);
+
+ // If the counter is null or get 0 after the decrement, close the channel
+ if (counter == null || counter.decrementAndGet() == 0) {
+ channel.close();
+
+ if (CoreBundleActivator.getTraceHandler().isSlotEnabled(0, ITraceIds.TRACE_CHANNEL_MANAGER)) {
+ CoreBundleActivator.getTraceHandler().trace(NLS.bind(Messages.ChannelManager_closeChannel_closed_message, id),
+ 0, ITraceIds.TRACE_CHANNEL_MANAGER, IStatus.INFO, this);
+ }
+
+ // Clean the reference counter and the channel map
+ refCounters.remove(id);
+ channels.remove(id);
+ } else {
+ if (CoreBundleActivator.getTraceHandler().isSlotEnabled(0, ITraceIds.TRACE_CHANNEL_MANAGER)) {
+ CoreBundleActivator.getTraceHandler().trace(NLS.bind(Messages.ChannelManager_closeChannel_inuse_message, id, counter.toString()),
+ 0, ITraceIds.TRACE_CHANNEL_MANAGER, IStatus.INFO, this);
+ }
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.core.interfaces.IChannelManager#closeAll()
+ */
+ @Override
+ public void closeAll() {
+ Runnable runnable = new Runnable() {
+ @Override
+ public void run() {
+ internalCloseAll();
+ }
+ };
+ if (Protocol.isDispatchThread()) runnable.run();
+ else Protocol.invokeLater(runnable);
+ }
+
+ /**
+ * Close all open channel, no matter of the current reference count.
+ * <p>
+ * <b>Note:</b> This method must be invoked at the TCF dispatch thread.
+ */
+ /* default */ void internalCloseAll() {
+ Assert.isTrue(Protocol.isDispatchThread(), "Illegal Thread Access"); //$NON-NLS-1$
+
+ IChannel[] openChannels = channels.values().toArray(new IChannel[channels.values().size()]);
+
+ refCounters.clear();
+ channels.clear();
+
+ for (IChannel channel : openChannels) internalCloseChannel(channel);
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.core/src/org/eclipse/tm/te/tcf/core/internal/Startup.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/Startup.java
index 3927b4786..0cae997dc 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.core/src/org/eclipse/tm/te/tcf/core/internal/Startup.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/Startup.java
@@ -7,13 +7,13 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.core.internal;
+package org.eclipse.tcf.te.tcf.core.internal;
import java.util.concurrent.atomic.AtomicBoolean;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.te.tcf.core.Tcf;
-import org.eclipse.tm.te.tcf.core.activator.CoreBundleActivator;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.te.tcf.core.Tcf;
+import org.eclipse.tcf.te.tcf.core.activator.CoreBundleActivator;
/**
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.core/src/org/eclipse/tm/te/tcf/core/internal/utils/LogUtils.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/utils/LogUtils.java
index 41d149581..fdea98cf8 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.core/src/org/eclipse/tm/te/tcf/core/internal/utils/LogUtils.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/utils/LogUtils.java
@@ -7,14 +7,14 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.core.internal.utils;
+package org.eclipse.tcf.te.tcf.core.internal.utils;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.te.tcf.core.activator.CoreBundleActivator;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.te.tcf.core.activator.CoreBundleActivator;
/**
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.core/src/org/eclipse/tm/te/tcf/core/internal/listener/InternalChannelListener.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/listeners/ChannelListener.java
index 585a0b992..00195798a 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.core/src/org/eclipse/tm/te/tcf/core/internal/listener/InternalChannelListener.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/listeners/ChannelListener.java
@@ -7,22 +7,23 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.core.internal.listener;
+package org.eclipse.tcf.te.tcf.core.listeners;
import org.eclipse.core.runtime.Assert;
import org.eclipse.osgi.util.NLS;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.te.tcf.core.Tcf;
-import org.eclipse.tm.te.tcf.core.internal.interfaces.IChannelOpenListener;
-import org.eclipse.tm.te.tcf.core.internal.nls.Messages;
-import org.eclipse.tm.te.tcf.core.internal.utils.LogUtils;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.te.tcf.core.Tcf;
+import org.eclipse.tcf.te.tcf.core.interfaces.tracing.ITraceIds;
+import org.eclipse.tcf.te.tcf.core.internal.utils.LogUtils;
+import org.eclipse.tcf.te.tcf.core.listeners.interfaces.IChannelOpenListener;
+import org.eclipse.tcf.te.tcf.core.nls.Messages;
/**
- * Internal channel listener. Attached to a TCF channel for tracing purpose.
+ * Channel listener implementation.
*/
-public class InternalChannelListener implements IChannel.IChannelListener {
+public class ChannelListener implements IChannel.IChannelListener {
// The reference to the channel
private final IChannel channel;
@@ -31,7 +32,7 @@ public class InternalChannelListener implements IChannel.IChannelListener {
*
* @param channel The channel. Must not be <code>null</code>.
*/
- public InternalChannelListener(IChannel channel) {
+ public ChannelListener(IChannel channel) {
Assert.isNotNull(channel);
this.channel = channel;
}
@@ -46,14 +47,14 @@ public class InternalChannelListener implements IChannel.IChannelListener {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.tcf.protocol.IChannel.IChannelListener#congestionLevel(int)
+ * @see org.eclipse.tcf.protocol.IChannel.IChannelListener#congestionLevel(int)
*/
@Override
public void congestionLevel(int level) {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.tcf.protocol.IChannel.IChannelListener#onChannelClosed(java.lang.Throwable)
+ * @see org.eclipse.tcf.protocol.IChannel.IChannelListener#onChannelClosed(java.lang.Throwable)
*/
@Override
public void onChannelClosed(Throwable error) {
@@ -69,7 +70,7 @@ public class InternalChannelListener implements IChannel.IChannelListener {
}
// Trace the channel closing
- LogUtils.logMessageForChannel(getChannel(), NLS.bind(Messages.InternalChannelListener_onChannelClosed_message, cause), "debug/channels", this); //$NON-NLS-1$
+ LogUtils.logMessageForChannel(getChannel(), NLS.bind(Messages.InternalChannelListener_onChannelClosed_message, cause), ITraceIds.TRACE_CHANNELS, this);
// Fire the property change event for the channel
Tcf.fireChannelStateChangeListeners(getChannel(), IChannel.STATE_CLOSED);
@@ -92,7 +93,7 @@ public class InternalChannelListener implements IChannel.IChannelListener {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.tcf.protocol.IChannel.IChannelListener#onChannelOpened()
+ * @see org.eclipse.tcf.protocol.IChannel.IChannelListener#onChannelOpened()
*/
@Override
public void onChannelOpened() {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.core/src/org/eclipse/tm/te/tcf/core/internal/listener/InternalChannelOpenListener.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/listeners/ChannelOpenListener.java
index ed8855580..07be327ba 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.core/src/org/eclipse/tm/te/tcf/core/internal/listener/InternalChannelOpenListener.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/listeners/ChannelOpenListener.java
@@ -7,31 +7,32 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.core.internal.listener;
+package org.eclipse.tcf.te.tcf.core.listeners;
import java.util.HashMap;
import java.util.Map;
import org.eclipse.core.runtime.Assert;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IChannel.IChannelListener;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.te.tcf.core.Tcf;
-import org.eclipse.tm.te.tcf.core.internal.interfaces.IChannelOpenListener;
-import org.eclipse.tm.te.tcf.core.internal.nls.Messages;
-import org.eclipse.tm.te.tcf.core.internal.utils.LogUtils;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IChannel.IChannelListener;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.te.tcf.core.Tcf;
+import org.eclipse.tcf.te.tcf.core.interfaces.tracing.ITraceIds;
+import org.eclipse.tcf.te.tcf.core.internal.utils.LogUtils;
+import org.eclipse.tcf.te.tcf.core.listeners.interfaces.IChannelOpenListener;
+import org.eclipse.tcf.te.tcf.core.nls.Messages;
/**
- * Internal channel open listener taking care of logging and caching.
+ * Channel open listener implementation.
*/
-public class InternalChannelOpenListener implements IChannelOpenListener {
+public class ChannelOpenListener implements IChannelOpenListener {
// Static map containing the channel listeners per channel. Access to the
// map should happen from the TCF protocol dispatch thread only.
private final Map<IChannel, IChannel.IChannelListener> channelListeners = new HashMap<IChannel, IChannel.IChannelListener>();
/* (non-Javadoc)
- * @see org.eclipse.tm.tcf.protocol.Protocol.ChannelOpenListener#onChannelOpen(org.eclipse.tm.tcf.protocol.IChannel)
+ * @see org.eclipse.tcf.protocol.Protocol.ChannelOpenListener#onChannelOpen(org.eclipse.tcf.protocol.IChannel)
*/
@Override
public void onChannelOpen(IChannel channel) {
@@ -39,13 +40,13 @@ public class InternalChannelOpenListener implements IChannelOpenListener {
Assert.isTrue(Protocol.isDispatchThread());
// Trace the channel opening
- LogUtils.logMessageForChannel(channel, Messages.InternalChannelOpenListener_onChannelOpen_message, "debug/channels", this); //$NON-NLS-1$
+ LogUtils.logMessageForChannel(channel, Messages.InternalChannelOpenListener_onChannelOpen_message, ITraceIds.TRACE_CHANNELS, this);
// As the channel has just opened, there should be no channel listener, but better be safe and check.
IChannel.IChannelListener channelListener = channelListeners.remove(channel);
if (channelListener != null) channel.removeChannelListener(channelListener);
// Create a new channel listener instance
- channelListener = new InternalChannelListener(channel);
+ channelListener = new ChannelListener(channel);
// Add the channel listener to the global map
setChannelListener(channel, channelListener);
// Attach channel listener to the channel
@@ -56,7 +57,7 @@ public class InternalChannelOpenListener implements IChannelOpenListener {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.core.internal.interfaces.IChannelOpenListener#setChannelListener(org.eclipse.tm.tcf.protocol.IChannel, org.eclipse.tm.tcf.protocol.IChannel.IChannelListener)
+ * @see org.eclipse.tcf.te.tcf.core.internal.interfaces.IChannelOpenListener#setChannelListener(org.eclipse.tcf.protocol.IChannel, org.eclipse.tcf.protocol.IChannel.IChannelListener)
*/
@Override
public void setChannelListener(IChannel channel, IChannelListener listener) {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.core/src/org/eclipse/tm/te/tcf/core/internal/interfaces/IChannelOpenListener.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/listeners/interfaces/IChannelOpenListener.java
index d3e3c9db5..c8e2c88b6 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.core/src/org/eclipse/tm/te/tcf/core/internal/interfaces/IChannelOpenListener.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/listeners/interfaces/IChannelOpenListener.java
@@ -7,10 +7,10 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.core.internal.interfaces;
+package org.eclipse.tcf.te.tcf.core.listeners.interfaces;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.Protocol.ChannelOpenListener;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.Protocol.ChannelOpenListener;
/**
* Enhanced channel open listener interface for internal use.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.core/src/org/eclipse/tm/te/tcf/core/interfaces/listeners/IChannelStateChangeListener.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/listeners/interfaces/IChannelStateChangeListener.java
index c60282053..5d1608571 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.core/src/org/eclipse/tm/te/tcf/core/interfaces/listeners/IChannelStateChangeListener.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/listeners/interfaces/IChannelStateChangeListener.java
@@ -7,9 +7,9 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.core.interfaces.listeners;
+package org.eclipse.tcf.te.tcf.core.listeners.interfaces;
-import org.eclipse.tm.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IChannel;
/**
* Interface for clients to implement that wishes to listen
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.core/src/org/eclipse/tm/te/tcf/core/interfaces/listeners/IProtocolStateChangeListener.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/listeners/interfaces/IProtocolStateChangeListener.java
index c739967f8..f42195444 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.core/src/org/eclipse/tm/te/tcf/core/interfaces/listeners/IProtocolStateChangeListener.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/listeners/interfaces/IProtocolStateChangeListener.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.core.interfaces.listeners;
+package org.eclipse.tcf.te.tcf.core.listeners.interfaces;
/**
* Interface for clients to implement that wishes to listen
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.core/src/org/eclipse/tm/te/tcf/core/internal/nls/Messages.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/nls/Messages.java
index 4c34cf391..43eaaba85 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.core/src/org/eclipse/tm/te/tcf/core/internal/nls/Messages.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/nls/Messages.java
@@ -3,11 +3,11 @@
* This program and the accompanying materials are made available under the terms
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.core.internal.nls;
+package org.eclipse.tcf.te.tcf.core.nls;
import java.lang.reflect.Field;
@@ -19,7 +19,7 @@ import org.eclipse.osgi.util.NLS;
public class Messages extends NLS {
// The plug-in resource bundle name
- private static final String BUNDLE_NAME = "org.eclipse.tm.te.tcf.core.internal.nls.Messages"; //$NON-NLS-1$
+ private static final String BUNDLE_NAME = "org.eclipse.tcf.te.tcf.core.nls.Messages"; //$NON-NLS-1$
/**
* Static constructor.
@@ -74,4 +74,13 @@ public class Messages extends NLS {
public static String InternalChannelListener_onChannelClosed_message;
public static String InternalChannelListener_onChannelClosed_cause;
+ public static String ChannelManager_openChannel_message;
+ public static String ChannelManager_openChannel_reuse_message;
+ public static String ChannelManager_openChannel_new_message;
+ public static String ChannelManager_openChannel_success_message;
+ public static String ChannelManager_openChannel_failed_message;
+ public static String ChannelManager_createPeer_new_message;
+ public static String ChannelManager_closeChannel_message;
+ public static String ChannelManager_closeChannel_inuse_message;
+ public static String ChannelManager_closeChannel_closed_message;
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/nls/Messages.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/nls/Messages.properties
new file mode 100644
index 000000000..074a24a6d
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/nls/Messages.properties
@@ -0,0 +1,19 @@
+#
+# org.eclipse.tcf.te.tcf.core
+# Externalized Strings.
+#
+
+InternalChannelOpenListener_onChannelOpen_message=Channel opened.
+
+InternalChannelListener_onChannelClosed_message=Channel closed. {0}
+InternalChannelListener_onChannelClosed_cause=; Possibly caused by: {0}
+
+ChannelManager_openChannel_message=Request to open channel. Peer id = {0}, forceNew = {1}
+ChannelManager_openChannel_reuse_message=Reusing already opened channel. Peer id = {0}, new reference count = {1}
+ChannelManager_openChannel_new_message=Opening new channel. Peer id = {0}
+ChannelManager_openChannel_success_message=Opening channel succeeded. Peer id = {0}
+ChannelManager_openChannel_failed_message=Opening channel failed. Peer id = {0}, cause = {1}
+ChannelManager_createPeer_new_message=New peer created. Peer id = {0}, isTransient = {1}
+ChannelManager_closeChannel_message=Request to close channel. Peer id = {0}
+ChannelManager_closeChannel_inuse_message=Channel not closed. Still in use. Peer id = {0}, new reference count = {1}
+ChannelManager_closeChannel_closed_message=Closed channel. Peer id = {0}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.core/src/org/eclipse/tm/te/tcf/core/streams/StreamsDataProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/streams/StreamsDataProvider.java
index e08938901..17adba4f5 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.core/src/org/eclipse/tm/te/tcf/core/streams/StreamsDataProvider.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/streams/StreamsDataProvider.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.core.streams;
+package org.eclipse.tcf.te.tcf.core.streams;
import java.io.IOException;
import java.io.Reader;
@@ -16,7 +16,7 @@ import java.util.List;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.PlatformObject;
-import org.eclipse.tm.tcf.services.IProcesses;
+import org.eclipse.tcf.services.IProcesses;
/**
* Remote context streams data provider implementation.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.core/src/org/eclipse/tm/te/tcf/core/streams/StreamsDataReceiver.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/streams/StreamsDataReceiver.java
index 37807a3f8..0de12c694 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.core/src/org/eclipse/tm/te/tcf/core/streams/StreamsDataReceiver.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/streams/StreamsDataReceiver.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.core.streams;
+package org.eclipse.tcf.te.tcf.core.streams;
import java.io.IOException;
import java.io.Writer;
@@ -16,7 +16,7 @@ import java.util.List;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.PlatformObject;
-import org.eclipse.tm.tcf.services.IProcesses;
+import org.eclipse.tcf.services.IProcesses;
/**
* Remote context streams data receiver implementation.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.core/src/org/eclipse/tm/te/tcf/core/utils/ExceptionUtils.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/util/ExceptionUtils.java
index 947474e86..e7a78f370 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.core/src/org/eclipse/tm/te/tcf/core/utils/ExceptionUtils.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/util/ExceptionUtils.java
@@ -7,12 +7,12 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.core.utils;
+package org.eclipse.tcf.te.tcf.core.util;
import java.util.concurrent.ExecutionException;
import org.eclipse.core.runtime.Assert;
-import org.eclipse.tm.tcf.util.TCFTask;
+import org.eclipse.tcf.util.TCFTask;
/**
* Exception utilities helper implementations.
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/util/JSONUtils.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/util/JSONUtils.java
new file mode 100644
index 000000000..7cc727131
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/util/JSONUtils.java
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.core.util;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStreamReader;
+
+/**
+ * JSON utilities helper implementations.
+ */
+public final class JSONUtils {
+
+ /**
+ * Decodes a string object from the given byte array.
+ * <p>
+ * Used if services sends plain strings instead of encoding them through JSON.
+ *
+ * @param data The byte array or <code>null</code>.
+ * @return The decoded string or <code>null</code>.
+ */
+ public static String decodeStringFromByteArray(byte[] data) {
+ String args = null;
+ if (data != null) {
+ StringBuilder builder = new StringBuilder();
+ InputStreamReader reader = new InputStreamReader(new ByteArrayInputStream(data));
+ try {
+ int c = reader.read();
+ while (c != -1) {
+ builder.append(c != 0 ? Character.valueOf((char)c).charValue() : ' ');
+ c = reader.read();
+ }
+ } catch (IOException ex) { /* ignored on purpose */ }
+
+ if (builder.length() > 0) args = builder.toString().trim();
+ }
+ return args;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/util/persistence/PersistableNameUtil.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/util/persistence/PersistableNameUtil.java
new file mode 100644
index 000000000..c006a4904
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/util/persistence/PersistableNameUtil.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.core.util.persistence;
+
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.tcf.te.runtime.utils.net.IPAddressUtil;
+
+/**
+ * Persistable name utility method implementations.
+ */
+public class PersistableNameUtil {
+ /* default */ final static Pattern pattern = Pattern.compile("TCP:([0-9\\.]+):[0-9]+", Pattern.CASE_INSENSITIVE); //$NON-NLS-1$
+
+ /**
+ * Matches the given name against a set of patterns to isolate the IP address.
+ * If the address could be isolated and the address is an local host address,
+ * replace the address with the string "localhost".
+ *
+ * @param name
+ * @return
+ */
+ public static String normalizeLocalhostAddress(String name) {
+ Assert.isNotNull(name);
+
+ // Let's see if the name matches the pattern
+ Matcher matcher = pattern.matcher(name);
+ if (matcher.matches()) {
+ String ip = matcher.group(1);
+ // If the IP address is for the local host, reconstruct the name
+ // string to include "localhost" instead of the IP address
+ if (IPAddressUtil.getInstance().isLocalHost(ip)) {
+ name = name.replace(ip, "localhost"); //$NON-NLS-1$
+ }
+ }
+
+ return name;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/.classpath b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/.classpath
index 8a8f1668c..8a8f1668c 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/.classpath
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/.classpath
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/.project b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/.project
index f14deb42e..bda28b03d 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/.project
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/.project
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.eclipse.tm.te.tcf.filesystem</name>
+ <name>org.eclipse.tcf.te.tcf.filesystem</name>
<comment></comment>
<projects>
</projects>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/.settings/org.eclipse.jdt.core.prefs b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/.settings/org.eclipse.jdt.core.prefs
index 086868ad1..086868ad1 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/.settings/org.eclipse.jdt.core.prefs
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/.settings/org.eclipse.jdt.core.prefs
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/.settings/org.eclipse.jdt.ui.prefs b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/.settings/org.eclipse.jdt.ui.prefs
index 5149950f5..5149950f5 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/.settings/org.eclipse.jdt.ui.prefs
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/.settings/org.eclipse.jdt.ui.prefs
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..507645d31
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/META-INF/MANIFEST.MF
@@ -0,0 +1,45 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.tcf.te.tcf.filesystem;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipse.tcf.te.tcf.filesystem.activator.UIPlugin
+Bundle-Vendor: %providerName
+Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
+ org.eclipse.ui;bundle-version="3.7.0",
+ org.eclipse.ui.forms;bundle-version="3.5.100",
+ org.eclipse.ui.navigator;bundle-version="3.5.100",
+ org.eclipse.tcf.core;bundle-version="1.0.0",
+ org.eclipse.tcf.te.runtime;bundle-version="1.0.0",
+ org.eclipse.tcf.te.tcf.core;bundle-version="1.0.0",
+ org.eclipse.tcf.te.ui;bundle-version="1.0.0",
+ org.eclipse.tcf.te.ui.forms;bundle-version="1.0.0",
+ org.eclipse.tcf.te.ui.swt;bundle-version="1.0.0",
+ org.eclipse.tcf.te.ui.views;bundle-version="1.0.0",
+ org.eclipse.tcf.te.tcf.locator;bundle-version="1.0.0",
+ org.eclipse.core.filesystem;bundle-version="1.3.100",
+ org.eclipse.ui.ide;bundle-version="3.7.0",
+ org.eclipse.compare;bundle-version="3.5.200",
+ org.eclipse.text;bundle-version="3.5.100",
+ org.eclipse.ui.workbench.texteditor;bundle-version="3.7.0",
+ org.eclipse.core.expressions;bundle-version="3.4.300",
+ org.eclipse.tcf.te.ui.controls;bundle-version="1.0.0",
+ org.eclipse.tcf.te.tcf.ui;bundle-version="1.0.0",
+ org.eclipse.ui.views.properties.tabbed;bundle-version="3.5.200"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
+Bundle-Localization: plugin
+Export-Package: org.eclipse.tcf.te.tcf.filesystem.activator;x-internal:=true,
+ org.eclipse.tcf.te.tcf.filesystem.controls,
+ org.eclipse.tcf.te.tcf.filesystem.dialogs,
+ org.eclipse.tcf.te.tcf.filesystem.filters,
+ org.eclipse.tcf.te.tcf.filesystem.help;x-internal:=true,
+ org.eclipse.tcf.te.tcf.filesystem.interfaces,
+ org.eclipse.tcf.te.tcf.filesystem.interfaces.preferences,
+ org.eclipse.tcf.te.tcf.filesystem.internal;x-internal:=true,
+ org.eclipse.tcf.te.tcf.filesystem.internal.handlers;x-internal:=true,
+ org.eclipse.tcf.te.tcf.filesystem.internal.preferences;x-internal:=true,
+ org.eclipse.tcf.te.tcf.filesystem.internal.properties;x-internal:=true,
+ org.eclipse.tcf.te.tcf.filesystem.internal.url;x-internal:=true,
+ org.eclipse.tcf.te.tcf.filesystem.model,
+ org.eclipse.tcf.te.tcf.filesystem.nls;x-internal:=true
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/build.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/build.properties
index d24082bdb..d24082bdb 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/build.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/build.properties
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/icons/obj16/error.gif b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/icons/obj16/error.gif
new file mode 100644
index 000000000..85ec26bb8
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/icons/obj16/error.gif
Binary files differ
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/icons/obj16/folder.gif b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/icons/obj16/folder.gif
index 5ae555a34..5ae555a34 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/icons/obj16/folder.gif
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/icons/obj16/folder.gif
Binary files differ
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/icons/obj16/hidden_file_filter.png b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/icons/obj16/hidden_file_filter.png
new file mode 100644
index 000000000..7cb530b2a
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/icons/obj16/hidden_file_filter.png
Binary files differ
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/icons/obj16/newfile_wiz.gif b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/icons/obj16/newfile_wiz.gif
new file mode 100644
index 000000000..9d050885b
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/icons/obj16/newfile_wiz.gif
Binary files differ
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/icons/obj16/newfolder_wiz.gif b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/icons/obj16/newfolder_wiz.gif
new file mode 100644
index 000000000..310eb18e3
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/icons/obj16/newfolder_wiz.gif
Binary files differ
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/icons/obj16/refresh.gif b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/icons/obj16/refresh.gif
new file mode 100644
index 000000000..3ca04d06f
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/icons/obj16/refresh.gif
Binary files differ
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/icons/obj16/root.gif b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/icons/obj16/root.gif
new file mode 100644
index 000000000..ba39f47f4
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/icons/obj16/root.gif
Binary files differ
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/icons/obj16/rootdrive.gif b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/icons/obj16/rootdrive.gif
index fd426343b..fd426343b 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/icons/obj16/rootdrive.gif
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/icons/obj16/rootdrive.gif
Binary files differ
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/icons/obj16/rootdriveopen.gif b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/icons/obj16/rootdriveopen.gif
index 2171f7c38..2171f7c38 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/icons/obj16/rootdriveopen.gif
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/icons/obj16/rootdriveopen.gif
Binary files differ
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/icons/obj16/synch_synch.gif b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/icons/obj16/synch_synch.gif
index ae7726345..ae7726345 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/icons/obj16/synch_synch.gif
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/icons/obj16/synch_synch.gif
Binary files differ
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/icons/obj16/system_file_filter.png b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/icons/obj16/system_file_filter.png
new file mode 100644
index 000000000..24e66a8a0
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/icons/obj16/system_file_filter.png
Binary files differ
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/icons/obj32/banner.png b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/icons/obj32/banner.png
index aa7c955b7..aa7c955b7 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/icons/obj32/banner.png
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/icons/obj32/banner.png
Binary files differ
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/icons/obj32/delete_readonly.png b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/icons/obj32/delete_readonly.png
new file mode 100644
index 000000000..4c8a7e3a8
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/icons/obj32/delete_readonly.png
Binary files differ
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/icons/obj32/replace_confirm.png b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/icons/obj32/replace_confirm.png
new file mode 100644
index 000000000..455df2156
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/icons/obj32/replace_confirm.png
Binary files differ
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/icons/ovr/ovr_conflict.png b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/icons/ovr/ovr_conflict.png
index eb22b4cce..eb22b4cce 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/icons/ovr/ovr_conflict.png
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/icons/ovr/ovr_conflict.png
Binary files differ
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/icons/ovr/ovr_modified.png b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/icons/ovr/ovr_modified.png
index 66e3e4e24..66e3e4e24 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/icons/ovr/ovr_modified.png
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/icons/ovr/ovr_modified.png
Binary files differ
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/icons/ovr/ovr_outdated.png b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/icons/ovr/ovr_outdated.png
index f662aac01..f662aac01 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/icons/ovr/ovr_outdated.png
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/icons/ovr/ovr_outdated.png
Binary files differ
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/plugin.properties
new file mode 100644
index 000000000..09f51af6b
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/plugin.properties
@@ -0,0 +1,110 @@
+##################################################################################
+# Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+# This program and the accompanying materials are made available under the terms
+# of the Eclipse Public License v1.0 which accompanies this distribution, and is
+# available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Wind River Systems - initial API and implementation
+##################################################################################
+
+pluginName = Target Explorer, TCF File System Extensions
+providerName = Eclipse.org
+
+# ***** Navigator Content *****
+
+navigatorContent.name = File System
+
+# ***** Editor Pages *****
+
+FSExplorerEditorPage.name=File System
+
+# ***** Preference and Property Pages *****
+
+GeneralInformationPage.name=General
+
+preference.page.name = File System
+
+# ***** Wizards and Wizard Pages *****
+
+newfile.wizard.name = File
+newfile.wizard.description = Please specify the attributes of the file.
+newfolder.wizard.name = Folder
+newfolder.wizard.description = Please specify the attributes of the folder.
+
+# ***** Filter *****
+
+FSTreeViewerFilter.hiddenFiles=Hidden files and folders
+FSTreeViewerFilter.systemFiles=Protected operating system files
+
+# ***** Actions/Commands *****
+
+PropertiesAction.label=Properties
+PropertiesAction.tooltip=Show Properties of Selection
+
+fsmenu.open.label = Open
+fsmenu.refresh.label = Refresh
+fsmenu.update.label = Update
+fsmenu.commit.label = Commit
+fsmenu.merge.label = Merge
+fsmenu.revert.label = Revert
+
+temenu.open.label = Open
+temenu.refresh.label = Refresh
+temenu.update.label = Update
+temenu.commit.label = Commit
+temenu.merge.label = Merge
+temenu.revert.label = Revert
+
+command.refresh.name = Refresh File
+command.update.name = Update File
+command.commit.name = Commit File
+command.merge.name = Merge File
+command.revert.name = Revert File
+
+decorator.modified.label = Modified Cache
+decorator.outdated.label = Outdated Cache
+decorator.conflict.label = Conflicting Cache
+decorator.label.cut = Cut File
+decorator.hidden.label = Hidden File
+
+menu.label.openwith = Open With
+menu.new.label = &New
+
+command.label.cut = Cut
+command.label.copy = Copy
+command.label.paste = Paste
+command.label.delete = Delete
+command.label.rename = Rename
+command.label.move = Move
+command.label.cut.1 = Cut
+command.label.copy.1 = Copy
+command.label.paste.1 = Paste
+command.label.delete.1 = Delete
+command.label.rename.1 = Rename
+command.label.move.1 = Move
+
+command.newfile.label = &File
+command.newfolder.label = &Folder
+command.newfile.name = New File
+command.newfolder.name = New Folder
+
+column.name.name = Name
+column.name.size = Size
+column.name.modified = Date Modified
+
+filter.name.hidden = Hidden files and folders
+filter.name.system = Protected operating system files
+
+column.name.type = Type
+column.name.accessed = Date Accessed
+
+filter.description.hidden = Hide hidden files and folders.
+filter.description.system = Hide protected operating system files.
+
+command.refreshViewer.label = Refresh View
+command.refreshViewer.tooltip = Refresh View
+command.refreshViewer.name = Refresh Viewer
+
+propertyTab.general.label = General
+propertyTab.advanced.label = Advanced \ No newline at end of file
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/plugin.xml b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/plugin.xml
new file mode 100644
index 000000000..4e9549458
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/plugin.xml
@@ -0,0 +1,2229 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+
+<!-- Common navigator contributions -->
+ <extension point="org.eclipse.ui.navigator.viewer">
+ <viewerContentBinding viewerId="org.eclipse.tcf.te.ui.views.TargetExplorer">
+ <includes>
+ <contentExtension
+ isRoot="false"
+ pattern="org.eclipse.tcf.te.tcf.filesystem.navigator.*"/>
+ </includes>
+ </viewerContentBinding>
+ <dragAssistant
+ class="org.eclipse.tcf.te.tcf.filesystem.internal.dnd.FSDragAdapterAssistant"
+ viewerId="org.eclipse.tcf.te.ui.views.TargetExplorer">
+ </dragAssistant>
+ </extension>
+
+ <extension point="org.eclipse.ui.navigator.navigatorContent">
+ <navigatorContent
+ activeByDefault="false"
+ contentProvider="org.eclipse.tcf.te.tcf.filesystem.controls.FSNavigatorContentProvider"
+ icon="icons/obj16/rootdrive.gif"
+ id="org.eclipse.tcf.te.tcf.filesystem.navigator.content"
+ labelProvider="org.eclipse.tcf.te.tcf.filesystem.internal.columns.FSTreeElementLabelProvider"
+ name="%navigatorContent.name"
+ priority="normal">
+ <triggerPoints>
+ <instanceof
+ value="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel">
+ </instanceof>
+ <test
+ property="org.eclipse.tcf.te.tcf.locator.hasRemoteService"
+ value="FileSystem">
+ </test>
+ </triggerPoints>
+ <possibleChildren>
+ <instanceof value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode"/>
+ </possibleChildren>
+ <commonSorter
+ class="org.eclipse.tcf.te.tcf.filesystem.controls.FSTreeViewerSorter"
+ id="org.eclipse.tcf.te.tcf.filesystem.navigator.sorter">
+ </commonSorter>
+ <dropAssistant
+ class="org.eclipse.tcf.te.tcf.filesystem.internal.dnd.FSDropAdapterAssistant"
+ id="org.eclipse.tcf.te.tcf.filesystem.dropAssistant">
+ <possibleDropTargets>
+ <instanceof
+ value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ </instanceof></possibleDropTargets>
+ </dropAssistant>
+ <commonWizard
+ type="new"
+ wizardId="org.eclipse.tcf.te.tcf.filesystem.wizards.NewFileWizard">
+ <enablement>
+ <instanceof
+ value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ </instanceof>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isDirectory">
+ </test>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isWritable">
+ </test></enablement>
+ </commonWizard>
+ <commonWizard
+ type="new"
+ wizardId="org.eclipse.tcf.te.tcf.filesystem.wizards.NewFolderWizard">
+ <enablement>
+ <instanceof
+ value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ </instanceof>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isDirectory">
+ </test>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isWritable">
+ </test>
+ </enablement>
+ </commonWizard>
+ </navigatorContent>
+ <commonFilter
+ activeByDefault="true"
+ class="org.eclipse.tcf.te.tcf.filesystem.filters.HiddenFilesViewerFilter"
+ id="org.eclipse.tcf.te.tcf.filesystem.navigator.filter.hiddenFiles"
+ name="%FSTreeViewerFilter.hiddenFiles"
+ visibleInUI="true">
+ </commonFilter>
+ <commonFilter
+ activeByDefault="true"
+ class="org.eclipse.tcf.te.tcf.filesystem.filters.SystemFilesViewerFilter"
+ id="org.eclipse.tcf.te.tcf.filesystem.navigator.filter.systemFiles"
+ name="%FSTreeViewerFilter.systemFiles"
+ visibleInUI="true">
+ </commonFilter>
+ </extension>
+
+<!-- Editor page contributions -->
+ <extension point="org.eclipse.tcf.te.ui.views.editorPages">
+ <editorPage
+ class="org.eclipse.tcf.te.ui.views.editor.pages.TreeViewerExplorerEditorPage:org.eclipse.tcf.te.ui.controls.viewer.fs"
+ name="%FSExplorerEditorPage.name"
+ id="org.eclipse.tcf.te.tcf.filesystem.FSExplorerEditorPage">
+ </editorPage>
+ </extension>
+
+<!-- Editor page binding contributions -->
+ <extension point="org.eclipse.tcf.te.ui.views.editorPageBindings">
+ <editorPageBinding
+ id="org.eclipse.tcf.te.tcf.filesystem.binding.FSExplorerEditorPage"
+ pageId="org.eclipse.tcf.te.tcf.filesystem.FSExplorerEditorPage">
+ <enablement>
+ <with variable="activeEditorInput">
+ <and>
+ <adapt type="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel">
+ <test property="org.eclipse.tcf.te.tcf.locator.hasRemoteService" value="FileSystem"/>
+ </adapt>
+ <test
+ property="org.eclipse.tcf.te.runtime.preference"
+ args="bundleId=org.eclipse.tcf.te.tcf.filesystem,key=tcf.filesystem.core.feature.editor.content.enable"
+ value="true">
+ </test>
+ </and>
+ </with>
+ </enablement>
+ </editorPageBinding>
+ </extension>
+
+<!-- Menu contributions -->
+ <extension point="org.eclipse.ui.menus">
+ <menuContribution locationURI="popup:org.eclipse.tcf.te.ui.controls.menu.fs?after=additions">
+ <separator
+ name="group.new">
+ </separator>
+ <menu
+ label="%menu.new.label">
+ <visibleWhen
+ checkEnabled="false">
+ <with
+ variable="selection">
+ <count
+ value="1">
+ </count>
+ <iterate>
+ <instanceof
+ value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ </instanceof>
+ </iterate>
+ </with>
+ </visibleWhen>
+ <command
+ commandId="org.eclipse.tcf.te.tcf.filesystem.commands.newFile"
+ helpContextId="org.eclipse.tcf.te.tcf.filesystem.command_NewFile"
+ icon="icons/obj16/newfile_wiz.gif"
+ label="%command.newfile.label"
+ style="push">
+ </command>
+ <command
+ commandId="org.eclipse.tcf.te.tcf.filesystem.commands.newFolder"
+ helpContextId="org.eclipse.tcf.te.tcf.filesystem.command_NewFolder"
+ icon="icons/obj16/newfolder_wiz.gif"
+ label="%command.newfolder.label"
+ style="push">
+ </command>
+ </menu>
+ <separator name="group.open" visible="true"/>
+ <command
+ commandId="org.eclipse.ui.navigator.Open"
+ helpContextId="org.eclipse.tcf.te.tcf.filesystem.command_Open"
+ id="open"
+ label="%fsmenu.open.label"
+ style="push">
+ <visibleWhen checkEnabled="false">
+ <with variable="selection">
+ <count value="1"/>
+ <iterate>
+ <instanceof value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode"/>
+ <test property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isFile"/>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isReadable">
+ </test>
+ <not>
+ <test property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isBinaryFile"/>
+ </not>
+ </iterate>
+ </with>
+ </visibleWhen>
+ </command>
+ <menu
+ label="%menu.label.openwith">
+ <visibleWhen
+ checkEnabled="false">
+ <with
+ variable="selection">
+ <count
+ value="1">
+ </count>
+ <iterate>
+ <instanceof
+ value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ </instanceof>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isFile">
+ </test>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isReadable">
+ </test>
+ <not>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isBinaryFile">
+ </test>
+ </not>
+ </iterate>
+ </with>
+ </visibleWhen>
+ <dynamic
+ class="org.eclipse.tcf.te.tcf.filesystem.internal.handlers.OpenWithContribution"
+ id="openWithMenu">
+ </dynamic>
+ </menu>
+ <separator
+ name="group.edit"
+ visible="true">
+ </separator>
+ <command
+ commandId="org.eclipse.ui.edit.cut"
+ helpContextId="org.eclipse.tcf.te.tcf.filesystem.command_Cut"
+ icon="platform:/plugin/org.eclipse.ui/icons/full/etool16/cut_edit.gif"
+ id="cut"
+ label="%command.label.cut"
+ mnemonic="t"
+ style="push">
+ <visibleWhen
+ checkEnabled="false">
+ <with
+ variable="selection">
+ <count
+ value="+">
+ </count>
+ <iterate>
+ <instanceof
+ value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ </instanceof>
+ </iterate>
+ </with>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.eclipse.ui.edit.copy"
+ helpContextId="org.eclipse.tcf.te.tcf.filesystem.command_Copy"
+ icon="platform:/plugin/org.eclipse.ui/icons/full/etool16/copy_edit.gif"
+ id="copy"
+ label="%command.label.copy"
+ mnemonic="C"
+ style="push">
+ <visibleWhen
+ checkEnabled="false">
+ <with
+ variable="selection">
+ <count
+ value="+">
+ </count>
+ <iterate>
+ <instanceof
+ value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ </instanceof>
+ </iterate>
+ </with>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.eclipse.ui.edit.paste"
+ helpContextId="org.eclipse.tcf.te.tcf.filesystem.command_Paste"
+ icon="platform:/plugin/org.eclipse.ui/icons/full/etool16/paste_edit.gif"
+ id="paste"
+ label="%command.label.paste"
+ mnemonic="P"
+ style="push">
+ <visibleWhen
+ checkEnabled="false">
+ <with
+ variable="selection">
+ <count
+ value="+">
+ </count>
+ <iterate>
+ <instanceof
+ value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ </instanceof>
+ </iterate>
+ </with>
+ </visibleWhen>
+ </command>
+ <separator
+ name="group.delete">
+ </separator>
+ <command
+ commandId="org.eclipse.ui.edit.delete"
+ helpContextId="org.eclipse.tcf.te.tcf.filesystem.command_Delete"
+ icon="platform:/plugin/org.eclipse.ui/icons/full/obj16/delete_obj.gif"
+ id="delete"
+ label="%command.label.delete"
+ mnemonic="D"
+ style="push">
+ <visibleWhen
+ checkEnabled="false">
+ <with
+ variable="selection">
+ <count
+ value="+">
+ </count>
+ <iterate>
+ <instanceof
+ value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ </instanceof>
+ </iterate>
+ </with>
+ </visibleWhen>
+ </command>
+ <separator
+ name="group.move"
+ visible="true">
+ </separator>
+ <command
+ commandId="org.eclipse.ui.edit.rename"
+ helpContextId="org.eclipse.tcf.te.tcf.filesystem.command_Rename"
+ id="rename"
+ label="%command.label.rename"
+ mnemonic="R"
+ style="push">
+ <visibleWhen
+ checkEnabled="false">
+ <with
+ variable="selection">
+ <count
+ value="1">
+ </count>
+ <iterate>
+ <instanceof
+ value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ </instanceof>
+ </iterate>
+ </with>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.eclipse.ui.edit.move"
+ helpContextId="org.eclipse.tcf.te.tcf.filesystem.command_Move"
+ id="move"
+ label="%command.label.move"
+ mnemonic="M"
+ style="push">
+ <visibleWhen
+ checkEnabled="false">
+ <with
+ variable="selection">
+ <count
+ value="+">
+ </count>
+ <iterate>
+ <instanceof
+ value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ </instanceof>
+ </iterate>
+ </with>
+ </visibleWhen>
+ </command>
+ <separator
+ name="group.state"
+ visible="true">
+ </separator>
+ <command
+ commandId="org.eclipse.ui.file.refresh"
+ helpContextId="org.eclipse.tcf.te.tcf.filesystem.command_RefreshFile"
+ icon="platform:/plugin/org.eclipse.ui/icons/full/elcl16/refresh_nav.gif"
+ id="refresh"
+ label="%fsmenu.refresh.label"
+ style="push">
+ <visibleWhen
+ checkEnabled="false">
+ <and>
+ <with
+ variable="selection">
+ <count
+ value="1">
+ </count>
+ <iterate>
+ <instanceof
+ value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ </instanceof>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isFile">
+ </test>
+ </iterate>
+ </with>
+ <not>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.cache.isAutoSavingOn">
+ </test>
+ </not>
+ </and>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.eclipse.ui.file.refresh"
+ helpContextId="org.eclipse.tcf.te.tcf.filesystem.command_RefreshDirectory"
+ icon="platform:/plugin/org.eclipse.ui/icons/full/elcl16/refresh_nav.gif"
+ id="refresh"
+ label="%fsmenu.refresh.label"
+ style="push">
+ <visibleWhen
+ checkEnabled="false">
+ <with
+ variable="selection">
+ <count
+ value="1">
+ </count>
+ <iterate>
+ <instanceof
+ value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ </instanceof>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isDirectory">
+ </test>
+ </iterate>
+ </with>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.eclipse.tcf.te.tcf.filesystem.commands.update"
+ helpContextId="org.eclipse.tcf.te.tcf.filesystem.command_Update"
+ id="update"
+ label="%fsmenu.update.label"
+ style="push">
+ <visibleWhen
+ checkEnabled="false">
+ <and>
+ <with
+ variable="selection">
+ <count
+ value="1">
+ </count>
+ <iterate>
+ <instanceof
+ value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ </instanceof>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isFile">
+ </test>
+ </iterate>
+ </with>
+ <not>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.cache.isAutoSavingOn">
+ </test>
+ </not>
+ </and>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.eclipse.tcf.te.tcf.filesystem.commands.commit"
+ helpContextId="org.eclipse.tcf.te.tcf.filesystem.command_Commit"
+ id="commit"
+ label="%fsmenu.commit.label"
+ style="push">
+ <visibleWhen
+ checkEnabled="false">
+ <and>
+ <with
+ variable="selection">
+ <count
+ value="1">
+ </count>
+ <iterate>
+ <instanceof
+ value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ </instanceof>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isFile">
+ </test>
+ </iterate>
+ </with>
+ <not>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.cache.isAutoSavingOn">
+ </test>
+ </not>
+ </and>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.eclipse.tcf.te.tcf.filesystem.commands.merge"
+ helpContextId="org.eclipse.tcf.te.tcf.filesystem.command_Merge"
+ id="merge"
+ label="%fsmenu.merge.label"
+ style="push">
+ <visibleWhen
+ checkEnabled="false">
+ <and>
+ <with
+ variable="selection">
+ <count
+ value="1">
+ </count>
+ <iterate>
+ <instanceof
+ value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ </instanceof>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isFile">
+ </test>
+ </iterate>
+ </with>
+ <not>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.cache.isAutoSavingOn">
+ </test>
+ </not>
+ </and>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.eclipse.tcf.te.tcf.filesystem.commands.revert"
+ helpContextId="org.eclipse.tcf.te.tcf.filesystem.command_Revert"
+ id="revert"
+ label="%fsmenu.revert.label"
+ style="push">
+ <visibleWhen
+ checkEnabled="false">
+ <and>
+ <with
+ variable="selection">
+ <count
+ value="1">
+ </count>
+ <iterate>
+ <instanceof
+ value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ </instanceof>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isFile">
+ </test>
+ </iterate>
+ </with>
+ <not>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.cache.isAutoSavingOn">
+ </test>
+ </not>
+ </and>
+ </visibleWhen>
+ </command>
+ <separator name="group.properties" visible="true"/>
+ <command
+ commandId="org.eclipse.ui.file.properties"
+ helpContextId="org.eclipse.tcf.te.tcf.filesystem.command_Properties"
+ id="properties"
+ label="%PropertiesAction.label"
+ tooltip="%PropertiesAction.tooltip">
+ <visibleWhen>
+ <with variable="selection">
+ <count value="1"/>
+ <iterate operator="and" ifEmpty="false">
+ <and>
+ <instanceof
+ value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ </instanceof>
+ <not>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isSystemRoot">
+ </test>
+ </not>
+ </and>
+ </iterate>
+ </with>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ <menuContribution locationURI="popup:org.eclipse.tcf.te.ui.views.TargetExplorer#Popup?after=group.properties">
+ <command
+ commandId="org.eclipse.ui.file.properties"
+ helpContextId="org.eclipse.tcf.te.tcf.filesystem.command_Properties"
+ id="properties"
+ label="%PropertiesAction.label"
+ tooltip="%PropertiesAction.tooltip">
+ <visibleWhen>
+ <with variable="selection">
+ <count value="1"/>
+ <iterate operator="and" ifEmpty="false">
+ <and>
+ <instanceof
+ value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ </instanceof>
+ <not>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isSystemRoot">
+ </test>
+ </not>
+ </and>
+ </iterate>
+ </with>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ <menuContribution locationURI="popup:org.eclipse.tcf.te.ui.views.TargetExplorer#Popup?after=group.open">
+ <command
+ commandId="org.eclipse.ui.navigator.Open"
+ helpContextId="org.eclipse.tcf.te.tcf.filesystem.command_Open"
+ id="open"
+ label="%temenu.open.label"
+ style="push">
+ <visibleWhen checkEnabled="false">
+ <with variable="selection">
+ <count value="1"/>
+ <iterate>
+ <instanceof value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode"/>
+ <test property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isFile"/>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isReadable">
+ </test>
+ <not>
+ <test property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isBinaryFile"/>
+ </not>
+ </iterate>
+ </with>
+ </visibleWhen>
+ </command>
+ <menu
+ label="%menu.label.openwith">
+ <visibleWhen
+ checkEnabled="false">
+ <with
+ variable="selection">
+ <count
+ value="1">
+ </count>
+ <iterate>
+ <instanceof
+ value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ </instanceof>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isFile">
+ </test>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isReadable">
+ </test>
+ <not>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isBinaryFile">
+ </test>
+ </not>
+ </iterate>
+ </with>
+ </visibleWhen>
+ <dynamic
+ class="org.eclipse.tcf.te.tcf.filesystem.internal.handlers.OpenWithContribution"
+ id="openWithMenu">
+ </dynamic>
+ </menu>
+ <separator
+ name="file.group.edit"
+ visible="true">
+ </separator>
+ <command
+ commandId="org.eclipse.ui.edit.cut"
+ helpContextId="org.eclipse.tcf.te.tcf.filesystem.command_Cut"
+ icon="platform:/plugin/org.eclipse.ui/icons/full/etool16/cut_edit.gif"
+ id="cut"
+ label="%command.label.cut.1"
+ mnemonic="t"
+ style="push">
+ <visibleWhen
+ checkEnabled="false">
+ <with
+ variable="selection">
+ <count
+ value="+">
+ </count>
+ <iterate>
+ <instanceof
+ value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ </instanceof>
+ </iterate>
+ </with>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.eclipse.ui.edit.copy"
+ helpContextId="org.eclipse.tcf.te.tcf.filesystem.command_Copy"
+ icon="platform:/plugin/org.eclipse.ui/icons/full/etool16/copy_edit.gif"
+ id="copy"
+ label="%command.label.copy.1"
+ mnemonic="C"
+ style="push">
+ <visibleWhen
+ checkEnabled="false">
+ <with
+ variable="selection">
+ <count
+ value="+">
+ </count>
+ <iterate>
+ <instanceof
+ value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ </instanceof>
+ </iterate>
+ </with>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.eclipse.ui.edit.paste"
+ helpContextId="org.eclipse.tcf.te.tcf.filesystem.command_Paste"
+ icon="platform:/plugin/org.eclipse.ui/icons/full/etool16/paste_edit.gif"
+ id="paste"
+ label="%command.label.paste.1"
+ mnemonic="P"
+ style="push">
+ <visibleWhen
+ checkEnabled="false">
+ <with
+ variable="selection">
+ <count
+ value="+">
+ </count>
+ <iterate>
+ <instanceof
+ value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ </instanceof>
+ </iterate>
+ </with>
+ </visibleWhen>
+ </command>
+ <separator
+ name="group.delete">
+ </separator>
+ <command
+ commandId="org.eclipse.ui.edit.delete"
+ helpContextId="org.eclipse.tcf.te.tcf.filesystem.command_Delete"
+ icon="platform:/plugin/org.eclipse.ui/icons/full/obj16/delete_obj.gif"
+ id="delete"
+ label="%command.label.delete.1"
+ mnemonic="D"
+ style="push">
+ <visibleWhen
+ checkEnabled="false">
+ <with
+ variable="selection">
+ <count
+ value="+">
+ </count>
+ <iterate>
+ <instanceof
+ value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ </instanceof>
+ </iterate>
+ </with>
+ </visibleWhen>
+ </command>
+ <separator
+ name="group.move"
+ visible="true">
+ </separator>
+ <command
+ commandId="org.eclipse.ui.edit.rename"
+ helpContextId="org.eclipse.tcf.te.tcf.filesystem.command_Rename"
+ id="rename"
+ label="%command.label.rename.1"
+ mnemonic="R"
+ style="push">
+ <visibleWhen
+ checkEnabled="false">
+ <with
+ variable="selection">
+ <count
+ value="1">
+ </count>
+ <iterate>
+ <instanceof
+ value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ </instanceof>
+ </iterate>
+ </with>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.eclipse.ui.edit.move"
+ helpContextId="org.eclipse.tcf.te.tcf.filesystem.command_Move"
+ id="move"
+ label="%command.label.move.1"
+ mnemonic="M"
+ style="push">
+ <visibleWhen
+ checkEnabled="false">
+ <with
+ variable="selection">
+ <count
+ value="+">
+ </count>
+ <iterate>
+ <instanceof
+ value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ </instanceof>
+ </iterate>
+ </with>
+ </visibleWhen>
+ </command>
+ <separator
+ name="group.state"
+ visible="true">
+ </separator>
+ <command
+ commandId="org.eclipse.ui.file.refresh"
+ helpContextId="org.eclipse.tcf.te.tcf.filesystem.command_RefreshFile"
+ icon="platform:/plugin/org.eclipse.ui/icons/full/elcl16/refresh_nav.gif"
+ id="refresh"
+ label="%temenu.refresh.label"
+ style="push">
+ <visibleWhen
+ checkEnabled="false">
+ <and>
+ <with
+ variable="selection">
+ <count
+ value="1">
+ </count>
+ <iterate>
+ <instanceof
+ value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ </instanceof>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isFile">
+ </test>
+ </iterate>
+ </with>
+ <not>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.cache.isAutoSavingOn">
+ </test>
+ </not>
+ </and>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.eclipse.ui.file.refresh"
+ helpContextId="org.eclipse.tcf.te.tcf.filesystem.command_RefreshDirectory"
+ icon="platform:/plugin/org.eclipse.ui/icons/full/elcl16/refresh_nav.gif"
+ id="refresh"
+ label="%fsmenu.refresh.label"
+ style="push">
+ <visibleWhen
+ checkEnabled="false">
+ <with
+ variable="selection">
+ <count
+ value="1">
+ </count>
+ <iterate>
+ <instanceof
+ value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ </instanceof>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isDirectory">
+ </test>
+ </iterate>
+ </with>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.eclipse.tcf.te.tcf.filesystem.commands.update"
+ helpContextId="org.eclipse.tcf.te.tcf.filesystem.command_Update"
+ id="update"
+ label="%temenu.update.label"
+ style="push">
+ <visibleWhen
+ checkEnabled="false">
+ <and>
+ <with
+ variable="selection">
+ <count
+ value="1">
+ </count>
+ <iterate>
+ <instanceof
+ value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ </instanceof>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isFile">
+ </test>
+ </iterate>
+ </with>
+ <not>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.cache.isAutoSavingOn">
+ </test>
+ </not>
+ </and>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.eclipse.tcf.te.tcf.filesystem.commands.commit"
+ helpContextId="org.eclipse.tcf.te.tcf.filesystem.command_Commit"
+ id="commit"
+ label="%temenu.commit.label"
+ style="push">
+ <visibleWhen
+ checkEnabled="false">
+ <and>
+ <with
+ variable="selection">
+ <count
+ value="1">
+ </count>
+ <iterate>
+ <instanceof
+ value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ </instanceof>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isFile">
+ </test>
+ </iterate>
+ </with>
+ <not>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.cache.isAutoSavingOn">
+ </test>
+ </not>
+ </and>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.eclipse.tcf.te.tcf.filesystem.commands.merge"
+ helpContextId="org.eclipse.tcf.te.tcf.filesystem.command_Merge"
+ id="merge"
+ label="%temenu.merge.label"
+ style="push">
+ <visibleWhen
+ checkEnabled="false">
+ <and>
+ <with
+ variable="selection">
+ <count
+ value="1">
+ </count>
+ <iterate>
+ <instanceof
+ value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ </instanceof>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isFile">
+ </test>
+ </iterate>
+ </with>
+ <not>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.cache.isAutoSavingOn">
+ </test>
+ </not>
+ </and>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.eclipse.tcf.te.tcf.filesystem.commands.revert"
+ helpContextId="org.eclipse.tcf.te.tcf.filesystem.command_Revert"
+ id="revert"
+ label="%temenu.revert.label"
+ style="push">
+ <visibleWhen
+ checkEnabled="false">
+ <and>
+ <with
+ variable="selection">
+ <count
+ value="1">
+ </count>
+ <iterate>
+ <instanceof
+ value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ </instanceof>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isFile">
+ </test>
+ </iterate>
+ </with>
+ <not>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.cache.isAutoSavingOn">
+ </test>
+ </not>
+ </and>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ <menuContribution
+ locationURI="toolbar:org.eclipse.tcf.te.ui.controls.menu.fs?after=additions">
+ <command
+ commandId="org.eclipse.tcf.te.tcf.filesystem.commands.refreshViewer"
+ icon="icons/obj16/refresh.gif"
+ label="%command.refreshViewer.label"
+ style="push"
+ tooltip="%command.refreshViewer.tooltip">
+ </command>
+ </menuContribution>
+ </extension>
+
+<!-- Property page contributions -->
+ <extension point="org.eclipse.ui.propertyPages">
+ <page
+ class="org.eclipse.tcf.te.tcf.filesystem.internal.properties.GeneralInformationPage"
+ id="org.eclipse.tcf.te.tcf.filesystem.pages.basic"
+ name="%GeneralInformationPage.name">
+ <enabledWhen>
+ <and>
+ <instanceof
+ value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ </instanceof>
+ <not>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isSystemRoot">
+ </test>
+ </not>
+ </and>
+ </enabledWhen>
+ </page>
+ </extension>
+
+<!-- Property tester contributions -->
+ <extension point="org.eclipse.core.expressions.propertyTesters">
+ <propertyTester
+ class="org.eclipse.tcf.te.tcf.filesystem.internal.testers.FSTreeNodePropertyTester"
+ id="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode"
+ namespace="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode"
+ properties="isFile,isDirectory,isBinaryFile,isReadable,isWritable,isExecutable,isRoot,isReadOnly,isHidden,isWindows,testParent,getCacheState,isSystemRoot"
+ type="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ </propertyTester>
+ <propertyTester
+ class="org.eclipse.tcf.te.tcf.filesystem.internal.testers.CachePropertyTester"
+ id="org.eclipse.tcf.te.tcf.filesystem.propertytester.cache"
+ namespace="org.eclipse.tcf.te.tcf.filesystem.propertytester.cache"
+ properties="isAutoSavingOn"
+ type="java.lang.Object">
+ </propertyTester>
+ <propertyTester
+ class="org.eclipse.tcf.te.tcf.filesystem.internal.testers.ClipboardPropertyTester"
+ id="org.eclipse.tcf.te.tcf.filesystem.propertytester.clipboard"
+ namespace="org.eclipse.tcf.te.tcf.filesystem.propertytester.clipboard"
+ properties="canPaste"
+ type="org.eclipse.jface.viewers.IStructuredSelection">
+ </propertyTester>
+ <propertyTester
+ class="org.eclipse.tcf.te.tcf.filesystem.internal.testers.EditorActivationEventPropertyTester"
+ id="org.eclipse.tcf.te.tcf.filesystem.propertytester.event"
+ namespace="org.eclipse.tcf.te.tcf.filesystem.propertytester.event"
+ properties="isEditorActivation"
+ type="org.eclipse.jface.viewers.ColumnViewerEditorActivationEvent">
+ </propertyTester>
+ <propertyTester
+ class="org.eclipse.tcf.te.tcf.filesystem.internal.testers.TargetPropertyTester"
+ id="org.eclipse.tcf.te.tcf.filesystem.propertytester.peer"
+ namespace="org.eclipse.tcf.te.tcf.filesystem.propertytester.peer"
+ properties="isWindows"
+ type="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel">
+ </propertyTester>
+ </extension>
+
+<!-- Command contributions -->
+ <extension point="org.eclipse.ui.commands">
+ <command
+ id="org.eclipse.tcf.te.tcf.filesystem.commands.update"
+ name="%command.update.name">
+ </command>
+ <command
+ id="org.eclipse.tcf.te.tcf.filesystem.commands.commit"
+ name="%command.commit.name">
+ </command>
+ <command
+ id="org.eclipse.tcf.te.tcf.filesystem.commands.merge"
+ name="%command.merge.name">
+ </command>
+ <command
+ id="org.eclipse.tcf.te.tcf.filesystem.commands.revert"
+ name="%command.revert.name">
+ </command>
+ <command
+ id="org.eclipse.tcf.te.tcf.filesystem.commands.newFile"
+ name="%command.newfile.name">
+ </command>
+ <command
+ id="org.eclipse.tcf.te.tcf.filesystem.commands.newFolder"
+ name="%command.newfolder.name">
+ </command>
+ <command
+ id="org.eclipse.tcf.te.tcf.filesystem.commands.refreshViewer"
+ name="%command.refreshViewer.name">
+ </command>
+ </extension>
+
+<!-- Command handler contributions -->
+ <extension point="org.eclipse.ui.handlers">
+ <!-- This handler contribution is for the double click behaviour in the
+ Target Explore tree view -->
+ <handler
+ class="org.eclipse.tcf.te.tcf.filesystem.internal.handlers.OpenFileHandler"
+ commandId="org.eclipse.ui.navigator.Open">
+ <activeWhen>
+ <and>
+ <with
+ variable="activePartId">
+ <or>
+ <equals
+ value="org.eclipse.tcf.te.ui.views.TargetExplorer">
+ </equals>
+ <equals
+ value="org.eclipse.tcf.te.ui.view.Editor">
+ </equals>
+ </or>
+ </with>
+ <with
+ variable="selection">
+ <count
+ value="1">
+ </count>
+ <iterate>
+ <instanceof
+ value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ </instanceof>
+ <test
+ forcePluginActivation="true"
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isFile">
+ </test>
+ <test
+ forcePluginActivation="true"
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isReadable">
+ </test>
+ <not>
+ <test
+ forcePluginActivation="true"
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isBinaryFile">
+ </test>
+ </not>
+ </iterate>
+ </with>
+ </and>
+ </activeWhen>
+ <enabledWhen>
+ <with
+ variable="selection">
+ <count
+ value="1">
+ </count>
+ <iterate>
+ <instanceof
+ value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ </instanceof>
+ <test
+ forcePluginActivation="true"
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isFile">
+ </test>
+ <test
+ forcePluginActivation="true"
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isReadable">
+ </test>
+ <not>
+ <test
+ forcePluginActivation="true"
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isBinaryFile">
+ </test>
+ </not>
+ </iterate>
+ </with>
+ </enabledWhen>
+ </handler>
+ <handler
+ class="org.eclipse.tcf.te.tcf.filesystem.internal.handlers.RefreshHandler"
+ commandId="org.eclipse.ui.file.refresh">
+ <activeWhen>
+ <and>
+ <with
+ variable="activePartId">
+ <or>
+ <equals
+ value="org.eclipse.tcf.te.ui.views.TargetExplorer">
+ </equals>
+ <equals
+ value="org.eclipse.tcf.te.ui.view.Editor">
+ </equals>
+ </or>
+ </with>
+ <with
+ variable="selection">
+ <count
+ value="1">
+ </count>
+ <iterate>
+ <instanceof
+ value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ </instanceof>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isFile">
+ </test>
+ </iterate>
+ </with>
+ <not>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.cache.isAutoSavingOn">
+ </test>
+ </not>
+ </and>
+ </activeWhen>
+ <enabledWhen>
+ <and>
+ <with
+ variable="selection">
+ <count
+ value="1">
+ </count>
+ <iterate>
+ <instanceof
+ value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ </instanceof>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isFile">
+ </test>
+ </iterate>
+ </with>
+ <not>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.cache.isAutoSavingOn">
+ </test>
+ </not>
+ </and>
+ </enabledWhen>
+ </handler>
+ <handler
+ class="org.eclipse.tcf.te.tcf.filesystem.internal.handlers.UpdateHandler"
+ commandId="org.eclipse.tcf.te.tcf.filesystem.commands.update">
+ <activeWhen>
+ <with
+ variable="activePartId">
+ <or>
+ <equals
+ value="org.eclipse.tcf.te.ui.views.TargetExplorer">
+ </equals>
+ <equals
+ value="org.eclipse.tcf.te.ui.view.Editor">
+ </equals>
+ </or>
+ </with>
+ </activeWhen>
+ <enabledWhen>
+ <and>
+ <with
+ variable="selection">
+ <count
+ value="1">
+ </count>
+ <iterate>
+ <instanceof
+ value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ </instanceof>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isFile">
+ </test>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.getCacheState"
+ value="outdated">
+ </test>
+ </iterate>
+ </with>
+ <not>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.cache.isAutoSavingOn">
+ </test>
+ </not>
+ </and>
+ </enabledWhen>
+ </handler>
+ <handler
+ class="org.eclipse.tcf.te.tcf.filesystem.internal.handlers.CommitHandler"
+ commandId="org.eclipse.tcf.te.tcf.filesystem.commands.commit">
+ <activeWhen>
+ <with
+ variable="activePartId">
+ <or>
+ <equals
+ value="org.eclipse.tcf.te.ui.views.TargetExplorer">
+ </equals>
+ <equals
+ value="org.eclipse.tcf.te.ui.view.Editor">
+ </equals>
+ </or>
+ </with>
+ </activeWhen>
+ <enabledWhen>
+ <and>
+ <with
+ variable="selection">
+ <count
+ value="1">
+ </count>
+ <iterate>
+ <instanceof
+ value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ </instanceof>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isFile">
+ </test>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.getCacheState"
+ value="modified">
+ </test>
+ </iterate>
+ </with>
+ <not>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.cache.isAutoSavingOn">
+ </test>
+ </not>
+ </and>
+ </enabledWhen>
+ </handler>
+ <handler
+ class="org.eclipse.tcf.te.tcf.filesystem.internal.handlers.MergeHandler"
+ commandId="org.eclipse.tcf.te.tcf.filesystem.commands.merge">
+ <activeWhen>
+ <with
+ variable="activePartId">
+ <or>
+ <equals
+ value="org.eclipse.tcf.te.ui.views.TargetExplorer">
+ </equals>
+ <equals
+ value="org.eclipse.tcf.te.ui.view.Editor">
+ </equals>
+ </or>
+ </with>
+ </activeWhen>
+ <enabledWhen>
+ <and>
+ <with
+ variable="selection">
+ <count
+ value="1">
+ </count>
+ <iterate>
+ <instanceof
+ value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ </instanceof>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isFile">
+ </test>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.getCacheState"
+ value="conflict">
+ </test>
+ </iterate>
+ </with>
+ <not>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.cache.isAutoSavingOn">
+ </test>
+ </not>
+ </and>
+ </enabledWhen>
+ </handler>
+ <handler
+ class="org.eclipse.tcf.te.tcf.filesystem.internal.handlers.UpdateHandler"
+ commandId="org.eclipse.tcf.te.tcf.filesystem.commands.revert">
+ <activeWhen>
+ <with
+ variable="activePartId">
+ <or>
+ <equals
+ value="org.eclipse.tcf.te.ui.views.TargetExplorer">
+ </equals>
+ <equals
+ value="org.eclipse.tcf.te.ui.view.Editor">
+ </equals>
+ </or>
+ </with>
+ </activeWhen>
+ <enabledWhen>
+ <and>
+ <with
+ variable="selection">
+ <count
+ value="1">
+ </count>
+ <iterate>
+ <instanceof
+ value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ </instanceof>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isFile">
+ </test>
+ <or>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.getCacheState"
+ value="modified">
+ </test>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.getCacheState"
+ value="conflict">
+ </test>
+ </or>
+ </iterate>
+ </with>
+ <not>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.cache.isAutoSavingOn">
+ </test>
+ </not>
+ </and>
+ </enabledWhen>
+ </handler>
+ <handler
+ class="org.eclipse.tcf.te.tcf.filesystem.internal.handlers.DeleteFilesHandler"
+ commandId="org.eclipse.ui.edit.delete">
+ <activeWhen>
+ <with
+ variable="activePartId">
+ <or>
+ <equals
+ value="org.eclipse.tcf.te.ui.views.TargetExplorer">
+ </equals>
+ <equals
+ value="org.eclipse.tcf.te.ui.view.Editor">
+ </equals>
+ </or>
+ </with>
+ </activeWhen>
+ <enabledWhen>
+ <with
+ variable="selection">
+ <count
+ value="+">
+ </count>
+ <iterate>
+ <instanceof
+ value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ </instanceof>
+ <not>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isRoot">
+ </test>
+ </not>
+ <or>
+ <and>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isWindows">
+ </test>
+ <not>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isReadOnly">
+ </test>
+ </not>
+ </and>
+ <and>
+ <not>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isWindows">
+ </test>
+ </not>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isWritable">
+ </test>
+ </and>
+ </or>
+ </iterate>
+ </with>
+ </enabledWhen>
+ </handler>
+ <handler
+ class="org.eclipse.tcf.te.tcf.filesystem.internal.handlers.CutFilesHandler"
+ commandId="org.eclipse.ui.edit.cut">
+ <activeWhen>
+ <with
+ variable="activePartId">
+ <or>
+ <equals
+ value="org.eclipse.tcf.te.ui.views.TargetExplorer">
+ </equals>
+ <equals
+ value="org.eclipse.tcf.te.ui.view.Editor">
+ </equals>
+ </or>
+ </with>
+ </activeWhen>
+ <enabledWhen>
+ <with
+ variable="selection">
+ <count
+ value="+">
+ </count>
+ <iterate>
+ <instanceof
+ value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ </instanceof>
+ <not>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isRoot">
+ </test>
+ </not>
+ <or>
+ <and>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isWindows">
+ </test>
+ <not>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isReadOnly">
+ </test>
+ </not>
+ </and>
+ <and>
+ <not>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isWindows">
+ </test>
+ </not>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isWritable">
+ </test>
+ </and>
+ </or>
+ </iterate>
+ </with>
+ </enabledWhen>
+ </handler>
+ <handler
+ class="org.eclipse.tcf.te.tcf.filesystem.internal.handlers.CopyFilesHandler"
+ commandId="org.eclipse.ui.edit.copy">
+ <activeWhen>
+ <with
+ variable="activePartId">
+ <or>
+ <equals
+ value="org.eclipse.tcf.te.ui.views.TargetExplorer">
+ </equals>
+ <equals
+ value="org.eclipse.tcf.te.ui.view.Editor">
+ </equals>
+ </or>
+ </with>
+ </activeWhen>
+ <enabledWhen>
+ <with
+ variable="selection">
+ <count
+ value="+">
+ </count>
+ <iterate>
+ <instanceof
+ value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ </instanceof>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isReadable">
+ </test>
+ <not>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isRoot">
+ </test>
+ </not>
+ </iterate>
+ </with>
+ </enabledWhen>
+ </handler>
+ <handler
+ class="org.eclipse.tcf.te.tcf.filesystem.internal.handlers.PasteFilesHandler"
+ commandId="org.eclipse.ui.edit.paste">
+ <activeWhen>
+ <with
+ variable="activePartId">
+ <or>
+ <equals
+ value="org.eclipse.tcf.te.ui.views.TargetExplorer">
+ </equals>
+ <equals
+ value="org.eclipse.tcf.te.ui.view.Editor">
+ </equals>
+ </or>
+ </with>
+ </activeWhen>
+ <enabledWhen>
+ <and>
+ <with
+ variable="selection">
+ <count
+ value="+">
+ </count>
+ <iterate>
+ <instanceof
+ value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ </instanceof>
+ </iterate>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.clipboard.canPaste">
+ </test>
+ </with>
+ </and>
+ </enabledWhen>
+ </handler>
+ <handler
+ class="org.eclipse.tcf.te.tcf.filesystem.internal.handlers.MoveFilesHandler"
+ commandId="org.eclipse.ui.edit.move">
+ <activeWhen>
+ <with
+ variable="activePartId">
+ <or>
+ <equals
+ value="org.eclipse.tcf.te.ui.views.TargetExplorer">
+ </equals>
+ <equals
+ value="org.eclipse.tcf.te.ui.view.Editor">
+ </equals>
+ </or>
+ </with>
+ </activeWhen>
+ <enabledWhen>
+ <with
+ variable="selection">
+ <count
+ value="+">
+ </count>
+ <iterate>
+ <instanceof
+ value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ </instanceof>
+ <not>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isRoot">
+ </test>
+ </not>
+ <or>
+ <and>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isWindows">
+ </test>
+ <not>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isReadOnly">
+ </test>
+ </not>
+ </and>
+ <and>
+ <not>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isWindows">
+ </test>
+ </not>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isWritable">
+ </test>
+ </and>
+ </or>
+ </iterate>
+ </with>
+ </enabledWhen>
+ </handler>
+ <handler
+ class="org.eclipse.tcf.te.tcf.filesystem.internal.handlers.RenameFilesHandler"
+ commandId="org.eclipse.ui.edit.rename">
+ <activeWhen>
+ <with
+ variable="activePartId">
+ <or>
+ <equals
+ value="org.eclipse.tcf.te.ui.views.TargetExplorer">
+ </equals>
+ <equals
+ value="org.eclipse.tcf.te.ui.view.Editor">
+ </equals>
+ </or>
+ </with>
+ </activeWhen>
+ <enabledWhen>
+ <with
+ variable="selection">
+ <count
+ value="1">
+ </count>
+ <iterate>
+ <instanceof
+ value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ </instanceof>
+ <not>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isRoot">
+ </test>
+ </not>
+ <or>
+ <and>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isWindows">
+ </test>
+ <not>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isReadOnly">
+ </test>
+ </not>
+ </and>
+ <and>
+ <not>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isWindows">
+ </test>
+ </not>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isWritable">
+ </test>
+ </and>
+ </or>
+ </iterate>
+ </with>
+ </enabledWhen>
+ </handler>
+ <handler
+ class="org.eclipse.tcf.te.tcf.filesystem.internal.handlers.RefreshDirectoryHandler"
+ commandId="org.eclipse.ui.file.refresh">
+ <activeWhen>
+ <and>
+ <with
+ variable="activePartId">
+ <or>
+ <equals
+ value="org.eclipse.tcf.te.ui.views.TargetExplorer">
+ </equals>
+ <equals
+ value="org.eclipse.tcf.te.ui.view.Editor">
+ </equals>
+ </or>
+ </with>
+ <with
+ variable="selection">
+ <count
+ value="1">
+ </count>
+ <iterate>
+ <instanceof
+ value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ </instanceof>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isDirectory">
+ </test>
+ </iterate>
+ </with>
+ </and>
+ </activeWhen>
+ <enabledWhen>
+ <with
+ variable="selection">
+ <count
+ value="1">
+ </count>
+ <iterate>
+ <instanceof
+ value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ </instanceof>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isDirectory">
+ </test>
+ </iterate>
+ </with>
+ </enabledWhen>
+ </handler>
+ <handler
+ class="org.eclipse.tcf.te.tcf.filesystem.internal.handlers.NewFileHandler"
+ commandId="org.eclipse.tcf.te.tcf.filesystem.commands.newFile">
+ <activeWhen>
+ <with
+ variable="activePartId">
+ <equals
+ value="org.eclipse.tcf.te.ui.view.Editor">
+ </equals>
+ </with>
+ </activeWhen>
+ <enabledWhen>
+ <with
+ variable="selection">
+ <count
+ value="1">
+ </count>
+ <iterate>
+ <instanceof
+ value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ </instanceof>
+ <or>
+ <and>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isDirectory">
+ </test>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isWritable">
+ </test>
+ </and>
+ <and>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isFile">
+ </test>
+ <test
+ args="isWritable"
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.testParent">
+ </test>
+ </and>
+ </or>
+ </iterate>
+ </with>
+ </enabledWhen>
+ </handler>
+ <handler
+ class="org.eclipse.tcf.te.tcf.filesystem.internal.handlers.NewFolderHandler"
+ commandId="org.eclipse.tcf.te.tcf.filesystem.commands.newFolder">
+ <activeWhen>
+ <with
+ variable="activePartId">
+ <equals
+ value="org.eclipse.tcf.te.ui.view.Editor">
+ </equals>
+ </with>
+ </activeWhen>
+ <enabledWhen>
+ <with
+ variable="selection">
+ <count
+ value="1">
+ </count>
+ <iterate>
+ <instanceof
+ value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ </instanceof>
+ <or>
+ <and>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isDirectory">
+ </test>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isWritable">
+ </test>
+ </and>
+ <and>
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isFile">
+ </test>
+ <test
+ args="isWritable"
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.testParent">
+ </test>
+ </and>
+ </or>
+ </iterate>
+ </with>
+ </enabledWhen>
+ </handler>
+ <handler
+ class="org.eclipse.tcf.te.tcf.filesystem.internal.handlers.RefreshViewerHandler"
+ commandId="org.eclipse.tcf.te.tcf.filesystem.commands.refreshViewer">
+ </handler>
+ </extension>
+
+<!-- Decorator contributions -->
+ <extension point="org.eclipse.ui.decorators">
+ <decorator
+ icon="icons/ovr/ovr_modified.png"
+ id="org.eclipse.tcf.te.tcf.filesystem.decorators.modified"
+ label="%decorator.modified.label"
+ lightweight="true"
+ location="TOP_RIGHT"
+ state="true">
+ <enablement>
+ <objectState
+ name="cache.state"
+ value="modified">
+ </objectState>
+ </enablement>
+ </decorator>
+ <decorator
+ icon="icons/ovr/ovr_outdated.png"
+ id="org.eclipse.tcf.te.tcf.filesystem.decorators.outdated"
+ label="%decorator.outdated.label"
+ lightweight="true"
+ location="TOP_RIGHT"
+ state="true">
+ <enablement>
+ <objectState
+ name="cache.state"
+ value="outdated">
+ </objectState>
+ </enablement>
+ </decorator>
+ <decorator
+ icon="icons/ovr/ovr_conflict.png"
+ id="org.eclipse.tcf.te.tcf.filesystem.decorators.conflict"
+ label="%decorator.conflict.label"
+ lightweight="true"
+ location="TOP_RIGHT"
+ state="true">
+ <enablement>
+ <objectState
+ name="cache.state"
+ value="conflict">
+ </objectState>
+ </enablement>
+ </decorator>
+ <decorator
+ class="org.eclipse.tcf.te.tcf.filesystem.internal.decorators.PhantomDecorator"
+ id="org.eclipse.tcf.te.tcf.filesystem.decorators.cut"
+ label="%decorator.label.cut"
+ state="true">
+ <enablement>
+ <objectState
+ name="edit.cut"
+ value="true">
+ </objectState>
+ </enablement>
+ </decorator>
+ <decorator
+ class="org.eclipse.tcf.te.tcf.filesystem.internal.decorators.PhantomDecorator"
+ id="org.eclipse.tcf.te.tcf.filesystem.decorators.hidden"
+ label="%decorator.hidden.label"
+ state="true">
+ <enablement>
+ <objectState
+ name="hidden"
+ value="true">
+ </objectState>
+ </enablement>
+ </decorator>
+ </extension>
+
+<!-- Preference contributions -->
+ <extension point="org.eclipse.core.runtime.preferences">
+ <initializer class="org.eclipse.tcf.te.tcf.filesystem.internal.preferences.PreferencesInitializer"/>
+ </extension>
+
+<!-- Preference page contributions -->
+ <extension point="org.eclipse.ui.preferencePages">
+ <page
+ category="org.eclipse.tcf.te.ui.preferences.general"
+ class="org.eclipse.tcf.te.tcf.filesystem.internal.preferences.TargetExplorerPreferencePage"
+ id="org.eclipse.tcf.te.ui.preferences.tcf.filesystem"
+ name="%preference.page.name">
+ </page>
+ </extension>
+
+<!-- Adapter contributions -->
+ <extension point="org.eclipse.core.runtime.adapters">
+ <factory
+ adaptableType="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode"
+ class="org.eclipse.tcf.te.tcf.filesystem.internal.adapters.NodeStateFilterFactory">
+ <adapter
+ type="org.eclipse.ui.IActionFilter">
+ </adapter>
+ <adapter
+ type="org.eclipse.jface.viewers.ILabelProvider">
+ </adapter>
+ </factory>
+ </extension>
+
+<!-- CellEditor factory contributions -->
+ <extension point="org.eclipse.tcf.te.ui.cellEditors">
+ <cellEditor
+ editorFactory="org.eclipse.tcf.te.tcf.filesystem.internal.celleditor.FSViewerCellEditorFactory">
+ <activation>
+ <and>
+ <with
+ variable="selection">
+ <count
+ value="1">
+ </count>
+ <iterate>
+ <instanceof
+ value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ </instanceof>
+ </iterate>
+ </with>
+ <with
+ variable="event">
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.propertytester.event.isEditorActivation">
+ </test>
+ </with>
+ </and>
+ </activation>
+ <contributeTo
+ viewerId="org.eclipse.tcf.te.ui.views.TargetExplorer">
+ </contributeTo>
+ <contributeTo
+ viewerId="org.eclipse.tcf.te.ui.controls.viewer.fs">
+ </contributeTo>
+ </cellEditor>
+ </extension>
+
+<!-- New wizard contributions -->
+ <extension point="org.eclipse.tcf.te.ui.newWizards">
+ <wizard
+ canFinishEarly="false"
+ category="org.eclipse.tcf.te.tcf.ui.newWizards.category"
+ class="org.eclipse.tcf.te.tcf.filesystem.internal.wizards.NewFileWizard"
+ hasPages="true"
+ icon="icons/obj16/newfile_wiz.gif"
+ id="org.eclipse.tcf.te.tcf.filesystem.wizards.NewFileWizard"
+ name="%newfile.wizard.name">
+ <description>
+ %newfile.wizard.description
+ </description>
+ </wizard>
+ <wizard
+ canFinishEarly="false"
+ category="org.eclipse.tcf.te.tcf.ui.newWizards.category"
+ class="org.eclipse.tcf.te.tcf.filesystem.internal.wizards.NewFolderWizard"
+ hasPages="true"
+ icon="icons/obj16/newfolder_wiz.gif"
+ id="org.eclipse.tcf.te.tcf.filesystem.wizards.NewFolderWizard"
+ name="%newfolder.wizard.name">
+ <description>
+ %newfolder.wizard.description
+ </description>
+ </wizard>
+ </extension>
+
+ <extension point="org.eclipse.tcf.te.ui.viewers">
+ <viewer
+ autoExpandLevel="0"
+ contentProvider="org.eclipse.tcf.te.tcf.filesystem.controls.FSTreeContentProvider"
+ doubleClickCommand="org.eclipse.ui.navigator.Open"
+ helpId="org.eclipse.tcf.te.tcf.filesystem.FSExplorerEditorPage"
+ id="org.eclipse.tcf.te.ui.controls.viewer.fs"
+ menuId="org.eclipse.tcf.te.ui.controls.menu.fs"
+ persistent="true">
+ <creation>
+ <style name="SWT.FULL_SELECTION" />
+ <style name="SWT.MULTI" />
+ </creation>
+ <dragSupport
+ class="org.eclipse.tcf.te.tcf.filesystem.internal.dnd.FSDragSourceListener">
+ <operations>
+ <operation name="DND.DROP_COPY" />
+ <operation name="DND.DROP_MOVE" />
+ <operation name="DND.DROP_LINK" />
+ </operations>
+ <transferTypes>
+ <transferType name ="LocalSelectionTransfer" />
+ </transferTypes>
+ </dragSupport>
+ <dropSupport
+ class="org.eclipse.tcf.te.tcf.filesystem.internal.dnd.FSDropTargetListener">
+ <operations>
+ <operation name="DND.DROP_COPY" />
+ <operation name="DND.DROP_MOVE" />
+ <operation name="DND.DROP_LINK" />
+ </operations>
+ <transferTypes>
+ <transferType name ="LocalSelectionTransfer" />
+ </transferTypes>
+ </dropSupport>
+ </viewer>
+ <columnContribution viewerId="org.eclipse.tcf.te.ui.controls.viewer.fs">
+ <column
+ alignment="SWT.LEFT"
+ comparator="org.eclipse.tcf.te.tcf.filesystem.internal.columns.FSTreeElementComparator"
+ id="name"
+ labelProvider="org.eclipse.tcf.te.tcf.filesystem.internal.columns.FSTreeElementLabelProvider"
+ moveable="true"
+ name="%column.name.name"
+ resizable="true"
+ style="SWT.LEFT"
+ visible="true"
+ width="300">
+ </column>
+ <column
+ alignment="SWT.RIGHT"
+ comparator="org.eclipse.tcf.te.tcf.filesystem.internal.columns.SizeComparator"
+ id="size"
+ labelProvider="org.eclipse.tcf.te.tcf.filesystem.internal.columns.SizeLabelProvider"
+ moveable="true"
+ name="%column.name.size"
+ resizable="true"
+ style="SWT.RIGHT"
+ visible="true"
+ width="100">
+ </column>
+ <column
+ alignment="SWT.LEFT"
+ comparator="org.eclipse.tcf.te.tcf.filesystem.internal.columns.FileTypeComparator"
+ id="type"
+ labelProvider="org.eclipse.tcf.te.tcf.filesystem.internal.columns.FileTypeLabelProvider"
+ moveable="true"
+ name="%column.name.type"
+ resizable="true"
+ style="SWT.LEFT"
+ visible="false"
+ width="100">
+ </column>
+ <column
+ alignment="SWT.RIGHT"
+ comparator="org.eclipse.tcf.te.tcf.filesystem.internal.columns.ModificationTimeComparator"
+ id="modified"
+ labelProvider="org.eclipse.tcf.te.tcf.filesystem.internal.columns.ModificationTimeLabelProvider"
+ moveable="true"
+ name="%column.name.modified"
+ resizable="true"
+ style="SWT.RIGHT"
+ visible="true"
+ width="120">
+ </column>
+ <column
+ alignment="SWT.RIGHT"
+ comparator="org.eclipse.tcf.te.tcf.filesystem.internal.columns.AccessTimeComparator"
+ id="accessed"
+ labelProvider="org.eclipse.tcf.te.tcf.filesystem.internal.columns.AccessTimeLabelProvider"
+ moveable="true"
+ name="%column.name.accessed"
+ resizable="true"
+ style="SWT.RIGHT"
+ visible="false"
+ width="120">
+ </column>
+ </columnContribution>
+
+ <filterContribution viewerId="org.eclipse.tcf.te.ui.controls.viewer.fs">
+ <filter
+ class="org.eclipse.tcf.te.tcf.filesystem.filters.HiddenFilesViewerFilter"
+ description="%filter.description.hidden"
+ enabled="true"
+ id="org.eclipse.tcf.te.tcf.filesystem.navigator.filter.hiddenFiles"
+ image="icons/obj16/hidden_file_filter.png"
+ name="%filter.name.hidden">
+ </filter>
+ <filter
+ class="org.eclipse.tcf.te.tcf.filesystem.filters.SystemFilesViewerFilter"
+ description="%filter.description.system"
+ enabled="true"
+ id="org.eclipse.tcf.te.tcf.filesystem.navigator.filter.systemFiles"
+ image="icons/obj16/system_file_filter.png"
+ name="%filter.name.system">
+ <activation>
+ <with variable="input">
+ <test property="org.eclipse.tcf.te.tcf.filesystem.propertytester.peer.isWindows"/>
+ </with>
+ </activation>
+ </filter>
+ </filterContribution>
+ </extension>
+ <extension
+ point="org.eclipse.core.runtime.adapters">
+ <factory
+ adaptableType="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel"
+ class="org.eclipse.tcf.te.tcf.filesystem.internal.adapters.ViewerInputAdapterFactory">
+ <adapter
+ type="org.eclipse.tcf.te.ui.interfaces.IViewerInput">
+ </adapter>
+ </factory>
+ </extension>
+ <extension
+ point="org.eclipse.ui.views.properties.tabbed.propertyTabs">
+ <propertyTabs
+ contributorId="org.eclipse.tcf.te.ui">
+ <propertyTab
+ category="target_explorer"
+ id="org.eclipse.tcf.te.tcf.filesystem.propertytab.general"
+ label="%propertyTab.general.label">
+ </propertyTab>
+ <propertyTab
+ afterTab="org.eclipse.tcf.te.tcf.filesystem.propertytab.general"
+ category="target_explorer"
+ id="org.eclipse.tcf.te.tcf.filesystem.propertytab.advanced"
+ label="%propertyTab.advanced.label">
+ </propertyTab>
+ </propertyTabs>
+ </extension>
+ <extension
+ point="org.eclipse.ui.views.properties.tabbed.propertySections">
+ <propertySections
+ contributorId="org.eclipse.tcf.te.ui">
+ <propertySection
+ class="org.eclipse.tcf.te.tcf.filesystem.internal.tabbed.BasicFolderSection"
+ enablesFor="1"
+ filter="org.eclipse.tcf.te.tcf.filesystem.internal.tabbed.FolderFilter"
+ id="org.eclipse.tcf.te.tcf.filesystem.propertysection.folder.basic"
+ tab="org.eclipse.tcf.te.tcf.filesystem.propertytab.general">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.tcf.te.tcf.filesystem.internal.tabbed.BasicFileSection"
+ enablesFor="1"
+ filter="org.eclipse.tcf.te.tcf.filesystem.internal.tabbed.FileFilter"
+ id="org.eclipse.tcf.te.tcf.filesystem.propertysection.file.basic"
+ tab="org.eclipse.tcf.te.tcf.filesystem.propertytab.general">
+ </propertySection>
+ <propertySection
+ afterSection="org.eclipse.tcf.te.tcf.filesystem.propertysection.folder.basic,org.eclipse.tcf.te.tcf.filesystem.propertysection.file.basic"
+ class="org.eclipse.tcf.te.tcf.filesystem.internal.tabbed.WindowsAttributesSection"
+ enablesFor="1"
+ filter="org.eclipse.tcf.te.tcf.filesystem.internal.tabbed.WindowsFilter"
+ id="org.eclipse.tcf.te.tcf.filesystem.propertysection.windows.attributes"
+ tab="org.eclipse.tcf.te.tcf.filesystem.propertytab.general">
+ </propertySection>
+ <propertySection
+ afterSection="org.eclipse.tcf.te.tcf.filesystem.propertysection.folder.basic,org.eclipse.tcf.te.tcf.filesystem.propertysection.file.basic"
+ class="org.eclipse.tcf.te.tcf.filesystem.internal.tabbed.LinuxPermissionsSection"
+ enablesFor="1"
+ filter="org.eclipse.tcf.te.tcf.filesystem.internal.tabbed.LinuxFilter"
+ id="org.eclipse.tcf.te.tcf.filesystem.propertysection.linux.permissions"
+ tab="org.eclipse.tcf.te.tcf.filesystem.propertytab.general">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.tcf.te.tcf.filesystem.internal.tabbed.WindowsFolderAISection"
+ enablesFor="1"
+ filter="org.eclipse.tcf.te.tcf.filesystem.internal.tabbed.WindowsFolderFilter"
+ id="org.eclipse.tcf.te.tcf.filesystem.propertysection.windows.folderAI"
+ tab="org.eclipse.tcf.te.tcf.filesystem.propertytab.advanced">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.tcf.te.tcf.filesystem.internal.tabbed.WindowsFileAISection"
+ enablesFor="1"
+ filter="org.eclipse.tcf.te.tcf.filesystem.internal.tabbed.WindowsFileFilter"
+ id="org.eclipse.tcf.te.tcf.filesystem.propertysection.windows.fileAI"
+ tab="org.eclipse.tcf.te.tcf.filesystem.propertytab.advanced">
+ </propertySection>
+ <propertySection
+ afterSection="org.eclipse.tcf.te.tcf.filesystem.propertysection.windows.folderAI,"
+ class="org.eclipse.tcf.te.tcf.filesystem.internal.tabbed.WindowsAttributesCESection"
+ enablesFor="1"
+ filter="org.eclipse.tcf.te.tcf.filesystem.internal.tabbed.WindowsFilter"
+ id="org.eclipse.tcf.te.tcf.filesystem.propertysection.windows.attributesCE"
+ tab="org.eclipse.tcf.te.tcf.filesystem.propertytab.advanced">
+ </propertySection>
+ </propertySections>
+ </extension>
+</plugin>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.rcp.application/pom.xml b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/pom.xml
index 49c3b0edf..3f79bbe91 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.rcp.application/pom.xml
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/pom.xml
@@ -7,11 +7,11 @@
<parent>
<groupId>org.eclipse.tcf</groupId>
<artifactId>tcf-parent</artifactId>
- <version>0.5.0-SNAPSHOT</version>
+ <version>1.0.0-SNAPSHOT</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<version>1.0.0.qualifier</version>
- <artifactId>org.eclipse.tm.te.rcp.application</artifactId>
+ <artifactId>org.eclipse.tcf.te.tcf.filesystem</artifactId>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/activator/UIPlugin.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/activator/UIPlugin.java
index 160a92b9c..65c21b16f 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/activator/UIPlugin.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/activator/UIPlugin.java
@@ -9,7 +9,7 @@
* William Chen (Wind River) - [345387] Open the remote files with a proper editor
* William Chen (Wind River) - [345552] Edit the remote files with a proper editor
*******************************************************************************/
-package org.eclipse.tm.te.tcf.filesystem.activator;
+package org.eclipse.tcf.te.tcf.filesystem.activator;
import java.io.IOException;
import java.net.URL;
@@ -21,12 +21,13 @@ import org.eclipse.core.commands.IExecutionListener;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.swt.graphics.Image;
-import org.eclipse.tm.te.tcf.filesystem.internal.ImageConsts;
-import org.eclipse.tm.te.tcf.filesystem.internal.autosave.SaveAllListener;
-import org.eclipse.tm.te.tcf.filesystem.internal.autosave.SaveListener;
-import org.eclipse.tm.te.tcf.filesystem.internal.handlers.PersistenceManager;
-import org.eclipse.tm.te.tcf.filesystem.internal.url.TcfURLConnection;
-import org.eclipse.tm.te.tcf.filesystem.model.FSModel;
+import org.eclipse.tcf.te.tcf.filesystem.internal.ImageConsts;
+import org.eclipse.tcf.te.tcf.filesystem.internal.autosave.SaveAllListener;
+import org.eclipse.tcf.te.tcf.filesystem.internal.autosave.SaveListener;
+import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSClipboard;
+import org.eclipse.tcf.te.tcf.filesystem.internal.url.TcfURLConnection;
+import org.eclipse.tcf.te.tcf.filesystem.internal.utils.PersistenceManager;
+import org.eclipse.tcf.te.ui.jface.images.AbstractImageDescriptor;
import org.eclipse.ui.IWorkbenchCommandConstants;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.commands.ICommandService;
@@ -49,7 +50,9 @@ public class UIPlugin extends AbstractUIPlugin {
private IExecutionListener saveListener;
// The listener which listens to command "SAVE ALL" and synchronize the local file with the target.
private IExecutionListener saveAllListener;
-
+ // The shared instance of Clipboard
+ private FSClipboard clipboard;
+
/**
* The constructor
*/
@@ -82,6 +85,7 @@ public class UIPlugin extends AbstractUIPlugin {
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
+ clipboard = new FSClipboard();
// Register the "tcf" URL stream handler service.
Hashtable<String, String[]> properties = new Hashtable<String, String[]>();
@@ -98,34 +102,41 @@ public class UIPlugin extends AbstractUIPlugin {
ICommandService commandService = (ICommandService) PlatformUI.getWorkbench().getService(ICommandService.class);
if (commandService != null) {
saveListener = new SaveListener();
- Command saveCmd = commandService.getCommand(IWorkbenchCommandConstants.FILE_SAVE);
+ Command saveCmd = commandService.getCommand(IWorkbenchCommandConstants.FILE_SAVE);
saveCmd.addExecutionListener(saveListener);
saveAllListener = new SaveAllListener();
- Command saveAllCmd = commandService.getCommand(IWorkbenchCommandConstants.FILE_SAVE_ALL);
+ Command saveAllCmd = commandService.getCommand(IWorkbenchCommandConstants.FILE_SAVE_ALL);
saveAllCmd.addExecutionListener(saveAllListener);
}
}
+ /**
+ * Get the shared instance of clipboard
+ */
+ public FSClipboard getClipboard() {
+ return clipboard;
+ }
+
/* (non-Javadoc)
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
*/
@Override
public void stop(BundleContext context) throws Exception {
PersistenceManager.getInstance().dispose();
- FSModel.getInstance().dispose();
if (regURLStreamHandlerService != null) {
- // When URL stream handler service is unregistered, any URL related operation will be invalid.
+ // When URL stream handler service is unregistered, any URL related operation will be invalid.
regURLStreamHandlerService.unregister();
regURLStreamHandlerService = null;
}
// Remove the two execution listeners.
ICommandService commandService = (ICommandService) PlatformUI.getWorkbench().getService(ICommandService.class);
if (commandService != null) {
- Command saveCmd = commandService.getCommand(IWorkbenchCommandConstants.FILE_SAVE);
+ Command saveCmd = commandService.getCommand(IWorkbenchCommandConstants.FILE_SAVE);
saveCmd.removeExecutionListener(saveListener);
- Command saveAllCmd = commandService.getCommand(IWorkbenchCommandConstants.FILE_SAVE_ALL);
+ Command saveAllCmd = commandService.getCommand(IWorkbenchCommandConstants.FILE_SAVE_ALL);
saveAllCmd.removeExecutionListener(saveAllListener);
}
+ clipboard = null;
plugin = null;
super.stop(context);
}
@@ -138,12 +149,22 @@ public class UIPlugin extends AbstractUIPlugin {
URL url = UIPlugin.getDefault().getBundle().getEntry(ImageConsts.IMAGE_DIR_ROOT + ImageConsts.IMAGE_DIR_OBJ + "folder.gif"); //$NON-NLS-1$
registry.put(ImageConsts.FOLDER, ImageDescriptor.createFromURL(url));
+ url = UIPlugin.getDefault().getBundle().getEntry(ImageConsts.IMAGE_DIR_ROOT + ImageConsts.IMAGE_DIR_OBJ + "root.gif"); //$NON-NLS-1$
+ registry.put(ImageConsts.ROOT, ImageDescriptor.createFromURL(url));
url = UIPlugin.getDefault().getBundle().getEntry(ImageConsts.IMAGE_DIR_ROOT + ImageConsts.IMAGE_DIR_OBJ + "rootdrive.gif"); //$NON-NLS-1$
registry.put(ImageConsts.ROOT_DRIVE, ImageDescriptor.createFromURL(url));
url = UIPlugin.getDefault().getBundle().getEntry(ImageConsts.IMAGE_DIR_ROOT + ImageConsts.IMAGE_DIR_OBJ + "rootdriveopen.gif"); //$NON-NLS-1$
registry.put(ImageConsts.ROOT_DRIVE_OPEN, ImageDescriptor.createFromURL(url));
url = UIPlugin.getDefault().getBundle().getEntry(ImageConsts.IMAGE_DIR_ROOT + ImageConsts.IMAGE_DIR_OBJ + "synch_synch.gif"); //$NON-NLS-1$
registry.put(ImageConsts.COMPARE_EDITOR, ImageDescriptor.createFromURL(url));
+ url = UIPlugin.getDefault().getBundle().getEntry(ImageConsts.IMAGE_DIR_ROOT + ImageConsts.IMAGE_DIR_OBJ32 + "replace_confirm.png"); //$NON-NLS-1$
+ registry.put(ImageConsts.REPLACE_FOLDER_CONFIRM, ImageDescriptor.createFromURL(url));
+ url = UIPlugin.getDefault().getBundle().getEntry(ImageConsts.IMAGE_DIR_ROOT + ImageConsts.IMAGE_DIR_OBJ32 + "delete_readonly.png"); //$NON-NLS-1$
+ registry.put(ImageConsts.DELETE_READONLY_CONFIRM, ImageDescriptor.createFromURL(url));
+ url = UIPlugin.getDefault().getBundle().getEntry(ImageConsts.IMAGE_DIR_ROOT + ImageConsts.IMAGE_DIR_OBJ32 + "banner.png"); //$NON-NLS-1$
+ registry.put(ImageConsts.BANNER_IMAGE, ImageDescriptor.createFromURL(url));
+ url = UIPlugin.getDefault().getBundle().getEntry(ImageConsts.IMAGE_DIR_ROOT + ImageConsts.IMAGE_DIR_OBJ + "error.gif"); //$NON-NLS-1$
+ registry.put(ImageConsts.ERROR_IMAGE, ImageDescriptor.createFromURL(url));
}
/**
@@ -167,4 +188,26 @@ public class UIPlugin extends AbstractUIPlugin {
public static ImageDescriptor getImageDescriptor(String key) {
return getDefault().getImageRegistry().getDescriptor(key);
}
+
+ /**
+ * Loads the image given by the specified image descriptor from the image
+ * registry. If the image has been loaded ones before already, the cached
+ * <code>Image</code> object instance is returned. Otherwise, the <code>
+ * Image</code> object instance will be created and cached before returned.
+ *
+ * @param descriptor The image descriptor.
+ * @return The corresponding <code>Image</code> object instance or <code>null</code>.
+ */
+ public static Image getSharedImage(AbstractImageDescriptor descriptor) {
+ ImageRegistry registry = getDefault().getImageRegistry();
+
+ String imageKey = descriptor.getDecriptorKey();
+ Image image = registry.get(imageKey);
+ if (image == null) {
+ registry.put(imageKey, descriptor);
+ image = registry.get(imageKey);
+ }
+
+ return image;
+ }
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/controls/FSNavigatorContentProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/controls/FSNavigatorContentProvider.java
new file mode 100644
index 000000000..17ed9e511
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/controls/FSNavigatorContentProvider.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.controls;
+
+
+/**
+ * File system content provider for the common navigator of Target Explorer.
+ */
+public class FSNavigatorContentProvider extends FSTreeContentProvider {
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.trees.TreeContentProvider#isRootNodeVisible()
+ */
+ @Override
+ protected boolean isRootNodeVisible() {
+ return true;
+ }
+} \ No newline at end of file
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/controls/FSTreeContentProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/controls/FSTreeContentProvider.java
new file mode 100644
index 000000000..00341ae50
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/controls/FSTreeContentProvider.java
@@ -0,0 +1,543 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.controls;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.concurrent.atomic.AtomicReference;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.services.IFileSystem;
+import org.eclipse.tcf.services.IFileSystem.DirEntry;
+import org.eclipse.tcf.services.IFileSystem.FileSystemException;
+import org.eclipse.tcf.services.IFileSystem.IFileHandle;
+import org.eclipse.tcf.te.tcf.core.Tcf;
+import org.eclipse.tcf.te.tcf.core.interfaces.IChannelManager;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSModel;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModelProperties;
+import org.eclipse.tcf.te.ui.nls.Messages;
+import org.eclipse.tcf.te.ui.trees.TreeContentProvider;
+
+
+/**
+ * File system tree content provider implementation.
+ */
+public class FSTreeContentProvider extends TreeContentProvider {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object)
+ */
+ @Override
+ public Object getParent(Object element) {
+ if (element instanceof FSTreeNode) {
+ FSTreeNode parent = ((FSTreeNode)element).parent;
+ // If the parent is a root node, return the associated peer node
+ if (parent != null && parent.type != null && parent.type.endsWith("RootNode")) { //$NON-NLS-1$
+ return parent.peerNode;
+ }
+ return parent;
+ }
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object)
+ */
+ @Override
+ public Object[] getChildren(Object parentElement) {
+ Assert.isNotNull(parentElement);
+
+ Object[] children = NO_ELEMENTS;
+
+ // For the file system, we need the peer node
+ if (parentElement instanceof IPeerModel) {
+ final IPeerModel peerNode = (IPeerModel)parentElement;
+ installPropertyChangeListener(peerNode);
+ // Get the file system model root node, if already stored
+ final FSModel fsModel = FSModel.getFSModel(peerNode);
+ final FSTreeNode root = fsModel.getRoot();
+
+ // If the file system model root node hasn't been created, create
+ // and initialize the root node now.
+ if (root == null) {
+ IPeer peer = peerNode.getPeer();
+ final int[] state = new int[1];
+ Protocol.invokeAndWait(new Runnable() {
+ @Override
+ public void run() {
+ state[0] = peerNode.getIntProperty(IPeerModelProperties.PROP_STATE);
+ }
+ });
+ if (peer != null && IPeerModelProperties.STATE_ERROR != state[0] && IPeerModelProperties.STATE_NOT_REACHABLE != state[0]) {
+ final AtomicReference<FSTreeNode> rootNode = new AtomicReference<FSTreeNode>();
+ // Create the root node and the initial pending node.
+ // This must happen in the TCF dispatch thread.
+ Protocol.invokeAndWait(new Runnable() {
+ @Override
+ public void run() {
+ // The root node
+ FSTreeNode node = new FSTreeNode();
+ node.type = "FSRootNode"; //$NON-NLS-1$
+ node.peerNode = peerNode;
+ node.childrenQueried = false;
+ node.childrenQueryRunning = false;
+ node.name = org.eclipse.tcf.te.tcf.filesystem.nls.Messages.FSTreeNodeContentProvider_rootNode_label;
+
+ fsModel.setRoot(node);
+
+ rootNode.set(node);
+ }
+ });
+
+ children = isRootNodeVisible() ? new Object[] { rootNode.get() } : getChildren(rootNode.get());
+ }
+ } else {
+ children = isRootNodeVisible() ? new Object[] { root } : getChildren(root);
+ }
+ } else if (parentElement instanceof FSTreeNode) {
+ final FSTreeNode node = (FSTreeNode)parentElement;
+
+ // Get possible children
+ // This must happen in the TCF dispatch thread.
+ final List<FSTreeNode> candidates = new ArrayList<FSTreeNode>();
+ Protocol.invokeAndWait(new Runnable() {
+ @Override
+ public void run() {
+ candidates.addAll(node.getChildren());
+ }
+ });
+ children = candidates.toArray();
+
+ // No children -> check for "childrenQueried" property. If false, trigger the query.
+ if (children.length == 0 && !node.childrenQueried) {
+
+ if (node.type.endsWith("RootNode")) { //$NON-NLS-1$
+ children = getRootNodeChildren(node);
+ }
+ else if (node.type.endsWith("DirNode")) { //$NON-NLS-1$
+ children = getDirNodeChildren(node);
+ }
+ }
+ }
+ else {
+ // If the node can be adapted to an IPeerModel object.
+ Object adapted = adaptPeerModel(parentElement);
+ if (adapted != null) {
+ children = getChildren(adapted);
+ }
+ }
+
+ return children;
+ }
+
+ /**
+ * Queries the children for the root node.
+ *
+ * @param rootNode The root node. Must not be <code>null</code>.
+ * @return The children list.
+ */
+ protected Object[] getRootNodeChildren(final FSTreeNode rootNode) {
+ Assert.isNotNull(rootNode);
+
+ Object[] children = NO_ELEMENTS;
+
+ // Get the peer node from the root node
+ final IPeerModel peerNode = rootNode.peerNode;
+ Assert.isNotNull(peerNode);
+
+ // The child query should not be marked running at this point
+ Assert.isTrue(!rootNode.childrenQueryRunning);
+ rootNode.childrenQueryRunning = true;
+
+ final List<FSTreeNode> candidates = new ArrayList<FSTreeNode>();
+ // Create the initial pending node.
+ // This must happen in the TCF dispatch thread.
+ Protocol.invokeAndWait(new Runnable() {
+ @Override
+ public void run() {
+ // Add a special "Pending..." node
+ FSTreeNode pendingNode = new FSTreeNode();
+ pendingNode.name = Messages.PendingOperation_label;
+ pendingNode.type ="FSPendingNode"; //$NON-NLS-1$
+ pendingNode.parent = rootNode;
+ pendingNode.peerNode = rootNode.peerNode;
+ rootNode.getChildren().add(pendingNode);
+
+ candidates.addAll(rootNode.getChildren());
+ }
+ });
+
+ children = candidates.toArray();
+
+ Tcf.getChannelManager().openChannel(peerNode.getPeer(), false, new IChannelManager.DoneOpenChannel() {
+ @Override
+ public void doneOpenChannel(final Throwable error, final IChannel channel) {
+ Assert.isTrue(Protocol.isDispatchThread());
+
+ if (channel != null) {
+ final IFileSystem service = channel.getRemoteService(IFileSystem.class);
+ if (service != null) {
+
+ Protocol.invokeLater(new Runnable() {
+ @Override
+ public void run() {
+ service.roots(new IFileSystem.DoneRoots() {
+ @Override
+ public void doneRoots(IToken token, FileSystemException error, DirEntry[] entries) {
+ // Close the channel, not needed anymore
+ Tcf.getChannelManager().closeChannel(channel);
+
+ FSTreeNode rootNode = FSModel.getFSModel(peerNode).getRoot();
+ if (rootNode != null && error == null) {
+
+ for (DirEntry entry : entries) {
+ FSTreeNode node = createNodeFromDirEntry(entry, true);
+ if (node != null) {
+ node.parent = rootNode;
+ node.peerNode = rootNode.peerNode;
+ rootNode.getChildren().add(node);
+ }
+ }
+
+ // Find the pending node and remove it from the child list
+ Iterator<FSTreeNode> iterator = rootNode.getChildren().iterator();
+ while (iterator.hasNext()) {
+ FSTreeNode candidate = iterator.next();
+ if (Messages.PendingOperation_label.equals(candidate.name)) {
+ iterator.remove();
+ break;
+ }
+ }
+
+ // Reset the children query markers
+ rootNode.childrenQueryRunning = false;
+ rootNode.childrenQueried = true;
+ rootNode.firePropertyChange();
+ }
+ }
+ });
+ }
+ });
+ rootNode.firePropertyChange();
+ } else {
+ // The file system service is not available for this peer.
+ // --> Close the just opened channel
+ Tcf.getChannelManager().closeChannel(channel);
+ }
+ }
+ }
+ });
+
+ return children;
+ }
+
+ /**
+ * Queries the children for a directory node.
+ *
+ * @param node The directory node. Must not be <code>null</code>.
+ * @return The children list.
+ */
+ protected Object[] getDirNodeChildren(final FSTreeNode node) {
+ Assert.isNotNull(node);
+
+ Object[] children = NO_ELEMENTS;
+
+ // Get the peer node from the root node
+ final IPeerModel peerNode = node.peerNode;
+ Assert.isNotNull(peerNode);
+
+ // The child query should not be marked running at this point
+ Assert.isTrue(!node.childrenQueryRunning);
+ node.childrenQueryRunning = true;
+
+ final List<FSTreeNode> candidates = new ArrayList<FSTreeNode>();
+ // Create the initial pending node.
+ // This must happen in the TCF dispatch thread.
+ Protocol.invokeAndWait(new Runnable() {
+ @Override
+ public void run() {
+ // Add a special "Pending..." node
+ FSTreeNode pendingNode = new FSTreeNode();
+ pendingNode.name = Messages.PendingOperation_label;
+ pendingNode.type ="FSPendingNode"; //$NON-NLS-1$
+ pendingNode.parent = node;
+ pendingNode.peerNode = node.peerNode;
+ node.getChildren().add(pendingNode);
+
+ candidates.addAll(node.getChildren());
+ }
+ });
+
+ children = candidates.toArray();
+
+ final String absName = getEntryAbsoluteName(node);
+
+ if (absName != null) {
+ // Open a channel to the peer and query the children
+ Tcf.getChannelManager().openChannel(node.peerNode.getPeer(), false, new IChannelManager.DoneOpenChannel() {
+ @Override
+ public void doneOpenChannel(final Throwable error, final IChannel channel) {
+ Assert.isTrue(Protocol.isDispatchThread());
+
+ if (channel != null && channel.getState() == IChannel.STATE_OPEN) {
+ final IFileSystem service = channel.getRemoteService(IFileSystem.class);
+ if (service != null) {
+
+ Protocol.invokeLater(new Runnable() {
+ @Override
+ public void run() {
+ service.opendir(absName, new IFileSystem.DoneOpen() {
+ @Override
+ public void doneOpen(IToken token, FileSystemException error, final IFileHandle handle) {
+ if (error == null) {
+ // Read the directory content until finished
+ readdir(channel, service, handle, node);
+ } else {
+ // In case of an error, we are done here
+ node.childrenQueryRunning = false;
+ node.childrenQueried = true;
+ }
+ }
+ });
+ }
+ });
+ } else {
+ // No file system service available
+ node.childrenQueryRunning = false;
+ node.childrenQueried = true;
+ }
+ } else {
+ // Channel failed to open
+ node.childrenQueryRunning = false;
+ node.childrenQueried = true;
+ }
+ }
+ });
+ } else {
+ // No absolute name
+ node.childrenQueryRunning = false;
+ node.childrenQueried = true;
+ }
+
+ return children;
+ }
+ /**
+ * Adapt the specified element to a IPeerModel.
+ *
+ * @param element The element to be adapted.
+ * @return The IPeerModel adapted.
+ */
+ private Object adaptPeerModel(Object element) {
+ Object adapted;
+ if (element instanceof IAdaptable) {
+ adapted = ((IAdaptable) element).getAdapter(IPeerModel.class);
+ }
+ else {
+ adapted = Platform.getAdapterManager().getAdapter(element, IPeerModel.class);
+ }
+ return adapted;
+ }
+
+ /**
+ * Reads the content of a directory until the file system service signals EOF.
+ *
+ * @param channel The open channel. Must not be <code>null</code>.
+ * @param service The file system service. Must not be <code>null</code>.
+ * @param handle The directory handle. Must not be <code>null</code>.
+ * @param parentNode The parent node receiving the entries. Must not be <code>null</code>.
+ * @param mode The notification mode to set to the parent node once done.
+ */
+ protected void readdir(final IChannel channel, final IFileSystem service, final IFileHandle handle, final FSTreeNode parentNode) {
+ Assert.isNotNull(channel);
+ Assert.isNotNull(service);
+ Assert.isNotNull(handle);
+ Assert.isNotNull(parentNode);
+
+ Protocol.invokeLater(new Runnable() {
+ @Override
+ public void run() {
+ service.readdir(handle, new IFileSystem.DoneReadDir() {
+
+ @Override
+ public void doneReadDir(IToken token, FileSystemException error, DirEntry[] entries, boolean eof) {
+ // Close the handle and channel if EOF is signaled or an error occurred.
+ if (eof) {
+ service.close(handle, new IFileSystem.DoneClose() {
+ @Override
+ public void doneClose(IToken token, FileSystemException error) {
+ Tcf.getChannelManager().closeChannel(channel);
+ }
+ });
+ }
+
+ // Process the returned data
+ if (error == null && entries != null && entries.length > 0) {
+ for (DirEntry entry : entries) {
+ FSTreeNode node = createNodeFromDirEntry(entry, false);
+ if (node != null) {
+ node.parent = parentNode;
+ node.peerNode = parentNode.peerNode;
+ parentNode.getChildren().add(node);
+ }
+ }
+ }
+
+ if (eof) {
+ // Find the pending node and remove it from the child list
+ Iterator<FSTreeNode> iterator = parentNode.getChildren().iterator();
+ while (iterator.hasNext()) {
+ FSTreeNode candidate = iterator.next();
+ if (Messages.PendingOperation_label.equals(candidate.name)) {
+ iterator.remove();
+ break;
+ }
+ }
+
+ // Reset the children query markers
+ parentNode.childrenQueryRunning = false;
+ parentNode.childrenQueried = true;
+ } else {
+ // And invoke ourself again
+ readdir(channel, service, handle, parentNode);
+ }
+
+ parentNode.firePropertyChange();
+ }
+ });
+ }
+ });
+ }
+
+
+ /**
+ * Creates a tree node from the given directory entry.
+ *
+ * @param entry The directory entry. Must not be <code>null</code>.
+ *
+ * @return The tree node.
+ */
+ protected FSTreeNode createNodeFromDirEntry(DirEntry entry, boolean entryIsRootNode) {
+ Assert.isNotNull(entry);
+
+ FSTreeNode node = null;
+
+ IFileSystem.FileAttrs attrs = entry.attrs;
+
+ if (attrs == null || attrs.isDirectory()) {
+ node = new FSTreeNode();
+ node.childrenQueried = false;
+ node.childrenQueryRunning = false;
+ node.attr = attrs;
+ node.name = entry.filename;
+ node.type = entryIsRootNode ? "FSRootDirNode" : "FSDirNode"; //$NON-NLS-1$ //$NON-NLS-2$
+ } else if (attrs.isFile()) {
+ node = new FSTreeNode();
+ node.childrenQueried = false;
+ node.childrenQueryRunning = false;
+ node.attr = attrs;
+ node.name = entry.filename;
+ node.type = "FSFileNode"; //$NON-NLS-1$
+ }
+
+ return node;
+ }
+
+ /**
+ * Returns the absolute name for the given node.
+ *
+ * @param node The node. Must not be <code>null</code>.
+ * @return The absolute name.
+ */
+ public static String getEntryAbsoluteName(FSTreeNode node) {
+ Assert.isNotNull(node);
+
+ StringBuilder path = new StringBuilder();
+
+ // We have to walk upwards the hierarchy until the root node is found
+ FSTreeNode parent = node.parent;
+ while (parent != null && parent.type != null && parent.type.startsWith("FS")) { //$NON-NLS-1$
+ if ("FSRootNode".equals(parent.type)) { //$NON-NLS-1$
+ // We are done if reaching the root node
+ break;
+ }
+
+ if (path.length() == 0) path.append(parent.name.replaceAll("\\\\", "/")); //$NON-NLS-1$ //$NON-NLS-2$
+ else {
+ String name = parent.name.replaceAll("\\\\", "/"); //$NON-NLS-1$ //$NON-NLS-2$
+ if (!name.endsWith("/")) name = name + "/"; //$NON-NLS-1$ //$NON-NLS-2$
+ path.insert(0, name);
+ }
+
+ parent = parent.parent;
+ }
+
+ if (path.length() > 0 && path.charAt(path.length() - 1) != '/') {
+ path.append("/"); //$NON-NLS-1$
+ }
+ path.append(node.name);
+
+ return path.toString();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object)
+ */
+ @Override
+ public boolean hasChildren(final Object element) {
+ Assert.isNotNull(element);
+
+ boolean hasChildren = false;
+
+ if (element instanceof FSTreeNode) {
+ final FSTreeNode node = (FSTreeNode)element;
+ if (node.type != null && (node.type.endsWith("DirNode") || node.type.endsWith("RootNode"))) { //$NON-NLS-1$ //$NON-NLS-2$
+ if (!node.childrenQueried || node.childrenQueryRunning) {
+ hasChildren = true;
+ } else if (node.childrenQueried) {
+ hasChildren = super.hasChildren(element);
+ }
+ }
+ }
+ else if (element instanceof IPeerModel) {
+ // Get the root node for this peer model object.
+ // If null, true is returned as it means that the file system
+ // model hasn't been created yet and have to treat is as children
+ // not queried yet.
+ FSTreeNode root = FSModel.getFSModel(((IPeerModel)element)).getRoot();
+ hasChildren = root != null ? hasChildren(root) : true;
+ }
+ else {
+ Object adapted = adaptPeerModel(element);
+ if(adapted!=null){
+ return hasChildren(adapted);
+ }
+ }
+
+ return hasChildren;
+ }
+
+ /**
+ * If the root node of the tree is visible.
+ *
+ * @return true if it is visible.
+ */
+ protected boolean isRootNodeVisible() {
+ return false;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/controls/FSTreeViewerSorter.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/controls/FSTreeViewerSorter.java
index 96f76fd8a..d0fe29a6e 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/controls/FSTreeViewerSorter.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/controls/FSTreeViewerSorter.java
@@ -7,23 +7,24 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.filesystem.controls;
+package org.eclipse.tcf.te.tcf.filesystem.controls;
import org.eclipse.jface.viewers.TreePathViewerSorter;
import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.tcf.te.tcf.filesystem.internal.columns.FSTreeElementComparator;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
/**
* File system tree control viewer sorter implementation.
*/
public class FSTreeViewerSorter extends TreePathViewerSorter {
- private final FSTreeLabelProvider labelProvider = new FSTreeLabelProvider();
- private final FSTreeViewerComparator comparator;
+ private final FSTreeElementComparator comparator;
/**
* Constructor.
*/
public FSTreeViewerSorter() {
- comparator = new FSTreeViewerComparator(labelProvider.getParentViewer(), labelProvider);
+ comparator = new FSTreeElementComparator();
}
/* (non-Javadoc)
@@ -31,6 +32,9 @@ public class FSTreeViewerSorter extends TreePathViewerSorter {
*/
@Override
public int compare(Viewer viewer, Object e1, Object e2) {
- return comparator.compare(viewer, e1, e2);
+ if (e1 instanceof FSTreeNode && e2 instanceof FSTreeNode) {
+ return comparator.compare((FSTreeNode) e1, (FSTreeNode) e2);
+ }
+ return super.compare(viewer, e1, e2);
}
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/dialogs/FSFolderSelectionDialog.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/dialogs/FSFolderSelectionDialog.java
new file mode 100644
index 000000000..f843ec929
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/dialogs/FSFolderSelectionDialog.java
@@ -0,0 +1,187 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.dialogs;
+
+import java.util.List;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.viewers.DecoratingLabelProvider;
+import org.eclipse.jface.viewers.ILabelDecorator;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.tcf.te.tcf.filesystem.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.filesystem.controls.FSTreeContentProvider;
+import org.eclipse.tcf.te.tcf.filesystem.controls.FSTreeViewerSorter;
+import org.eclipse.tcf.te.tcf.filesystem.interfaces.IUIConstants;
+import org.eclipse.tcf.te.tcf.filesystem.internal.columns.FSTreeElementLabelProvider;
+import org.eclipse.tcf.te.tcf.filesystem.internal.handlers.MoveFilesHandler;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+import org.eclipse.tcf.te.ui.trees.FilterDescriptor;
+import org.eclipse.tcf.te.ui.trees.ViewerStateManager;
+import org.eclipse.ui.IDecoratorManager;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.dialogs.ElementTreeSelectionDialog;
+import org.eclipse.ui.dialogs.ISelectionStatusValidator;
+
+/**
+ * <p>
+ * The folder selection dialog for a remote file system. To populate the tree of the selection
+ * dialog with the file system, you should call <code>
+ * ElementTreeSelectionDialog.setInput</code> to specify the peer model of the remote target. In
+ * order to validate the destination folder, you should also specify the nodes to be moved. The file
+ * selection dialog is of single selection. You can get the selected result by calling
+ * <code>getFirstResult</code>. The type of selected folder is an instance of FSTreeNode.
+ * </p>
+ * <p>
+ * The following is a snippet of example code:
+ *
+ * <pre>
+ * FSFolderSelectionDialog dialog = new FSFolderSelectionDialog(shell);
+ * dialog.setInput(peer);
+ * dialog.setMovedNodes(nodes);
+ * if (dialog.open() == Window.OK) {
+ * Object obj = dialog.getFirstResult();
+ * Assert.isTrue(obj instanceof FSTreeNode);
+ * FSTreeNode folder = (FSTreeNode) obj;
+ * // Use folder ...
+ * }
+ * </pre>
+ *
+ * @see MoveFilesHandler
+ */
+public class FSFolderSelectionDialog extends ElementTreeSelectionDialog {
+ // The nodes that are being moved.
+ private List<FSTreeNode> movedNodes;
+
+ /**
+ * Create an FSFolderSelectionDialog using the specified shell as the parent.
+ *
+ * @param parentShell The parent shell.
+ */
+ public FSFolderSelectionDialog(Shell parentShell) {
+ this(parentShell, new FSTreeElementLabelProvider(), new FSTreeContentProvider());
+ }
+
+ /**
+ * Create an FSFolderSelectionDialog using the specified shell, an FSTreeLabelProvider, and a
+ * content provider that provides the tree nodes.
+ *
+ * @param parentShell The parent shell.
+ * @param labelProvider The label provider.
+ * @param contentProvider The content provider.
+ */
+ private FSFolderSelectionDialog(Shell parentShell, ILabelProvider labelProvider, ITreeContentProvider contentProvider) {
+ super(parentShell, createDecoratingLabelProvider(labelProvider), contentProvider);
+ setTitle(Messages.FSFolderSelectionDialog_MoveDialogTitle);
+ setMessage(Messages.FSFolderSelectionDialog_MoveDialogMessage);
+ this.setAllowMultiple(false);
+ this.setComparator(new FSTreeViewerSorter());
+ this.addFilter(new ViewerFilter() {
+ @Override
+ public boolean select(Viewer viewer, Object parentElement, Object element) {
+ if (element instanceof FSTreeNode) {
+ FSTreeNode node = (FSTreeNode) element;
+ return node.isDirectory() || node.type != null && node.type
+ .equals("FSPendingNode"); //$NON-NLS-1$
+ }
+ return false;
+ }
+ });
+ this.setStatusLineAboveButtons(false);
+ this.setValidator(new ISelectionStatusValidator() {
+
+ @Override
+ public IStatus validate(Object[] selection) {
+ return isValidFolder(selection);
+ }
+ });
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.dialogs.ElementTreeSelectionDialog#setInput(java.lang.Object)
+ */
+ @Override
+ public void setInput(Object input) {
+ super.setInput(input);
+ FilterDescriptor[] filterDescriptors = ViewerStateManager.getInstance().getFilterDescriptors(IUIConstants.ID_TREE_VIEWER_FS, input);
+ if (filterDescriptors != null) {
+ for(FilterDescriptor descriptor : filterDescriptors) {
+ if(descriptor.isEnabled()) addFilter(descriptor.getFilter());
+ }
+ }
+ }
+
+ /**
+ * Create a decorating label provider using the specified label provider.
+ *
+ * @param labelProvider The label provider that actually provides labels and images.
+ * @return The decorating label provider.
+ */
+ private static ILabelProvider createDecoratingLabelProvider(ILabelProvider labelProvider) {
+ IWorkbench workbench = PlatformUI.getWorkbench();
+ IDecoratorManager manager = workbench.getDecoratorManager();
+ ILabelDecorator decorator = manager.getLabelDecorator();
+ return new DecoratingLabelProvider(labelProvider,decorator);
+ }
+
+ /**
+ * Set the nodes that are about to be moved.
+ *
+ * @param movedNodes The nodes.
+ */
+ public void setMovedNodes(List<FSTreeNode> movedNodes) {
+ this.movedNodes = movedNodes;
+ }
+
+ /**
+ * Create the tree viewer and set it to the label provider.
+ */
+ @Override
+ protected TreeViewer doCreateTreeViewer(Composite parent, int style) {
+ TreeViewer viewer = super.doCreateTreeViewer(parent, style);
+ viewer.getTree().setLinesVisible(false);
+ return viewer;
+ }
+
+ /**
+ * If the specified selection is a valid folder to be selected.
+ *
+ * @param selection The selected folders.
+ * @return An error status if it is invalid or an OK status indicating it is valid.
+ */
+ IStatus isValidFolder(Object[] selection) {
+ String pluginId = UIPlugin.getUniqueIdentifier();
+ IStatus error = new Status(IStatus.ERROR, pluginId, null);
+ if (selection == null || selection.length == 0) {
+ return error;
+ }
+ if (!(selection[0] instanceof FSTreeNode)) {
+ return error;
+ }
+ FSTreeNode target = (FSTreeNode) selection[0];
+ for (FSTreeNode node : movedNodes) {
+ if (node == target || node.isAncestorOf(target)) {
+ return error;
+ }
+ }
+ if(!target.isWritable())
+ return error;
+ return new Status(IStatus.OK, pluginId, null);
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/dialogs/FSOpenFileDialog.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/dialogs/FSOpenFileDialog.java
new file mode 100644
index 000000000..bc58b9309
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/dialogs/FSOpenFileDialog.java
@@ -0,0 +1,133 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.dialogs;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.viewers.DecoratingLabelProvider;
+import org.eclipse.jface.viewers.ILabelDecorator;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.tcf.te.tcf.filesystem.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.filesystem.controls.FSTreeContentProvider;
+import org.eclipse.tcf.te.tcf.filesystem.controls.FSTreeViewerSorter;
+import org.eclipse.tcf.te.tcf.filesystem.interfaces.IUIConstants;
+import org.eclipse.tcf.te.tcf.filesystem.internal.columns.FSTreeElementLabelProvider;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+import org.eclipse.tcf.te.ui.trees.FilterDescriptor;
+import org.eclipse.tcf.te.ui.trees.ViewerStateManager;
+import org.eclipse.ui.IDecoratorManager;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.dialogs.ElementTreeSelectionDialog;
+import org.eclipse.ui.dialogs.ISelectionStatusValidator;
+
+
+/**
+ * File system open file dialog.
+ */
+public class FSOpenFileDialog extends ElementTreeSelectionDialog {
+ /**
+ * Create an FSFolderSelectionDialog using the specified shell as the parent.
+ *
+ * @param parentShell The parent shell.
+ */
+ public FSOpenFileDialog(Shell parentShell) {
+ this(parentShell, new FSTreeElementLabelProvider(), new FSTreeContentProvider());
+ }
+
+ /**
+ * Create an FSFolderSelectionDialog using the specified shell, an FSTreeLabelProvider, and a
+ * content provider that provides the tree nodes.
+ *
+ * @param parentShell The parent shell.
+ * @param labelProvider The label provider.
+ * @param contentProvider The content provider.
+ */
+ private FSOpenFileDialog(Shell parentShell, ILabelProvider labelProvider, ITreeContentProvider contentProvider) {
+ super(parentShell, createDecoratingLabelProvider(labelProvider), contentProvider);
+ setTitle(Messages.FSOpenFileDialog_title);
+ setMessage(Messages.FSOpenFileDialog_message);
+ this.setAllowMultiple(false);
+ this.setStatusLineAboveButtons(false);
+ this.setComparator(new FSTreeViewerSorter());
+ this.setValidator(new ISelectionStatusValidator() {
+ @Override
+ public IStatus validate(Object[] selection) {
+ return isValidSelection(selection);
+ }
+ });
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.dialogs.ElementTreeSelectionDialog#setInput(java.lang.Object)
+ */
+ @Override
+ public void setInput(Object input) {
+ super.setInput(input);
+ FilterDescriptor[] filterDescriptors = ViewerStateManager.getInstance()
+ .getFilterDescriptors(IUIConstants.ID_TREE_VIEWER_FS, input);
+ if (filterDescriptors != null) {
+ for(FilterDescriptor descriptor : filterDescriptors) {
+ if(descriptor.isEnabled()) addFilter(descriptor.getFilter());
+ }
+ }
+ }
+
+ /**
+ * Create a decorating label provider using the specified label provider.
+ *
+ * @param labelProvider The label provider that actually provides labels and images.
+ * @return The decorating label provider.
+ */
+ private static ILabelProvider createDecoratingLabelProvider(ILabelProvider labelProvider) {
+ IWorkbench workbench = PlatformUI.getWorkbench();
+ IDecoratorManager manager = workbench.getDecoratorManager();
+ ILabelDecorator decorator = manager.getLabelDecorator();
+ return new DecoratingLabelProvider(labelProvider,decorator);
+ }
+
+ /**
+ * Create the tree viewer and set it to the label provider.
+ */
+ @Override
+ protected TreeViewer doCreateTreeViewer(Composite parent, int style) {
+ TreeViewer viewer = super.doCreateTreeViewer(parent, style);
+ viewer.getTree().setLinesVisible(false);
+ return viewer;
+ }
+
+ /**
+ * If the specified selection is a valid folder to be selected.
+ *
+ * @param selection The selected folders.
+ * @return An error status if it is invalid or an OK status indicating it is valid.
+ */
+ IStatus isValidSelection(Object[] selection) {
+ String pluginId = UIPlugin.getUniqueIdentifier();
+ IStatus error = new Status(IStatus.ERROR, pluginId, null);
+ if (selection == null || selection.length == 0) {
+ return error;
+ }
+ if (!(selection[0] instanceof FSTreeNode)) {
+ return error;
+ }
+ FSTreeNode target = (FSTreeNode) selection[0];
+ if(!target.isFile()) {
+ return error;
+ }
+ return new Status(IStatus.OK, pluginId, null);
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/handlers/TimeTriggeredProgressMonitorDialog.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/dialogs/TimeTriggeredProgressMonitorDialog.java
index 5a3d85b37..9a880c534 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/handlers/TimeTriggeredProgressMonitorDialog.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/dialogs/TimeTriggeredProgressMonitorDialog.java
@@ -8,7 +8,7 @@
* Contributors:
* IBM - Initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.filesystem.internal.handlers;
+package org.eclipse.tcf.te.tcf.filesystem.dialogs;
import java.lang.reflect.InvocationTargetException;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/filters/HiddenFilesViewerFilter.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/filters/HiddenFilesViewerFilter.java
index d2141d9ea..955878049 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/filters/HiddenFilesViewerFilter.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/filters/HiddenFilesViewerFilter.java
@@ -7,11 +7,11 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.filesystem.filters;
+package org.eclipse.tcf.te.tcf.filesystem.filters;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.tm.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
/**
* A filter implementation filtering hidden files or directories.
@@ -24,8 +24,12 @@ public class HiddenFilesViewerFilter extends ViewerFilter {
@Override
public boolean select(Viewer viewer, Object parentElement, Object element) {
// The element needs to be a tree node, but not a root node
- if (element instanceof FSTreeNode && !"FSRootDirNode".equals(((FSTreeNode)element).type)) { //$NON-NLS-1$
- return !((FSTreeNode)element).isHidden();
+ if (element instanceof FSTreeNode && !((FSTreeNode)element).isRoot()) {
+ FSTreeNode node = (FSTreeNode) element;
+ if(node.isWindowsNode()) {
+ return !node.isHidden();
+ }
+ return !node.name.startsWith("."); //$NON-NLS-1$
}
// Let pass all other elements unharmed
return true;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/filters/SystemFilesViewerFilter.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/filters/SystemFilesViewerFilter.java
index c84eb226a..8f9c9f640 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/filters/SystemFilesViewerFilter.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/filters/SystemFilesViewerFilter.java
@@ -7,12 +7,11 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.filesystem.filters;
+package org.eclipse.tcf.te.tcf.filesystem.filters;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.tm.te.tcf.filesystem.interfaces.IWindowsFileAttributes;
-import org.eclipse.tm.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
/**
* A filter implementation filtering system files or directories.
@@ -25,13 +24,9 @@ public class SystemFilesViewerFilter extends ViewerFilter {
@Override
public boolean select(Viewer viewer, Object parentElement, Object element) {
// The element needs to be a tree node, but not a root node
- if (element instanceof FSTreeNode && !"FSRootDirNode".equals(((FSTreeNode)element).type)) { //$NON-NLS-1$
+ if (element instanceof FSTreeNode) {
FSTreeNode node = (FSTreeNode)element;
- // Check if the tree node has attributes associated
- if (node.attr != null && node.attr.attributes.get("Win32Attrs") instanceof Integer) { //$NON-NLS-1$
- Integer win32Attrs = (Integer)node.attr.attributes.get("Win32Attrs"); //$NON-NLS-1$
- return (win32Attrs.intValue() & IWindowsFileAttributes.FILE_ATTRIBUTE_SYSTEM) == 0;
- }
+ return !node.isSystem();
}
// Let pass all other elements unharmed
return true;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/help/IContextHelpIds.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/help/IContextHelpIds.java
index 621f9f2a6..ba3b7714b 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/help/IContextHelpIds.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/help/IContextHelpIds.java
@@ -7,9 +7,9 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.filesystem.internal.help;
+package org.eclipse.tcf.te.tcf.filesystem.help;
-import org.eclipse.tm.te.tcf.filesystem.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.filesystem.activator.UIPlugin;
/**
* Plugin context help id definitions.
@@ -22,8 +22,12 @@ public interface IContextHelpIds {
public final static String PREFIX = UIPlugin.getUniqueIdentifier() + "."; //$NON-NLS-1$
/**
- /**
* Target Explorer details editor page: File system explorer
*/
public final static String FS_EXPLORER_EDITOR_PAGE = PREFIX + "FSExplorerEditorPage"; //$NON-NLS-1$
+
+ /**
+ * The wizard for creating a new file.
+ */
+ public final static String FS_NEW_FILE_WIZARD_PAGE = PREFIX + "FSNewFilePage"; //$NON-NLS-1$
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/interfaces/IUIConstants.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/interfaces/IUIConstants.java
new file mode 100644
index 000000000..6c0298f44
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/interfaces/IUIConstants.java
@@ -0,0 +1,19 @@
+package org.eclipse.tcf.te.tcf.filesystem.interfaces;
+
+public interface IUIConstants extends org.eclipse.tcf.te.ui.interfaces.IUIConstants {
+
+ /**
+ * The viewer id of the file tree of Target Explorer.
+ */
+ public static final String ID_TREE_VIEWER_FS = ID_CONTROL_MENUS_BASE + ".viewer.fs"; //$NON-NLS-1$
+
+ /**
+ * The help id of the file tree of Target Explorer.
+ */
+ public static final String ID_TREE_VIEWER_FS_HELP = ID_TREE_VIEWER_FS + ".help"; //$NON-NLS-1$
+
+ /**
+ * The menu id of the file tree of Target Explorer.
+ */
+ public static final String ID_TREE_VIEWER_FS_CONTEXT_MENU = ID_CONTROL_MENUS_BASE + ".menu.fs"; //$NON-NLS-1$
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/interfaces/IWindowsFileAttributes.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/interfaces/IWindowsFileAttributes.java
index b6ac6f31c..6d6a6d882 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/interfaces/IWindowsFileAttributes.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/interfaces/IWindowsFileAttributes.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.filesystem.interfaces;
+package org.eclipse.tcf.te.tcf.filesystem.interfaces;
/**
* Windows specific file system attribute definitions.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/interfaces/preferences/IPreferenceKeys.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/interfaces/preferences/IPreferenceKeys.java
index 5aee78b22..3d66e0dba 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/interfaces/preferences/IPreferenceKeys.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/interfaces/preferences/IPreferenceKeys.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.filesystem.interfaces.preferences;
+package org.eclipse.tcf.te.tcf.filesystem.interfaces.preferences;
/**
* The bundle's preference key identifiers.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/ImageConsts.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/ImageConsts.java
index 5fcc79e13..e9562b97a 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/ImageConsts.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/ImageConsts.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.filesystem.internal;
+package org.eclipse.tcf.te.tcf.filesystem.internal;
/**
* File system plug-in Image registry constants.
@@ -28,6 +28,17 @@ public interface ImageConsts {
*/
public final static String IMAGE_DIR_OBJ = "obj16/"; //$NON-NLS-1$
+ /**
+ * The directory where to load model object images from,
+ * relative to the image root directory.
+ */
+ public final static String IMAGE_DIR_OBJ32 = "obj32/"; //$NON-NLS-1$
+
+ /**
+ * The directory where to load the decorator image from.
+ */
+ public final static String IMAGE_DIR_OVR = "ovr/"; //$NON-NLS-1$
+
// ***** The image constants *****
/**
@@ -36,17 +47,42 @@ public interface ImageConsts {
public static final String FOLDER = "Folder"; //$NON-NLS-1$
/**
- * The key to access the base folder object image.
+ * The key to access the base root node object image.
+ */
+ public static final String ROOT = "Root"; //$NON-NLS-1$
+
+ /**
+ * The key to access the base root folder object image (closed).
*/
public static final String ROOT_DRIVE = "RootDrive"; //$NON-NLS-1$
/**
- * The key to access the base folder object image.
+ * The key to access the base root folder object image (opened).
*/
public static final String ROOT_DRIVE_OPEN = "RootDriveOpen"; //$NON-NLS-1$
-
+
/**
* The key to access the image of compare editor.
*/
public static final String COMPARE_EDITOR = "CompareEditor"; //$NON-NLS-1$
+
+ /**
+ * The key to access the title image of "replace folder confirm" dialog.
+ */
+ public static final String REPLACE_FOLDER_CONFIRM = "ReplaceFolderConfirm"; //$NON-NLS-1$
+
+ /**
+ * The key to access the title image of "confirm read only delete" dialog.
+ */
+ public static final String DELETE_READONLY_CONFIRM = "ConfirmReadOnlyDelete"; //$NON-NLS-1$
+
+ /**
+ * The key to access the banner image of the advanced attributes dialog.
+ */
+ public static final String BANNER_IMAGE = "BannerImage"; //$NON-NLS-1$
+
+ /**
+ * The key to access the error image used in the tool tip popped up during renaming.
+ */
+ public static final String ERROR_IMAGE = "ErrorImage"; //$NON-NLS-1$
}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/UserAccount.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/UserAccount.java
index 4b5d8bf52..f4fc867ec 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/UserAccount.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/UserAccount.java
@@ -9,7 +9,7 @@
* William Chen (Wind River) - [352302]Opening a file in an editor depending on
* the client's permissions.
*******************************************************************************/
-package org.eclipse.tm.te.tcf.filesystem.internal;
+package org.eclipse.tcf.te.tcf.filesystem.internal;
/**
* The data model of a user account.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/adapters/NodeStateFilter.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/adapters/NodeStateFilter.java
index f2fdb240b..51ddc113e 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/adapters/NodeStateFilter.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/adapters/NodeStateFilter.java
@@ -8,12 +8,17 @@
* Wind River Systems - initial API and implementation
* William Chen (Wind River)- [345552] Edit the remote files with a proper editor
*******************************************************************************/
-package org.eclipse.tm.te.tcf.filesystem.internal.adapters;
+package org.eclipse.tcf.te.tcf.filesystem.internal.adapters;
+
+import java.util.List;
import org.eclipse.core.runtime.Assert;
-import org.eclipse.tm.te.tcf.filesystem.internal.handlers.StateManager;
-import org.eclipse.tm.te.tcf.filesystem.model.CacheState;
-import org.eclipse.tm.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSClipboard;
+import org.eclipse.tcf.te.tcf.filesystem.internal.utils.PersistenceManager;
+import org.eclipse.tcf.te.tcf.filesystem.internal.utils.StateManager;
+import org.eclipse.tcf.te.tcf.filesystem.model.CacheState;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
import org.eclipse.ui.IActionFilter;
/**
@@ -40,11 +45,38 @@ public class NodeStateFilter implements IActionFilter {
@Override
public boolean testAttribute(Object target, String name, String value) {
if (name.equals("cache.state") && node.isFile()) { //$NON-NLS-1$
+ if(PersistenceManager.getInstance().isAutoSaving())
+ return false;
CacheState state = StateManager.getInstance().getCacheState(node);
if (value == null)
value = CacheState.consistent.name();
return value.equals(state.name());
}
+ else if (name.equals("edit.cut")) { //$NON-NLS-1$
+ FSClipboard cb = UIPlugin.getDefault().getClipboard();
+ if (!cb.isEmpty()) {
+ int operation = cb.getOperation();
+ if (operation == FSClipboard.CUT) {
+ List<FSTreeNode> files = cb.getFiles();
+ for (FSTreeNode file : files) {
+ if (node == file) return true;
+ }
+ }
+ }
+ }
+ else if (name.equals("hidden")) { //$NON-NLS-1$
+ if (value == null) value = "true"; //$NON-NLS-1$
+ boolean result = false;
+ if (!node.isRoot()) {
+ if (node.isWindowsNode()) {
+ result = node.isHidden();
+ }
+ else {
+ result = node.name.startsWith("."); //$NON-NLS-1$
+ }
+ }
+ return Boolean.toString(result).equals(value);
+ }
return false;
}
}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/adapters/NodeStateFilterFactory.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/adapters/NodeStateFilterFactory.java
index 0e3ca1d74..bb0c944a8 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/adapters/NodeStateFilterFactory.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/adapters/NodeStateFilterFactory.java
@@ -8,23 +8,25 @@
* Wind River Systems - initial API and implementation
* William Chen (Wind River)- [345552] Edit the remote files with a proper editor
*******************************************************************************/
-package org.eclipse.tm.te.tcf.filesystem.internal.adapters;
+package org.eclipse.tcf.te.tcf.filesystem.internal.adapters;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.tm.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.tcf.te.tcf.filesystem.internal.columns.FSTreeElementLabelProvider;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
import org.eclipse.ui.IActionFilter;
/**
* The adapter factory of <code>FSTreeNode</code> over <code>IActionFilter</code>
*/
-@SuppressWarnings("rawtypes")
public class NodeStateFilterFactory implements IAdapterFactory {
+ private static ILabelProvider nodeLabelProvider = new FSTreeElementLabelProvider();
// The ADAPTERS adapted by this factory.
- private static Class[] ADAPTERS = {IActionFilter.class};
+ private static Class<?>[] ADAPTERS = {IActionFilter.class, ILabelProvider.class};
// The fFilters map caching fFilters for FS nodes.
private Map<FSTreeNode, NodeStateFilter> filters;
@@ -40,14 +42,19 @@ public class NodeStateFilterFactory implements IAdapterFactory {
*/
@Override
public Object getAdapter(Object adaptableObject, Class adapterType) {
- if(adaptableObject instanceof FSTreeNode){
- FSTreeNode node = (FSTreeNode) adaptableObject;
- NodeStateFilter filter = filters.get(node);
- if(filter == null){
- filter = new NodeStateFilter(node);
- filters.put(node, filter);
+ if(adaptableObject instanceof FSTreeNode) {
+ if(adapterType == IActionFilter.class) {
+ FSTreeNode node = (FSTreeNode) adaptableObject;
+ NodeStateFilter filter = filters.get(node);
+ if(filter == null){
+ filter = new NodeStateFilter(node);
+ filters.put(node, filter);
+ }
+ return filter;
+ }
+ else if(adapterType == ILabelProvider.class) {
+ return nodeLabelProvider;
}
- return filter;
}
return null;
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/adapters/PeerModelViewerInput.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/adapters/PeerModelViewerInput.java
new file mode 100644
index 000000000..44e481afd
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/adapters/PeerModelViewerInput.java
@@ -0,0 +1,81 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.adapters;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.ui.interfaces.IViewerInput;
+
+/**
+ * The viewer input of an IPeerModel instance.
+ */
+public class PeerModelViewerInput implements IViewerInput {
+ // Property Change Listeners
+ private List<IPropertyChangeListener> propertyChangeListeners;
+ // The peer model.
+ private IPeerModel peerModel;
+
+ /**
+ * Create an instance with a peer model.
+ *
+ * @param peerModel The peer model.
+ */
+ public PeerModelViewerInput(IPeerModel peerModel) {
+ this.peerModel = peerModel;
+ this.propertyChangeListeners = Collections.synchronizedList(new ArrayList<IPropertyChangeListener>());
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.interfaces.IViewerInput#firePropertyChange(org.eclipse.jface.util.PropertyChangeEvent)
+ */
+ @Override
+ public void firePropertyChange(PropertyChangeEvent event) {
+ for(IPropertyChangeListener listener : propertyChangeListeners) {
+ listener.propertyChange(event);
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.interfaces.IViewerInput#addPropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener)
+ */
+ @Override
+ public void addPropertyChangeListener(IPropertyChangeListener listener) {
+ if(!propertyChangeListeners.contains(listener)) {
+ propertyChangeListeners.add(listener);
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.interfaces.IViewerInput#removePropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener)
+ */
+ @Override
+ public void removePropertyChangeListener(IPropertyChangeListener listener) {
+ if(propertyChangeListeners.contains(listener)) {
+ propertyChangeListeners.remove(listener);
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.interfaces.IViewerInput#getInputId()
+ */
+ @Override
+ public String getInputId() {
+ return peerModel.getPeerId();
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/adapters/ViewerInputAdapterFactory.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/adapters/ViewerInputAdapterFactory.java
new file mode 100644
index 000000000..a25335ad1
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/adapters/ViewerInputAdapterFactory.java
@@ -0,0 +1,79 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.adapters;
+
+import java.util.concurrent.atomic.AtomicReference;
+
+import org.eclipse.core.runtime.IAdapterFactory;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.te.tcf.filesystem.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.ui.interfaces.IViewerInput;
+
+/**
+ * The adapter factory for IViewerInput.
+ */
+public class ViewerInputAdapterFactory implements IAdapterFactory {
+ // The key to store and access the the viewer input object.
+ private static final String VIEWER_INPUT_KEY = UIPlugin.getUniqueIdentifier()+".peer.viewerInput"; //$NON-NLS-1$
+ // The adapters
+ private Class<?>[] adapters = {IViewerInput.class};
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.core.runtime.IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class)
+ */
+ @Override
+ public Object getAdapter(Object adaptableObject, Class adapterType) {
+ if(adaptableObject instanceof IPeerModel) {
+ IPeerModel peerModel = (IPeerModel) adaptableObject;
+ return getViewerInput(peerModel);
+ }
+ return null;
+ }
+
+ /**
+ * Get a viewer input from the specified peer model.
+ *
+ * @param peerModel The peer model to get the viewer input from.
+ * @return The peer model's viewer input.
+ */
+ PeerModelViewerInput getViewerInput(final IPeerModel peerModel) {
+ if (peerModel != null) {
+ if (Protocol.isDispatchThread()) {
+ PeerModelViewerInput model = (PeerModelViewerInput) peerModel.getProperty(VIEWER_INPUT_KEY);
+ if (model == null) {
+ model = new PeerModelViewerInput(peerModel);
+ peerModel.setProperty(VIEWER_INPUT_KEY, model);
+ }
+ return model;
+ }
+ final AtomicReference<PeerModelViewerInput> reference = new AtomicReference<PeerModelViewerInput>();
+ Protocol.invokeAndWait(new Runnable() {
+ @Override
+ public void run() {
+ reference.set(getViewerInput(peerModel));
+ }
+ });
+ return reference.get();
+ }
+ return null;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.core.runtime.IAdapterFactory#getAdapterList()
+ */
+ @Override
+ public Class[] getAdapterList() {
+ return adapters;
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/autosave/SaveAllListener.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/autosave/SaveAllListener.java
new file mode 100644
index 000000000..1903e1d61
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/autosave/SaveAllListener.java
@@ -0,0 +1,120 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * William Chen (Wind River) - [345552] Edit the remote files with a proper editor
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.autosave;
+
+import java.io.File;
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.commands.IExecutionListener;
+import org.eclipse.core.commands.NotHandledException;
+import org.eclipse.core.filesystem.EFS;
+import org.eclipse.core.filesystem.IFileStore;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.tcf.te.tcf.filesystem.internal.utils.CacheManager;
+import org.eclipse.tcf.te.tcf.filesystem.internal.utils.PersistenceManager;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSModel;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IURIEditorInput;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+/**
+ * The execution listener of command "SAVE ALL", which synchronizes the local
+ * file with the one on the target server after it is saved.
+ */
+public class SaveAllListener implements IExecutionListener {
+ // Dirty nodes that should be saved and synchronized.
+ private List<FSTreeNode> fDirtyNodes;
+ /**
+ * Create the listener listening to command "SAVE ALL".
+ */
+ public SaveAllListener() {
+ this.fDirtyNodes = new ArrayList<FSTreeNode>();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.commands.IExecutionListener#postExecuteSuccess(java.lang.String, java.lang.Object)
+ */
+ @Override
+ public void postExecuteSuccess(String commandId, Object returnValue) {
+ if (!fDirtyNodes.isEmpty()) {
+ if (PersistenceManager.getInstance().isAutoSaving()) {
+ CacheManager.getInstance().upload(fDirtyNodes.toArray(new FSTreeNode[fDirtyNodes.size()]), false);
+ }
+ else {
+ FSTreeNode dirtyNode = fDirtyNodes.get(0);
+ dirtyNode.firePropertyChange();
+ }
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.commands.IExecutionListener#preExecute(java.lang.String, org.eclipse.core.commands.ExecutionEvent)
+ */
+ @Override
+ public void preExecute(String commandId, ExecutionEvent event) {
+ fDirtyNodes.clear();
+ IWorkbenchPage page = HandlerUtil.getActiveWorkbenchWindow(event).getActivePage();
+ IEditorPart[] editors = page.getDirtyEditors();
+ for (IEditorPart editor : editors) {
+ IEditorInput input = editor.getEditorInput();
+ FSTreeNode node = getEditedNode(input);
+ if (node != null) {
+ // If it is a modified node, add it to the dirty node list.
+ fDirtyNodes.add(node);
+ }
+ }
+ }
+
+ /**
+ * Get the corresponding FSTreeNode from the input.
+ * If the input has no corresponding FSTreeNode, return null;
+ * @param input The editor input.
+ * @return The corresponding FSTreeNode or null if it has not.
+ */
+ private FSTreeNode getEditedNode(IEditorInput input){
+ if (input instanceof IURIEditorInput) {
+ //Get the file that is being edited.
+ IURIEditorInput fileInput = (IURIEditorInput) input;
+ URI uri = fileInput.getURI();
+ try {
+ IFileStore store = EFS.getStore(uri);
+ File localFile = store.toLocalFile(0, new NullProgressMonitor());
+ if (localFile != null) {
+ // Get the file's mapped FSTreeNode.
+ FSTreeNode node = FSModel.getTreeNode(localFile.toString());
+ return node;
+ }
+ }catch(CoreException e){}
+ }
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.commands.IExecutionListener#notHandled(java.lang.String, org.eclipse.core.commands.NotHandledException)
+ */
+ @Override
+ public void notHandled(String commandId, NotHandledException exception) {
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.commands.IExecutionListener#postExecuteFailure(java.lang.String, org.eclipse.core.commands.ExecutionException)
+ */
+ @Override
+ public void postExecuteFailure(String commandId, ExecutionException exception) {
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/autosave/SaveListener.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/autosave/SaveListener.java
new file mode 100644
index 000000000..a99f6be3d
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/autosave/SaveListener.java
@@ -0,0 +1,94 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * William Chen (Wind River) - [345552] Edit the remote files with a proper editor
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.autosave;
+
+import java.io.File;
+import java.net.URI;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.commands.IExecutionListener;
+import org.eclipse.core.commands.NotHandledException;
+import org.eclipse.core.filesystem.EFS;
+import org.eclipse.core.filesystem.IFileStore;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.tcf.te.tcf.filesystem.internal.utils.CacheManager;
+import org.eclipse.tcf.te.tcf.filesystem.internal.utils.PersistenceManager;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSModel;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IURIEditorInput;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+/**
+ * The execution listener of command "SAVE", which synchronizes the local file
+ * with the one on the target server after it is saved.
+ */
+public class SaveListener implements IExecutionListener {
+ // Dirty node that should be committed or merged.
+ private FSTreeNode dirtyNode;
+
+ /**
+ * Create a SaveListener listening to command "SAVE".
+ */
+ public SaveListener() {
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.commands.IExecutionListener#postExecuteSuccess(java.lang.String, java.lang.Object)
+ */
+ @Override
+ public void postExecuteSuccess(String commandId, Object returnValue) {
+ if (dirtyNode != null) {
+ if (PersistenceManager.getInstance().isAutoSaving()) {
+ CacheManager.getInstance().upload(new FSTreeNode[]{dirtyNode}, false);
+ }
+ else {
+ dirtyNode.firePropertyChange();
+ }
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.commands.IExecutionListener#preExecute(java.lang.String, org.eclipse.core.commands.ExecutionEvent)
+ */
+ @Override
+ public void preExecute(String commandId, ExecutionEvent event) {
+ dirtyNode = null;
+ IEditorInput input = HandlerUtil.getActiveEditorInput(event);
+ if (input instanceof IURIEditorInput) {
+ IURIEditorInput fileInput = (IURIEditorInput) input;
+ URI uri = fileInput.getURI();
+ try {
+ IFileStore store = EFS.getStore(uri);
+ File localFile = store.toLocalFile(0, new NullProgressMonitor());
+ if (localFile != null) {
+ dirtyNode = FSModel.getTreeNode(localFile.toString());
+ }
+ }catch(CoreException e){
+ }
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.commands.IExecutionListener#notHandled(java.lang.String, org.eclipse.core.commands.NotHandledException)
+ */
+ @Override
+ public void notHandled(String commandId, NotHandledException exception) {
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.commands.IExecutionListener#postExecuteFailure(java.lang.String, org.eclipse.core.commands.ExecutionException)
+ */
+ @Override
+ public void postExecuteFailure(String commandId, ExecutionException exception) {
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/celleditor/FSCellListener.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/celleditor/FSCellListener.java
new file mode 100644
index 000000000..3d40a3d55
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/celleditor/FSCellListener.java
@@ -0,0 +1,91 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.celleditor;
+
+import org.eclipse.jface.viewers.ICellEditorListener;
+import org.eclipse.jface.viewers.TextCellEditor;
+import org.eclipse.jface.window.DefaultToolTip;
+import org.eclipse.jface.window.ToolTip;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.tcf.te.tcf.filesystem.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.filesystem.internal.ImageConsts;
+
+/**
+ * FSCellListener is an <code>ICellEditorListener</code> that listens to the modification event and displays
+ * error messages in a tool tip when the new name entered is not valid.
+ */
+public class FSCellListener implements ICellEditorListener {
+ // The cell editor used to enter the new name for renaming.
+ private TextCellEditor editor;
+ // The tool tip used to display the error message.
+ private DefaultToolTip tooltip;
+
+ /**
+ * Create an FSCellListener using the specified cell editor.
+ *
+ * @param editor The cell editor
+ */
+ public FSCellListener(TextCellEditor editor) {
+ this.editor = editor;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ICellEditorListener#applyEditorValue()
+ */
+ @Override
+ public void applyEditorValue() {
+ disposeToolTip();
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ICellEditorListener#cancelEditor()
+ */
+ @Override
+ public void cancelEditor() {
+ disposeToolTip();
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ICellEditorListener#editorValueChanged(boolean, boolean)
+ */
+ @Override
+ public void editorValueChanged(boolean oldValidState, boolean newValidState) {
+ if (!newValidState) {
+ // If it is an invalid input, then display a tool tip showing the error.
+ if (tooltip == null) {
+ tooltip = new DefaultToolTip(editor.getControl(), ToolTip.RECREATE, true);
+ tooltip.setImage(UIPlugin.getImage(ImageConsts.ERROR_IMAGE));
+ }
+ tooltip.setText(editor.getErrorMessage());
+ Control control = editor.getControl();
+ Point pOnScr = control.getSize();
+ pOnScr.x = 0;
+ tooltip.show(pOnScr);
+ }
+ else {
+ // Dispose the tool tip if it is valid.
+ disposeToolTip();
+ }
+ }
+
+ /**
+ * Dispose the tool tip used to display error message.
+ */
+ private void disposeToolTip() {
+ if (tooltip != null) {
+ tooltip.hide();
+ tooltip = null;
+ }
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/celleditor/FSCellModifier.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/celleditor/FSCellModifier.java
new file mode 100644
index 000000000..3a8c56b0d
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/celleditor/FSCellModifier.java
@@ -0,0 +1,87 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.celleditor;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.viewers.ICellModifier;
+import org.eclipse.swt.widgets.Item;
+import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSRename;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+
+/**
+ * FSCellModifier is an <code>ICellModifier</code> of the file system tree of the target explorer.
+ */
+public class FSCellModifier implements ICellModifier {
+ // The column property used to get the name of a given file system node.
+ public static final String PROPERTY_NAME = "name"; //$NON-NLS-1$
+
+ public FSCellModifier() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ICellModifier#canModify(java.lang.Object, java.lang.String)
+ */
+ @Override
+ public boolean canModify(Object element, String property) {
+ if (property.equals(PROPERTY_NAME)) {
+ if (element instanceof Item) {
+ element = ((Item) element).getData();
+ }
+ if (element instanceof FSTreeNode) {
+ FSTreeNode node = (FSTreeNode) element;
+ if (!node.isRoot()) {
+ return node.isWindowsNode() && !node.isReadOnly() || !node.isWindowsNode() && node.isWritable();
+ }
+ }
+ }
+ return false;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ICellModifier#getValue(java.lang.Object, java.lang.String)
+ */
+ @Override
+ public Object getValue(Object element, String property) {
+ if (property.equals(PROPERTY_NAME)) {
+ if (element instanceof Item) {
+ element = ((Item) element).getData();
+ }
+ if (element instanceof FSTreeNode) {
+ FSTreeNode node = (FSTreeNode) element;
+ return node.name;
+ }
+ }
+ return null;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ICellModifier#modify(java.lang.Object, java.lang.String,
+ * java.lang.Object)
+ */
+ @Override
+ public void modify(Object element, String property, Object value) {
+ if (property.equals(PROPERTY_NAME)) {
+ if (element instanceof Item) {
+ element = ((Item) element).getData();
+ }
+ if (element instanceof FSTreeNode) {
+ FSTreeNode node = (FSTreeNode) element;
+ Assert.isTrue(value != null && value instanceof String);
+ String newName = (String) value;
+ // Rename the node with the new name using an FSRename.
+ FSRename op = new FSRename(node, newName);
+ op.doit();
+ }
+ }
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/celleditor/FSCellValidator.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/celleditor/FSCellValidator.java
new file mode 100644
index 000000000..3afb94239
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/celleditor/FSCellValidator.java
@@ -0,0 +1,85 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.celleditor;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSOperation;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+
+/**
+ * FSCellValidator is an <code>ICellEditorValidator</code> that validates the name input in the file system
+ * tree cell editor.
+ */
+public class FSCellValidator implements ICellEditorValidator {
+ // The regular expression to define the pattern of a valid Unix file name(not '/').
+ public static final String UNIX_FILENAME_REGEX = "[^/]+"; //$NON-NLS-1$
+ // The regular expression to define the pattern of a valid Windows file name.
+ // (not '?', '\', '/','*','<','>' and '|').
+ public static final String WIN_FILENAME_REGEX = "[^(\\?|\\\\|/|:|\\*|<|>|\\|)]+"; //$NON-NLS-1$
+
+ // The tree viewer used to display the file system.
+ private TreeViewer viewer;
+ /**
+ * Create an FSCellValidator for the specified file system tree.
+ *
+ * @param viewer The tree viewer for the file system.
+ */
+ public FSCellValidator(TreeViewer viewer) {
+ this.viewer = viewer;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ICellEditorValidator#isValid(java.lang.Object)
+ */
+ @Override
+ public String isValid(Object value) {
+ IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
+ Object element = selection.getFirstElement();
+ Assert.isTrue(element instanceof FSTreeNode);
+ FSTreeNode node = (FSTreeNode) element;
+ if (value == null) return Messages.FSRenamingAssistant_SpecifyNonEmptyName;
+ String text = value.toString().trim();
+ if (text.length() == 0) return Messages.FSRenamingAssistant_SpecifyNonEmptyName;
+ if (node == null) return Messages.FSRenamingAssistant_NoNodeSelected;
+ if (hasChild(node, text)) {
+ return Messages.FSRenamingAssistant_NameAlreadyExists;
+ }
+ String formatRegex = node.isWindowsNode() ? WIN_FILENAME_REGEX : UNIX_FILENAME_REGEX;
+ if (!text.matches(formatRegex)) {
+ return node.isWindowsNode() ? Messages.FSRenamingAssistant_WinIllegalCharacters : Messages.FSRenamingAssistant_UnixIllegalCharacters;
+ }
+ return null;
+ }
+ /**
+ * To test if the folder has a child with the specified name.
+ *
+ * @param folder The folder node.
+ * @param name The name.
+ * @return true if it has a child with the name.
+ */
+ private boolean hasChild(FSTreeNode folder, String name) {
+ List<FSTreeNode> nodes = new ArrayList<FSTreeNode>(FSOperation.getCurrentChildren(folder.parent));
+ for (FSTreeNode node : nodes) {
+ if (node.isWindowsNode()) {
+ if (node.name.equalsIgnoreCase(name)) return true;
+ }
+ else if (node.name.equals(name)) return true;
+ }
+ return false;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/celleditor/FSViewerCellEditorFactory.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/celleditor/FSViewerCellEditorFactory.java
new file mode 100644
index 000000000..7f3002ebc
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/celleditor/FSViewerCellEditorFactory.java
@@ -0,0 +1,103 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.celleditor;
+
+import org.eclipse.jface.viewers.CellEditor;
+import org.eclipse.jface.viewers.ICellModifier;
+import org.eclipse.jface.viewers.TextCellEditor;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.FocusListener;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.tcf.te.tcf.filesystem.internal.handlers.RenameFilesHandler;
+import org.eclipse.tcf.te.ui.interfaces.IViewerCellEditorFactory;
+
+/**
+ * FSViewerCellEditorFactory implements <code>IViewerCellEditorFactory</code> to add
+ * cell editors to Target Explorer for renaming files or folders in the file system tree viewer.
+ */
+public class FSViewerCellEditorFactory implements IViewerCellEditorFactory, FocusListener {
+ // The column properties used for cell editing.
+ private static String[] COLUMN_PROPERTIES = { FSCellModifier.PROPERTY_NAME };
+ // The tree viewer to add cell editing.
+ private TreeViewer viewer;
+ // The cell editors used to rename a file/folder.
+ private CellEditor[] cellEditors;
+ // The cell modifier used to modify a file/folder's name.
+ private ICellModifier cellModifer;
+
+ /**
+ * Create an instance.
+ */
+ public FSViewerCellEditorFactory() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.views.interfaces.IViewerCellEditorFactory#init(org.eclipse.jface.viewers.TreeViewer)
+ */
+ @Override
+ public void init(TreeViewer aViewer) {
+ viewer = aViewer;
+ TextCellEditor cellEditor = new TextCellEditor(aViewer.getTree(), SWT.BORDER);
+ cellEditor.setValidator(new FSCellValidator(aViewer));
+ cellEditor.addListener(new FSCellListener(cellEditor));
+ cellEditors = new CellEditor[] { cellEditor };
+ cellModifer = new FSCellModifier();
+ Tree tree = aViewer.getTree();
+ tree.addFocusListener(this);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.views.interfaces.IViewerCellEditorFactory#getCellEditors()
+ */
+ @Override
+ public CellEditor[] getCellEditors() {
+ return cellEditors;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.views.interfaces.IViewerCellEditorFactory#getCellModifier()
+ */
+ @Override
+ public ICellModifier getCellModifier() {
+ return cellModifer;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.views.interfaces.IViewerCellEditorFactory#getColumnProperties()
+ */
+ @Override
+ public String[] getColumnProperties() {
+ return COLUMN_PROPERTIES;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.swt.events.FocusListener#focusGained(org.eclipse.swt.events.FocusEvent)
+ */
+ @Override
+ public void focusGained(FocusEvent e) {
+ // Set the currently focused viewer.
+ RenameFilesHandler.setCurrentViewer(viewer);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.swt.events.FocusListener#focusLost(org.eclipse.swt.events.FocusEvent)
+ */
+ @Override
+ public void focusLost(FocusEvent e) {
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/AccessTimeComparator.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/AccessTimeComparator.java
new file mode 100644
index 000000000..647248142
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/AccessTimeComparator.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.columns;
+
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+
+/**
+ * The comparator for the tree column "Date Accessed".
+ */
+public class AccessTimeComparator extends FSTreeNodeComparator {
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.filesystem.internal.columns.FSTreeNodeComparator#doCompare(org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode, org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode)
+ */
+ @Override
+ public int doCompare(FSTreeNode node1, FSTreeNode node2) {
+ long atime1 = node1.attr != null ? node1.attr.atime : 0;
+ long atime2 = node2.attr != null ? node2.attr.atime : 0;
+ return atime1 < atime2 ? -1 : (atime1 > atime2 ? 1 : 0);
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/AccessTimeLabelProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/AccessTimeLabelProvider.java
new file mode 100644
index 000000000..d99850bf9
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/AccessTimeLabelProvider.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.columns;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+
+/**
+ * The label provider for the tree column "Date Accessed".
+ */
+public class AccessTimeLabelProvider extends LabelProvider {
+ // The date formatter.
+ private static final SimpleDateFormat DATE_ACCESSED_FORMAT = new SimpleDateFormat("M/d/yyyy h:mm aa"); //$NON-NLS-1$
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.viewers.LabelProvider#getText(java.lang.Object)
+ */
+ @Override
+ public String getText(Object element) {
+ if (element instanceof FSTreeNode) {
+ FSTreeNode node = (FSTreeNode) element;
+ if (node.type != null && node.type.startsWith("FS")) { //$NON-NLS-1$
+ // Pending nodes does not have column texts at all
+ if (node.type.endsWith("PendingNode")) return ""; //$NON-NLS-1$ //$NON-NLS-2$
+ if (node.attr != null) {
+ return DATE_ACCESSED_FORMAT.format(new Date(node.attr.atime));
+ }
+ }
+ }
+ return ""; //$NON-NLS-1$
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/FSTreeElementComparator.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/FSTreeElementComparator.java
new file mode 100644
index 000000000..7ddb7010e
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/FSTreeElementComparator.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.columns;
+
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+
+/**
+ * The comparator for the tree column "name".
+ */
+public class FSTreeElementComparator extends FSTreeNodeComparator {
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.filesystem.internal.columns.FSTreeNodeComparator#doCompare(org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode, org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode)
+ */
+ @Override
+ public int doCompare(FSTreeNode node1, FSTreeNode node2) {
+ String name1 = node1.name;
+ String name2 = node2.name;
+ if (name1 != null && name2 != null) {
+ if (name1.startsWith(".") && !name2.startsWith(".")) return -1; //$NON-NLS-1$ //$NON-NLS-2$
+ if (!name1.startsWith(".") && name2.startsWith(".")) return 1; //$NON-NLS-1$ //$NON-NLS-2$
+ return name1.compareToIgnoreCase(name2);
+ }
+ return 0;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/FSTreeElementLabelProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/FSTreeElementLabelProvider.java
new file mode 100644
index 000000000..e0fc2da4c
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/FSTreeElementLabelProvider.java
@@ -0,0 +1,96 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.columns;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.tcf.te.tcf.filesystem.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.filesystem.internal.ImageConsts;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.ui.IEditorRegistry;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * The label provider for the tree column "name".
+ */
+public class FSTreeElementLabelProvider extends LabelProvider {
+ // The editor registry used to search a file's image.
+ private IEditorRegistry editorRegistry = null;
+
+ /**
+ * Constructor.
+ */
+ public FSTreeElementLabelProvider() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.viewers.LabelProvider#getText(java.lang.Object)
+ */
+ @Override
+ public String getText(Object element) {
+ if (element instanceof FSTreeNode) {
+ return ((FSTreeNode) element).name;
+ }
+ return super.getText(element);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.viewers.LabelProvider#getImage(java.lang.Object)
+ */
+ @Override
+ public Image getImage(Object element) {
+ if (element != null) {
+ if (element instanceof FSTreeNode) {
+ FSTreeNode node = (FSTreeNode) element;
+ if ("FSRootNode".equals(node.type)) { //$NON-NLS-1$
+ return UIPlugin.getImage(ImageConsts.ROOT);
+ }
+ else if ("FSRootDirNode".equals(node.type)) {//$NON-NLS-1$
+ return UIPlugin.getImage(ImageConsts.ROOT_DRIVE);
+ }
+ else if ("FSDirNode".equals(node.type)) { //$NON-NLS-1$
+ return UIPlugin.getImage(ImageConsts.FOLDER);
+ }
+ else if ("FSFileNode".equals(node.type)) { //$NON-NLS-1$
+ String key = node.name;
+ Image image = UIPlugin.getImage(key);
+ if (image == null) {
+ ImageDescriptor descriptor = getEditorRegistry().getImageDescriptor(key);
+ if (descriptor == null) {
+ descriptor = getEditorRegistry().getSystemExternalEditorImageDescriptor(key);
+ }
+ if (descriptor != null) {
+ UIPlugin.getDefault().getImageRegistry().put(key, descriptor);
+ }
+ image = UIPlugin.getImage(key);
+ }
+ return image;
+ }
+ }
+ }
+
+ return super.getImage(element);
+ }
+
+ /**
+ * Returns the workbench's editor registry.
+ */
+ private IEditorRegistry getEditorRegistry() {
+ if (editorRegistry == null) {
+ IWorkbench workbench = PlatformUI.getWorkbench();
+ if (workbench != null) editorRegistry = workbench.getEditorRegistry();
+ }
+ return editorRegistry;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/FSTreeNodeComparator.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/FSTreeNodeComparator.java
new file mode 100644
index 000000000..de980f1cb
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/FSTreeNodeComparator.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.columns;
+
+import java.util.Comparator;
+
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+
+/**
+ * The base comparator for all the file system tree column.
+ */
+public abstract class FSTreeNodeComparator implements Comparator<FSTreeNode> {
+
+ /*
+ * (non-Javadoc)
+ * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
+ */
+ @Override
+ public int compare(FSTreeNode node1, FSTreeNode node2) {
+ // Get the type labels
+ String type1 = node1.type;
+ String type2 = node2.type;
+
+ // Group directories and files always together before sorting by name
+ if (("FSRootDirNode".equals(type1) || "FSDirNode".equals(type1)) //$NON-NLS-1$ //$NON-NLS-2$
+ && !("FSRootDirNode".equals(type2) || "FSDirNode".equals(type2))) { //$NON-NLS-1$ //$NON-NLS-2$
+ return -1;
+ }
+
+ if (("FSRootDirNode".equals(type2) || "FSDirNode".equals(type2)) //$NON-NLS-1$ //$NON-NLS-2$
+ && !("FSRootDirNode".equals(type1) || "FSDirNode".equals(type1))) { //$NON-NLS-1$ //$NON-NLS-2$
+ return 1;
+ }
+
+ // If the nodes are of the same type and one entry starts
+ // with a '.', it comes before the one without a '.'
+ if (type1 != null && type2 != null && type1.equals(type2)) {
+ return doCompare(node1, node2);
+ }
+ return 0;
+ }
+
+ /**
+ * Sort the node1 and node2 when they are both directories or files.
+ *
+ * @param node1 The first node.
+ * @param node2 The second node.
+ * @return The comparison result.
+ */
+ public abstract int doCompare(FSTreeNode node1, FSTreeNode node2);
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/FileTypeComparator.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/FileTypeComparator.java
new file mode 100644
index 000000000..ed7aa8ff6
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/FileTypeComparator.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.columns;
+
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+
+/**
+ * The comparator for the tree column "type".
+ */
+public class FileTypeComparator extends FSTreeNodeComparator {
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.filesystem.internal.columns.FSTreeNodeComparator#doCompare(org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode, org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode)
+ */
+ @Override
+ public int doCompare(FSTreeNode node1, FSTreeNode node2) {
+ String type1 = node1.getFileType();
+ String type2 = node2.getFileType();
+ return type1.compareTo(type2);
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/FileTypeLabelProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/FileTypeLabelProvider.java
new file mode 100644
index 000000000..38ce8bdd8
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/FileTypeLabelProvider.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.columns;
+
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+
+/**
+ * The label provider for the tree column "type".
+ */
+public class FileTypeLabelProvider extends LabelProvider {
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.viewers.LabelProvider#getText(java.lang.Object)
+ */
+ @Override
+ public String getText(Object element) {
+ if (element instanceof FSTreeNode) {
+ FSTreeNode node = (FSTreeNode) element;
+ return node.getFileType();
+ }
+ return super.getText(element);
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/ModificationTimeComparator.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/ModificationTimeComparator.java
new file mode 100644
index 000000000..4d71aa607
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/ModificationTimeComparator.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.columns;
+
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+
+/**
+ * The comparator for the tree column "Date Modified".
+ */
+public class ModificationTimeComparator extends FSTreeNodeComparator {
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.filesystem.internal.columns.FSTreeNodeComparator#doCompare(org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode, org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode)
+ */
+ @Override
+ public int doCompare(FSTreeNode node1, FSTreeNode node2) {
+ long mtime1 = node1.attr != null ? node1.attr.mtime : 0;
+ long mtime2 = node2.attr != null ? node2.attr.mtime : 0;
+ return mtime1 < mtime2 ? -1 : (mtime1 > mtime2 ? 1 : 0);
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/ModificationTimeLabelProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/ModificationTimeLabelProvider.java
new file mode 100644
index 000000000..11fefcf34
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/ModificationTimeLabelProvider.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.columns;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+
+/**
+ * The label provider for the tree column "Date Modified".
+ */
+public class ModificationTimeLabelProvider extends LabelProvider {
+ // The date formatter.
+ private static final SimpleDateFormat DATE_MODIFIED_FORMAT = new SimpleDateFormat("M/d/yyyy h:mm aa"); //$NON-NLS-1$
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.viewers.LabelProvider#getText(java.lang.Object)
+ */
+ @Override
+ public String getText(Object element) {
+ if (element instanceof FSTreeNode) {
+ FSTreeNode node = (FSTreeNode) element;
+ if (node.type != null && node.type.startsWith("FS")) { //$NON-NLS-1$
+ // Pending nodes does not have column texts at all
+ if (node.type.endsWith("PendingNode")) return ""; //$NON-NLS-1$ //$NON-NLS-2$
+ if (node.attr != null) {
+ return DATE_MODIFIED_FORMAT.format(new Date(node.attr.mtime));
+ }
+ }
+ }
+ return ""; //$NON-NLS-1$
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/SizeComparator.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/SizeComparator.java
new file mode 100644
index 000000000..f94bc4a0b
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/SizeComparator.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.columns;
+
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+
+/**
+ * The comparator for the tree column "size".
+ */
+public class SizeComparator extends FSTreeNodeComparator {
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.filesystem.internal.columns.FSTreeNodeComparator#doCompare(org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode, org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode)
+ */
+ @Override
+ public int doCompare(FSTreeNode node1, FSTreeNode node2) {
+ long size1 = node1.attr != null ? node1.attr.size : 0;
+ long size2 = node2.attr != null ? node2.attr.size : 0;
+ return size1 < size2 ? -1 : (size1 > size2 ? 1 : 0);
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/SizeLabelProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/SizeLabelProvider.java
new file mode 100644
index 000000000..50e0f0d2b
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/SizeLabelProvider.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.columns;
+
+import java.text.DecimalFormat;
+
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+
+/**
+ * The label provider for the tree column "size".
+ */
+public class SizeLabelProvider extends LabelProvider {
+ // The size formatter.
+ private static final DecimalFormat SIZE_FORMAT = new DecimalFormat();
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.viewers.LabelProvider#getText(java.lang.Object)
+ */
+ @Override
+ public String getText(Object element) {
+ if (element instanceof FSTreeNode) {
+ FSTreeNode node = (FSTreeNode) element;
+ if (node.type != null && node.type.startsWith("FS")) { //$NON-NLS-1$
+ // Pending nodes does not have column texts at all
+ if (node.type.endsWith("PendingNode")) return ""; //$NON-NLS-1$ //$NON-NLS-2$
+ // Directory nodes does not have a size
+ if (node.isFile() && node.attr != null) {
+ return SIZE_FORMAT.format(node.attr.size / 1024) + " KB"; //$NON-NLS-1$
+ }
+ }
+ }
+ return ""; //$NON-NLS-1$
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/compare/EditableSharedDocumentAdapter.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/compare/EditableSharedDocumentAdapter.java
index 310302dfb..e6bd99e3f 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/compare/EditableSharedDocumentAdapter.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/compare/EditableSharedDocumentAdapter.java
@@ -8,7 +8,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.filesystem.internal.compare;
+package org.eclipse.tcf.te.tcf.filesystem.internal.compare;
import org.eclipse.compare.SharedDocumentAdapter;
import org.eclipse.core.runtime.CoreException;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/compare/LocalFileSaveable.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/compare/LocalFileSaveable.java
index be42037ed..7cd0f03dc 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/compare/LocalFileSaveable.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/compare/LocalFileSaveable.java
@@ -8,7 +8,7 @@
* Wind River Systems - initial API and implementation
* William Chen (Wind River)- [345552] Edit the remote files with a proper editor
*******************************************************************************/
-package org.eclipse.tm.te.tcf.filesystem.internal.compare;
+package org.eclipse.tcf.te.tcf.filesystem.internal.compare;
import org.eclipse.compare.CompareEditorInput;
import org.eclipse.compare.ICompareContainer;
@@ -20,7 +20,6 @@ import org.eclipse.compare.contentmergeviewer.ContentMergeViewer;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.ISafeRunnable;
import org.eclipse.core.runtime.ListenerList;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Platform;
@@ -29,10 +28,11 @@ import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.jface.util.SafeRunnable;
import org.eclipse.swt.graphics.Image;
-import org.eclipse.tm.te.tcf.filesystem.internal.compare.EditableSharedDocumentAdapter.ISharedDocumentAdapterListener;
-import org.eclipse.tm.te.tcf.filesystem.internal.handlers.CacheManager;
-import org.eclipse.tm.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.internal.compare.EditableSharedDocumentAdapter.ISharedDocumentAdapterListener;
+import org.eclipse.tcf.te.tcf.filesystem.internal.utils.CacheManager;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IPropertyListener;
import org.eclipse.ui.ISaveablesLifecycleListener;
@@ -132,7 +132,7 @@ public class LocalFileSaveable extends Saveable implements
monitor.done();
//Trigger upload action
FSTreeNode node = fileElement.getFSTreeNode();
- CacheManager.getInstance().upload(node);
+ CacheManager.getInstance().upload(new FSTreeNode[]{node}, true);
}
}
@@ -359,7 +359,7 @@ public class LocalFileSaveable extends Saveable implements
/*
* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.filesystem.internal.compare.EditableSharedDocumentAdapter.ISharedDocumentAdapterListener#handleDocumentConnected()
+ * @see org.eclipse.tcf.te.tcf.filesystem.internal.compare.EditableSharedDocumentAdapter.ISharedDocumentAdapterListener#handleDocumentConnected()
*/
@Override
public void handleDocumentConnected() {
@@ -462,17 +462,12 @@ public class LocalFileSaveable extends Saveable implements
Object[] allListeners = listeners.getListeners();
for (int i = 0; i < allListeners.length; i++) {
final Object object = allListeners[i];
- SafeRunner.run(new ISafeRunnable() {
+ SafeRunner.run(new SafeRunnable() {
@Override
public void run() throws Exception {
((IPropertyListener) object).propertyChanged(
LocalFileSaveable.this, property);
}
-
- @Override
- public void handleException(Throwable exception) {
- // handled by platform
- }
});
}
}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/compare/LocalTypedElement.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/compare/LocalTypedElement.java
index fe6c66ec3..8c8c09a0a 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/compare/LocalTypedElement.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/compare/LocalTypedElement.java
@@ -8,7 +8,7 @@
* Wind River Systems - initial API and implementation
* William Chen (Wind River)- [345552] Edit the remote files with a proper editor
*******************************************************************************/
-package org.eclipse.tm.te.tcf.filesystem.internal.compare;
+package org.eclipse.tcf.te.tcf.filesystem.internal.compare;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
@@ -31,11 +31,11 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
-import org.eclipse.tm.te.tcf.filesystem.activator.UIPlugin;
-import org.eclipse.tm.te.tcf.filesystem.internal.compare.EditableSharedDocumentAdapter.ISharedDocumentAdapterListener;
-import org.eclipse.tm.te.tcf.filesystem.internal.handlers.CacheManager;
-import org.eclipse.tm.te.tcf.filesystem.internal.nls.Messages;
-import org.eclipse.tm.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.filesystem.internal.compare.EditableSharedDocumentAdapter.ISharedDocumentAdapterListener;
+import org.eclipse.tcf.te.tcf.filesystem.internal.utils.CacheManager;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.ide.FileStoreEditorInput;
@@ -199,7 +199,7 @@ public class LocalTypedElement extends MergeTypedElement implements
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.filesystem.internal.compare.EditableSharedDocumentAdapter.ISharedDocumentAdapterListener#handleDocumentConnected()
+ * @see org.eclipse.tcf.te.tcf.filesystem.internal.compare.EditableSharedDocumentAdapter.ISharedDocumentAdapterListener#handleDocumentConnected()
*/
@Override
public void handleDocumentConnected() {
@@ -208,7 +208,7 @@ public class LocalTypedElement extends MergeTypedElement implements
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.filesystem.internal.compare.EditableSharedDocumentAdapter.ISharedDocumentAdapterListener#handleDocumentDeleted()
+ * @see org.eclipse.tcf.te.tcf.filesystem.internal.compare.EditableSharedDocumentAdapter.ISharedDocumentAdapterListener#handleDocumentDeleted()
*/
@Override
public void handleDocumentDeleted() {
@@ -217,7 +217,7 @@ public class LocalTypedElement extends MergeTypedElement implements
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.filesystem.internal.compare.EditableSharedDocumentAdapter.ISharedDocumentAdapterListener#handleDocumentDisconnected()
+ * @see org.eclipse.tcf.te.tcf.filesystem.internal.compare.EditableSharedDocumentAdapter.ISharedDocumentAdapterListener#handleDocumentDisconnected()
*/
@Override
public void handleDocumentDisconnected() {
@@ -226,7 +226,7 @@ public class LocalTypedElement extends MergeTypedElement implements
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.filesystem.internal.compare.EditableSharedDocumentAdapter.ISharedDocumentAdapterListener#handleDocumentFlushed()
+ * @see org.eclipse.tcf.te.tcf.filesystem.internal.compare.EditableSharedDocumentAdapter.ISharedDocumentAdapterListener#handleDocumentFlushed()
*/
@Override
public void handleDocumentFlushed() {
@@ -236,7 +236,7 @@ public class LocalTypedElement extends MergeTypedElement implements
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.filesystem.internal.compare.EditableSharedDocumentAdapter.ISharedDocumentAdapterListener#handleDocumentSaved()
+ * @see org.eclipse.tcf.te.tcf.filesystem.internal.compare.EditableSharedDocumentAdapter.ISharedDocumentAdapterListener#handleDocumentSaved()
*/
@Override
public void handleDocumentSaved() {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/compare/MergeEditorInput.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/compare/MergeEditorInput.java
index a804d50ff..fd7c764c0 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/compare/MergeEditorInput.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/compare/MergeEditorInput.java
@@ -8,7 +8,7 @@
* Wind River Systems - initial API and implementation
* William Chen (Wind River)- [345552] Edit the remote files with a proper editor
*******************************************************************************/
-package org.eclipse.tm.te.tcf.filesystem.internal.compare;
+package org.eclipse.tcf.te.tcf.filesystem.internal.compare;
import java.lang.reflect.InvocationTargetException;
@@ -20,11 +20,12 @@ import org.eclipse.compare.structuremergeviewer.ICompareInput;
import org.eclipse.compare.structuremergeviewer.ICompareInputChangeListener;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.ISafeRunnable;
import org.eclipse.core.runtime.ListenerList;
import org.eclipse.core.runtime.SafeRunner;
import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.util.SafeRunnable;
import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.osgi.util.NLS;
import org.eclipse.osgi.util.TextProcessor;
import org.eclipse.swt.events.DisposeEvent;
import org.eclipse.swt.events.DisposeListener;
@@ -33,8 +34,9 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.tm.te.tcf.filesystem.activator.UIPlugin;
-import org.eclipse.tm.te.tcf.filesystem.internal.ImageConsts;
+import org.eclipse.tcf.te.tcf.filesystem.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.filesystem.internal.ImageConsts;
+import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IPropertyListener;
import org.eclipse.ui.ISaveablesSource;
@@ -88,11 +90,11 @@ public class MergeEditorInput extends CompareEditorInput implements
cc.setRightEditable(false);
String name = TextProcessor.process(left.getName());
- String label = "Local: " + name; //$NON-NLS-1$
+ String label = NLS.bind(Messages.MergeEditorInput_LocalFile, name);
cc.setLeftLabel(label);
name = TextProcessor.process(right.toString());
- label = "Remote: " + name; //$NON-NLS-1$
+ label = NLS.bind(Messages.MergeEditorInput_RemoteFile, name);
cc.setRightLabel(label);
}
@@ -136,7 +138,7 @@ public class MergeEditorInput extends CompareEditorInput implements
*/
@Override
public String getToolTipText() {
- return "Compare " + left + " and " + right; //$NON-NLS-1$ //$NON-NLS-2$
+ return NLS.bind(Messages.MergeEditorInput_CompareLeftAndRight, left, right);
}
/* (non-Javadoc)
@@ -144,7 +146,7 @@ public class MergeEditorInput extends CompareEditorInput implements
*/
@Override
public String getTitle() {
- return "Compare " + left.getName() + " with Local Cache"; //$NON-NLS-1$ //$NON-NLS-2$
+ return NLS.bind(Messages.MergeEditorInput_CompareWithLocalCache, left.getName());
}
/**
@@ -252,16 +254,11 @@ public class MergeEditorInput extends CompareEditorInput implements
Object[] allListeners = inputChangeListeners.getListeners();
for (int i = 0; i < allListeners.length; i++) {
final ICompareInputChangeListener listener = (ICompareInputChangeListener) allListeners[i];
- SafeRunner.run(new ISafeRunnable() {
+ SafeRunner.run(new SafeRunnable() {
@Override
public void run() throws Exception {
listener.compareInputChanged(getCompareResult());
}
-
- @Override
- public void handleException(Throwable exception) {
- // Logged by the safe runner
- }
});
}
}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/compare/MergeInput.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/compare/MergeInput.java
index 3d461e840..01c858bbc 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/compare/MergeInput.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/compare/MergeInput.java
@@ -8,17 +8,18 @@
* Wind River Systems - initial API and implementation
* William Chen (Wind River)- [345552] Edit the remote files with a proper editor
*******************************************************************************/
-package org.eclipse.tm.te.tcf.filesystem.internal.compare;
+package org.eclipse.tcf.te.tcf.filesystem.internal.compare;
import org.eclipse.compare.ITypedElement;
import org.eclipse.compare.structuremergeviewer.Differencer;
import org.eclipse.compare.structuremergeviewer.ICompareInput;
import org.eclipse.compare.structuremergeviewer.ICompareInputChangeListener;
import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.ISafeRunnable;
import org.eclipse.core.runtime.ListenerList;
import org.eclipse.core.runtime.SafeRunner;
+import org.eclipse.jface.util.SafeRunnable;
import org.eclipse.swt.graphics.Image;
+import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
/**
* An abstract compare input whose purpose is to support change notification
@@ -68,16 +69,11 @@ public class MergeInput implements ICompareInput {
Object[] _listeners = listeners.getListeners();
for (int i = 0; i < _listeners.length; i++) {
final ICompareInputChangeListener listener = (ICompareInputChangeListener) _listeners[i];
- SafeRunner.run(new ISafeRunnable() {
+ SafeRunner.run(new SafeRunnable() {
@Override
public void run() throws Exception {
listener.compareInputChanged(MergeInput.this);
}
-
- @Override
- public void handleException(Throwable exception) {
- // Logged by the safe runner
- }
});
}
}
@@ -88,7 +84,7 @@ public class MergeInput implements ICompareInput {
*/
@Override
public void copy(boolean leftToRight) {
- Assert.isTrue(false, "Copy is not support by this type of compare input"); //$NON-NLS-1$
+ Assert.isTrue(false, Messages.MergeInput_CopyNotSupported);
}
/* (non-Javadoc)
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/compare/MergeTypedElement.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/compare/MergeTypedElement.java
index 8eaf73b3c..0524461b6 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/compare/MergeTypedElement.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/compare/MergeTypedElement.java
@@ -8,13 +8,13 @@
* Wind River Systems - initial API and implementation
* William Chen (Wind River)- [345552] Edit the remote files with a proper editor
*******************************************************************************/
-package org.eclipse.tm.te.tcf.filesystem.internal.compare;
+package org.eclipse.tcf.te.tcf.filesystem.internal.compare;
import org.eclipse.compare.BufferedContent;
import org.eclipse.compare.CompareUI;
import org.eclipse.compare.ITypedElement;
import org.eclipse.swt.graphics.Image;
-import org.eclipse.tm.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
/**
* A <code>MergeTypedElement</code> wraps an <code>FSTreeNode</code> so that it
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/compare/RemoteTypedElement.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/compare/RemoteTypedElement.java
index 75d543537..5348124f1 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/compare/RemoteTypedElement.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/compare/RemoteTypedElement.java
@@ -8,7 +8,7 @@
* Wind River Systems - initial API and implementation
* William Chen (Wind River)- [345552] Edit the remote files with a proper editor
*******************************************************************************/
-package org.eclipse.tm.te.tcf.filesystem.internal.compare;
+package org.eclipse.tcf.te.tcf.filesystem.internal.compare;
import java.io.BufferedOutputStream;
import java.io.ByteArrayOutputStream;
@@ -22,10 +22,10 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.osgi.util.NLS;
-import org.eclipse.tm.te.tcf.filesystem.activator.UIPlugin;
-import org.eclipse.tm.te.tcf.filesystem.internal.handlers.CacheManager;
-import org.eclipse.tm.te.tcf.filesystem.internal.nls.Messages;
-import org.eclipse.tm.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.filesystem.internal.utils.CacheManager;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
/**
* A <code>RemoteTypedElement</code> wraps an <code>FSTreeNode</code> so that it
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/decorators/PhantomDecorator.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/decorators/PhantomDecorator.java
new file mode 100644
index 000000000..6e0f41837
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/decorators/PhantomDecorator.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.decorators;
+
+import org.eclipse.jface.viewers.ILabelDecorator;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.tcf.te.tcf.filesystem.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.ui.jface.images.AbstractImageDescriptor;
+/**
+ * The label decorator to decorate the FSTreeNodes that are cut or hidden.
+ */
+public class PhantomDecorator extends LabelProvider implements ILabelDecorator {
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ILabelDecorator#decorateImage(org.eclipse.swt.graphics.Image, java.lang.Object)
+ */
+ @Override
+ public Image decorateImage(Image image, Object element) {
+ if (element instanceof FSTreeNode && image != null) {
+ // Create the cut image for the image to be decorated.
+ AbstractImageDescriptor descriptor = new PhantomImageDescriptor(image);
+ return UIPlugin.getSharedImage(descriptor);
+ }
+ return null;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ILabelDecorator#decorateText(java.lang.String, java.lang.Object)
+ */
+ @Override
+ public String decorateText(String text, Object element) {
+ // Do not decorate its label.
+ return null;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/decorators/PhantomImageDescriptor.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/decorators/PhantomImageDescriptor.java
new file mode 100644
index 000000000..7cd4eec95
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/decorators/PhantomImageDescriptor.java
@@ -0,0 +1,224 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.decorators;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.ImageData;
+import org.eclipse.swt.graphics.PaletteData;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.tcf.te.tcf.filesystem.activator.UIPlugin;
+import org.eclipse.tcf.te.ui.jface.images.AbstractImageDescriptor;
+
+/**
+ * The descriptor for a phantom-like image.
+ */
+public class PhantomImageDescriptor extends AbstractImageDescriptor {
+ // The alpha data when highlight the base image.
+ private static final int HIGHLIGHT_ALPHA = 127;
+ // The key to store the cut mask image.
+ private static final String ID_FS_NODE_CUT_MASK = "FS_NODE_CUT_MASK@"; //$NON-NLS-1$
+ // The key to store the cut decoration image.
+ private static final String ID_FS_NODE_CUT = "FS_NODE_CUT@"; //$NON-NLS-1$
+ // the base image to decorate with overlays
+ private Image baseImage;
+
+ /**
+ * Constructor.
+ */
+ public PhantomImageDescriptor(final Image baseImage) {
+ super(UIPlugin.getDefault().getImageRegistry());
+ this.baseImage = baseImage;
+ // build up the key for the image registry
+ String key = ID_FS_NODE_CUT + baseImage.hashCode();
+ setDecriptorKey(key);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.resource.CompositeImageDescriptor#drawCompositeImage(int, int)
+ */
+ @Override
+ protected void drawCompositeImage(int width, int height) {
+ drawCentered(baseImage, width, height);
+ drawCentered(getMaskImage(), width, height);
+ }
+
+ /**
+ * Get the mask image of the base image. The mask image is an image which
+ * has the data of the decorator image and the transparent mask of the
+ * base image. The decorator image (the key of which is CUT_DECORATOR_IMAGE)
+ * is a translucent white board, which will be drawn over the base image and
+ * make the base image sightly lighter. Try to the cut a file in a file explorer
+ * on Windows host, you'll see its icon is changed to a lighter version. The
+ * mask image created by this method will be drawn over the base image and
+ * generate the similar effect.
+ *
+ * @return The mask image used to decorate the base image.
+ */
+ private Image getMaskImage() {
+ String maskKey = ID_FS_NODE_CUT_MASK + baseImage.hashCode();
+ Image maskImage = UIPlugin.getImage(maskKey);
+ if (maskImage == null) {
+ ImageData baseData = baseImage.getImageData();
+ PaletteData palette = new PaletteData(new RGB[]{new RGB(255, 255, 255), new RGB(0,0,0)});
+ ImageData imageData = new ImageData(baseData.width, baseData.height, 1, palette);
+ // Get the base image's transparency mask.
+ imageData.alphaData = createAlphaData();
+ maskImage = new Image(baseImage.getDevice(), imageData);
+ UIPlugin.getDefault().getImageRegistry().put(maskKey, maskImage);
+ }
+ return maskImage;
+ }
+
+ /**
+ * Create the alpha data that will be used in the mask image data.
+ *
+ * @return The alpha data.
+ */
+ private byte[] createAlphaData() {
+ ImageData imageData = baseImage.getImageData();
+ if (imageData.maskData != null) {
+ if (imageData.depth == 32) {
+ return maskAlpha32();
+ }
+ return maskAlpha();
+ }
+ return nonMaskAlpha();
+ }
+
+ /**
+ * Create the alpha data for the base image that has no mask data.
+ *
+ * @return The alpha data.
+ */
+ private byte[] nonMaskAlpha() {
+ ImageData imageData = baseImage.getImageData();
+ Assert.isTrue(imageData.maskData == null);
+
+ byte[] alphaData = new byte[imageData.width * imageData.height];
+ int i = 0;
+ for (int y = 0; y < imageData.height; y++) {
+ for (int x = 0; x < imageData.width; x++) {
+ int pixel = imageData.getPixel(x, y);
+ int alpha = 255;
+ if (imageData.transparentPixel != -1 && imageData.transparentPixel == pixel) {
+ // If it has a transparent pixel and the current pixel is the transparent.
+ alpha = 0;
+ }
+ else if (imageData.alpha != -1) {
+ // If it has a global alpha value.
+ alpha = imageData.alpha;
+ }
+ else if (imageData.alphaData != null) {
+ // If it has alpha data.
+ alpha = imageData.getAlpha(x, y);
+ }
+ alphaData[i++] = (byte) (alpha * HIGHLIGHT_ALPHA / 255);
+ }
+ }
+ return alphaData;
+ }
+
+ /**
+ * Create the alpha data for the base image that has mask data, and the color depth is not of
+ * 32-bit.
+ *
+ * @return The alpha data
+ */
+ private byte[] maskAlpha() {
+ ImageData imageData = baseImage.getImageData();
+ Assert.isTrue(imageData.maskData != null && imageData.depth != 32);
+
+ ImageData mask = imageData.getTransparencyMask();
+ // Get the black index.
+ int blackIndex = getBlackIndex(mask);
+ byte[] alphaData = new byte[imageData.width * imageData.height];
+ int i = 0;
+ for (int y = 0; y < imageData.height; y++) {
+ for (int x = 0; x < imageData.width; x++) {
+ int alpha = mask.getPixel(x, y) == blackIndex ? 0 : 255;
+ alphaData[i++] = (byte) (alpha * HIGHLIGHT_ALPHA / 255);
+ }
+ }
+ return alphaData;
+ }
+
+ /**
+ * Create the alpha data for the base image that has mask data and the color depth is of 32-bit.
+ *
+ * @return The alpha data.
+ */
+ private byte[] maskAlpha32() {
+ ImageData imageData = baseImage.getImageData();
+ Assert.isTrue(imageData.maskData != null && imageData.depth == 32);
+
+ ImageData mask = imageData.getTransparencyMask();
+ // Get the black index.
+ int blackIndex = getBlackIndex(mask);
+ // Calculate the alpha mask and the alpha shift.
+ int alphaMask = ~(imageData.palette.redMask | imageData.palette.greenMask | imageData.palette.blueMask);
+ int alphaShift = 0;
+ while (alphaMask != 0 && ((alphaMask >>> alphaShift) & 1) == 0)
+ alphaShift++;
+ byte[] alphaData = new byte[imageData.width * imageData.height];
+ int i = 0;
+ for (int y = 0; y < imageData.height; y++) {
+ for (int x = 0; x < imageData.width; x++) {
+ int pixel = imageData.getPixel(x, y);
+ int alpha = (pixel & alphaMask) >>> alphaShift;
+ if (alpha <= 0 || alpha > 255) {
+ // If the alpha value is illegal, try to get it from the mask data.
+ alpha = mask.getPixel(x, y) == blackIndex ? 0 : 255;
+ }
+ alphaData[i++] = (byte) (alpha * HIGHLIGHT_ALPHA / 255);
+ }
+ }
+ return alphaData;
+ }
+
+ /**
+ * Get the black index from the palette of the mask data.
+ *
+ * @param mask
+ * @return
+ */
+ private int getBlackIndex(ImageData mask) {
+ RGB[] rgbs = mask.getRGBs();
+ if (rgbs != null) {
+ for (int i = 0; i < rgbs.length; i++) {
+ RGB rgb = rgbs[i];
+ if (rgb.red == 0 && rgb.green == 0 && rgb.blue == 0) {
+ return i;
+ }
+ }
+ }
+ return 0;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.resource.CompositeImageDescriptor#getSize()
+ */
+ @Override
+ protected Point getSize() {
+ return new Point(baseImage.getImageData().width, baseImage.getImageData().height);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.ide.util.ui.AbstractImageDescriptor#getBaseImage()
+ */
+ @Override
+ protected Image getBaseImage() {
+ return baseImage;
+ }
+} \ No newline at end of file
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/dnd/FSDragAdapterAssistant.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/dnd/FSDragAdapterAssistant.java
new file mode 100644
index 000000000..b49810965
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/dnd/FSDragAdapterAssistant.java
@@ -0,0 +1,90 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.dnd;
+
+import org.eclipse.jface.util.LocalSelectionTransfer;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.dnd.DragSourceEvent;
+import org.eclipse.swt.dnd.Transfer;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.ui.navigator.CommonDragAdapterAssistant;
+
+/**
+ * The drag assistant used by Target Explorer to extend its DnD support to FSTreeNode elements.
+ */
+public class FSDragAdapterAssistant extends CommonDragAdapterAssistant {
+
+ /**
+ * Create an instance.
+ */
+ public FSDragAdapterAssistant() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.navigator.CommonDragAdapterAssistant#dragStart(org.eclipse.swt.dnd.DragSourceEvent, org.eclipse.jface.viewers.IStructuredSelection)
+ */
+ @Override
+ public void dragStart(DragSourceEvent anEvent, IStructuredSelection aSelection) {
+ anEvent.doit = isDraggable(aSelection);
+ LocalSelectionTransfer.getTransfer().setSelection(aSelection);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.navigator.CommonDragAdapterAssistant#getSupportedTransferTypes()
+ */
+ @Override
+ public Transfer[] getSupportedTransferTypes() {
+ return new Transfer[] {};
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.navigator.CommonDragAdapterAssistant#setDragData(org.eclipse.swt.dnd.DragSourceEvent, org.eclipse.jface.viewers.IStructuredSelection)
+ */
+ @Override
+ public boolean setDragData(DragSourceEvent anEvent, IStructuredSelection aSelection) {
+ return false;
+ }
+
+ /**
+ * If the current selection is draggable.
+ *
+ * @param selection The currently selected nodes.
+ * @return true if it is draggable.
+ */
+ private boolean isDraggable(IStructuredSelection selection) {
+ if (selection.isEmpty()) {
+ return false;
+ }
+ Object[] objects = selection.toArray();
+ for (Object object : objects) {
+ if (!isDraggableObject(object)) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /**
+ * If the specified object is a draggable element.
+ *
+ * @param object The object to be dragged.
+ * @return true if it is draggable.
+ */
+ private boolean isDraggableObject(Object object) {
+ if (object instanceof FSTreeNode) {
+ FSTreeNode node = (FSTreeNode) object;
+ return !node.isRoot() && (node.isWindowsNode() && !node.isReadOnly() || !node.isWindowsNode() && node.isWritable());
+ }
+ return false;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/dnd/FSDragSourceListener.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/dnd/FSDragSourceListener.java
new file mode 100644
index 000000000..3a6a6d578
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/dnd/FSDragSourceListener.java
@@ -0,0 +1,97 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.dnd;
+
+import org.eclipse.jface.util.LocalSelectionTransfer;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.swt.dnd.DragSourceEvent;
+import org.eclipse.swt.dnd.DragSourceListener;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+
+/**
+ * The drag source listener for the file tree of Target Explorer.
+ */
+public class FSDragSourceListener implements DragSourceListener {
+ // The tree viewer in which the DnD gesture happens.
+ private TreeViewer viewer;
+
+ /**
+ * Create an FSDragSourceListener using the specified tree viewer.
+ *
+ * @param viewer The file system tree viewer.
+ */
+ public FSDragSourceListener(TreeViewer viewer) {
+ this.viewer = viewer;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.swt.dnd.DragSourceListener#dragStart(org.eclipse.swt.dnd.DragSourceEvent)
+ */
+ @Override
+ public void dragStart(DragSourceEvent event) {
+ IStructuredSelection aSelection = (IStructuredSelection) viewer.getSelection();
+ event.doit = isDraggable(aSelection);
+ LocalSelectionTransfer.getTransfer().setSelection(aSelection);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.swt.dnd.DragSourceListener#dragSetData(org.eclipse.swt.dnd.DragSourceEvent)
+ */
+ @Override
+ public void dragSetData(DragSourceEvent event) {
+ if (LocalSelectionTransfer.getTransfer().isSupportedType(event.dataType)) {
+ event.data = LocalSelectionTransfer.getTransfer().getSelection();
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.swt.dnd.DragSourceListener#dragFinished(org.eclipse.swt.dnd.DragSourceEvent)
+ */
+ @Override
+ public void dragFinished(DragSourceEvent event) {
+ }
+
+ /**
+ * If the current selection is draggable.
+ *
+ * @param selection The currently selected nodes.
+ * @return true if it is draggable.
+ */
+ private boolean isDraggable(IStructuredSelection selection) {
+ if (selection.isEmpty()) {
+ return false;
+ }
+ Object[] objects = selection.toArray();
+ for (Object object : objects) {
+ if (!isDraggableObject(object)) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /**
+ * If the specified object is a draggable element.
+ *
+ * @param object The object to be dragged.
+ * @return true if it is draggable.
+ */
+ private boolean isDraggableObject(Object object) {
+ if (object instanceof FSTreeNode) {
+ FSTreeNode node = (FSTreeNode) object;
+ return !node.isRoot() && (node.isWindowsNode() && !node.isReadOnly() || !node.isWindowsNode() && node.isWritable());
+ }
+ return false;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/dnd/FSDropAdapterAssistant.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/dnd/FSDropAdapterAssistant.java
new file mode 100644
index 000000000..1ccc569d6
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/dnd/FSDropAdapterAssistant.java
@@ -0,0 +1,118 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.dnd;
+
+import java.util.List;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.util.LocalSelectionTransfer;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.dnd.DND;
+import org.eclipse.swt.dnd.DropTargetEvent;
+import org.eclipse.swt.dnd.TransferData;
+import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSCopy;
+import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSMove;
+import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSOperation;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.ui.navigator.CommonDropAdapter;
+import org.eclipse.ui.navigator.CommonDropAdapterAssistant;
+
+/**
+ * The drop assistant used by Target Explorer to extend its DnD support to FSTreeNode elements.
+ */
+public class FSDropAdapterAssistant extends CommonDropAdapterAssistant {
+ /**
+ * Create an instance.
+ */
+ public FSDropAdapterAssistant() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.navigator.CommonDropAdapterAssistant#validateDrop(java.lang.Object, int, org.eclipse.swt.dnd.TransferData)
+ */
+ @Override
+ public IStatus validateDrop(Object target, int operation, TransferData transferType) {
+ LocalSelectionTransfer transfer = LocalSelectionTransfer.getTransfer();
+ if (transfer.isSupportedType(transferType) && target instanceof FSTreeNode) {
+ FSTreeNode hovered = (FSTreeNode) target;
+ IStructuredSelection selection = (IStructuredSelection) transfer.getSelection();
+ List<FSTreeNode> nodes = selection.toList();
+ boolean moving = (operation & DND.DROP_MOVE) != 0;
+ boolean copying = (operation & DND.DROP_COPY) != 0;
+ if (hovered.isDirectory() && hovered.isWritable() && (moving || copying)) {
+ FSTreeNode head = nodes.get(0);
+ String hid = head.peerNode.getPeerId();
+ String tid = hovered.peerNode.getPeerId();
+ if (hid.equals(tid)) {
+ for (FSTreeNode node : nodes) {
+ if (moving && node == hovered || node.isAncestorOf(hovered)) {
+ return Status.CANCEL_STATUS;
+ }
+ }
+ return Status.OK_STATUS;
+ }
+ }
+ else if (hovered.isFile() && copying) {
+ hovered = hovered.parent;
+ return validateDrop(hovered, operation, transferType);
+ }
+ }
+ return Status.CANCEL_STATUS;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.navigator.CommonDropAdapterAssistant#handleDrop(org.eclipse.ui.navigator.CommonDropAdapter, org.eclipse.swt.dnd.DropTargetEvent, java.lang.Object)
+ */
+ @Override
+ public IStatus handleDrop(CommonDropAdapter aDropAdapter, DropTargetEvent aDropTargetEvent, Object aTarget) {
+ Object data = aDropTargetEvent.data;
+ int operations = aDropAdapter.getCurrentOperation();
+ IStructuredSelection selection = (IStructuredSelection) data;
+ List<FSTreeNode> nodes = selection.toList();
+ FSOperation operation = null;
+ if ((operations & DND.DROP_MOVE) != 0) {
+ FSTreeNode dest = (FSTreeNode) aTarget;
+ operation = new FSMove(nodes, dest);
+ }
+ else if ((operations & DND.DROP_COPY) != 0) {
+ FSTreeNode hovered = (FSTreeNode) aTarget;
+ FSTreeNode dest = getCopyDestination(hovered, nodes);
+ operation = new FSCopy(nodes, dest);
+ }
+ return (operation != null && operation.doit()) ? Status.OK_STATUS : Status.CANCEL_STATUS;
+ }
+
+ /**
+ * Return an appropriate destination directory for copying according to
+ * the specified hovered node. If the hovered node is a file, then return
+ * its parent directory. If the hovered node is a directory, then return its
+ * self if it is not a node being copied. Return its parent directory if it is
+ * a node being copied.
+ * @param hovered
+ * @param nodes
+ * @return
+ */
+ private FSTreeNode getCopyDestination(FSTreeNode hovered, List<FSTreeNode> nodes) {
+ if (hovered.isFile()) {
+ return hovered.parent;
+ }
+ else if (hovered.isDirectory()) {
+ for (FSTreeNode node : nodes) {
+ if (node == hovered) {
+ return hovered.parent;
+ }
+ }
+ }
+ return hovered;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/dnd/FSDropTargetListener.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/dnd/FSDropTargetListener.java
new file mode 100644
index 000000000..712310f80
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/dnd/FSDropTargetListener.java
@@ -0,0 +1,118 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.dnd;
+
+import java.util.List;
+
+import org.eclipse.jface.util.LocalSelectionTransfer;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.ViewerDropAdapter;
+import org.eclipse.swt.dnd.DND;
+import org.eclipse.swt.dnd.TransferData;
+import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSCopy;
+import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSMove;
+import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSOperation;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+
+/**
+ * The drop target listener for the file tree of Target Explorer.
+ */
+public class FSDropTargetListener extends ViewerDropAdapter {
+ /**
+ * Create FSDropTargetListener using the viewer.
+ *
+ * @param viewer The file system tree viewer.
+ */
+ public FSDropTargetListener(TreeViewer viewer) {
+ super(viewer);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ViewerDropAdapter#validateDrop(java.lang.Object, int, org.eclipse.swt.dnd.TransferData)
+ */
+ @Override
+ public boolean validateDrop(Object target, int operation, TransferData transferType) {
+ LocalSelectionTransfer transfer = LocalSelectionTransfer.getTransfer();
+ if (transfer.isSupportedType(transferType) && target instanceof FSTreeNode) {
+ FSTreeNode hovered = (FSTreeNode) target;
+ IStructuredSelection selection = (IStructuredSelection) transfer.getSelection();
+ List<FSTreeNode> nodes = selection.toList();
+ boolean moving = (operation & DND.DROP_MOVE) != 0;
+ boolean copying = (operation & DND.DROP_COPY) != 0;
+ if (hovered.isDirectory() && hovered.isWritable() && (moving || copying)) {
+ FSTreeNode head = nodes.get(0);
+ String hid = head.peerNode.getPeerId();
+ String tid = hovered.peerNode.getPeerId();
+ if (hid.equals(tid)) {
+ for (FSTreeNode node : nodes) {
+ if (moving && node == hovered || node.isAncestorOf(hovered)) {
+ return false;
+ }
+ }
+ return true;
+ }
+ }
+ else if (hovered.isFile() && copying) {
+ hovered = hovered.parent;
+ return validateDrop(hovered, operation, transferType);
+ }
+ }
+ return false;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ViewerDropAdapter#performDrop(java.lang.Object)
+ */
+ @Override
+ public boolean performDrop(Object data) {
+ Object aTarget = getCurrentTarget();
+ int operations = getCurrentOperation();
+ IStructuredSelection selection = (IStructuredSelection) data;
+ List<FSTreeNode> nodes = selection.toList();
+ FSOperation operation = null;
+ if ((operations & DND.DROP_MOVE) != 0) {
+ FSTreeNode dest = (FSTreeNode) aTarget;
+ operation = new FSMove(nodes, dest);
+ }
+ else if ((operations & DND.DROP_COPY) != 0) {
+ FSTreeNode hovered = (FSTreeNode) aTarget;
+ FSTreeNode dest = getCopyDestination(hovered, nodes);
+ operation = new FSCopy(nodes, dest);
+ }
+ return (operation != null && operation.doit()) ;
+ }
+
+ /**
+ * Return an appropriate destination directory for copying according to
+ * the specified hovered node. If the hovered node is a file, then return
+ * its parent directory. If the hovered node is a directory, then return its
+ * self if it is not a node being copied. Return its parent directory if it is
+ * a node being copied.
+ * @param hovered
+ * @param nodes
+ * @return
+ */
+ private FSTreeNode getCopyDestination(FSTreeNode hovered, List<FSTreeNode> nodes) {
+ if (hovered.isFile()) {
+ return hovered.parent;
+ }
+ else if (hovered.isDirectory()) {
+ for (FSTreeNode node : nodes) {
+ if (node == hovered) {
+ return hovered.parent;
+ }
+ }
+ }
+ return hovered;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/exceptions/TCFChannelException.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/exceptions/TCFChannelException.java
index e8e22d6b5..cfc089bd9 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/exceptions/TCFChannelException.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/exceptions/TCFChannelException.java
@@ -8,7 +8,7 @@
* Wind River Systems - initial API and implementation
* William Chen (Wind River)- [345552] Edit the remote files with a proper editor
*******************************************************************************/
-package org.eclipse.tm.te.tcf.filesystem.internal.exceptions;
+package org.eclipse.tcf.te.tcf.filesystem.internal.exceptions;
/**
* TCF channel exception.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/exceptions/TCFException.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/exceptions/TCFException.java
index 40d5a3523..2ec9120fe 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/exceptions/TCFException.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/exceptions/TCFException.java
@@ -8,7 +8,7 @@
* Wind River Systems - initial API and implementation
* William Chen (Wind River)- [345552] Edit the remote files with a proper editor
*******************************************************************************/
-package org.eclipse.tm.te.tcf.filesystem.internal.exceptions;
+package org.eclipse.tcf.te.tcf.filesystem.internal.exceptions;
/**
* TCF file system implementation base exception.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/exceptions/TCFFileSystemException.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/exceptions/TCFFileSystemException.java
index 7b5edac15..c6857422a 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/exceptions/TCFFileSystemException.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/exceptions/TCFFileSystemException.java
@@ -8,7 +8,7 @@
* Wind River Systems - initial API and implementation
* William Chen (Wind River)- [345552] Edit the remote files with a proper editor
*******************************************************************************/
-package org.eclipse.tm.te.tcf.filesystem.internal.exceptions;
+package org.eclipse.tcf.te.tcf.filesystem.internal.exceptions;
/**
* TCF remote file system exception.
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/CommitHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/CommitHandler.java
new file mode 100644
index 000000000..21b22291b
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/CommitHandler.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ * William Chen (Wind River)- [345552] Edit the remote files with a proper editor
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.handlers;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.tcf.te.tcf.filesystem.internal.utils.CacheManager;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+/**
+ * The handler that commits the content of a modified file to the target file system.
+ */
+public class CommitHandler extends AbstractHandler {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+ */
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ IStructuredSelection selection = (IStructuredSelection) HandlerUtil.getCurrentSelectionChecked(event);
+ FSTreeNode node = (FSTreeNode) selection.getFirstElement();
+ CacheManager.getInstance().upload(new FSTreeNode[]{node}, true);
+ return null;
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/CopyFilesHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/CopyFilesHandler.java
new file mode 100644
index 000000000..75ad1392b
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/CopyFilesHandler.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.handlers;
+
+import java.util.List;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.tcf.te.tcf.filesystem.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSClipboard;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.ui.handlers.HandlerUtil;
+/**
+ * The handler that copies the selected files or folders to the clip board.
+ */
+public class CopyFilesHandler extends AbstractHandler {
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+ */
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ FSClipboard cb = UIPlugin.getDefault().getClipboard();
+ IStructuredSelection selection = (IStructuredSelection) HandlerUtil.getCurrentSelection(event);
+ if (!selection.isEmpty()) {
+ List<FSTreeNode> nodes = selection.toList();
+ // Copy these files to the clip board.
+ cb.copyFiles(nodes);
+ // Refresh the file system tree to display the decorations of the cut nodes.
+ FSTreeNode node = (FSTreeNode) selection.getFirstElement();
+ node.firePropertyChange();
+ }
+ return null;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/CutFilesHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/CutFilesHandler.java
new file mode 100644
index 000000000..becc34b9b
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/CutFilesHandler.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.handlers;
+
+import java.util.List;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.tcf.te.tcf.filesystem.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSClipboard;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+/**
+ * The handler that cuts the selected files or folders to the clip board.
+ */
+public class CutFilesHandler extends AbstractHandler {
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+ */
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ FSClipboard cb = UIPlugin.getDefault().getClipboard();
+ IStructuredSelection selection = (IStructuredSelection) HandlerUtil.getCurrentSelection(event);
+ if (!selection.isEmpty()) {
+ List<FSTreeNode> nodes = selection.toList();
+ // Cut these files to the clip board.
+ cb.cutFiles(nodes);
+ // Refresh the file system tree to display the decorations of the cut nodes.
+ FSTreeNode node = (FSTreeNode) selection.getFirstElement();
+ node.firePropertyChange();
+ }
+ return null;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/DeleteFilesHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/DeleteFilesHandler.java
new file mode 100644
index 000000000..59fcc009a
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/DeleteFilesHandler.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.handlers;
+
+import java.util.List;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSDelete;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+import org.eclipse.ui.handlers.HandlerUtil;
+/**
+ * The handler that deletes the selected files or folders from the file system.
+ */
+public class DeleteFilesHandler extends AbstractHandler {
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+ */
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ IStructuredSelection selection = (IStructuredSelection) HandlerUtil
+ .getCurrentSelection(event);
+ List<FSTreeNode> nodes = selection.toList();
+ String question;
+ if (nodes.size() == 1) {
+ FSTreeNode node = nodes.get(0);
+ question = NLS.bind(Messages.DeleteFilesHandler_DeleteOneFileConfirmation, node.name);
+ }
+ else {
+ question = NLS.bind(Messages.DeleteFilesHandler_DeleteMultipleFilesConfirmation, Integer.valueOf(nodes.size()));
+ }
+ Shell parent = HandlerUtil.getActiveShellChecked(event);
+ if (MessageDialog.openQuestion(parent, Messages.DeleteFilesHandler_ConfirmDialogTitle, question)) {
+ FSDelete delete = new FSDelete(nodes);
+ delete.doit();
+ }
+ return null;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/handlers/MergeHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/MergeHandler.java
index 08d3b5cb6..4963ff6ae 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/handlers/MergeHandler.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/MergeHandler.java
@@ -8,17 +8,17 @@
* Wind River Systems - initial API and implementation
* William Chen (Wind River)- [345552] Edit the remote files with a proper editor
*******************************************************************************/
-package org.eclipse.tm.te.tcf.filesystem.internal.handlers;
+package org.eclipse.tcf.te.tcf.filesystem.internal.handlers;
import org.eclipse.compare.CompareUI;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.tm.te.tcf.filesystem.internal.compare.LocalTypedElement;
-import org.eclipse.tm.te.tcf.filesystem.internal.compare.MergeEditorInput;
-import org.eclipse.tm.te.tcf.filesystem.internal.compare.RemoteTypedElement;
-import org.eclipse.tm.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.internal.compare.LocalTypedElement;
+import org.eclipse.tcf.te.tcf.filesystem.internal.compare.MergeEditorInput;
+import org.eclipse.tcf.te.tcf.filesystem.internal.compare.RemoteTypedElement;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.handlers.HandlerUtil;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/MoveFilesHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/MoveFilesHandler.java
new file mode 100644
index 000000000..b5e394335
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/MoveFilesHandler.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.handlers;
+
+import java.util.List;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.window.Window;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.tcf.te.tcf.filesystem.dialogs.FSFolderSelectionDialog;
+import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSMove;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.ui.handlers.HandlerUtil;
+/**
+ * The handler that moves the selected files or folders to a destination folder.
+ */
+public class MoveFilesHandler extends AbstractHandler {
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+ */
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ Shell shell = HandlerUtil.getActiveShellChecked(event);
+ FSFolderSelectionDialog dialog = new FSFolderSelectionDialog(shell);
+ IStructuredSelection selection = (IStructuredSelection) HandlerUtil.getCurrentSelection(event);
+ List<FSTreeNode> nodes = selection.toList();
+ IPeerModel peer = nodes.get(0).peerNode;
+ dialog.setInput(peer);
+ dialog.setMovedNodes(nodes);
+ if (dialog.open() == Window.OK) {
+ Object obj = dialog.getFirstResult();
+ Assert.isTrue(obj instanceof FSTreeNode);
+ FSTreeNode dest = (FSTreeNode) obj;
+ FSMove fsop = new FSMove(nodes, dest);
+ fsop.doit();
+ }
+ return null;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/NewFileHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/NewFileHandler.java
new file mode 100644
index 000000000..31a502ab1
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/NewFileHandler.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.handlers;
+
+import org.eclipse.tcf.te.tcf.filesystem.internal.wizards.NewFileWizard;
+import org.eclipse.ui.IWorkbenchWizard;
+
+/**
+ * The handler to create a new file node in the file system of Target Explorer.
+ */
+public class NewFileHandler extends NewNodeHandler {
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.filesystem.internal.handlers.NewNodeHandler#createWizard()
+ */
+ @Override
+ protected IWorkbenchWizard createWizard() {
+ return new NewFileWizard();
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/NewFolderHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/NewFolderHandler.java
new file mode 100644
index 000000000..b20fbc349
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/NewFolderHandler.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.handlers;
+
+import org.eclipse.tcf.te.tcf.filesystem.internal.wizards.NewFolderWizard;
+import org.eclipse.ui.IWorkbenchWizard;
+
+/**
+ * The handler to create a new folder node in the file system of Target Explorer.
+ */
+public class NewFolderHandler extends NewNodeHandler {
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.filesystem.internal.handlers.NewNodeHandler#createWizard()
+ */
+ @Override
+ protected IWorkbenchWizard createWizard() {
+ return new NewFolderWizard();
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/NewNodeHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/NewNodeHandler.java
new file mode 100644
index 000000000..f511fb0da
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/NewNodeHandler.java
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.handlers;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.IWorkbenchWizard;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+/**
+ * The base handler to create a new file/folder node in the file system of Target Explorer.
+ */
+public abstract class NewNodeHandler extends AbstractHandler {
+
+ /*
+ * (non-Javadoc)
+ * @see
+ * org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+ */
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindowChecked(event);
+ IWorkbenchWizard wizard;
+ wizard = createWizard();
+ ISelection selection = HandlerUtil.getCurrentSelectionChecked(event);
+ if (selection instanceof IStructuredSelection) {
+ wizard.init(window.getWorkbench(), (IStructuredSelection) selection);
+ }
+ else {
+ wizard.init(window.getWorkbench(), StructuredSelection.EMPTY);
+ }
+ Shell parent = window.getShell();
+ WizardDialog dialog = new WizardDialog(parent, wizard);
+ dialog.create();
+ dialog.open();
+ return null;
+ }
+
+ /**
+ * Create a "New" wizard to for creating a file/folder.
+ *
+ * @return the wizard to be used for creating a file/folder.
+ */
+ protected abstract IWorkbenchWizard createWizard();
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/handlers/OpenFileHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/OpenFileHandler.java
index ea9e3d6c6..7cbd3ed2c 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/handlers/OpenFileHandler.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/OpenFileHandler.java
@@ -7,11 +7,10 @@
* Contributors:
* William Chen (Wind River)- [345387]Open the remote files with a proper editor
*******************************************************************************/
-package org.eclipse.tm.te.tcf.filesystem.internal.handlers;
+package org.eclipse.tcf.te.tcf.filesystem.internal.handlers;
import java.io.File;
-import org.eclipse.compare.CompareUI;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
@@ -20,16 +19,13 @@ import org.eclipse.core.filesystem.IFileStore;
import org.eclipse.core.runtime.IPath;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.tm.te.tcf.filesystem.internal.compare.LocalTypedElement;
-import org.eclipse.tm.te.tcf.filesystem.internal.compare.MergeEditorInput;
-import org.eclipse.tm.te.tcf.filesystem.internal.compare.RemoteTypedElement;
-import org.eclipse.tm.te.tcf.filesystem.internal.exceptions.TCFException;
-import org.eclipse.tm.te.tcf.filesystem.internal.nls.Messages;
-import org.eclipse.tm.te.tcf.filesystem.model.CacheState;
-import org.eclipse.tm.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.internal.utils.CacheManager;
+import org.eclipse.tcf.te.tcf.filesystem.internal.utils.ContentTypeHelper;
+import org.eclipse.tcf.te.tcf.filesystem.internal.utils.PersistenceManager;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.handlers.HandlerUtil;
@@ -80,56 +76,7 @@ public class OpenFileHandler extends AbstractHandler {
return;
}
}
- if (!PersistenceManager.getInstance().isAutoSaving()) {
- openEditor(page, node);
- } else {
- try {
- StateManager.getInstance().refreshState(node);
- } catch (TCFException e) {
- Shell parent = page.getWorkbenchWindow().getShell();
- MessageDialog.openError(parent, Messages.StateManager_RefreshFailureTitle, e.getLocalizedMessage());
- return;
- }
- CacheState state = StateManager.getInstance().getCacheState(node);
- switch (state) {
- case consistent:
- openEditor(page, node);
- break;
- case modified: {
- // If the file node's local cache has been modified, upload it
- // before open it.
- boolean successful = CacheManager.getInstance().upload(node);
- if (successful)
- openEditor(page, node);
- }
- break;
- case outdated: {
- // If the file node's local cache does not exist yet, download
- // it.
- boolean successful = CacheManager.getInstance().download(node);
- if (successful)
- openEditor(page, node);
- }
- break;
- case conflict: {
- String title = Messages.OpenFileHandler_ConflictingTitle;
- String message = NLS.bind(Messages.OpenFileHandler_ConflictingMessage, node.name);
- Shell parent = page.getWorkbenchWindow().getShell();
- MessageDialog msgDialog = new MessageDialog(parent, title, null, message, MessageDialog.QUESTION, new String[] { Messages.OpenFileHandler_Merge, Messages.OpenFileHandler_OpenAnyway,
- Messages.OpenFileHandler_Cancel }, 0);
- int index = msgDialog.open();
- if (index == 0) {
- LocalTypedElement local = new LocalTypedElement(node);
- RemoteTypedElement remote = new RemoteTypedElement(node);
- MergeEditorInput input = new MergeEditorInput(local, remote, page);
- CompareUI.openCompareDialog(input);
- } else if (index == 1) {
- openEditor(page, node);
- }
- }
- break;
- }
- }
+ openEditor(page, node);
}
/**
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/handlers/OpenWithContribution.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/OpenWithContribution.java
index 27bec8e84..92c7f5b81 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/handlers/OpenWithContribution.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/OpenWithContribution.java
@@ -8,14 +8,14 @@
* William Chen (Wind River) [360494]Provide an "Open With" action in the pop
* up menu of file system nodes of Target Explorer.
*******************************************************************************/
-package org.eclipse.tm.te.tcf.filesystem.internal.handlers;
+package org.eclipse.tcf.te.tcf.filesystem.internal.handlers;
import org.eclipse.core.expressions.IEvaluationContext;
import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.action.IContributionItem;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.tm.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
import org.eclipse.ui.ISources;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.PlatformUI;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/handlers/OpenWithMenu.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/OpenWithMenu.java
index 22e09fe4b..6187426a0 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/handlers/OpenWithMenu.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/OpenWithMenu.java
@@ -8,7 +8,7 @@
* William Chen (Wind River) [360494]Provide an "Open With" action in the pop
* up menu of file system nodes of Target Explorer.
*******************************************************************************/
-package org.eclipse.tm.te.tcf.filesystem.internal.handlers;
+package org.eclipse.tcf.te.tcf.filesystem.internal.handlers;
import java.io.File;
import java.text.Collator;
@@ -18,14 +18,12 @@ import java.util.Collections;
import java.util.Comparator;
import java.util.Map;
-import org.eclipse.compare.CompareUI;
import org.eclipse.core.filesystem.EFS;
import org.eclipse.core.filesystem.IFileStore;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.QualifiedName;
import org.eclipse.core.runtime.content.IContentType;
import org.eclipse.jface.action.ContributionItem;
-import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.window.Window;
import org.eclipse.osgi.util.NLS;
@@ -35,15 +33,12 @@ import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.MenuItem;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.tm.te.tcf.filesystem.activator.UIPlugin;
-import org.eclipse.tm.te.tcf.filesystem.internal.compare.LocalTypedElement;
-import org.eclipse.tm.te.tcf.filesystem.internal.compare.MergeEditorInput;
-import org.eclipse.tm.te.tcf.filesystem.internal.compare.RemoteTypedElement;
-import org.eclipse.tm.te.tcf.filesystem.internal.exceptions.TCFException;
-import org.eclipse.tm.te.tcf.filesystem.internal.nls.Messages;
-import org.eclipse.tm.te.tcf.filesystem.model.CacheState;
-import org.eclipse.tm.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.filesystem.internal.utils.CacheManager;
+import org.eclipse.tcf.te.tcf.filesystem.internal.utils.ContentTypeHelper;
+import org.eclipse.tcf.te.tcf.filesystem.internal.utils.PersistenceManager;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
import org.eclipse.ui.IEditorDescriptor;
import org.eclipse.ui.IEditorRegistry;
import org.eclipse.ui.IWorkbenchPage;
@@ -379,57 +374,7 @@ public class OpenWithMenu extends ContributionItem {
return;
}
}
- if (!PersistenceManager.getInstance().isAutoSaving()) {
- openInEditor(editorDescriptor, openUsingDescriptor);
- }
- else {
- try {
- StateManager.getInstance().refreshState(node);
- }
- catch (TCFException e) {
- Shell parent = page.getWorkbenchWindow().getShell();
- MessageDialog.openError(parent, Messages.StateManager_RefreshFailureTitle, e
- .getLocalizedMessage());
- return;
- }
- CacheState state = StateManager.getInstance().getCacheState(node);
- switch (state) {
- case consistent:
- openInEditor(editorDescriptor, openUsingDescriptor);
- break;
- case modified: {
- // If the file node's local cache has been modified, upload it
- // before open it.
- boolean successful = CacheManager.getInstance().upload(node);
- if (successful) openInEditor(editorDescriptor, openUsingDescriptor);
- }
- break;
- case outdated: {
- // If the file node's local cache does not exist yet, download
- // it.
- boolean successful = CacheManager.getInstance().download(node);
- if (successful) openInEditor(editorDescriptor, openUsingDescriptor);
- }
- break;
- case conflict: {
- String title = Messages.OpenFileHandler_ConflictingTitle;
- String message = NLS.bind(Messages.OpenFileHandler_ConflictingMessage, node.name);
- Shell parent = page.getWorkbenchWindow().getShell();
- MessageDialog msgDialog = new MessageDialog(parent, title, null, message, MessageDialog.QUESTION, new String[] { Messages.OpenFileHandler_Merge, Messages.OpenFileHandler_OpenAnyway, Messages.OpenFileHandler_Cancel }, 0);
- int index = msgDialog.open();
- if (index == 0) {
- LocalTypedElement local = new LocalTypedElement(node);
- RemoteTypedElement remote = new RemoteTypedElement(node);
- MergeEditorInput input = new MergeEditorInput(local, remote, page);
- CompareUI.openCompareDialog(input);
- }
- else if (index == 1) {
- openInEditor(editorDescriptor, openUsingDescriptor);
- }
- }
- break;
- }
- }
+ openInEditor(editorDescriptor, openUsingDescriptor);
}
/**
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/PasteFilesHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/PasteFilesHandler.java
new file mode 100644
index 000000000..8652d69cd
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/PasteFilesHandler.java
@@ -0,0 +1,82 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.handlers;
+
+import java.util.List;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.tcf.te.tcf.filesystem.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSClipboard;
+import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSCopy;
+import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSMove;
+import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSOperation;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+/**
+ * The handler that pastes the files or folders in the clip board.
+ */
+public class PasteFilesHandler extends AbstractHandler {
+
+ /*
+ * (non-Javadoc)
+ * @see
+ * org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+ */
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ FSClipboard cb = UIPlugin.getDefault().getClipboard();
+ if (!cb.isEmpty()) {
+ // Get the files/folders from the clip board.
+ int operations = cb.getOperation();
+ IStructuredSelection selection = (IStructuredSelection) HandlerUtil.getCurrentSelectionChecked(event);
+ List<FSTreeNode> nodes = cb.getFiles();
+ FSOperation operation = null;
+ if (operations == FSClipboard.CUT) {
+ FSTreeNode dest = (FSTreeNode) selection.getFirstElement();
+ operation = new FSMove(nodes, dest);
+ }
+ else if (operations == FSClipboard.COPY) {
+ FSTreeNode hovered = (FSTreeNode) selection.getFirstElement();
+ FSTreeNode dest = getCopyDestination(hovered, nodes);
+ operation = new FSCopy(nodes, dest);
+ }
+ if (operation != null) operation.doit();
+ }
+ return null;
+ }
+
+ /**
+ * Return an appropriate destination directory for copying according to
+ * the specified hovered node. If the hovered node is a file, then return
+ * its parent directory. If the hovered node is a directory, then return its
+ * self if it is not a node being copied. Return its parent directory if it is
+ * a node being copied.
+ * @param hovered
+ * @param nodes
+ * @return
+ */
+ private FSTreeNode getCopyDestination(FSTreeNode hovered, List<FSTreeNode> nodes) {
+ if (hovered.isFile()) {
+ return hovered.parent;
+ }
+ else if (hovered.isDirectory()) {
+ for (FSTreeNode node : nodes) {
+ if (node == hovered) {
+ return hovered.parent;
+ }
+ }
+ }
+ return hovered;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/RefreshDirectoryHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/RefreshDirectoryHandler.java
new file mode 100644
index 000000000..020778363
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/RefreshDirectoryHandler.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.handlers;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.Assert;
+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.viewers.IStructuredSelection;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSRefresh;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+/**
+ * The handler that refreshes the directory and its children recursively
+ * in the file system tree.
+ */
+public class RefreshDirectoryHandler extends AbstractHandler {
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+ */
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ IStructuredSelection selection = (IStructuredSelection) HandlerUtil.getCurrentSelectionChecked(event);
+ Assert.isTrue(selection.size() == 1);
+ final FSTreeNode node = (FSTreeNode) selection.getFirstElement();
+ if(node.childrenQueried) {
+ Job job = new Job(NLS.bind(Messages.RefreshDirectoryHandler_RefreshJobTitle, node.name)) {
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ FSRefresh refresh = new FSRefresh(node);
+ refresh.doit();
+ return Status.OK_STATUS;
+ }
+ };
+ job.schedule();
+ }
+ return null;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/handlers/RefreshHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/RefreshHandler.java
index bb7ec71f7..bbcbe6fc2 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/handlers/RefreshHandler.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/RefreshHandler.java
@@ -8,7 +8,7 @@
* Wind River Systems - initial API and implementation
* William Chen (Wind River)- [345552] Edit the remote files with a proper editor
*******************************************************************************/
-package org.eclipse.tm.te.tcf.filesystem.internal.handlers;
+package org.eclipse.tcf.te.tcf.filesystem.internal.handlers;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
@@ -16,9 +16,10 @@ import org.eclipse.core.commands.ExecutionException;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.tm.te.tcf.filesystem.internal.exceptions.TCFException;
-import org.eclipse.tm.te.tcf.filesystem.internal.nls.Messages;
-import org.eclipse.tm.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.internal.exceptions.TCFException;
+import org.eclipse.tcf.te.tcf.filesystem.internal.utils.StateManager;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.handlers.HandlerUtil;
@@ -36,6 +37,7 @@ public class RefreshHandler extends AbstractHandler {
FSTreeNode node = (FSTreeNode) selection.getFirstElement();
try {
StateManager.getInstance().refreshState(node);
+ node.firePropertyChange();
} catch (TCFException e) {
Shell parent = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
MessageDialog.openError(parent, Messages.StateManager_RefreshFailureTitle, e.getLocalizedMessage());
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/RefreshViewerHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/RefreshViewerHandler.java
new file mode 100644
index 000000000..779c4f69b
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/RefreshViewerHandler.java
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.handlers;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+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.tcf.te.tcf.filesystem.internal.operations.FSRefresh;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSModel;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+/**
+ * The action handler to refresh the whole file system tree.
+ */
+public class RefreshViewerHandler extends AbstractHandler {
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+ */
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ IEditorInput editorInput = HandlerUtil.getActiveEditorInputChecked(event);
+ IPeerModel peer = (IPeerModel) editorInput.getAdapter(IPeerModel.class);
+ if (peer != null) {
+ final FSTreeNode root = FSModel.getFSModel(peer).getRoot();
+ if (root != null) {
+ Job job = new Job(Messages.RefreshViewerHandler_RefreshJobTitle) {
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ FSRefresh op = new FSRefresh(root);
+ op.doit();
+ return Status.OK_STATUS;
+ }
+ };
+ job.schedule();
+ }
+ }
+ return null;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/RenameFilesHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/RenameFilesHandler.java
new file mode 100644
index 000000000..44cb69f47
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/RenameFilesHandler.java
@@ -0,0 +1,136 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.handlers;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.window.Window;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.tcf.te.tcf.filesystem.internal.celleditor.FSCellValidator;
+import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSOperation;
+import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSRename;
+import org.eclipse.tcf.te.tcf.filesystem.internal.utils.PersistenceManager;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+import org.eclipse.tcf.te.ui.dialogs.RenameDialog;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+/**
+ * The handler that renames the selected file or folder.
+ */
+public class RenameFilesHandler extends AbstractHandler {
+ // The currently focused viewer.
+ private static TreeViewer CurrentViewer;
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+ */
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ IStructuredSelection sel = (IStructuredSelection) HandlerUtil.getCurrentSelectionChecked(event);
+ if (!sel.isEmpty()) {
+ FSTreeNode node = (FSTreeNode) sel.getFirstElement();
+ boolean inPlaceEditor = PersistenceManager.getInstance().isInPlaceEditor();
+ if (inPlaceEditor) {
+ // If it is configured to use in-place editor, then invoke the editor.
+ if (CurrentViewer != null) {
+ Control control = CurrentViewer.getControl();
+ if (!control.isDisposed()) {
+ CurrentViewer.editElement(node, 0);
+ }
+ }
+ }
+ else {
+ Shell shell = HandlerUtil.getActiveShellChecked(event);
+ RenameDialog dialog = createRenameDialog(shell, node);
+ int ok = dialog.open();
+ if (ok == Window.OK) {
+ // Do the renaming.
+ String newName = dialog.getNewName();
+ FSRename op = new FSRename(node, newName);
+ op.doit();
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Create a renaming dialog for the specified file/folder node.
+ *
+ * @param shell The parent shell.
+ * @param node The file/folder node.
+ * @return The renaming dialog.
+ */
+ private RenameDialog createRenameDialog(Shell shell, FSTreeNode node) {
+ String[] names = getUsedNames(node);
+ String title;
+ if (node.isFile()) {
+ title = Messages.RenameFilesHandler_TitleRenameFile;
+ }
+ else if (node.isDirectory()) {
+ title = Messages.RenameFilesHandler_TitleRenameFolder;
+ }
+ else {
+ title = Messages.RenameFilesHandler_TitleRename;
+ }
+ String formatRegex;
+ if (node.isWindowsNode()) {
+ formatRegex = FSCellValidator.WIN_FILENAME_REGEX;
+ }
+ else {
+ formatRegex = FSCellValidator.UNIX_FILENAME_REGEX;
+ }
+ String error;
+ if (node.isWindowsNode()) {
+ error = Messages.FSRenamingAssistant_WinIllegalCharacters;
+ }
+ else {
+ error = Messages.FSRenamingAssistant_UnixIllegalCharacters;
+ }
+ String prompt = Messages.RenameFilesHandler_RenamePromptMessage;
+ String usedError = Messages.FSRenamingAssistant_NameAlreadyExists;
+ String label = Messages.RenameFilesHandler_PromptNewName;
+ return new RenameDialog(shell, title, prompt, usedError, error, label, node.name, formatRegex, names, null);
+ }
+
+ /**
+ * Get the used names in the specified folder.
+ *
+ * @param folder The folder.
+ * @return Used names.
+ */
+ private String[] getUsedNames(FSTreeNode folder) {
+ List<String> usedNames = new ArrayList<String>();
+ List<FSTreeNode> nodes = new ArrayList<FSTreeNode>(FSOperation.getCurrentChildren(folder.parent));
+ for (FSTreeNode node : nodes) {
+ usedNames.add(node.name);
+ }
+ return usedNames.toArray(new String[usedNames.size()]);
+ }
+
+ /**
+ * Set the currently focused tree viewer. Called by Target Explorer and FSTreeControl to set the
+ * current viewer.
+ *
+ * @param viewer The currently focused tree viewer.
+ */
+ public static void setCurrentViewer(TreeViewer viewer) {
+ CurrentViewer = viewer;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/handlers/RevertHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/UpdateHandler.java
index 83e27c185..0aa51236f 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/handlers/RevertHandler.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/UpdateHandler.java
@@ -8,20 +8,21 @@
* Wind River Systems - initial API and implementation
* William Chen (Wind River)- [345552] Edit the remote files with a proper editor
*******************************************************************************/
-package org.eclipse.tm.te.tcf.filesystem.internal.handlers;
+package org.eclipse.tcf.te.tcf.filesystem.internal.handlers;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.tm.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.internal.utils.CacheManager;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
import org.eclipse.ui.handlers.HandlerUtil;
/**
- * The handler to revert the content of the file from the remote file.
- * This handler is enabled only when the file is modified or conflicting.
+ * The handler to update the local file's content with the latest of its remote file.
+ *
*/
-public class RevertHandler extends AbstractHandler {
+public class UpdateHandler extends AbstractHandler {
/*
* (non-Javadoc)
@@ -34,5 +35,4 @@ public class RevertHandler extends AbstractHandler {
CacheManager.getInstance().download(node);
return null;
}
-
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSClipboard.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSClipboard.java
new file mode 100644
index 000000000..df4b379a3
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSClipboard.java
@@ -0,0 +1,90 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.operations;
+
+import java.util.List;
+
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+
+/**
+ * The clip board to which copy or cut files/folders.
+ */
+public class FSClipboard {
+ // The constants to define the current operation type of the clip board.
+ public static final int NONE = -1;
+ public static final int CUT = 0;
+ public static final int COPY = 1;
+ // The operation type, CUT, COPY or NONE.
+ private int operation;
+ // The currently selected files/folders.
+ private List<FSTreeNode> files;
+
+ /**
+ * Create a clip board instance.
+ */
+ public FSClipboard() {
+ operation = NONE;
+ }
+
+ /**
+ * If the clip board is empty.
+ *
+ * @return true if the operation is NONE and no files are selected.
+ */
+ public boolean isEmpty() {
+ return operation == NONE && (files == null || files.isEmpty());
+ }
+
+ /**
+ * Return the current operation type.
+ *
+ * @return The operation of the current clip board content.
+ */
+ public int getOperation() {
+ return operation;
+ }
+
+ /**
+ * Get the currently selected files/folders to operated.
+ *
+ * @return The file/folder list using their location URLs.
+ */
+ public List<FSTreeNode> getFiles() {
+ return files;
+ }
+
+ /**
+ * Cut the specified files/folders to the clip board.
+ *
+ * @param files The file/folder nodes.
+ */
+ public void cutFiles(List<FSTreeNode> files) {
+ operation = CUT;
+ this.files = files;
+ }
+
+ /**
+ * Copy the specified files/folders to the clip board.
+ *
+ * @param files The file/folder nodes.
+ */
+ public void copyFiles(List<FSTreeNode> files) {
+ operation = COPY;
+ this.files = files;
+ }
+
+ /**
+ * Clear the clip board.
+ */
+ public void clear() {
+ operation = NONE;
+ this.files = null;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSCopy.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSCopy.java
new file mode 100644
index 000000000..c182ff4e4
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSCopy.java
@@ -0,0 +1,221 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.operations;
+
+import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.services.IFileSystem;
+import org.eclipse.tcf.services.IFileSystem.DoneCopy;
+import org.eclipse.tcf.services.IFileSystem.FileSystemException;
+import org.eclipse.tcf.te.tcf.core.Tcf;
+import org.eclipse.tcf.te.tcf.filesystem.dialogs.TimeTriggeredProgressMonitorDialog;
+import org.eclipse.tcf.te.tcf.filesystem.internal.exceptions.TCFException;
+import org.eclipse.tcf.te.tcf.filesystem.internal.exceptions.TCFFileSystemException;
+import org.eclipse.tcf.te.tcf.filesystem.internal.utils.PersistenceManager;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * FSCopy copies selected FSTreeNodes to a specify destination folder.
+ */
+public class FSCopy extends FSOperation {
+ // The nodes to be copied.
+ List<FSTreeNode> nodes;
+ // The destination folder to be copied to.
+ FSTreeNode dest;
+
+ /**
+ * Create a copy operation using the specified nodes and destination folder.
+ *
+ * @param nodes The file/folder nodes to be copied.
+ * @param dest The destination folder to be copied to.
+ */
+ public FSCopy(List<FSTreeNode> nodes, FSTreeNode dest) {
+ this.nodes = getTopNodes(nodes);
+ this.dest = dest;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSOperation#doit()
+ */
+ @Override
+ public boolean doit() {
+ IRunnableWithProgress runnable = new IRunnableWithProgress() {
+ @Override
+ public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
+ FSTreeNode head = nodes.get(0);
+ IChannel channel = null;
+ try {
+ channel = openChannel(head.peerNode.getPeer());
+ if (channel != null) {
+ IFileSystem service = getBlockingFileSystem(channel);
+ if (service != null) {
+ monitor.beginTask(Messages.FSCopy_PrepareToCopy, IProgressMonitor.UNKNOWN);
+ monitor.worked(1);
+ int count = count(service, nodes);
+ monitor.beginTask(Messages.FSCopy_CopyingFile, count);
+ for (FSTreeNode node : nodes) {
+ // Iterate the nodes and copy each of them to the destination
+ // folder.
+ copyNode(monitor, service, node, dest);
+ }
+ }
+ else {
+ String message = NLS.bind(Messages.FSOperation_NoFileSystemError, head.peerNode.getPeerId());
+ throw new TCFFileSystemException(message);
+ }
+ }
+ }
+ catch (TCFException e) {
+ throw new InvocationTargetException(e);
+ }
+ finally {
+ if (channel != null) Tcf.getChannelManager().closeChannel(channel);
+ // Refresh the file system tree.
+ head.firePropertyChange();
+ monitor.done();
+ }
+ }
+ };
+ Shell parent = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
+ TimeTriggeredProgressMonitorDialog dialog = new TimeTriggeredProgressMonitorDialog(parent, 250);
+ dialog.setCancelable(true);
+ try {
+ dialog.run(true, true, runnable);
+ }
+ catch (InvocationTargetException e) {
+ // Display the error during copy.
+ Throwable throwable = e.getTargetException() != null ? e.getTargetException() : e;
+ MessageDialog.openError(parent, Messages.FSCopy_CopyFileFolderTitle, throwable.getLocalizedMessage());
+ }
+ catch (InterruptedException e) {
+ // It is canceled.
+ }
+ return true;
+ }
+
+ /**
+ * Copy the file/folder represented by the specified node to the destination folder.
+ *
+ * @param monitor The monitor to report the progress.
+ * @param service The file system service to do the remote copying.
+ * @param node The file/folder node to be copied.
+ * @param dest The destination folder.
+ * @throws TCFFileSystemException The exception thrown during copying
+ * @throws InterruptedException The exception thrown when the operation is canceled.
+ */
+ void copyNode(IProgressMonitor monitor, IFileSystem service, FSTreeNode node, FSTreeNode dest) throws TCFFileSystemException, InterruptedException {
+ if (node.isFile()) {
+ copyFile(monitor, service, node, dest);
+ }
+ else if (node.isDirectory()) {
+ copyFolder(monitor, service, node, dest);
+ }
+ }
+
+ /**
+ * Copy the folder represented by the specified node to the destination folder.
+ *
+ * @param monitor The monitor to report the progress.
+ * @param service The file system service to do the remote copying.
+ * @param node The folder node to be copied.
+ * @param dest The destination folder.
+ * @throws TCFFileSystemException The exception thrown during copying
+ * @throws InterruptedException The exception thrown when the operation is canceled.
+ */
+ private void copyFolder(IProgressMonitor monitor, IFileSystem service, FSTreeNode node, FSTreeNode dest) throws TCFFileSystemException, InterruptedException {
+ if (monitor.isCanceled()) throw new InterruptedException();
+ FSTreeNode copy = findChild(service, dest, node.name);
+ if (copy == null) {
+ // If no existing directory with the same name, create it.
+ copy = (FSTreeNode) node.clone();
+ addChild(service, dest, copy);
+ mkdir(service, copy);
+ copyChildren(monitor, service, node, copy);
+ }
+ else if (node == copy) {
+ copy = createCopyDestination(service, node, dest);
+ mkdir(service, copy);
+ copyChildren(monitor, service, node, copy);
+ }
+ else if (confirmReplace(node)) {
+ copyChildren(monitor, service, node, copy);
+ }
+ monitor.worked(1);
+ }
+
+ /**
+ * Copy the children of the node to the destination folder.
+ *
+ * @param monitor The monitor to report the progress.
+ * @param service The file system service to do the remote copying.
+ * @param node The folder node to be copied.
+ * @param dest The destination folder.
+ * @throws TCFFileSystemException The exception thrown during copying
+ * @throws InterruptedException The exception thrown when the operation is canceled.
+ */
+ private void copyChildren(IProgressMonitor monitor, IFileSystem service, FSTreeNode node, FSTreeNode dest) throws TCFFileSystemException, InterruptedException {
+ List<FSTreeNode> children = new ArrayList<FSTreeNode>(getChildren(node, service));
+ if (!children.isEmpty()) {
+ for (FSTreeNode child : children) {
+ // Iterate and copy its children nodes.
+ copyNode(monitor, service, child, dest);
+ }
+ }
+ }
+
+ /**
+ * Copy the file represented by the specified node to the destination folder.
+ *
+ * @param monitor The monitor to report the progress.
+ * @param service The file system service to do the remote copying.
+ * @param node The file node to be copied.
+ * @param dest The destination folder.
+ * @throws TCFFileSystemException The exception thrown during copying
+ * @throws InterruptedException The exception thrown when the operation is canceled.
+ */
+ private void copyFile(IProgressMonitor monitor, IFileSystem service, FSTreeNode node, FSTreeNode dest) throws TCFFileSystemException, InterruptedException {
+ if (monitor.isCanceled()) throw new InterruptedException();
+ monitor.subTask(NLS.bind(Messages.FSCopy_Copying, node.name));
+ // Create the copy target file
+ final FSTreeNode copy = createCopyDestination(service, node, dest);
+ String src_path = node.getLocation(true);
+ String dst_path = copy.getLocation(true);
+ final TCFFileSystemException[] errors = new TCFFileSystemException[1];
+ // Get the options of copy permission and ownership.
+ boolean copyPermission = PersistenceManager.getInstance().isCopyPermission();
+ boolean copyOwnership = PersistenceManager.getInstance().isCopyOwnership();
+ service.copy(src_path, dst_path, copyPermission, copyOwnership, new DoneCopy() {
+ @Override
+ public void doneCopy(IToken token, FileSystemException error) {
+ if (error != null) {
+ String message = NLS.bind(Messages.FSCopy_CannotCopyFile, copy.name, error);
+ errors[0] = new TCFFileSystemException(message, error);
+ }
+ }
+ });
+ if (errors[0] != null) {
+ removeChild(service, dest, copy);
+ throw errors[0];
+ }
+ monitor.worked(1);
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSCreate.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSCreate.java
new file mode 100644
index 000000000..5a00a22f8
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSCreate.java
@@ -0,0 +1,180 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.operations;
+
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.services.IFileSystem;
+import org.eclipse.tcf.services.IFileSystem.DoneStat;
+import org.eclipse.tcf.services.IFileSystem.FileAttrs;
+import org.eclipse.tcf.services.IFileSystem.FileSystemException;
+import org.eclipse.tcf.te.tcf.core.Tcf;
+import org.eclipse.tcf.te.tcf.filesystem.internal.exceptions.TCFException;
+import org.eclipse.tcf.te.tcf.filesystem.internal.exceptions.TCFFileSystemException;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+
+/**
+ * The base file operation class for creating a file or a folder in the file system of Target
+ * Explorer.
+ */
+public abstract class FSCreate extends FSOperation {
+ // The folder in which a file/folder is going to be created.
+ FSTreeNode folder;
+ // The node that is created after the operation.
+ FSTreeNode node;
+ // The name of the node to be created.
+ String name;
+ // The error generated when creating the node.
+ String error;
+
+ /**
+ * Create an FSCreate instance with the specified folder and the name of the new node.
+ *
+ * @param folder The folder in which the new node is going to be created.
+ * @param name The new node's name.
+ */
+ public FSCreate(FSTreeNode folder, String name) {
+ this.folder = folder;
+ this.name = name;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSOperation#doit()
+ */
+ @Override
+ public boolean doit() {
+ IChannel channel = null;
+ try {
+ channel = openChannel(folder.peerNode.getPeer());
+ IFileSystem service = getBlockingFileSystem(channel);
+ if (service != null) {
+ if (!folder.childrenQueried) {
+ // If the children of folder is not queried, load it first.
+ loadChildren(folder, service);
+ }
+ create(service);
+ addNode(service);
+ refresh(service);
+ folder.firePropertyChange();
+ }
+ else {
+ String message = NLS.bind(Messages.FSOperation_NoFileSystemError, folder.peerNode.getPeerId());
+ throw new TCFFileSystemException(message);
+ }
+ }
+ catch (TCFException e) {
+ error = e.getLocalizedMessage();
+ return false;
+ }
+ finally {
+ if (channel != null) Tcf.getChannelManager().closeChannel(channel);
+ }
+ return true;
+ }
+
+ /**
+ * Get the error message generated during creating.
+ *
+ * @return The error message.
+ */
+ public String getError() {
+ return error;
+ }
+
+ /**
+ * Refresh new node's stat using the file system service.
+ *
+ * @param service The file system service.
+ * @throws TCFFileSystemException Thrown when refreshing the new node's stat.
+ */
+ private void refresh(final IFileSystem service) throws TCFFileSystemException {
+ if (node != null) {
+ final TCFFileSystemException[] errors = new TCFFileSystemException[1];
+ String path = node.getLocation(true);
+ service.stat(path, new DoneStat() {
+ @Override
+ public void doneStat(IToken token, FileSystemException error, FileAttrs attrs) {
+ if (error == null) {
+ node.attr = attrs;
+ }
+ else {
+ String message = NLS
+ .bind(Messages.StateManager_CannotGetFileStatMessage, new Object[] { node.name, error });
+ errors[0] = new TCFFileSystemException(message, error);
+ }
+ }
+ });
+ if (errors[0] != null) {
+ throw errors[0];
+ }
+ }
+ }
+
+ /**
+ * Add the new node to the folder and its FSModel.
+ *
+ * @param service The file system service to be used.
+ * @throws TCFFileSystemException Thrown when adding.
+ */
+ void addNode(final IFileSystem service) throws TCFFileSystemException {
+ if (Protocol.isDispatchThread()) {
+ node = new FSTreeNode();
+ node.name = name;
+ node.parent = folder;
+ node.peerNode = folder.peerNode;
+ node.type = getNodeType();
+ getCurrentChildren(folder).add(node);
+ }
+ else {
+ final TCFFileSystemException[] errors = new TCFFileSystemException[1];
+ Protocol.invokeAndWait(new Runnable() {
+ @Override
+ public void run() {
+ try {
+ addNode(service);
+ }
+ catch (TCFFileSystemException e) {
+ errors[0] = e;
+ }
+ }
+ });
+ if (errors[0] != null) throw errors[0];
+ }
+ }
+
+ /**
+ * Get the new node's type, either "FSFileNode" or "FSDirNode". Note <b>it is not possible for a
+ * new node with "FSRootDirNode".</b>
+ *
+ * @return The new node's type.
+ */
+ protected abstract String getNodeType();
+
+ /**
+ * Create the node in the target system.
+ *
+ * @param service The file system service used to create the new node.
+ * @throws TCFFileSystemException Thrown when creating the node.
+ */
+ protected abstract void create(IFileSystem service) throws TCFFileSystemException;
+
+ /**
+ * Get the node that is created by this operation.
+ *
+ * @return the node created.
+ */
+ public FSTreeNode getNode() {
+ return node;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSCreateFile.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSCreateFile.java
new file mode 100644
index 000000000..b5cdf6c70
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSCreateFile.java
@@ -0,0 +1,79 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.operations;
+
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.services.IFileSystem;
+import org.eclipse.tcf.services.IFileSystem.DoneClose;
+import org.eclipse.tcf.services.IFileSystem.DoneOpen;
+import org.eclipse.tcf.services.IFileSystem.FileSystemException;
+import org.eclipse.tcf.services.IFileSystem.IFileHandle;
+import org.eclipse.tcf.te.tcf.filesystem.internal.exceptions.TCFFileSystemException;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+
+/**
+ * The file operation class to create a file in the file system of Target Explorer.
+ */
+public class FSCreateFile extends FSCreate {
+
+ /**
+ * Create an instance to create a file with the name in the folder.
+ *
+ * @param folder The folder in which the file is to be created.
+ * @param name The new file's name.
+ */
+ public FSCreateFile(FSTreeNode folder, String name) {
+ super(folder, name);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.filesystem.internal.wizards.FSCreate#create(org.eclipse.tcf.services.IFileSystem)
+ */
+ @Override
+ protected void create(IFileSystem service) throws TCFFileSystemException {
+ String path = folder.getLocation(true);
+ if (!path.endsWith("/")) path += "/"; //$NON-NLS-1$ //$NON-NLS-2$
+ path += name;
+ final FileSystemException[] errors = new FileSystemException[1];
+ // Open the file.
+ final IFileHandle[] handles = new IFileHandle[1];
+ service.open(path, IFileSystem.TCF_O_WRITE | IFileSystem.TCF_O_CREAT | IFileSystem.TCF_O_TRUNC, null, new DoneOpen() {
+ @Override
+ public void doneOpen(IToken token, FileSystemException error, IFileHandle hdl) {
+ errors[0] = error;
+ handles[0] = hdl;
+ }
+ });
+ if (errors[0] != null) {
+ TCFFileSystemException exception = new TCFFileSystemException(errors[0].toString());
+ exception.initCause(errors[0]);
+ throw exception;
+ }
+ if (handles[0] == null) {
+ throw new TCFFileSystemException(Messages.TcfURLConnection_NoFileHandleReturned);
+ }
+ service.close(handles[0], new DoneClose() {
+ @Override
+ public void doneClose(IToken token, FileSystemException error) {
+ }
+ });
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.filesystem.internal.wizards.FSCreate#getNodeType()
+ */
+ @Override
+ protected String getNodeType() {
+ return "FSFileNode"; //$NON-NLS-1$
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSCreateFolder.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSCreateFolder.java
new file mode 100644
index 000000000..12ac5fe13
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSCreateFolder.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.operations;
+
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.services.IFileSystem;
+import org.eclipse.tcf.services.IFileSystem.DoneMkDir;
+import org.eclipse.tcf.services.IFileSystem.FileSystemException;
+import org.eclipse.tcf.te.tcf.filesystem.internal.exceptions.TCFFileSystemException;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+
+/**
+ * The file operation class to create a folder in the file system of Target Explorer.
+ */
+public class FSCreateFolder extends FSCreate {
+
+ /**
+ * Create an instance to create a folder with the name in the folder.
+ *
+ * @param folder The folder in which the new folder is to be created.
+ * @param name The name of the new folder.
+ */
+ public FSCreateFolder(FSTreeNode folder, String name) {
+ super(folder, name);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.filesystem.internal.wizards.FSCreate#create(org.eclipse.tcf.services.IFileSystem)
+ */
+ @Override
+ protected void create(IFileSystem service) throws TCFFileSystemException {
+ String path = folder.getLocation(true);
+ if (!path.endsWith("/")) path += "/"; //$NON-NLS-1$ //$NON-NLS-2$
+ path += name;
+ final FileSystemException[] errors = new FileSystemException[1];
+ service.mkdir(path, null, new DoneMkDir() {
+ @Override
+ public void doneMkDir(IToken token, FileSystemException error) {
+ if (error != null) {
+ errors[0] = error;
+ }
+ }
+ });
+ if (errors[0] != null) {
+ TCFFileSystemException exception = new TCFFileSystemException(errors[0].toString());
+ exception.initCause(errors[0]);
+ throw exception;
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.filesystem.internal.wizards.FSCreate#getNodeType()
+ */
+ @Override
+ protected String getNodeType() {
+ return "FSDirNode"; //$NON-NLS-1$
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSCreateRoot.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSCreateRoot.java
new file mode 100644
index 000000000..b9cea94b5
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSCreateRoot.java
@@ -0,0 +1,117 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.operations;
+
+/**
+ * The file operation class to create the root node in the file system of Target Explorer.
+ */
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.SafeRunner;
+import org.eclipse.jface.util.SafeRunnable;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.services.IFileSystem;
+import org.eclipse.tcf.services.IFileSystem.DirEntry;
+import org.eclipse.tcf.services.IFileSystem.FileSystemException;
+import org.eclipse.tcf.te.tcf.core.Tcf;
+import org.eclipse.tcf.te.tcf.filesystem.internal.exceptions.TCFChannelException;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSModel;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+
+public class FSCreateRoot extends FSOperation {
+ // The peer model in which the file system root is going to be created.
+ /* default */IPeerModel peerModel;
+
+ /**
+ * Create an instance using the peer model.
+ *
+ * @param peerModel The peer model.
+ */
+ public FSCreateRoot(IPeerModel peerModel) {
+ this.peerModel = peerModel;
+ }
+
+ /**
+ * Create the file system's root node.
+ *
+ * @return The root file system node.
+ */
+ public FSTreeNode create() {
+ Assert.isTrue (!Protocol.isDispatchThread());
+ final FSTreeNode[] result = new FSTreeNode[1];
+ Protocol.invokeAndWait(new Runnable() {
+ @Override
+ public void run() {
+ result[0] = createRootNode();
+ }
+ });
+ SafeRunner.run(new SafeRunnable() {
+ @Override
+ public void run() throws Exception {
+ queryRootNodes(result[0]);
+ }
+ });
+ return result[0];
+ }
+
+ /**
+ * Create the root node instance.
+ *
+ * @return The root node instance.
+ */
+ FSTreeNode createRootNode() {
+ final FSTreeNode rootNode = new FSTreeNode();
+ rootNode.type = "FSRootNode"; //$NON-NLS-1$
+ rootNode.peerNode = peerModel;
+ FSModel.getFSModel(peerModel).setRoot(rootNode);
+ return rootNode;
+ }
+
+ /**
+ * Query the root file system node's children nodes.
+ *
+ * @param rootNode The root file system node.
+ * @throws TCFChannelException Thrown when opening a channel.
+ */
+ /* default */void queryRootNodes(final FSTreeNode rootNode) throws TCFChannelException {
+ rootNode.childrenQueried = false;
+ IChannel channel = null;
+ try {
+ channel = openChannel(peerModel.getPeer());
+ IFileSystem service = getBlockingFileSystem(channel);
+ if (service != null) {
+ rootNode.childrenQueryRunning = true;
+ service.roots(new IFileSystem.DoneRoots() {
+ @Override
+ public void doneRoots(IToken token, FileSystemException error, DirEntry[] entries) {
+ if (error == null) {
+ for (DirEntry entry : entries) {
+ FSTreeNode node = createNodeFromDirEntry(entry, true);
+ if (node != null) {
+ node.parent = rootNode;
+ node.peerNode = rootNode.peerNode;
+ rootNode.getChildren().add(node);
+ }
+ }
+ }
+ }
+ });
+ // Reset the children query markers
+ rootNode.childrenQueryRunning = false;
+ }
+ }
+ finally {
+ if (channel != null) Tcf.getChannelManager().closeChannel(channel);
+ }
+ rootNode.childrenQueried = true;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSDelete.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSDelete.java
new file mode 100644
index 000000000..765515d32
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSDelete.java
@@ -0,0 +1,260 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.operations;
+
+import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.SafeRunner;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.jface.util.SafeRunnable;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.services.IFileSystem;
+import org.eclipse.tcf.services.IFileSystem.DoneRemove;
+import org.eclipse.tcf.services.IFileSystem.FileSystemException;
+import org.eclipse.tcf.te.tcf.core.Tcf;
+import org.eclipse.tcf.te.tcf.filesystem.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.filesystem.dialogs.TimeTriggeredProgressMonitorDialog;
+import org.eclipse.tcf.te.tcf.filesystem.internal.ImageConsts;
+import org.eclipse.tcf.te.tcf.filesystem.internal.exceptions.TCFException;
+import org.eclipse.tcf.te.tcf.filesystem.internal.exceptions.TCFFileSystemException;
+import org.eclipse.tcf.te.tcf.filesystem.internal.utils.StateManager;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * FSDelete deletes the selected FSTreeNode list.
+ */
+public class FSDelete extends FSOperation {
+ //The nodes to be deleted.
+ List<FSTreeNode> nodes;
+
+ /**
+ * Create a delete operation using the specified nodes.
+ *
+ * @param nodes The nodes to be deleted.
+ */
+ public FSDelete(List<FSTreeNode> nodes) {
+ this.nodes = getTopNodes(nodes);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSOperation#doit()
+ */
+ @Override
+ public boolean doit() {
+ IRunnableWithProgress runnable = new IRunnableWithProgress() {
+ @Override
+ public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
+ FSTreeNode head = nodes.get(0);
+ IChannel channel = null;
+ try {
+ channel = openChannel(head.peerNode.getPeer());
+ if (channel != null) {
+ IFileSystem service = getBlockingFileSystem(channel);
+ if (service != null) {
+ monitor.beginTask(Messages.FSDelete_PrepareToDelete, IProgressMonitor.UNKNOWN);
+ monitor.worked(1);
+ int count = count(service, nodes);
+ monitor.beginTask(Messages.FSDelete_Deleting, count);
+ for (FSTreeNode node : nodes) {
+ remove(monitor, node, service);
+ }
+ }
+ else {
+ String message = NLS.bind(Messages.FSOperation_NoFileSystemError, head.peerNode.getPeerId());
+ throw new TCFFileSystemException(message);
+ }
+ }
+ }
+ catch (TCFException e) {
+ throw new InvocationTargetException(e);
+ }
+ finally {
+ if (channel != null) Tcf.getChannelManager().closeChannel(channel);
+ // Refresh the file system tree.
+ head.firePropertyChange();
+ monitor.done();
+ }
+ }
+ };
+ Shell parent = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
+ TimeTriggeredProgressMonitorDialog dialog = new TimeTriggeredProgressMonitorDialog(parent, 250);
+ dialog.setCancelable(true);
+ try {
+ dialog.run(true, true, runnable);
+ }
+ catch (InvocationTargetException e) {
+ // Display the error message during deleting.
+ Throwable throwable = e.getTargetException() != null ? e.getTargetException() : e;
+ MessageDialog.openError(parent, Messages.FSDelete_DeleteFileFolderTitle, throwable.getLocalizedMessage());
+ }
+ catch (InterruptedException e) {
+ // It is canceled.
+ }
+ return true;
+ }
+
+ /**
+ * Delete the file/folder node using the file system service.
+ *
+ * @param monitor The monitor to report the progress.
+ * @param node The file/folder node to be deleted.
+ * @param service The file system service.
+ * @throws TCFFileSystemException The exception thrown during deleting.
+ * @throws InterruptedException Thrown when the operation is canceled.
+ */
+ void remove(IProgressMonitor monitor, FSTreeNode node, IFileSystem service) throws TCFFileSystemException, InterruptedException {
+ if (node.isFile()) {
+ removeFile(monitor, node, service);
+ }
+ else if (node.isDirectory()) {
+ removeFolder(monitor, node, service);
+ }
+ }
+
+ /**
+ * Delete the folder node and its children using the file system service.
+ *
+ * @param monitor The monitor to report the progress.
+ * @param node The folder node to be deleted.
+ * @param service The file system service.
+ * @throws TCFFileSystemException The exception thrown during deleting.
+ * @throws InterruptedException Thrown when the operation is canceled.
+ */
+ private void removeFolder(IProgressMonitor monitor, final FSTreeNode node, IFileSystem service) throws TCFFileSystemException, InterruptedException {
+ List<FSTreeNode> children = new ArrayList<FSTreeNode>(getChildren(node, service));
+ if (!children.isEmpty()) {
+ for (FSTreeNode child : children) {
+ // Delete each child node.
+ remove(monitor, child, service);
+ }
+ }
+ if (monitor.isCanceled()) throw new InterruptedException();
+ monitor.subTask(NLS.bind(Messages.FSDelete_RemovingFileFolder, node.name));
+ removeFolder(service, node);
+ monitor.worked(1);
+ }
+
+ /**
+ * Delete the folder node using the file system service.
+ *
+ * @param monitor The monitor to report the progress.
+ * @param node The folder node to be deleted.
+ * @param service The file system service.
+ * @throws TCFFileSystemException The exception thrown during deleting.
+ * @throws InterruptedException Thrown when the operation is canceled.
+ */
+ private void removeFolder(IFileSystem service, final FSTreeNode node) throws TCFFileSystemException {
+ final TCFFileSystemException[] errors = new TCFFileSystemException[1];
+ String path = node.getLocation(true);
+ service.rmdir(path, new DoneRemove() {
+ @Override
+ public void doneRemove(IToken token, FileSystemException error) {
+ if (error == null) {
+ cleanUpFolder(node);
+ }
+ else {
+ String message = NLS.bind(Messages.FSDelete_CannotRemoveFolder, node.name, error);
+ errors[0] = new TCFFileSystemException(message, error);
+ }
+ }
+ });
+ if (errors[0] != null) {
+ throw errors[0];
+ }
+ }
+
+ /**
+ * Delete the file node using the file system service.
+ *
+ * @param monitor The monitor to report the progress.
+ * @param node The file node to be deleted.
+ * @param service The file system service.
+ * @throws TCFFileSystemException The exception thrown during deleting.
+ * @throws InterruptedException Thrown when the operation is canceled.
+ */
+ private void removeFile(IProgressMonitor monitor, final FSTreeNode node, IFileSystem service) throws TCFFileSystemException, InterruptedException {
+ if (monitor.isCanceled()) throw new InterruptedException();
+ monitor.subTask(NLS.bind(Messages.FSDelete_RemovingFileFolder, node.name));
+ // If the file is read only on windows or not writable on unix, then make it deletable.
+ if (node.isWindowsNode() && node.isReadOnly() || !node.isWindowsNode() && !node.isWritable()) {
+ if (!yes2All) {
+ int result = confirmDelete(node);
+ if (result == 1) {
+ yes2All = true;
+ }
+ else if (result == 2) {
+ monitor.worked(1);
+ return;
+ }
+ else if (result == 3) {
+ // Cancel the whole operation
+ monitor.setCanceled(true);
+ throw new InterruptedException();
+ }
+ }
+ final FSTreeNode clone = (FSTreeNode) node.clone();
+ if (node.isWindowsNode()) {
+ clone.setReadOnly(false);
+ }
+ else {
+ clone.setWritable(true);
+ }
+ // Make the file writable.
+ SafeRunner.run(new SafeRunnable() {
+ @Override
+ public void run() throws Exception {
+ StateManager.getInstance().setFileAttrs(node, clone.attr);
+ }
+ });
+ }
+ removeFile(node, service);
+ monitor.worked(1);
+ }
+
+ /**
+ * Confirm deleting the read only file.
+ *
+ * @param node The read only file node.
+ * @return The confirming result, 0-yes, 1-yes to all, 2-no, 3-cancel.
+ */
+ private int confirmDelete(final FSTreeNode node) {
+ final int[] results = new int[1];
+ Display display = PlatformUI.getWorkbench().getDisplay();
+ display.syncExec(new Runnable() {
+ @Override
+ public void run() {
+ Shell parent = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
+ String title = Messages.FSDelete_ConfirmDelete;
+ String message = NLS.bind(Messages.FSDelete_ConfirmMessage, node.name);
+ final Image titleImage = UIPlugin.getImage(ImageConsts.DELETE_READONLY_CONFIRM);
+ MessageDialog qDialog = new MessageDialog(parent, title, null, message, MessageDialog.QUESTION, new String[] { Messages.FSDelete_ButtonYes, Messages.FSDelete_ButtonYes2All, Messages.FSDelete_ButtonNo, Messages.FSDelete_ButtonCancel }, 0) {
+ @Override
+ public Image getQuestionImage() {
+ return titleImage;
+ }
+ };
+ results[0] = qDialog.open();
+ }
+ });
+ return results[0];
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSMove.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSMove.java
new file mode 100644
index 000000000..ddd483d27
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSMove.java
@@ -0,0 +1,207 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.operations;
+
+import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.services.IFileSystem;
+import org.eclipse.tcf.services.IFileSystem.DoneRename;
+import org.eclipse.tcf.services.IFileSystem.FileSystemException;
+import org.eclipse.tcf.te.tcf.core.Tcf;
+import org.eclipse.tcf.te.tcf.filesystem.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.filesystem.dialogs.TimeTriggeredProgressMonitorDialog;
+import org.eclipse.tcf.te.tcf.filesystem.internal.exceptions.TCFException;
+import org.eclipse.tcf.te.tcf.filesystem.internal.exceptions.TCFFileSystemException;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * FSMove moves specified tree nodes to a destination folder.
+ */
+public class FSMove extends FSOperation {
+ // The file/folder nodes to be moved.
+ List<FSTreeNode> nodes;
+ // The destination folder to be moved to.
+ FSTreeNode dest;
+
+ /**
+ * Create a move operation to move the specified nodes to the destination folder.
+ *
+ * @param nodes The nodes to be moved.
+ * @param dest the destination folder to move to.
+ */
+ public FSMove(List<FSTreeNode> nodes, FSTreeNode dest) {
+ this.nodes = getTopNodes(nodes);
+ this.dest = dest;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSOperation#doit()
+ */
+ @Override
+ public boolean doit() {
+ // Remove its self from the clipped nodes.
+ nodes.remove(dest);
+ if(nodes.isEmpty()) {
+ // Clear the clip board.
+ UIPlugin.getDefault().getClipboard().clear();
+ // Refresh the file system tree.
+ dest.firePropertyChange();
+ return true;
+ }
+ IRunnableWithProgress runnable = new IRunnableWithProgress() {
+ @Override
+ public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
+ FSTreeNode head = nodes.get(0);
+ IChannel channel = null;
+ try {
+ channel = openChannel(head.peerNode.getPeer());
+ if (channel != null) {
+ IFileSystem service = getBlockingFileSystem(channel);
+ if (service != null) {
+ monitor.beginTask(Messages.FSMove_PrepareToMove, IProgressMonitor.UNKNOWN);
+ monitor.worked(1);
+ monitor.beginTask(Messages.FSMove_MovingFile, nodes.size());
+ for (FSTreeNode node : nodes) {
+ // Move each node.
+ moveNode(monitor, service, node, dest);
+ }
+ }
+ else {
+ String message = NLS.bind(Messages.FSOperation_NoFileSystemError, head.peerNode.getPeerId());
+ throw new TCFFileSystemException(message);
+ }
+ }
+ }
+ catch (TCFException e) {
+ throw new InvocationTargetException(e);
+ }
+ finally {
+ // Clear the clip board.
+ UIPlugin.getDefault().getClipboard().clear();
+ if (channel != null) Tcf.getChannelManager().closeChannel(channel);
+ // Refresh the file system tree.
+ dest.firePropertyChange();
+ monitor.done();
+ }
+ }
+ };
+ Shell parent = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
+ TimeTriggeredProgressMonitorDialog dialog = new TimeTriggeredProgressMonitorDialog(parent, 250);
+ dialog.setCancelable(true);
+ try {
+ dialog.run(true, true, runnable);
+ }
+ catch (InvocationTargetException e) {
+ // Display the error reported during moving.
+ Throwable throwable = e.getTargetException() != null ? e.getTargetException() : e;
+ MessageDialog.openError(parent, Messages.FSMove_MoveFileFolderTitle, throwable.getLocalizedMessage());
+ }
+ catch (InterruptedException e) {
+ // It is canceled.
+ }
+ return true;
+ }
+
+ /**
+ * Move the file/folder to the destination folder using the specified file system service.
+ *
+ * @param monitor The monitor used to report the moving progress.
+ * @param service The file system service used to move the remote files.
+ * @param node The file/folder node to be moved.
+ * @param dest The destination folder.
+ * @throws TCFFileSystemException The exception thrown during moving.
+ * @throws InterruptedException Thrown when the operation is canceled.
+ */
+ void moveNode(IProgressMonitor monitor, IFileSystem service, final FSTreeNode node, FSTreeNode dest) throws TCFFileSystemException, InterruptedException {
+ if (monitor.isCanceled()) throw new InterruptedException();
+ monitor.subTask(NLS.bind(Messages.FSMove_Moving, node.name));
+ FSTreeNode copy = findChild(service, dest, node.name);
+ if (copy == null || !copy.equals(node) && confirmReplace(node)) {
+ if (copy != null && copy.isDirectory() && node.isDirectory()) {
+ List<FSTreeNode> children = new ArrayList<FSTreeNode>(getChildren(node, service));
+ for (FSTreeNode child : children) {
+ moveNode(monitor, service, child, copy);
+ }
+ removeFolder(node, service);
+ monitor.worked(1);
+ }
+ else if (copy != null && copy.isFile() && node.isDirectory()) {
+ String error = NLS.bind(Messages.FSMove_FileExistsError, copy.name);
+ throw new TCFFileSystemException(error);
+ }
+ else if (copy != null && copy.isDirectory() && node.isFile()) {
+ String error = NLS.bind(Messages.FSMove_FolderExistsError, copy.name);
+ throw new TCFFileSystemException(error);
+ }
+ else {
+ if (copy != null && copy.isFile() && node.isFile()) {
+ removeFile(copy, service);
+ }
+ else if (copy == null) {
+ copy = (FSTreeNode) node.clone();
+ }
+ addChild(service, dest, copy);
+ String dst_path = copy.getLocation(true);
+ String src_path = node.getLocation(true);
+ final FSTreeNode copyNode = copy;
+ final TCFFileSystemException[] errors = new TCFFileSystemException[1];
+ service.rename(src_path, dst_path, new DoneRename() {
+ @Override
+ public void doneRename(IToken token, FileSystemException error) {
+ if (error != null) {
+ String message = NLS.bind(Messages.FSMove_CannotMove, node.name, error);
+ errors[0] = new TCFFileSystemException(message, error);
+ }
+ else {
+ cleanUpNode(node, copyNode);
+ }
+ }
+ });
+ if (errors[0] != null) {
+ removeChild(service, dest, copy);
+ throw errors[0];
+ }
+ monitor.worked(1);
+ }
+ }
+ }
+
+ /**
+ * Clean up the node after successful moving.
+ *
+ * @param node The node being moved.
+ * @param copyNode The target node that is moved to.
+ */
+ void cleanUpNode(FSTreeNode node, FSTreeNode copyNode) {
+ if (node.isFile()) {
+ super.cleanUpFile(node);
+ }
+ else if (node.isDirectory()) {
+ super.cleanUpFolder(node);
+ List<FSTreeNode> children = new ArrayList<FSTreeNode>(getCurrentChildren(node));
+ getCurrentChildren(copyNode).addAll(children);
+ for (FSTreeNode child : children) {
+ child.parent = copyNode;
+ }
+ }
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSOperation.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSOperation.java
new file mode 100644
index 000000000..f57df102e
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSOperation.java
@@ -0,0 +1,680 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.operations;
+
+import java.io.File;
+import java.net.ConnectException;
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.SafeRunner;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.util.SafeRunnable;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.services.IFileSystem;
+import org.eclipse.tcf.services.IFileSystem.DirEntry;
+import org.eclipse.tcf.services.IFileSystem.DoneMkDir;
+import org.eclipse.tcf.services.IFileSystem.DoneOpen;
+import org.eclipse.tcf.services.IFileSystem.DoneReadDir;
+import org.eclipse.tcf.services.IFileSystem.DoneRemove;
+import org.eclipse.tcf.services.IFileSystem.FileSystemException;
+import org.eclipse.tcf.services.IFileSystem.IFileHandle;
+import org.eclipse.tcf.te.tcf.core.Tcf;
+import org.eclipse.tcf.te.tcf.core.concurrent.BlockingCallProxy;
+import org.eclipse.tcf.te.tcf.core.interfaces.IChannelManager;
+import org.eclipse.tcf.te.tcf.core.interfaces.IChannelManager.DoneOpenChannel;
+import org.eclipse.tcf.te.tcf.filesystem.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.filesystem.internal.ImageConsts;
+import org.eclipse.tcf.te.tcf.filesystem.internal.exceptions.TCFChannelException;
+import org.eclipse.tcf.te.tcf.filesystem.internal.exceptions.TCFException;
+import org.eclipse.tcf.te.tcf.filesystem.internal.exceptions.TCFFileSystemException;
+import org.eclipse.tcf.te.tcf.filesystem.internal.utils.CacheManager;
+import org.eclipse.tcf.te.tcf.filesystem.internal.utils.PersistenceManager;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IEditorReference;
+import org.eclipse.ui.IURIEditorInput;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * FSOperation is the base class of file system operation classes including FSCopy, FSDelete, FSMove
+ * and FSRename.
+ */
+public class FSOperation {
+ // The flag indicating if the following action should be executed without asking.
+ protected boolean yes2All;
+
+ /**
+ * Create an instance.
+ */
+ public FSOperation() {
+ this.yes2All = false;
+ }
+
+ /**
+ * Get the top most nodes of the specified node list, removing those nodes whose ancestors are
+ * one of the other nodes in the list. This method is used to remove those children or grand
+ * children of the nodes that are cut, copied, moved or deleted.
+ *
+ * @param nodes The original node list.
+ * @return The top most nodes.
+ */
+ protected List<FSTreeNode> getTopNodes(List<FSTreeNode> nodes) {
+ List<FSTreeNode> result = new ArrayList<FSTreeNode>();
+ for (FSTreeNode node : nodes) {
+ if (!hasAncestor(node, nodes)) {
+ result.add(node);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * If the target node has ancestor in the specified node list.
+ *
+ * @param target The node to be tested.
+ * @param nodes The node list to search in.
+ * @return true if the target node has an ancestor in the node list.
+ */
+ private boolean hasAncestor(FSTreeNode target, List<FSTreeNode> nodes) {
+ for (FSTreeNode node : nodes) {
+ if (node.isAncestorOf(target)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Clean up the folder node after moving, deleting or copying.
+ *
+ * @param node the folder node that is to be cleaned.
+ */
+ protected void cleanUpFolder(FSTreeNode node) {
+ File file = CacheManager.getInstance().getCacheFile(node);
+ if (file.exists()) {
+ file.delete();
+ }
+ FSTreeNode parent = node.parent;
+ if (parent != null) {
+ getCurrentChildren(parent).remove(node);
+ }
+ }
+
+ /**
+ * Close the editor that opens the specified file.
+ * <p>
+ * <b>Note:</b> The method must be called within the UI thread.
+ *
+ * @param file The file that is opened.
+ */
+ protected void closeEditor(final File file) {
+ Assert.isNotNull(Display.findDisplay(Thread.currentThread()));
+ final IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+ IEditorReference[] refs = page.getEditorReferences();
+ for (IEditorReference ref : refs) {
+ final IEditorReference editorRef = ref;
+ SafeRunner.run(new SafeRunnable() {
+ @Override
+ public void run() throws Exception {
+ IEditorInput input = editorRef.getEditorInput();
+ if (input instanceof IURIEditorInput) {
+ IURIEditorInput editorInput = (IURIEditorInput) input;
+ URI uri = editorInput.getURI();
+ if (file.toURI().equals(uri)) {
+ IEditorPart editor = editorRef.getEditor(true);
+ page.closeEditor(editor, false);
+ }
+ }
+ }
+ });
+ }
+ }
+
+ /**
+ * Clean up the file node after moving, deleting or copying.
+ *
+ * @param node the file node that is to be cleaned.
+ */
+ protected void cleanUpFile(FSTreeNode node) {
+ final File file = CacheManager.getInstance().getCacheFile(node);
+ if (file.exists()) {
+ Display display = PlatformUI.getWorkbench().getDisplay();
+ display.asyncExec(new Runnable(){
+ @Override
+ public void run() {
+ closeEditor(file);
+ }
+ });
+ file.delete();
+ }
+ PersistenceManager.getInstance().removeBaseTimestamp(node.getLocationURL());
+ FSTreeNode parent = node.parent;
+ if (parent != null) {
+ getCurrentChildren(parent).remove(node);
+ }
+ }
+
+ /**
+ * Open a channel connected to the target represented by the peer.
+ *
+ * @return The channel or null if the operation fails.
+ */
+ public static IChannel openChannel(final IPeer peer) throws TCFChannelException {
+ IChannelManager channelManager = Tcf.getChannelManager();
+ channelManager = BlockingCallProxy.newInstance(IChannelManager.class, channelManager);
+ final TCFChannelException[] errors = new TCFChannelException[1];
+ final IChannel[] channels = new IChannel[1];
+ channelManager.openChannel(peer, false, new DoneOpenChannel() {
+ @Override
+ public void doneOpenChannel(Throwable error, IChannel channel) {
+ if (error != null) {
+ if (error instanceof ConnectException) {
+ String message = NLS.bind(Messages.FSOperation_NotResponding, peer.getID());
+ errors[0] = new TCFChannelException(message);
+ }
+ else {
+ String message = NLS.bind(Messages.OpeningChannelFailureMessage, peer.getID(), error.getLocalizedMessage());
+ errors[0] = new TCFChannelException(message, error);
+ }
+ }
+ else {
+ channels[0] = channel;
+ }
+ }
+ });
+ if (errors[0] != null) {
+ throw errors[0];
+ }
+ return channels[0];
+ }
+
+ /**
+ * Get a blocking file system service from the channel. The
+ * returned file system service is a service that delegates the
+ * method call to the file system proxy. If the method returns
+ * asynchronously with a callback, it will block the call until
+ * the callback returns.
+ * <p>
+ * <em>Note: All the method of the returned file system
+ * service must be called outside of the dispatching thread.</em>
+ *
+ * @param channel The channel to get the file system service.
+ * @return The blocking file system service.
+ */
+ public static IFileSystem getBlockingFileSystem(final IChannel channel) {
+ if(Protocol.isDispatchThread()) {
+ IFileSystem service = channel.getRemoteService(IFileSystem.class);
+ return BlockingCallProxy.newInstance(IFileSystem.class, service);
+ }
+ final IFileSystem[] service = new IFileSystem[1];
+ Protocol.invokeAndWait(new Runnable(){
+ @Override
+ public void run() {
+ service[0] = getBlockingFileSystem(channel);
+ }});
+ return service[0];
+ }
+
+ /**
+ * Count the total nodes in the node list including their children and grand children
+ * recursively.
+ *
+ * @param service The file system service used to open those folders that are not expanded yet.
+ * @param nodes The node list to be counted.
+ * @return The count of the total nodes.
+ * @throws TCFFileSystemException Thrown when expanding the unexpanded folders.
+ */
+ protected int count(IFileSystem service, List<FSTreeNode> nodes) throws TCFFileSystemException {
+ int count = 0;
+ for (FSTreeNode node : nodes) {
+ if (node.isFile()) {
+ count++;
+ }
+ else if (node.isDirectory()) {
+ List<FSTreeNode> children = new ArrayList<FSTreeNode>(getChildren(node, service));
+ count += count(service, children) + 1;
+ }
+ }
+ return count;
+ }
+
+ /**
+ * Get the children of the specified folder node. If the folder node is not expanded, then
+ * expanded using the specified file system service.
+ *
+ * @param node The folder node.
+ * @param service The file system service.
+ * @return The children of the folder node.
+ * @throws TCFFileSystemException Thrown during querying the children nodes.
+ */
+ public List<FSTreeNode> getChildren(final FSTreeNode node, final IFileSystem service) throws TCFFileSystemException {
+ if (node.childrenQueried) {
+ return getCurrentChildren(node);
+ }
+ loadChildren(node, service);
+ return getChildren(node, service);
+ }
+
+ /**
+ * Get the children the specified folder node. If the folder has not yet been loaded, then load it.
+ *
+ * @param node The folder node.
+ * @return The children of the folder node.
+ * @throws TCFException Thrown during querying the children nodes.
+ */
+ public List<FSTreeNode> getChildren(final FSTreeNode node) throws TCFException {
+ IChannel channel = null;
+ try {
+ channel = openChannel(node.peerNode.getPeer());
+ IFileSystem service = getBlockingFileSystem(channel);
+ if (service != null) {
+ return getChildren(node, service);
+ }
+ String message = NLS.bind(Messages.FSOperation_NoFileSystemError, node.peerNode.getPeerId());
+ throw new TCFFileSystemException(message);
+ }
+ finally {
+ if (channel != null) Tcf.getChannelManager().closeChannel(channel);
+ }
+ }
+
+ /**
+ * Get the current children of the specified folder node.
+ *
+ * @param node The folder node.
+ * @return The children of the folder node.
+ */
+ public static List<FSTreeNode> getCurrentChildren(final FSTreeNode node) {
+ if (Protocol.isDispatchThread()) {
+ return node.getChildren();
+ }
+ final List<List<FSTreeNode>> result = new ArrayList<List<FSTreeNode>>();
+ Protocol.invokeAndWait(new Runnable() {
+ @Override
+ public void run() {
+ result.add(getCurrentChildren(node));
+ }
+ });
+ return result.get(0);
+ }
+
+
+ /**
+ * Load the children of the specified folder node using the file system service.
+ *
+ * @param node The folder node.
+ * @param service The file system service.
+ * @throws TCFFileSystemException Thrown during querying the children nodes.
+ */
+ protected void loadChildren(final FSTreeNode node, final IFileSystem service) throws TCFFileSystemException {
+ List<FSTreeNode> children = queryChildren(node, service);
+ List<FSTreeNode> current = getCurrentChildren(node);
+ for (FSTreeNode childNode : children) {
+ childNode.parent = node;
+ childNode.peerNode = node.peerNode;
+ current.add(childNode);
+ }
+ node.childrenQueried = true;
+ }
+
+ /**
+ * Query the children of the specified node using the file system service.
+ *
+ * @param node The folder node.
+ * @param service The file system service.
+ * @return The children of the folder node.
+ * @throws TCFFileSystemException Thrown during querying the children nodes.
+ */
+ protected List<FSTreeNode> queryChildren(final FSTreeNode node, final IFileSystem service) throws TCFFileSystemException {
+ final TCFFileSystemException[] errors = new TCFFileSystemException[1];
+ final IFileHandle[] handles = new IFileHandle[1];
+ try {
+ String dir = node.getLocation(true);
+ service.opendir(dir, new DoneOpen() {
+ @Override
+ public void doneOpen(IToken token, FileSystemException error, IFileHandle handle) {
+ if (error != null) {
+ String message = NLS.bind(Messages.FSOperation_CannotOpenDir, node.name, error);
+ errors[0] = new TCFFileSystemException(message, error);
+ }
+ else {
+ handles[0] = handle;
+ }
+ }
+ });
+ if (errors[0] != null) {
+ throw errors[0];
+ }
+ errors[0] = null;
+ final List<FSTreeNode> children = new ArrayList<FSTreeNode>();
+ final boolean[] eofs = new boolean[1];
+ while (!eofs[0]) {
+ service.readdir(handles[0], new DoneReadDir() {
+ @Override
+ public void doneReadDir(IToken token, FileSystemException error, DirEntry[] entries, boolean eof) {
+ if (eof) {
+ eofs[0] = true;
+ }
+ if (error == null) {
+ if (entries != null && entries.length > 0) {
+ for (DirEntry entry : entries) {
+ FSTreeNode childNode = createNodeFromDirEntry(entry, false);
+ if (childNode != null) {
+ children.add(childNode);
+ }
+ }
+ }
+ }
+ else {
+ String message = NLS.bind(Messages.FSOperation_CannotReadDir, node.name, error);
+ errors[0] = new TCFFileSystemException(message, error);
+ }
+ }
+ });
+ if (errors[0] != null) throw errors[0];
+ }
+ return children;
+ }
+ finally {
+ if (handles[0] != null) {
+ service.close(handles[0], new IFileSystem.DoneClose() {
+ @Override
+ public void doneClose(IToken token, FileSystemException error) {
+ }
+ });
+ }
+ }
+ }
+
+ /**
+ * Remove the child from the children list of the specified folder. If the folder has not yet
+ * expanded, then expand it.
+ *
+ * @param service The file system service.
+ * @param folder The folder node from which the node is going to be removed.
+ * @param child The child node to be removed.
+ * @throws TCFFileSystemException Thrown during children querying.
+ */
+ protected void removeChild(final IFileSystem service, final FSTreeNode folder, final FSTreeNode child) throws TCFFileSystemException {
+ if (Protocol.isDispatchThread()) {
+ getChildren(folder, service).remove(child);
+ child.parent = null;
+ }
+ else {
+ final TCFFileSystemException[] errors = new TCFFileSystemException[1];
+ Protocol.invokeAndWait(new Runnable() {
+
+ @Override
+ public void run() {
+ try {
+ removeChild(service, folder, child);
+ }
+ catch (TCFFileSystemException e) {
+ errors[0] = e;
+ }
+ }
+ });
+ if (errors[0] != null) throw errors[0];
+ }
+ }
+
+ /**
+ * Find the node with the name from the children list of the folder.
+ *
+ * @param service The file system service.
+ * @param folder The folder node.
+ * @param name The target node's name.
+ * @return The node with the specified name or null if no such node is found.
+ * @throws TCFFileSystemException Thrown when querying the children.
+ */
+ protected FSTreeNode findChild(IFileSystem service, FSTreeNode folder, String name) throws TCFFileSystemException {
+ List<FSTreeNode> children = new ArrayList<FSTreeNode>(getChildren(folder, service));
+ for (FSTreeNode child : children) {
+ if (child.name.equals(name)) return child;
+ }
+ return null;
+ }
+
+ /**
+ * Create the name for the target file that is copied. If there exists a file with the same
+ * name, then "Copy of xxxx" and "Copy (n) of xxxx" will be used as the target file name.
+ *
+ * @param service File system service used to query the children nodes of the folder.
+ * @param node The node whose target file is to be created.
+ * @param dest The destination folder.
+ * @return The new target node with the new name following the rule.
+ * @throws TCFFileSystemException Thrown during children querying.
+ */
+ protected FSTreeNode createCopyDestination(IFileSystem service, FSTreeNode node, FSTreeNode dest) throws TCFFileSystemException {
+ FSTreeNode copy = (FSTreeNode) node.clone();
+ String name = node.name;
+ FSTreeNode possibleChild = findChild(service, dest, name);
+ for (int n = 0; possibleChild != null; n++) {
+ if (n > 0) {
+ name = NLS.bind(Messages.FSOperation_CopyNOfFile, Integer.valueOf(n), node.name);
+ }
+ else {
+ name = NLS.bind(Messages.FSOperation_CopyOfFile, node.name);
+ }
+ possibleChild = findChild(service, dest, name);
+ }
+ copy.name = name;
+ addChild(service, dest, copy);
+ return copy;
+ }
+
+ /**
+ * Make a new directory with for the new node.
+ *
+ * @param service The file system service.
+ * @param node The directory node to be made.
+ * @throws TCFFileSystemException Thrown during children querying.
+ */
+ protected void mkdir(IFileSystem service, final FSTreeNode node) throws TCFFileSystemException {
+ final TCFFileSystemException[] errors = new TCFFileSystemException[1];
+ String path = node.getLocation(true);
+ service.mkdir(path, node.attr, new DoneMkDir() {
+ @Override
+ public void doneMkDir(IToken token, FileSystemException error) {
+ if (error != null) {
+ String message = NLS
+ .bind(Messages.FSOperation_CannotCreateDirectory, new Object[] { node.name, error });
+ errors[0] = new TCFFileSystemException(message, error);
+ }
+ }
+ });
+ if (errors[0] != null) {
+ throw errors[0];
+ }
+ }
+
+ /**
+ * Confirm if the file/folder represented by the specified should be replaced.
+ *
+ * @param node The file/folder node.
+ * @return The confirming result. true yes, false no.
+ * @throws InterruptedException Thrown when canceled.
+ */
+ protected boolean confirmReplace(final FSTreeNode node) throws InterruptedException {
+ if (yes2All) return true;
+ final int[] results = new int[1];
+ Display display = PlatformUI.getWorkbench().getDisplay();
+ display.syncExec(new Runnable() {
+ @Override
+ public void run() {
+ Shell parent = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
+ String title = node.isDirectory() ? Messages.FSOperation_ConfirmFolderReplaceTitle : Messages.FSOperation_ConfirmFileReplace;
+ String message = NLS.bind(node.isDirectory() ? Messages.FSOperation_ConfirmFolderReplaceMessage : Messages.FSOperation_ConfirmFileReplaceMessage, node.name);
+ final Image titleImage = UIPlugin.getImage(ImageConsts.REPLACE_FOLDER_CONFIRM);
+ MessageDialog qDialog = new MessageDialog(parent, title, null, message, MessageDialog.QUESTION, new String[] { Messages.FSOperation_ConfirmDialogYes, Messages.FSOperation_ConfirmDialogYesToAll, Messages.FSOperation_ConfirmDialogNo, Messages.FSOperation_ConfirmDialogCancel }, 0) {
+ @Override
+ public Image getQuestionImage() {
+ return titleImage;
+ }
+ };
+ results[0] = qDialog.open();
+ }
+ });
+ switch (results[0]) {
+ case 0:
+ return true;
+ case 1:
+ yes2All = true;
+ return true;
+ case 2:
+ return false;
+ }
+ throw new InterruptedException();
+ }
+
+ /**
+ * Add the specified child to the folder node's children list.
+ *
+ * @param service The file system service.
+ * @param folder The folder node.
+ * @param child The child node to be added.
+ * @throws TCFFileSystemException Thrown during children querying.
+ */
+ protected void addChild(final IFileSystem service, final FSTreeNode folder, final FSTreeNode child) throws TCFFileSystemException {
+ if (Protocol.isDispatchThread()) {
+ getChildren(folder, service).add(child);
+ child.parent = folder;
+ }
+ else {
+ final TCFFileSystemException[] errors = new TCFFileSystemException[1];
+ Protocol.invokeAndWait(new Runnable() {
+
+ @Override
+ public void run() {
+ try {
+ addChild(service, folder, child);
+ }
+ catch (TCFFileSystemException e) {
+ errors[0] = e;
+ }
+ }
+ });
+ if (errors[0] != null) throw errors[0];
+ }
+ }
+
+ /**
+ * Create an directory entry using the specified DirEntry which contains the directory
+ * information.
+ *
+ * @param entry The directory entry node.
+ * @param entryIsRootNode If it is root node.
+ * @return An FSTreeNode representing the folder.
+ */
+ FSTreeNode createNodeFromDirEntry(DirEntry entry, boolean entryIsRootNode) {
+ Assert.isNotNull(entry);
+
+ FSTreeNode node = null;
+
+ IFileSystem.FileAttrs attrs = entry.attrs;
+
+ if (attrs == null || attrs.isDirectory()) {
+ node = new FSTreeNode();
+ node.childrenQueried = false;
+ node.childrenQueryRunning = false;
+ node.attr = attrs;
+ node.name = entry.filename;
+ node.type = entryIsRootNode ? "FSRootDirNode" : "FSDirNode"; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ else if (attrs.isFile()) {
+ node = new FSTreeNode();
+ node.childrenQueried = false;
+ node.childrenQueryRunning = false;
+ node.attr = attrs;
+ node.name = entry.filename;
+ node.type = "FSFileNode"; //$NON-NLS-1$
+ }
+
+ return node;
+ }
+
+ /**
+ * Remove the file.
+ *
+ * @param node
+ * @param service
+ * @throws TCFFileSystemException
+ */
+ protected void removeFile(final FSTreeNode node, IFileSystem service) throws TCFFileSystemException {
+ // Do the actual deleting.
+ String path = node.getLocation(true);
+ final TCFFileSystemException[] errors = new TCFFileSystemException[1];
+ service.remove(path, new DoneRemove() {
+ @Override
+ public void doneRemove(IToken token, FileSystemException error) {
+ if (error == null) {
+ cleanUpFile(node);
+ }
+ else {
+ String message = NLS.bind(Messages.FSDelete_CannotRemoveFile, node.name, error);
+ errors[0] = new TCFFileSystemException(message, error);
+ }
+ }
+ });
+ if (errors[0] != null) {
+ throw errors[0];
+ }
+ }
+
+ /**
+ * Remove the folder.
+ *
+ * @param node
+ * @param service
+ * @throws TCFFileSystemException
+ */
+ protected void removeFolder(final FSTreeNode node, IFileSystem service) throws TCFFileSystemException {
+ // Do the actual deleting.
+ String path = node.getLocation(true);
+ final TCFFileSystemException[] errors = new TCFFileSystemException[1];
+ service.rmdir(path, new DoneRemove() {
+ @Override
+ public void doneRemove(IToken token, FileSystemException error) {
+ if (error == null) {
+ cleanUpFolder(node);
+ }
+ else {
+ String message = NLS.bind(Messages.FSDelete_CannotRemoveFile, node.name, error);
+ errors[0] = new TCFFileSystemException(message, error);
+ }
+ }
+ });
+ if (errors[0] != null) {
+ throw errors[0];
+ }
+ }
+
+ /**
+ * Do the actual operation.
+ *
+ * @return true if it is successful.
+ */
+ public boolean doit(){
+ return false;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSRefresh.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSRefresh.java
new file mode 100644
index 000000000..8e2368f81
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSRefresh.java
@@ -0,0 +1,144 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.operations;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.services.IFileSystem;
+import org.eclipse.tcf.te.tcf.core.Tcf;
+import org.eclipse.tcf.te.tcf.filesystem.internal.exceptions.TCFException;
+import org.eclipse.tcf.te.tcf.filesystem.internal.exceptions.TCFFileSystemException;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * FSRefresh refreshes a specified tree node and its children and grand children recursively.
+ */
+public class FSRefresh extends FSOperation {
+ /**
+ * The root node to be refreshed.
+ */
+ private FSTreeNode node;
+
+ /**
+ * Create an FSRefresh to refresh the specified node and its descendants.
+ *
+ * @param node The root node to be refreshed.
+ */
+ public FSRefresh(FSTreeNode node) {
+ this.node = node;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSOperation#doit()
+ */
+ @Override
+ public boolean doit() {
+ if (node.childrenQueried) {
+ IChannel channel = null;
+ try {
+ channel = openChannel(node.peerNode.getPeer());
+ if (channel != null) {
+ IFileSystem service = getBlockingFileSystem(channel);
+ if (service != null) {
+ refresh(node, service);
+ }
+ else {
+ String message = NLS.bind(Messages.FSOperation_NoFileSystemError, node.peerNode.getPeerId());
+ throw new TCFFileSystemException(message);
+ }
+ }
+ }
+ catch (TCFException e) {
+ // Display the error reported during moving.
+ Shell parent = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
+ MessageDialog.openError(parent, Messages.FSMove_MoveFileFolderTitle, e.getLocalizedMessage());
+ return false;
+ }
+ finally {
+ if (channel != null) Tcf.getChannelManager().closeChannel(channel);
+ // Refresh the file system tree.
+ node.firePropertyChange();
+ }
+ }
+ return true;
+ }
+
+ /**
+ * Refresh the specified node and its children recursively using the file system service.
+ *
+ * @param node The node to be refreshed.
+ * @param service The file system service.
+ * @throws TCFFileSystemException Thrown during refreshing.
+ */
+ private void refresh(final FSTreeNode node, final IFileSystem service) throws TCFFileSystemException {
+ if ((node.isSystemRoot() || node.isDirectory()) && node.childrenQueried) {
+ if (!node.isSystemRoot()) updateChildren(node, service);
+ List<FSTreeNode> children = new ArrayList<FSTreeNode>(getCurrentChildren(node));
+ for (FSTreeNode child : children) {
+ refresh(child, service);
+ }
+ }
+ }
+
+
+ /**
+ * Update the children of the specified folder node using the file system service.
+ *
+ * @param node The folder node.
+ * @param service The file system service.
+ * @throws TCFFileSystemException Thrown during querying the children nodes.
+ */
+ protected void updateChildren(final FSTreeNode node, final IFileSystem service) throws TCFFileSystemException {
+ List<FSTreeNode> current = getCurrentChildren(node);
+ List<FSTreeNode> latest = queryChildren(node, service);
+ List<FSTreeNode> newNodes = diff(latest, new ArrayList<FSTreeNode>(current));
+ List<FSTreeNode> deleted = diff(new ArrayList<FSTreeNode>(current), latest);
+ for (FSTreeNode aNode : deleted) {
+ current.remove(aNode);
+ }
+ for (FSTreeNode aNode : newNodes) {
+ aNode.parent = node;
+ aNode.peerNode = node.peerNode;
+ current.add(aNode);
+ }
+ }
+
+ /**
+ * Find those nodes which are in aList yet not in bList and return them as a list.
+ *
+ * @param aList
+ * @param bList
+ * @return the difference list.
+ */
+ private List<FSTreeNode> diff(List<FSTreeNode> aList, List<FSTreeNode> bList) {
+ List<FSTreeNode> newList = new ArrayList<FSTreeNode>();
+ for (FSTreeNode aNode : aList) {
+ boolean found = false;
+ for (FSTreeNode bNode : bList) {
+ if (aNode.name.equals(bNode.name)) {
+ found = true;
+ break;
+ }
+ }
+ if (!found) {
+ newList.add(aNode);
+ }
+ }
+ return newList;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSRename.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSRename.java
new file mode 100644
index 000000000..6cbf2629a
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSRename.java
@@ -0,0 +1,128 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.operations;
+
+import java.io.File;
+
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.services.IFileSystem;
+import org.eclipse.tcf.services.IFileSystem.DoneRename;
+import org.eclipse.tcf.services.IFileSystem.FileSystemException;
+import org.eclipse.tcf.te.tcf.core.Tcf;
+import org.eclipse.tcf.te.tcf.filesystem.internal.exceptions.TCFException;
+import org.eclipse.tcf.te.tcf.filesystem.internal.exceptions.TCFFileSystemException;
+import org.eclipse.tcf.te.tcf.filesystem.internal.utils.CacheManager;
+import org.eclipse.tcf.te.tcf.filesystem.internal.utils.PersistenceManager;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+import org.eclipse.ui.PlatformUI;
+/**
+ * FSRename renames the specified file/folder to a
+ * new name.
+ *
+ */
+public class FSRename extends FSOperation {
+ // The file/folder node to be renamed.
+ FSTreeNode node;
+ // The new name the file/folder is renamed to.
+ String newName;
+
+ /**
+ * Create a rename operation that renames the node with the new name.
+ *
+ * @param node The file/folder node to be renamed.
+ * @param newName The new name of this node.
+ */
+ public FSRename(FSTreeNode node, String newName) {
+ this.node = node;
+ this.newName = newName;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSOperation#doit()
+ */
+ @Override
+ public boolean doit() {
+ IChannel channel = null;
+ try {
+ channel = openChannel(node.peerNode.getPeer());
+ if (channel != null) {
+ IFileSystem service = getBlockingFileSystem(channel);
+ if (service != null) {
+ renameNode(service);
+ }
+ else {
+ String message = NLS.bind(Messages.FSOperation_NoFileSystemError, node.peerNode.getPeerId());
+ throw new TCFFileSystemException(message);
+ }
+ return true;
+ }
+ }
+ catch (TCFException e) {
+ Shell parent = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
+ MessageDialog.openError(parent, Messages.FSRename_RenameFileFolderTitle, e.getLocalizedMessage());
+ }
+ finally {
+ if (channel != null) Tcf.getChannelManager().closeChannel(channel);
+ node.firePropertyChange();
+ }
+ return false;
+ }
+
+ /**
+ * Rename the node using the new name.
+ *
+ * @param service File system service used to rename.
+ * @throws TCFFileSystemException The exception thrown during renaming.
+ */
+ private void renameNode(IFileSystem service) throws TCFFileSystemException {
+ String src_path = node.getLocation(true);
+ String oldName = node.name;
+ node.name = newName;
+ String dst_path = node.getLocation(true);
+ node.name = oldName;
+ final TCFFileSystemException[] errors = new TCFFileSystemException[1];
+ service.rename(src_path, dst_path, new DoneRename() {
+ @Override
+ public void doneRename(IToken token, FileSystemException error) {
+ if (error != null) {
+ String message = NLS.bind(Messages.FSRename_CannotRename, node.name, error);
+ errors[0] = new TCFFileSystemException(message, error);
+ }
+ else {
+ final File file = CacheManager.getInstance().getCacheFile(node);
+ if (file.exists()) {
+ if (node.isFile()) {
+ Display display = PlatformUI.getWorkbench().getDisplay();
+ display.asyncExec(new Runnable(){
+ @Override
+ public void run() {
+ closeEditor(file);
+ }
+ });
+ PersistenceManager.getInstance().removeBaseTimestamp(node.getLocationURL());
+ }
+ file.delete();
+ }
+ node.name = newName;
+ }
+ }
+ });
+ if (errors[0] != null) {
+ throw errors[0];
+ }
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/preferences/PreferencesInitializer.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/preferences/PreferencesInitializer.java
index 134750f39..34bb90483 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/preferences/PreferencesInitializer.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/preferences/PreferencesInitializer.java
@@ -7,14 +7,17 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.filesystem.internal.preferences;
+package org.eclipse.tcf.te.tcf.filesystem.internal.preferences;
import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
import org.eclipse.core.runtime.preferences.DefaultScope;
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.tm.te.tcf.filesystem.activator.UIPlugin;
-import org.eclipse.tm.te.tcf.filesystem.interfaces.preferences.IPreferenceKeys;
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.tcf.te.tcf.filesystem.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.filesystem.interfaces.preferences.IPreferenceKeys;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSModel;
/**
@@ -42,5 +45,16 @@ public class PreferencesInitializer extends AbstractPreferenceInitializer {
}
IPreferenceStore preferenceStore = UIPlugin.getDefault().getPreferenceStore();
preferenceStore.setDefault(TargetExplorerPreferencePage.PREF_AUTOSAVING, TargetExplorerPreferencePage.DEFAULT_AUTOSAVING);
+ preferenceStore.setDefault(TargetExplorerPreferencePage.PREF_RENAMING_IN_PLACE_EDITOR, TargetExplorerPreferencePage.DEFAULT_RENAMING_IN_PLACE_EDITOR);
+ preferenceStore.setDefault(TargetExplorerPreferencePage.PREF_COPY_PERMISSION, TargetExplorerPreferencePage.DEFAULT_COPY_PERMISSION);
+ preferenceStore.setDefault(TargetExplorerPreferencePage.PREF_COPY_OWNERSHIP, TargetExplorerPreferencePage.DEFAULT_COPY_OWNERSHIP);
+ preferenceStore.addPropertyChangeListener(new IPropertyChangeListener(){
+ @Override
+ public void propertyChange(PropertyChangeEvent event) {
+ if (event.getProperty().equals(TargetExplorerPreferencePage.PREF_AUTOSAVING)) {
+ // Refresh the tree nodes' decorations.
+ FSModel.notifyAllChanged();
+ }
+ }});
}
}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/preferences/TargetExplorerPreferencePage.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/preferences/TargetExplorerPreferencePage.java
index a00d965f3..e6ca0bfb3 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/preferences/TargetExplorerPreferencePage.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/preferences/TargetExplorerPreferencePage.java
@@ -8,12 +8,13 @@
* Wind River Systems - initial API and implementation
* William Chen (Wind River)- [345552] Edit the remote files with a proper editor
*******************************************************************************/
-package org.eclipse.tm.te.tcf.filesystem.internal.preferences;
+package org.eclipse.tcf.te.tcf.filesystem.internal.preferences;
import org.eclipse.jface.preference.BooleanFieldEditor;
import org.eclipse.jface.preference.FieldEditorPreferencePage;
import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.tm.te.tcf.filesystem.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.filesystem.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
@@ -27,9 +28,18 @@ public class TargetExplorerPreferencePage extends FieldEditorPreferencePage impl
public static final String PREF_AUTOSAVING = "PrefAutoSaving"; //$NON-NLS-1$
// The default value of the option of auto saving.
public static final boolean DEFAULT_AUTOSAVING = true;
-
- // The editor to edit the value of auto saving.
- protected BooleanFieldEditor fAutoSaving;
+ // The preference key to access the option using in-place editor during renaming.
+ public static final String PREF_RENAMING_IN_PLACE_EDITOR = "PrefRenamingInPlaceEditor"; //$NON-NLS-1$
+ // The default value of the option using in-place editor during renaming.
+ public static final boolean DEFAULT_RENAMING_IN_PLACE_EDITOR = true;
+ // The preference key to access the option of copy permission when copying files.
+ public static final String PREF_COPY_PERMISSION = "PrefCopyPermission"; //$NON-NLS-1$
+ // The default value of the option of copy permission.
+ public static final boolean DEFAULT_COPY_PERMISSION = true;
+ // The preference key to access the option of copy ownership when copying files.
+ public static final String PREF_COPY_OWNERSHIP = "PrefCopyOwnership"; //$NON-NLS-1$
+ // The default value of the option of copy ownership
+ public static final boolean DEFAULT_COPY_OWNERSHIP = true;
/***
* Create a preference page for Target Explorer File System Explorer.
@@ -46,9 +56,14 @@ public class TargetExplorerPreferencePage extends FieldEditorPreferencePage impl
UIPlugin plugin = UIPlugin.getDefault();
IPreferenceStore preferenceStore = plugin.getPreferenceStore();
setPreferenceStore(preferenceStore);
- fAutoSaving = new BooleanFieldEditor(PREF_AUTOSAVING, "Automatically upload files to targets upon saving.", //$NON-NLS-1$
- getFieldEditorParent());
- addField(fAutoSaving);
+ BooleanFieldEditor autoSaving = new BooleanFieldEditor(PREF_AUTOSAVING, Messages.TargetExplorerPreferencePage_AutoSavingText, getFieldEditorParent());
+ addField(autoSaving);
+ BooleanFieldEditor renamingOption = new BooleanFieldEditor(PREF_RENAMING_IN_PLACE_EDITOR, Messages.TargetExplorerPreferencePage_RenamingOptionText, getFieldEditorParent());
+ addField(renamingOption);
+ BooleanFieldEditor copyPermission = new BooleanFieldEditor(PREF_COPY_PERMISSION, Messages.TargetExplorerPreferencePage_CopyPermissionText, getFieldEditorParent());
+ addField(copyPermission);
+ BooleanFieldEditor copyOwnership = new BooleanFieldEditor(PREF_COPY_OWNERSHIP, Messages.TargetExplorerPreferencePage_CopyOwnershipText, getFieldEditorParent());
+ addField(copyOwnership);
}
/* (non-Javadoc)
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/properties/AdvancedAttributesDialog.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/properties/AdvancedAttributesDialog.java
index 86e09fcd9..f1c4a43e8 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/properties/AdvancedAttributesDialog.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/properties/AdvancedAttributesDialog.java
@@ -7,12 +7,9 @@
* Contributors:
* William Chen (Wind River) - [345384]Provide property pages for remote file system nodes
*********************************************************************************************/
-package org.eclipse.tm.te.tcf.filesystem.internal.properties;
-
-import java.net.URL;
+package org.eclipse.tcf.te.tcf.filesystem.internal.properties;
import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
@@ -25,20 +22,17 @@ import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.tm.te.tcf.filesystem.activator.UIPlugin;
-import org.eclipse.tm.te.tcf.filesystem.interfaces.IWindowsFileAttributes;
-import org.eclipse.tm.te.tcf.filesystem.internal.nls.Messages;
-import org.eclipse.tm.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.filesystem.interfaces.IWindowsFileAttributes;
+import org.eclipse.tcf.te.tcf.filesystem.internal.ImageConsts;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
/**
* The dialog used to display the advanced attributes of a Windows file or
* folder.
*/
public class AdvancedAttributesDialog extends Dialog {
- // The key to store the banner image in the plug-in's image registry.
- private static final String BANNER_IMAGE_KEY = "BannerImage"; //$NON-NLS-1$
- // The path to the image used in the banner.
- private static final String BANNER_IMAGE_PATH = "icons/obj32/banner.png"; //$NON-NLS-1$
// The file or folder node whose advanced attributes are to be displayed.
FSTreeNode node;
@@ -87,14 +81,7 @@ public class AdvancedAttributesDialog extends Dialog {
* @return The image in the banner area.
*/
private Image getBannerImage() {
- Image bImg = UIPlugin.getImage(BANNER_IMAGE_KEY);
- if (bImg == null) {
- URL bannerUrl = UIPlugin.getDefault().getBundle().getResource(BANNER_IMAGE_PATH);
- ImageDescriptor desc = ImageDescriptor.createFromURL(bannerUrl);
- UIPlugin.getDefault().getImageRegistry().put(BANNER_IMAGE_KEY, desc);
- bImg = UIPlugin.getImage(BANNER_IMAGE_KEY);
- }
- return bImg;
+ return UIPlugin.getImage(ImageConsts.BANNER_IMAGE);
}
/**
@@ -196,6 +183,8 @@ public class AdvancedAttributesDialog extends Dialog {
final Button button = new Button(group, SWT.CHECK);
button.setText(label);
button.setSelection(on);
+ // Only the owner can edit the properties
+ button.setEnabled(node.isAgentOwner());
button.addSelectionListener(new SelectionAdapter(){
@Override
public void widgetSelected(SelectionEvent e) {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/properties/GeneralInformationPage.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/properties/GeneralInformationPage.java
index e47e59914..ec017bef1 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/properties/GeneralInformationPage.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/properties/GeneralInformationPage.java
@@ -8,7 +8,7 @@
* William Chen (Wind River) - [345384]Provide property pages for remote file system nodes
* [361322]Minor improvements to the properties dialog of a file.
*********************************************************************************************/
-package org.eclipse.tm.te.tcf.filesystem.internal.properties;
+package org.eclipse.tcf.te.tcf.filesystem.internal.properties;
import java.text.DateFormat;
import java.text.DecimalFormat;
@@ -18,7 +18,6 @@ import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.ISafeRunnable;
import org.eclipse.core.runtime.SafeRunner;
-import org.eclipse.core.runtime.content.IContentType;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.window.Window;
import org.eclipse.osgi.util.NLS;
@@ -32,10 +31,9 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
-import org.eclipse.tm.te.tcf.filesystem.internal.handlers.ContentTypeHelper;
-import org.eclipse.tm.te.tcf.filesystem.internal.handlers.StateManager;
-import org.eclipse.tm.te.tcf.filesystem.internal.nls.Messages;
-import org.eclipse.tm.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.internal.utils.StateManager;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
import org.eclipse.ui.dialogs.PropertyPage;
/**
@@ -56,22 +54,6 @@ public class GeneralInformationPage extends PropertyPage {
Button btnHidden;
// The button of "Permissions"
Button[] btnPermissions;
- /**
- * Get the type of an FSTreeNode.
- *
- * @return "folder" if it is a directory, "file" if is a file, or else
- * defaults to node.type.
- */
- protected String getNodeTypeLabel() {
- if (clone.isDirectory())
- return Messages.GeneralInformationPage_Folder;
- else if (clone.isFile()) {
- IContentType contentType = ContentTypeHelper.getInstance().getContentType(node);
- String contentTypeName = contentType == null ? Messages.GeneralInformationPage_UnknownFileType : contentType.getName();
- return NLS.bind(Messages.GeneralInformationPage_File, contentTypeName);
- } else
- return clone.type;
- }
/**
* Create a horizontal separator between field sections.
@@ -122,8 +104,7 @@ public class GeneralInformationPage extends PropertyPage {
* @return The string in the format of SIZE_FORMAT.
*/
protected String getSizeText(long size) {
- return SIZE_FORMAT.format(size / 1024)
- + " KB (" + SIZE_FORMAT.format(size) + " bytes)"; //$NON-NLS-1$ //$NON-NLS-2$
+ return NLS.bind(Messages.GeneralInformationPage_FileSizeInfo, SIZE_FORMAT.format(size / 1024), SIZE_FORMAT.format(size));
}
/**
@@ -158,6 +139,8 @@ public class GeneralInformationPage extends PropertyPage {
// Read-only
btnReadOnly = new Button(attr, SWT.CHECK);
btnReadOnly.setText(Messages.GeneralInformationPage_ReadOnly);
+ // Only the owner can edit this property
+ btnReadOnly.setEnabled(node.isAgentOwner());
btnReadOnly.addSelectionListener(new SelectionAdapter(){
@Override
public void widgetSelected(SelectionEvent e) {
@@ -169,6 +152,8 @@ public class GeneralInformationPage extends PropertyPage {
// Hidden
btnHidden = new Button(attr, SWT.CHECK);
btnHidden.setText(Messages.GeneralInformationPage_Hidden);
+ // Only the owner can edit this property
+ btnHidden.setEnabled(node.isAgentOwner());
btnHidden.addSelectionListener(new SelectionAdapter(){
@Override
public void widgetSelected(SelectionEvent e) {
@@ -219,7 +204,7 @@ public class GeneralInformationPage extends PropertyPage {
protected void createPermissionsSection(Composite parent) {
GridLayout gridLayout;
Label label = new Label(parent, SWT.NONE);
- label.setText("Permissions:"); //$NON-NLS-1$
+ label.setText(Messages.GeneralInformationPage_PermissionText);
GridData data = new GridData();
data.horizontalAlignment = SWT.LEFT;
data.verticalAlignment = SWT.TOP;
@@ -277,6 +262,8 @@ public class GeneralInformationPage extends PropertyPage {
private void createPermissionButton(String label, final int index, Composite parent) {
btnPermissions[index] = new Button(parent, SWT.CHECK);
btnPermissions[index].setText(label);
+ // Only the owner can edit its permission.
+ btnPermissions[index].setEnabled(node.isAgentOwner());
btnPermissions[index].addSelectionListener(new SelectionAdapter(){
@Override
public void widgetSelected(SelectionEvent e) {
@@ -377,7 +364,7 @@ public class GeneralInformationPage extends PropertyPage {
// Field "Name"
createField(Messages.GeneralInformationPage_Name, clone.name, page);
// Field "Type"
- createField(Messages.GeneralInformationPage_Type, getNodeTypeLabel(), page);
+ createField(Messages.GeneralInformationPage_Type, clone.getFileType(), page);
// Field "Location"
String location = clone.type.endsWith("FSRootNode") //$NON-NLS-1$
|| clone.type.endsWith("FSRootDirNode") ? Messages.GeneralInformationPage_Computer //$NON-NLS-1$
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/BasicFileSection.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/BasicFileSection.java
new file mode 100644
index 000000000..0555c4cb8
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/BasicFileSection.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.tabbed;
+
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
+
+/**
+ * The section that displays the basic information of a file.
+ */
+public class BasicFileSection extends BasicFolderSection {
+
+ // The text field for the size of the file.
+ protected Text sizeText;
+ // The text field for the access time of the file.
+ protected Text accessedText;
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.filesystem.internal.tabbed.BasicFolderSection#createControls(org.eclipse.swt.widgets.Composite, org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage)
+ */
+ @Override
+ public void createControls(Composite parent, TabbedPropertySheetPage aTabbedPropertySheetPage) {
+ super.createControls(parent, aTabbedPropertySheetPage);
+ sizeText = createTextField(null, Messages.GeneralInformationPage_Size);
+ accessedText = createTextField(sizeText, Messages.GeneralInformationPage_Accessed);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.filesystem.internal.tabbed.BasicFolderSection#refresh()
+ */
+ @Override
+ public void refresh() {
+ sizeText.setText(getSizeText(clone.attr.size));
+ accessedText.setText(getDateText(clone.attr.atime));
+ super.refresh();
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/BasicFolderSection.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/BasicFolderSection.java
new file mode 100644
index 000000000..d629ee7b0
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/BasicFolderSection.java
@@ -0,0 +1,121 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.tabbed;
+
+import java.text.DateFormat;
+import java.text.DecimalFormat;
+import java.util.Date;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+import org.eclipse.tcf.te.ui.views.tabbed.BaseTitledSection;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
+
+/**
+ * The section that displays the basic information of a folder.
+ */
+public class BasicFolderSection extends BaseTitledSection {
+ // The formatter for the size of a file.
+ private static final DecimalFormat SIZE_FORMAT = new DecimalFormat();
+ // The formatter for the modified time and the accessed time.
+ private static final DateFormat DATE_FORMAT = DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.SHORT);
+
+ // The original node to be displayed and edited.
+ protected FSTreeNode node;
+ // The copy used to be edited.
+ protected FSTreeNode clone;
+
+ // The text for the name of the node.
+ protected Text nameText;
+ // The text for the type of the node.
+ protected Text typeText;
+ // The text for the location of the node.
+ protected Text locationText;
+ // The text for the modified time of the node.
+ protected Text modifiedText;
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.views.tabbed.BaseTitledSection#createControls(org.eclipse.swt.widgets.Composite, org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage)
+ */
+ @Override
+ public void createControls(Composite parent, TabbedPropertySheetPage aTabbedPropertySheetPage) {
+ super.createControls(parent, aTabbedPropertySheetPage);
+ nameText = createTextField(null, Messages.GeneralInformationPage_Name);
+ typeText = createTextField(nameText, Messages.GeneralInformationPage_Type);
+ locationText = createWrapTextField(typeText, Messages.GeneralInformationPage_Location);
+ modifiedText = createTextField(locationText, Messages.GeneralInformationPage_Modified);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#setInput(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
+ */
+ @Override
+ public void setInput(IWorkbenchPart part, ISelection selection) {
+ super.setInput(part, selection);
+ Assert.isTrue(selection instanceof IStructuredSelection);
+ Object input = ((IStructuredSelection) selection).getFirstElement();
+ Assert.isTrue(input instanceof FSTreeNode);
+ this.node = (FSTreeNode) input;
+ this.clone = (FSTreeNode) node.clone();
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#refresh()
+ */
+ @Override
+ public void refresh() {
+ nameText.setText(clone.name);
+ typeText.setText(clone.getFileType());
+ String location = clone.isRoot() ? Messages.GeneralInformationPage_Computer : clone.getLocation();
+ locationText.setText(location);
+ modifiedText.setText(getDateText(clone.attr.mtime));
+ super.refresh();
+ }
+
+ /**
+ * Get the string of the specific time using the formatter, DATE_FORMAT.
+ *
+ * @param time The time to be formatted.
+ * @return The string in the format of DATE_FORMAT.
+ */
+ protected String getDateText(long time) {
+ return DATE_FORMAT.format(new Date(time));
+ }
+
+ /**
+ * Get the string of the file size using using the formatter, SIZE_FORMAT.
+ *
+ * @param size
+ * The size of the file to be formatted.
+ * @return The string in the format of SIZE_FORMAT.
+ */
+ protected String getSizeText(long size) {
+ return NLS.bind(Messages.GeneralInformationPage_FileSizeInfo, SIZE_FORMAT.format(size / 1024), SIZE_FORMAT.format(size));
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.views.tabbed.BaseTitledSection#getText()
+ */
+ @Override
+ protected String getText() {
+ return Messages.BasicFolderSection_BasicInfoText;
+ }
+} \ No newline at end of file
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/FileFilter.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/FileFilter.java
new file mode 100644
index 000000000..d100ed88d
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/FileFilter.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.tabbed;
+
+import org.eclipse.jface.viewers.IFilter;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+
+/**
+ * The filter to test if a object is a file.
+ */
+public class FileFilter implements IFilter {
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.viewers.IFilter#select(java.lang.Object)
+ */
+ @Override
+ public boolean select(Object toTest) {
+ if(toTest instanceof FSTreeNode) {
+ FSTreeNode node = (FSTreeNode) toTest;
+ return !node.type.equals("FSPendingNode") && !node.isSystemRoot() && node.isFile(); //$NON-NLS-1$
+ }
+ return false;
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/FolderFilter.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/FolderFilter.java
new file mode 100644
index 000000000..54524c76e
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/FolderFilter.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.tabbed;
+
+import org.eclipse.jface.viewers.IFilter;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+
+/**
+ * The filter to select the folder from the file system.
+ */
+public class FolderFilter implements IFilter {
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.viewers.IFilter#select(java.lang.Object)
+ */
+ @Override
+ public boolean select(Object toTest) {
+ if(toTest instanceof FSTreeNode) {
+ FSTreeNode node = (FSTreeNode) toTest;
+ return !node.type.equals("FSPendingNode") && !node.isSystemRoot() && node.isDirectory(); //$NON-NLS-1$
+ }
+ return false;
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/LinuxFilter.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/LinuxFilter.java
new file mode 100644
index 000000000..1dccec587
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/LinuxFilter.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.tabbed;
+
+import org.eclipse.jface.viewers.IFilter;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+
+/**
+ * A filter to test if a object is a linux (non-Windows) node.
+ */
+public class LinuxFilter implements IFilter {
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.viewers.IFilter#select(java.lang.Object)
+ */
+ @Override
+ public boolean select(Object toTest) {
+ if(toTest instanceof FSTreeNode) {
+ FSTreeNode node = (FSTreeNode) toTest;
+ return !node.type.equals("FSPendingNode") && !node.isSystemRoot() && !node.isWindowsNode(); //$NON-NLS-1$
+ }
+ return false;
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/LinuxPermissionsSection.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/LinuxPermissionsSection.java
new file mode 100644
index 000000000..5c90f8db3
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/LinuxPermissionsSection.java
@@ -0,0 +1,142 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.tabbed;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CLabel;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.FormLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+import org.eclipse.tcf.te.ui.views.tabbed.BaseTitledSection;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.views.properties.tabbed.ITabbedPropertyConstants;
+import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
+
+/**
+ * The property section for displaying the permissions of a linux file/folder.
+ */
+public class LinuxPermissionsSection extends BaseTitledSection {
+ // The original node.
+ protected FSTreeNode node;
+ // The copy node to be edited.
+ protected FSTreeNode clone;
+ // The button of "Permissions"
+ protected Button[] btnPermissions;
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.views.tabbed.BaseTitledSection#createControls(org.eclipse.swt.widgets.Composite, org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage)
+ */
+ @Override
+ public void createControls(Composite parent, TabbedPropertySheetPage aTabbedPropertySheetPage) {
+ super.createControls(parent, aTabbedPropertySheetPage);
+ btnPermissions = new Button[9];
+ Composite comp1 = createPermissionGroup(null, composite, 0, Messages.PermissionsGroup_UserPermissions);
+ Composite comp2 = createPermissionGroup(comp1, composite, 3, Messages.PermissionsGroup_GroupPermissions);
+ createPermissionGroup(comp2, composite, 6, Messages.PermissionsGroup_OtherPermissions);
+ }
+
+ /**
+ * Create a permission group for a role, such as a user, a group or others.
+ *
+ * @param prev The previous permission group to align with.
+ * @param parent The parent composite.
+ * @param bit The permission bit index.
+ * @param header The group's header label.
+ */
+ protected Composite createPermissionGroup(Composite prev, Composite parent, int bit, String header) {
+ Composite group = getWidgetFactory().createFlatFormComposite(parent);
+ FormLayout layout = (FormLayout) group.getLayout();
+ layout.marginWidth = 0;
+ layout.marginHeight = 0;
+ layout.spacing = 0;
+
+ FormData data = new FormData();
+ data.left = new FormAttachment(0, STANDARD_LABEL_WIDTH);
+ data.right = new FormAttachment(100, 0);
+ if (prev == null) data.top = new FormAttachment(0, ITabbedPropertyConstants.VSPACE);
+ else data.top = new FormAttachment(prev, ITabbedPropertyConstants.VSPACE);
+ group.setLayoutData(data);
+
+ createPermissionButton(Messages.PermissionsGroup_Readable, bit, group);
+ createPermissionButton(Messages.PermissionsGroup_Writable, bit + 1, group);
+ createPermissionButton(Messages.PermissionsGroup_Executable, bit + 2, group);
+
+ CLabel groupLabel = getWidgetFactory().createCLabel(parent, header);
+ data = new FormData();
+ data.left = new FormAttachment(0, 0);
+ data.right = new FormAttachment(group, -ITabbedPropertyConstants.HSPACE);
+ data.top = new FormAttachment(group, 0, SWT.TOP);
+ groupLabel.setLayoutData(data);
+
+ return group;
+ }
+
+ /**
+ * Create a check-box field for a single permission item.
+ *
+ * @param label The label of the permission.
+ * @param index The index of current permission bit mask index.
+ * @param parent The parent to hold the check-box field.
+ */
+ private void createPermissionButton(String label, final int index, Composite parent) {
+ btnPermissions[index] = getWidgetFactory().createButton(parent, label, SWT.CHECK);
+ FormData data = new FormData();
+ if ((index % 3) == 0) data.left = new FormAttachment(0, 0);
+ else data.left = new FormAttachment(btnPermissions[index - 1], ITabbedPropertyConstants.HSPACE);
+ data.right = new FormAttachment(((index % 3) + 1) * 33, 0);
+ if ((index % 3) == 0) data.top = new FormAttachment(0, ITabbedPropertyConstants.VSPACE);
+ else data.top = new FormAttachment(btnPermissions[index - 1], 0, SWT.CENTER);
+ btnPermissions[index].setLayoutData(data);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#setInput(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
+ */
+ @Override
+ public void setInput(IWorkbenchPart part, ISelection selection) {
+ super.setInput(part, selection);
+ Assert.isTrue(selection instanceof IStructuredSelection);
+ Object input = ((IStructuredSelection) selection).getFirstElement();
+ Assert.isTrue(input instanceof FSTreeNode);
+ this.node = (FSTreeNode) input;
+ this.clone = (FSTreeNode) node.clone();
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#refresh()
+ */
+ @Override
+ public void refresh() {
+ for (int i = 0; i < 9; i++) {
+ final int bit = 1 << (8 - i);
+ final boolean on = (clone.attr.permissions & bit) != 0;
+ btnPermissions[i].setSelection(on);
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.views.tabbed.BaseTitledSection#getText()
+ */
+ @Override
+ protected String getText() {
+ return Messages.LinuxPermissionsSection_Permissions;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/WindowsAttributesCESection.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/WindowsAttributesCESection.java
new file mode 100644
index 000000000..9c3a0316c
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/WindowsAttributesCESection.java
@@ -0,0 +1,100 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.tabbed;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.tcf.te.tcf.filesystem.interfaces.IWindowsFileAttributes;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+import org.eclipse.tcf.te.ui.views.tabbed.BaseTitledSection;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.views.properties.tabbed.ITabbedPropertyConstants;
+import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
+
+/**
+ * The property section for compress and encrypt attributes of a file/folder on Windows.
+ */
+public class WindowsAttributesCESection extends BaseTitledSection {
+
+ // The original node.
+ protected FSTreeNode node;
+ // The copy node.
+ protected FSTreeNode clone;
+
+ // The check box to display the compress attribute.
+ protected Button compressButton;
+ // The check box to display the encrypt attributes.
+ protected Button encryptButton;
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.views.tabbed.BaseTitledSection#createControls(org.eclipse.swt.widgets.Composite, org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage)
+ */
+ @Override
+ public void createControls(Composite parent, TabbedPropertySheetPage aTabbedPropertySheetPage) {
+ super.createControls(parent, aTabbedPropertySheetPage);
+
+ compressButton = getWidgetFactory().createButton(composite, Messages.AdvancedAttributesDialog_Compress, SWT.CHECK);
+ FormData data = new FormData();
+ data.left = new FormAttachment(0, 0);
+ data.right = new FormAttachment(100, 0);
+ data.top = new FormAttachment(0, ITabbedPropertyConstants.VSPACE);
+ compressButton.setLayoutData(data);
+
+ encryptButton = getWidgetFactory().createButton(composite, Messages.AdvancedAttributesDialog_Compress, SWT.CHECK);
+ data = new FormData();
+ data.left = new FormAttachment(0, 0);
+ data.right = new FormAttachment(100, 0);
+ data.top = new FormAttachment(compressButton, ITabbedPropertyConstants.VSPACE);
+ encryptButton.setLayoutData(data);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#setInput(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
+ */
+ @Override
+ public void setInput(IWorkbenchPart part, ISelection selection) {
+ super.setInput(part, selection);
+ Assert.isTrue(selection instanceof IStructuredSelection);
+ Object input = ((IStructuredSelection) selection).getFirstElement();
+ Assert.isTrue(input instanceof FSTreeNode);
+ this.node = (FSTreeNode) input;
+ this.clone = (FSTreeNode) node.clone();
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#refresh()
+ */
+ @Override
+ public void refresh() {
+ boolean on = node.isWin32AttrOn(IWindowsFileAttributes.FILE_ATTRIBUTE_COMPRESSED);
+ compressButton.setSelection(on);
+ on = node.isWin32AttrOn(IWindowsFileAttributes.FILE_ATTRIBUTE_ENCRYPTED);
+ encryptButton.setSelection(on);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.views.tabbed.BaseTitledSection#getText()
+ */
+ @Override
+ protected String getText() {
+ return Messages.AdvancedAttributesDialog_CompressEncrypt;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/WindowsAttributesSection.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/WindowsAttributesSection.java
new file mode 100644
index 000000000..a248a428b
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/WindowsAttributesSection.java
@@ -0,0 +1,95 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.tabbed;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+import org.eclipse.tcf.te.ui.views.tabbed.BaseTitledSection;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.views.properties.tabbed.ITabbedPropertyConstants;
+import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
+
+/**
+ * The property section for the attributes of a file/folder on Windows.
+ */
+public class WindowsAttributesSection extends BaseTitledSection {
+ // The original node.
+ protected FSTreeNode node;
+ // The copy node.
+ protected FSTreeNode clone;
+ // The check box for "Read Only" attribute.
+ protected Button readOnlyButton;
+ // The check box for "Hidden" attribute.
+ protected Button hiddenButton;
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.views.tabbed.BaseTitledSection#createControls(org.eclipse.swt.widgets.Composite, org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage)
+ */
+ @Override
+ public void createControls(Composite parent, TabbedPropertySheetPage aTabbedPropertySheetPage) {
+ super.createControls(parent, aTabbedPropertySheetPage);
+
+ readOnlyButton = getWidgetFactory().createButton(composite, Messages.GeneralInformationPage_ReadOnly, SWT.CHECK);
+ FormData data = new FormData();
+ data.left = new FormAttachment(0, ITabbedPropertyConstants.HMARGIN );
+ data.right = new FormAttachment(50, 0);
+ data.top = new FormAttachment(0, ITabbedPropertyConstants.VSPACE);
+ readOnlyButton.setLayoutData(data);
+
+ hiddenButton = getWidgetFactory().createButton(composite, Messages.GeneralInformationPage_Hidden, SWT.CHECK);
+ data = new FormData();
+ data.left = new FormAttachment(readOnlyButton, ITabbedPropertyConstants.HSPACE);
+ data.right = new FormAttachment(100, -ITabbedPropertyConstants.HMARGIN );
+ data.top = new FormAttachment(readOnlyButton, 0, SWT.CENTER);
+ hiddenButton.setLayoutData(data);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#setInput(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
+ */
+ @Override
+ public void setInput(IWorkbenchPart part, ISelection selection) {
+ super.setInput(part, selection);
+ Assert.isTrue(selection instanceof IStructuredSelection);
+ Object input = ((IStructuredSelection) selection).getFirstElement();
+ Assert.isTrue(input instanceof FSTreeNode);
+ this.node = (FSTreeNode) input;
+ this.clone = (FSTreeNode) node.clone();
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#refresh()
+ */
+ @Override
+ public void refresh() {
+ readOnlyButton.setSelection(clone.isReadOnly());
+ hiddenButton.setSelection(clone.isHidden());
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.views.tabbed.BaseTitledSection#getText()
+ */
+ @Override
+ protected String getText() {
+ return Messages.WindowsAttributesSection_Attributes;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/WindowsFileAISection.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/WindowsFileAISection.java
new file mode 100644
index 000000000..1b55d6a86
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/WindowsFileAISection.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.tabbed;
+
+import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+
+/**
+ * The property section to display the file's archive and index attributes on Windows.
+ */
+public class WindowsFileAISection extends WindowsFolderAISection {
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.filesystem.internal.tabbed.WindowsFolderAISection#getAchiveText()
+ */
+ @Override
+ protected String getAchiveText() {
+ return Messages.AdvancedAttributesDialog_FileArchive;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.filesystem.internal.tabbed.WindowsFolderAISection#getIndexText()
+ */
+ @Override
+ protected String getIndexText() {
+ return Messages.AdvancedAttributesDialog_IndexFile;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/WindowsFileFilter.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/WindowsFileFilter.java
new file mode 100644
index 000000000..dad91d1f7
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/WindowsFileFilter.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.tabbed;
+
+import org.eclipse.jface.viewers.IFilter;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+
+/**
+ * The filter to test if a object is a Windows file.
+ */
+public class WindowsFileFilter implements IFilter {
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.viewers.IFilter#select(java.lang.Object)
+ */
+ @Override
+ public boolean select(Object toTest) {
+ if(toTest instanceof FSTreeNode) {
+ FSTreeNode node = (FSTreeNode) toTest;
+ return !node.type.equals("FSPendingNode") && !node.isSystemRoot() && node.isWindowsNode() && node.isFile(); //$NON-NLS-1$
+ }
+ return false;
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/WindowsFilter.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/WindowsFilter.java
new file mode 100644
index 000000000..b47f926a6
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/WindowsFilter.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.tabbed;
+
+import org.eclipse.jface.viewers.IFilter;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+
+/**
+ * The filter to test if a object is a Windows node.
+ */
+public class WindowsFilter implements IFilter {
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.viewers.IFilter#select(java.lang.Object)
+ */
+ @Override
+ public boolean select(Object toTest) {
+ if(toTest instanceof FSTreeNode) {
+ FSTreeNode node = (FSTreeNode) toTest;
+ return !node.type.equals("FSPendingNode") && !node.isSystemRoot() && node.isWindowsNode() && (node.isFile() || node.isDirectory()); //$NON-NLS-1$
+ }
+ return false;
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/WindowsFolderAISection.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/WindowsFolderAISection.java
new file mode 100644
index 000000000..509239575
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/WindowsFolderAISection.java
@@ -0,0 +1,120 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.tabbed;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.tcf.te.tcf.filesystem.interfaces.IWindowsFileAttributes;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+import org.eclipse.tcf.te.ui.views.tabbed.BaseTitledSection;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.views.properties.tabbed.ITabbedPropertyConstants;
+import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
+
+/**
+ * The property section to display a folder's archive and index attributes on Windows.
+ */
+public class WindowsFolderAISection extends BaseTitledSection {
+
+ // The original node.
+ protected FSTreeNode node;
+ // The copy node.
+ protected FSTreeNode clone;
+
+ // The check box for archive attribute.
+ protected Button archiveButton;
+ // The check box for index attribute.
+ protected Button indexButton;
+
+ /*
+ * (non-Javadoc)
+ * @see
+ * org.eclipse.tcf.te.ui.views.tabbed.BaseTitledSection#createControls(org.eclipse.swt.widgets
+ * .Composite, org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage)
+ */
+ @Override
+ public void createControls(Composite parent, TabbedPropertySheetPage aTabbedPropertySheetPage) {
+ super.createControls(parent, aTabbedPropertySheetPage);
+
+ archiveButton = getWidgetFactory().createButton(composite, getAchiveText(), SWT.CHECK);
+ FormData data = new FormData();
+ data.left = new FormAttachment(0, 0);
+ data.right = new FormAttachment(100, 0);
+ data.top = new FormAttachment(0, ITabbedPropertyConstants.VSPACE);
+ archiveButton.setLayoutData(data);
+
+ indexButton = getWidgetFactory().createButton(composite, getIndexText(), SWT.CHECK);
+ data = new FormData();
+ data.left = new FormAttachment(0, 0);
+ data.right = new FormAttachment(100, 0);
+ data.top = new FormAttachment(archiveButton, ITabbedPropertyConstants.VSPACE);
+ indexButton.setLayoutData(data);
+ }
+
+ /**
+ * Get the archive's label text.
+ *
+ * @return The archive's label text.
+ */
+ protected String getAchiveText() {
+ return Messages.AdvancedAttributesDialog_FolderArchive;
+ }
+
+ /**
+ * Get the index's label text.
+ *
+ * @return The index's label text.
+ */
+ protected String getIndexText() {
+ return Messages.AdvancedAttributesDialog_IndexFolder;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#setInput(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
+ */
+ @Override
+ public void setInput(IWorkbenchPart part, ISelection selection) {
+ super.setInput(part, selection);
+ Assert.isTrue(selection instanceof IStructuredSelection);
+ Object input = ((IStructuredSelection) selection).getFirstElement();
+ Assert.isTrue(input instanceof FSTreeNode);
+ this.node = (FSTreeNode) input;
+ this.clone = (FSTreeNode) node.clone();
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#refresh()
+ */
+ @Override
+ public void refresh() {
+ boolean on = node.isWin32AttrOn(IWindowsFileAttributes.FILE_ATTRIBUTE_ARCHIVE);
+ archiveButton.setSelection(on);
+ on = !node.isWin32AttrOn(IWindowsFileAttributes.FILE_ATTRIBUTE_NOT_CONTENT_INDEXED);
+ indexButton.setSelection(on);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.views.tabbed.BaseTitledSection#getText()
+ */
+ @Override
+ protected String getText() {
+ return Messages.AdvancedAttributesDialog_ArchiveIndex;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/WindowsFolderFilter.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/WindowsFolderFilter.java
new file mode 100644
index 000000000..cf18eec26
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/WindowsFolderFilter.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.tabbed;
+
+import org.eclipse.jface.viewers.IFilter;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+
+/**
+ * The filter to test if the object is a Windows folder.
+ */
+public class WindowsFolderFilter implements IFilter {
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.viewers.IFilter#select(java.lang.Object)
+ */
+ @Override
+ public boolean select(Object toTest) {
+ if(toTest instanceof FSTreeNode) {
+ FSTreeNode node = (FSTreeNode) toTest;
+ return !node.type.equals("FSPendingNode") && !node.isSystemRoot() && node.isWindowsNode() && node.isDirectory(); //$NON-NLS-1$
+ }
+ return false;
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/handlers/CachePropertyTester.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/testers/CachePropertyTester.java
index 1e8c523f5..75e1f2be4 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/handlers/CachePropertyTester.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/testers/CachePropertyTester.java
@@ -8,9 +8,10 @@
* Wind River Systems - initial API and implementation
* William Chen (Wind River)- [345552] Edit the remote files with a proper editor
*******************************************************************************/
-package org.eclipse.tm.te.tcf.filesystem.internal.handlers;
+package org.eclipse.tcf.te.tcf.filesystem.internal.testers;
import org.eclipse.core.expressions.PropertyTester;
+import org.eclipse.tcf.te.tcf.filesystem.internal.utils.PersistenceManager;
/**
* Provide a tester to test if the current auto saving mode is on or off.
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/testers/ClipboardPropertyTester.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/testers/ClipboardPropertyTester.java
new file mode 100644
index 000000000..46c94d5bc
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/testers/ClipboardPropertyTester.java
@@ -0,0 +1,80 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.testers;
+
+import java.util.List;
+
+import org.eclipse.core.expressions.PropertyTester;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.tcf.te.tcf.filesystem.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSClipboard;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+/**
+ * Provide a tester to test if the paste operation is enabled.
+ */
+public class ClipboardPropertyTester extends PropertyTester {
+
+ /**
+ * Create an instance.
+ */
+ public ClipboardPropertyTester() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.core.expressions.IPropertyTester#test(java.lang.Object, java.lang.String, java.lang.Object[], java.lang.Object)
+ */
+ @Override
+ public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
+ Assert.isTrue(receiver instanceof IStructuredSelection);
+ if (property.equals("canPaste")) { //$NON-NLS-1$
+ FSClipboard cb = UIPlugin.getDefault().getClipboard();
+ if (!cb.isEmpty()) {
+ List<FSTreeNode> nodes = cb.getFiles();
+ int operation = cb.getOperation();
+ boolean moving = operation == FSClipboard.CUT;
+ boolean copying = operation == FSClipboard.COPY;
+ List<FSTreeNode> selection = ((IStructuredSelection) receiver).toList();
+ FSTreeNode hovered = null;
+ Assert.isTrue(!selection.isEmpty());
+ if (selection.size() == 1) {
+ FSTreeNode node = selection.get(0);
+ if (node.isDirectory() && moving) {
+ hovered = node;
+ }
+ else {
+ hovered = node.parent;
+ }
+ }
+ else {
+ for (FSTreeNode node : selection) {
+ if (hovered == null) hovered = node.parent;
+ else if (hovered != node.parent) return false;
+ }
+ }
+ if (hovered.isDirectory() && hovered.isWritable() && (moving || copying)) {
+ FSTreeNode head = nodes.get(0);
+ String hid = head.peerNode.getPeerId();
+ String tid = hovered.peerNode.getPeerId();
+ if (hid.equals(tid)) {
+ for (FSTreeNode node : nodes) {
+ if (moving && node.parent == hovered || node.isAncestorOf(hovered)) {
+ return false;
+ }
+ }
+ return true;
+ }
+ }
+ }
+ }
+ return false;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/testers/EditorActivationEventPropertyTester.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/testers/EditorActivationEventPropertyTester.java
new file mode 100644
index 000000000..d53dc7f01
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/testers/EditorActivationEventPropertyTester.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.testers;
+
+import org.eclipse.core.expressions.PropertyTester;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.viewers.ColumnViewerEditorActivationEvent;
+
+/**
+ * The property tester of a ColumnViewerEditorActivationEvent.
+ * The properties include "isEditorActivation" which calculates
+ * if the event will trigger a cell editing action.
+ */
+public class EditorActivationEventPropertyTester extends PropertyTester {
+
+ /**
+ * Create an instance.
+ */
+ public EditorActivationEventPropertyTester() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.core.expressions.IPropertyTester#test(java.lang.Object, java.lang.String, java.lang.Object[], java.lang.Object)
+ */
+ @Override
+ public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
+ Assert.isTrue(receiver instanceof ColumnViewerEditorActivationEvent);
+ ColumnViewerEditorActivationEvent event = (ColumnViewerEditorActivationEvent) receiver;
+ if (property.equals("isEditorActivation")) { //$NON-NLS-1$
+ return event.eventType == ColumnViewerEditorActivationEvent.PROGRAMMATIC;
+ }
+ return false;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/testers/FSTreeNodePropertyTester.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/testers/FSTreeNodePropertyTester.java
new file mode 100644
index 000000000..145ad8fbf
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/testers/FSTreeNodePropertyTester.java
@@ -0,0 +1,117 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ * William Chen (Wind River) - [345387]Open the remote files with a proper editor
+ * William Chen (Wind River) - [352302]Opening a file in an editor depending on
+ * the client's permissions.
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.testers;
+
+import java.io.File;
+
+import org.eclipse.core.expressions.PropertyTester;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.tcf.te.tcf.filesystem.internal.utils.CacheManager;
+import org.eclipse.tcf.te.tcf.filesystem.internal.utils.ContentTypeHelper;
+import org.eclipse.tcf.te.tcf.filesystem.internal.utils.StateManager;
+import org.eclipse.tcf.te.tcf.filesystem.model.CacheState;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+
+/**
+ * The property tester of an FSTreeNode. The properties include "isFile"
+ * if it is a file node, "isDirectory" if it is a directory, "isBinaryFile"
+ * if it is a binary file, "isReadable" if it is readable, "isWritable" if
+ * it is writable, "isExecutable" if it is executable, "isRoot" if it is a
+ * root directory, "isWindows" if it is a windows file node, "isReadOnly"
+ * if it is read only, "isHidden" if it is hidden, "getCacheState" to
+ * get a node's state.
+ * <p>
+ * "testParent" is a property by which the parent or even the grand parent
+ * of a node can be tested. The arguments is a recursive list of the above
+ * test property including "testParent".
+ * <p>
+ * The following is an example of how it is used.
+ * <pre>
+ * &lt;test
+ * args="isWritable"
+ * property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.testParent"&gt;
+ * &lt;/test&gt;
+ * </pre>
+ * <p>
+ * The above example tests if the parent node is writable.
+ * <pre>
+ * &lt;test
+ * args="testParent,isWritable"
+ * property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.testParent"&gt;
+ * &lt;/test&gt;
+ * </pre>
+ * <p>
+ * The above example tests if the grand parent node is writable.
+ * <p>
+ * And so on, you can test its ancestor recursively:
+ * <pre>
+ * &lt;test
+ * args="testParent,testParent,testParent,...,isWritable"
+ * property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.testParent"&gt;
+ * &lt;/test&gt;
+ * </pre>
+ */
+public class FSTreeNodePropertyTester extends PropertyTester {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.expressions.IPropertyTester#test(java.lang.Object, java.lang.String, java.lang.Object[], java.lang.Object)
+ */
+ @Override
+ public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
+ if(receiver == null)
+ return false;
+ Assert.isTrue(receiver instanceof FSTreeNode);
+ FSTreeNode node = (FSTreeNode) receiver;
+ if (property.equals("isFile")) { //$NON-NLS-1$
+ return node.isFile();
+ } else if (property.equals("isDirectory")) { //$NON-NLS-1$
+ return node.isDirectory();
+ } else if (property.equals("isBinaryFile")) { //$NON-NLS-1$
+ return ContentTypeHelper.getInstance().isBinaryFile(node);
+ } else if (property.equals("isReadable")){ //$NON-NLS-1$
+ return node.isReadable();
+ } else if (property.equals("isWritable")){ //$NON-NLS-1$
+ return node.isWritable();
+ } else if (property.equals("isExecutable")){ //$NON-NLS-1$
+ return node.isExecutable();
+ } else if (property.equals("isRoot")) { //$NON-NLS-1$
+ return node.isRoot();
+ } else if (property.equals("isSystemRoot")) { //$NON-NLS-1$
+ return node.isSystemRoot();
+ } else if (property.equals("isWindows")) { //$NON-NLS-1$
+ return node.isWindowsNode();
+ } else if (property.equals("isReadOnly")) { //$NON-NLS-1$
+ return node.isReadOnly();
+ } else if (property.equals("isHidden")) { //$NON-NLS-1$
+ return node.isHidden();
+ } else if (property.equals("testParent")) { //$NON-NLS-1$
+ return testParent(node, args, expectedValue);
+ } else if (property.equals("getCacheState")){ //$NON-NLS-1$
+ File file = CacheManager.getInstance().getCacheFile(node);
+ if(!file.exists())
+ return false;
+ CacheState state = StateManager.getInstance().getCacheState(node);
+ return state.name().equals(expectedValue);
+ }
+ return false;
+ }
+
+ private boolean testParent(FSTreeNode node, Object[] args, Object expectedValue) {
+ if(args == null || args.length == 0)
+ return false;
+ String arg = (String) args[0];
+ Object[] newArgs = new Object[args.length -1];
+ System.arraycopy(args, 1, newArgs, 0, args.length - 1);
+ return test(node.parent, arg, newArgs, expectedValue);
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/testers/TargetPropertyTester.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/testers/TargetPropertyTester.java
new file mode 100644
index 000000000..2bd4e7398
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/testers/TargetPropertyTester.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.testers;
+
+import org.eclipse.core.expressions.PropertyTester;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+
+/**
+ * The property tester to test if the target OS is a Windows OS.
+ */
+public class TargetPropertyTester extends PropertyTester {
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.core.expressions.IPropertyTester#test(java.lang.Object, java.lang.String, java.lang.Object[], java.lang.Object)
+ */
+ @Override
+ public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
+ if(receiver instanceof IPeerModel) {
+ final IPeerModel peerModel = (IPeerModel) receiver;
+ if(property.equals("isWindows")) { //$NON-NLS-1$
+ return isWindows(peerModel);
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Test if the target represented by the peer model is a windows target.
+ *
+ * @param peerModel The peer model of the target.
+ * @return true if it is a windows target.
+ */
+ public static boolean isWindows(final IPeerModel peerModel) {
+ final String osName = getOSName(peerModel);
+ return osName == null ? false : (osName.startsWith("Windows")); //$NON-NLS-1$
+ }
+
+ /**
+ * Get the OS name from the peer model.
+ *
+ * @param peerModel The peer model.
+ * @return OS name.
+ */
+ public static String getOSName(final IPeerModel peerModel) {
+ final String[] osName = new String[1];
+ if (Protocol.isDispatchThread()) {
+ osName[0] = peerModel.getStringProperty("OSName"); //$NON-NLS-1$
+ }
+ else {
+ Protocol.invokeAndWait(new Runnable() {
+ @Override
+ public void run() {
+ osName[0] = peerModel.getStringProperty("OSName"); //$NON-NLS-1$
+ }
+ });
+ }
+ return osName[0];
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/url/TcfInputStream.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/url/TcfInputStream.java
index 6e41bb15f..ed339278c 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/url/TcfInputStream.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/url/TcfInputStream.java
@@ -7,16 +7,15 @@
* Contributors:
* William Chen (Wind River)- [345387]Open the remote files with a proper editor
*******************************************************************************/
-package org.eclipse.tm.te.tcf.filesystem.internal.url;
+package org.eclipse.tcf.te.tcf.filesystem.internal.url;
import java.io.IOException;
import java.io.InputStream;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.services.IFileSystem;
-import org.eclipse.tm.tcf.services.IFileSystem.DoneRead;
-import org.eclipse.tm.tcf.services.IFileSystem.FileSystemException;
-import org.eclipse.tm.te.tcf.filesystem.internal.nls.Messages;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.services.IFileSystem.DoneRead;
+import org.eclipse.tcf.services.IFileSystem.FileSystemException;
+import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
/**
* The TCF input stream returned by {@link TcfURLConnection#getInputStream()}.
@@ -129,9 +128,7 @@ public class TcfInputStream extends InputStream {
* remember it for read() to check.
*/
private void readBlock() {
- final Rendezvous rendezvous = new Rendezvous();
- IFileSystem service = connection.handle.getService();
- service.read(connection.handle, position, chunk_size, new DoneRead() {
+ connection.service.read(connection.handle, position, chunk_size, new DoneRead() {
@Override
public void doneRead(IToken token, FileSystemException error, byte[] data, boolean eof) {
if (error != null) {
@@ -145,16 +142,8 @@ public class TcfInputStream extends InputStream {
if (buffer != null)
position += buffer.length;
offset = 0;
- // Rendezvous
- rendezvous.arrive();
}
});
- // Waiting for reading.
- try {
- rendezvous.waiting(timeout);
- } catch (InterruptedException e) {
- ERROR = new IOException(Messages.TcfInputStream_ReadTimeout);
- }
}
/*
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/url/TcfOutputStream.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/url/TcfOutputStream.java
index b0175744e..cd7aedb1a 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/url/TcfOutputStream.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/url/TcfOutputStream.java
@@ -7,16 +7,15 @@
* Contributors:
* William Chen (Wind River) - [345552] Edit the remote files with a proper editor
*******************************************************************************/
-package org.eclipse.tm.te.tcf.filesystem.internal.url;
+package org.eclipse.tcf.te.tcf.filesystem.internal.url;
import java.io.IOException;
import java.io.OutputStream;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.services.IFileSystem;
-import org.eclipse.tm.tcf.services.IFileSystem.DoneWrite;
-import org.eclipse.tm.tcf.services.IFileSystem.FileSystemException;
-import org.eclipse.tm.te.tcf.filesystem.internal.nls.Messages;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.services.IFileSystem.DoneWrite;
+import org.eclipse.tcf.services.IFileSystem.FileSystemException;
+import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
/**
* The TCF output stream returned by {@link TcfURLConnection#getOutputStream()}.
@@ -111,9 +110,7 @@ public class TcfOutputStream extends OutputStream {
@Override
public void flush() throws IOException {
if (offset > 0) {
- final Rendezvous rendezvous = new Rendezvous();
- IFileSystem service = connection.handle.getService();
- service.write(connection.handle, position, buffer, 0, offset, new DoneWrite() {
+ connection.service.write(connection.handle, position, buffer, 0, offset, new DoneWrite() {
@Override
public void doneWrite(IToken token, FileSystemException error) {
if (error != null) {
@@ -121,15 +118,8 @@ public class TcfOutputStream extends OutputStream {
}
position += offset;
offset = 0;
- rendezvous.arrive();
}
});
- // Waiting for writing.
- try {
- rendezvous.waiting(timeout);
- } catch (InterruptedException e) {
- ERROR = new IOException(Messages.TcfOutputStream_WriteTimeout);
- }
}
}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/url/TcfURLConnection.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/url/TcfURLConnection.java
index c402d0e45..2e20e46ca 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/url/TcfURLConnection.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/url/TcfURLConnection.java
@@ -7,7 +7,7 @@
* Contributors:
* William Chen (Wind River)- [345387]Open the remote files with a proper editor
*******************************************************************************/
-package org.eclipse.tm.te.tcf.filesystem.internal.url;
+package org.eclipse.tcf.te.tcf.filesystem.internal.url;
import java.io.Closeable;
import java.io.IOException;
@@ -16,21 +16,19 @@ import java.io.OutputStream;
import java.net.URL;
import java.net.URLConnection;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IPeer;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.services.IFileSystem;
-import org.eclipse.tm.tcf.services.IFileSystem.DoneClose;
-import org.eclipse.tm.tcf.services.IFileSystem.DoneOpen;
-import org.eclipse.tm.tcf.services.IFileSystem.FileSystemException;
-import org.eclipse.tm.tcf.services.IFileSystem.IFileHandle;
-import org.eclipse.tm.te.tcf.core.Tcf;
-import org.eclipse.tm.te.tcf.core.interfaces.IChannelManager.DoneOpenChannel;
-import org.eclipse.tm.te.tcf.filesystem.internal.exceptions.TCFChannelException;
-import org.eclipse.tm.te.tcf.filesystem.internal.nls.Messages;
-import org.eclipse.tm.te.tcf.filesystem.model.FSModel;
-import org.eclipse.tm.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.services.IFileSystem;
+import org.eclipse.tcf.services.IFileSystem.DoneClose;
+import org.eclipse.tcf.services.IFileSystem.DoneOpen;
+import org.eclipse.tcf.services.IFileSystem.FileSystemException;
+import org.eclipse.tcf.services.IFileSystem.IFileHandle;
+import org.eclipse.tcf.te.tcf.core.Tcf;
+import org.eclipse.tcf.te.tcf.filesystem.internal.exceptions.TCFChannelException;
+import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSOperation;
+import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
/**
* The URL connection returned by TCF stream service used to handler "tcf"
@@ -66,6 +64,8 @@ public class TcfURLConnection extends URLConnection {
IChannel channel;
// The file's handle
IFileHandle handle;
+ // The file service
+ IFileSystem service;
/**
* Create a TCF URL Connection using the specified url. The format of this
@@ -83,13 +83,11 @@ public class TcfURLConnection extends URLConnection {
path = url.getPath();
int slash = path.indexOf("/", 1); //$NON-NLS-1$
if (slash != -1){
+ String peerId = path.substring(1, slash);
+ peer = Protocol.getLocator().getPeers().get(peerId);
path = path.substring(slash);
if (path.matches("/[A-Za-z]:.*")) path = path.substring(1); //$NON-NLS-1$
}
- //Get the peer using the peer id.
- FSTreeNode node = FSModel.getInstance().getTreeNode(url);
- if(node != null)
- peer = node.peerNode.getPeer();
// Set default timeout.
setConnectTimeout(DEFAULT_CONNECT_TIMEOUT);
setOpenTimeout(DEFAULT_OPEN_TIMEOUT);
@@ -136,40 +134,6 @@ public class TcfURLConnection extends URLConnection {
}
/**
- * Open a channel connected to the target represented by the peer.
- *
- * @return The channel or null if the operation fails.
- */
- private IChannel openChannel(final IPeer peer) throws TCFChannelException {
- final Rendezvous rendezvous = new Rendezvous();
- final TCFChannelException[] errors = new TCFChannelException[1];
- final IChannel[] channels = new IChannel[1];
- Tcf.getChannelManager().openChannel(peer, new DoneOpenChannel(){
- @Override
- public void doneOpenChannel(Throwable error, IChannel channel) {
- if(error!=null){
- String message = NLS.bind(Messages.TCFUtilities_OpeningFailureMessage,
- new Object[]{peer.getID(), error.getLocalizedMessage()});
- errors[0] = new TCFChannelException(message, error);
- }else{
- channels[0] = channel;
- }
- rendezvous.arrive();
- }});
- try {
- rendezvous.waiting(5000L);
- } catch (InterruptedException e) {
- String message = NLS.bind(Messages.TCFUtilities_OpeningFailureMessage,
- new Object[]{peer.getID(), e.getLocalizedMessage()});
- errors[0] = new TCFChannelException(message, e);
- }
- if(errors[0] != null){
- throw errors[0];
- }
- return channels[0];
- }
-
- /**
* Open a file on the remote file system for read/write and store the file handle.
*
* @throws IOException Opening file fails.
@@ -179,35 +143,27 @@ public class TcfURLConnection extends URLConnection {
throw new IOException(Messages.TcfURLConnection_NoSuchTcfAgent);
try {
// Open the channel
- channel = openChannel(peer);
+ channel = FSOperation.openChannel(peer);
} catch (TCFChannelException e) {
throw new IOException(e.getLocalizedMessage());
}
if (channel != null) {
- IFileSystem service = channel.getRemoteService(IFileSystem.class);
+ service = FSOperation.getBlockingFileSystem(channel);
if (service != null) {
- final Rendezvous rendezvous = new Rendezvous();
final FileSystemException[] errors = new FileSystemException[1];
// Open the file.
int open_flag = 0;
if (doInput)
open_flag |= IFileSystem.TCF_O_READ;
if (doOutput)
- open_flag |= IFileSystem.TCF_O_WRITE;
+ open_flag |= IFileSystem.TCF_O_WRITE | IFileSystem.TCF_O_CREAT | IFileSystem.TCF_O_TRUNC;
service.open(path, open_flag, null, new DoneOpen() {
@Override
public void doneOpen(IToken token, FileSystemException error, IFileHandle hdl) {
errors[0] = error;
handle = hdl;
- // Rendezvous
- rendezvous.arrive();
}
});
- try {
- rendezvous.waiting(openTimeout);
- } catch (InterruptedException e) {
- throw new IOException(Messages.TcfURLConnection_OpenFileTimeout);
- }
if (errors[0] != null) {
IOException exception = new IOException(errors[0].toString());
exception.initCause(errors[0]);
@@ -276,20 +232,12 @@ public class TcfURLConnection extends URLConnection {
public synchronized void closeStream(Closeable stream) throws IOException {
boolean shouldClose = shouldCloseFileHandle(stream);
if (shouldClose) {
- final Rendezvous rendezvous = new Rendezvous();
- IFileSystem service = handle.getService();
service.close(handle, new DoneClose() {
@Override
public void doneClose(IToken token, FileSystemException error) {
- rendezvous.arrive();
}
});
- try {
- rendezvous.waiting(closeTimeout);
- } catch (InterruptedException e) {
- throw new IOException(Messages.TcfURLConnection_CloseFileTimeout);
- }
- channel.close();
+ Tcf.getChannelManager().closeChannel(channel);
}
}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/handlers/CacheManager.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/utils/CacheManager.java
index 09493a67c..d23366d84 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/handlers/CacheManager.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/utils/CacheManager.java
@@ -9,7 +9,7 @@
* William Chen (Wind River)- [345387] Open the remote files with a proper editor
* William Chen (Wind River)- [345552] Edit the remote files with a proper editor
*******************************************************************************/
-package org.eclipse.tm.te.tcf.filesystem.internal.handlers;
+package org.eclipse.tcf.te.tcf.filesystem.internal.utils;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
@@ -26,15 +26,17 @@ import java.text.DecimalFormat;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.SafeRunner;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.jface.util.SafeRunnable;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.tm.te.tcf.filesystem.activator.UIPlugin;
-import org.eclipse.tm.te.tcf.filesystem.internal.exceptions.TCFException;
-import org.eclipse.tm.te.tcf.filesystem.internal.nls.Messages;
-import org.eclipse.tm.te.tcf.filesystem.internal.url.TcfURLConnection;
-import org.eclipse.tm.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.filesystem.dialogs.TimeTriggeredProgressMonitorDialog;
+import org.eclipse.tcf.te.tcf.filesystem.internal.url.TcfURLConnection;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
import org.eclipse.ui.PlatformUI;
/**
@@ -42,8 +44,7 @@ import org.eclipse.ui.PlatformUI;
* from a remote file system.
*/
public class CacheManager {
- // The agent directory's prefixed name.
- private static final String WS_AGENT_DIR_PREFIX = "agent_"; //$NON-NLS-1$
+ public static final char PATH_ESCAPE_CHAR = '$';
// The default chunk size of the buffer used during downloading files.
private static final int DEFAULT_CHUNK_SIZE = 5 * 1024;
@@ -87,9 +88,9 @@ public class CacheManager {
*/
public IPath getCachePath(FSTreeNode node) {
File location = getCacheRoot();
- String agentId = node.peerNode.getPeer().getID();
+ String agentId = node.peerNode.getPeerId();
// Use Math.abs to avoid negative hash value.
- String agent = WS_AGENT_DIR_PREFIX + Math.abs(agentId.hashCode());
+ String agent = agentId.replace(':', PATH_ESCAPE_CHAR);
IPath agentDir = new Path(location.getAbsolutePath()).append(agent);
File agentDirFile = agentDir.toFile();
if (!agentDirFile.exists()) {
@@ -152,7 +153,9 @@ public class CacheManager {
return appendPathSegment(node, path, node.name);
}
if (node.isWindowsNode()) {
- String name = node.name.substring(0, 1);
+ String name = node.name;
+ name = name.substring(0, name.length()-1);
+ name = name.replace(':', PATH_ESCAPE_CHAR);
return appendPathSegment(node, path, name);
}
return path;
@@ -211,6 +214,23 @@ public class CacheManager {
} catch (Exception e) {
}
}
+ if(!monitor.isCanceled()){
+ SafeRunner.run(new SafeRunnable() {
+ @Override
+ public void run() throws Exception {
+ File file = getCachePath(node).toFile();
+ if (file.exists()) {
+ // If downloading is successful, update the attributes of the file and
+ // set the last modified time to that of its corresponding file.
+ StateManager.getInstance().refreshState(node);
+ PersistenceManager.getInstance().setBaseTimestamp(node.getLocationURL(), node.attr.mtime);
+ file.setLastModified(node.attr.mtime);
+ if (!node.isWritable()) file.setReadOnly();
+ node.firePropertyChange();
+ }
+ }
+ });
+ }
monitor.done();
}
}
@@ -222,15 +242,7 @@ public class CacheManager {
File file = getCachePath(node).toFile();
try {
dialog.run(true, true, runnable);
- // If downloading is successful, update the attributes of the file and
- // set the last modified time to that of its corresponding file.
- StateManager.getInstance().updateState(node);
- // If the node is read-only, make the cache file read-only.
- if(!node.isWritable())
- file.setReadOnly();
return true;
- } catch(TCFException e) {
- MessageDialog.openError(parent, Messages.StateManager_UpdateFailureTitle, e.getLocalizedMessage());
} catch (InvocationTargetException e) {
// Something's gone wrong. Roll back the downloading and display the
// error.
@@ -254,7 +266,7 @@ public class CacheManager {
* @return true if it is successful, false there're errors or it is
* canceled.
*/
- public boolean upload(final FSTreeNode... nodes) {
+ public boolean upload(final FSTreeNode[] nodes, final boolean sync) {
Shell parent = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
try {
IRunnableWithProgress runnable = new IRunnableWithProgress() {
@@ -267,7 +279,7 @@ public class CacheManager {
else
message = NLS.bind(Messages.CacheManager_UploadNFiles, Long.valueOf(nodes.length));
monitor.beginTask(message, 100);
- boolean canceled = uploadFiles(monitor, nodes);
+ boolean canceled = uploadFiles(monitor, sync, nodes);
if (canceled)
throw new InterruptedException();
} catch (Exception e) {
@@ -302,9 +314,8 @@ public class CacheManager {
* The error exception.
*/
private void displayError(Shell parent, InvocationTargetException e) {
- Throwable target = e.getTargetException();
- Throwable cause = target.getCause() != null ? target.getCause() : target;
- MessageDialog.openError(parent, Messages.CacheManager_DownloadingError, cause.getLocalizedMessage());
+ Throwable throwable = e.getTargetException() != null ? e.getTargetException() : e;
+ MessageDialog.openError(parent, Messages.CacheManager_DownloadingError, throwable.getLocalizedMessage());
}
/**
@@ -320,7 +331,7 @@ public class CacheManager {
* @throws Exception
* an Exception thrown during downloading and storing data.
*/
- public boolean uploadFiles(IProgressMonitor monitor, FSTreeNode... nodes) throws IOException {
+ public boolean uploadFiles(IProgressMonitor monitor, final boolean sync, final FSTreeNode[] nodes) throws IOException {
BufferedInputStream input = null;
BufferedOutputStream output = null;
// The buffer used to download the file.
@@ -379,11 +390,19 @@ public class CacheManager {
}
if(!monitor.isCanceled()){
// Once upload is successful, synchronize the modified time.
- try {
- StateManager.getInstance().commitState(nodes[i]);
- } catch (TCFException tcfe) {
- throw new IOException(tcfe.getLocalizedMessage());
- }
+ final FSTreeNode node = nodes[i];
+ SafeRunner.run(new SafeRunnable() {
+ @Override
+ public void run() throws Exception {
+ StateManager.getInstance().refreshState(node);
+ PersistenceManager.getInstance().setBaseTimestamp(node.getLocationURL(), node.attr.mtime);
+ if(sync) {
+ File file = getCacheFile(node);
+ file.setLastModified(node.attr.mtime);
+ }
+ node.firePropertyChange();
+ }
+ });
}
}
}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/handlers/ContentTypeHelper.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/utils/ContentTypeHelper.java
index eb0212eb5..947b0515f 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/handlers/ContentTypeHelper.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/utils/ContentTypeHelper.java
@@ -9,7 +9,7 @@
* William Chen (Wind River) [360494]Provide an "Open With" action in the pop
* up menu of file system nodes of Target Explorer.
*******************************************************************************/
-package org.eclipse.tm.te.tcf.filesystem.internal.handlers;
+package org.eclipse.tcf.te.tcf.filesystem.internal.utils;
import java.io.File;
import java.io.IOException;
@@ -22,7 +22,7 @@ import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.content.IContentType;
-import org.eclipse.tm.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
/**
* The content type helper used to provide helping methods about the content
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/handlers/PersistenceManager.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/utils/PersistenceManager.java
index cb23eab1a..c66196bed 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/handlers/PersistenceManager.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/utils/PersistenceManager.java
@@ -8,7 +8,7 @@
* William Chen (Wind River) [360494]Provide an "Open With" action in the pop
* up menu of file system nodes of Target Explorer.
*******************************************************************************/
-package org.eclipse.tm.te.tcf.filesystem.internal.handlers;
+package org.eclipse.tcf.te.tcf.filesystem.internal.utils;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
@@ -33,9 +33,9 @@ import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.QualifiedName;
import org.eclipse.core.runtime.content.IContentType;
import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.tm.te.tcf.filesystem.activator.UIPlugin;
-import org.eclipse.tm.te.tcf.filesystem.internal.preferences.TargetExplorerPreferencePage;
-import org.eclipse.tm.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.filesystem.internal.preferences.TargetExplorerPreferencePage;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
import org.eclipse.ui.IMemento;
import org.eclipse.ui.WorkbenchException;
import org.eclipse.ui.XMLMemento;
@@ -181,6 +181,42 @@ public class PersistenceManager {
}
/**
+ * If the option of "in-place editor" is set to on.
+ *
+ * @return true if it uses in-place editor when renaming files/folders.
+ */
+ public boolean isInPlaceEditor() {
+ IPreferenceStore preferenceStore = UIPlugin.getDefault().getPreferenceStore();
+ boolean autoSaving = preferenceStore
+ .getBoolean(TargetExplorerPreferencePage.PREF_RENAMING_IN_PLACE_EDITOR);
+ return autoSaving;
+ }
+
+ /**
+ * If the option of "copy permissions" is set to on.
+ *
+ * @return true if it should copy source file permissions.
+ */
+ public boolean isCopyPermission() {
+ IPreferenceStore preferenceStore = UIPlugin.getDefault().getPreferenceStore();
+ boolean autoSaving = preferenceStore
+ .getBoolean(TargetExplorerPreferencePage.PREF_COPY_PERMISSION);
+ return autoSaving;
+ }
+
+ /**
+ * If the option of "copy ownership" is set to on.
+ *
+ * @return true if it should copy source file ownership.
+ */
+ public boolean isCopyOwnership() {
+ IPreferenceStore preferenceStore = UIPlugin.getDefault().getPreferenceStore();
+ boolean autoSaving = preferenceStore
+ .getBoolean(TargetExplorerPreferencePage.PREF_COPY_OWNERSHIP);
+ return autoSaving;
+ }
+
+ /**
* Load the persistent properties from the persistent file in the cache's root directory.
*/
private void loadPersistentProperties() {
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/utils/StateManager.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/utils/StateManager.java
new file mode 100644
index 000000000..bc5382475
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/utils/StateManager.java
@@ -0,0 +1,187 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ * William Chen (Wind River)- [345552] Edit the remote files with a proper editor
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.utils;
+
+import java.io.File;
+
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.services.IFileSystem;
+import org.eclipse.tcf.services.IFileSystem.DoneSetStat;
+import org.eclipse.tcf.services.IFileSystem.DoneStat;
+import org.eclipse.tcf.services.IFileSystem.FileAttrs;
+import org.eclipse.tcf.services.IFileSystem.FileSystemException;
+import org.eclipse.tcf.te.tcf.core.Tcf;
+import org.eclipse.tcf.te.tcf.filesystem.internal.exceptions.TCFException;
+import org.eclipse.tcf.te.tcf.filesystem.internal.exceptions.TCFFileSystemException;
+import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSOperation;
+import org.eclipse.tcf.te.tcf.filesystem.model.CacheState;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+
+/**
+ * This class provides several utility methods to get, update, commit
+ * or refresh a file node's state.
+ *
+ */
+public class StateManager {
+
+ // The singleton instance.
+ private static StateManager instance;
+
+ /**
+ * Get the singleton user manager.
+ *
+ * @return The singleton cache manager.
+ */
+ public static StateManager getInstance() {
+ if (instance == null) {
+ instance = new StateManager();
+ }
+ return instance;
+ }
+
+ /**
+ * Create a StateManager fInstance.
+ */
+ private StateManager() {
+ }
+
+ /**
+ * Refresh the state of the specified node.
+ *
+ * @param node The tree node whose state is going to be refreshed.
+ * @throws TCFException
+ */
+ public void refreshState(final FSTreeNode node) throws TCFException {
+ IChannel channel = null;
+ try {
+ channel = FSOperation.openChannel(node.peerNode.getPeer());
+ if (channel != null) {
+ IFileSystem service = FSOperation.getBlockingFileSystem(channel);
+ if (service != null) {
+ final TCFFileSystemException[] errors = new TCFFileSystemException[1];
+ String path = node.getLocation(true);
+ service.stat(path, new DoneStat() {
+ @Override
+ public void doneStat(IToken token, FileSystemException error, FileAttrs attrs) {
+ if (error == null) {
+ node.attr = attrs;
+ } else {
+ String message = NLS.bind(Messages.StateManager_CannotGetFileStatMessage, new Object[]{node.name, error});
+ errors[0] = new TCFFileSystemException(message, error);
+ }
+ }
+ });
+ if (errors[0] != null) {
+ throw errors[0];
+ }
+ }else{
+ String message = NLS.bind(Messages.StateManager_TCFNotProvideFSMessage, node.peerNode.getPeerId());
+ throw new TCFFileSystemException(message);
+ }
+ }
+ } finally {
+ if (channel != null) Tcf.getChannelManager().closeChannel(channel);
+ }
+ }
+
+ /**
+ * Set the file's attributes using the new attributes.
+ *
+ * @param node The file's node.
+ * @param attrs The new file attributes.
+ * @throws TCFException
+ */
+ public void setFileAttrs(final FSTreeNode node, final IFileSystem.FileAttrs attrs) throws TCFException {
+ IChannel channel = null;
+ try {
+ channel = FSOperation.openChannel(node.peerNode.getPeer());
+ if (channel != null) {
+ IFileSystem service = FSOperation.getBlockingFileSystem(channel);
+ if (service != null) {
+ final TCFFileSystemException[] errors = new TCFFileSystemException[1];
+ String path = node.getLocation(true);
+ service.setstat(path, attrs, new DoneSetStat() {
+ @Override
+ public void doneSetStat(IToken token, FileSystemException error) {
+ if (error == null) {
+ commitNodeAttr(node, attrs);
+ } else {
+ String message = NLS.bind(Messages.StateManager_CannotSetFileStateMessage, new Object[] { node.name, error });
+ errors[0] = new TCFFileSystemException(message, error);
+ }
+ }
+ });
+ if (errors[0] != null) {
+ throw errors[0];
+ }
+ } else {
+ String message = NLS.bind(Messages.StateManager_TCFNotProvideFSMessage2, node.peerNode.getPeerId());
+ throw new TCFFileSystemException(message);
+ }
+ }
+ } finally {
+ if (channel != null) Tcf.getChannelManager().closeChannel(channel);
+ }
+ }
+
+ /**
+ * Commit the file attribute of the specified tree node with the specified value.
+ *
+ * @param node The tree node whose file attribute is to committed.
+ * @param attr The new file attribute.
+ */
+ void commitNodeAttr(FSTreeNode node, FileAttrs attr){
+ node.attr = attr;
+ PersistenceManager.getInstance().setBaseTimestamp(node.getLocationURL(), attr.mtime);
+ node.firePropertyChange();
+ }
+
+ /**
+ * Get the local file's state of the specified tree node. The local file must exist
+ * before calling this method to get its state.
+ *
+ * @param node The tree node whose local file state is going to retrieved.
+ * @return The tree node's latest cache state.
+ */
+ public CacheState getCacheState(FSTreeNode node) {
+ File file = CacheManager.getInstance().getCacheFile(node);
+ if(!file.exists())
+ return CacheState.consistent;
+ long ltime = file.lastModified();
+ long btime = PersistenceManager.getInstance().getBaseTimestamp(node.getLocationURL());
+ long mtime = 0;
+ if(node.attr!=null)
+ mtime = node.attr.mtime;
+ if(isUnchanged(btime, ltime)){
+ if(isUnchanged(mtime, btime))
+ return CacheState.consistent;
+ return CacheState.outdated;
+ }
+ if(isUnchanged(mtime, btime))
+ return CacheState.modified;
+ return CacheState.conflict;
+ }
+
+ /**
+ * Compare the modified time of the remote file and the base timestamp
+ * and see if they are equal to each other.
+ *
+ * @param mtime The modified time of the remote file.
+ * @param btime The base timestamp cached.
+ * @return true if they are equal in minute precision.
+ */
+ private boolean isUnchanged(long mtime, long btime){
+ return Math.abs(mtime-btime)/60000 == 0;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/handlers/UserManager.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/utils/UserManager.java
index 8bacd85f0..d4d5d35c1 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/handlers/UserManager.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/utils/UserManager.java
@@ -8,28 +8,26 @@
* Wind River Systems - initial API and implementation
* William Chen (Wind River)- [345552] Edit the remote files with a proper editor
*******************************************************************************/
-package org.eclipse.tm.te.tcf.filesystem.internal.handlers;
+package org.eclipse.tcf.te.tcf.filesystem.internal.utils;
import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IPeer;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.tcf.services.IFileSystem;
-import org.eclipse.tm.tcf.services.IFileSystem.DoneUser;
-import org.eclipse.tm.tcf.services.IFileSystem.FileSystemException;
-import org.eclipse.tm.te.tcf.core.Tcf;
-import org.eclipse.tm.te.tcf.core.interfaces.IChannelManager.DoneOpenChannel;
-import org.eclipse.tm.te.tcf.filesystem.internal.UserAccount;
-import org.eclipse.tm.te.tcf.filesystem.internal.exceptions.TCFChannelException;
-import org.eclipse.tm.te.tcf.filesystem.internal.exceptions.TCFException;
-import org.eclipse.tm.te.tcf.filesystem.internal.exceptions.TCFFileSystemException;
-import org.eclipse.tm.te.tcf.filesystem.internal.nls.Messages;
-import org.eclipse.tm.te.tcf.filesystem.internal.url.Rendezvous;
-import org.eclipse.tm.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.services.IFileSystem;
+import org.eclipse.tcf.services.IFileSystem.DoneUser;
+import org.eclipse.tcf.services.IFileSystem.FileSystemException;
+import org.eclipse.tcf.te.tcf.core.Tcf;
+import org.eclipse.tcf.te.tcf.filesystem.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.filesystem.internal.UserAccount;
+import org.eclipse.tcf.te.tcf.filesystem.internal.exceptions.TCFException;
+import org.eclipse.tcf.te.tcf.filesystem.internal.exceptions.TCFFileSystemException;
+import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSOperation;
+import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
import org.eclipse.ui.PlatformUI;
/**
@@ -37,7 +35,7 @@ import org.eclipse.ui.PlatformUI;
*/
public class UserManager {
// The key to save and retrieve the user account in a peer model.
- private static final String USER_ACCOUNT_KEY = "user.account"; //$NON-NLS-1$
+ /* default */ static final String USER_ACCOUNT_KEY = UIPlugin.getUniqueIdentifier()+".user.account"; //$NON-NLS-1$
// The singleton fInstance.
private static UserManager instance;
@@ -66,10 +64,9 @@ public class UserManager {
* @return The user account information or null if it fails.
*/
private UserAccount getUserByChannel(final IChannel channel) throws TCFFileSystemException {
- IFileSystem service = channel.getRemoteService(IFileSystem.class);
+ IFileSystem service = FSOperation.getBlockingFileSystem(channel);
if (service != null) {
final TCFFileSystemException[] errors = new TCFFileSystemException[1];
- final Rendezvous rendezvous = new Rendezvous();
final UserAccount[] accounts = new UserAccount[1];
service.user(new DoneUser() {
@Override
@@ -80,15 +77,8 @@ public class UserManager {
String message = NLS.bind(Messages.UserManager_CannotGetUserAccountMessage, channel.getRemotePeer().getID());
errors[0] = new TCFFileSystemException(message, error);
}
- rendezvous.arrive();
}
});
- try {
- rendezvous.waiting(5000L);
- } catch (InterruptedException e) {
- String message = NLS.bind(Messages.UserManager_CannotGetUserAccountMessage2, channel.getRemotePeer().getID());
- errors[0] = new TCFFileSystemException(message, e);
- }
if (errors[0] != null) {
throw errors[0];
}
@@ -107,60 +97,25 @@ public class UserManager {
UserAccount account = getUserFromPeer(peerNode);
if (account == null) {
IChannel channel = null;
- try{
- channel = openChannel(peerNode.getPeer());
- if (channel != null) {
- account = getUserByChannel(channel);
- if (account != null)
- setUserToPeer(peerNode, account);
+ try {
+ channel = FSOperation.openChannel(peerNode.getPeer());
+ if (channel != null) {
+ account = getUserByChannel(channel);
+ if (account != null) setUserToPeer(peerNode, account);
+ }
}
- }catch(TCFException e){
+ catch (TCFException e) {
Shell parent = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
MessageDialog.openError(parent, Messages.UserManager_UserAccountTitle, e.getLocalizedMessage());
- }finally{
- if(channel!=null){
- channel.close();
- }
+ }
+ finally {
+ if (channel != null) Tcf.getChannelManager().closeChannel(channel);
}
}
return account;
}
/**
- * Open a channel connected to the target represented by the peer.
- *
- * @return The channel or null if the operation fails.
- */
- private IChannel openChannel(final IPeer peer) throws TCFChannelException {
- final Rendezvous rendezvous = new Rendezvous();
- final TCFChannelException[] errors = new TCFChannelException[1];
- final IChannel[] channels = new IChannel[1];
- Tcf.getChannelManager().openChannel(peer, new DoneOpenChannel(){
- @Override
- public void doneOpenChannel(Throwable error, IChannel channel) {
- if(error!=null){
- String message = NLS.bind(Messages.TCFUtilities_OpeningFailureMessage,
- new Object[]{peer.getID(), error.getLocalizedMessage()});
- errors[0] = new TCFChannelException(message, error);
- }else{
- channels[0] = channel;
- }
- rendezvous.arrive();
- }});
- try {
- rendezvous.waiting(5000L);
- } catch (InterruptedException e) {
- String message = NLS.bind(Messages.TCFUtilities_OpeningFailureMessage,
- new Object[]{peer.getID(), e.getLocalizedMessage()});
- errors[0] = new TCFChannelException(message, e);
- }
- if(errors[0] != null){
- throw errors[0];
- }
- return channels[0];
- }
-
- /**
* Get the user account stored in the specified peer model using a key named
* "user.account" defined by the constant USER_ACCOUNT_KEY.
*
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/FolderValidator.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/FolderValidator.java
new file mode 100644
index 000000000..59e677fbd
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/FolderValidator.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.wizards;
+
+import org.eclipse.jface.dialogs.IMessageProvider;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+import org.eclipse.tcf.te.ui.controls.validator.Validator;
+
+/**
+ * The validator to validate the path of the parent directory in the new file/folder wizard
+ * page is valid. It is only when it is not empty and it exists in the target peer.
+ *
+ * @see Validator
+ */
+public class FolderValidator extends Validator {
+ // The wizard page to create the new node.
+ private NewNodeWizardPage page;
+
+ /**
+ * Create a folder validator of the specified wizard page.
+ *
+ * @param page The wizard page to create the new file/folder.
+ */
+ public FolderValidator(NewNodeWizardPage page) {
+ super(ATTR_MANDATORY);
+ this.page = page;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.controls.validator.Validator#isValid(java.lang.String)
+ */
+ @Override
+ public boolean isValid(String newText) {
+ if (newText == null || newText.trim().length() == 0) {
+ setMessage(Messages.FolderValidator_SpecifyFolder, IMessageProvider.ERROR);
+ return false;
+ }
+ FSTreeNode folder = page.getInputDir();
+ if (folder == null) {
+ setMessage(NLS.bind(Messages.FolderValidator_DirNotExist, newText), IMessageProvider.ERROR);
+ return false;
+ }
+ if (!folder.isWritable()) {
+ setMessage(NLS.bind(Messages.FolderValidator_NotWritable, newText), IMessageProvider.ERROR);
+ return false;
+ }
+ setMessage(null, IMessageProvider.NONE);
+ return true;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/NameValidator.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/NameValidator.java
new file mode 100644
index 000000000..25b6c3cbb
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/NameValidator.java
@@ -0,0 +1,108 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.wizards;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.SafeRunner;
+import org.eclipse.jface.dialogs.IMessageProvider;
+import org.eclipse.jface.util.SafeRunnable;
+import org.eclipse.tcf.te.tcf.filesystem.internal.celleditor.FSCellValidator;
+import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSOperation;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+import org.eclipse.tcf.te.ui.controls.validator.Validator;
+
+/**
+ * The validator to validate the name of a file/folder in the file system of Target Explorer.
+ *
+ * @see Validator
+ */
+public class NameValidator extends Validator {
+ // The folder in which the new file/folder is to be created.
+ NewNodeWizardPage wizard;
+
+ /**
+ * Create a NameValidator with the folder in which the file/folder is created.
+ *
+ * @param wizard The parent folder in which the file/folder is created.
+ */
+ public NameValidator(NewNodeWizardPage wizard) {
+ super(ATTR_MANDATORY);
+ this.wizard = wizard;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.controls.validator.Validator#isValid(java.lang.String)
+ */
+ @Override
+ public boolean isValid(String newText) {
+ FSTreeNode folder = wizard.getInputDir();
+ if(folder == null) {
+ setMessage(Messages.NameValidator_SpecifyFolder, IMessageProvider.INFORMATION);
+ return false;
+ }
+ if (newText == null || newText.trim().length() == 0) {
+ setMessage(Messages.FSRenamingAssistant_SpecifyNonEmptyName, IMessageProvider.ERROR);
+ return false;
+ }
+ String text = newText.toString().trim();
+ if (hasChild(text)) {
+ setMessage(Messages.FSRenamingAssistant_NameAlreadyExists, IMessageProvider.ERROR);
+ return false;
+ }
+ String formatRegex = folder.isWindowsNode() ? FSCellValidator.WIN_FILENAME_REGEX : FSCellValidator.UNIX_FILENAME_REGEX;
+ if (!text.matches(formatRegex)) {
+ setMessage(folder.isWindowsNode() ? Messages.FSRenamingAssistant_WinIllegalCharacters : Messages.FSRenamingAssistant_UnixIllegalCharacters, IMessageProvider.ERROR);
+ return false;
+ }
+ setMessage(null, IMessageProvider.NONE);
+ return true;
+ }
+
+ /**
+ * To test if the folder has a child with the specified name.
+ *
+ * @param name The name.
+ * @return true if it has a child with the name.
+ */
+ private boolean hasChild(String name) {
+ List<FSTreeNode> nodes = getChildren();
+ for (FSTreeNode node : nodes) {
+ if (node.isWindowsNode()) {
+ if (node.name.equalsIgnoreCase(name)) return true;
+ }
+ else if (node.name.equals(name)) return true;
+ }
+ return false;
+ }
+
+ /**
+ * Get the folder's current children. If the children has not yet been loaded, then load it.
+ *
+ * @return The current children of the folder.
+ */
+ private List<FSTreeNode> getChildren() {
+ final FSTreeNode folder = wizard.getInputDir();
+ if (folder.childrenQueried) {
+ return new ArrayList<FSTreeNode>(FSOperation.getCurrentChildren(folder));
+ }
+ final List<FSTreeNode> result = new ArrayList<FSTreeNode>();
+ SafeRunner.run(new SafeRunnable() {
+ @Override
+ public void run() throws Exception {
+ result.addAll(new FSOperation().getChildren(folder));
+ }
+ });
+ return result;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/NewFileWizard.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/NewFileWizard.java
new file mode 100644
index 000000000..af58387b9
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/NewFileWizard.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.wizards;
+
+import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSCreate;
+import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSCreateFile;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+
+/**
+ * The wizard to create a new file in the file system of Target Explorer.
+ */
+public class NewFileWizard extends NewNodeWizard {
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.filesystem.internal.wizards.NewNodeWizard#createWizardPage()
+ */
+ @Override
+ protected NewNodeWizardPage createWizardPage() {
+ return new NewFileWizardPage();
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.filesystem.internal.wizards.NewNodeWizard#getCreateOp(org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode, java.lang.String)
+ */
+ @Override
+ protected FSCreate getCreateOp(FSTreeNode folder, String name) {
+ return new FSCreateFile(folder, name);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.filesystem.internal.wizards.NewNodeWizard#getTitle()
+ */
+ @Override
+ protected String getTitle() {
+ return Messages.NewFileWizard_NewFileWizardTitle;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/NewFileWizardPage.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/NewFileWizardPage.java
new file mode 100644
index 000000000..0fbbb02c9
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/NewFileWizardPage.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.wizards;
+
+import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+
+/**
+ * The wizard page to create a new file in the file system of Target Explorer.
+ */
+public class NewFileWizardPage extends NewNodeWizardPage {
+
+ /**
+ * Create a wizard page to create a new file in the specified folder.
+ */
+ public NewFileWizardPage() {
+ super("NewFileWizardPage"); //$NON-NLS-1$
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.filesystem.internal.wizards.NewNodeWizardPage#getPageTitle()
+ */
+ @Override
+ protected String getPageTitle() {
+ return Messages.NewFileWizardPage_NewFileWizardPageTitle;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.filesystem.internal.wizards.NewNodeWizardPage#getPageDescription()
+ */
+ @Override
+ protected String getPageDescription() {
+ return Messages.NewFileWizardPage_NewFileWizardPageDescription;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.filesystem.internal.wizards.NewNodeWizardPage#getNameFieldLabel()
+ */
+ @Override
+ protected String getNameFieldLabel() {
+ return Messages.NewFileWizardPage_NewFileWizardPageNameLabel;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/NewFolderWizard.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/NewFolderWizard.java
new file mode 100644
index 000000000..890c922a0
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/NewFolderWizard.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.wizards;
+
+import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSCreate;
+import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSCreateFolder;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+
+/**
+ * The wizard to create a new folder in the file system of Target Explorer.
+ */
+public class NewFolderWizard extends NewNodeWizard {
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.filesystem.internal.wizards.NewNodeWizard#createWizardPage()
+ */
+ @Override
+ protected NewNodeWizardPage createWizardPage() {
+ return new NewFolderWizardPage();
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.filesystem.internal.wizards.NewNodeWizard#getCreateOp(org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode, java.lang.String)
+ */
+ @Override
+ protected FSCreate getCreateOp(FSTreeNode folder, String name) {
+ return new FSCreateFolder(folder, name);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.filesystem.internal.wizards.NewNodeWizard#getTitle()
+ */
+ @Override
+ protected String getTitle() {
+ return Messages.NewFolderWizard_NewFolderWizardTitle;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/NewFolderWizardPage.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/NewFolderWizardPage.java
new file mode 100644
index 000000000..c3e699b56
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/NewFolderWizardPage.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.wizards;
+
+import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+
+/**
+ * The wizard page to create a new folder in the file system of Target Explorer.
+ */
+public class NewFolderWizardPage extends NewNodeWizardPage {
+
+ /**
+ * Create a wizard page to create a new folder in the specified folder.
+ */
+ public NewFolderWizardPage() {
+ super("NewFolderWizardPage"); //$NON-NLS-1$
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.filesystem.internal.wizards.NewNodeWizardPage#getPageTitle()
+ */
+ @Override
+ protected String getPageTitle() {
+ return Messages.NewFolderWizardPage_NewFolderWizardPageTitle;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.filesystem.internal.wizards.NewNodeWizardPage#getPageDescription()
+ */
+ @Override
+ protected String getPageDescription() {
+ return Messages.NewFolderWizardPage_NewFolderWizardPageDescription;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.filesystem.internal.wizards.NewNodeWizardPage#getNameFieldLabel()
+ */
+ @Override
+ protected String getNameFieldLabel() {
+ return Messages.NewFolderWizardPage_NewFolderWizardPageNameLabel;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/NewNodeWizard.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/NewNodeWizard.java
new file mode 100644
index 000000000..321dec2b5
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/NewNodeWizard.java
@@ -0,0 +1,211 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.wizards;
+
+import org.eclipse.jface.dialogs.IMessageProvider;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSCreate;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModelProperties;
+import org.eclipse.tcf.te.ui.wizards.AbstractWizard;
+import org.eclipse.ui.INewWizard;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchPartSite;
+import org.eclipse.ui.IWorkbenchWindow;
+
+/**
+ * The base wizard class to create a new file/folder in the file system of Target Explorer.
+ */
+public abstract class NewNodeWizard extends AbstractWizard implements INewWizard {
+ // The folder in which the new node is created.
+ private FSTreeNode folder;
+ // The target peer where the new node is created.
+ private IPeerModel peer;
+ // The wizard page used to create the new node.
+ private NewNodeWizardPage newPage;
+ // The workbench
+ private IWorkbench workbench;
+ /**
+ * Create an instance.
+ */
+ public NewNodeWizard() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.IWorkbenchWizard#init(org.eclipse.ui.IWorkbench, org.eclipse.jface.viewers.IStructuredSelection)
+ */
+ @Override
+ public void init(IWorkbench workbench, IStructuredSelection selection) {
+ this.workbench = workbench;
+ // Set the window title
+ setWindowTitle(getTitle());
+ if (!selection.isEmpty()) {
+ Object element = selection.getFirstElement();
+ if (element instanceof FSTreeNode) {
+ folder = (FSTreeNode) element;
+ if (folder.isFile()) {
+ // If the selected is a file, then create the node in the parent folder.
+ folder = folder.parent;
+ }
+ peer = folder.peerNode;
+ }
+ else if (element instanceof IPeerModel) {
+ if(hasFileSystem((IPeerModel) element)) {
+ peer = (IPeerModel) element;
+ }
+ }
+ }
+ }
+
+ /**
+ * Test if the specified target peer has a file system service.
+ *
+ * @param peer The target peer.
+ * @return true if it has a file system service.
+ */
+ public boolean hasFileSystem(final IPeerModel peer) {
+ if(Protocol.isDispatchThread()) {
+ String services = null;
+ services = peer.getStringProperty(IPeerModelProperties.PROP_REMOTE_SERVICES);
+ if (services != null) {
+ // Lookup each service individually
+ for (String service : services.split(",")) { //$NON-NLS-1$
+ if (service != null && service.trim().equals("FileSystem")) { //$NON-NLS-1$
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+ final boolean[] result = new boolean[1];
+ Protocol.invokeAndWait(new Runnable(){
+ @Override
+ public void run() {
+ result[0] = hasFileSystem(peer);
+ }});
+ return result[0];
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.wizard.Wizard#addPages()
+ */
+ @Override
+ public void addPages() {
+ if (peer == null) {
+ addPage(new TargetSelectionPage());
+ }
+ addPage(newPage = createWizardPage());
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.wizard.Wizard#performFinish()
+ */
+ @Override
+ public boolean performFinish() {
+ if (newPage != null) {
+ // Save the value so that next time it is used as the default input.
+ newPage.saveWidgetValues();
+ // Get the new name and create the node.
+ String name = newPage.getNodeName();
+ FSTreeNode dest = newPage.getInputDir();
+ FSCreate create = getCreateOp(dest, name);
+ boolean doit = create.doit();
+ if (!doit) {
+ // The the error message generated during creation.
+ newPage.setMessage(create.getError(), IMessageProvider.ERROR);
+ return false;
+ }
+ // Select the new node created.
+ FSTreeNode node = create.getNode();
+ IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
+ if (window != null) {
+ IWorkbenchPage page = window.getActivePage();
+ if (page != null) {
+ IWorkbenchPart part = page.getActivePart();
+ if (part != null) {
+ IWorkbenchPartSite site = part.getSite();
+ ISelectionProvider selProvider = site.getSelectionProvider();
+ ISelection selection = new StructuredSelection(node);
+ if (selProvider instanceof Viewer) {
+ // Select and make it visible.
+ ((Viewer) selProvider).setSelection(selection, true);
+ }
+ else {
+ selProvider.setSelection(selection);
+ }
+ }
+ }
+ }
+ }
+ return true;
+ }
+
+ /**
+ * Create a wizard page to create a new node.
+ *
+ * @return The new wizard page.
+ */
+ protected abstract NewNodeWizardPage createWizardPage();
+
+ /**
+ * Create a Create operation instance using the specified folder and the new name.
+ *
+ * @param folder The folder in which the new node is created.
+ * @param name The name of the new node.
+ * @return a FSCreate instance to do the creation.
+ */
+ protected abstract FSCreate getCreateOp(FSTreeNode folder, String name);
+
+ /**
+ * The wizard's title to be used.
+ *
+ * @return The wizard's title to be used.
+ */
+ protected abstract String getTitle();
+
+ /**
+ * Get the current target peer selected.
+ *
+ * @return The target peer selected.
+ */
+ public IPeerModel getPeer(){
+ return peer;
+ }
+
+ /**
+ * Set the currently selected target peer.
+ *
+ * @param peer The newly selected target peer.
+ */
+ public void setPeer(IPeerModel peer) {
+ this.peer = peer;
+ newPage.setPeer(peer);
+ }
+
+ /**
+ * Get the current selected folder.
+ *
+ * @return the current selected folder.
+ */
+ public FSTreeNode getFolder() {
+ return folder;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/NewNodeWizardPage.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/NewNodeWizardPage.java
new file mode 100644
index 000000000..d9df36d87
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/NewNodeWizardPage.java
@@ -0,0 +1,360 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.wizards;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.viewers.DecoratingLabelProvider;
+import org.eclipse.jface.viewers.ILabelDecorator;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.jface.wizard.IWizardContainer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.tcf.te.tcf.filesystem.controls.FSTreeContentProvider;
+import org.eclipse.tcf.te.tcf.filesystem.controls.FSTreeViewerSorter;
+import org.eclipse.tcf.te.tcf.filesystem.help.IContextHelpIds;
+import org.eclipse.tcf.te.tcf.filesystem.interfaces.IUIConstants;
+import org.eclipse.tcf.te.tcf.filesystem.internal.columns.FSTreeElementLabelProvider;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSModel;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.ui.controls.BaseEditBrowseTextControl;
+import org.eclipse.tcf.te.ui.forms.FormLayoutFactory;
+import org.eclipse.tcf.te.ui.trees.FilterDescriptor;
+import org.eclipse.tcf.te.ui.trees.ViewerStateManager;
+import org.eclipse.tcf.te.ui.wizards.pages.AbstractValidatingWizardPage;
+import org.eclipse.ui.IDecoratorManager;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+
+/**
+ * The base wizard page class to create a new file/folder in the file system of Target Explorer.
+ */
+public abstract class NewNodeWizardPage extends AbstractValidatingWizardPage {
+ // The form toolkit to create the content of the wizard page.
+ private FormToolkit toolkit;
+ // The control for the user to enter the new name.
+ private BaseEditBrowseTextControl nameControl;
+ // The control for the user to enter the parent directory
+ private BaseEditBrowseTextControl folderControl;
+ // The viewer of the file tree displaying the file system.
+ private TreeViewer treeViewer;
+
+ /**
+ * Create an instance page with the specified page name.
+ *
+ * @param pageName The page name.
+ */
+ public NewNodeWizardPage(String pageName) {
+ super(pageName);
+ }
+
+ /**
+ * Get the page's title.
+ *
+ * @return The page's title.
+ */
+ protected abstract String getPageTitle();
+
+ /**
+ * Get the page's description.
+ *
+ * @return The page's description.
+ */
+ protected abstract String getPageDescription();
+
+ /**
+ * Get the label of the text field to enter the new name.
+ *
+ * @return The label of the text field to enter the new name.
+ */
+ protected abstract String getNameFieldLabel();
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
+ */
+ @Override
+ public void createControl(Composite parent) {
+ // Setup title and description
+ setTitle(getPageTitle());
+ setDescription(getPageDescription());
+
+ // Create the forms toolkit
+ toolkit = new FormToolkit(parent.getDisplay());
+
+ // Create the main panel
+ Composite mainPanel = toolkit.createComposite(parent);
+ mainPanel.setLayout(FormLayoutFactory.createClearGridLayout(false, 1));
+ mainPanel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+ mainPanel.setBackground(parent.getBackground());
+
+ setControl(mainPanel);
+
+ // Setup the help
+ PlatformUI.getWorkbench().getHelpSystem()
+ .setHelp(mainPanel, IContextHelpIds.FS_NEW_FILE_WIZARD_PAGE);
+
+ // Do not validate the page while creating the controls
+ boolean changed = setValidationInProgress(true);
+ // Create the main panel sub controls
+ createMainPanelControls(mainPanel);
+ // Reset the validation in progress state
+ if (changed) setValidationInProgress(false);
+
+ // Adjust the font
+ Dialog.applyDialogFont(mainPanel);
+
+ // Validate the page for the first time
+ setPageComplete(false);
+ }
+
+ /**
+ * Create the main panel of this wizard page.
+ *
+ * @param parent The parent composite in which the page is created.
+ */
+ private void createMainPanelControls(Composite parent) {
+ Assert.isNotNull(parent);
+
+ // Create the client composite
+ Composite client = toolkit.createComposite(parent);
+ client.setLayout(FormLayoutFactory.createSectionClientGridLayout(false, 2));
+ client.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+ client.setBackground(parent.getBackground());
+
+ Label label = new Label(client, SWT.NONE);
+ GridData data = new GridData(SWT.FILL, SWT.CENTER, true, false);
+ data.horizontalSpan = 2;
+ label.setLayoutData(data);
+ label.setText(Messages.NewNodeWizardPage_PromptFolderLabel);
+
+ folderControl = new BaseEditBrowseTextControl(this);
+ folderControl.setIsGroup(false);
+ folderControl.setHasHistory(false);
+ folderControl.setHideBrowseButton(true);
+ folderControl.setHideLabelControl(true);
+ folderControl.setAdjustBackgroundColor(true);
+ folderControl.setHideEditFieldControlDecoration(true);
+ folderControl.setFormToolkit(toolkit);
+ folderControl.setParentControlIsInnerPanel(true);
+ folderControl.setupPanel(client);
+ folderControl.setEditFieldValidator(new FolderValidator(this));
+ NewNodeWizard wizard = getWizard();
+ FSTreeNode folder = wizard.getFolder();
+ if (folder != null) folderControl.setEditFieldControlText(folder.getLocation());
+
+ treeViewer = new TreeViewer(client, SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
+ data = new GridData(SWT.FILL, SWT.FILL, true, true);
+ data.horizontalSpan = 2;
+ data.heightHint = 193;
+ data.widthHint = 450;
+ treeViewer.getTree().setLayoutData(data);
+ treeViewer.setContentProvider(new FSTreeContentProvider());
+ treeViewer.setLabelProvider(createDecoratingLabelProvider(new FSTreeElementLabelProvider()));
+ treeViewer.setComparator(new FSTreeViewerSorter());
+ ViewerFilter folderFilter = new ViewerFilter() {
+ @Override
+ public boolean select(Viewer viewer, Object parentElement, Object element) {
+ if (element instanceof FSTreeNode) {
+ FSTreeNode node = (FSTreeNode) element;
+ return node.isDirectory() || node.type != null && node.type
+ .equals("FSPendingNode"); //$NON-NLS-1$
+ }
+ return false;
+ }
+ };
+ treeViewer.addFilter(folderFilter);
+ IPeerModel peer = wizard.getPeer();
+ if (peer != null) {
+ setInput(peer);
+ }
+ treeViewer.addSelectionChangedListener(new ISelectionChangedListener() {
+ @Override
+ public void selectionChanged(SelectionChangedEvent event) {
+ onSelectionChanged();
+ }
+ });
+ if (folder != null) treeViewer.setSelection(new StructuredSelection(folder));
+
+ nameControl = new BaseEditBrowseTextControl(this);
+ nameControl.setIsGroup(false);
+ nameControl.setHasHistory(false);
+ nameControl.setHideBrowseButton(true);
+ nameControl.setEditFieldLabel(getNameFieldLabel());
+ nameControl.setAdjustBackgroundColor(true);
+ nameControl.setFormToolkit(toolkit);
+ nameControl.setParentControlIsInnerPanel(true);
+ nameControl.setupPanel(client);
+ nameControl.setEditFieldValidator(new NameValidator(this));
+
+ if (folder == null) folderControl.getEditFieldControl().setFocus();
+ else nameControl.getEditFieldControl().setFocus();
+
+ // restore the widget values from the history
+ restoreWidgetValues();
+ }
+
+ /**
+ * Set the input of the tree viewer and apply the appropriate filters.
+ *
+ * @param input The tree viewer's input.
+ */
+ private void setInput(Object input) {
+ treeViewer.setInput(input);
+ FilterDescriptor[] filterDescriptors = ViewerStateManager.getInstance().getFilterDescriptors(IUIConstants.ID_TREE_VIEWER_FS, input);
+ if (filterDescriptors != null) {
+ for (FilterDescriptor descriptor : filterDescriptors) {
+ if (descriptor.isEnabled()) treeViewer.addFilter(descriptor.getFilter());
+ }
+ }
+ }
+
+ /**
+ * Create a decorating label provider using the specified label provider.
+ *
+ * @param labelProvider The label provider that actually provides labels and images.
+ * @return The decorating label provider.
+ */
+ private static ILabelProvider createDecoratingLabelProvider(ILabelProvider labelProvider) {
+ IWorkbench workbench = PlatformUI.getWorkbench();
+ IDecoratorManager manager = workbench.getDecoratorManager();
+ ILabelDecorator decorator = manager.getLabelDecorator();
+ return new DecoratingLabelProvider(labelProvider,decorator);
+ }
+
+ /**
+ * Event process handling method when the user select a new folder in the file tree.
+ */
+ protected void onSelectionChanged() {
+ if (treeViewer.getSelection() instanceof IStructuredSelection) {
+ IStructuredSelection selection = (IStructuredSelection) treeViewer.getSelection();
+ if (selection.getFirstElement() instanceof FSTreeNode) {
+ FSTreeNode folder = (FSTreeNode) selection.getFirstElement();
+ folderControl.setEditFieldControlText(folder.getLocation());
+ }
+ else {
+ folderControl.setEditFieldControlText(""); //$NON-NLS-1$
+ }
+ }
+
+ // Update the wizard container UI elements
+ IWizardContainer container = getContainer();
+ if (container != null && container.getCurrentPage() != null) {
+ container.updateWindowTitle();
+ container.updateTitleBar();
+ container.updateButtons();
+ }
+ validate();
+ }
+
+ /**
+ * Set a new peer as the input of the file tree. Called
+ * by the wizard to update the file tree when an alternative
+ * target peer is selected in the target selection page.
+ *
+ * @param peer The new target peer.
+ */
+ public void setPeer(IPeerModel peer) {
+ if (peer != null) {
+ treeViewer.setInput(peer);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.wizards.pages.AbstractValidatingWizardPage#validate()
+ */
+ @Override
+ public void validate() {
+ super.validate();
+ if (!isPageComplete()) return;
+
+ if (isValidationInProgress()) return;
+ setValidationInProgress(true);
+
+ boolean valid = true;
+ if (folderControl != null) {
+ valid &= folderControl.isValid();
+ setMessage(folderControl.getMessage(), folderControl.getMessageType());
+ }
+
+ if (nameControl != null) {
+ valid &= nameControl.isValid();
+ if (nameControl.getMessageType() > getMessageType()) {
+ setMessage(nameControl.getMessage(), nameControl.getMessageType());
+ }
+ }
+
+ setPageComplete(valid);
+ setValidationInProgress(false);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.dialogs.DialogPage#dispose()
+ */
+ @Override
+ public void dispose() {
+ if (nameControl != null) {
+ nameControl.dispose();
+ nameControl = null;
+ }
+ super.dispose();
+ }
+
+ /**
+ * Get the entered name of this node.
+ *
+ * @return The entered name of this node.
+ */
+ public String getNodeName() {
+ return nameControl.getEditFieldControlTextForValidation();
+ }
+
+ /**
+ * Get the parent wizard. Override the parent method to
+ * cast the result to NewNodeWizard.
+ */
+ @Override
+ public NewNodeWizard getWizard() {
+ return (NewNodeWizard) super.getWizard();
+ }
+
+ /**
+ * Get the currently input directory node. It parses
+ * the currently entered path and tries to find the
+ * corresponding directory node in the file system of
+ * the target peer.
+ *
+ * @return The directory node if it exists or else null.
+ */
+ public FSTreeNode getInputDir() {
+ NewNodeWizard wizard = getWizard();
+ IPeerModel peer = wizard.getPeer();
+ if (peer == null) return null;
+ final String text = folderControl.getEditFieldControlText();
+ if (text != null) {
+ String path = text.trim();
+ return FSModel.findTreeNode(peer, path);
+ }
+ return null;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/internal/navigator/ContentProviderDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/TargetContentProvider.java
index 92b6b03fc..2526bdc26 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/internal/navigator/ContentProviderDelegate.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/TargetContentProvider.java
@@ -1,123 +1,97 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.te.tcf.ui.internal.navigator;
-
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.te.tcf.locator.interfaces.IModelListener;
-import org.eclipse.tm.te.tcf.locator.interfaces.nodes.ILocatorModel;
-import org.eclipse.tm.te.tcf.locator.interfaces.nodes.IPeerModel;
-import org.eclipse.tm.te.tcf.locator.interfaces.services.ILocatorModelRefreshService;
-import org.eclipse.tm.te.tcf.ui.model.Model;
-import org.eclipse.tm.te.ui.views.interfaces.IRoot;
-import org.eclipse.ui.navigator.CommonViewer;
-
-
-/**
- * Content provider delegate implementation.
- */
-public class ContentProviderDelegate implements ITreeContentProvider {
- private final static Object[] NO_ELEMENTS = new Object[0];
-
- // The locator model listener instance
- /* default */ IModelListener modelListener = null;
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object)
- */
- @Override
- public Object[] getChildren(Object parentElement) {
- Object[] children = NO_ELEMENTS;
-
- // If the parent element is null or IRoot, than we assume
- // the locator model as parent element.
- if (parentElement == null || parentElement instanceof IRoot) {
- parentElement = Model.getModel();
- }
- // If it is the locator model, get the peers
- if (parentElement instanceof ILocatorModel) {
- children = ((ILocatorModel)parentElement).getPeers();
- }
-
- return children;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object)
- */
- @Override
- public Object getParent(Object element) {
- // If it is a peer model node, return the parent locator model
- if (element instanceof IPeerModel) {
- return ((IPeerModel)element).getModel();
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object)
- */
- @Override
- public boolean hasChildren(Object element) {
- boolean hasChildren = false;
-
- if (element instanceof ILocatorModel) {
- hasChildren = ((ILocatorModel)element).getPeers().length > 0;
- }
-
- return hasChildren;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
- */
- @Override
- public Object[] getElements(Object inputElement) {
- return getChildren(inputElement);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IContentProvider#dispose()
- */
- @Override
- public void dispose() {
- Model.dispose();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
- */
- @Override
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- final ILocatorModel model = Model.getModel();
-
- // Create and attach the model listener if not yet done
- if (modelListener == null && model != null && viewer instanceof CommonViewer) {
- modelListener = new ModelListener(model, (CommonViewer)viewer);
- Protocol.invokeLater(new Runnable() {
- @Override
- public void run() {
- model.addListener(modelListener);
- }
- });
- }
-
- if (model != null && newInput instanceof IRoot) {
- // Refresh the model asynchronously
- Protocol.invokeLater(new Runnable() {
- @Override
- public void run() {
- model.getService(ILocatorModelRefreshService.class).refresh();
- }
- });
- }
- }
-}
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.wizards;
+
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.ILocatorModel;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.tcf.locator.interfaces.services.ILocatorModelRefreshService;
+import org.eclipse.tcf.te.tcf.locator.model.Model;
+import org.eclipse.tcf.te.ui.views.interfaces.IRoot;
+
+/**
+ * The content provider used by TargetSelectionPage to provide the current
+ * target list.
+ */
+public class TargetContentProvider implements ITreeContentProvider {
+ private final static Object[] NO_ELEMENTS = new Object[0];
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object)
+ */
+ @Override
+ public Object[] getChildren(Object parentElement) {
+ Object[] children = NO_ELEMENTS;
+ // If it is the locator model, get the peers
+ if (parentElement instanceof ILocatorModel) {
+ children = ((ILocatorModel)parentElement).getPeers();
+ }
+ return children;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object)
+ */
+ @Override
+ public Object getParent(Object element) {
+ // If it is a peer model node, return the parent locator model
+ if (element instanceof IPeerModel) {
+ return ((IPeerModel)element).getModel();
+ }
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object)
+ */
+ @Override
+ public boolean hasChildren(Object element) {
+ boolean hasChildren = false;
+ if (element instanceof ILocatorModel) {
+ hasChildren = ((ILocatorModel)element).getPeers().length > 0;
+ }
+ return hasChildren;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
+ */
+ @Override
+ public Object[] getElements(Object inputElement) {
+ return getChildren(inputElement);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.IContentProvider#dispose()
+ */
+ @Override
+ public void dispose() {
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
+ */
+ @Override
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ final ILocatorModel model = Model.getModel();
+ if (model != null && newInput instanceof IRoot) {
+ // Refresh the model asynchronously
+ Protocol.invokeLater(new Runnable() {
+ @Override
+ public void run() {
+ model.getService(ILocatorModelRefreshService.class).refresh();
+ }
+ });
+ }
+ }
+}
+
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/TargetPatternFilter.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/TargetPatternFilter.java
new file mode 100644
index 000000000..ed16bf508
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/TargetPatternFilter.java
@@ -0,0 +1,49 @@
+package org.eclipse.tcf.te.tcf.filesystem.internal.wizards;
+
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.tcf.ui.navigator.LabelProvider;
+import org.eclipse.ui.dialogs.PatternFilter;
+
+/**
+ * A class that handles filtering wizard node items based on a supplied matching
+ * string and keywords
+ * <p>
+ * This class is copied and adapted from <code>org.eclipse.ui.internal.dialogs.WizardPatternFilter</code>.
+ *
+ * @since 3.8
+ */
+public class TargetPatternFilter extends PatternFilter {
+ private LabelProvider targetLabelProvider = new LabelProvider();
+ /**
+ * Create a new instance of a WizardPatternFilter
+ * @param isMatchItem
+ */
+ public TargetPatternFilter() {
+ super();
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.internal.dialogs.PatternFilter#isElementSelectable(java.lang.Object)
+ */
+ @Override
+ public boolean isElementSelectable(Object element) {
+ return element instanceof IPeerModel;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.internal.dialogs.PatternFilter#isElementMatch(org.eclipse.jface.viewers.Viewer, java.lang.Object)
+ */
+ @Override
+ protected boolean isLeafMatch(Viewer viewer, Object element) {
+ if ( element instanceof IPeerModel) {
+ String text = targetLabelProvider.getText(element);
+ if (wordMatches(text)) {
+ return true;
+ }
+ }
+ return false;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/TargetSelectionPage.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/TargetSelectionPage.java
new file mode 100644
index 000000000..30fd1a3f2
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/TargetSelectionPage.java
@@ -0,0 +1,296 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.internal.wizards;
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogSettings;
+import org.eclipse.jface.dialogs.IMessageProvider;
+import org.eclipse.jface.viewers.DoubleClickEvent;
+import org.eclipse.jface.viewers.IBasicPropertyConstants;
+import org.eclipse.jface.viewers.IDoubleClickListener;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerComparator;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.jface.wizard.IWizardContainer;
+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.tcf.te.tcf.filesystem.nls.Messages;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.tcf.locator.model.Model;
+import org.eclipse.tcf.te.tcf.ui.navigator.LabelProvider;
+import org.eclipse.tcf.te.ui.activator.UIPlugin;
+import org.eclipse.tcf.te.ui.interfaces.IUIConstants;
+import org.eclipse.tcf.te.ui.wizards.pages.AbstractValidatingWizardPage;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.dialogs.FilteredTree;
+import org.eclipse.ui.dialogs.PatternFilter;
+
+/**
+ * The New Target creation wizard selection page implementation.
+ * <p>
+ * This class is copied and adapted from <code>org.eclipse.tcf.te.ui.wizards.newWizard.NewWizardSelectionPage</code>.
+ *
+ * @since 3.8
+ */
+public class TargetSelectionPage extends AbstractValidatingWizardPage {
+ // References to the page subcontrol's
+ private FilteredTree filteredTree;
+ private PatternFilter filteredTreeFilter;
+
+ // The workbench instance as passed in by init(...)
+ private IWorkbench workbench;
+ // The selection as passed in by init(...)
+ private IStructuredSelection selection;
+ // The tree viewer to display the targets.
+ private TreeViewer treeViewer;
+
+ /**
+ * Internal class. The wizard viewer comparator is responsible for the sorting in the tree.
+ * Current implementation is not prioritizing categories.
+ */
+ /* default */static class TargetViewerComparator extends ViewerComparator {
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ViewerComparator#isSorterProperty(java.lang.Object,
+ * java.lang.String)
+ */
+ @Override
+ public boolean isSorterProperty(Object element, String property) {
+ // The comparator is affected if the label of the elements should change.
+ return property.equals(IBasicPropertyConstants.P_TEXT);
+ }
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param wizardRegistry The new target wizard registry. Must not be <code>null</code>.
+ */
+ public TargetSelectionPage() {
+ super(TargetSelectionPage.class.getSimpleName());
+ setTitle(getDefaultTitle());
+ setDescription(getDefaultDescription());
+ }
+
+ @Override
+ public NewNodeWizard getWizard() {
+ return (NewNodeWizard) super.getWizard();
+ }
+ /**
+ * Returns the default page title.
+ *
+ * @return The default page title. Must be never <code>null</code>.
+ */
+ protected String getDefaultTitle() {
+ return Messages.TargetSelectionPage_Title;
+ }
+
+ /**
+ * Returns the default page description.
+ *
+ * @return The default page description. Must be never <code>null</code>.
+ */
+ protected String getDefaultDescription() {
+ return Messages.TargetSelectionPage_Description;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
+ */
+ @Override
+ public void createControl(Composite parent) {
+ Composite composite = new Composite(parent, SWT.NONE);
+ composite.setLayout(new GridLayout());
+ composite.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ Label label = new Label(composite, SWT.NONE);
+ label.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ label.setText(Messages.TargetSelectionPage_Targets);
+ label.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+ filteredTreeFilter = new TargetPatternFilter();
+ filteredTree = new FilteredTree(composite, SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER, filteredTreeFilter, true);
+ filteredTree.setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
+ GridData layoutData = new GridData(GridData.FILL_BOTH);
+ layoutData.heightHint = 250;
+ layoutData.widthHint = 450;
+ filteredTree.setLayoutData(layoutData);
+
+ treeViewer = filteredTree.getViewer();
+ treeViewer.setContentProvider(new TargetContentProvider());
+ treeViewer.setLabelProvider(new LabelProvider());
+ treeViewer.setComparator(new TargetViewerComparator());
+ ViewerFilter fsPeerFilter = new ViewerFilter() {
+ @Override
+ public boolean select(Viewer viewer, Object parentElement, Object element) {
+ if (element instanceof IPeerModel) {
+ IPeerModel peer = (IPeerModel) element;
+ NewNodeWizard wizard = getWizard();
+ return wizard.hasFileSystem(peer);
+ }
+ return false;
+ }
+ };
+ treeViewer.addFilter(fsPeerFilter);
+ treeViewer.addSelectionChangedListener(new ISelectionChangedListener() {
+ @Override
+ public void selectionChanged(SelectionChangedEvent event) {
+ onSelectionChanged();
+ }
+ });
+ treeViewer.addDoubleClickListener(new IDoubleClickListener() {
+ @Override
+ public void doubleClick(DoubleClickEvent event) {
+ // Double-click on a connection type is triggering the sub wizard
+ if (event.getSelection() instanceof IStructuredSelection) {
+ IStructuredSelection selection = (IStructuredSelection) event.getSelection();
+ // The tree is single selection, so look for the first element only.
+ Object element = selection.getFirstElement();
+ if (element instanceof IPeerModel) {
+ // Double-click on a connection type is triggering the sub wizard
+ getWizard().getContainer().showPage(getNextPage());
+ }
+ else if (event.getViewer() instanceof TreeViewer) {
+ TreeViewer viewer = (TreeViewer) event.getViewer();
+ if (viewer.isExpandable(element)) {
+ viewer.setExpandedState(element, !viewer.getExpandedState(element));
+ }
+ }
+ }
+ }
+ });
+
+ treeViewer.setInput(Model.getModel());
+ NewNodeWizard wizard = getWizard();
+ IPeerModel peer = wizard.getPeer();
+ if (wizard.getPeer() != null) {
+ treeViewer.setSelection(new StructuredSelection(peer), true);
+ }
+
+ // apply the standard dialog font
+ Dialog.applyDialogFont(composite);
+
+ setControl(composite);
+
+ // Restore the tree state
+ restoreWidgetValues();
+
+ // Initialize the context help id
+ PlatformUI.getWorkbench().getHelpSystem()
+ .setHelp(getControl(), IUIConstants.HELP_NEW_WIZARD_SELECTION_PAGE);
+
+ setPageComplete(peer != null);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.wizards.pages.AbstractValidatingWizardPage#validate()
+ */
+ @Override
+ public void validate() {
+ super.validate();
+ if (!isPageComplete()) return;
+ if (isValidationInProgress()) return;
+ setValidationInProgress(true);
+ boolean valid = true;
+ ISelection selection = treeViewer.getSelection();
+ if (selection.isEmpty()) {
+ setMessage(getDefaultDescription(), IMessageProvider.ERROR);
+ valid = false;
+ }
+ setPageComplete(valid);
+ setValidationInProgress(false);
+ }
+
+ /**
+ * Initialize the page with the current workbench instance and the current workbench selection.
+ *
+ * @param workbench The current workbench.
+ * @param selection The current object selection.
+ */
+ public void init(IWorkbench workbench, IStructuredSelection selection) {
+ this.workbench = workbench;
+ this.selection = selection;
+ }
+
+ /**
+ * Returns the current workbench.
+ *
+ * @return The current workbench or <code>null</code> if not set.
+ */
+ public IWorkbench getWorkbench() {
+ return workbench;
+ }
+
+ /**
+ * Returns the current object selection.
+ *
+ * @return The current object selection or <code>null</code> if not set.
+ */
+ public IStructuredSelection getSelection() {
+ return selection;
+ }
+
+ /**
+ * Called from the selection listener to propagate the current system type selection to the
+ * underlying wizard.
+ */
+ protected void onSelectionChanged() {
+ if (filteredTree.getViewer().getSelection() instanceof IStructuredSelection) {
+ IStructuredSelection filteredTreeSelection = (IStructuredSelection) filteredTree
+ .getViewer().getSelection();
+ NewNodeWizard wizard = getWizard();
+ if (filteredTreeSelection.getFirstElement() instanceof IPeerModel) {
+ wizard.setPeer((IPeerModel) filteredTreeSelection.getFirstElement());
+ }
+ else {
+ wizard.setPeer(null);
+ }
+ }
+
+ // Update the wizard container UI elements
+ IWizardContainer container = getContainer();
+ if (container != null && container.getCurrentPage() != null) {
+ container.updateWindowTitle();
+ container.updateTitleBar();
+ container.updateButtons();
+ }
+ validate();
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.wizard.WizardPage#getDialogSettings()
+ */
+ @Override
+ protected IDialogSettings getDialogSettings() {
+ // If the wizard is set and returns dialog settings, we re-use them here
+ IDialogSettings settings = super.getDialogSettings();
+ // If the dialog settings could not set from the wizard, fallback to the plugin's
+ // dialog settings store.
+ if (settings == null) settings = UIPlugin.getDefault().getDialogSettings();
+ String sectionName = this.getClass().getName();
+ if (settings.getSection(sectionName) == null) settings.addNewSection(sectionName);
+ settings = settings.getSection(sectionName);
+
+ return settings;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/model/CacheState.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/model/CacheState.java
index a452855e4..a30ecae3d 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/model/CacheState.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/model/CacheState.java
@@ -8,7 +8,7 @@
* Wind River Systems - initial API and implementation
* William Chen (Wind River)- [345552] Edit the remote files with a proper editor
*******************************************************************************/
-package org.eclipse.tm.te.tcf.filesystem.model;
+package org.eclipse.tcf.te.tcf.filesystem.model;
/**
* The enumeration that defines the states of a file's local cache, including "consistent", "modified",
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/model/FSModel.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/model/FSModel.java
new file mode 100644
index 000000000..8767684a0
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/model/FSModel.java
@@ -0,0 +1,298 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.model;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.SafeRunner;
+import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.jface.util.SafeRunnable;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.services.IFileSystem;
+import org.eclipse.tcf.te.runtime.utils.Host;
+import org.eclipse.tcf.te.tcf.filesystem.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.filesystem.internal.exceptions.TCFException;
+import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSCreateRoot;
+import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSOperation;
+import org.eclipse.tcf.te.tcf.filesystem.internal.testers.TargetPropertyTester;
+import org.eclipse.tcf.te.tcf.filesystem.internal.utils.CacheManager;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.tcf.locator.model.Model;
+import org.eclipse.tcf.te.ui.interfaces.IViewerInput;
+
+/**
+ * The file system model implementation.
+ */
+public final class FSModel {
+ /* default */static final String FSMODEL_KEY = UIPlugin.getUniqueIdentifier() + ".file.system"; //$NON-NLS-1$
+ // All of the file system models used for global notification.
+ private static List<FSModel> allModels;
+
+ /**
+ * Add a file system model to the list.
+ *
+ * @param model The new file system model.
+ */
+ private static void addModel(FSModel model) {
+ if (allModels == null) {
+ allModels = Collections.synchronizedList(new ArrayList<FSModel>());
+ }
+ allModels.add(model);
+ }
+
+ /**
+ * Notify all the file system model that the model has changed.
+ */
+ public static void notifyAllChanged() {
+ if (allModels != null) {
+ for (FSModel model : allModels) {
+ IViewerInput viewerInput = (IViewerInput) model.peerModel.getAdapter(IViewerInput.class);
+ PropertyChangeEvent event = new PropertyChangeEvent(model.peerModel, "state", null, null); //$NON-NLS-1$
+ viewerInput.firePropertyChange(event);
+ }
+ }
+ }
+
+ /**
+ * Get the file system model of the peer model. If it does not
+ * exist yet, create a new instance and store it.
+ *
+ * @param peerModel The peer model
+ * @return The file system model connected this peer model.
+ */
+ public static FSModel getFSModel(final IPeerModel peerModel) {
+ if (peerModel != null) {
+ if (Protocol.isDispatchThread()) {
+ FSModel model = (FSModel) peerModel.getProperty(FSMODEL_KEY);
+ if (model == null) {
+ model = new FSModel(peerModel);
+ peerModel.setProperty(FSMODEL_KEY, model);
+ }
+ return model;
+ }
+ final FSModel[] result = new FSModel[1];
+ Protocol.invokeAndWait(new Runnable() {
+ @Override
+ public void run() {
+ result[0] = getFSModel(peerModel);
+ }
+ });
+ return result[0];
+ }
+ return null;
+ }
+
+ // The root node of the peer model
+ private FSTreeNode root;
+ private IPeerModel peerModel;
+ /**
+ * Create a File System Model.
+ */
+ private FSModel(IPeerModel peerModel) {
+ this.peerModel = peerModel;
+ addModel(this);
+ }
+
+ /**
+ * Get the root node of the peer model.
+ *
+ * @return The root node.
+ */
+ public FSTreeNode getRoot() {
+ return root;
+ }
+
+ /**
+ * Set the root node of the peer model.
+ *
+ * @param root The root node
+ */
+ public void setRoot(FSTreeNode root) {
+ this.root = root;
+ }
+
+ /**
+ * Get the corresponding FSTreeNode based on the path of the local cache file.
+ *
+ * @param filePath The local cache's file path.
+ * @return The FSTreeNode.
+ */
+ public static FSTreeNode getTreeNode(String filePath) {
+ String cache_root = CacheManager.getInstance().getCacheRoot().getAbsolutePath();
+ if (filePath.startsWith(cache_root)) {
+ filePath = filePath.substring(cache_root.length() + 1);
+ int slash = filePath.indexOf(File.separator);
+ if (slash != -1) {
+ String peerId = filePath.substring(0, slash);
+ peerId = peerId.replace(CacheManager.PATH_ESCAPE_CHAR, ':');
+ Map<String, IPeerModel> peers = (Map<String, IPeerModel>) Model.getModel().getAdapter(Map.class);
+ IPeerModel peer = peers.get(peerId);
+ if (peer != null) {
+ boolean hostWindows = Host.isWindowsHost();
+ boolean windows = TargetPropertyTester.isWindows(peer);
+ filePath = filePath.substring(slash + 1);
+ if (hostWindows) {
+ if (windows) {
+ slash = filePath.indexOf(File.separator);
+ if (slash != -1) {
+ String disk = filePath.substring(0, slash);
+ filePath = filePath.substring(slash + 1);
+ disk = disk.replace(CacheManager.PATH_ESCAPE_CHAR, ':');
+ filePath = disk + File.separator + filePath;
+ }
+ }
+ else {
+ filePath = "/" + filePath.replace('\\', '/'); //$NON-NLS-1$
+ }
+ }
+ else {
+ if (windows) {
+ slash = filePath.indexOf(File.separator);
+ if (slash != -1) {
+ String disk = filePath.substring(0, slash);
+ filePath = filePath.substring(slash + 1);
+ disk = disk.replace(CacheManager.PATH_ESCAPE_CHAR, ':');
+ filePath = disk + File.separator + filePath;
+ }
+ filePath = filePath.replace(File.separatorChar, '\\');
+ }
+ else {
+ filePath = "/" + filePath; //$NON-NLS-1$
+ }
+ }
+ return findTreeNode(peer, filePath);
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Find the tree node in the peer's file system tree.
+ *
+ * @param peer The peer model.
+ * @param path The relative path to the cache file.
+ * @return The FSTreeNode corresponding to this file.
+ */
+ public static FSTreeNode findTreeNode(final IPeerModel peer, final String path) {
+ FSModel fsModel = getFSModel(peer);
+ FSTreeNode root = fsModel.getRoot();
+ if (root == null) {
+ FSCreateRoot fsRoot = new FSCreateRoot(peer);
+ root = fsRoot.create();
+ fsModel.setRoot(root);
+ }
+ Object[] elements = FSOperation.getCurrentChildren(root).toArray();
+ if (elements != null && elements.length != 0 && path.length() != 0) {
+ final FSTreeNode[] children = new FSTreeNode[elements.length];
+ System.arraycopy(elements, 0, children, 0, elements.length);
+ final FSTreeNode[] result = new FSTreeNode[1];
+ SafeRunner.run(new SafeRunnable() {
+ @Override
+ public void run() throws Exception {
+ result[0] = findPath(peer.getPeer(), children, path);
+ }
+ });
+ return result[0];
+ }
+ return null;
+ }
+
+ /**
+ * Search the path in the children list. If it exists, then search the children of the found
+ * node recursively until the whole path is found. Or else return null.
+ *
+ * @param children The children nodes to search the path.
+ * @param path The path to be searched.
+ * @return The leaf node that has the searched path.
+ * @throws TCFException Thrown during searching.
+ */
+ static FSTreeNode findPath(IPeer peer, FSTreeNode[] children, String path) throws TCFException {
+ Assert.isTrue(children != null && children.length != 0);
+ Assert.isTrue(path != null && path.length() != 0);
+ FSTreeNode node = children[0];
+ String osPathSep = node.isWindowsNode() ? "\\" : "/"; //$NON-NLS-1$ //$NON-NLS-2$
+ int delim = path.indexOf(osPathSep);
+ String segment = null;
+ if (delim != -1) {
+ segment = path.substring(0, delim);
+ path = path.substring(delim + 1);
+ if (node.isRoot()) {
+ // If it is root directory, the name ends with the path separator.
+ segment += osPathSep;
+ }
+ }
+ else {
+ segment = path;
+ path = null;
+ }
+ node = findPathSeg(children, segment);
+ if (path == null || path.trim().length() == 0) {
+ // The end of the path.
+ return node;
+ }
+ else if (node != null) {
+ if (node.isDirectory()) {
+ children = getUpdatedChildren(peer, node);
+ }
+ else {
+ children = null;
+ }
+ if (children != null && children.length != 0) {
+ return findPath(peer, children, path);
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Get the updated children of the directory node. If the node is already updated, i.e., its
+ * children are queried, then return its current children. If the node is not yet queried, then
+ * query its children before getting its children.
+ *
+ * @param folder The directory node.
+ * @return The nodes of the updated children.
+ * @throws TCFException Thrown during updating.
+ */
+ static private FSTreeNode[] getUpdatedChildren(IPeer peer, final FSTreeNode folder) throws TCFException {
+ if (folder.childrenQueried) {
+ List<FSTreeNode> list = FSOperation.getCurrentChildren(folder);
+ return list.toArray(new FSTreeNode[list.size()]);
+ }
+ IChannel channel = FSOperation.openChannel(folder.peerNode.getPeer());
+ IFileSystem service = FSOperation.getBlockingFileSystem(channel);
+ List<FSTreeNode> list = new FSOperation().getChildren(folder, service);
+ return list.toArray(new FSTreeNode[list.size()]);
+ }
+
+ /**
+ * Find in the children array the node that has the specified name.
+ *
+ * @param children The children array in which to find the node.
+ * @param name The name of the node to be searched.
+ * @return The node that has the specified name.
+ */
+ static private FSTreeNode findPathSeg(FSTreeNode[] children, String name) {
+ for (FSTreeNode child : children) {
+ if (child.isWindowsNode()) {
+ if (child.name.equalsIgnoreCase(name)) return child;
+ }
+ else if (child.name.equals(name)) return child;
+ }
+ return null;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/model/FSTreeNode.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/model/FSTreeNode.java
index ef28c67b6..3ffd61a2d 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/model/FSTreeNode.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/model/FSTreeNode.java
@@ -10,7 +10,7 @@
* William Chen (Wind River) - [352302]Opening a file in an editor depending on
* the client's permissions.
*******************************************************************************/
-package org.eclipse.tm.te.tcf.filesystem.model;
+package org.eclipse.tcf.te.tcf.filesystem.model;
import java.net.MalformedURLException;
import java.net.URL;
@@ -22,14 +22,20 @@ import java.util.Map;
import java.util.UUID;
import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.PlatformObject;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.tcf.services.IFileSystem;
-import org.eclipse.tm.te.tcf.filesystem.interfaces.IWindowsFileAttributes;
-import org.eclipse.tm.te.tcf.filesystem.internal.UserAccount;
-import org.eclipse.tm.te.tcf.filesystem.internal.handlers.UserManager;
-import org.eclipse.tm.te.tcf.filesystem.internal.url.TcfURLConnection;
-import org.eclipse.tm.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.core.runtime.content.IContentType;
+import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.services.IFileSystem;
+import org.eclipse.tcf.te.tcf.filesystem.interfaces.IWindowsFileAttributes;
+import org.eclipse.tcf.te.tcf.filesystem.internal.UserAccount;
+import org.eclipse.tcf.te.tcf.filesystem.internal.testers.TargetPropertyTester;
+import org.eclipse.tcf.te.tcf.filesystem.internal.url.TcfURLConnection;
+import org.eclipse.tcf.te.tcf.filesystem.internal.utils.UserManager;
+import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.ui.interfaces.IViewerInput;
/**
* Representation of a file system tree node.
@@ -98,25 +104,54 @@ public final class FSTreeNode extends PlatformObject implements Cloneable{
*/
@Override
public Object clone() {
- FSTreeNode clone;
- try {
- clone = (FSTreeNode) super.clone();
- } catch (CloneNotSupportedException e) {
- clone = new FSTreeNode();
- clone.children = children;
- clone.childrenQueried = childrenQueried;
- clone.childrenQueryRunning = childrenQueryRunning;
- clone.name = name;
- clone.parent = parent;
- clone.peerNode = peerNode;
- clone.type = type;
- }
- Map<String, Object> attributes = new HashMap<String, Object>(attr.attributes);
- clone.attr = new IFileSystem.FileAttrs(attr.flags, attr.size, attr.uid, attr.gid, attr.permissions, attr.atime, attr.mtime, attributes);
- return clone;
+ if (Protocol.isDispatchThread()) {
+ FSTreeNode clone = new FSTreeNode();
+ clone.childrenQueried = childrenQueried;
+ clone.childrenQueryRunning = childrenQueryRunning;
+ clone.name = name;
+ clone.parent = parent;
+ clone.peerNode = peerNode;
+ clone.type = type;
+ if (attr != null) {
+ Map<String, Object> attributes = new HashMap<String, Object>(attr.attributes);
+ clone.attr = new IFileSystem.FileAttrs(attr.flags, attr.size, attr.uid, attr.gid, attr.permissions, attr.atime, attr.mtime, attributes);
+ } else {
+ clone.attr = null;
+ }
+ return clone;
+ }
+ final Object[] objects = new Object[1];
+ Protocol.invokeAndWait(new Runnable() {
+
+ @Override
+ public void run() {
+ objects[0] = FSTreeNode.this.clone();
+ }
+ });
+ return objects[0];
}
/**
+ * Change the file/folder's write permission.
+ * @param b true if the agent is granted with its write permission.
+ */
+ public void setWritable(boolean b) {
+ UserAccount account = UserManager.getInstance().getUserAccount(peerNode);
+ if (account != null && attr != null) {
+ int bit;
+ if (attr.uid == account.getEUID()) {
+ bit = IFileSystem.S_IWUSR;
+ } else if (attr.gid == account.getEGID()) {
+ bit = IFileSystem.S_IWGRP;
+ } else {
+ bit = IFileSystem.S_IWOTH;
+ }
+ int permissions = attr.permissions;
+ setPermissions(b ? (permissions | bit):(permissions & ~ bit));
+ }
+ }
+
+ /**
* Set the file's permissions.
* @param permissions The new permissions.
*/
@@ -126,7 +161,7 @@ public final class FSTreeNode extends PlatformObject implements Cloneable{
/*
* (non-Javadoc)
- *
+ *
* @see java.lang.Object#hashCode()
*/
@Override
@@ -139,7 +174,7 @@ public final class FSTreeNode extends PlatformObject implements Cloneable{
* <p>
* <b>Note:</b> This method must be called from within the TCF event
* dispatch thread only!
- *
+ *
* @return The children list storage object.
*/
public final List<FSTreeNode> getChildren() {
@@ -149,7 +184,7 @@ public final class FSTreeNode extends PlatformObject implements Cloneable{
/*
* (non-Javadoc)
- *
+ *
* @see java.lang.Object#equals(java.lang.Object)
*/
@Override
@@ -164,7 +199,7 @@ public final class FSTreeNode extends PlatformObject implements Cloneable{
/*
* (non-Javadoc)
- *
+ *
* @see java.lang.Object#toString()
*/
@Override
@@ -177,16 +212,28 @@ public final class FSTreeNode extends PlatformObject implements Cloneable{
/**
* Return if the node is a Windows file/folder node.
- *
+ *
* @return true if it is a Windows node, or else false.
*/
public boolean isWindowsNode() {
- return attr != null && attr.attributes != null && attr.attributes.containsKey(KEY_WIN32_ATTRS);
+ if (attr != null && attr.attributes != null) {
+ return attr.attributes.containsKey(KEY_WIN32_ATTRS);
+ }
+ if (peerNode != null) {
+ String OSName = TargetPropertyTester.getOSName(peerNode);
+ if(OSName != null){
+ return OSName.startsWith("Windows"); //$NON-NLS-1$
+ }
+ }
+ if (!children.isEmpty()) {
+ return children.get(0).isWindowsNode();
+ }
+ return false;
}
/**
* Return if the node is a file.
- *
+ *
* @return true if it is a file, or else false.
*/
public boolean isFile() {
@@ -195,7 +242,7 @@ public final class FSTreeNode extends PlatformObject implements Cloneable{
/**
* Return if the node is a directory.
- *
+ *
* @return true if it is a directory, or else false.
*/
public boolean isDirectory() {
@@ -204,7 +251,7 @@ public final class FSTreeNode extends PlatformObject implements Cloneable{
/**
* Return if the attribute specified by the mask bit is turned on.
- *
+ *
* @param bit
* The attribute's mask bit.
* @return true if it is on, or else false.
@@ -216,7 +263,7 @@ public final class FSTreeNode extends PlatformObject implements Cloneable{
}
return false;
}
-
+
/**
* Set the attribute specified by the mask bit to on or off.
* @param bit The attribute's mask bit.
@@ -243,7 +290,7 @@ public final class FSTreeNode extends PlatformObject implements Cloneable{
/**
* Return if this file/folder is hidden.
- *
+ *
* @return true if it is hidden, or else false.
*/
public boolean isHidden() {
@@ -260,7 +307,7 @@ public final class FSTreeNode extends PlatformObject implements Cloneable{
/**
* Return if this file/folder is read-only.
- *
+ *
* @return true if it is read-only, or else false.
*/
public boolean isReadOnly() {
@@ -278,34 +325,34 @@ public final class FSTreeNode extends PlatformObject implements Cloneable{
/**
* Get the location of a file/folder node using the format of the file
* system's platform.
- *
+ *
* @param node
* The file/folder node.
* @return The location of the file/folder.
*/
public String getLocation() {
- if (parent == null)
- return null;
- String location = parent.getLocation(false);
- if (parent.isRoot()) {
- return location + (isWindowsNode() ? "\\" : "/"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- return location;
+ return getLocation(false);
}
/**
* Get the location of a file/folder.
- *
+ *
* @param cross
* If the format is cross-platform.
* @return The path to the file/folder.
*/
public String getLocation(boolean cross) {
- if (parent == null)
- return null;
+ if(isRoot()) {
+ if(cross) {
+ if(isWindowsNode()) {
+ return name.substring(0, name.length() - 1) + "/"; //$NON-NLS-1$
+ }
+ }
+ return name;
+ }
String pLoc = parent.getLocation(cross);
- if (pLoc == null) {
- return name.substring(0, name.length() - 1);
+ if(parent.isRoot()) {
+ return pLoc + name;
}
String pathSep = (!cross && isWindowsNode()) ? "\\" : "/"; //$NON-NLS-1$ //$NON-NLS-2$
return pLoc + pathSep + name;
@@ -315,15 +362,15 @@ public final class FSTreeNode extends PlatformObject implements Cloneable{
* Get the URL of the file or folder. The URL's format is created in the
* following way: tcf:///<TCF_AGENT_ID>/remote/path/to/the/resource... See
* {@link TcfURLConnection#TcfURLConnection(URL)}
- *
+ *
* @return The URL of the file/folder.
* @throws MalformedURLException
*/
public URL getLocationURL() {
try {
- String id = peerNode.getPeer().getID();
+ String id = peerNode.getPeerId();
String path = getLocation(true);
- String location = TcfURLConnection.PROTOCOL_SCHEMA + ":/" + id + (isWindowsNode() ? "/" + path : path); //$NON-NLS-1$ //$NON-NLS-2$
+ String location = TcfURLConnection.PROTOCOL_SCHEMA + ":/" + id + (path.startsWith("/") ? path : "/" + path); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
return new URL(location);
} catch (MalformedURLException e) {
assert false;
@@ -333,16 +380,25 @@ public final class FSTreeNode extends PlatformObject implements Cloneable{
/**
* If this node is a root node.
- *
+ *
* @return true if this node is a root node.
*/
public boolean isRoot() {
- return type.endsWith("FSRootDirNode"); //$NON-NLS-1$
+ return type.endsWith("FSRootDirNode") || type.endsWith("FSRootNode"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ /**
+ * If this node is the system root.
+ *
+ * @return true if this node is the system root.
+ */
+ public boolean isSystemRoot() {
+ return type.endsWith("FSRootNode"); //$NON-NLS-1$
}
/**
* If this file is readable.
- *
+ *
* @return true if it is readable.
*/
public boolean isReadable() {
@@ -360,8 +416,21 @@ public final class FSTreeNode extends PlatformObject implements Cloneable{
}
/**
+ * If the agent is the owner of this file/folder.
+ *
+ * @return true if the agent is the owner of this file/folder.
+ */
+ public boolean isAgentOwner() {
+ UserAccount account = UserManager.getInstance().getUserAccount(peerNode);
+ if (account != null && attr != null) {
+ return attr.uid == account.getEUID();
+ }
+ return false;
+ }
+
+ /**
* If this file is writable.
- *
+ *
* @return true if it is writable.
*/
public boolean isWritable() {
@@ -380,7 +449,7 @@ public final class FSTreeNode extends PlatformObject implements Cloneable{
/**
* If this file is executable.
- *
+ *
* @return true if it is executable.
*/
public boolean isExecutable() {
@@ -396,4 +465,61 @@ public final class FSTreeNode extends PlatformObject implements Cloneable{
}
return false;
}
+
+ /**
+ * If this node is ancestor of the specified node.
+ * @return true if it is.
+ */
+ public boolean isAncestorOf(FSTreeNode node) {
+ if (node == null) return false;
+ if (node.parent == this) return true;
+ return isAncestorOf(node.parent);
+ }
+
+ /**
+ * Test if this file is a windows system file.
+ *
+ * @return true if it is a windows system file.
+ */
+ public boolean isSystem() {
+ return !isRoot() && isWindowsNode() && isWin32AttrOn(IWindowsFileAttributes.FILE_ATTRIBUTE_SYSTEM);
+ }
+
+ /**
+ * Get the type label of the file for displaying purpose.
+ *
+ * @return The type label text.
+ */
+ public String getFileType() {
+ if (type.equals("FSPendingNode")) {//$NON-NLS-1$
+ return ""; //$NON-NLS-1$
+ }
+ if (isRoot()) {
+ return Messages.FSTreeNode_TypeLocalDisk;
+ }
+ if (isDirectory()) {
+ return Messages.FSTreeNode_TypeFileFolder;
+ }
+ if (isSystem()) {
+ return Messages.FSTreeNode_TypeSystemFile;
+ }
+ IContentType contentType = Platform.getContentTypeManager().findContentTypeFor(name);
+ if (contentType != null) {
+ return contentType.getName();
+ }
+ int lastDot = name.lastIndexOf("."); //$NON-NLS-1$
+ if (lastDot == -1) {
+ return Messages.GeneralInformationPage_UnknownFileType;
+ }
+ return name.substring(lastDot + 1).toUpperCase() + " " + Messages.FSTreeNode_TypeFile; //$NON-NLS-1$
+ }
+
+ /**
+ * Fire a property change event for the node.
+ */
+ public void firePropertyChange() {
+ IViewerInput viewerInput = (IViewerInput) peerNode.getAdapter(IViewerInput.class);
+ PropertyChangeEvent event = new PropertyChangeEvent(this, "state", null, null); //$NON-NLS-1$
+ viewerInput.firePropertyChange(event);
+ }
}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/nls/Messages.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/nls/Messages.java
index d10328f6f..d8f34ce45 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/nls/Messages.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/nls/Messages.java
@@ -8,7 +8,7 @@
* Wind River Systems - initial API and implementation
* William Chen (Wind River) - [345384] Provide property pages for remote file system nodes
*******************************************************************************/
-package org.eclipse.tm.te.tcf.filesystem.internal.nls;
+package org.eclipse.tcf.te.tcf.filesystem.nls;
import java.lang.reflect.Field;
@@ -20,7 +20,7 @@ import org.eclipse.osgi.util.NLS;
public class Messages extends NLS {
// The plug-in resource bundle name
- private static final String BUNDLE_NAME = "org.eclipse.tm.te.tcf.filesystem.internal.nls.Messages"; //$NON-NLS-1$
+ private static final String BUNDLE_NAME = "org.eclipse.tcf.te.tcf.filesystem.nls.Messages"; //$NON-NLS-1$
/**
* Static constructor.
@@ -96,6 +96,7 @@ public class Messages extends NLS {
public static String AdvancedAttributesDialog_System;
public static String AdvancedAttributesDialog_Temporary;
public static String AdvancedAttributesDialog_Virtual;
+ public static String BasicFolderSection_BasicInfoText;
public static String CacheManager_Bytes;
public static String CacheManager_DowloadingFile;
@@ -115,11 +116,31 @@ public class Messages extends NLS {
public static String CmmitHandler_StateChangedDialogTitle;
public static String CmmitHandler_StateChangedMessage;
+ public static String FolderValidator_DirNotExist;
+ public static String FolderValidator_NotWritable;
+ public static String FolderValidator_SpecifyFolder;
+ public static String FSDelete_ButtonCancel;
+ public static String FSDelete_ButtonNo;
+ public static String FSDelete_ButtonYes;
+ public static String FSDelete_ButtonYes2All;
+ public static String FSDelete_CannotRemoveFile;
+ public static String FSDelete_CannotRemoveFolder;
+ public static String FSDelete_ConfirmDelete;
+ public static String FSDelete_ConfirmMessage;
+ public static String FSDelete_Deleting;
+ public static String FSDelete_PrepareToDelete;
+ public static String FSDelete_RemovingFileFolder;
+
+ public static String DeleteFilesHandler_DeleteMultipleFilesConfirmation;
+ public static String DeleteFilesHandler_DeleteOneFileConfirmation;
+ public static String DeleteFilesHandler_ConfirmDialogTitle;
+
public static String GeneralInformationPage_Accessed;
public static String GeneralInformationPage_Advanced;
public static String GeneralInformationPage_Attributes;
public static String GeneralInformationPage_Computer;
public static String GeneralInformationPage_File;
+ public static String GeneralInformationPage_FileSizeInfo;
public static String GeneralInformationPage_Folder;
public static String GeneralInformationPage_Hidden;
public static String GeneralInformationPage_Location;
@@ -128,18 +149,33 @@ public class Messages extends NLS {
public static String GeneralInformationPage_ReadOnly;
public static String GeneralInformationPage_Size;
public static String GeneralInformationPage_Type;
+ public static String GeneralInformationPage_PermissionText;
public static String GeneralInformationPage_PropertiesChangeFailure;
public static String GeneralInformationPage_PropertiesChangeTitle;
public static String GeneralInformationPage_UnknownFileType;
public static String FSExplorerTreeControl_section_title;
+ public static String FSFolderSelectionDialog_MoveDialogMessage;
+ public static String FSFolderSelectionDialog_MoveDialogTitle;
+
public static String FSTreeControl_column_name_label;
public static String FSTreeControl_column_size_label;
public static String FSTreeControl_column_modified_label;
+ public static String FSTreeNode_TypeFile;
+ public static String FSTreeNode_TypeFileFolder;
+ public static String FSTreeNode_TypeLocalDisk;
+ public static String FSTreeNode_TypeSystemFile;
+
+ public static String FSTreeNodeContentProvider_rootNode_label;
+
+ public static String FSOpenFileDialog_message;
public static String FSOpenFileDialog_title;
+ public static String FSOperation_CopyNOfFile;
+ public static String FSOperation_CopyOfFile;
+ public static String LinuxPermissionsSection_Permissions;
public static String LocalTypedElement_SavingFile;
public static String OpenFileHandler_Cancel;
@@ -155,6 +191,40 @@ public class Messages extends NLS {
public static String OpenWithMenu_NoEditorFound;
public static String OpenWithMenu_OpenWith;
+ public static String FSCopy_CannotCopyFile;
+ public static String FSCopy_CopyFileFolderTitle;
+ public static String FSCopy_Copying;
+ public static String FSCopy_CopyingFile;
+ public static String FSCopy_PrepareToCopy;
+
+ public static String FSMove_CannotMove;
+ public static String FSMove_FileExistsError;
+ public static String FSMove_FolderExistsError;
+ public static String FSMove_MovingFile;
+ public static String FSMove_Moving;
+ public static String FSMove_PrepareToMove;
+ public static String FSMove_MoveFileFolderTitle;
+
+ public static String FSDelete_DeleteFileFolderTitle;
+
+ public static String FSRename_CannotRename;
+ public static String FSRename_RenameFileFolderTitle;
+
+ public static String FSOperation_CannotCreateDirectory;
+ public static String FSOperation_ConfirmDialogCancel;
+ public static String FSOperation_ConfirmDialogNo;
+ public static String FSOperation_ConfirmDialogYes;
+ public static String FSOperation_ConfirmDialogYesToAll;
+ public static String FSOperation_ConfirmFileReplace;
+ public static String FSOperation_ConfirmFileReplaceMessage;
+ public static String FSOperation_ConfirmFolderReplaceMessage;
+ public static String FSOperation_ConfirmFolderReplaceTitle;
+ public static String FSOperation_NoFileSystemError;
+ public static String FSOperation_NotResponding;
+ public static String FSOperation_CannotOpenDir;
+ public static String FSOperation_CannotReadDir;
+ public static String FSOperation_TimedOutWhenOpening;
+
public static String PermissionsGroup_Executable;
public static String PermissionsGroup_GroupPermissions;
public static String PermissionsGroup_OtherPermissions;
@@ -162,7 +232,19 @@ public class Messages extends NLS {
public static String PermissionsGroup_UserPermissions;
public static String PermissionsGroup_Writable;
+ public static String RefreshDirectoryHandler_RefreshJobTitle;
+ public static String RefreshViewerHandler_RefreshJobTitle;
public static String RemoteTypedElement_GettingRemoteContent;
+ public static String RenameFilesHandler_PromptNewName;
+ public static String RenameFilesHandler_RenamePromptMessage;
+ public static String RenameFilesHandler_TitleRename;
+ public static String RenameFilesHandler_TitleRenameFile;
+ public static String RenameFilesHandler_TitleRenameFolder;
+ public static String FSRenamingAssistant_NameAlreadyExists;
+ public static String FSRenamingAssistant_NoNodeSelected;
+ public static String FSRenamingAssistant_SpecifyNonEmptyName;
+ public static String FSRenamingAssistant_UnixIllegalCharacters;
+ public static String FSRenamingAssistant_WinIllegalCharacters;
public static String SaveAllListener_Cancel;
public static String SaveAllListener_Merge;
@@ -186,6 +268,13 @@ public class Messages extends NLS {
public static String StateManager_TCFNotProvideFSMessage2;
public static String StateManager_UpdateFailureTitle;
+ public static String TargetExplorerPreferencePage_AutoSavingText;
+ public static String TargetExplorerPreferencePage_CopyOwnershipText;
+ public static String TargetExplorerPreferencePage_CopyPermissionText;
+ public static String TargetExplorerPreferencePage_RenamingOptionText;
+ public static String TargetSelectionPage_Description;
+ public static String TargetSelectionPage_Targets;
+ public static String TargetSelectionPage_Title;
public static String TcfInputStream_CloseTimeout;
public static String TcfInputStream_NoDataAvailable;
public static String TcfInputStream_NoFileReturned;
@@ -205,8 +294,8 @@ public class Messages extends NLS {
public static String TcfURLConnection_OpenFileTimeout;
public static String TcfURLConnection_OpenTCFChannelTimeout;
- public static String TCFUtilities_OpeningFailureMessage;
- public static String TCFUtilities_OpeningFailureTitle;
+ public static String OpeningChannelFailureMessage;
+ public static String OpeningChannelFailureTitle;
public static String UpdateHandler_Cancel;
public static String UpdateHandler_Merge;
@@ -218,4 +307,22 @@ public class Messages extends NLS {
public static String UserManager_CannotGetUserAccountMessage2;
public static String UserManager_TCFNotProvideFSMessage;
public static String UserManager_UserAccountTitle;
+
+ public static String MergeEditorInput_CompareLeftAndRight;
+ public static String MergeEditorInput_CompareWithLocalCache;
+ public static String MergeEditorInput_LocalFile;
+ public static String MergeEditorInput_RemoteFile;
+ public static String MergeInput_CopyNotSupported;
+ public static String NameValidator_SpecifyFolder;
+ public static String NewFileWizard_NewFileWizardTitle;
+ public static String NewFileWizardPage_NewFileWizardPageDescription;
+ public static String NewFileWizardPage_NewFileWizardPageNameLabel;
+ public static String NewFileWizardPage_NewFileWizardPageTitle;
+ public static String NewFolderWizard_NewFolderWizardTitle;
+ public static String NewFolderWizardPage_NewFolderWizardPageDescription;
+ public static String NewFolderWizardPage_NewFolderWizardPageNameLabel;
+ public static String NewFolderWizardPage_NewFolderWizardPageTitle;
+ public static String NewNodeWizardPage_LstatTimedout;
+ public static String NewNodeWizardPage_PromptFolderLabel;
+ public static String WindowsAttributesSection_Attributes;
}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/nls/Messages.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/nls/Messages.properties
index 154ebb6ba..603132a25 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/nls/Messages.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/nls/Messages.properties
@@ -1,20 +1,39 @@
+FolderValidator_SpecifyFolder=Please specify the folder where the file/folder is going to be created.
#
-# org.eclipse.tm.te.tcf.filesystem
+# org.eclipse.tcf.te.tcf.filesystem
# Externalized Strings.
#
+FolderValidator_DirNotExist=The directory {0} does not exist in the current target.
+FolderValidator_NotWritable=The directory {0} is not writable. Please choose a different one.
+
FSExplorerTreeControl_section_title=Exploring File System
+FSFolderSelectionDialog_MoveDialogMessage=Choose destination for the files to be moved:
+FSFolderSelectionDialog_MoveDialogTitle=Move Files and Folders
+
FSTreeControl_column_name_label=Name
FSTreeControl_column_size_label=Size
FSTreeControl_column_modified_label=Date Modified
+FSTreeNode_TypeFile=file
+FSTreeNode_TypeFileFolder=File Folder
+FSTreeNode_TypeLocalDisk=Local Disk
+FSTreeNode_TypeSystemFile=System file
+
+FSTreeNodeContentProvider_rootNode_label=File System
+
+FSOpenFileDialog_message=Please select an image file for the process.
FSOpenFileDialog_title=Select Process Image
+FSOperation_CopyNOfFile=Copy ({0}) of {1}
+FSOperation_CopyOfFile=Copy of {0}
+
GeneralInformationPage_Accessed=Accessed:
GeneralInformationPage_Advanced=\ A&dvanced...
GeneralInformationPage_Attributes=Attributes:
GeneralInformationPage_File=File ({0})
+GeneralInformationPage_FileSizeInfo={0} KB ({1} bytes)
GeneralInformationPage_Folder=Folder
GeneralInformationPage_Hidden=Hidden
GeneralInformationPage_ReadOnly=Read-only
@@ -24,6 +43,7 @@ GeneralInformationPage_Modified=Modified:
GeneralInformationPage_Name=Name:
GeneralInformationPage_Size=Size:
GeneralInformationPage_Type=Type:
+GeneralInformationPage_PermissionText=Permissions:
GeneralInformationPage_PropertiesChangeFailure=Properties changes to {0} failed due to the following reason:{1}
GeneralInformationPage_PropertiesChangeTitle=Properties Change
GeneralInformationPage_UnknownFileType=Unknown File
@@ -44,7 +64,7 @@ AdvancedAttributesDialog_FolderBanner=Choose the settings you want for this fold
AdvancedAttributesDialog_Hidden=Hidden
AdvancedAttributesDialog_Indexed=Indexed
AdvancedAttributesDialog_IndexFile=For fast searching, allow Indexing Service to index this file
-AdvancedAttributesDialog_IndexFolder=For fast searching, allow Indexing Service to index this file
+AdvancedAttributesDialog_IndexFolder=For fast searching, allow Indexing Service to index this folder
AdvancedAttributesDialog_Normal=Normal
AdvancedAttributesDialog_Offline=Offline
AdvancedAttributesDialog_ReadOnly=Read-only
@@ -54,6 +74,7 @@ AdvancedAttributesDialog_Sparse=Sparse
AdvancedAttributesDialog_System=System
AdvancedAttributesDialog_Temporary=Temporary
AdvancedAttributesDialog_Virtual=Virtual
+BasicFolderSection_BasicInfoText=Basic Information
CacheManager_Bytes=\ bytes
CacheManager_DowloadingFile=Downloading file {0}...
@@ -72,7 +93,22 @@ CmmitHandler_FileDeleted=The local file {0} that you are trying to commit has be
CmmitHandler_Merge=Merge
CmmitHandler_StateChangedDialogTitle=State Changed
CmmitHandler_StateChangedMessage={0} on the target has changed and is conflicting with the local file. What do you want?
-
+FSDelete_ButtonCancel=Cancel
+FSDelete_ButtonNo=&No
+FSDelete_ButtonYes=&Yes
+FSDelete_ButtonYes2All=Yes to &All
+FSDelete_CannotRemoveFile=Cannot remove the file {0}\!. Caused by {1}
+FSDelete_CannotRemoveFolder=Cannot remove the folder {0}\!. Caused by {1}
+FSDelete_ConfirmDelete=Confirm Delete
+DeleteFilesHandler_ConfirmDialogTitle=Confirm Delete
+FSDelete_ConfirmMessage=Are you sure you want to remove the read-only file {0}?
+DeleteFilesHandler_DeleteMultipleFilesConfirmation=Are you sure you want to delete these {0} files/folders?
+DeleteFilesHandler_DeleteOneFileConfirmation=Are you sure you want to delete {0}?
+FSDelete_Deleting=Deleting files
+FSDelete_PrepareToDelete=Prepare to delete files ...
+FSDelete_RemovingFileFolder=Removing {0} ...
+
+LinuxPermissionsSection_Permissions=Permissions
LocalTypedElement_SavingFile=Saving file:
OpenFileHandler_Cancel=Cancel
@@ -88,6 +124,32 @@ OpenWithMenu_DefaultEditor=&Default Editor
OpenWithMenu_NoEditorFound=No editor found to edit the file resource.
OpenWithMenu_OpenWith=Open With
+FSCopy_CannotCopyFile=Cannot copy file {0} because: {1}
+FSOperation_CannotCreateDirectory=Cannot create the directory {0} because: {1}
+FSMove_CannotMove=Cannot move {0} because {1}
+FSMove_FileExistsError=Cannot replace {0}: There is already a file with the same name as the folder you are moving.
+FSMove_FolderExistsError=Cannot replace {0}: There is already a folder with the same name as the file you are moving.
+FSRename_CannotRename=Cannot rename {0} because {1}
+FSOperation_ConfirmDialogCancel=Cancel
+FSOperation_ConfirmDialogNo=&No
+FSOperation_ConfirmDialogYes=&Yes
+FSOperation_ConfirmDialogYesToAll=Yes to &All
+FSOperation_ConfirmFileReplace=Confirm File Replace
+FSOperation_ConfirmFileReplaceMessage=This folder already contains a file named {0}.\n\n If the files in the existing folder have the same name as files in the folder you are moving or copying, they will be replaced. Do you still want to move or copy the file?
+FSOperation_ConfirmFolderReplaceMessage=This folder already contains a folder named {0}.\n\n If the files in the existing folder have the same name as files in the folder you are moving or copying, they will be replaced. Do you still want to move or copy the folder?
+FSOperation_ConfirmFolderReplaceTitle=Confirm Folder Replace
+FSCopy_CopyFileFolderTitle=Error Copying File or Folder
+FSMove_MoveFileFolderTitle=Error Moving File or Folder
+FSRename_RenameFileFolderTitle=Error Renaming File or Folder
+FSDelete_DeleteFileFolderTitle=Error Deleting File or Folder
+FSCopy_Copying=Copying {0} ...
+FSCopy_CopyingFile=Copying files
+FSMove_MovingFile=Moving files
+FSMove_Moving=Moving {0} ...
+FSOperation_NoFileSystemError=This TCF agent, {0}, does not provide a file system service\!
+FSOperation_NotResponding=The TCF agent on the target {0} is probably down. It is not responding.
+FSCopy_PrepareToCopy=Prepare to copy files ...
+FSMove_PrepareToMove=Prepare to move files...
PermissionsGroup_Executable=Executable
PermissionsGroup_GroupPermissions=Group:
PermissionsGroup_OtherPermissions=Other:
@@ -95,7 +157,19 @@ PermissionsGroup_Readable=Readable
PermissionsGroup_UserPermissions=User:
PermissionsGroup_Writable=Writable
+RefreshDirectoryHandler_RefreshJobTitle=Refresh {0}
+RefreshViewerHandler_RefreshJobTitle=Refresh the file system
RemoteTypedElement_GettingRemoteContent=Getting content from the remote file:
+RenameFilesHandler_PromptNewName=New name:
+RenameFilesHandler_RenamePromptMessage=Please enter a new name
+RenameFilesHandler_TitleRename=Rename
+RenameFilesHandler_TitleRenameFile=Rename File
+RenameFilesHandler_TitleRenameFolder=Rename Folder
+FSRenamingAssistant_NameAlreadyExists=A file/folder with the name you specified already exists\! Specify a different name.
+FSRenamingAssistant_NoNodeSelected=No node is selected.
+FSRenamingAssistant_SpecifyNonEmptyName=Specify a non-empty name.
+FSRenamingAssistant_UnixIllegalCharacters=A file/folder name cannot contain any of the following characters:\n/
+FSRenamingAssistant_WinIllegalCharacters=A file/folder name cannot contain any of the following characters:\n\\/:*?<>|
SaveAllListener_Cancel=Cancel
SaveAllListener_Merge=Merge
@@ -119,6 +193,13 @@ StateManager_TCFNotProvideFSMessage=This TCF agent, {0}, does not provide a file
StateManager_TCFNotProvideFSMessage2=This TCF agent, {0}, does not provide a file system service\!
StateManager_UpdateFailureTitle=Update Failure
+TargetExplorerPreferencePage_AutoSavingText=Automatically upload files to targets upon saving
+TargetExplorerPreferencePage_CopyOwnershipText=Copy source UID and GID when copying files
+TargetExplorerPreferencePage_CopyPermissionText=Copy source permissions when copying files
+TargetExplorerPreferencePage_RenamingOptionText=Use In-place Editor when renaming a file/folder
+TargetSelectionPage_Description=Please select the target where the new file/folder is created.
+TargetSelectionPage_Targets=Targets:
+TargetSelectionPage_Title=Select the target.
TcfInputStream_CloseTimeout=Closing has timed out\!
TcfInputStream_NoDataAvailable=No data available
TcfInputStream_NoFileReturned=No file handle returned\!
@@ -138,8 +219,8 @@ TcfURLConnection_NoSuchTcfAgent=TCF agent is already disconnected\!
TcfURLConnection_OpenFileTimeout=Opening file has timed out\!
TcfURLConnection_OpenTCFChannelTimeout=Opening TCF channel has timed out\!
-TCFUtilities_OpeningFailureMessage=We cannot open a TCF channel to the target: {0}. It is caused by {1}.
-TCFUtilities_OpeningFailureTitle=Opening Channel
+OpeningChannelFailureMessage=We cannot open a TCF channel to the target: {0}. It is caused by {1}.
+OpeningChannelFailureTitle=Opening Channel
UpdateHandler_Cancel=Cancel
UpdateHandler_Merge=Merge
@@ -151,3 +232,24 @@ UserManager_CannotGetUserAccountMessage=Cannot get the user account from the age
UserManager_CannotGetUserAccountMessage2=Cannot get the user account from the agent {0}. Caused by: networking too slow.
UserManager_TCFNotProvideFSMessage=This TCF agent, {0}, does not provide a file system service\!
UserManager_UserAccountTitle=User Account
+
+FSOperation_CannotOpenDir=Cannot open directory {0} because {1}
+FSOperation_CannotReadDir=Cannot read directory {0} because {1}
+FSOperation_TimedOutWhenOpening=it has timed out when opening the directory\!
+MergeEditorInput_CompareLeftAndRight=Compare {0} and {1}
+MergeEditorInput_CompareWithLocalCache=Compare {0} with Local Cache
+MergeEditorInput_LocalFile=Local: {0}
+MergeEditorInput_RemoteFile=Remote: {0}
+MergeInput_CopyNotSupported=Copy is not support by this type of compare input
+NameValidator_SpecifyFolder=Please specify the folder where the file/folder is going to be created.
+NewFileWizard_NewFileWizardTitle=New File Wizard
+NewFileWizardPage_NewFileWizardPageDescription=Create a new file in the directory.
+NewFileWizardPage_NewFileWizardPageNameLabel=File name:
+NewFileWizardPage_NewFileWizardPageTitle=New File
+NewFolderWizard_NewFolderWizardTitle=New Folder Wizard
+NewFolderWizardPage_NewFolderWizardPageDescription=Create a new folder in the directory.
+NewFolderWizardPage_NewFolderWizardPageNameLabel=Folder name:
+NewFolderWizardPage_NewFolderWizardPageTitle=New Folder
+NewNodeWizardPage_LstatTimedout=lstat timed out\!
+NewNodeWizardPage_PromptFolderLabel=Enter or select the parent folder:
+WindowsAttributesSection_Attributes=Attributes
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.core/.classpath b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/.classpath
index 8a8f1668c..8a8f1668c 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.core/.classpath
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/.classpath
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/.options b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/.options
new file mode 100644
index 000000000..2bc066037
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/.options
@@ -0,0 +1 @@
+org.eclipse.tcf.te.tcf.launch.core/debugmode = 0
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/.project b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/.project
new file mode 100644
index 000000000..ec093ab85
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.tcf.te.tcf.launch.core</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/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/.settings/org.eclipse.jdt.core.prefs b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..6d095f89c
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,362 @@
+#Thu Jan 05 15:31:44 CET 2012
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+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.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.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=enabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=enabled
+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.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=warning
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
+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=warning
+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=enabled
+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.unusedObjectAllocation=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
+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.6
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=0
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=0
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=0
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=0
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=0
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=true
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
+org.eclipse.jdt.core.formatter.comment.line_length=100
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=4
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=4
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=true
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=true
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=true
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=true
+org.eclipse.jdt.core.formatter.lineSplit=100
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=true
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/.settings/org.eclipse.jdt.ui.prefs b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 000000000..a11bbd648
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,4 @@
+#Thu Jan 05 15:31:40 CET 2012
+eclipse.preferences.version=1
+formatter_profile=_Target Explorer Java STD
+formatter_settings_version=12
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..a9d5182f1
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/META-INF/MANIFEST.MF
@@ -0,0 +1,21 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.tcf.te.tcf.launch.core;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipse.tcf.te.tcf.launch.core.activator.CoreBundleActivator
+Bundle-Vendor: %providerName
+Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
+ org.eclipse.debug.core;bundle-version="3.7.0",
+ org.eclipse.tcf.core;bundle-version="1.0.0",
+ org.eclipse.tcf.debug;bundle-version="1.0.0",
+ org.eclipse.tcf.te.runtime;bundle-version="1.0.0",
+ org.eclipse.tcf.te.runtime.concurrent;bundle-version="1.0.0",
+ org.eclipse.tcf.te.runtime.model;bundle-version="1.0.0",
+ org.eclipse.tcf.te.runtime.services;bundle-version="1.0.0",
+ org.eclipse.tcf.te.core;bundle-version="1.0.0",
+ org.eclipse.tcf.te.tcf.core;bundle-version="1.0.0",
+ org.eclipse.tcf.te.tcf.locator;bundle-version="1.0.0"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
+Bundle-Localization: plugin
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.ui/build.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/build.properties
index 73a5119ed..73a5119ed 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.ui/build.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/build.properties
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/plugin.properties
new file mode 100644
index 000000000..f343a6e32
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/plugin.properties
@@ -0,0 +1,12 @@
+##################################################################################
+# Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+# This program and the accompanying materials are made available under the terms
+# of the Eclipse Public License v1.0 which accompanies this distribution, and is
+# available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Wind River Systems - initial API and implementation
+##################################################################################
+
+pluginName = Target Explorer, TCF Launching, Core
+providerName = Eclipse.org
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/plugin.xml b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/plugin.xml
new file mode 100644
index 000000000..a49a8b1cf
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/plugin.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+
+<!-- Service contributions -->
+ <extension point="org.eclipse.tcf.te.runtime.services.services">
+ <service
+ class="org.eclipse.tcf.te.tcf.launch.core.services.DebugService"
+ id="org.eclipse.tcf.te.tcf.launch.core.services.debug">
+ <serviceType
+ bundleId="org.eclipse.tcf.te.runtime.services"
+ class="org.eclipse.tcf.te.runtime.services.interfaces.IDebugService">
+ </serviceType>
+ <enablement>
+ <or>
+ <instanceof value="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel"/>
+ <instanceof value="org.eclipse.tcf.protocol.IPeer"/>
+ </or>
+ </enablement>
+ </service>
+ </extension>
+
+</plugin>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/pom.xml b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/pom.xml
new file mode 100644
index 000000000..df2b3c215
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.tcf</groupId>
+ <artifactId>tcf-parent</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../../../pom.xml</relativePath>
+ </parent>
+
+ <version>1.0.0.qualifier</version>
+ <artifactId>org.eclipse.tcf.te.tcf.launch.core</artifactId>
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/activator/CoreBundleActivator.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/activator/CoreBundleActivator.java
new file mode 100644
index 000000000..0f5704f20
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/activator/CoreBundleActivator.java
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.launch.core.activator;
+
+import org.eclipse.tcf.te.runtime.tracing.TraceHandler;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class CoreBundleActivator implements BundleActivator {
+ // The bundle context
+ private static BundleContext context;
+ // The trace handler instance
+ private static TraceHandler traceHandler;
+
+ /**
+ * Returns the bundle context
+ *
+ * @return the bundle context
+ */
+ public static BundleContext getContext() {
+ return context;
+ }
+
+ /**
+ * Convenience method which returns the unique identifier of this plugin.
+ */
+ public static String getUniqueIdentifier() {
+ if (getContext() != null && getContext().getBundle() != null) {
+ return getContext().getBundle().getSymbolicName();
+ }
+ return null;
+ }
+
+ /**
+ * Returns the bundles trace handler.
+ *
+ * @return The bundles trace handler.
+ */
+ public static TraceHandler getTraceHandler() {
+ if (traceHandler == null) {
+ traceHandler = new TraceHandler(getUniqueIdentifier());
+ }
+ return traceHandler;
+ }
+
+ /* (non-Javadoc)
+ * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext bundleContext) throws Exception {
+ CoreBundleActivator.context = bundleContext;
+ }
+
+ /* (non-Javadoc)
+ * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext bundleContext) throws Exception {
+ CoreBundleActivator.context = null;
+ traceHandler = null;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/nls/Messages.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/nls/Messages.java
new file mode 100644
index 000000000..3768b027b
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/nls/Messages.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.launch.core.nls;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * TCF Launch Core Plug-in externalized strings management.
+ */
+public class Messages extends NLS {
+
+ // The plug-in resource bundle name
+ private static final String BUNDLE_NAME = "org.eclipse.tcf.te.tcf.launch.core.nls.Messages"; //$NON-NLS-1$
+
+ /**
+ * Static constructor.
+ */
+ static {
+ // Load message values from bundle file
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ // **** Declare externalized string id's down here *****
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/nls/Messages.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/nls/Messages.properties
new file mode 100644
index 000000000..391335681
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/nls/Messages.properties
@@ -0,0 +1,5 @@
+#
+# org.eclipse.tcf.te.tcf.launch.core
+# Externalized Strings.
+#
+
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/services/DebugService.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/services/DebugService.java
new file mode 100644
index 000000000..cec53b9e2
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/services/DebugService.java
@@ -0,0 +1,254 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.launch.core.services;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.atomic.AtomicReference;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationType;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.core.ILaunchManager;
+import org.eclipse.tcf.internal.debug.launch.TCFLaunchDelegate;
+import org.eclipse.tcf.internal.debug.model.TCFLaunch;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.te.runtime.concurrent.util.ExecutorsUtil;
+import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.runtime.services.AbstractService;
+import org.eclipse.tcf.te.runtime.services.interfaces.IDebugService;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+
+/**
+ * Debug service implementations for TCF contexts.
+ */
+@SuppressWarnings("restriction")
+public class DebugService extends AbstractService implements IDebugService {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.services.interfaces.IDebugService#attach(java.lang.Object, org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer, org.eclipse.tcf.te.runtime.interfaces.callback.ICallback)
+ */
+ @Override
+ public void attach(final Object context, final IPropertiesContainer data, final ICallback callback) {
+ Assert.isNotNull(context);
+ Assert.isNotNull(data);
+ Assert.isNotNull(callback);
+
+ // Get the peer to attach
+ IPeer peer = null;
+ if (context instanceof IPeerModel) {
+ peer = ((IPeerModel)context).getPeer();
+ }
+ else if (context instanceof IPeer) {
+ peer = (IPeer)context;
+ }
+
+ if (peer != null) {
+ // Make sure that the attach is executed in a non TCF dispatch thread
+ if (!Protocol.isDispatchThread()) {
+ attachPeer(peer, data, callback);
+ } else {
+ final IPeer finPeer = peer;
+ ExecutorsUtil.execute(new Runnable() {
+ @Override
+ public void run() {
+ attachPeer(finPeer, data, callback);
+ }
+ });
+ }
+ }
+ else {
+ callback.done(this, Status.OK_STATUS);
+ }
+ }
+
+ /**
+ * Attach to the given peer.
+ *
+ * @param peer The peer. Must not be <code>null</code>.
+ * @param data The data properties to parameterize the attach. Must not be <code>null</code>.
+ * @param callback The callback to invoke once the operation completed. Must not be <code>null</code>.
+ */
+ protected void attachPeer(final IPeer peer, final IPropertiesContainer data, final ICallback callback) {
+ Assert.isNotNull(peer);
+ Assert.isNotNull(data);
+ Assert.isNotNull(callback);
+
+ // The launch configuration to execute
+ ILaunchConfiguration lc = null;
+ ILaunch l = null;
+
+ // Look for existing launch configurations
+ ILaunchConfiguration[] configs = findExistingConfigs(peer);
+ if (configs.length > 0) {
+ // Check if any of the matching launches has an active launch
+ ILaunch[] launches = DebugPlugin.getDefault().getLaunchManager().getLaunches();
+ for (ILaunchConfiguration config : configs) {
+ for (ILaunch launch : launches) {
+ if (config.equals(launch.getLaunchConfiguration())) {
+ lc = config;
+ l = launch;
+ break;
+ }
+ }
+ if (lc != null) break;
+ }
+ // If there is none with an active launch, take the first one
+ if (lc == null) lc = configs[0];
+ } else {
+ // No existing launch configuration -> create a new one
+ lc = createNewConfig(peer);
+ }
+
+ if (lc != null && l == null) {
+ try {
+ // Attach the launch listener to wait firing the callback until
+ // the TCFLaunch got connect
+ TCFLaunch.addListener(new TCFLaunch.LaunchListener() {
+ @Override
+ public void onProcessStreamError(TCFLaunch launch, String process_id, int stream_id, Exception error, int lost_size) {}
+ @Override
+ public void onProcessOutput(TCFLaunch launch, String process_id, int stream_id, byte[] data) {}
+ @Override
+ public void onDisconnected(TCFLaunch launch) {}
+ @Override
+ public void onCreated(TCFLaunch launch) {}
+
+ @Override
+ public void onConnected(TCFLaunch launch) {
+ // If "our" launch got connected, fire the callback
+ ILaunch l = (ILaunch)callback.getProperty("launch"); //$NON-NLS-1$
+ if (launch == l) {
+ TCFLaunch.removeListener(this);
+ callback.done(DebugService.this, Status.OK_STATUS);
+ }
+ }
+ });
+
+ // Execute the launch configuration
+ l = lc.launch(ILaunchManager.DEBUG_MODE, new NullProgressMonitor(), false, true);
+ // And remember the launch returned. Will be needed outside
+ // to set the selection to the debug view correctly
+ callback.setProperty("launch", l); //$NON-NLS-1$
+
+ } catch (CoreException e) {
+ callback.done(this, e.getStatus());
+ }
+ } else {
+ // Remember the launch found. Will be needed outside
+ // to set the selection to the debug view correctly
+ callback.setProperty("launch", l); //$NON-NLS-1$
+ callback.done(this, Status.OK_STATUS);
+ }
+ }
+
+ /**
+ * Creates a new launch configuration for the given peer.
+ *
+ * @param peer The peer. Must not be <code>null</code>.
+ * @return The new launch configuration instance.
+ */
+ protected ILaunchConfiguration createNewConfig(final IPeer peer) {
+ Assert.isNotNull(peer);
+
+ // The result
+ ILaunchConfiguration lc = null;
+
+ // Determine the ID of the given peer
+ final AtomicReference<String> peerId = new AtomicReference<String>();
+ Runnable runnable = new Runnable() {
+ @Override
+ public void run() {
+ peerId.set(peer.getID());
+ }
+ };
+ if (Protocol.isDispatchThread()) runnable.run();
+ else Protocol.invokeAndWait(runnable);
+
+ // Get the launch manager
+ ILaunchManager lm = DebugPlugin.getDefault().getLaunchManager();
+ // Get the "Target Communication Framework" launch configuration type
+ ILaunchConfigurationType lct = lm.getLaunchConfigurationType("org.eclipse.tcf.debug.LaunchConfigurationType"); //$NON-NLS-1$
+ if (lct != null) {
+ try {
+ // Calculate the launch configuration name based on the peer id
+ String name = lm.generateLaunchConfigurationName(peerId.get());
+ // Create a new launch configuration working copy
+ ILaunchConfigurationWorkingCopy wc = lct.newInstance(null, name);
+ // And fill in the launch configuration attributes
+ wc.setAttribute(TCFLaunchDelegate.ATTR_PEER_ID, peerId.get());
+ wc.setAttribute(TCFLaunchDelegate.ATTR_RUN_LOCAL_AGENT, false);
+ wc.setAttribute(TCFLaunchDelegate.ATTR_USE_LOCAL_AGENT, false);
+ // Save the working copy
+ lc = wc.doSave();
+ } catch (CoreException e) {
+ if (Platform.inDebugMode()) e.printStackTrace();
+ }
+ }
+
+
+ return lc;
+ }
+
+ /**
+ * Find existing launch configurations created for the given peer.
+ *
+ * @param peer The peer. Must not be <code>null</code>.
+ * @return The list of existing launch configurations or an empty list.
+ */
+ protected ILaunchConfiguration[] findExistingConfigs(final IPeer peer) {
+ Assert.isNotNull(peer);
+
+ // The result list
+ List<ILaunchConfiguration> configs = new ArrayList<ILaunchConfiguration>();
+
+ // Determine the ID of the given peer
+ final AtomicReference<String> peerId = new AtomicReference<String>();
+ Runnable runnable = new Runnable() {
+ @Override
+ public void run() {
+ peerId.set(peer.getID());
+ }
+ };
+ if (Protocol.isDispatchThread()) runnable.run();
+ else Protocol.invokeAndWait(runnable);
+
+ // Get the launch manager
+ ILaunchManager lm = DebugPlugin.getDefault().getLaunchManager();
+ // Get the "Target Communication Framework" launch configuration type
+ ILaunchConfigurationType lct = lm.getLaunchConfigurationType("org.eclipse.tcf.debug.LaunchConfigurationType"); //$NON-NLS-1$
+ if (lct != null) {
+ try {
+ // Get all launch configurations of our type
+ ILaunchConfiguration[] candidates = lm.getLaunchConfigurations(lct);
+ for (ILaunchConfiguration candidate : candidates) {
+ // If the peer id is matching, it is a valid candidate
+ String lcPeerId = candidate.getAttribute(TCFLaunchDelegate.ATTR_PEER_ID, (String)null);
+ if (lcPeerId != null && lcPeerId.equals(peerId.get())) {
+ configs.add(candidate);
+ }
+ }
+ } catch (CoreException e) {
+ if (Platform.inDebugMode()) e.printStackTrace();
+ }
+ }
+
+ return configs.toArray(new ILaunchConfiguration[configs.size()]);
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.ui/.classpath b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/.classpath
index 8a8f1668c..8a8f1668c 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.ui/.classpath
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/.classpath
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/.options b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/.options
new file mode 100644
index 000000000..3da598b77
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/.options
@@ -0,0 +1 @@
+org.eclipse.tcf.te.tcf.launch.ui/debugmode = 0
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/.project b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/.project
new file mode 100644
index 000000000..47cc31a52
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.tcf.te.tcf.launch.ui</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/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/.settings/org.eclipse.jdt.core.prefs b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..5c332293f
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,362 @@
+#Thu Jan 05 15:32:51 CET 2012
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+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.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.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=enabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=enabled
+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.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=warning
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
+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=warning
+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=enabled
+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.unusedObjectAllocation=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
+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.6
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=0
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=0
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=0
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=0
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=0
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=true
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
+org.eclipse.jdt.core.formatter.comment.line_length=100
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=4
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=4
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=true
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=true
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=true
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=true
+org.eclipse.jdt.core.formatter.lineSplit=100
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=true
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/.settings/org.eclipse.jdt.ui.prefs b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 000000000..a4433842c
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,4 @@
+#Thu Jan 05 15:32:51 CET 2012
+eclipse.preferences.version=1
+formatter_profile=_Target Explorer Java STD
+formatter_settings_version=12
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..d4db28ee4
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/META-INF/MANIFEST.MF
@@ -0,0 +1,17 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.tcf.te.tcf.launch.ui;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipse.tcf.te.tcf.launch.ui.activator.UIPlugin
+Bundle-Vendor: %providerName
+Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
+ org.eclipse.ui;bundle-version="3.7.0",
+ org.eclipse.tcf.core;bundle-version="1.0.0",
+ org.eclipse.tcf.te.runtime;bundle-version="1.0.0",
+ org.eclipse.tcf.te.tcf.core;bundle-version="1.0.0",
+ org.eclipse.tcf.te.tcf.locator;bundle-version="1.0.0",
+ org.eclipse.tcf.te.ui.swt;bundle-version="1.0.0"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
+Bundle-Localization: plugin
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.core/build.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/build.properties
index f4ae97015..f4ae97015 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.core/build.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/build.properties
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/plugin.properties
new file mode 100644
index 000000000..d96b8774f
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/plugin.properties
@@ -0,0 +1,17 @@
+##################################################################################
+# Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+# This program and the accompanying materials are made available under the terms
+# of the Eclipse Public License v1.0 which accompanies this distribution, and is
+# available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Wind River Systems - initial API and implementation
+##################################################################################
+
+pluginName = Target Explorer, TCF Launching, UI
+providerName = Eclipse.org
+
+# ***** Command contributions *****
+
+Command.showInDebugView.name=Show In Debug View Command
+Command.showInDebugView.description=Show the selection in the Debug View.
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/pom.xml b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/pom.xml
new file mode 100644
index 000000000..7b6f7f0f2
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.tcf</groupId>
+ <artifactId>tcf-parent</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../../../pom.xml</relativePath>
+ </parent>
+
+ <version>1.0.0.qualifier</version>
+ <artifactId>org.eclipse.tcf.te.tcf.launch.ui</artifactId>
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/activator/UIPlugin.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/activator/UIPlugin.java
new file mode 100644
index 000000000..b45c16f6e
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/activator/UIPlugin.java
@@ -0,0 +1,112 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.launch.ui.activator;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.ImageRegistry;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.tcf.te.runtime.tracing.TraceHandler;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class UIPlugin extends AbstractUIPlugin {
+ // The shared instance
+ private static UIPlugin plugin;
+ // The trace handler instance
+ private static TraceHandler traceHandler;
+
+ /**
+ * The constructor
+ */
+ public UIPlugin() {
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static UIPlugin getDefault() {
+ return plugin;
+ }
+
+ /**
+ * Convenience method which returns the unique identifier of this plugin.
+ */
+ public static String getUniqueIdentifier() {
+ if (getDefault() != null && getDefault().getBundle() != null) {
+ return getDefault().getBundle().getSymbolicName();
+ }
+ return null;
+ }
+
+ /**
+ * Returns the bundles trace handler.
+ *
+ * @return The bundles trace handler.
+ */
+ public static TraceHandler getTraceHandler() {
+ if (traceHandler == null) {
+ traceHandler = new TraceHandler(getUniqueIdentifier());
+ }
+ return traceHandler;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ traceHandler = null;
+ super.stop(context);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#initializeImageRegistry(org.eclipse.jface.resource.ImageRegistry)
+ */
+ @Override
+ protected void initializeImageRegistry(ImageRegistry registry) {
+ }
+
+ /**
+ * Loads the image registered under the specified key from the image
+ * registry and returns the <code>Image</code> object instance.
+ *
+ * @param key The key the image is registered with.
+ * @return The <code>Image</code> object instance or <code>null</code>.
+ */
+ public static Image getImage(String key) {
+ return getDefault().getImageRegistry().get(key);
+ }
+
+ /**
+ * Loads the image registered under the specified key from the image
+ * registry and returns the <code>ImageDescriptor</code> object instance.
+ *
+ * @param key The key the image is registered with.
+ * @return The <code>ImageDescriptor</code> object instance or <code>null</code>.
+ */
+ public static ImageDescriptor getImageDescriptor(String key) {
+ return getDefault().getImageRegistry().getDescriptor(key);
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/nls/Messages.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/nls/Messages.java
new file mode 100644
index 000000000..555612379
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/nls/Messages.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.launch.ui.nls;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * TCF Launch UI Plug-in externalized strings management.
+ */
+public class Messages extends NLS {
+
+ // The plug-in resource bundle name
+ private static final String BUNDLE_NAME = "org.eclipse.tcf.te.tcf.launch.ui.nls.Messages"; //$NON-NLS-1$
+
+ /**
+ * Static constructor.
+ */
+ static {
+ // Load message values from bundle file
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ // **** Declare externalized string id's down here *****
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/nls/Messages.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/nls/Messages.properties
new file mode 100644
index 000000000..3c7310c06
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/nls/Messages.properties
@@ -0,0 +1,5 @@
+#
+# org.eclipse.tcf.te.tcf.launch.ui
+# Externalized Strings.
+#
+
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/.classpath b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/.classpath
index 8a8f1668c..8a8f1668c 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/.classpath
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/.classpath
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/.options b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/.options
new file mode 100644
index 000000000..be04c242d
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/.options
@@ -0,0 +1,5 @@
+org.eclipse.tcf.te.tcf.locator/debugmode = 0
+
+org.eclipse.tcf.te.tcf.locator/trace/locatorModel = false
+org.eclipse.tcf.te.tcf.locator/trace/locatorListener = false
+org.eclipse.tcf.te.tcf.locator/trace/channelStateChangeListener = false
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/.project b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/.project
index c7a722894..6fdbad2f7 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/.project
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/.project
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.eclipse.tm.te.tcf.locator</name>
+ <name>org.eclipse.tcf.te.tcf.locator</name>
<comment></comment>
<projects>
</projects>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/.settings/org.eclipse.jdt.core.prefs b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/.settings/org.eclipse.jdt.core.prefs
index 579e3b099..579e3b099 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/.settings/org.eclipse.jdt.core.prefs
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/.settings/org.eclipse.jdt.core.prefs
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/.settings/org.eclipse.jdt.ui.prefs b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/.settings/org.eclipse.jdt.ui.prefs
index 974541bce..974541bce 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/.settings/org.eclipse.jdt.ui.prefs
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/.settings/org.eclipse.jdt.ui.prefs
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..660f4af03
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/META-INF/MANIFEST.MF
@@ -0,0 +1,31 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.tcf.te.tcf.locator; singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipse.tcf.te.tcf.locator.activator.CoreBundleActivator
+Bundle-Vendor: %providerName
+Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
+ org.eclipse.core.expressions;bundle-version="3.4.300",
+ org.eclipse.tcf.core;bundle-version="1.0.0",
+ org.eclipse.tcf.te.tcf.core;bundle-version="1.0.0",
+ org.eclipse.tcf.te.runtime;bundle-version="1.0.0",
+ org.eclipse.tcf.te.runtime.persistence;bundle-version="1.0.0",
+ org.eclipse.tcf.te.runtime.services;bundle-version="1.0.0"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
+Bundle-Localization: plugin
+Export-Package: org.eclipse.tcf.te.tcf.locator,
+ org.eclipse.tcf.te.tcf.locator.activator;x-internal:=true,
+ org.eclipse.tcf.te.tcf.locator.interfaces,
+ org.eclipse.tcf.te.tcf.locator.interfaces.nodes,
+ org.eclipse.tcf.te.tcf.locator.interfaces.preferences,
+ org.eclipse.tcf.te.tcf.locator.interfaces.services,
+ org.eclipse.tcf.te.tcf.locator.internal;x-internal:=true,
+ org.eclipse.tcf.te.tcf.locator.internal.adapters;x-internal:=true,
+ org.eclipse.tcf.te.tcf.locator.internal.nls;x-internal:=true,
+ org.eclipse.tcf.te.tcf.locator.internal.preferences;x-internal:=true,
+ org.eclipse.tcf.te.tcf.locator.listener,
+ org.eclipse.tcf.te.tcf.locator.model,
+ org.eclipse.tcf.te.tcf.locator.nodes,
+ org.eclipse.tcf.te.tcf.locator.services
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/build.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/build.properties
index 30b2fc40b..30b2fc40b 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/build.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/build.properties
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/plugin.properties
index 9e5336314..9e5336314 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/plugin.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/plugin.properties
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/plugin.xml b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/plugin.xml
new file mode 100644
index 000000000..525a72695
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/plugin.xml
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+
+<!-- Preference contributions -->
+ <extension point="org.eclipse.core.runtime.preferences">
+ <initializer
+ class="org.eclipse.tcf.te.tcf.locator.internal.preferences.PreferencesInitializer"/>
+ </extension>
+
+<!-- Eclipse core expressions property tester -->
+ <extension point="org.eclipse.core.expressions.propertyTesters">
+ <propertyTester
+ class="org.eclipse.tcf.te.tcf.locator.internal.MyPropertyTester"
+ id="org.eclipse.tcf.te.tcf.locator.LocatorModelPropertyTester"
+ namespace="org.eclipse.tcf.te.tcf.locator"
+ properties="name,hasLocalService,hasRemoteService,isStaticPeer,isRedirected"
+ type="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel">
+ </propertyTester>
+ </extension>
+
+<!-- Persistence delegate contributions -->
+ <extension point="org.eclipse.tcf.te.runtime.persistence.delegates">
+ <delegate
+ id="org.eclipse.tcf.te.tcf.locator.persistence"
+ class="org.eclipse.tcf.te.tcf.locator.internal.PeersPersistenceDelegate">
+ </delegate>
+ </extension>
+
+<!-- Adapter factory contributions -->
+ <extension point="org.eclipse.core.runtime.adapters">
+ <factory
+ adaptableType="java.util.Map"
+ class="org.eclipse.tcf.te.tcf.locator.internal.adapters.AdapterFactory">
+ <adapter type="org.eclipse.tcf.te.runtime.persistence.interfaces.IPersistable"/>
+ </factory>
+
+ <factory
+ adaptableType="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel"
+ class="org.eclipse.tcf.te.tcf.locator.internal.adapters.AdapterFactory">
+ <adapter type="org.eclipse.tcf.te.runtime.persistence.interfaces.IPersistable"/>
+ </factory>
+ </extension>
+
+<!-- Service contributions -->
+ <extension point="org.eclipse.tcf.te.runtime.services.services">
+ <service
+ class="org.eclipse.tcf.te.tcf.locator.internal.services.PropertiesAccessService"
+ id="org.eclipse.tcf.te.runtime.services.tcf.propertiesAccess">
+ <serviceType
+ bundleId="org.eclipse.tcf.te.runtime.services"
+ class="org.eclipse.tcf.te.runtime.services.interfaces.IPropertiesAccessService"/>
+ <enablement>
+ <instanceof value="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel"/>
+ </enablement>
+ </service>
+ </extension>
+
+</plugin>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/pom.xml b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/pom.xml
new file mode 100644
index 000000000..894615620
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.tcf</groupId>
+ <artifactId>tcf-parent</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../../../pom.xml</relativePath>
+ </parent>
+
+ <version>1.0.0.qualifier</version>
+ <artifactId>org.eclipse.tcf.te.tcf.locator</artifactId>
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/Scanner.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/Scanner.java
index b6a2a899d..112808ea8 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/Scanner.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/Scanner.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.locator;
+package org.eclipse.tcf.te.tcf.locator;
import java.util.HashMap;
import java.util.Map;
@@ -20,10 +20,10 @@ import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.te.tcf.locator.interfaces.IScanner;
-import org.eclipse.tm.te.tcf.locator.interfaces.nodes.ILocatorModel;
-import org.eclipse.tm.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.te.tcf.locator.interfaces.IScanner;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.ILocatorModel;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
/**
@@ -60,7 +60,7 @@ public class Scanner extends Job implements IScanner {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.locator.core.interfaces.IScanner#setConfiguration(java.util.Map)
+ * @see org.eclipse.tcf.te.tcf.locator.core.interfaces.IScanner#setConfiguration(java.util.Map)
*/
@Override
public void setConfiguration(Map<String, Object> configuration) {
@@ -70,7 +70,7 @@ public class Scanner extends Job implements IScanner {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.locator.core.interfaces.IScanner#getConfiguration()
+ * @see org.eclipse.tcf.te.tcf.locator.core.interfaces.IScanner#getConfiguration()
*/
@Override
public Map<String, Object> getConfiguration() {
@@ -125,7 +125,7 @@ public class Scanner extends Job implements IScanner {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.locator.core.interfaces.IScanner#terminate()
+ * @see org.eclipse.tcf.te.tcf.locator.core.interfaces.IScanner#terminate()
*/
@Override
public void terminate() {
@@ -133,7 +133,7 @@ public class Scanner extends Job implements IScanner {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.locator.core.interfaces.IScanner#isTerminated()
+ * @see org.eclipse.tcf.te.tcf.locator.core.interfaces.IScanner#isTerminated()
*/
@Override
public final boolean isTerminated() {
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/ScannerRunnable.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/ScannerRunnable.java
new file mode 100644
index 000000000..c289d8ddc
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/ScannerRunnable.java
@@ -0,0 +1,336 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.locator;
+
+import java.net.ConnectException;
+import java.net.InetAddress;
+import java.net.SocketTimeoutException;
+import java.net.UnknownHostException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.tcf.core.Command;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.services.ILocator;
+import org.eclipse.tcf.te.tcf.core.Tcf;
+import org.eclipse.tcf.te.tcf.locator.interfaces.IScanner;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.ILocatorModel;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModelProperties;
+import org.eclipse.tcf.te.tcf.locator.interfaces.services.ILocatorModelLookupService;
+import org.eclipse.tcf.te.tcf.locator.interfaces.services.ILocatorModelUpdateService;
+import org.eclipse.tcf.te.tcf.locator.nodes.PeerModel;
+import org.eclipse.tcf.te.tcf.locator.nodes.PeerRedirector;
+
+
+/**
+ * Scanner runnable to be executed for each peer to probe within the
+ * TCF event dispatch thread.
+ */
+public class ScannerRunnable implements Runnable, IChannel.IChannelListener {
+
+ // Reference to the parent model scanner
+ private final IScanner parentScanner;
+ // Reference to the peer model node to update
+ /* default */ final IPeerModel peerNode;
+ // Reference to the channel
+ /* default */ IChannel channel = null;
+ // Mark if the used channel is a shared channel instance
+ /* default */ boolean sharedChannel = false;
+ // The state of the peer node at the point of time the runnable starts execution
+ private int oldState = IPeerModelProperties.STATE_UNKNOWN;
+
+ /**
+ * Constructor.
+ *
+ * @param scanner The parent model scanner or <code>null</code> if the runnable is constructed from outside a scanner.
+ * @param peerNode The peer model instance. Must not be <code>null</code>.
+ */
+ public ScannerRunnable(IScanner scanner, IPeerModel peerNode) {
+ super();
+
+ parentScanner = scanner;
+
+ Assert.isNotNull(peerNode);
+ this.peerNode = peerNode;
+ }
+
+ /**
+ * Returns the parent scanner instance.
+ *
+ * @return The parent scanner instance or <code>null</code>.
+ */
+ protected final IScanner getParentScanner() {
+ return parentScanner;
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Runnable#run()
+ */
+ @Override
+ public void run() {
+ // Remember the peer node state
+ oldState = peerNode.getIntProperty(IPeerModelProperties.PROP_STATE);
+ // Do not open a channel to incomplete peer nodes
+ if (peerNode.isComplete() && peerNode.getPeer() != null) {
+ // Check if there is a shared channel available which is still in open state
+ channel = Tcf.getChannelManager().getChannel(peerNode.getPeer());
+ if (channel == null || channel.getState() != IChannel.STATE_OPEN) {
+ sharedChannel = false;
+ // Open the channel
+ channel = peerNode.getPeer().openChannel();
+ // Add ourself as channel listener
+ channel.addChannelListener(this);
+ } else {
+ sharedChannel = true;
+ // Shared channel is in open state -> use it
+ onChannelOpened();
+ }
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.protocol.IChannel.IChannelListener#onChannelOpened()
+ */
+ @SuppressWarnings("unused")
+ @Override
+ public void onChannelOpened() {
+ // Peer is reachable
+ if (channel != null && !sharedChannel) {
+ // Remove ourself as channel listener
+ channel.removeChannelListener(this);
+ }
+
+ // Turn off change notifications temporarily
+ boolean changed = peerNode.setChangeEventsEnabled(false);
+ // Flag to set for refreshing the editor tab list
+ boolean refreshEditorTabs = false;
+
+ // Set the peer state property
+ int counter = peerNode.getIntProperty(IPeerModelProperties.PROP_CHANNEL_REF_COUNTER);
+ peerNode.setProperty(IPeerModelProperties.PROP_STATE, counter > 0 ? IPeerModelProperties.STATE_CONNECTED : IPeerModelProperties.STATE_REACHABLE);
+ peerNode.setProperty(IPeerModelProperties.PROP_LAST_SCANNER_ERROR, null);
+ // If the old state had been one of the error states before, and is now changed to
+ // either reachable or connected, the editor tabs needs refreshment.
+ refreshEditorTabs = oldState != IPeerModelProperties.STATE_CONNECTED && oldState != IPeerModelProperties.STATE_REACHABLE;
+
+ if (channel != null && channel.getState() == IChannel.STATE_OPEN) {
+ // Keep the channel open as long as the query for the remote peers is running.
+ boolean keepOpen = false;
+
+ // Get the parent model from the model mode
+ final ILocatorModel model = (ILocatorModel)peerNode.getAdapter(ILocatorModel.class);
+ if (model != null) {
+ // Get the local service
+ Collection<String> localServices = new ArrayList<String>(channel.getLocalServices());
+ // Get the remote services
+ Collection<String> remoteServices = new ArrayList<String>(channel.getRemoteServices());
+
+ // Update the services
+ ILocatorModelUpdateService updateService = model.getService(ILocatorModelUpdateService.class);
+ updateService.updatePeerServices(peerNode, localServices, remoteServices);
+
+ // Use the open channel to ask the remote peer what other peers it knows
+ ILocator locator = channel.getRemoteService(ILocator.class);
+ if (locator != null) {
+ // Channel must be kept open as long as the command runs
+ keepOpen = true;
+ // Issue the command
+ new Command(channel, locator, "getPeers", null) { //$NON-NLS-1$
+ @Override
+ public void done(Exception error, Object[] args) {
+ if (error == null) {
+ assert args.length == 2;
+ error = toError(args[0]);
+ }
+ // If the error is still null here, process the returned peers
+ if (error == null && args[1] != null) {
+ // Get the parent peer
+ IPeer parentPeer = channel.getRemotePeer();
+ // Get the old child list
+ List<IPeerModel> oldChildren = new ArrayList<IPeerModel>(model.getChildren(parentPeer.getID()));
+
+ // "getPeers" returns a collection of peer attribute maps
+ @SuppressWarnings("unchecked")
+ Collection<Map<String,String>> peerAttributesList = (Collection<Map<String,String>>)args[1];
+ for (Map<String,String> attributes : peerAttributesList) {
+ // Get the peer id
+ String peerId = attributes.get(IPeer.ATTR_ID);
+ // Create a peer instance
+ IPeer peer = new PeerRedirector(parentPeer, attributes);
+ // Try to find an existing peer node first
+ IPeerModel peerNode = model.getService(ILocatorModelLookupService.class).lkupPeerModelById(parentPeer.getID(), peerId);
+ if (peerNode == null) {
+ // Not yet known -> add it
+ peerNode = new PeerModel(model, peer);
+ peerNode.setParentNode(ScannerRunnable.this.peerNode);
+ // Validate the peer node before adding
+ peerNode = model.validateChildPeerNodeForAdd(peerNode);
+ if (peerNode != null) {
+ // Add the child peer node to model
+ model.getService(ILocatorModelUpdateService.class).addChild(peerNode);
+ // And schedule for immediate status update
+ Runnable runnable = new ScannerRunnable(getParentScanner(), peerNode);
+ Protocol.invokeLater(runnable);
+ }
+ } else {
+ // The parent node should be set and match
+ Assert.isTrue(peerNode.getParentNode() != null && peerNode.getParentNode().equals(ScannerRunnable.this.peerNode));
+ // Peer node found, update the peer instance
+ peerNode.setProperty(IPeerModelProperties.PROP_INSTANCE, peer);
+ // And remove it from the old child list
+ oldChildren.remove(peerNode);
+ }
+ }
+
+ // Everything left in the old child list is not longer known to the remote peer
+ // However, the child list may include manual redirected static peers. Do not
+ // remove them here.
+ for (IPeerModel child : oldChildren) {
+ String value = child.getPeer().getAttributes().get("static.transient"); //$NON-NLS-1$
+ if (value == null || !Boolean.parseBoolean(value.trim())) {
+ // Remove the child peer node from the model
+ model.getService(ILocatorModelUpdateService.class).removeChild(child);
+ }
+ }
+ }
+
+ // Once everything is processed, close the channel
+ if (!sharedChannel) channel.close();
+ }
+ };
+ }
+
+ // If we don't queried the DNS name of the peer, or the peer IP changed,
+ // trigger a query (can run in any thread, outside TCF dispatch and UI
+ // thread). This make sense only if there is an IP address to query at all.
+ final String ip = channel.getRemotePeer().getAttributes().get(IPeer.ATTR_IP_HOST);
+ if (ip != null && !"".equals(ip)) { //$NON-NLS-1$
+ if (peerNode.getStringProperty("dns.name.transient") == null || !ip.equals(peerNode.getStringProperty("dns.lastIP.transient"))) { //$NON-NLS-1$ //$NON-NLS-2$
+ // If the IP address changed, reset the "do not query again" marker
+ if (!ip.equals(peerNode.getStringProperty("dns.lastIP.transient"))) { //$NON-NLS-1$
+ peerNode.setProperty("dns.lastIP.transient", ip); //$NON-NLS-1$
+ peerNode.setProperty("dns.skip.transient", false); //$NON-NLS-1$
+ }
+
+ if (!peerNode.getBooleanProperty("dns.skip.transient")) { //$NON-NLS-1$
+ Runnable runnable = new Runnable() {
+ @Override
+ public void run() {
+ try {
+ InetAddress address = InetAddress.getByName(ip);
+ final String name = address.getCanonicalHostName();
+ Protocol.invokeLater(new Runnable() {
+ @Override
+ public void run() {
+ if (name != null && !"".equals(name) && !ip.equals(name)) { //$NON-NLS-1$
+ String dnsName = name.indexOf('.') != -1 ? name.substring(0, name.indexOf('.')) : name;
+ if (!ip.equalsIgnoreCase(dnsName)) {
+ peerNode.setProperty("dns.name.transient", dnsName.toLowerCase()); //$NON-NLS-1$
+ }
+ }
+ }
+ });
+ }
+ catch (UnknownHostException e) {
+ Protocol.invokeLater(new Runnable() {
+ @Override
+ public void run() {
+ peerNode.setProperty("dns.skip.transient", true); //$NON-NLS-1$
+ }
+ });
+ }
+ }
+ };
+
+ Thread thread = new Thread(runnable, "DNS Query Thread for " + ip); //$NON-NLS-1$
+ thread.start();
+ }
+ }
+ }
+ }
+
+ // And close the channel
+ if (!sharedChannel && !keepOpen) channel.close();
+ }
+
+ // Re-enable the change events a fire a "properties" change event
+ if (changed) {
+ peerNode.setChangeEventsEnabled(true);
+ peerNode.fireChangeEvent("properties", null, peerNode.getProperties()); //$NON-NLS-1$
+ }
+
+ if (refreshEditorTabs) {
+ peerNode.fireChangeEvent("editor.refreshTab", Boolean.FALSE, Boolean.TRUE); //$NON-NLS-1$
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.protocol.IChannel.IChannelListener#onChannelClosed(java.lang.Throwable)
+ */
+ @Override
+ public void onChannelClosed(Throwable error) {
+ // Peer is not reachable
+
+ if (channel != null) {
+ // Remove ourself as channel listener
+ channel.removeChannelListener(this);
+ }
+
+ // Set the peer state property, if the scanner the runnable
+ // has been scheduled from is still active.
+ if (parentScanner == null || parentScanner != null && !parentScanner.isTerminated()) {
+ // Turn off change notifications temporarily
+ boolean changed = peerNode.setChangeEventsEnabled(false);
+
+ peerNode.setProperty(IPeerModelProperties.PROP_CHANNEL_REF_COUNTER, null);
+ boolean timeout = error instanceof SocketTimeoutException || (error instanceof ConnectException && error.getMessage() != null && error.getMessage().startsWith("Connection timed out:")); //$NON-NLS-1$
+ peerNode.setProperty(IPeerModelProperties.PROP_STATE, timeout ? IPeerModelProperties.STATE_NOT_REACHABLE : IPeerModelProperties.STATE_ERROR);
+ peerNode.setProperty(IPeerModelProperties.PROP_LAST_SCANNER_ERROR, error instanceof SocketTimeoutException ? null : error);
+
+ // Clear out previously determined services
+ ILocatorModel model = (ILocatorModel)peerNode.getAdapter(ILocatorModel.class);
+ if (model != null) {
+ ILocatorModelUpdateService updateService = model.getService(ILocatorModelUpdateService.class);
+ updateService.updatePeerServices(peerNode, null, null);
+ }
+
+ // Clean out DNS name detection
+ peerNode.setProperty("dns.name.transient", null); //$NON-NLS-1$
+ peerNode.setProperty("dns.lastIP.transient", null); //$NON-NLS-1$
+ peerNode.setProperty("dns.skip.transient", null); //$NON-NLS-1$
+
+ // Re-enable the change events a fire a "properties" change event
+ if (changed) {
+ peerNode.setChangeEventsEnabled(true);
+ peerNode.fireChangeEvent("properties", null, peerNode.getProperties()); //$NON-NLS-1$
+ }
+
+ // If the old state had been one of the reachable states before, and is now changed to
+ // either not reachable or error, the editor tabs needs refreshment.
+ if (oldState != IPeerModelProperties.STATE_NOT_REACHABLE && oldState != IPeerModelProperties.STATE_ERROR) {
+ peerNode.fireChangeEvent("editor.refreshTab", Boolean.FALSE, Boolean.TRUE); //$NON-NLS-1$
+ }
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.protocol.IChannel.IChannelListener#congestionLevel(int)
+ */
+ @Override
+ public void congestionLevel(int level) {
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/activator/CoreBundleActivator.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/activator/CoreBundleActivator.java
index 944a04ba1..62038576b 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/activator/CoreBundleActivator.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/activator/CoreBundleActivator.java
@@ -7,10 +7,13 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.locator.activator;
+package org.eclipse.tcf.te.tcf.locator.activator;
import org.eclipse.core.runtime.Plugin;
-import org.eclipse.tm.te.runtime.tracing.TraceHandler;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.te.runtime.tracing.TraceHandler;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.ILocatorModel;
+import org.eclipse.tcf.te.tcf.locator.model.Model;
import org.osgi.framework.BundleContext;
/**
@@ -68,6 +71,20 @@ public class CoreBundleActivator extends Plugin {
@Override
public void stop(BundleContext context) throws Exception {
plugin = null;
+
+ // Dispose the locator model
+ final ILocatorModel model = Model.getModel(true);
+ if (model != null) {
+ Runnable runnable = new Runnable() {
+ @Override
+ public void run() {
+ model.dispose();
+ }
+ };
+ if (Protocol.isDispatchThread()) runnable.run();
+ else Protocol.invokeAndWait(runnable);
+ }
+
super.stop(context);
}
}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/interfaces/IModelListener.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/IModelListener.java
index 1da6c1f1d..8e348dca5 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/interfaces/IModelListener.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/IModelListener.java
@@ -3,18 +3,17 @@
* This program and the accompanying materials are made available under the terms
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.locator.interfaces;
+package org.eclipse.tcf.te.tcf.locator.interfaces;
-import org.eclipse.tm.te.tcf.locator.interfaces.nodes.ILocatorModel;
-import org.eclipse.tm.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.ILocatorModel;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
/**
- * Interface for clients to implement that wishes to listen
- * to changes to the locator model.
+ * Interface for clients to implement that wishes to listen to changes to the locator model.
*/
public interface IModelListener {
@@ -22,8 +21,10 @@ public interface IModelListener {
* Invoked if a peer is added or removed to/from the locator model.
*
* @param model The changed locator model.
+ * @param peer The added/removed peer model.
+ * @param added <code>True</code> if the peer model got added, <code>false</code> if it got removed.
*/
- public void locatorModelChanged(ILocatorModel model);
+ public void locatorModelChanged(ILocatorModel model, IPeerModel peer, boolean added);
/**
* Invoked if the locator model is disposed.
@@ -31,12 +32,4 @@ public interface IModelListener {
* @param model The disposed locator model.
*/
public void locatorModelDisposed(ILocatorModel model);
-
- /**
- * Invoked if the peer model properties have changed.
- *
- * @param model The parent locator model.
- * @param peer The changed peer model.
- */
- public void peerModelChanged(ILocatorModel model, IPeerModel peer);
}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/interfaces/IScanner.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/IScanner.java
index 3f6e2bc3f..784dbedd5 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/interfaces/IScanner.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/IScanner.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.locator.interfaces;
+package org.eclipse.tcf.te.tcf.locator.interfaces;
import java.util.Map;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/interfaces/ITracing.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/ITracing.java
index 84b2b9d9b..7dcb93e83 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/interfaces/ITracing.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/ITracing.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.locator.interfaces;
+package org.eclipse.tcf.te.tcf.locator.interfaces;
/**
* TCF locator bundle tracing identifiers.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/interfaces/nodes/ILocatorModel.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/nodes/ILocatorModel.java
index f1e6a7ba9..491e12de1 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/interfaces/nodes/ILocatorModel.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/nodes/ILocatorModel.java
@@ -3,17 +3,19 @@
* This program and the accompanying materials are made available under the terms
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.locator.interfaces.nodes;
+package org.eclipse.tcf.te.tcf.locator.interfaces.nodes;
+
+import java.util.List;
import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.tm.tcf.services.ILocator;
-import org.eclipse.tm.te.tcf.locator.interfaces.IModelListener;
-import org.eclipse.tm.te.tcf.locator.interfaces.IScanner;
-import org.eclipse.tm.te.tcf.locator.interfaces.services.ILocatorModelService;
+import org.eclipse.tcf.services.ILocator;
+import org.eclipse.tcf.te.tcf.locator.interfaces.IModelListener;
+import org.eclipse.tcf.te.tcf.locator.interfaces.IScanner;
+import org.eclipse.tcf.te.tcf.locator.interfaces.services.ILocatorModelService;
/**
@@ -75,6 +77,22 @@ public interface ILocatorModel extends IAdaptable {
public IPeerModel[] getPeers();
/**
+ * Returns an unmodifiable list of known children for the given parent peer.
+ *
+ * @param parentPeerID The parent peer id. Must not be <code>null</code>.
+ * @return The child list.
+ */
+ public List<IPeerModel> getChildren(String parentPeerID);
+
+ /**
+ * Sets the list of known children for the given parent peer.
+ *
+ * @param parentPeerID The parent peer id. Must not be <code>null</code>.
+ * @param children The list of children or <code>null</code> to remove the parent peer.
+ */
+ public void setChildren(String parentPeerID, List<IPeerModel> children);
+
+ /**
* Returns the scanner instance being associated with the
* locator model.
*
@@ -105,12 +123,25 @@ public interface ILocatorModel extends IAdaptable {
public <V extends ILocatorModelService> V getService(Class<V> serviceInterface);
/**
- * Validate the given peer model if or if not it can be added
- * to the locator model as new peer node.
+ * Validate the given peer model if or if not it can be added to the locator model as new peer
+ * node.
*
* @param node The peer model. Must not be <code>null</code>.
* @return The peer node if it allowed add it to the model, or <code>null</code> if not.
*/
public IPeerModel validatePeerNodeForAdd(IPeerModel node);
+ /**
+ * Validate the given child peer model node if or if not it can be added to the locator model
+ * as new child peer node for the associated parent peer model node.
+ * <p>
+ * <b>Note:</b> The parent peer node is determined by calling {@link IPeerModel#getParentNode()}.
+ * The call has to return a non-null value, otherwise {@link #validateChildPeerNodeForAdd(IPeerModel)}
+ * will do nothing.
+ *
+ * @param node The peer model. Must not be <code>null</code>.
+ * @return The peer node if it allowed add it to the model, or <code>null</code> if not.
+ */
+ public IPeerModel validateChildPeerNodeForAdd(IPeerModel node);
+
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/nodes/IPeerModel.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/nodes/IPeerModel.java
new file mode 100644
index 000000000..713ad32f6
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/nodes/IPeerModel.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.locator.interfaces.nodes;
+
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+
+/**
+ * The peer model is an extension to the TCF peer representation, implementing the {@link IPeer}
+ * interface. The peer model provides an offline cache for a peers known list of local and remote
+ * services and is the merge point of peer attributes from custom data storages.
+ * <p>
+ * <b>Note:</b> Read and write access to the peer model must happen within the TCF dispatch thread.
+ */
+public interface IPeerModel extends IPropertiesContainer {
+
+ /**
+ * Returns the parent locator model instance.
+ * <p>
+ * This method may be called from any thread.
+ *
+ * @return The parent locator model instance.
+ */
+ public ILocatorModel getModel();
+
+ /**
+ * Returns the native {@link IPeer} object.
+ * <p>
+ * This method may be called from any thread.
+ *
+ * @return The native {@link IPeer} instance.
+ */
+ public IPeer getPeer();
+
+ /**
+ * Returns the peer id.
+ * <p>
+ * This method may be called from any thread.
+ *
+ * @return The peer id.
+ */
+ public String getPeerId();
+
+ /**
+ * Returns if or if not the peer attributes are complete to open a channel to it.
+ *
+ * @return <code>True</code> if the peer attributes are complete, <code>false</code> otherwise.
+ */
+ public boolean isComplete();
+
+ /**
+ * Sets the parent peer model node.
+ *
+ * @param node The parent peer model node or <code>null</code>.
+ */
+ public void setParentNode(IPeerModel node);
+
+ /**
+ * Returns the parent peer model node.
+ *
+ * @return The parent peer model node or <code>null</code>.
+ */
+ public IPeerModel getParentNode();
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/interfaces/nodes/IPeerModelProperties.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/nodes/IPeerModelProperties.java
index af78839fe..93a2075b4 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/interfaces/nodes/IPeerModelProperties.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/nodes/IPeerModelProperties.java
@@ -3,13 +3,13 @@
* This program and the accompanying materials are made available under the terms
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.locator.interfaces.nodes;
+package org.eclipse.tcf.te.tcf.locator.interfaces.nodes;
-import org.eclipse.tm.tcf.protocol.IPeer;
+import org.eclipse.tcf.protocol.IPeer;
/**
* Default set of custom peer properties.
@@ -33,6 +33,11 @@ public interface IPeerModelProperties {
public static final String PROP_REMOTE_SERVICES = "services.remote"; //$NON-NLS-1$
/**
+ * Property: The redirection proxy peer id.
+ */
+ public static final String PROP_REDIRECT_PROXY = "redirect.proxy"; //$NON-NLS-1$
+
+ /**
* Property: The peer state.
*/
public static String PROP_STATE = "state"; //$NON-NLS-1$
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/nodes/IPeerModelProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/nodes/IPeerModelProvider.java
new file mode 100644
index 000000000..f2174b990
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/nodes/IPeerModelProvider.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.locator.interfaces.nodes;
+
+import org.eclipse.core.runtime.IAdaptable;
+
+/**
+ * Interface to be implemented by nodes providing access to an peer
+ * model object instance without being a peer model object itself.
+ */
+public interface IPeerModelProvider extends IAdaptable {
+
+ /**
+ * Returns the associated peer model object.
+ *
+ * @return The peer model object instance or <code>null</code>.
+ */
+ public IPeerModel getPeerModel();
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/nodes/IPeerRedirector.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/nodes/IPeerRedirector.java
new file mode 100644
index 000000000..b32d03b02
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/nodes/IPeerRedirector.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.locator.interfaces.nodes;
+
+import org.eclipse.tcf.protocol.IPeer;
+
+/**
+ * Interface to be implemented by peer redirectors.
+ */
+public interface IPeerRedirector extends IPeer {
+
+ /**
+ * Returns the parent peer.
+ *
+ * @return The parent peer.
+ */
+ public IPeer getParent();
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/interfaces/preferences/IPreferenceKeys.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/preferences/IPreferenceKeys.java
index 0f2999312..a8601a35e 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/interfaces/preferences/IPreferenceKeys.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/preferences/IPreferenceKeys.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.locator.interfaces.preferences;
+package org.eclipse.tcf.te.tcf.locator.interfaces.preferences;
import java.io.File;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/interfaces/services/ILocatorModelLookupService.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/services/ILocatorModelLookupService.java
index f292f37c8..7d88a1a63 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/interfaces/services/ILocatorModelLookupService.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/services/ILocatorModelLookupService.java
@@ -7,9 +7,9 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.locator.interfaces.services;
+package org.eclipse.tcf.te.tcf.locator.interfaces.services;
-import org.eclipse.tm.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
/**
* The service to lookup/search in the parent locator model.
@@ -25,7 +25,17 @@ public interface ILocatorModelLookupService extends ILocatorModelService {
public IPeerModel lkupPeerModelById(String id);
/**
- * Lookup matching peer model instances for the given agent id.
+ * Lookup the peer model for the given peer id from the peers child list of
+ * the peer identified by the given parent id.
+ *
+ * @param parentId The parent peer id. Must not be <code>null</code>.
+ * @param id The peer id. Must not be <code>null</code>.
+ * @return The peer model instance, or <code>null</code> if the peer model cannot be found.
+ */
+ public IPeerModel lkupPeerModelById(String parentId, String id);
+
+ /**
+ * Lookup the matching peer model instances for the given agent id.
*
* @param agentId The agent id. Must not be <code>null</code>.
* @return The peer model instances, or an empty list if the given agent id could not be matched.
@@ -33,6 +43,15 @@ public interface ILocatorModelLookupService extends ILocatorModelService {
public IPeerModel[] lkupPeerModelByAgentId(String agentId);
/**
+ * Lookup the matching peer model instances for the given agent id.
+ *
+ * @param parentId The parent peer id. Must not be <code>null</code>.
+ * @param agentId The agent id. Must not be <code>null</code>.
+ * @return The peer model instances, or an empty list if the given agent id could not be matched.
+ */
+ public IPeerModel[] lkupPeerModelByAgentId(String parentId, String agentId);
+
+ /**
* Lookup matching peer model instances which supports the listed local and remote services.
*
* @param expectedLocalServices The list of local service names to be supported, or <code>null</code>.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/interfaces/services/ILocatorModelRefreshService.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/services/ILocatorModelRefreshService.java
index 81e6c3b8e..64a590b95 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/interfaces/services/ILocatorModelRefreshService.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/services/ILocatorModelRefreshService.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.locator.interfaces.services;
+package org.eclipse.tcf.te.tcf.locator.interfaces.services;
/**
* The service to refresh the parent locator model from remote.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/interfaces/services/ILocatorModelService.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/services/ILocatorModelService.java
index 41c4e24e9..2cb869948 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/interfaces/services/ILocatorModelService.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/services/ILocatorModelService.java
@@ -7,10 +7,10 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.locator.interfaces.services;
+package org.eclipse.tcf.te.tcf.locator.interfaces.services;
import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.tm.te.tcf.locator.interfaces.nodes.ILocatorModel;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.ILocatorModel;
/**
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/interfaces/services/ILocatorModelUpdateService.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/services/ILocatorModelUpdateService.java
index bad6dfb13..46dd14c42 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/interfaces/services/ILocatorModelUpdateService.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/services/ILocatorModelUpdateService.java
@@ -3,15 +3,15 @@
* This program and the accompanying materials are made available under the terms
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.locator.interfaces.services;
+package org.eclipse.tcf.te.tcf.locator.interfaces.services;
import java.util.Collection;
-import org.eclipse.tm.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
/**
@@ -20,9 +20,9 @@ import org.eclipse.tm.te.tcf.locator.interfaces.nodes.IPeerModel;
public interface ILocatorModelUpdateService extends ILocatorModelService {
/**
- * Adds the given peer to the list of know peers. A previous
- * mapping to a peer model with the same id as the given
- * peer model is overwritten.
+ * Adds the given peer to the list of know peers.
+ * <p>
+ * A previous mapping to a peer model with the same id as the given peer model is overwritten.
*
* @param peer The peer model object. Must not be <code>null</code>.
*/
@@ -44,4 +44,28 @@ public interface ILocatorModelUpdateService extends ILocatorModelService {
* @param remoteServices The list of remote service names or <code>null</code>.
*/
public void updatePeerServices(IPeerModel peerNode, Collection<String> localServices, Collection<String> remoteServices);
+
+ /**
+ * Adds the given child peer to the parent peer.
+ * <p>
+ * <b>Note:</b> The parent peer node is determined by calling {@link IPeerModel#getParentNode()}.
+ * The call has to return a non-null value, otherwise {@link #addChild(IPeerModel)}
+ * will do nothing.
+ *
+ * @param parent The parent peer model node. Must not be <code>null</code>.
+ * @param child The child peer model object. Must not be <code>null</code>.
+ */
+ public void addChild(IPeerModel child);
+
+ /**
+ * Removes the given child peer from the parent peer.
+ * <p>
+ * <b>Note:</b> The parent peer node is determined by calling {@link IPeerModel#getParentNode()}.
+ * The call has to return a non-null value, otherwise {@link #removeChild(IPeerModel)}
+ * will do nothing.
+ *
+ * @param parent The parent peer model node. Must not be <code>null</code>.
+ * @param child The child peer model object. Must not be <code>null</code>.
+ */
+ public void removeChild(IPeerModel child);
}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/internal/MyPropertyTester.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/internal/MyPropertyTester.java
index ccdf3eab8..64303f894 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/internal/MyPropertyTester.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/internal/MyPropertyTester.java
@@ -7,13 +7,14 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.locator.internal;
+package org.eclipse.tcf.te.tcf.locator.internal;
import org.eclipse.core.expressions.PropertyTester;
import org.eclipse.core.runtime.Assert;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.te.tcf.locator.interfaces.nodes.IPeerModel;
-import org.eclipse.tm.te.tcf.locator.interfaces.nodes.IPeerModelProperties;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModelProperties;
+import org.eclipse.tcf.te.tcf.locator.nodes.PeerRedirector;
@@ -82,11 +83,16 @@ public class MyPropertyTester extends PropertyTester {
}
if ("isStaticPeer".equals(property)) { //$NON-NLS-1$
- String path = node.getPeer().getAttributes().get("Path"); //$NON-NLS-1$
- boolean isStaticPeer = path != null && !"".equals(path.trim()); //$NON-NLS-1$
+ String value = node.getPeer().getAttributes().get("static.transient"); //$NON-NLS-1$
+ boolean isStaticPeer = value != null && Boolean.parseBoolean(value.trim());
if (expectedValue instanceof Boolean) return ((Boolean)expectedValue).booleanValue() == isStaticPeer;
}
+ if ("isRedirected".equals(property)) { //$NON-NLS-1$
+ boolean isRedirected = node.getPeer() instanceof PeerRedirector;
+ if (expectedValue instanceof Boolean) return ((Boolean)expectedValue).booleanValue() == isRedirected;
+ }
+
return false;
}
}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/internal/PeersPersistenceDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/internal/PeersPersistenceDelegate.java
index 541908f0c..91112202b 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/internal/PeersPersistenceDelegate.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/internal/PeersPersistenceDelegate.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.locator.internal;
+package org.eclipse.tcf.te.tcf.locator.internal;
import java.io.BufferedWriter;
import java.io.File;
@@ -20,7 +20,7 @@ import java.util.Map;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
-import org.eclipse.tm.te.runtime.persistence.AbstractPersistenceDelegate;
+import org.eclipse.tcf.te.runtime.persistence.AbstractPersistenceDelegate;
/**
* Static peers persistence delegate implementation.
@@ -28,7 +28,7 @@ import org.eclipse.tm.te.runtime.persistence.AbstractPersistenceDelegate;
public class PeersPersistenceDelegate extends AbstractPersistenceDelegate {
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.persistence.interfaces.IPersistenceDelegate#write(java.net.URI, java.util.Map)
+ * @see org.eclipse.tcf.te.runtime.persistence.interfaces.IPersistenceDelegate#write(java.net.URI, java.util.Map)
*/
@Override
public void write(URI uri, Map<String, Object> data) throws IOException {
@@ -69,7 +69,7 @@ public class PeersPersistenceDelegate extends AbstractPersistenceDelegate {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.persistence.interfaces.IPersistenceDelegate#delete(java.net.URI)
+ * @see org.eclipse.tcf.te.runtime.persistence.interfaces.IPersistenceDelegate#delete(java.net.URI)
*/
@Override
public boolean delete(URI uri) throws IOException {
@@ -98,7 +98,7 @@ public class PeersPersistenceDelegate extends AbstractPersistenceDelegate {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.persistence.interfaces.IPersistenceDelegate#read(java.net.URI)
+ * @see org.eclipse.tcf.te.runtime.persistence.interfaces.IPersistenceDelegate#read(java.net.URI)
*/
@Override
public Map<String, Object> read(URI uri) throws IOException {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/internal/adapters/AdapterFactory.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/internal/adapters/AdapterFactory.java
index 1e88ef6a5..2e337fd41 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/internal/adapters/AdapterFactory.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/internal/adapters/AdapterFactory.java
@@ -7,13 +7,13 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.locator.internal.adapters;
+package org.eclipse.tcf.te.tcf.locator.internal.adapters;
import java.util.Map;
import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.tm.te.runtime.persistence.interfaces.IPersistable;
-import org.eclipse.tm.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.runtime.persistence.interfaces.IPersistable;
/**
* Static peers adapter factory implementation.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/internal/adapters/MapPersistableAdapter.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/internal/adapters/MapPersistableAdapter.java
index 95598163c..ed71f2b76 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/internal/adapters/MapPersistableAdapter.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/internal/adapters/MapPersistableAdapter.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.locator.internal.adapters;
+package org.eclipse.tcf.te.tcf.locator.internal.adapters;
import java.io.IOException;
import java.net.URI;
@@ -17,9 +17,9 @@ import java.util.Map;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
-import org.eclipse.tm.tcf.protocol.IPeer;
-import org.eclipse.tm.te.runtime.persistence.interfaces.IPersistable;
-import org.eclipse.tm.te.tcf.locator.activator.CoreBundleActivator;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.te.runtime.persistence.interfaces.IPersistable;
+import org.eclipse.tcf.te.tcf.locator.activator.CoreBundleActivator;
/**
* Persistable implementation handling peer attributes.
@@ -27,15 +27,15 @@ import org.eclipse.tm.te.tcf.locator.activator.CoreBundleActivator;
public class MapPersistableAdapter implements IPersistable {
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.persistence.interfaces.IPersistable#getStorageID()
+ * @see org.eclipse.tcf.te.runtime.persistence.interfaces.IPersistable#getStorageID()
*/
@Override
public String getStorageID() {
- return "org.eclipse.tm.te.tcf.locator.persistence"; //$NON-NLS-1$
+ return "org.eclipse.tcf.te.tcf.locator.persistence"; //$NON-NLS-1$
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.persistence.interfaces.IPersistable#getURI(java.lang.Object)
+ * @see org.eclipse.tcf.te.runtime.persistence.interfaces.IPersistable#getURI(java.lang.Object)
*/
@SuppressWarnings("unchecked")
@Override
@@ -98,7 +98,19 @@ public class MapPersistableAdapter implements IPersistable {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.persistence.interfaces.IPersistable#exportFrom(java.lang.Object)
+ * @see org.eclipse.tcf.te.runtime.persistence.interfaces.IPersistable#getInterfaceType(java.lang.Object)
+ */
+ @Override
+ public String getInterfaceTypeName(Object data) {
+ if (data instanceof Map) {
+ // No bundle id needed here, it's a POJO
+ return Map.class.getName();
+ }
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.persistence.interfaces.IPersistable#exportFrom(java.lang.Object)
*/
@SuppressWarnings("unchecked")
@Override
@@ -111,14 +123,18 @@ public class MapPersistableAdapter implements IPersistable {
if (data instanceof Map) {
// Convert into a String/Object map to pass it on to the persistence delegates
result = new LinkedHashMap<String, Object>();
- for (String key : ((Map<String, String>) data).keySet()) result.put(key, ((Map<String, String>) data).get(key));
+ for (String key : ((Map<String, String>) data).keySet()) {
+ if (!key.endsWith(".transient")) { //$NON-NLS-1$
+ result.put(key, ((Map<String, String>) data).get(key));
+ }
+ }
}
return result;
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.persistence.interfaces.IPersistable#importTo(java.lang.Object, java.util.Map)
+ * @see org.eclipse.tcf.te.runtime.persistence.interfaces.IPersistable#importTo(java.lang.Object, java.util.Map)
*/
@Override
public void importTo(Object data, Map<String, Object> external) throws IOException {
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/internal/adapters/PeerModelPersistableAdapter.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/internal/adapters/PeerModelPersistableAdapter.java
new file mode 100644
index 000000000..b8aff7697
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/internal/adapters/PeerModelPersistableAdapter.java
@@ -0,0 +1,126 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.locator.internal.adapters;
+
+import java.io.IOException;
+import java.net.URI;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.atomic.AtomicReference;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.te.runtime.persistence.interfaces.IPersistable;
+import org.eclipse.tcf.te.runtime.persistence.interfaces.IPersistableNodeProperties;
+import org.eclipse.tcf.te.tcf.locator.activator.CoreBundleActivator;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+
+/**
+ * Persistable implementation handling peer attributes.
+ */
+public class PeerModelPersistableAdapter implements IPersistable {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.persistence.interfaces.IPersistable#getStorageID()
+ */
+ @Override
+ public String getStorageID() {
+ return "org.eclipse.tcf.te.tcf.locator.persistence"; //$NON-NLS-1$
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.persistence.interfaces.IPersistable#getURI(java.lang.Object)
+ */
+ @Override
+ public URI getURI(final Object data) {
+ Assert.isNotNull(data);
+
+ URI uri = null;
+
+ // Only peer model objects are supported
+ if (data instanceof IPeerModel) {
+ // Get the URI the peer model has been created from
+ final AtomicReference<URI> nodeURI = new AtomicReference<URI>();
+ Runnable runnable = new Runnable() {
+ @Override
+ public void run() {
+ String value = ((IPeerModel)data).getPeer().getAttributes().get(IPersistableNodeProperties.PROPERTY_URI);
+ if (value != null && !"".equals(value.trim())) { //$NON-NLS-1$
+ nodeURI.set(URI.create(value.trim()));
+ }
+ }
+ };
+ if (Protocol.isDispatchThread()) runnable.run();
+ else Protocol.invokeAndWait(runnable);
+
+ if (nodeURI.get() != null) uri = nodeURI.get();
+ }
+
+ return uri;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.persistence.interfaces.IPersistable#getInterfaceType(java.lang.Object)
+ */
+ @Override
+ public String getInterfaceTypeName(Object data) {
+ if (data instanceof IPeerModel) {
+ return CoreBundleActivator.getUniqueIdentifier() + ":" + IPeerModel.class.getName(); //$NON-NLS-1$
+ }
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.persistence.interfaces.IPersistable#exportFrom(java.lang.Object)
+ */
+ @Override
+ public Map<String, Object> exportFrom(final Object data) throws IOException {
+ Assert.isNotNull(data);
+
+ final AtomicReference<Map<String, String>> attributes = new AtomicReference<Map<String, String>>();
+
+ // Only peer model objects are supported
+ if (data instanceof IPeerModel) {
+ Runnable runnable = new Runnable() {
+ @Override
+ public void run() {
+ attributes.set(((IPeerModel)data).getPeer().getAttributes());
+ }
+ };
+ if (Protocol.isDispatchThread()) runnable.run();
+ else Protocol.invokeAndWait(runnable);
+ }
+
+ Map<String, Object> result = null;
+ if (attributes.get() != null) {
+ result = new HashMap<String, Object>();
+ for (String key : attributes.get().keySet()) {
+ if (!key.endsWith(".transient")) { //$NON-NLS-1$
+ result.put(key, attributes.get().get(key));
+ }
+ }
+ }
+
+ return result;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.persistence.interfaces.IPersistable#importTo(java.lang.Object, java.util.Map)
+ */
+ @Override
+ public void importTo(final Object data, final Map<String, Object> external) throws IOException {
+ Assert.isNotNull(data);
+ Assert.isNotNull(external);
+
+ // A direct import of the attributes in a peer is not possible.
+ // A new peer with the new attributes needs to be created and set to the peer model.
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/internal/nls/Messages.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/internal/nls/Messages.java
index eed3f6b6b..7a053e140 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/internal/nls/Messages.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/internal/nls/Messages.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.locator.internal.nls;
+package org.eclipse.tcf.te.tcf.locator.internal.nls;
import java.lang.reflect.Field;
@@ -19,7 +19,7 @@ import org.eclipse.osgi.util.NLS;
public class Messages extends NLS {
// The plug-in resource bundle name
- private static final String BUNDLE_NAME = "org.eclipse.tm.te.tcf.locator.internal.nls.Messages"; //$NON-NLS-1$
+ private static final String BUNDLE_NAME = "org.eclipse.tcf.te.tcf.locator.internal.nls.Messages"; //$NON-NLS-1$
/**
* Static constructor.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/internal/nls/Messages.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/internal/nls/Messages.properties
index 515a5df21..f694d51aa 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/internal/nls/Messages.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/internal/nls/Messages.properties
@@ -1,5 +1,5 @@
#
-# org.eclipse.tm.te.tcf.locator
+# org.eclipse.tcf.te.tcf.locator
# Externalized Strings.
#
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/internal/preferences/PreferencesInitializer.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/internal/preferences/PreferencesInitializer.java
index 755229b15..7bc15e465 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/internal/preferences/PreferencesInitializer.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/internal/preferences/PreferencesInitializer.java
@@ -7,13 +7,13 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.locator.internal.preferences;
+package org.eclipse.tcf.te.tcf.locator.internal.preferences;
import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
import org.eclipse.core.runtime.preferences.DefaultScope;
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
-import org.eclipse.tm.te.tcf.locator.activator.CoreBundleActivator;
-import org.eclipse.tm.te.tcf.locator.interfaces.preferences.IPreferenceKeys;
+import org.eclipse.tcf.te.tcf.locator.activator.CoreBundleActivator;
+import org.eclipse.tcf.te.tcf.locator.interfaces.preferences.IPreferenceKeys;
/**
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/internal/services/PropertiesAccessService.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/internal/services/PropertiesAccessService.java
new file mode 100644
index 000000000..888228f48
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/internal/services/PropertiesAccessService.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.locator.internal.services;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.te.runtime.services.AbstractService;
+import org.eclipse.tcf.te.runtime.services.interfaces.IPropertiesAccessService;
+import org.eclipse.tcf.te.runtime.services.interfaces.constants.IPropertiesAccessServiceConstants;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+
+/**
+ * Peer model properties access service implementation.
+ */
+public class PropertiesAccessService extends AbstractService implements IPropertiesAccessService {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.services.interfaces.IPropertiesAccessService#getTargetAddress(java.lang.Object)
+ */
+ @Override
+ public Map<String, String> getTargetAddress(Object context) {
+ final Map<String, String> result = new HashMap<String, String>();
+
+ if (context instanceof IPeerModel) {
+ final IPeerModel peerModel = (IPeerModel) context;
+
+ Runnable runnable = new Runnable() {
+ @Override
+ public void run() {
+ Map<String, String> attributes = peerModel.getPeer().getAttributes();
+
+ String value = attributes.get(IPeer.ATTR_NAME);
+ if (value != null && !"".equals(value.trim())) { //$NON-NLS-1$
+ result.put(IPropertiesAccessServiceConstants.PROP_NAME, value);
+ }
+
+ value = attributes.get(IPeer.ATTR_IP_HOST);
+ if (value != null && !"".equals(value.trim())) { //$NON-NLS-1$
+ result.put(IPropertiesAccessServiceConstants.PROP_ADDRESS, value);
+ }
+
+ value = attributes.get(IPeer.ATTR_IP_PORT);
+ if (value != null && !"".equals(value.trim())) { //$NON-NLS-1$
+ result.put(IPropertiesAccessServiceConstants.PROP_PORT, value);
+ }
+ }
+ };
+
+ if (Protocol.isDispatchThread()) runnable.run();
+ else Protocol.invokeAndWait(runnable);
+ }
+
+ return !result.isEmpty() ? Collections.unmodifiableMap(result) : null;
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/listener/ChannelStateChangeListener.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/listener/ChannelStateChangeListener.java
new file mode 100644
index 000000000..3dfdac16a
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/listener/ChannelStateChangeListener.java
@@ -0,0 +1,90 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.locator.listener;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.te.tcf.core.listeners.interfaces.IChannelStateChangeListener;
+import org.eclipse.tcf.te.tcf.locator.activator.CoreBundleActivator;
+import org.eclipse.tcf.te.tcf.locator.interfaces.ITracing;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.ILocatorModel;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModelProperties;
+import org.eclipse.tcf.te.tcf.locator.interfaces.services.ILocatorModelLookupService;
+
+
+/**
+ * Channel state change listener implementation.
+ */
+public class ChannelStateChangeListener implements IChannelStateChangeListener {
+ // Reference to the parent model
+ private final ILocatorModel model;
+
+ /**
+ * Constructor.
+ *
+ * @param model The parent locator model. Must not be <code>null</code>.
+ */
+ public ChannelStateChangeListener(ILocatorModel model) {
+ Assert.isNotNull(model);
+ this.model = model;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.tcf.core.interfaces.listeners.IChannelStateChangeListener#stateChanged(org.eclipse.tcf.protocol.IChannel, int)
+ */
+ @Override
+ public void stateChanged(IChannel channel, int state) {
+ Assert.isNotNull(channel);
+ Assert.isTrue(Protocol.isDispatchThread());
+
+ if (CoreBundleActivator.getTraceHandler().isSlotEnabled(0, ITracing.ID_TRACE_CHANNEL_STATE_CHANGE_LISTENER)) {
+ CoreBundleActivator.getTraceHandler().trace("ChannelStateChangeListener.stateChanged( " + channel + ", " + (state == IChannel.STATE_OPEN ? "OPEN" : "CLOSED") + " )", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+ ITracing.ID_TRACE_CHANNEL_STATE_CHANGE_LISTENER, this);
+ }
+
+ switch (state) {
+ case IChannel.STATE_OPEN:
+ IPeer peer = channel.getRemotePeer();
+ if (peer != null && peer.getID() != null) {
+ // Find the corresponding model node
+ IPeerModel node = model.getService(ILocatorModelLookupService.class).lkupPeerModelById(peer.getID());
+ if (node != null) {
+ // Increase the channel reference counter by 1
+ int counter = node.getIntProperty(IPeerModelProperties.PROP_CHANNEL_REF_COUNTER);
+ if (counter < 0) counter = 0;
+ counter++;
+ node.setProperty(IPeerModelProperties.PROP_CHANNEL_REF_COUNTER, counter);
+ if (counter > 0) node.setProperty(IPeerModelProperties.PROP_STATE, IPeerModelProperties.STATE_CONNECTED);
+ }
+ }
+ break;
+ case IChannel.STATE_CLOSED:
+ peer = channel.getRemotePeer();
+ if (peer != null && peer.getID() != null) {
+ // Find the corresponding model node
+ IPeerModel node = model.getService(ILocatorModelLookupService.class).lkupPeerModelById(peer.getID());
+ if (node != null) {
+ // Decrease the channel reference counter by 1
+ int counter = node.getIntProperty(IPeerModelProperties.PROP_CHANNEL_REF_COUNTER);
+ counter--;
+ if (counter < 0) counter = 0;
+ node.setProperty(IPeerModelProperties.PROP_CHANNEL_REF_COUNTER, counter);
+ if (counter == 0 && node.isProperty(IPeerModelProperties.PROP_STATE, IPeerModelProperties.STATE_CONNECTED)) {
+ node.setProperty(IPeerModelProperties.PROP_STATE, IPeerModelProperties.STATE_REACHABLE);
+ }
+ }
+ }
+ break;
+ }
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/listener/LocatorListener.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/listener/LocatorListener.java
index 3ed1e3264..f266ee235 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/listener/LocatorListener.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/listener/LocatorListener.java
@@ -7,21 +7,21 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.locator.listener;
+package org.eclipse.tcf.te.tcf.locator.listener;
import org.eclipse.core.runtime.Assert;
-import org.eclipse.tm.tcf.protocol.IPeer;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.tcf.services.ILocator;
-import org.eclipse.tm.te.tcf.locator.ScannerRunnable;
-import org.eclipse.tm.te.tcf.locator.activator.CoreBundleActivator;
-import org.eclipse.tm.te.tcf.locator.interfaces.ITracing;
-import org.eclipse.tm.te.tcf.locator.interfaces.nodes.ILocatorModel;
-import org.eclipse.tm.te.tcf.locator.interfaces.nodes.IPeerModel;
-import org.eclipse.tm.te.tcf.locator.interfaces.nodes.IPeerModelProperties;
-import org.eclipse.tm.te.tcf.locator.interfaces.services.ILocatorModelLookupService;
-import org.eclipse.tm.te.tcf.locator.interfaces.services.ILocatorModelUpdateService;
-import org.eclipse.tm.te.tcf.locator.nodes.PeerModel;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.services.ILocator;
+import org.eclipse.tcf.te.tcf.locator.ScannerRunnable;
+import org.eclipse.tcf.te.tcf.locator.activator.CoreBundleActivator;
+import org.eclipse.tcf.te.tcf.locator.interfaces.ITracing;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.ILocatorModel;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModelProperties;
+import org.eclipse.tcf.te.tcf.locator.interfaces.services.ILocatorModelLookupService;
+import org.eclipse.tcf.te.tcf.locator.interfaces.services.ILocatorModelUpdateService;
+import org.eclipse.tcf.te.tcf.locator.nodes.PeerModel;
/**
@@ -44,7 +44,7 @@ public class LocatorListener implements ILocator.LocatorListener {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.tcf.services.ILocator.LocatorListener#peerAdded(org.eclipse.tm.tcf.protocol.IPeer)
+ * @see org.eclipse.tcf.services.ILocator.LocatorListener#peerAdded(org.eclipse.tcf.protocol.IPeer)
*/
@Override
public void peerAdded(IPeer peer) {
@@ -75,7 +75,7 @@ public class LocatorListener implements ILocator.LocatorListener {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.tcf.services.ILocator.LocatorListener#peerChanged(org.eclipse.tm.tcf.protocol.IPeer)
+ * @see org.eclipse.tcf.services.ILocator.LocatorListener#peerChanged(org.eclipse.tcf.protocol.IPeer)
*/
@Override
public void peerChanged(IPeer peer) {
@@ -92,7 +92,7 @@ public class LocatorListener implements ILocator.LocatorListener {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.tcf.services.ILocator.LocatorListener#peerRemoved(java.lang.String)
+ * @see org.eclipse.tcf.services.ILocator.LocatorListener#peerRemoved(java.lang.String)
*/
@Override
public void peerRemoved(String id) {
@@ -111,7 +111,7 @@ public class LocatorListener implements ILocator.LocatorListener {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.tcf.services.ILocator.LocatorListener#peerHeartBeat(java.lang.String)
+ * @see org.eclipse.tcf.services.ILocator.LocatorListener#peerHeartBeat(java.lang.String)
*/
@Override
public void peerHeartBeat(String id) {
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/listener/ModelAdapter.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/listener/ModelAdapter.java
new file mode 100644
index 000000000..255efbd04
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/listener/ModelAdapter.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.locator.listener;
+
+import org.eclipse.tcf.te.tcf.locator.interfaces.IModelListener;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.ILocatorModel;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+
+/**
+ * Default model listener implementation.
+ */
+public class ModelAdapter implements IModelListener {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.locator.interfaces.IModelListener#locatorModelChanged(org.eclipse.tcf.te.tcf.locator.interfaces.nodes.ILocatorModel, org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel, boolean)
+ */
+ @Override
+ public void locatorModelChanged(ILocatorModel model, IPeerModel peer, boolean added) {
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.locator.core.interfaces.IModelListener#locatorModelDisposed(org.eclipse.tcf.te.tcf.locator.core.interfaces.nodes.ILocatorModel)
+ */
+ @Override
+ public void locatorModelDisposed(ILocatorModel model) {
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/model/Model.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/model/Model.java
index a43c3f440..f93657a8b 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/model/Model.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/model/Model.java
@@ -7,12 +7,12 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.ui.model;
+package org.eclipse.tcf.te.tcf.locator.model;
import org.eclipse.core.runtime.Assert;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.te.tcf.locator.interfaces.nodes.ILocatorModel;
-import org.eclipse.tm.te.tcf.locator.nodes.LocatorModel;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.ILocatorModel;
+import org.eclipse.tcf.te.tcf.locator.nodes.LocatorModel;
/**
@@ -31,8 +31,25 @@ public final class Model {
* @return The shared locator model.
*/
public static ILocatorModel getModel() {
+ return getModel(false);
+ }
+
+ /**
+ * Returns the shared locator model instance.
+ * <p>
+ * If the shared locator model instance has not been yet initialized,
+ * and <code>shutdown</code> is <code>false</code>, the method does
+ * initialize the shared locator model instance.
+ *
+ * @param shutdown <code>True</code> if the method is called during shutdown and
+ * the model should not be initialized if not done anyway. <code>
+ * false</code> in any other case.
+ *
+ * @return The shared locator model.
+ */
+ public static ILocatorModel getModel(boolean shutdown) {
// Access to the locator model must happen in the TCF dispatch thread
- if (locatorModel == null) {
+ if (locatorModel == null && !shutdown) {
if (Protocol.isDispatchThread()) {
initialize();
} else {
@@ -53,9 +70,12 @@ public final class Model {
protected static void initialize() {
Assert.isTrue(Protocol.isDispatchThread());
+ // If locator model is set in the mean while, initialize got
+ // called twice. Return immediately in this case.
+ if (locatorModel != null) return;
+
+ // Create the model instance
locatorModel = new LocatorModel();
- // Register the model listener
-// locatorModel.addListener(new ModelListener(locatorModel));
// Start the scanner
locatorModel.startScanner(5000, 120000);
}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/nodes/LocatorModel.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/nodes/LocatorModel.java
index c8772924f..36fc9fb2a 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/nodes/LocatorModel.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/nodes/LocatorModel.java
@@ -7,9 +7,10 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.locator.nodes;
+package org.eclipse.tcf.te.tcf.locator.nodes;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -19,29 +20,29 @@ import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.PlatformObject;
import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.tm.tcf.protocol.IPeer;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.tcf.services.ILocator;
-import org.eclipse.tm.te.tcf.core.Tcf;
-import org.eclipse.tm.te.tcf.core.interfaces.listeners.IChannelStateChangeListener;
-import org.eclipse.tm.te.tcf.locator.Scanner;
-import org.eclipse.tm.te.tcf.locator.activator.CoreBundleActivator;
-import org.eclipse.tm.te.tcf.locator.interfaces.IModelListener;
-import org.eclipse.tm.te.tcf.locator.interfaces.IScanner;
-import org.eclipse.tm.te.tcf.locator.interfaces.ITracing;
-import org.eclipse.tm.te.tcf.locator.interfaces.nodes.ILocatorModel;
-import org.eclipse.tm.te.tcf.locator.interfaces.nodes.IPeerModel;
-import org.eclipse.tm.te.tcf.locator.interfaces.preferences.IPreferenceKeys;
-import org.eclipse.tm.te.tcf.locator.interfaces.services.ILocatorModelLookupService;
-import org.eclipse.tm.te.tcf.locator.interfaces.services.ILocatorModelRefreshService;
-import org.eclipse.tm.te.tcf.locator.interfaces.services.ILocatorModelService;
-import org.eclipse.tm.te.tcf.locator.interfaces.services.ILocatorModelUpdateService;
-import org.eclipse.tm.te.tcf.locator.listener.ChannelStateChangeListener;
-import org.eclipse.tm.te.tcf.locator.listener.LocatorListener;
-import org.eclipse.tm.te.tcf.locator.services.LocatorModelLookupService;
-import org.eclipse.tm.te.tcf.locator.services.LocatorModelRefreshService;
-import org.eclipse.tm.te.tcf.locator.services.LocatorModelUpdateService;
-import org.eclipse.tm.te.tcf.locator.utils.IPAddressUtil;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.services.ILocator;
+import org.eclipse.tcf.te.runtime.utils.net.IPAddressUtil;
+import org.eclipse.tcf.te.tcf.core.Tcf;
+import org.eclipse.tcf.te.tcf.core.listeners.interfaces.IChannelStateChangeListener;
+import org.eclipse.tcf.te.tcf.locator.Scanner;
+import org.eclipse.tcf.te.tcf.locator.activator.CoreBundleActivator;
+import org.eclipse.tcf.te.tcf.locator.interfaces.IModelListener;
+import org.eclipse.tcf.te.tcf.locator.interfaces.IScanner;
+import org.eclipse.tcf.te.tcf.locator.interfaces.ITracing;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.ILocatorModel;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.tcf.locator.interfaces.preferences.IPreferenceKeys;
+import org.eclipse.tcf.te.tcf.locator.interfaces.services.ILocatorModelLookupService;
+import org.eclipse.tcf.te.tcf.locator.interfaces.services.ILocatorModelRefreshService;
+import org.eclipse.tcf.te.tcf.locator.interfaces.services.ILocatorModelService;
+import org.eclipse.tcf.te.tcf.locator.interfaces.services.ILocatorModelUpdateService;
+import org.eclipse.tcf.te.tcf.locator.listener.ChannelStateChangeListener;
+import org.eclipse.tcf.te.tcf.locator.listener.LocatorListener;
+import org.eclipse.tcf.te.tcf.locator.services.LocatorModelLookupService;
+import org.eclipse.tcf.te.tcf.locator.services.LocatorModelRefreshService;
+import org.eclipse.tcf.te.tcf.locator.services.LocatorModelUpdateService;
/**
@@ -55,6 +56,8 @@ public class LocatorModel extends PlatformObject implements ILocatorModel {
// The list of known peers
private final Map<String, IPeerModel> peers = new HashMap<String, IPeerModel>();
+ // The list of "proxied" peers per proxy peer id
+ private final Map<String, List<IPeerModel>> peerChildren = new HashMap<String, List<IPeerModel>>();
// Reference to the scanner
private IScanner scanner = null;
@@ -86,12 +89,12 @@ public class LocatorModel extends PlatformObject implements ILocatorModel {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.locator.core.interfaces.nodes.ILocatorModel#addListener(org.eclipse.tm.te.tcf.locator.core.interfaces.IModelListener)
+ * @see org.eclipse.tcf.te.tcf.locator.core.interfaces.nodes.ILocatorModel#addListener(org.eclipse.tcf.te.tcf.locator.core.interfaces.IModelListener)
*/
@Override
public void addListener(IModelListener listener) {
Assert.isNotNull(listener);
- Assert.isTrue(Protocol.isDispatchThread());
+ Assert.isTrue(Protocol.isDispatchThread(), "Illegal Thread Access"); //$NON-NLS-1$
if (CoreBundleActivator.getTraceHandler().isSlotEnabled(0, ITracing.ID_TRACE_LOCATOR_MODEL)) {
CoreBundleActivator.getTraceHandler().trace("LocatorModel.addListener( " + listener + " )", ITracing.ID_TRACE_LOCATOR_MODEL, this); //$NON-NLS-1$ //$NON-NLS-2$
@@ -101,12 +104,12 @@ public class LocatorModel extends PlatformObject implements ILocatorModel {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.locator.core.interfaces.nodes.ILocatorModel#removeListener(org.eclipse.tm.te.tcf.locator.core.interfaces.IModelListener)
+ * @see org.eclipse.tcf.te.tcf.locator.core.interfaces.nodes.ILocatorModel#removeListener(org.eclipse.tcf.te.tcf.locator.core.interfaces.IModelListener)
*/
@Override
public void removeListener(IModelListener listener) {
Assert.isNotNull(listener);
- Assert.isTrue(Protocol.isDispatchThread());
+ Assert.isTrue(Protocol.isDispatchThread(), "Illegal Thread Access"); //$NON-NLS-1$
if (CoreBundleActivator.getTraceHandler().isSlotEnabled(0, ITracing.ID_TRACE_LOCATOR_MODEL)) {
CoreBundleActivator.getTraceHandler().trace("LocatorModel.removeListener( " + listener + " )", ITracing.ID_TRACE_LOCATOR_MODEL, this); //$NON-NLS-1$ //$NON-NLS-2$
@@ -116,7 +119,7 @@ public class LocatorModel extends PlatformObject implements ILocatorModel {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.locator.interfaces.nodes.ILocatorModel#getListener()
+ * @see org.eclipse.tcf.te.tcf.locator.interfaces.nodes.ILocatorModel#getListener()
*/
@Override
public IModelListener[] getListener() {
@@ -124,11 +127,11 @@ public class LocatorModel extends PlatformObject implements ILocatorModel {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.locator.core.interfaces.nodes.ILocatorModel#dispose()
+ * @see org.eclipse.tcf.te.tcf.locator.core.interfaces.nodes.ILocatorModel#dispose()
*/
@Override
public void dispose() {
- Assert.isTrue(Protocol.isDispatchThread());
+ Assert.isTrue(Protocol.isDispatchThread(), "Illegal Thread Access"); //$NON-NLS-1$
if (CoreBundleActivator.getTraceHandler().isSlotEnabled(0, ITracing.ID_TRACE_LOCATOR_MODEL)) {
CoreBundleActivator.getTraceHandler().trace("LocatorModel.dispose()", ITracing.ID_TRACE_LOCATOR_MODEL, this); //$NON-NLS-1$
@@ -171,7 +174,7 @@ public class LocatorModel extends PlatformObject implements ILocatorModel {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.locator.core.interfaces.nodes.ILocatorModel#isDisposed()
+ * @see org.eclipse.tcf.te.tcf.locator.core.interfaces.nodes.ILocatorModel#isDisposed()
*/
@Override
public boolean isDisposed() {
@@ -179,7 +182,7 @@ public class LocatorModel extends PlatformObject implements ILocatorModel {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.locator.core.interfaces.nodes.ILocatorModel#getPeers()
+ * @see org.eclipse.tcf.te.tcf.locator.core.interfaces.nodes.ILocatorModel#getPeers()
*/
@Override
public IPeerModel[] getPeers() {
@@ -187,6 +190,41 @@ public class LocatorModel extends PlatformObject implements ILocatorModel {
}
/* (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.locator.interfaces.nodes.ILocatorModel#getChildren(java.lang.String)
+ */
+ @Override
+ public List<IPeerModel> getChildren(String parentPeerID) {
+ Assert.isNotNull(parentPeerID);
+
+ if (CoreBundleActivator.getTraceHandler().isSlotEnabled(0, ITracing.ID_TRACE_LOCATOR_MODEL)) {
+ CoreBundleActivator.getTraceHandler().trace("LocatorModel.getChildren( " + parentPeerID + " )", ITracing.ID_TRACE_LOCATOR_MODEL, this); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ List<IPeerModel> children = peerChildren.get(parentPeerID);
+ if (children == null) children = Collections.emptyList();
+ return Collections.unmodifiableList(children);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.locator.interfaces.nodes.ILocatorModel#setChildren(java.lang.String, java.util.List)
+ */
+ @Override
+ public void setChildren(String parentPeerID, List<IPeerModel> children) {
+ Assert.isNotNull(parentPeerID);
+ Assert.isTrue(Protocol.isDispatchThread(), "Illegal Thread Access"); //$NON-NLS-1$
+
+ if (CoreBundleActivator.getTraceHandler().isSlotEnabled(0, ITracing.ID_TRACE_LOCATOR_MODEL)) {
+ CoreBundleActivator.getTraceHandler().trace("LocatorModel.setChildren( " + parentPeerID + ", " + children + " )", ITracing.ID_TRACE_LOCATOR_MODEL, this); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ if (children == null || children.size() == 0) {
+ peerChildren.remove(parentPeerID);
+ } else {
+ peerChildren.put(parentPeerID, new ArrayList<IPeerModel>(children));
+ }
+ }
+
+ /* (non-Javadoc)
* @see org.eclipse.core.runtime.PlatformObject#getAdapter(java.lang.Class)
*/
@Override
@@ -225,7 +263,7 @@ public class LocatorModel extends PlatformObject implements ILocatorModel {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.locator.core.interfaces.nodes.ILocatorModel#getService(java.lang.Class)
+ * @see org.eclipse.tcf.te.tcf.locator.core.interfaces.nodes.ILocatorModel#getService(java.lang.Class)
*/
@Override
@SuppressWarnings("unchecked")
@@ -241,7 +279,7 @@ public class LocatorModel extends PlatformObject implements ILocatorModel {
* <b>Note:</b> This method is not intended to be call from clients.
*/
public void checkLocatorListener() {
- Assert.isTrue(Protocol.isDispatchThread());
+ Assert.isTrue(Protocol.isDispatchThread(), "Illegal Thread Access"); //$NON-NLS-1$
Assert.isNotNull(Protocol.getLocator());
if (locatorListener == null) {
@@ -262,7 +300,7 @@ public class LocatorModel extends PlatformObject implements ILocatorModel {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.locator.core.interfaces.nodes.ILocatorModel#getScanner()
+ * @see org.eclipse.tcf.te.tcf.locator.core.interfaces.nodes.ILocatorModel#getScanner()
*/
@Override
public IScanner getScanner() {
@@ -271,7 +309,7 @@ public class LocatorModel extends PlatformObject implements ILocatorModel {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.locator.core.interfaces.nodes.ILocatorModel#startScanner(long, long)
+ * @see org.eclipse.tcf.te.tcf.locator.core.interfaces.nodes.ILocatorModel#startScanner(long, long)
*/
@Override
public void startScanner(long delay, long schedule) {
@@ -299,7 +337,7 @@ public class LocatorModel extends PlatformObject implements ILocatorModel {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.locator.core.interfaces.nodes.ILocatorModel#stopScanner()
+ * @see org.eclipse.tcf.te.tcf.locator.core.interfaces.nodes.ILocatorModel#stopScanner()
*/
@Override
public void stopScanner() {
@@ -316,12 +354,12 @@ public class LocatorModel extends PlatformObject implements ILocatorModel {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.locator.core.interfaces.nodes.ILocatorModel#validatePeerNodeForAdd(org.eclipse.tm.te.tcf.locator.core.interfaces.nodes.IPeerModel)
+ * @see org.eclipse.tcf.te.tcf.locator.core.interfaces.nodes.ILocatorModel#validatePeerNodeForAdd(org.eclipse.tcf.te.tcf.locator.core.interfaces.nodes.IPeerModel)
*/
@Override
public IPeerModel validatePeerNodeForAdd(IPeerModel node) {
Assert.isNotNull(node);
- Assert.isTrue(Protocol.isDispatchThread());
+ Assert.isTrue(Protocol.isDispatchThread(), "Illegal Thread Access"); //$NON-NLS-1$
// Get the peer from the peer node
IPeer peer = node.getPeer();
@@ -348,8 +386,6 @@ public class LocatorModel extends PlatformObject implements ILocatorModel {
, ITracing.ID_TRACE_LOCATOR_MODEL, this);
}
- boolean fireListener = false;
-
for (IPeerModel previousNode : previousNodes) {
// Get the peer for the previous node
IPeer previousPeer = previousNode.getPeer();
@@ -379,8 +415,8 @@ public class LocatorModel extends PlatformObject implements ILocatorModel {
if (peerPort.equals(previousPeerPort)) {
if (canonical != null && canonical.equals(peerIP) && !canonical.equals(previousPeerIP)) {
// Remove the old node and replace it with the new new
- peers.remove(previousNode.getPeer().getID());
- fireListener = true;
+ peers.remove(previousNode.getPeerId());
+ fireListener(previousNode, false);
if (CoreBundleActivator.getTraceHandler().isSlotEnabled(0, ITracing.ID_TRACE_LOCATOR_MODEL)) {
CoreBundleActivator.getTraceHandler().trace("LocatorModel.validatePeerNodeForAdd: Previous peer node replaced (canonical overwrite)" //$NON-NLS-1$
@@ -389,8 +425,8 @@ public class LocatorModel extends PlatformObject implements ILocatorModel {
} else if (loopback != null && loopback.equals(peerIP) && !loopback.equals(previousPeerIP)
&& (canonical == null || !canonical.equals(previousPeerIP))) {
// Remove the old node and replace it with the new new
- peers.remove(previousNode.getPeer().getID());
- fireListener = true;
+ peers.remove(previousNode.getPeerId());
+ fireListener(previousNode, false);
if (CoreBundleActivator.getTraceHandler().isSlotEnabled(0, ITracing.ID_TRACE_LOCATOR_MODEL)) {
CoreBundleActivator.getTraceHandler().trace("LocatorModel.validatePeerNodeForAdd: Previous peer node replaced (loopback overwrite)" //$NON-NLS-1$
@@ -417,22 +453,152 @@ public class LocatorModel extends PlatformObject implements ILocatorModel {
}
}
}
+ }
- if (fireListener) {
- final IModelListener[] listeners = getListener();
- if (listeners.length > 0) {
- Protocol.invokeLater(new Runnable() {
- @Override
- public void run() {
- for (IModelListener listener : listeners) {
- listener.locatorModelChanged(LocatorModel.this);
- }
- }
- });
+ return result;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.locator.interfaces.nodes.ILocatorModel#validateChildPeerNodeForAdd(org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel)
+ */
+ @Override
+ public IPeerModel validateChildPeerNodeForAdd(final IPeerModel node) {
+ Assert.isNotNull(node);
+ Assert.isTrue(Protocol.isDispatchThread(), "Illegal Thread Access"); //$NON-NLS-1$
+
+ if (CoreBundleActivator.getTraceHandler().isSlotEnabled(0, ITracing.ID_TRACE_LOCATOR_MODEL)) {
+ CoreBundleActivator.getTraceHandler().trace("LocatorModel.validateChildPeerNodeForAdd( " + node.getPeerId() + " )", ITracing.ID_TRACE_LOCATOR_MODEL, this); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ // Determine the parent node. If null, the child node is invalid
+ // and cannot be added
+ final IPeerModel parent = node.getParentNode();
+ if (parent == null) return null;
+
+ return validateChildPeerNodeForAdd(parent, node);
+ }
+
+ /**
+ * Validates the given child peer model node in relation to the given parent peer model node
+ * hierarchy.
+ * <p>
+ * The method is recursive.
+ *
+ * @param parent The parent model node. Must not be <code>null</code>.
+ * @param node The child model node. Must not be <code>null</code>.
+ *
+ * @return The validated child peer model node, or <code>null</code>.
+ */
+ protected IPeerModel validateChildPeerNodeForAdd(IPeerModel parent, IPeerModel node) {
+ Assert.isNotNull(parent);
+ Assert.isNotNull(node);
+ Assert.isTrue(Protocol.isDispatchThread(), "Illegal Thread Access"); //$NON-NLS-1$
+
+ if (CoreBundleActivator.getTraceHandler().isSlotEnabled(0, ITracing.ID_TRACE_LOCATOR_MODEL)) {
+ CoreBundleActivator.getTraceHandler().trace("LocatorModel.validateChildPeerNodeForAdd( " + parent.getPeerId() + ", " + node.getPeerId() + " )", ITracing.ID_TRACE_LOCATOR_MODEL, this); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ // Validate against the given parent
+ if (doValidateChildPeerNodeForAdd(parent, node) == null) {
+ return null;
+ }
+
+ // If the parent node is child node by itself, validate the
+ // child node against the parent parent node.
+ if (parent.getParentNode() != null) {
+ IPeerModel parentParentNode = parent.getParentNode();
+ if (doValidateChildPeerNodeForAdd(parentParentNode, node) == null) {
+ return null;
+ }
+
+ // And validate the child node against all child nodes of the parent parent.
+ List<IPeerModel> childrenList = getChildren(parentParentNode.getPeerId());
+ IPeerModel[] children = childrenList.toArray(new IPeerModel[childrenList.size()]);
+ for (IPeerModel parentParentChild : children) {
+ if (node.equals(parentParentChild) || parent.equals(parentParentChild)) {
+ return null;
+ }
+ if (doValidateChildPeerNodeForAdd(parentParentChild, node) == null) {
+ return null;
}
}
}
- return result;
+ return node;
+ }
+
+ /**
+ * Validates the given child peer model node in relation to the given parent peer model node.
+ * <p>
+ * The method is non-recursive.
+ *
+ * @param parent The parent model node. Must not be <code>null</code>.
+ * @param node The child model node. Must not be <code>null</code>.
+ *
+ * @return The validated child peer model node, or <code>null</code>.
+ */
+ protected IPeerModel doValidateChildPeerNodeForAdd(IPeerModel parent, IPeerModel node) {
+ Assert.isNotNull(parent);
+ Assert.isNotNull(node);
+ Assert.isTrue(Protocol.isDispatchThread(), "Illegal Thread Access"); //$NON-NLS-1$
+
+ if (CoreBundleActivator.getTraceHandler().isSlotEnabled(0, ITracing.ID_TRACE_LOCATOR_MODEL)) {
+ CoreBundleActivator.getTraceHandler().trace("LocatorModel.doValidateChildPeerNodeForAdd( " + parent.getPeerId() + ", " + node.getPeerId() + " )", ITracing.ID_TRACE_LOCATOR_MODEL, this); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ // If the child node is already visible as root node, drop the child node
+ if (getService(ILocatorModelLookupService.class).lkupPeerModelById(node.getPeerId()) != null) {
+ return null;
+ }
+
+ // Get the peer from the peer node
+ IPeer peer = node.getPeer();
+
+ // If the child peer represents the same agent as the parent peer,
+ // drop the child peer
+ String parentAgentID = parent.getPeer().getAgentID();
+ if (parentAgentID != null && parentAgentID.equals(peer.getAgentID())) {
+ return null;
+ }
+ // If the child peer's IP address appears to be the address of the
+ // localhost, drop the child peer
+ if (peer.getAttributes().get(IPeer.ATTR_IP_HOST) != null && IPAddressUtil.getInstance().isLocalHost(peer.getAttributes().get(IPeer.ATTR_IP_HOST))) {
+ return null;
+ }
+ // If the child peer's IP address and port are the same as the parent's
+ // IP address and port, drop the child node
+ Map<String, String> parentPeerAttributes = parent.getPeer().getAttributes();
+ if (parentPeerAttributes.get(IPeer.ATTR_IP_HOST) != null && parentPeerAttributes.get(IPeer.ATTR_IP_HOST).equals(peer.getAttributes().get(IPeer.ATTR_IP_HOST))) {
+ String parentPort = parentPeerAttributes.get(IPeer.ATTR_IP_PORT);
+ if (parentPort == null) parentPort = "1534"; //$NON-NLS-1$
+ String port = peer.getAttributes().get(IPeer.ATTR_IP_PORT);
+ if (port == null) port = "1534"; //$NON-NLS-1$
+
+ if (parentPort.equals(port)) return null;
+ }
+
+ return node;
+ }
+
+ /**
+ * Fire the model listener for the given peer model.
+ *
+ * @param peer The peer model. Must not be <code>null</code>.
+ * @param added <code>True</code> if the peer model got added, <code>false</code> if it got removed.
+ */
+ protected void fireListener(final IPeerModel peer, final boolean added) {
+ Assert.isNotNull(peer);
+
+ final IModelListener[] listeners = getListener();
+ if (listeners.length > 0) {
+ Protocol.invokeLater(new Runnable() {
+ @Override
+ public void run() {
+ for (IModelListener listener : listeners) {
+ listener.locatorModelChanged(LocatorModel.this, peer, added);
+ }
+ }
+ });
+ }
}
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/nodes/PeerModel.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/nodes/PeerModel.java
new file mode 100644
index 000000000..8129e5a6d
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/nodes/PeerModel.java
@@ -0,0 +1,267 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.locator.nodes;
+
+import java.util.Map;
+import java.util.concurrent.atomic.AtomicReference;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.te.runtime.interfaces.workingsets.IWorkingSetElement;
+import org.eclipse.tcf.te.runtime.properties.PropertiesContainer;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.ILocatorModel;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModelProperties;
+
+
+/**
+ * Default peer model implementation.
+ */
+public class PeerModel extends PropertiesContainer implements IPeerModel, IWorkingSetElement {
+ // Reference to the parent locator model
+ private final ILocatorModel model;
+ // Reference to the parent peer model node
+ private IPeerModel node;
+ // Reference to the peer id (cached for performance optimization)
+ private String peerId;
+
+ /**
+ * Constructor.
+ *
+ * @param model The parent locator model. Must not be <code>null</code>.
+ * @param peer The peer or <code>null</code>.
+ */
+ public PeerModel(ILocatorModel model, IPeer peer) {
+ super();
+
+ Assert.isNotNull(model);
+ this.model = model;
+
+ // Set the default properties before enabling the change events.
+ // The properties changed listeners should not be called from the
+ // constructor.
+ setProperty(IPeerModelProperties.PROP_INSTANCE, peer);
+
+ // Initialize the peer id
+ peerId = peer.getID();
+ Assert.isNotNull(peerId);
+
+ // Enable change events
+ setChangeEventsEnabled(true);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.properties.PropertiesContainer#checkThreadAccess()
+ */
+ @Override
+ protected final boolean checkThreadAccess() {
+ return Protocol.isDispatchThread();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel#getModel()
+ */
+ @Override
+ public ILocatorModel getModel() {
+ return (ILocatorModel)getAdapter(ILocatorModel.class);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel#getPeer()
+ */
+ @Override
+ public IPeer getPeer() {
+ return (IPeer)getAdapter(IPeer.class);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.interfaces.workingsets.IWorkingSetElement#getElementId()
+ */
+ @Override
+ public String getElementId() {
+ return peerId;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel#getPeerId()
+ */
+ @Override
+ public String getPeerId() {
+ return peerId;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel#setParentNode(org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel)
+ */
+ @Override
+ public void setParentNode(IPeerModel node) {
+ Assert.isTrue(checkThreadAccess(), "Illegal Thread Access"); //$NON-NLS-1$
+ this.node = node;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel#getParentNode()
+ */
+ @Override
+ public IPeerModel getParentNode() {
+ Assert.isTrue(checkThreadAccess(), "Illegal Thread Access"); //$NON-NLS-1$
+ return node;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel#isComplete()
+ */
+ @Override
+ public boolean isComplete() {
+ Assert.isTrue(checkThreadAccess(), "Illegal Thread Access"); //$NON-NLS-1$
+
+ boolean complete = true;
+
+ // Determine the transport method
+ String transport = getPeer().getTransportName();
+ // If the transport is not set, the peer attributes are incomplete
+ if (transport == null) {
+ complete = false;
+ } else {
+ // For TCP or SSL transport, ATTR_IP_HOST must not be null.
+ String ip = getPeer().getAttributes().get(IPeer.ATTR_IP_HOST);
+ if (("TCP".equals(transport) || "SSL".equals(transport)) && ip == null) { //$NON-NLS-1$ //$NON-NLS-2$
+ complete = false;
+ }
+
+ // Pipe and Loop transport does not require additional attributes
+ }
+
+ return complete;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.runtime.PlatformObject#getAdapter(java.lang.Class)
+ */
+ @Override
+ public Object getAdapter(final Class adapter) {
+ // NOTE: The getAdapter(...) method can be invoked from many place and
+ // many threads where we cannot control the calls. Therefore, this
+ // method is allowed be called from any thread.
+ final AtomicReference<Object> object = new AtomicReference<Object>();
+ Runnable runnable = new Runnable() {
+ @Override
+ public void run() {
+ object.set(doGetAdapter(adapter));
+ }
+ };
+
+ if (Protocol.isDispatchThread()) runnable.run();
+ else Protocol.invokeAndWait(runnable);
+
+ return object.get() != null ? object.get() : super.getAdapter(adapter);
+ }
+
+ /**
+ * Returns an object which is an instance of the given class associated with this object.
+ * Returns <code>null</code> if no such object can be found.
+ * <p>
+ * This method must be called within the TCF dispatch thread!
+ *
+ * @param adapter The adapter class to look up.
+ * @return The adapter or <code>null</code>.
+ */
+ protected Object doGetAdapter(Class<?> adapter) {
+ Assert.isTrue(checkThreadAccess(), "Illegal Thread Access"); //$NON-NLS-1$
+
+ if (adapter.isAssignableFrom(ILocatorModel.class)) {
+ return model;
+ }
+
+ Object peer = getProperty(IPeerModelProperties.PROP_INSTANCE);
+ if (peer != null && adapter.isAssignableFrom(peer.getClass())) {
+ return peer;
+ }
+
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.properties.PropertiesContainer#toString()
+ */
+ @Override
+ public String toString() {
+ final StringBuilder buffer = new StringBuilder(getClass().getSimpleName());
+
+ Runnable runnable = new Runnable() {
+ @Override
+ public void run() {
+ IPeer peer = getPeer();
+ buffer.append(": id=" + peer.getID()); //$NON-NLS-1$
+ buffer.append(", name=" + peer.getName()); //$NON-NLS-1$
+ }
+ };
+
+ if (Protocol.isDispatchThread()) runnable.run();
+ else Protocol.invokeAndWait(runnable);
+
+ buffer.append(", " + super.toString()); //$NON-NLS-1$
+ return buffer.toString();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.properties.PropertiesContainer#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj) {
+ if (obj instanceof PeerModel) {
+ return getPeerId().equals(((PeerModel)obj).getPeerId());
+ }
+ return super.equals(obj);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.properties.PropertiesContainer#hashCode()
+ */
+ @Override
+ public int hashCode() {
+ return getPeerId().hashCode();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.properties.PropertiesContainer#postSetProperties(java.util.Map)
+ */
+ @Override
+ protected void postSetProperties(Map<String, Object> properties) {
+ Assert.isTrue(checkThreadAccess(), "Illegal Thread Access"); //$NON-NLS-1$
+ Assert.isNotNull(properties);
+ Assert.isNotNull(getPeer());
+
+ // New properties applied. Update the element id
+ peerId = getPeer().getID();
+ Assert.isNotNull(peerId);
+
+ super.postSetProperties(properties);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.properties.PropertiesContainer#postSetProperty(java.lang.String, java.lang.Object, java.lang.Object)
+ */
+ @Override
+ public void postSetProperty(String key, Object value, Object oldValue) {
+ Assert.isTrue(checkThreadAccess(), "Illegal Thread Access"); //$NON-NLS-1$
+ Assert.isNotNull(key);
+ Assert.isNotNull(getPeer());
+
+ // If the peer instance changed, update the element id
+ if (IPeerModelProperties.PROP_INSTANCE.equals(key)) {
+ peerId = getPeer().getID();
+ Assert.isNotNull(peerId);
+ }
+
+ super.postSetProperty(key, value, oldValue);
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/nodes/PeerRedirector.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/nodes/PeerRedirector.java
new file mode 100644
index 000000000..7a847952d
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/nodes/PeerRedirector.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.locator.nodes;
+
+import java.util.Map;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.tcf.core.TransientPeer;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerRedirector;
+
+/**
+ * Peer redirector implementation.
+ * <p>
+ * If a peer is discovery by querying the <i>remote</i> locator service of a known
+ * peer, than the communication with the remotely discovered peer is channeled through
+ * the proxy peer (== parent).
+ */
+public class PeerRedirector extends TransientPeer implements IPeerRedirector {
+ // Reference to the parent peer which is serving as proxy
+ private final IPeer parent;
+
+ /**
+ * Constructor.
+ *
+ * @param parent The parent peer. Must not be <code>null</code>.
+ * @param attrs The peer attributes of the remote discovered peer. Must not be <code>null</code>.
+ */
+ public PeerRedirector(IPeer parent, Map<String, String> attrs) {
+ super(attrs);
+
+ Assert.isNotNull(parent);
+ this.parent = parent;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.core.TransientPeer#openChannel()
+ */
+ @Override
+ public IChannel openChannel() {
+ Assert.isTrue(Protocol.isDispatchThread(), "Illegal Thread Access"); //$NON-NLS-1$
+ IChannel c = parent.openChannel();
+ c.redirect(getID());
+ return c;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerRedirector#getParent()
+ */
+ @Override
+ public IPeer getParent() {
+ return parent;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/services/AbstractLocatorModelService.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/services/AbstractLocatorModelService.java
index 8e439cec0..ea6df29b5 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/services/AbstractLocatorModelService.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/services/AbstractLocatorModelService.java
@@ -7,12 +7,12 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.locator.services;
+package org.eclipse.tcf.te.tcf.locator.services;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.PlatformObject;
-import org.eclipse.tm.te.tcf.locator.interfaces.nodes.ILocatorModel;
-import org.eclipse.tm.te.tcf.locator.interfaces.services.ILocatorModelService;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.ILocatorModel;
+import org.eclipse.tcf.te.tcf.locator.interfaces.services.ILocatorModelService;
/**
@@ -33,7 +33,7 @@ public abstract class AbstractLocatorModelService extends PlatformObject impleme
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.locator.interfaces.services.ILocatorModelService#getLocatorModel()
+ * @see org.eclipse.tcf.te.tcf.locator.interfaces.services.ILocatorModelService#getLocatorModel()
*/
@Override
public final ILocatorModel getLocatorModel() {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/services/LocatorModelLookupService.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/services/LocatorModelLookupService.java
index 9a77ec38f..fa5683ffd 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/services/LocatorModelLookupService.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/services/LocatorModelLookupService.java
@@ -7,18 +7,18 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.locator.services;
+package org.eclipse.tcf.te.tcf.locator.services;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.core.runtime.Assert;
-import org.eclipse.tm.tcf.protocol.IPeer;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.te.tcf.locator.interfaces.nodes.ILocatorModel;
-import org.eclipse.tm.te.tcf.locator.interfaces.nodes.IPeerModel;
-import org.eclipse.tm.te.tcf.locator.interfaces.nodes.IPeerModelProperties;
-import org.eclipse.tm.te.tcf.locator.interfaces.services.ILocatorModelLookupService;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.ILocatorModel;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModelProperties;
+import org.eclipse.tcf.te.tcf.locator.interfaces.services.ILocatorModelLookupService;
/**
@@ -36,7 +36,7 @@ public class LocatorModelLookupService extends AbstractLocatorModelService imple
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.locator.core.interfaces.services.ILocatorModelLookupService#lkupPeerModelById(java.lang.String)
+ * @see org.eclipse.tcf.te.tcf.locator.core.interfaces.services.ILocatorModelLookupService#lkupPeerModelById(java.lang.String)
*/
@Override
public IPeerModel lkupPeerModelById(String id) {
@@ -56,7 +56,28 @@ public class LocatorModelLookupService extends AbstractLocatorModelService imple
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.locator.interfaces.services.ILocatorModelLookupService#lkupPeerModelByAgentId(java.lang.String)
+ * @see org.eclipse.tcf.te.tcf.locator.interfaces.services.ILocatorModelLookupService#lkupPeerModelById(java.lang.String, java.lang.String)
+ */
+ @Override
+ public IPeerModel lkupPeerModelById(String parentId, String id) {
+ Assert.isNotNull(parentId);
+ Assert.isNotNull(id);
+ Assert.isTrue(Protocol.isDispatchThread(), "Illegal Thread Access"); //$NON-NLS-1$
+
+ IPeerModel node = null;
+ for (IPeerModel candidate : getLocatorModel().getChildren(parentId)) {
+ IPeer peer = candidate.getPeer();
+ if (id.equals(peer.getID())) {
+ node = candidate;
+ break;
+ }
+ }
+
+ return node;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.locator.interfaces.services.ILocatorModelLookupService#lkupPeerModelByAgentId(java.lang.String)
*/
@Override
public IPeerModel[] lkupPeerModelByAgentId(String agentId) {
@@ -75,7 +96,27 @@ public class LocatorModelLookupService extends AbstractLocatorModelService imple
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.locator.interfaces.services.ILocatorModelLookupService#lkupPeerModelBySupportedServices(java.lang.String[], java.lang.String[])
+ * @see org.eclipse.tcf.te.tcf.locator.interfaces.services.ILocatorModelLookupService#lkupPeerModelByAgentId(java.lang.String, java.lang.String)
+ */
+ @Override
+ public IPeerModel[] lkupPeerModelByAgentId(String parentId, String agentId) {
+ Assert.isNotNull(parentId);
+ Assert.isNotNull(agentId);
+ Assert.isTrue(Protocol.isDispatchThread(), "Illegal Thread Access"); //$NON-NLS-1$
+
+ List<IPeerModel> nodes = new ArrayList<IPeerModel>();
+ for (IPeerModel candidate : getLocatorModel().getChildren(parentId)) {
+ IPeer peer = candidate.getPeer();
+ if (agentId.equals(peer.getAgentID())) {
+ nodes.add(candidate);
+ }
+ }
+
+ return nodes.toArray(new IPeerModel[nodes.size()]);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.locator.interfaces.services.ILocatorModelLookupService#lkupPeerModelBySupportedServices(java.lang.String[], java.lang.String[])
*/
@Override
public IPeerModel[] lkupPeerModelBySupportedServices(String[] expectedLocalServices, String[] expectedRemoteServices) {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/services/LocatorModelRefreshService.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/services/LocatorModelRefreshService.java
index 38216331a..cd66e8680 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/services/LocatorModelRefreshService.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/services/LocatorModelRefreshService.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.locator.services;
+package org.eclipse.tcf.te.tcf.locator.services;
import java.io.File;
import java.io.FileFilter;
@@ -25,21 +25,24 @@ import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
-import org.eclipse.tm.tcf.core.TransientPeer;
-import org.eclipse.tm.tcf.protocol.IPeer;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.tcf.services.ILocator;
-import org.eclipse.tm.te.tcf.core.Tcf;
-import org.eclipse.tm.te.tcf.locator.ScannerRunnable;
-import org.eclipse.tm.te.tcf.locator.activator.CoreBundleActivator;
-import org.eclipse.tm.te.tcf.locator.interfaces.nodes.ILocatorModel;
-import org.eclipse.tm.te.tcf.locator.interfaces.nodes.IPeerModel;
-import org.eclipse.tm.te.tcf.locator.interfaces.preferences.IPreferenceKeys;
-import org.eclipse.tm.te.tcf.locator.interfaces.services.ILocatorModelLookupService;
-import org.eclipse.tm.te.tcf.locator.interfaces.services.ILocatorModelRefreshService;
-import org.eclipse.tm.te.tcf.locator.interfaces.services.ILocatorModelUpdateService;
-import org.eclipse.tm.te.tcf.locator.nodes.LocatorModel;
-import org.eclipse.tm.te.tcf.locator.nodes.PeerModel;
+import org.eclipse.tcf.core.TransientPeer;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.services.ILocator;
+import org.eclipse.tcf.te.runtime.persistence.interfaces.IPersistableNodeProperties;
+import org.eclipse.tcf.te.tcf.core.Tcf;
+import org.eclipse.tcf.te.tcf.locator.ScannerRunnable;
+import org.eclipse.tcf.te.tcf.locator.activator.CoreBundleActivator;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.ILocatorModel;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModelProperties;
+import org.eclipse.tcf.te.tcf.locator.interfaces.preferences.IPreferenceKeys;
+import org.eclipse.tcf.te.tcf.locator.interfaces.services.ILocatorModelLookupService;
+import org.eclipse.tcf.te.tcf.locator.interfaces.services.ILocatorModelRefreshService;
+import org.eclipse.tcf.te.tcf.locator.interfaces.services.ILocatorModelUpdateService;
+import org.eclipse.tcf.te.tcf.locator.nodes.LocatorModel;
+import org.eclipse.tcf.te.tcf.locator.nodes.PeerModel;
+import org.eclipse.tcf.te.tcf.locator.nodes.PeerRedirector;
/**
@@ -57,7 +60,7 @@ public class LocatorModelRefreshService extends AbstractLocatorModelService impl
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.locator.core.interfaces.services.ILocatorModelRefreshService#refresh()
+ * @see org.eclipse.tcf.te.tcf.locator.core.interfaces.services.ILocatorModelRefreshService#refresh()
*/
@Override
public void refresh() {
@@ -140,6 +143,8 @@ public class LocatorModelRefreshService extends AbstractLocatorModelService impl
if (roots.length > 0) {
// The map of peers created from the static definitions
Map<String, IPeer> peers = new HashMap<String, IPeer>();
+ // The list of peer attributes with postponed peer instance creation
+ List<Map<String, String>> postponed = new ArrayList<Map<String,String>>();
// Process the root locations
for (File root : roots) {
// List all "*.ini" files within the root location
@@ -172,7 +177,9 @@ public class LocatorModelRefreshService extends AbstractLocatorModelService impl
}
// Remember the file path within the properties
- properties.setProperty("Path", candidate.getAbsolutePath()); //$NON-NLS-1$
+ properties.setProperty(IPersistableNodeProperties.PROPERTY_URI, candidate.getAbsoluteFile().toURI().toString());
+ // Mark the node as static peer model node
+ properties.setProperty("static.transient", "true"); //$NON-NLS-1$ //$NON-NLS-2$
// Validate the name attribute. If not set, set
// it to the file name without the .ini extension.
@@ -211,18 +218,84 @@ public class LocatorModelRefreshService extends AbstractLocatorModelService impl
}
}
- // Construct the peer from the attributes
- IPeer peer = new TransientPeer(attrs);
- // Add the constructed peer to the peers map
- peers.put(peer.getID(), peer);
+ // If the redirect property is not set, create the peer right away
+ if (properties.get(IPeerModelProperties.PROP_REDIRECT_PROXY) == null) {
+ // Construct the peer from the attributes
+ IPeer peer = new TransientPeer(attrs);
+ // Add the constructed peer to the peers map
+ peers.put(peer.getID(), peer);
+ } else {
+ // Try to get the peer proxy
+ String proxyId = properties.getProperty(IPeerModelProperties.PROP_REDIRECT_PROXY);
+ IPeer proxy = peers.get(proxyId);
+ if (proxy == null) {
+ IPeerModel peerModel = model.getService(ILocatorModelLookupService.class).lkupPeerModelById(proxyId);
+ if (peerModel != null) proxy = peerModel.getPeer();
+ }
+
+ if (proxy != null) {
+ // Construct the peer redirector
+ PeerRedirector redirector = new PeerRedirector(proxy, attrs);
+ // Add the redirector to the peers map
+ peers.put(redirector.getID(), redirector);
+ } else {
+ // Postpone peer creation
+ postponed.add(attrs);
+ }
+ }
} catch (IOException e) {
/* ignored on purpose */
}
}
}
}
+
+ // Process postponed peers if there are any
+ if (!postponed.isEmpty()) {
+ for (Map<String, String> attrs : postponed) {
+ String proxyId = attrs.get(IPeerModelProperties.PROP_REDIRECT_PROXY);
+ IPeer proxy = proxyId != null ? peers.get(proxyId) : null;
+ if (proxy == null) {
+ IPeerModel peerModel = model.getService(ILocatorModelLookupService.class).lkupPeerModelById(proxyId);
+ if (peerModel != null) proxy = peerModel.getPeer();
+ }
+
+ if (proxy != null) {
+ // Construct the peer redirector
+ PeerRedirector redirector = new PeerRedirector(proxy, attrs);
+ // Add the redirector to the peers map
+ peers.put(redirector.getID(), redirector);
+ } else {
+ // Proxy not available -> reset redirection
+ attrs.remove(IPeerModelProperties.PROP_REDIRECT_PROXY);
+ // Construct the peer from the attributes
+ IPeer peer = new TransientPeer(attrs);
+ // Add the constructed peer to the peers map
+ peers.put(peer.getID(), peer);
+ }
+ }
+ }
+
// Process the read peers
if (!peers.isEmpty()) processPeers(peers, oldChildren, model);
+
+ // Scan the peers for redirected ones ... and set up the peer model association
+ for (String peerId : peers.keySet()) {
+ IPeer peer = peers.get(peerId);
+ if (!(peer instanceof PeerRedirector)) continue;
+
+ // Get the peers peer model object
+ IPeerModel peerModel = model.getService(ILocatorModelLookupService.class).lkupPeerModelById(peerId);
+ Assert.isNotNull(peerModel);
+
+ // The peer is a peer redirector -> get the proxy peer id and proxy peer model
+ String proxyPeerId = ((PeerRedirector)peer).getParent().getID();
+ IPeerModel proxy = model.getService(ILocatorModelLookupService.class).lkupPeerModelById(proxyPeerId);
+ Assert.isNotNull(proxy);
+
+ peerModel.setParentNode(proxy);
+ model.getService(ILocatorModelUpdateService.class).addChild(peerModel);
+ }
}
}
@@ -237,8 +310,8 @@ public class LocatorModelRefreshService extends AbstractLocatorModelService impl
// Check on the peers root locations preference setting
String roots = Platform.getPreferencesService().getString(CoreBundleActivator.getUniqueIdentifier(),
- IPreferenceKeys.PREF_STATIC_PEERS_ROOT_LOCATIONS,
- null, null);
+ IPreferenceKeys.PREF_STATIC_PEERS_ROOT_LOCATIONS,
+ null, null);
// If set, split it in its single components
if (roots != null) {
String[] candidates = roots.split(File.pathSeparator);
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/services/LocatorModelUpdateService.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/services/LocatorModelUpdateService.java
new file mode 100644
index 000000000..400aa8b7e
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/services/LocatorModelUpdateService.java
@@ -0,0 +1,172 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.locator.services;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.te.tcf.locator.interfaces.IModelListener;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.ILocatorModel;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModelProperties;
+import org.eclipse.tcf.te.tcf.locator.interfaces.services.ILocatorModelUpdateService;
+
+
+/**
+ * Default locator model update service implementation.
+ */
+public class LocatorModelUpdateService extends AbstractLocatorModelService implements ILocatorModelUpdateService {
+
+ /**
+ * Constructor.
+ *
+ * @param parentModel The parent locator model instance. Must not be <code>null</code>.
+ */
+ public LocatorModelUpdateService(ILocatorModel parentModel) {
+ super(parentModel);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.locator.core.interfaces.services.ILocatorModelUpdateService#add(org.eclipse.tcf.te.tcf.locator.core.interfaces.nodes.IPeerModel)
+ */
+ @Override
+ public void add(final IPeerModel peer) {
+ Assert.isNotNull(peer);
+ Assert.isTrue(Protocol.isDispatchThread(), "Illegal Thread Access"); //$NON-NLS-1$
+
+ Map<String, IPeerModel> peers = (Map<String, IPeerModel>)getLocatorModel().getAdapter(Map.class);
+ Assert.isNotNull(peers);
+ peers.put(peer.getPeerId(), peer);
+
+ final IModelListener[] listeners = getLocatorModel().getListener();
+ if (listeners.length > 0) {
+ Protocol.invokeLater(new Runnable() {
+ @Override
+ public void run() {
+ for (IModelListener listener : listeners) {
+ listener.locatorModelChanged(getLocatorModel(), peer, true);
+ }
+ }
+ });
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.locator.core.interfaces.services.ILocatorModelUpdateService#remove(org.eclipse.tcf.te.tcf.locator.core.interfaces.nodes.IPeerModel)
+ */
+ @Override
+ public void remove(final IPeerModel peer) {
+ Assert.isNotNull(peer);
+ Assert.isTrue(Protocol.isDispatchThread(), "Illegal Thread Access"); //$NON-NLS-1$
+
+ Map<String, IPeerModel> peers = (Map<String, IPeerModel>)getLocatorModel().getAdapter(Map.class);
+ Assert.isNotNull(peers);
+ peers.remove(peer.getPeerId());
+
+ getLocatorModel().setChildren(peer.getPeerId(), null);
+
+ final IModelListener[] listeners = getLocatorModel().getListener();
+ if (listeners.length > 0) {
+ Protocol.invokeLater(new Runnable() {
+ @Override
+ public void run() {
+ for (IModelListener listener : listeners) {
+ listener.locatorModelChanged(getLocatorModel(), peer, false);
+ }
+ }
+ });
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.locator.core.interfaces.services.ILocatorModelUpdateService#updatePeerServices(org.eclipse.tcf.te.tcf.locator.core.interfaces.nodes.IPeerModel, java.util.Collection, java.util.Collection)
+ */
+ @Override
+ public void updatePeerServices(IPeerModel peerNode, Collection<String> localServices, Collection<String> remoteServices) {
+ Assert.isNotNull(peerNode);
+ Assert.isTrue(Protocol.isDispatchThread(), "Illegal Thread Access"); //$NON-NLS-1$
+
+ peerNode.setProperty(IPeerModelProperties.PROP_LOCAL_SERVICES, localServices != null ? makeString(localServices) : null);
+ peerNode.setProperty(IPeerModelProperties.PROP_REMOTE_SERVICES, remoteServices != null ? makeString(remoteServices) : null);
+ }
+
+ /**
+ * Transform the given collection into a plain string.
+ *
+ * @param collection The collection. Must not be <code>null</code>.
+ * @return The plain string.
+ */
+ protected String makeString(Collection<String> collection) {
+ Assert.isNotNull(collection);
+
+ String buffer = collection.toString();
+ buffer = buffer.replaceAll("\\[", "").replaceAll("\\]", ""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+
+ return buffer.trim();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.locator.interfaces.services.ILocatorModelUpdateService#addChild(org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel)
+ */
+ @Override
+ public void addChild(final IPeerModel child) {
+ Assert.isNotNull(child);
+ Assert.isTrue(Protocol.isDispatchThread(), "Illegal Thread Access"); //$NON-NLS-1$
+
+ // Determine the parent node
+ final IPeerModel parent = child.getParentNode();
+ if (parent == null) return;
+
+ // Determine the peer id of the parent
+ String parentPeerId = parent.getPeerId();
+ Assert.isNotNull(parentPeerId);
+
+ // Get the list of existing children
+ List<IPeerModel> children = new ArrayList<IPeerModel>(getLocatorModel().getChildren(parentPeerId));
+ if (!children.contains(child)) {
+ children.add(child);
+ getLocatorModel().setChildren(parentPeerId, children);
+ }
+
+ // Notify listeners
+ parent.fireChangeEvent("changed", null, children); //$NON-NLS-1$
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.locator.interfaces.services.ILocatorModelUpdateService#removeChild(org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel)
+ */
+ @Override
+ public void removeChild(final IPeerModel child) {
+ Assert.isNotNull(child);
+ Assert.isTrue(Protocol.isDispatchThread(), "Illegal Thread Access"); //$NON-NLS-1$
+
+ // Determine the parent node
+ final IPeerModel parent = child.getParentNode();
+ if (parent == null) return;
+
+ // Determine the peer id of the parent
+ String parentPeerId = parent.getPeerId();
+ Assert.isNotNull(parentPeerId);
+
+ // Get the list of existing children
+ List<IPeerModel> children = new ArrayList<IPeerModel>(getLocatorModel().getChildren(parentPeerId));
+ if (children.contains(child)) {
+ children.remove(child);
+ getLocatorModel().setChildren(parentPeerId, children);
+ }
+
+ // Notify listeners
+ parent.fireChangeEvent("changed", null, children); //$NON-NLS-1$
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tests/.classpath b/target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/.classpath
index 8a8f1668c..8a8f1668c 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tests/.classpath
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/.classpath
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/.options b/target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/.options
new file mode 100644
index 000000000..1b2b57c5f
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/.options
@@ -0,0 +1,3 @@
+org.eclipse.tcf.te.tcf.log.core/debugmode = 0
+
+org.eclipse.tcf.te.tcf.log.core/trace/channelTraceListener = false
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.log.core/.project b/target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/.project
index 5168fb9bf..6956dcd1b 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.log.core/.project
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/.project
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.eclipse.tm.te.tcf.log.core</name>
+ <name>org.eclipse.tcf.te.tcf.log.core</name>
<comment></comment>
<projects>
</projects>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.log.core/.settings/org.eclipse.jdt.core.prefs b/target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/.settings/org.eclipse.jdt.core.prefs
index a81904f86..a81904f86 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.log.core/.settings/org.eclipse.jdt.core.prefs
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/.settings/org.eclipse.jdt.core.prefs
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.log.core/.settings/org.eclipse.jdt.ui.prefs b/target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/.settings/org.eclipse.jdt.ui.prefs
index 1e54cec21..1e54cec21 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.log.core/.settings/org.eclipse.jdt.ui.prefs
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/.settings/org.eclipse.jdt.ui.prefs
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..21d55a344
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/META-INF/MANIFEST.MF
@@ -0,0 +1,20 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.tcf.te.tcf.log.core;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipse.tcf.te.tcf.log.core.activator.CoreBundleActivator
+Bundle-Vendor: %providerName
+Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
+ org.eclipse.tcf.te.runtime;bundle-version="1.0.0",
+ org.eclipse.tcf.core;bundle-version="1.0.0",
+ org.eclipse.tcf.te.tcf.core;bundle-version="1.0.0"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
+Bundle-Localization: plugin
+Export-Package: org.eclipse.tcf.te.tcf.log.core.activator;x-internal:=true,
+ org.eclipse.tcf.te.tcf.log.core.events,
+ org.eclipse.tcf.te.tcf.log.core.interfaces,
+ org.eclipse.tcf.te.tcf.log.core.internal;x-internal:=true,
+ org.eclipse.tcf.te.tcf.log.core.internal.listener;x-internal:=true,
+ org.eclipse.tcf.te.tcf.log.core.internal.nls;x-internal:=true
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tests/build.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/build.properties
index 73a5119ed..73a5119ed 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tests/build.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/build.properties
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.log.core/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/plugin.properties
index 3975ec68b..3975ec68b 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.log.core/plugin.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/plugin.properties
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.log.core/plugin.xml b/target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/plugin.xml
index 8f1f73d9b..9745df43c 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.log.core/plugin.xml
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/plugin.xml
@@ -3,14 +3,14 @@
<plugin>
<!-- TCF framework startup participant -->
- <extension point="org.eclipse.tm.tcf.startup">
- <class name="org.eclipse.tm.te.tcf.log.core.internal.Startup"/>
+ <extension point="org.eclipse.tcf.startup">
+ <class name="org.eclipse.tcf.te.tcf.log.core.internal.Startup"/>
</extension>
<!-- Preference contributions -->
<extension point="org.eclipse.core.runtime.preferences">
<initializer
- class="org.eclipse.tm.te.tcf.log.core.internal.PreferencesInitializer">
+ class="org.eclipse.tcf.te.tcf.log.core.internal.PreferencesInitializer">
</initializer>
</extension>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.model/pom.xml b/target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/pom.xml
index ab2f3105d..5a5405ab7 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.model/pom.xml
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/pom.xml
@@ -7,11 +7,11 @@
<parent>
<groupId>org.eclipse.tcf</groupId>
<artifactId>tcf-parent</artifactId>
- <version>0.5.0-SNAPSHOT</version>
+ <version>1.0.0-SNAPSHOT</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<version>1.0.0.qualifier</version>
- <artifactId>org.eclipse.tm.te.runtime.model</artifactId>
+ <artifactId>org.eclipse.tcf.te.tcf.log.core</artifactId>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.log.core/src/org/eclipse/tm/te/tcf/log/core/activator/CoreBundleActivator.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/src/org/eclipse/tcf/te/tcf/log/core/activator/CoreBundleActivator.java
index 36cd57062..340226d45 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.log.core/src/org/eclipse/tm/te/tcf/log/core/activator/CoreBundleActivator.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/src/org/eclipse/tcf/te/tcf/log/core/activator/CoreBundleActivator.java
@@ -7,10 +7,11 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.log.core.activator;
+package org.eclipse.tcf.te.tcf.log.core.activator;
import org.eclipse.core.runtime.Plugin;
-import org.eclipse.tm.te.runtime.tracing.TraceHandler;
+import org.eclipse.tcf.te.runtime.preferences.ScopedEclipsePreferences;
+import org.eclipse.tcf.te.runtime.tracing.TraceHandler;
import org.osgi.framework.BundleContext;
/**
@@ -19,6 +20,8 @@ import org.osgi.framework.BundleContext;
public class CoreBundleActivator extends Plugin {
// The shared instance
private static CoreBundleActivator plugin;
+ // The scoped preferences instance
+ private static ScopedEclipsePreferences scopedPreferences = null;
// The trace handler instance
private static TraceHandler traceHandler;
@@ -42,6 +45,16 @@ public class CoreBundleActivator extends Plugin {
}
/**
+ * Return the scoped preferences for this plugin.
+ */
+ public static ScopedEclipsePreferences getScopedPreferences() {
+ if (scopedPreferences == null) {
+ scopedPreferences = new ScopedEclipsePreferences(getUniqueIdentifier());
+ }
+ return scopedPreferences;
+ }
+
+ /**
* Returns the bundles trace handler.
*
* @return The bundles trace handler.
@@ -68,6 +81,8 @@ public class CoreBundleActivator extends Plugin {
@Override
public void stop(BundleContext context) throws Exception {
plugin = null;
+ scopedPreferences = null;
+ traceHandler = null;
super.stop(context);
}
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/src/org/eclipse/tcf/te/tcf/log/core/events/MonitorEvent.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/src/org/eclipse/tcf/te/tcf/log/core/events/MonitorEvent.java
new file mode 100644
index 000000000..7afff77e9
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/src/org/eclipse/tcf/te/tcf/log/core/events/MonitorEvent.java
@@ -0,0 +1,97 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.log.core.events;
+
+import java.util.EventObject;
+
+/**
+ * Monitor event implementation.
+ */
+public class MonitorEvent extends EventObject {
+ private static final long serialVersionUID = 2503050052196826683L;
+
+ /**
+ * Monitor event types.
+ */
+ public static enum Type { OPEN, ACTIVITY, CLOSE }
+
+ /**
+ * Immutable monitor event message.
+ */
+ public static final class Message {
+ /** The message type */
+ public final char type;
+ /** The message text */
+ public final String text;
+
+ /**
+ * Constructor.
+ */
+ public Message(char type, String text) {
+ this.type = type;
+ this.text = text;
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString() {
+ StringBuilder buffer = new StringBuilder(getClass().getName());
+ buffer.append(": type = '"); //$NON-NLS-1$
+ buffer.append(type);
+ buffer.append("', text = '"); //$NON-NLS-1$
+ buffer.append(text);
+ buffer.append("'"); //$NON-NLS-1$
+
+ return buffer.toString();
+ }
+ }
+
+
+ private Type type;
+ private Message message;
+
+ /**
+ * Constructor.
+ *
+ * @param source The source object. Must not be <code>null</code>.
+ * @param type The event type. Must not be <code>null</code>.
+ * @param message The event message or <code>null</code>.
+ *
+ * @exception IllegalArgumentException if type == null.
+ */
+ public MonitorEvent(Object source, Type type, Message message) {
+ super(source);
+
+ if (type == null) throw new IllegalArgumentException("null type"); //$NON-NLS-1$
+ this.type = type;
+
+ this.message = message;
+ }
+
+ /**
+ * Returns the event type.
+ *
+ * @return The event type.
+ */
+ public Type getType() {
+ return type;
+ }
+
+ /**
+ * Returns the event message.
+ *
+ * @return The event message or <code>null</code>.
+ */
+ public Message getMessage() {
+ return message;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.log.core/src/org/eclipse/tm/te/tcf/log/core/interfaces/IPreferenceKeys.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/src/org/eclipse/tcf/te/tcf/log/core/interfaces/IPreferenceKeys.java
index 4606c531f..d478f8edc 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.log.core/src/org/eclipse/tm/te/tcf/log/core/interfaces/IPreferenceKeys.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/src/org/eclipse/tcf/te/tcf/log/core/interfaces/IPreferenceKeys.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.log.core.interfaces;
+package org.eclipse.tcf.te.tcf.log.core.interfaces;
/**
@@ -25,11 +25,22 @@ public interface IPreferenceKeys {
public final String PREF_LOGGING_ENABLED = PREFIX + "enabled"; //$NON-NLS-1$
/**
+ * If set to <code>true</code>, the logger will send events to the monitor
+ * to allow following the back-end communication within the UI.
+ */
+ public final String PREF_MONITOR_ENABLED = PREFIX + "monitor.enabled"; //$NON-NLS-1$
+
+ /**
* If set to <code>true</code>, locator heart beat events are logged.
*/
public final String PREF_SHOW_HEARTBEATS = PREFIX + "show.heartbeats"; //$NON-NLS-1$
/**
+ * If set to <code>true</code>, TCF framework events are logged.
+ */
+ public final String PREF_SHOW_FRAMEWORK_EVENTS = PREFIX + "show.frameworkEvents"; //$NON-NLS-1$
+
+ /**
* The maximum number of bytes the log files are allowed to grow to, in bytes.
* Defaults to 5MB.
*/
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.log.core/src/org/eclipse/tm/te/tcf/log/core/interfaces/ITracing.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/src/org/eclipse/tcf/te/tcf/log/core/interfaces/ITracing.java
index 21814179e..afef953b7 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.log.core/src/org/eclipse/tm/te/tcf/log/core/interfaces/ITracing.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/src/org/eclipse/tcf/te/tcf/log/core/interfaces/ITracing.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.log.core.interfaces;
+package org.eclipse.tcf.te.tcf.log.core.interfaces;
/**
* TCF logging tracing identifiers.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.log.core/src/org/eclipse/tm/te/tcf/log/core/internal/LogManager.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/src/org/eclipse/tcf/te/tcf/log/core/internal/LogManager.java
index c646f907d..daff01026 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.log.core/src/org/eclipse/tm/te/tcf/log/core/internal/LogManager.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/src/org/eclipse/tcf/te/tcf/log/core/internal/LogManager.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.log.core.internal;
+package org.eclipse.tcf.te.tcf.log.core.internal;
import java.io.File;
import java.io.FileWriter;
@@ -19,19 +19,20 @@ import java.util.Map;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
import org.eclipse.osgi.util.NLS;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IPeer;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.te.tcf.core.Tcf;
-import org.eclipse.tm.te.tcf.core.interfaces.listeners.IChannelStateChangeListener;
-import org.eclipse.tm.te.tcf.core.interfaces.listeners.IProtocolStateChangeListener;
-import org.eclipse.tm.te.tcf.log.core.activator.CoreBundleActivator;
-import org.eclipse.tm.te.tcf.log.core.interfaces.IPreferenceKeys;
-import org.eclipse.tm.te.tcf.log.core.internal.listener.ChannelStateChangeListener;
-import org.eclipse.tm.te.tcf.log.core.internal.listener.ChannelTraceListener;
-import org.eclipse.tm.te.tcf.log.core.internal.nls.Messages;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.te.runtime.events.EventManager;
+import org.eclipse.tcf.te.tcf.core.Tcf;
+import org.eclipse.tcf.te.tcf.core.listeners.interfaces.IChannelStateChangeListener;
+import org.eclipse.tcf.te.tcf.core.listeners.interfaces.IProtocolStateChangeListener;
+import org.eclipse.tcf.te.tcf.log.core.activator.CoreBundleActivator;
+import org.eclipse.tcf.te.tcf.log.core.events.MonitorEvent;
+import org.eclipse.tcf.te.tcf.log.core.interfaces.IPreferenceKeys;
+import org.eclipse.tcf.te.tcf.log.core.internal.listener.ChannelStateChangeListener;
+import org.eclipse.tcf.te.tcf.log.core.internal.listener.ChannelTraceListener;
+import org.eclipse.tcf.te.tcf.log.core.internal.nls.Messages;
/**
@@ -102,8 +103,8 @@ public final class LogManager implements IProtocolStateChangeListener {
* preference settings
*/
private void initializeFromPreferences() {
- String fileSize = Platform.getPreferencesService().getString(CoreBundleActivator.getUniqueIdentifier(),
- IPreferenceKeys.PREF_MAX_FILE_SIZE, "5M", null); //$NON-NLS-1$
+ String fileSize = CoreBundleActivator.getScopedPreferences().getString(IPreferenceKeys.PREF_MAX_FILE_SIZE);
+ if (fileSize == null) fileSize = "5M"; //$NON-NLS-1$
try {
// If the last character is either K, M or G -> convert to bytes
@@ -128,8 +129,8 @@ public final class LogManager implements IProtocolStateChangeListener {
maxFileSize = 5242880L;
}
- maxInCycle = Platform.getPreferencesService().getInt(CoreBundleActivator.getUniqueIdentifier(),
- IPreferenceKeys.PREF_MAX_FILES_IN_CYCLE, 5, null);
+ maxInCycle = CoreBundleActivator.getScopedPreferences().getInt(IPreferenceKeys.PREF_MAX_FILES_IN_CYCLE);
+ if (maxInCycle <= 0) maxInCycle = 5;
}
/**
@@ -138,7 +139,7 @@ public final class LogManager implements IProtocolStateChangeListener {
* <b>Note:</b> This method is supposed to be called from {@link Startup} only!
*/
/* default */ final void initListeners() {
- Assert.isTrue(Protocol.isDispatchThread());
+ Assert.isTrue(Protocol.isDispatchThread(), "Illegal Thread Access"); //$NON-NLS-1$
// If the channel state change listener instance has been created
// already, there is nothing left to do here
@@ -153,7 +154,7 @@ public final class LogManager implements IProtocolStateChangeListener {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.core.interfaces.listeners.IProtocolStateChangeListener#stateChanged(boolean)
+ * @see org.eclipse.tcf.te.tcf.core.listeners.interfaces.IProtocolStateChangeListener#stateChanged(boolean)
*/
@Override
public void stateChanged(boolean state) {
@@ -176,7 +177,7 @@ public final class LogManager implements IProtocolStateChangeListener {
*/
public FileWriter getWriter(IChannel channel) {
Assert.isNotNull(channel);
- Assert.isTrue(Protocol.isDispatchThread());
+ Assert.isTrue(Protocol.isDispatchThread(), "Illegal Thread Access"); //$NON-NLS-1$
// Before looking up the writer, check the file limits
checkLimits(channel);
@@ -208,7 +209,7 @@ public final class LogManager implements IProtocolStateChangeListener {
*/
public void closeWriter(IChannel channel, String message) {
Assert.isNotNull(channel);
- Assert.isTrue(Protocol.isDispatchThread());
+ Assert.isTrue(Protocol.isDispatchThread(), "Illegal Thread Access"); //$NON-NLS-1$
// Remove the writer from the map
String logName = getLogName(channel);
@@ -241,7 +242,7 @@ public final class LogManager implements IProtocolStateChangeListener {
*/
public String getLogName(IChannel channel) {
Assert.isNotNull(channel);
- Assert.isTrue(Protocol.isDispatchThread());
+ Assert.isTrue(Protocol.isDispatchThread(), "Illegal Thread Access"); //$NON-NLS-1$
String logName = null;
@@ -382,4 +383,31 @@ public final class LogManager implements IProtocolStateChangeListener {
}
}
}
+
+ /**
+ * Sends an event to the monitor signaling the given message and type.
+ *
+ * @param channel The channel. Must not be <code>null</code>.
+ * @param type The message type. Must not be <code>null</code>.
+ * @param message The message. Must not be <code>null</code>.
+ */
+ public void monitor(IChannel channel, MonitorEvent.Type type, MonitorEvent.Message message) {
+ Assert.isNotNull(channel);
+ Assert.isNotNull(type);
+ Assert.isNotNull(message);
+ Assert.isTrue(Protocol.isDispatchThread(), "Illegal Thread Access"); //$NON-NLS-1$
+
+ // If monitoring is not enabled, return immediately
+ if (!CoreBundleActivator.getScopedPreferences().getBoolean(IPreferenceKeys.PREF_MONITOR_ENABLED)) {
+ return;
+ }
+
+ // The source of a monitor event is the peer.
+ IPeer peer = channel.getRemotePeer();
+ if (peer != null) {
+ MonitorEvent event = new MonitorEvent(peer, type, message);
+ EventManager.getInstance().fireEvent(event);
+ }
+ }
+
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/src/org/eclipse/tcf/te/tcf/log/core/internal/PreferencesInitializer.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/src/org/eclipse/tcf/te/tcf/log/core/internal/PreferencesInitializer.java
new file mode 100644
index 000000000..c335abaf5
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/src/org/eclipse/tcf/te/tcf/log/core/internal/PreferencesInitializer.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.log.core.internal;
+
+import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
+import org.eclipse.tcf.te.runtime.preferences.ScopedEclipsePreferences;
+import org.eclipse.tcf.te.tcf.log.core.activator.CoreBundleActivator;
+import org.eclipse.tcf.te.tcf.log.core.interfaces.IPreferenceKeys;
+
+
+/**
+ * TCF logging bundle preference initializer.
+ */
+public class PreferencesInitializer extends AbstractPreferenceInitializer {
+
+ /**
+ * Constructor.
+ */
+ public PreferencesInitializer() {
+ super();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
+ */
+ @Override
+ public void initializeDefaultPreferences() {
+ // Get the bundles scoped preferences store
+ ScopedEclipsePreferences prefs = CoreBundleActivator.getScopedPreferences();
+ if (prefs != null) {
+ // Enable back-end communication logging: default on
+ prefs.putDefaultBoolean(IPreferenceKeys.PREF_LOGGING_ENABLED, true);
+ // Enable back-end communication monitor: default off
+ prefs.putDefaultBoolean(IPreferenceKeys.PREF_MONITOR_ENABLED, false);
+ // Heat beat events: default off
+ prefs.putDefaultBoolean(IPreferenceKeys.PREF_SHOW_HEARTBEATS, false);
+ // Framework events: default off
+ prefs.putDefaultBoolean(IPreferenceKeys.PREF_SHOW_FRAMEWORK_EVENTS, false);
+ // Maximum log file size in bytes: default 5M
+ prefs.putDefaultString(IPreferenceKeys.PREF_MAX_FILE_SIZE, "5M"); //$NON-NLS-1$
+ // Maximum number of log files in cycle: default 5
+ prefs.putDefaultInt(IPreferenceKeys.PREF_MAX_FILES_IN_CYCLE, 5);
+ }
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.log.core/src/org/eclipse/tm/te/tcf/log/core/internal/Startup.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/src/org/eclipse/tcf/te/tcf/log/core/internal/Startup.java
index 190d75def..abc0aa209 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.log.core/src/org/eclipse/tm/te/tcf/log/core/internal/Startup.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/src/org/eclipse/tcf/te/tcf/log/core/internal/Startup.java
@@ -7,9 +7,9 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.log.core.internal;
+package org.eclipse.tcf.te.tcf.log.core.internal;
-import org.eclipse.tm.tcf.protocol.Protocol;
+import org.eclipse.tcf.protocol.Protocol;
/**
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.log.core/src/org/eclipse/tm/te/tcf/log/core/internal/listener/ChannelStateChangeListener.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/src/org/eclipse/tcf/te/tcf/log/core/internal/listener/ChannelStateChangeListener.java
index 9bfb8dc2e..f744d727f 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.log.core/src/org/eclipse/tm/te/tcf/log/core/internal/listener/ChannelStateChangeListener.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/src/org/eclipse/tcf/te/tcf/log/core/internal/listener/ChannelStateChangeListener.java
@@ -7,11 +7,11 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.log.core.internal.listener;
+package org.eclipse.tcf.te.tcf.log.core.internal.listener;
import org.eclipse.core.runtime.Assert;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.te.tcf.core.interfaces.listeners.IChannelStateChangeListener;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.te.tcf.core.listeners.interfaces.IChannelStateChangeListener;
/**
* TCF logging channel state listener implementation.
@@ -19,7 +19,7 @@ import org.eclipse.tm.te.tcf.core.interfaces.listeners.IChannelStateChangeListen
public class ChannelStateChangeListener implements IChannelStateChangeListener {
/* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.core.interfaces.listeners.IChannelStateChangeListener#stateChanged(org.eclipse.tm.tcf.protocol.IChannel, int)
+ * @see org.eclipse.tcf.te.tcf.core.listeners.interfaces.IChannelStateChangeListener#stateChanged(org.eclipse.tcf.protocol.IChannel, int)
*/
@Override
public void stateChanged(IChannel channel, int state) {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.log.core/src/org/eclipse/tm/te/tcf/log/core/internal/listener/ChannelTraceListener.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/src/org/eclipse/tcf/te/tcf/log/core/internal/listener/ChannelTraceListener.java
index 28212a1bd..613ddcad6 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.log.core/src/org/eclipse/tm/te/tcf/log/core/internal/listener/ChannelTraceListener.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/src/org/eclipse/tcf/te/tcf/log/core/internal/listener/ChannelTraceListener.java
@@ -7,26 +7,25 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.log.core.internal.listener;
+package org.eclipse.tcf.te.tcf.log.core.internal.listener;
-import java.io.ByteArrayInputStream;
import java.io.FileWriter;
import java.io.IOException;
-import java.io.InputStreamReader;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.Platform;
import org.eclipse.osgi.util.NLS;
-import org.eclipse.tm.tcf.core.AbstractChannel.TraceListener;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.te.tcf.log.core.activator.CoreBundleActivator;
-import org.eclipse.tm.te.tcf.log.core.interfaces.IPreferenceKeys;
-import org.eclipse.tm.te.tcf.log.core.interfaces.ITracing;
-import org.eclipse.tm.te.tcf.log.core.internal.LogManager;
-import org.eclipse.tm.te.tcf.log.core.internal.nls.Messages;
+import org.eclipse.tcf.core.AbstractChannel.TraceListener;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.te.tcf.core.util.JSONUtils;
+import org.eclipse.tcf.te.tcf.log.core.activator.CoreBundleActivator;
+import org.eclipse.tcf.te.tcf.log.core.events.MonitorEvent;
+import org.eclipse.tcf.te.tcf.log.core.interfaces.IPreferenceKeys;
+import org.eclipse.tcf.te.tcf.log.core.interfaces.ITracing;
+import org.eclipse.tcf.te.tcf.log.core.internal.LogManager;
+import org.eclipse.tcf.te.tcf.log.core.internal.nls.Messages;
/**
* TCF logging channel trace listener implementation.
@@ -65,7 +64,7 @@ public class ChannelTraceListener implements TraceListener {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.tcf.core.AbstractChannel.TraceListener#onChannelClosed(java.lang.Throwable)
+ * @see org.eclipse.tcf.core.AbstractChannel.TraceListener#onChannelClosed(java.lang.Throwable)
*/
@Override
public void onChannelClosed(Throwable error) {
@@ -85,10 +84,11 @@ public class ChannelTraceListener implements TraceListener {
});
LogManager.getInstance().closeWriter(channel, message);
+ LogManager.getInstance().monitor(channel, MonitorEvent.Type.CLOSE, new MonitorEvent.Message('F', message));
}
/* (non-Javadoc)
- * @see org.eclipse.tm.tcf.core.AbstractChannel.TraceListener#onMessageReceived(char, java.lang.String, java.lang.String, java.lang.String, byte[])
+ * @see org.eclipse.tcf.core.AbstractChannel.TraceListener#onMessageReceived(char, java.lang.String, java.lang.String, java.lang.String, byte[])
*/
@Override
public void onMessageReceived(char type, String token, String service, String name, byte[] data) {
@@ -102,7 +102,7 @@ public class ChannelTraceListener implements TraceListener {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.tcf.core.AbstractChannel.TraceListener#onMessageSent(char, java.lang.String, java.lang.String, java.lang.String, byte[])
+ * @see org.eclipse.tcf.core.AbstractChannel.TraceListener#onMessageSent(char, java.lang.String, java.lang.String, java.lang.String, byte[])
*/
@Override
public void onMessageSent(final char type, String token, String service, String name, byte[] data) {
@@ -120,11 +120,15 @@ public class ChannelTraceListener implements TraceListener {
*/
private void doLogMessage(final char type, String token, String service, String name, byte[] data, boolean received) {
// Filter out the heart beat messages if not overwritten by the preferences
- boolean showHeartbeats = Platform.getPreferencesService().getBoolean(CoreBundleActivator.getUniqueIdentifier(),
- IPreferenceKeys.PREF_SHOW_HEARTBEATS, false, null);
+ boolean showHeartbeats = CoreBundleActivator.getScopedPreferences().getBoolean(IPreferenceKeys.PREF_SHOW_HEARTBEATS);
if (!showHeartbeats && name != null && name.toLowerCase().contains("heartbeat")) { //$NON-NLS-1$
return;
}
+ // Filter out framework events if not overwritten by the preferences
+ boolean frameworkEvents = CoreBundleActivator.getScopedPreferences().getBoolean(IPreferenceKeys.PREF_SHOW_FRAMEWORK_EVENTS);
+ if (!frameworkEvents && type == 'F') {
+ return;
+ }
// Format the message
final String message = formatMessage(type, token, service, name, data, received);
@@ -139,6 +143,7 @@ public class ChannelTraceListener implements TraceListener {
/* ignored on purpose */
}
}
+ LogManager.getInstance().monitor(channel, MonitorEvent.Type.ACTIVITY, new MonitorEvent.Message(type, message));
}
/**
@@ -149,20 +154,7 @@ public class ChannelTraceListener implements TraceListener {
String time = TIME_FORMAT.format(new Date(System.currentTimeMillis()));
// Decode the arguments again for tracing purpose
- String args = null;
- if (data != null) {
- StringBuilder builder = new StringBuilder();
- InputStreamReader reader = new InputStreamReader(new ByteArrayInputStream(data));
- try {
- int c = reader.read();
- while (c != -1) {
- builder.append(c != 0 ? Character.valueOf((char)c).charValue() : ' ');
- c = reader.read();
- }
- } catch (IOException ex) { /* ignored on purpose */ }
-
- if (builder.length() > 0) args = builder.toString().trim();
- }
+ String args = JSONUtils.decodeStringFromByteArray(data);
// Construct the full message
//
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.log.core/src/org/eclipse/tm/te/tcf/log/core/internal/listener/ChannelTraceListenerManager.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/src/org/eclipse/tcf/te/tcf/log/core/internal/listener/ChannelTraceListenerManager.java
index ad5360116..f3e4b62ad 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.log.core/src/org/eclipse/tm/te/tcf/log/core/internal/listener/ChannelTraceListenerManager.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/src/org/eclipse/tcf/te/tcf/log/core/internal/listener/ChannelTraceListenerManager.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.log.core.internal.listener;
+package org.eclipse.tcf.te.tcf.log.core.internal.listener;
import java.io.FileWriter;
import java.io.IOException;
@@ -16,16 +16,16 @@ import java.util.HashMap;
import java.util.Map;
import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.Platform;
import org.eclipse.osgi.util.NLS;
-import org.eclipse.tm.tcf.core.AbstractChannel;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.te.tcf.log.core.activator.CoreBundleActivator;
-import org.eclipse.tm.te.tcf.log.core.interfaces.IPreferenceKeys;
-import org.eclipse.tm.te.tcf.log.core.interfaces.ITracing;
-import org.eclipse.tm.te.tcf.log.core.internal.LogManager;
-import org.eclipse.tm.te.tcf.log.core.internal.nls.Messages;
+import org.eclipse.tcf.core.AbstractChannel;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.te.tcf.log.core.activator.CoreBundleActivator;
+import org.eclipse.tcf.te.tcf.log.core.events.MonitorEvent;
+import org.eclipse.tcf.te.tcf.log.core.interfaces.IPreferenceKeys;
+import org.eclipse.tcf.te.tcf.log.core.interfaces.ITracing;
+import org.eclipse.tcf.te.tcf.log.core.internal.LogManager;
+import org.eclipse.tcf.te.tcf.log.core.internal.nls.Messages;
/**
* TCF logging channel trace listener manager implementation.
@@ -74,8 +74,7 @@ public class ChannelTraceListenerManager {
if (!(channel instanceof AbstractChannel)) return;
// Get the preference key if or if not logging is enabled
- boolean loggingEnabled = Platform.getPreferencesService().getBoolean(CoreBundleActivator.getUniqueIdentifier(),
- IPreferenceKeys.PREF_LOGGING_ENABLED, false, null);
+ boolean loggingEnabled = CoreBundleActivator.getScopedPreferences().getBoolean(IPreferenceKeys.PREF_LOGGING_ENABLED);
// If false, we are done here and wont create any console or trace listener.
if (!loggingEnabled) return;
@@ -109,6 +108,7 @@ public class ChannelTraceListenerManager {
/* ignored on purpose */
}
}
+ LogManager.getInstance().monitor(channel, MonitorEvent.Type.OPEN, new MonitorEvent.Message('F', message));
}
/**
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.log.core/src/org/eclipse/tm/te/tcf/log/core/internal/nls/Messages.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/src/org/eclipse/tcf/te/tcf/log/core/internal/nls/Messages.java
index 784b70ee9..bf4ce6edf 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.log.core/src/org/eclipse/tm/te/tcf/log/core/internal/nls/Messages.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/src/org/eclipse/tcf/te/tcf/log/core/internal/nls/Messages.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.log.core.internal.nls;
+package org.eclipse.tcf.te.tcf.log.core.internal.nls;
import org.eclipse.osgi.util.NLS;
@@ -17,7 +17,7 @@ import org.eclipse.osgi.util.NLS;
public class Messages extends NLS {
// The plug-in resource bundle name
- private static final String BUNDLE_NAME = "org.eclipse.tm.te.tcf.log.core.internal.nls.Messages"; //$NON-NLS-1$
+ private static final String BUNDLE_NAME = "org.eclipse.tcf.te.tcf.log.core.internal.nls.Messages"; //$NON-NLS-1$
/**
* Static constructor.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.log.core/src/org/eclipse/tm/te/tcf/log/core/internal/nls/Messages.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/src/org/eclipse/tcf/te/tcf/log/core/internal/nls/Messages.properties
index 2bc593e2a..c77b0dbd8 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.log.core/src/org/eclipse/tm/te/tcf/log/core/internal/nls/Messages.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/src/org/eclipse/tcf/te/tcf/log/core/internal/nls/Messages.properties
@@ -1,5 +1,5 @@
#
-# org.eclipse.tm.te.tcf.log.core
+# org.eclipse.tcf.te.tcf.log.core
# Externalized Strings.
#
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/.classpath b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/.classpath
index 8a8f1668c..8a8f1668c 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/.classpath
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/.classpath
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/.options b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/.options
new file mode 100644
index 000000000..2a3b0028b
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/.options
@@ -0,0 +1,4 @@
+org.eclipse.tcf.te.tcf.processes.core/debugmode = 0
+org.eclipse.tcf.te.tcf.processes.core/trace/processLauncher = false
+org.eclipse.tcf.te.tcf.processes.core/trace/processesListener = false
+org.eclipse.tcf.te.tcf.processes.core/trace/streamsListener = false
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/.project b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/.project
new file mode 100644
index 000000000..3383429e0
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.tcf.te.tcf.processes.core</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/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.core/.settings/org.eclipse.jdt.core.prefs b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/.settings/org.eclipse.jdt.core.prefs
index 7bca72a82..7bca72a82 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.core/.settings/org.eclipse.jdt.core.prefs
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/.settings/org.eclipse.jdt.core.prefs
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.core/.settings/org.eclipse.jdt.ui.prefs b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/.settings/org.eclipse.jdt.ui.prefs
index fdcdadb6e..fdcdadb6e 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.core/.settings/org.eclipse.jdt.ui.prefs
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/.settings/org.eclipse.jdt.ui.prefs
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..ec8cb3c28
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/META-INF/MANIFEST.MF
@@ -0,0 +1,21 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.tcf.te.tcf.processes.core
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipse.tcf.te.tcf.processes.core.activator.CoreBundleActivator
+Bundle-Vendor: %providerName
+Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
+ org.eclipse.tcf.te.runtime;bundle-version="1.0.0",
+ org.eclipse.tcf.te.runtime.services;bundle-version="1.0.0",
+ org.eclipse.tcf.te.core;bundle-version="1.0.0",
+ org.eclipse.tcf.core;bundle-version="1.0.0",
+ org.eclipse.tcf.te.tcf.core;bundle-version="1.0.0"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
+Bundle-Localization: plugin
+Export-Package: org.eclipse.tcf.te.tcf.processes.core.activator;x-internal:=true,
+ org.eclipse.tcf.te.tcf.processes.core.interfaces.launcher,
+ org.eclipse.tcf.te.tcf.processes.core.interfaces.tracing;x-internal:=true,
+ org.eclipse.tcf.te.tcf.processes.core.launcher,
+ org.eclipse.tcf.te.tcf.processes.core.nls
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.forms/build.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/build.properties
index f4ae97015..f4ae97015 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.forms/build.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/build.properties
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.core/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/plugin.properties
index 3fbd66db1..3fbd66db1 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.core/plugin.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/plugin.properties
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/pom.xml b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/pom.xml
new file mode 100644
index 000000000..83214da6b
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.tcf</groupId>
+ <artifactId>tcf-parent</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../../../pom.xml</relativePath>
+ </parent>
+
+ <version>1.0.0.qualifier</version>
+ <artifactId>org.eclipse.tcf.te.tcf.processes.core</artifactId>
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.core/src/org/eclipse/tm/te/tcf/processes/core/activator/CoreBundleActivator.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/activator/CoreBundleActivator.java
index 4dff9a5cd..87469dd4d 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.core/src/org/eclipse/tm/te/tcf/processes/core/activator/CoreBundleActivator.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/activator/CoreBundleActivator.java
@@ -7,9 +7,9 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.processes.core.activator;
+package org.eclipse.tcf.te.tcf.processes.core.activator;
-import org.eclipse.tm.te.runtime.tracing.TraceHandler;
+import org.eclipse.tcf.te.runtime.tracing.TraceHandler;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.core/src/org/eclipse/tm/te/tcf/processes/core/interfaces/launcher/IProcessContextAwareListener.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/interfaces/launcher/IProcessContextAwareListener.java
index 572d39b47..473cca597 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.core/src/org/eclipse/tm/te/tcf/processes/core/interfaces/launcher/IProcessContextAwareListener.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/interfaces/launcher/IProcessContextAwareListener.java
@@ -7,9 +7,9 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.processes.core.interfaces.launcher;
+package org.eclipse.tcf.te.tcf.processes.core.interfaces.launcher;
-import org.eclipse.tm.tcf.services.IProcesses;
+import org.eclipse.tcf.services.IProcesses;
/**
* Remote process context aware listener.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.core/src/org/eclipse/tm/te/tcf/processes/core/interfaces/launcher/IProcessLauncher.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/interfaces/launcher/IProcessLauncher.java
index 007b83aca..7135acaa5 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.core/src/org/eclipse/tm/te/tcf/processes/core/interfaces/launcher/IProcessLauncher.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/interfaces/launcher/IProcessLauncher.java
@@ -7,14 +7,14 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.processes.core.interfaces.launcher;
+package org.eclipse.tcf.te.tcf.processes.core.interfaces.launcher;
import java.util.Map;
import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.tm.tcf.protocol.IPeer;
-import org.eclipse.tm.te.runtime.interfaces.callback.ICallback;
-import org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
/**
* Interface to be implemented by classes providing a remote process launcher.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.core/src/org/eclipse/tm/te/tcf/processes/core/interfaces/launcher/IProcessStreamsProxy.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/interfaces/launcher/IProcessStreamsProxy.java
index ec23157d8..5ff58d76f 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.core/src/org/eclipse/tm/te/tcf/processes/core/interfaces/launcher/IProcessStreamsProxy.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/interfaces/launcher/IProcessStreamsProxy.java
@@ -7,12 +7,12 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.processes.core.interfaces.launcher;
+package org.eclipse.tcf.te.tcf.processes.core.interfaces.launcher;
import java.io.InputStream;
import java.io.OutputStream;
-import org.eclipse.tm.te.runtime.interfaces.callback.ICallback;
+import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback;
/**
* An interface to be implemented by clients to receive the remote process I/O instead of the
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.core/src/org/eclipse/tm/te/tcf/processes/core/internal/tracing/ITraceIds.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/interfaces/tracing/ITraceIds.java
index 74dc4a1c4..df003ac9d 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.core/src/org/eclipse/tm/te/tcf/processes/core/internal/tracing/ITraceIds.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/interfaces/tracing/ITraceIds.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.processes.core.internal.tracing;
+package org.eclipse.tcf.te.tcf.processes.core.interfaces.tracing;
/**
* Core plug-in trace slot identifiers.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.core/src/org/eclipse/tm/te/tcf/processes/core/launcher/ProcessLauncher.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/launcher/ProcessLauncher.java
index 91d0d1596..64786984e 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.core/src/org/eclipse/tm/te/tcf/processes/core/launcher/ProcessLauncher.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/launcher/ProcessLauncher.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.processes.core.launcher;
+package org.eclipse.tcf.te.tcf.processes.core.launcher;
import java.io.BufferedWriter;
import java.io.FileWriter;
@@ -35,35 +35,36 @@ import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.PlatformObject;
import org.eclipse.core.runtime.Status;
import org.eclipse.osgi.util.NLS;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IChannel.IChannelListener;
-import org.eclipse.tm.tcf.protocol.IPeer;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.tcf.services.IProcesses;
-import org.eclipse.tm.tcf.services.IProcesses.ProcessContext;
-import org.eclipse.tm.tcf.services.IStreams;
-import org.eclipse.tm.te.core.async.AsyncCallbackCollector;
-import org.eclipse.tm.te.runtime.callback.Callback;
-import org.eclipse.tm.te.runtime.events.DisposedEvent;
-import org.eclipse.tm.te.runtime.events.EventManager;
-import org.eclipse.tm.te.runtime.interfaces.callback.ICallback;
-import org.eclipse.tm.te.runtime.interfaces.events.IEventListener;
-import org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer;
-import org.eclipse.tm.te.runtime.properties.PropertiesContainer;
-import org.eclipse.tm.te.runtime.services.ServiceManager;
-import org.eclipse.tm.te.runtime.services.interfaces.ITerminalService;
-import org.eclipse.tm.te.runtime.services.interfaces.constants.ITerminalsConnectorConstants;
-import org.eclipse.tm.te.tcf.core.Tcf;
-import org.eclipse.tm.te.tcf.core.interfaces.IChannelManager;
-import org.eclipse.tm.te.tcf.core.streams.StreamsDataProvider;
-import org.eclipse.tm.te.tcf.core.streams.StreamsDataReceiver;
-import org.eclipse.tm.te.tcf.processes.core.activator.CoreBundleActivator;
-import org.eclipse.tm.te.tcf.processes.core.interfaces.launcher.IProcessContextAwareListener;
-import org.eclipse.tm.te.tcf.processes.core.interfaces.launcher.IProcessLauncher;
-import org.eclipse.tm.te.tcf.processes.core.interfaces.launcher.IProcessStreamsProxy;
-import org.eclipse.tm.te.tcf.processes.core.internal.tracing.ITraceIds;
-import org.eclipse.tm.te.tcf.processes.core.nls.Messages;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IChannel.IChannelListener;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.services.IProcesses;
+import org.eclipse.tcf.services.IProcesses.ProcessContext;
+import org.eclipse.tcf.services.IStreams;
+import org.eclipse.tcf.te.core.async.AsyncCallbackCollector;
+import org.eclipse.tcf.te.runtime.callback.Callback;
+import org.eclipse.tcf.te.runtime.events.DisposedEvent;
+import org.eclipse.tcf.te.runtime.events.EventManager;
+import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback;
+import org.eclipse.tcf.te.runtime.interfaces.events.IEventListener;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.runtime.properties.PropertiesContainer;
+import org.eclipse.tcf.te.runtime.services.ServiceManager;
+import org.eclipse.tcf.te.runtime.services.interfaces.ITerminalService;
+import org.eclipse.tcf.te.runtime.services.interfaces.constants.ITerminalsConnectorConstants;
+import org.eclipse.tcf.te.tcf.core.Tcf;
+import org.eclipse.tcf.te.tcf.core.async.CallbackInvocationDelegate;
+import org.eclipse.tcf.te.tcf.core.interfaces.IChannelManager;
+import org.eclipse.tcf.te.tcf.core.streams.StreamsDataProvider;
+import org.eclipse.tcf.te.tcf.core.streams.StreamsDataReceiver;
+import org.eclipse.tcf.te.tcf.processes.core.activator.CoreBundleActivator;
+import org.eclipse.tcf.te.tcf.processes.core.interfaces.launcher.IProcessContextAwareListener;
+import org.eclipse.tcf.te.tcf.processes.core.interfaces.launcher.IProcessLauncher;
+import org.eclipse.tcf.te.tcf.processes.core.interfaces.launcher.IProcessStreamsProxy;
+import org.eclipse.tcf.te.tcf.processes.core.interfaces.tracing.ITraceIds;
+import org.eclipse.tcf.te.tcf.processes.core.nls.Messages;
/**
* Remote process launcher.
@@ -71,7 +72,7 @@ import org.eclipse.tm.te.tcf.processes.core.nls.Messages;
* The process launcher is implemented fully asynchronous.
*/
public class ProcessLauncher extends PlatformObject implements IProcessLauncher {
- // The backend channel instance
+ // The channel instance
/* default */ IChannel channel;
// The process properties instance
private IPropertiesContainer properties;
@@ -112,7 +113,7 @@ public class ProcessLauncher extends PlatformObject implements IProcessLauncher
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.processes.core.interfaces.launcher.IProcessLauncher#dispose()
+ * @see org.eclipse.tcf.te.tcf.processes.core.interfaces.launcher.IProcessLauncher#dispose()
*/
@Override
public void dispose() {
@@ -128,25 +129,15 @@ public class ProcessLauncher extends PlatformObject implements IProcessLauncher
eventListener = null;
}
- // Create the callback invocation delegate
- AsyncCallbackCollector.ICallbackInvocationDelegate delegate = new AsyncCallbackCollector.ICallbackInvocationDelegate() {
- @Override
- public void invoke(Runnable runnable) {
- Assert.isNotNull(runnable);
- if (Protocol.isDispatchThread()) runnable.run();
- else Protocol.invokeLater(runnable);
- }
- };
-
// Create the callback collector
final AsyncCallbackCollector collector = new AsyncCallbackCollector(new Callback() {
@Override
protected void internalDone(Object caller, IStatus status) {
Assert.isTrue(Protocol.isDispatchThread(), "Illegal Thread Access"); //$NON-NLS-1$
// Close the channel as all disposal is done
- if (finChannel != null) finChannel.close();
+ if (finChannel != null) Tcf.getChannelManager().closeChannel(finChannel);
}
- }, delegate);
+ }, new CallbackInvocationDelegate());
if (streamsListener != null) {
// Dispose the streams listener
@@ -180,7 +171,7 @@ public class ProcessLauncher extends PlatformObject implements IProcessLauncher
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.processes.core.interfaces.launcher.IProcessLauncher#terminate()
+ * @see org.eclipse.tcf.te.tcf.processes.core.interfaces.launcher.IProcessLauncher#terminate()
*/
@Override
public void terminate() {
@@ -306,7 +297,7 @@ public class ProcessLauncher extends PlatformObject implements IProcessLauncher
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.processes.core.interfaces.launcher.IProcessLauncher#launch(org.eclipse.tm.tcf.protocol.IPeer, org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer, org.eclipse.tm.te.runtime.interfaces.callback.ICallback)
+ * @see org.eclipse.tcf.te.tcf.processes.core.interfaces.launcher.IProcessLauncher#launch(org.eclipse.tcf.protocol.IPeer, org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer, org.eclipse.tcf.te.runtime.interfaces.callback.ICallback)
*/
@Override
public void launch(final IPeer peer, final IPropertiesContainer properties, final ICallback callback) {
@@ -317,7 +308,7 @@ public class ProcessLauncher extends PlatformObject implements IProcessLauncher
if (callback == null) {
this.callback = new Callback() {
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.callback.Callback#internalDone(java.lang.Object, org.eclipse.core.runtime.IStatus)
+ * @see org.eclipse.tcf.te.runtime.callback.Callback#internalDone(java.lang.Object, org.eclipse.core.runtime.IStatus)
*/
@Override
public void internalDone(Object caller, IStatus status) {
@@ -331,10 +322,10 @@ public class ProcessLauncher extends PlatformObject implements IProcessLauncher
// Remember the process properties
this.properties = properties;
- // Open a channel to the given peer
- Tcf.getChannelManager().openChannel(peer, new IChannelManager.DoneOpenChannel() {
+ // Open a dedicated channel to the given peer
+ Tcf.getChannelManager().openChannel(peer, true, new IChannelManager.DoneOpenChannel() {
/* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.core.interfaces.IChannelManager.DoneOpenChannel#doneOpenChannel(java.lang.Throwable, org.eclipse.tm.tcf.protocol.IChannel)
+ * @see org.eclipse.tcf.te.tcf.core.interfaces.IChannelManager.DoneOpenChannel#doneOpenChannel(java.lang.Throwable, org.eclipse.tcf.protocol.IChannel)
*/
@Override
public void doneOpenChannel(Throwable error, IChannel channel) {
@@ -345,13 +336,13 @@ public class ProcessLauncher extends PlatformObject implements IProcessLauncher
// is closed from the remote side.
channel.addChannelListener(new IChannelListener() {
/* (non-Javadoc)
- * @see org.eclipse.tm.tcf.protocol.IChannel.IChannelListener#onChannelOpened()
+ * @see org.eclipse.tcf.protocol.IChannel.IChannelListener#onChannelOpened()
*/
@Override
public void onChannelOpened() {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.tcf.protocol.IChannel.IChannelListener#onChannelClosed(java.lang.Throwable)
+ * @see org.eclipse.tcf.protocol.IChannel.IChannelListener#onChannelClosed(java.lang.Throwable)
*/
@Override
public void onChannelClosed(Throwable error) {
@@ -363,7 +354,7 @@ public class ProcessLauncher extends PlatformObject implements IProcessLauncher
}
}
/* (non-Javadoc)
- * @see org.eclipse.tm.tcf.protocol.IChannel.IChannelListener#congestionLevel(int)
+ * @see org.eclipse.tcf.protocol.IChannel.IChannelListener#congestionLevel(int)
*/
@Override
public void congestionLevel(int level) {
@@ -477,7 +468,7 @@ public class ProcessLauncher extends PlatformObject implements IProcessLauncher
/**
* Initialize and attach the output console and/or the output file.
* <p>
- * Called from {@link IStreams#subscribe(String, org.eclipse.tm.tcf.services.IStreams.StreamsListener, org.eclipse.tm.tcf.services.IStreams.DoneSubscribe)}.
+ * Called from {@link IStreams#subscribe(String, org.eclipse.tcf.services.IStreams.StreamsListener, org.eclipse.tcf.services.IStreams.DoneSubscribe)}.
*/
protected void onSubscribeStreamsDone() {
// Get the process properties container
@@ -506,8 +497,8 @@ public class ProcessLauncher extends PlatformObject implements IProcessLauncher
if (terminal != null) {
// Create the terminal streams settings
PropertiesContainer props = new PropertiesContainer();
- props.setProperty(ITerminalsConnectorConstants.PROP_CONNECTOR_TYPE_ID, "org.eclipse.tm.te.ui.terminals.type.streams"); //$NON-NLS-1$
- props.setProperty(ITerminalsConnectorConstants.PROP_ID, "org.eclipse.tm.te.ui.terminals.TerminalsView"); //$NON-NLS-1$
+ props.setProperty(ITerminalsConnectorConstants.PROP_CONNECTOR_TYPE_ID, "org.eclipse.tcf.te.ui.terminals.type.streams"); //$NON-NLS-1$
+ props.setProperty(ITerminalsConnectorConstants.PROP_ID, "org.eclipse.tcf.te.ui.terminals.TerminalsView"); //$NON-NLS-1$
// Set the terminal tab title
String terminalTitle = getTerminalTitle();
if (terminalTitle != null) {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.core/src/org/eclipse/tm/te/tcf/processes/core/launcher/ProcessLauncherEventListener.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/launcher/ProcessLauncherEventListener.java
index 504169c51..58a76aea3 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.core/src/org/eclipse/tm/te/tcf/processes/core/launcher/ProcessLauncherEventListener.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/launcher/ProcessLauncherEventListener.java
@@ -7,14 +7,14 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.processes.core.launcher;
+package org.eclipse.tcf.te.tcf.processes.core.launcher;
import java.util.EventObject;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.PlatformObject;
-import org.eclipse.tm.te.runtime.events.DisposedEvent;
-import org.eclipse.tm.te.runtime.interfaces.events.IEventListener;
+import org.eclipse.tcf.te.runtime.events.DisposedEvent;
+import org.eclipse.tcf.te.runtime.interfaces.events.IEventListener;
/**
* Remote process launcher default notification listener implementation.
@@ -38,7 +38,7 @@ public class ProcessLauncherEventListener extends PlatformObject implements IEve
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.events.IEventListener#eventFired(java.util.EventObject)
+ * @see org.eclipse.tcf.te.runtime.interfaces.events.IEventListener#eventFired(java.util.EventObject)
*/
@Override
public void eventFired(EventObject event) {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.core/src/org/eclipse/tm/te/tcf/processes/core/launcher/ProcessProcessesListener.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/launcher/ProcessProcessesListener.java
index ca25fed48..6251db486 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.core/src/org/eclipse/tm/te/tcf/processes/core/launcher/ProcessProcessesListener.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/launcher/ProcessProcessesListener.java
@@ -7,18 +7,18 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.processes.core.launcher;
+package org.eclipse.tcf.te.tcf.processes.core.launcher;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
-import org.eclipse.tm.tcf.services.IProcesses;
-import org.eclipse.tm.tcf.services.IProcesses.ProcessesListener;
-import org.eclipse.tm.te.runtime.events.EventManager;
-import org.eclipse.tm.te.runtime.interfaces.callback.ICallback;
-import org.eclipse.tm.te.tcf.processes.core.activator.CoreBundleActivator;
-import org.eclipse.tm.te.tcf.processes.core.interfaces.launcher.IProcessContextAwareListener;
-import org.eclipse.tm.te.tcf.processes.core.internal.tracing.ITraceIds;
+import org.eclipse.tcf.services.IProcesses;
+import org.eclipse.tcf.services.IProcesses.ProcessesListener;
+import org.eclipse.tcf.te.tcf.processes.core.activator.CoreBundleActivator;
+import org.eclipse.tcf.te.tcf.processes.core.interfaces.launcher.IProcessContextAwareListener;
+import org.eclipse.tcf.te.tcf.processes.core.interfaces.tracing.ITraceIds;
+import org.eclipse.tcf.te.runtime.events.EventManager;
+import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback;
/**
* Remote process processes listener implementation.
@@ -69,7 +69,7 @@ public class ProcessProcessesListener implements ProcessesListener, IProcessCont
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.processes.core.interfaces.launcher.IProcessContextAwareListener#setProcessContext(org.eclipse.tm.tcf.services.IProcesses.ProcessContext)
+ * @see org.eclipse.tcf.te.tcf.processes.core.interfaces.launcher.IProcessContextAwareListener#setProcessContext(org.eclipse.tcf.services.IProcesses.ProcessContext)
*/
@Override
public void setProcessContext(IProcesses.ProcessContext context) {
@@ -84,7 +84,7 @@ public class ProcessProcessesListener implements ProcessesListener, IProcessCont
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.processes.core.interfaces.launcher.IProcessContextAwareListener#getProcessContext()
+ * @see org.eclipse.tcf.te.tcf.processes.core.interfaces.launcher.IProcessContextAwareListener#getProcessContext()
*/
@Override
public IProcesses.ProcessContext getProcessContext() {
@@ -92,7 +92,7 @@ public class ProcessProcessesListener implements ProcessesListener, IProcessCont
}
/* (non-Javadoc)
- * @see org.eclipse.tm.tcf.services.IProcesses.ProcessesListener#exited(java.lang.String, int)
+ * @see org.eclipse.tcf.services.IProcesses.ProcessesListener#exited(java.lang.String, int)
*/
@Override
public void exited(String processId, int exitCode) {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.core/src/org/eclipse/tm/te/tcf/processes/core/launcher/ProcessStateChangeEvent.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/launcher/ProcessStateChangeEvent.java
index 757afc72e..81c41402d 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.core/src/org/eclipse/tm/te/tcf/processes/core/launcher/ProcessStateChangeEvent.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/launcher/ProcessStateChangeEvent.java
@@ -7,9 +7,9 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.processes.core.launcher;
+package org.eclipse.tcf.te.tcf.processes.core.launcher;
-import org.eclipse.tm.te.runtime.events.ChangeEvent;
+import org.eclipse.tcf.te.runtime.events.ChangeEvent;
/**
* Remote process state change event implementation.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.core/src/org/eclipse/tm/te/tcf/processes/core/launcher/ProcessStreamsListener.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/launcher/ProcessStreamsListener.java
index fc99fad84..5506259e2 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.core/src/org/eclipse/tm/te/tcf/processes/core/launcher/ProcessStreamsListener.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/launcher/ProcessStreamsListener.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.processes.core.launcher;
+package org.eclipse.tcf.te.tcf.processes.core.launcher;
import java.io.IOException;
import java.io.Writer;
@@ -21,21 +21,22 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
import org.eclipse.osgi.util.NLS;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.tcf.services.IProcesses;
-import org.eclipse.tm.tcf.services.IStreams;
-import org.eclipse.tm.tcf.util.TCFTask;
-import org.eclipse.tm.te.core.async.AsyncCallbackCollector;
-import org.eclipse.tm.te.runtime.callback.Callback;
-import org.eclipse.tm.te.runtime.interfaces.callback.ICallback;
-import org.eclipse.tm.te.tcf.core.streams.StreamsDataProvider;
-import org.eclipse.tm.te.tcf.core.streams.StreamsDataReceiver;
-import org.eclipse.tm.te.tcf.core.utils.ExceptionUtils;
-import org.eclipse.tm.te.tcf.processes.core.activator.CoreBundleActivator;
-import org.eclipse.tm.te.tcf.processes.core.interfaces.launcher.IProcessContextAwareListener;
-import org.eclipse.tm.te.tcf.processes.core.internal.tracing.ITraceIds;
-import org.eclipse.tm.te.tcf.processes.core.nls.Messages;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.services.IProcesses;
+import org.eclipse.tcf.services.IStreams;
+import org.eclipse.tcf.te.core.async.AsyncCallbackCollector;
+import org.eclipse.tcf.te.runtime.callback.Callback;
+import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback;
+import org.eclipse.tcf.te.tcf.core.async.CallbackInvocationDelegate;
+import org.eclipse.tcf.te.tcf.core.streams.StreamsDataProvider;
+import org.eclipse.tcf.te.tcf.core.streams.StreamsDataReceiver;
+import org.eclipse.tcf.te.tcf.core.util.ExceptionUtils;
+import org.eclipse.tcf.te.tcf.processes.core.activator.CoreBundleActivator;
+import org.eclipse.tcf.te.tcf.processes.core.interfaces.launcher.IProcessContextAwareListener;
+import org.eclipse.tcf.te.tcf.processes.core.interfaces.tracing.ITraceIds;
+import org.eclipse.tcf.te.tcf.processes.core.nls.Messages;
+import org.eclipse.tcf.util.TCFTask;
/**
* Remote process streams listener implementation.
@@ -352,7 +353,7 @@ public class ProcessStreamsListener implements IStreams.StreamsListener, IProces
public void run() {
service.read(streamId, size, new IStreams.DoneRead() {
/* (non-Javadoc)
- * @see org.eclipse.tm.tcf.services.IStreams.DoneRead#doneRead(org.eclipse.tm.tcf.protocol.IToken, java.lang.Exception, int, byte[], boolean)
+ * @see org.eclipse.tcf.services.IStreams.DoneRead#doneRead(org.eclipse.tcf.protocol.IToken, java.lang.Exception, int, byte[], boolean)
*/
@Override
public void doneRead(IToken token, Exception error, int lostSize, byte[] data, boolean eos) {
@@ -591,7 +592,7 @@ public class ProcessStreamsListener implements IStreams.StreamsListener, IProces
public void run() {
service.write(streamId, data, 0, size, new IStreams.DoneWrite() {
/* (non-Javadoc)
- * @see org.eclipse.tm.tcf.services.IStreams.DoneWrite#doneWrite(org.eclipse.tm.tcf.protocol.IToken, java.lang.Exception)
+ * @see org.eclipse.tcf.services.IStreams.DoneWrite#doneWrite(org.eclipse.tcf.protocol.IToken, java.lang.Exception)
*/
@Override
public void doneWrite(IToken token, Exception error) {
@@ -646,20 +647,10 @@ public class ProcessStreamsListener implements IStreams.StreamsListener, IProces
dataReceiver.clear();
}
- // Create the callback invocation delegate
- AsyncCallbackCollector.ICallbackInvocationDelegate delegate = new AsyncCallbackCollector.ICallbackInvocationDelegate() {
- @Override
- public void invoke(Runnable runnable) {
- Assert.isNotNull(runnable);
- if (Protocol.isDispatchThread()) runnable.run();
- else Protocol.invokeLater(runnable);
- }
- };
-
// Create a new collector to catch all runnable stop callback's
AsyncCallbackCollector collector = new AsyncCallbackCollector(new Callback() {
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.callback.Callback#internalDone(java.lang.Object, org.eclipse.core.runtime.IStatus)
+ * @see org.eclipse.tcf.te.runtime.callback.Callback#internalDone(java.lang.Object, org.eclipse.core.runtime.IStatus)
*/
@Override
protected void internalDone(final Object caller, final IStatus status) {
@@ -677,7 +668,7 @@ public class ProcessStreamsListener implements IStreams.StreamsListener, IProces
}
});
}
- }, delegate);
+ }, new CallbackInvocationDelegate());
// Loop all runnable's and force them to stop
synchronized (runnables) {
@@ -736,7 +727,7 @@ public class ProcessStreamsListener implements IStreams.StreamsListener, IProces
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.processes.core.interfaces.launcher.IProcessContextAwareListener#setProcessContext(org.eclipse.tm.tcf.services.IProcesses.ProcessContext)
+ * @see org.eclipse.tcf.te.tcf.processes.core.interfaces.launcher.IProcessContextAwareListener#setProcessContext(org.eclipse.tcf.services.IProcesses.ProcessContext)
*/
@Override
public void setProcessContext(IProcesses.ProcessContext context) {
@@ -765,7 +756,7 @@ public class ProcessStreamsListener implements IStreams.StreamsListener, IProces
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.processes.core.interfaces.launcher.IProcessContextAwareListener#getProcessContext()
+ * @see org.eclipse.tcf.te.tcf.processes.core.interfaces.launcher.IProcessContextAwareListener#getProcessContext()
*/
@Override
public IProcesses.ProcessContext getProcessContext() {
@@ -773,7 +764,7 @@ public class ProcessStreamsListener implements IStreams.StreamsListener, IProces
}
/* (non-Javadoc)
- * @see org.eclipse.tm.tcf.services.IStreams.StreamsListener#created(java.lang.String, java.lang.String, java.lang.String)
+ * @see org.eclipse.tcf.services.IStreams.StreamsListener#created(java.lang.String, java.lang.String, java.lang.String)
*/
@Override
public void created(String streamType, String streamId, String contextId) {
@@ -844,7 +835,7 @@ public class ProcessStreamsListener implements IStreams.StreamsListener, IProces
}
/* (non-Javadoc)
- * @see org.eclipse.tm.tcf.services.IStreams.StreamsListener#disposed(java.lang.String, java.lang.String)
+ * @see org.eclipse.tcf.services.IStreams.StreamsListener#disposed(java.lang.String, java.lang.String)
*/
@Override
public void disposed(String streamType, String streamId) {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.core/src/org/eclipse/tm/te/tcf/processes/core/nls/Messages.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/nls/Messages.java
index b1b2ab4ad..b29a55e26 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.core/src/org/eclipse/tm/te/tcf/processes/core/nls/Messages.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/nls/Messages.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.processes.core.nls;
+package org.eclipse.tcf.te.tcf.processes.core.nls;
import org.eclipse.osgi.util.NLS;
@@ -17,7 +17,7 @@ import org.eclipse.osgi.util.NLS;
public class Messages extends NLS {
// The plug-in resource bundle name
- private static final String BUNDLE_NAME = "org.eclipse.tm.te.tcf.processes.core.nls.Messages"; //$NON-NLS-1$
+ private static final String BUNDLE_NAME = "org.eclipse.tcf.te.tcf.processes.core.nls.Messages"; //$NON-NLS-1$
/**
* Static constructor.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.core/src/org/eclipse/tm/te/tcf/processes/core/nls/Messages.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/nls/Messages.properties
index 8153df0ae..a9fb9ba23 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.core/src/org/eclipse/tm/te/tcf/processes/core/nls/Messages.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/nls/Messages.properties
@@ -1,5 +1,5 @@
#
-# org.eclipse.tm.te.tcf.processes.core
+# org.eclipse.tcf.te.tcf.processes.core
# Externalized Strings.
#
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.forms/.classpath b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/.classpath
index 8a8f1668c..8a8f1668c 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.forms/.classpath
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/.classpath
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/.options b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/.options
new file mode 100644
index 000000000..3ced5ff13
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/.options
@@ -0,0 +1 @@
+org.eclipse.tcf.te.tcf.processes.ui/debugmode = 0
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/.project b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/.project
new file mode 100644
index 000000000..f1a0d1ea0
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.tcf.te.tcf.processes.ui</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/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/.settings/org.eclipse.jdt.core.prefs b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/.settings/org.eclipse.jdt.core.prefs
index 7bca72a82..7bca72a82 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/.settings/org.eclipse.jdt.core.prefs
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/.settings/org.eclipse.jdt.core.prefs
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/.settings/org.eclipse.jdt.ui.prefs b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/.settings/org.eclipse.jdt.ui.prefs
index 445e149dd..445e149dd 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/.settings/org.eclipse.jdt.ui.prefs
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/.settings/org.eclipse.jdt.ui.prefs
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..39a394965
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/META-INF/MANIFEST.MF
@@ -0,0 +1,30 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.tcf.te.tcf.processes.ui;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipse.tcf.te.tcf.processes.ui.activator.UIPlugin
+Bundle-Vendor: %providerName
+Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
+ org.eclipse.ui;bundle-version="3.7.0",
+ org.eclipse.ui.forms;bundle-version="3.5.100",
+ org.eclipse.tcf.core;bundle-version="1.0.0",
+ org.eclipse.tcf.te.runtime;bundle-version="1.0.0",
+ org.eclipse.tcf.te.runtime.statushandler;bundle-version="1.0.0",
+ org.eclipse.tcf.te.runtime.services;bundle-version="1.0.0",
+ org.eclipse.tcf.te.core;bundle-version="1.0.0",
+ org.eclipse.tcf.te.ui.forms;bundle-version="1.0.0",
+ org.eclipse.tcf.te.ui;bundle-version="1.0.0",
+ org.eclipse.tcf.te.ui.swt;bundle-version="1.0.0",
+ org.eclipse.tcf.te.ui.views;bundle-version="1.0.0",
+ org.eclipse.tcf.te.tcf.core;bundle-version="1.0.0",
+ org.eclipse.tcf.te.tcf.locator;bundle-version="1.0.0",
+ org.eclipse.tcf.te.tcf.filesystem;bundle-version="1.0.0",
+ org.eclipse.tcf.te.tcf.processes.core;bundle-version="1.0.0",
+ org.eclipse.tcf.te.tcf.ui;bundle-version="1.0.0",
+ org.eclipse.ui.navigator,
+ org.eclipse.core.expressions,
+ org.eclipse.ui.views.properties.tabbed;bundle-version="3.5.200"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
+Bundle-Localization: plugin
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/build.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/build.properties
new file mode 100644
index 000000000..1cb217caf
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/build.properties
@@ -0,0 +1,7 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.properties,\
+ plugin.xml,\
+ icons/
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/icons/obj16/process.gif b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/icons/obj16/process.gif
index 8f1fc1ac9..8f1fc1ac9 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/icons/obj16/process.gif
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/icons/obj16/process.gif
Binary files differ
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/icons/obj16/process_root.png b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/icons/obj16/process_root.png
new file mode 100644
index 000000000..8e71a12b0
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/icons/obj16/process_root.png
Binary files differ
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/icons/obj16/refresh.gif b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/icons/obj16/refresh.gif
new file mode 100644
index 000000000..3ca04d06f
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/icons/obj16/refresh.gif
Binary files differ
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/icons/obj16/refresh_interval.png b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/icons/obj16/refresh_interval.png
new file mode 100644
index 000000000..c2c452a7d
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/icons/obj16/refresh_interval.png
Binary files differ
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/icons/obj16/run_refresh.png b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/icons/obj16/run_refresh.png
new file mode 100644
index 000000000..7029542d7
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/icons/obj16/run_refresh.png
Binary files differ
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/icons/obj16/stop_refresh.gif b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/icons/obj16/stop_refresh.gif
new file mode 100644
index 000000000..dc47edf06
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/icons/obj16/stop_refresh.gif
Binary files differ
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/plugin.properties
new file mode 100644
index 000000000..f91b358d8
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/plugin.properties
@@ -0,0 +1,42 @@
+##################################################################################
+# Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+# This program and the accompanying materials are made available under the terms
+# of the Eclipse Public License v1.0 which accompanies this distribution, and is
+# available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Wind River Systems - initial API and implementation
+##################################################################################
+
+pluginName = Target Explorer, TCF Processes Extensions UI
+providerName = Eclipse.org
+
+# ***** Editor Pages *****
+
+ProcessExplorerEditorPage.name=Processes
+
+# ***** Command Contributions *****
+
+Processes.command.launch.name=Run Remote Process Command
+Processes.command.launch.label=&Run Remote Process...
+Processes.command.launch.tooltip=Execute the specified process image on the selected peer.
+
+column.name.name = Name
+column.name.pid = PID
+column.name.ppid = PPID
+column.name.state = State
+column.name.user = User
+navigatorContent.name = Process Monitor
+command.refresh.label = Refresh Process List
+command.refresh.tooltip = Refresh Process List
+command.refresh.name = Refresh Process List
+command.startPolling.label = Start Polling
+command.startPolling.tooltip = Start Polling
+command.stopPolling.label = Stop Polling
+command.stopPolling.tooltip = Stop Polling
+command.configure.label = Config Refresh Interval
+command.configure.tooltip = Config Refresh Interval
+command.configure.name = Config Refresh Interval
+command.startPolling.label.1 = Start Polling
+command.stopPolling.label.1 = Stop Polling
+page.process.name = Process Monitor \ No newline at end of file
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/plugin.xml b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/plugin.xml
new file mode 100644
index 000000000..f4e6cfbc8
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/plugin.xml
@@ -0,0 +1,422 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+
+<!-- Target Explorer Details Editor page contributions -->
+ <extension point="org.eclipse.tcf.te.ui.views.editorPages">
+ <editorPage
+ class="org.eclipse.tcf.te.ui.views.editor.pages.TreeViewerExplorerEditorPage:org.eclipse.tcf.te.ui.controls.viewer.processes"
+ name="%ProcessExplorerEditorPage.name"
+ id="org.eclipse.tcf.te.tcf.processes.ui.ProcessExplorerEditorPage">
+ </editorPage>
+ </extension>
+
+<!-- Target Explorer Details Editor page binding contributions -->
+ <extension point="org.eclipse.tcf.te.ui.views.editorPageBindings">
+ <editorPageBinding
+ id="org.eclipse.tcf.te.tcf.processes.ui.binding.ProcessExplorerEditorPage"
+ pageId="org.eclipse.tcf.te.tcf.processes.ui.ProcessExplorerEditorPage">
+ <enablement>
+ <with variable="activeEditorInput">
+ <and>
+ <adapt type="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel">
+ <test property="org.eclipse.tcf.te.tcf.locator.hasRemoteService" value="Processes"/>
+ </adapt>
+ </and>
+ </with>
+ </enablement>
+ </editorPageBinding>
+ </extension>
+
+<!-- Processes menu contributions -->
+ <extension point="org.eclipse.ui.menus">
+ <menuContribution locationURI="popup:org.eclipse.tcf.te.ui.views.TargetExplorer#Popup?after=group.launch">
+ <command
+ commandId="org.eclipse.tcf.te.tcf.processes.ui.command.launch"
+ helpContextId="org.eclipse.tcf.te.tcf.processes.ui.command_Launch"
+ icon="platform:/plugin/org.eclipse.debug.ui/icons/full/obj16/lrun_obj.gif"
+ id="org.eclipse.tcf.te.tcf.processes.ui.commands.launch"
+ label="%Processes.command.launch.label"
+ style="push"
+ tooltip="%Processes.command.launch.tooltip">
+ <visibleWhen checkEnabled="false">
+ <and>
+ <with variable="selection">
+ <count value="1"/>
+ <iterate operator="and" ifEmpty="false">
+ <adapt type="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel">
+ <test
+ property="org.eclipse.tcf.te.tcf.locator.hasRemoteService"
+ value="Processes">
+ </test>
+ </adapt>
+ </iterate>
+ </with>
+ </and>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ <menuContribution
+ locationURI="toolbar:org.eclipse.tcf.te.ui.controls.menu.processes?after=additions">
+ <command
+ commandId="org.eclipse.tcf.te.tcf.processes.ui.command.startPolling"
+ icon="icons/obj16/run_refresh.png"
+ label="%command.startPolling.label"
+ style="push"
+ tooltip="%command.startPolling.tooltip">
+ </command>
+ <command
+ commandId="org.eclipse.tcf.te.tcf.processes.ui.command.stopPolling"
+ icon="icons/obj16/stop_refresh.gif"
+ label="%command.stopPolling.label"
+ style="push"
+ tooltip="%command.stopPolling.tooltip">
+ </command>
+ <command
+ commandId="org.eclipse.tcf.te.tcf.processes.ui.command.refresh"
+ icon="icons/obj16/refresh.gif"
+ label="%command.refresh.label"
+ style="push"
+ tooltip="%command.refresh.tooltip">
+ </command>
+ <command
+ commandId="org.eclipse.tcf.te.tcf.processes.ui.command.refreshInterval"
+ icon="icons/obj16/refresh_interval.png"
+ id="org.eclipse.tcf.te.tcf.processes.ui.menu.refreshInterval"
+ label="%command.configure.label"
+ style="pulldown"
+ tooltip="%command.configure.tooltip">
+ </command>
+ <separator
+ name="refreshing_group"
+ visible="true">
+ </separator>
+ </menuContribution>
+ <menuContribution
+ locationURI="menu:org.eclipse.tcf.te.tcf.processes.ui.menu.refreshInterval">
+ <dynamic
+ class="org.eclipse.tcf.te.tcf.processes.ui.internal.handler.ConfigIntervalDynamicContribution"
+ id="org.eclipse.tcf.te.tcf.processes.ui.menu.refreshIntervalDynamic">
+ </dynamic>
+ </menuContribution>
+ </extension>
+
+<!-- Processes command contributions -->
+ <extension point="org.eclipse.ui.commands">
+ <command
+ categoryId="org.eclipse.tcf.te.ui.commands.category"
+ helpContextId="org.eclipse.tcf.te.tcf.processes.ui.command_Launch"
+ id="org.eclipse.tcf.te.tcf.processes.ui.command.launch"
+ name="%Processes.command.launch.name">
+ </command>
+ <command
+ categoryId="org.eclipse.tcf.te.ui.commands.category"
+ helpContextId="org.eclipse.tcf.te.tcf.processes.ui.command_Refresh"
+ id="org.eclipse.tcf.te.tcf.processes.ui.command.refresh"
+ name="%command.refresh.name">
+ </command>
+ <command
+ categoryId="org.eclipse.tcf.te.ui.commands.category"
+ helpContextId="org.eclipse.tcf.te.tcf.processes.ui.command_RefreshInterval"
+ id="org.eclipse.tcf.te.tcf.processes.ui.command.refreshInterval"
+ name="%command.configure.name">
+ </command>
+ <command
+ categoryId="org.eclipse.tcf.te.ui.commands.category"
+ helpContextId="org.eclipse.tcf.te.tcf.processes.ui.command_StartPolling"
+ id="org.eclipse.tcf.te.tcf.processes.ui.command.startPolling"
+ name="%command.startPolling.label.1">
+ </command>
+ <command
+ categoryId="org.eclipse.tcf.te.ui.commands.category"
+ helpContextId="org.eclipse.tcf.te.tcf.processes.ui.command_StopPolling"
+ id="org.eclipse.tcf.te.tcf.processes.ui.command.stopPolling"
+ name="%command.stopPolling.label.1">
+ </command>
+ </extension>
+
+<!-- Processes handler contributions -->
+ <extension point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.tcf.te.tcf.processes.ui.internal.handler.LaunchProcessesCommandHandler"
+ commandId="org.eclipse.tcf.te.tcf.processes.ui.command.launch">
+ </handler>
+ <handler
+ class="org.eclipse.tcf.te.tcf.processes.ui.internal.handler.RefreshProcessListHandler"
+ commandId="org.eclipse.tcf.te.tcf.processes.ui.command.refresh">
+ </handler>
+ <handler
+ class="org.eclipse.tcf.te.tcf.processes.ui.internal.handler.ConfigRefreshIntervalHandler"
+ commandId="org.eclipse.tcf.te.tcf.processes.ui.command.refreshInterval">
+ <enabledWhen>
+ <with
+ variable="activeEditorInput">
+ <not>
+ <test
+ property="org.eclipse.tcf.te.tcf.processes.ui.editorInput.isRefreshStopped">
+ </test>
+ </not>
+ </with>
+ </enabledWhen>
+ </handler>
+ <handler
+ class="org.eclipse.tcf.te.tcf.processes.ui.internal.handler.StartPollingHandler"
+ commandId="org.eclipse.tcf.te.tcf.processes.ui.command.startPolling">
+ <enabledWhen>
+ <with
+ variable="activeEditorInput">
+ <test
+ property="org.eclipse.tcf.te.tcf.processes.ui.editorInput.isRefreshStopped">
+ </test>
+ </with>
+ </enabledWhen>
+ </handler>
+ <handler
+ class="org.eclipse.tcf.te.tcf.processes.ui.internal.handler.StopPollingHandler"
+ commandId="org.eclipse.tcf.te.tcf.processes.ui.command.stopPolling">
+ <enabledWhen>
+ <with
+ variable="activeEditorInput">
+ <not>
+ <test
+ property="org.eclipse.tcf.te.tcf.processes.ui.editorInput.isRefreshStopped">
+ </test>
+ </not>
+ </with>
+ </enabledWhen>
+ </handler>
+ </extension>
+ <extension
+ point="org.eclipse.tcf.te.ui.viewers">
+ <viewer
+ autoExpandLevel="0"
+ contentProvider="org.eclipse.tcf.te.tcf.processes.ui.controls.ProcessTreeContentProvider"
+ helpId="org.eclipse.tcf.te.tcf.processes.ui.ProcessExplorerEditorPage"
+ id="org.eclipse.tcf.te.ui.controls.viewer.processes"
+ menuId="org.eclipse.tcf.te.ui.controls.menu.processes"
+ persistent="true">
+ </viewer>
+ <columnContribution
+ viewerId="org.eclipse.tcf.te.ui.controls.viewer.processes">
+ <column
+ comparator="org.eclipse.tcf.te.tcf.processes.ui.internal.columns.ProcessComparator"
+ id="name"
+ labelProvider="org.eclipse.tcf.te.tcf.processes.ui.internal.columns.ProcessLabelProvider"
+ moveable="true"
+ name="%column.name.name"
+ resizable="true"
+ visible="true"
+ width="250">
+ </column>
+ <column
+ comparator="org.eclipse.tcf.te.tcf.processes.ui.internal.columns.PIDComparator"
+ id="pid"
+ labelProvider="org.eclipse.tcf.te.tcf.processes.ui.internal.columns.PIDLabelProvider"
+ moveable="true"
+ name="%column.name.pid"
+ resizable="true"
+ style="SWT.RIGHT"
+ visible="true"
+ width="50">
+ </column>
+ <column
+ comparator="org.eclipse.tcf.te.tcf.processes.ui.internal.columns.PPIDComparator"
+ id="ppid"
+ labelProvider="org.eclipse.tcf.te.tcf.processes.ui.internal.columns.PPIDLabelProvider"
+ moveable="true"
+ name="%column.name.ppid"
+ resizable="true"
+ style="SWT.RIGHT"
+ visible="true"
+ width="50">
+ </column>
+ <column
+ comparator="org.eclipse.tcf.te.tcf.processes.ui.internal.columns.StateComparator"
+ id="state"
+ labelProvider="org.eclipse.tcf.te.tcf.processes.ui.internal.columns.StateLabelProvider"
+ moveable="true"
+ name="%column.name.state"
+ resizable="true"
+ style="SWT.RIGHT"
+ visible="true"
+ width="50">
+ </column>
+ <column
+ comparator="org.eclipse.tcf.te.tcf.processes.ui.internal.columns.UserComparator"
+ id="user"
+ labelProvider="org.eclipse.tcf.te.tcf.processes.ui.internal.columns.UserLabelProvider"
+ moveable="true"
+ name="%column.name.user"
+ resizable="true"
+ style="SWT.RIGHT"
+ visible="true"
+ width="100">
+ </column>
+ </columnContribution>
+ <filterContribution
+ viewerId="org.eclipse.tcf.te.ui.controls.viewer.processes">
+ <filter
+ class="org.eclipse.tcf.te.tcf.processes.ui.internal.filters.SingleThreadFilter"
+ description="For single thread processes the thread child is hidden. "
+ enabled="true"
+ id="org.eclipse.tcf.te.tcf.processes.ui.navigator.filter.singleThread"
+ name="Single Thread Filter">
+ </filter>
+ </filterContribution>
+ </extension>
+ <extension
+ point="org.eclipse.ui.navigator.navigatorContent">
+ <navigatorContent
+ activeByDefault="false"
+ contentProvider="org.eclipse.tcf.te.tcf.processes.ui.controls.ProcessNavigatorContentProvider"
+ icon="icons/obj16/process.gif"
+ id="org.eclipse.tcf.te.tcf.processes.ui.navigator.content"
+ labelProvider="org.eclipse.tcf.te.tcf.processes.ui.internal.columns.ProcessLabelProvider"
+ name="%navigatorContent.name"
+ priority="normal">
+ <triggerPoints>
+ <instanceof
+ value="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel">
+ </instanceof>
+ <test
+ property="org.eclipse.tcf.te.tcf.locator.hasRemoteService"
+ value="SysMonitor">
+ </test>
+ </triggerPoints>
+ <possibleChildren>
+ <instanceof
+ value="org.eclipse.tcf.te.tcf.processes.ui.model.ProcessTreeNode">
+ </instanceof>
+ </possibleChildren>
+ <commonSorter
+ class="org.eclipse.tcf.te.tcf.processes.ui.controls.ProcessViewerSorter">
+ </commonSorter>
+ </navigatorContent>
+ <commonFilter
+ activeByDefault="true"
+ class="org.eclipse.tcf.te.tcf.processes.ui.internal.filters.SingleThreadFilter"
+ id="org.eclipse.tcf.te.tcf.processes.ui.navigator.filter.singleThread"
+ name="Single Thread Filter"
+ visibleInUI="false">
+ </commonFilter>
+ </extension>
+ <extension
+ point="org.eclipse.ui.navigator.viewer">
+ <viewerContentBinding
+ viewerId="org.eclipse.tcf.te.ui.views.TargetExplorer">
+ <includes>
+ <contentExtension
+ isRoot="false"
+ pattern="org.eclipse.tcf.te.tcf.processes.ui.navigator.*">
+ </contentExtension>
+ </includes>
+ </viewerContentBinding>
+ </extension>
+ <extension point="org.eclipse.core.runtime.preferences">
+ <initializer class="org.eclipse.tcf.te.tcf.processes.ui.internal.preferences.PreferencesInitializer"/>
+ </extension>
+ <extension
+ point="org.eclipse.core.expressions.propertyTesters">
+ <propertyTester
+ class="org.eclipse.tcf.te.tcf.processes.ui.internal.testers.EditorInputPropertyTester"
+ id="org.eclipse.tcf.te.tcf.processes.ui.editorInput"
+ namespace="org.eclipse.tcf.te.tcf.processes.ui.editorInput"
+ properties="isRefreshStopped"
+ type="org.eclipse.ui.IEditorInput">
+ </propertyTester>
+ </extension>
+ <extension
+ point="org.eclipse.ui.preferencePages">
+ <page
+ category="org.eclipse.tcf.te.ui.preferences.general"
+ class="org.eclipse.tcf.te.tcf.processes.ui.internal.preferences.ProcessPreferencePage"
+ id="org.eclipse.tcf.te.ui.preferences.tcf.process"
+ name="%page.process.name">
+ </page>
+ </extension>
+ <extension
+ point="org.eclipse.ui.views.properties.tabbed.propertyTabs">
+ <propertyTabs
+ contributorId="org.eclipse.tcf.te.ui">
+ <propertyTab
+ category="target_explorer"
+ id="org.eclipse.tcf.te.tcf.processes.ui.propertytab.general"
+ label="General">
+ </propertyTab>
+ <propertyTab
+ afterTab="org.eclipse.tcf.te.tcf.processes.ui.propertytab.general"
+ category="target_explorer"
+ id="org.eclipse.tcf.te.tcf.processes.ui.propertytab.context"
+ label="Context">
+ </propertyTab>
+ <propertyTab
+ afterTab="org.eclipse.tcf.te.tcf.processes.ui.propertytab.context"
+ category="target_explorer"
+ id="org.eclipse.tcf.te.tcf.processes.ui.propertytab.advanced"
+ label="Advanced">
+ </propertyTab>
+ </propertyTabs>
+ </extension>
+ <extension
+ point="org.eclipse.ui.views.properties.tabbed.propertySections">
+ <propertySections
+ contributorId="org.eclipse.tcf.te.ui">
+ <propertySection
+ class="org.eclipse.tcf.te.tcf.processes.ui.internal.tabbed.BasicInformationSection"
+ enablesFor="1"
+ filter="org.eclipse.tcf.te.tcf.processes.ui.internal.tabbed.ProcessFilter"
+ id="org.eclipse.tcf.te.tcf.processes.ui.propertysection.general.basic"
+ tab="org.eclipse.tcf.te.tcf.processes.ui.propertytab.general">
+ </propertySection>
+ <propertySection
+ afterSection="org.eclipse.tcf.te.tcf.processes.ui.propertysection.general.basic"
+ class="org.eclipse.tcf.te.tcf.processes.ui.internal.tabbed.IDSection"
+ enablesFor="1"
+ filter="org.eclipse.tcf.te.tcf.processes.ui.internal.tabbed.ProcessFilter"
+ id="org.eclipse.tcf.te.tcf.processes.ui.propertysection.general.id"
+ tab="org.eclipse.tcf.te.tcf.processes.ui.propertytab.general">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.tcf.te.tcf.processes.ui.internal.tabbed.BasicContextSection"
+ enablesFor="1"
+ filter="org.eclipse.tcf.te.tcf.processes.ui.internal.tabbed.ProcessFilter"
+ id="org.eclipse.tcf.te.tcf.processes.ui.propertysection.context.basicContext"
+ tab="org.eclipse.tcf.te.tcf.processes.ui.propertytab.context">
+ </propertySection>
+ <propertySection
+ afterSection="org.eclipse.tcf.te.tcf.processes.ui.propertysection.context.basicContext"
+ class="org.eclipse.tcf.te.tcf.processes.ui.internal.tabbed.ContextIDSection"
+ enablesFor="1"
+ filter="org.eclipse.tcf.te.tcf.processes.ui.internal.tabbed.ProcessFilter"
+ id="org.eclipse.tcf.te.tcf.processes.ui.propertysection.context.contextId"
+ tab="org.eclipse.tcf.te.tcf.processes.ui.propertytab.context">
+ </propertySection>
+ <propertySection
+ afterSection="org.eclipse.tcf.te.tcf.processes.ui.propertysection.context.contextId"
+ class="org.eclipse.tcf.te.tcf.processes.ui.internal.tabbed.MemorySection"
+ enablesFor="1"
+ filter="org.eclipse.tcf.te.tcf.processes.ui.internal.tabbed.ProcessFilter"
+ id="org.eclipse.tcf.te.tcf.processes.ui.propertysection.context.memory"
+ tab="org.eclipse.tcf.te.tcf.processes.ui.propertytab.context">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.tcf.te.tcf.processes.ui.internal.tabbed.AdvancedPropertiesSection"
+ enablesFor="1"
+ filter="org.eclipse.tcf.te.tcf.processes.ui.internal.tabbed.ProcessFilter"
+ id="org.eclipse.tcf.te.tcf.processes.ui.propertysection.advanced"
+ tab="org.eclipse.tcf.te.tcf.processes.ui.propertytab.advanced">
+ </propertySection>
+ </propertySections>
+ </extension>
+ <extension
+ point="org.eclipse.core.runtime.adapters">
+ <factory
+ adaptableType="org.eclipse.tcf.te.tcf.processes.ui.model.ProcessTreeNode"
+ class="org.eclipse.tcf.te.tcf.processes.ui.internal.adapters.ProcessTreeNodeAdapterFactory">
+ <adapter
+ type="org.eclipse.jface.viewers.ILabelProvider">
+ </adapter>
+ </factory>
+ </extension>
+
+</plugin>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/pom.xml b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/pom.xml
new file mode 100644
index 000000000..5d7219f65
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.tcf</groupId>
+ <artifactId>tcf-parent</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../../../pom.xml</relativePath>
+ </parent>
+
+ <version>1.0.0.qualifier</version>
+ <artifactId>org.eclipse.tcf.te.tcf.processes.ui</artifactId>
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/src/org/eclipse/tm/te/tcf/processes/ui/activator/UIPlugin.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/activator/UIPlugin.java
index c415fb7ad..5806f4274 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/src/org/eclipse/tm/te/tcf/processes/ui/activator/UIPlugin.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/activator/UIPlugin.java
@@ -7,14 +7,14 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.processes.ui.activator;
+package org.eclipse.tcf.te.tcf.processes.ui.activator;
import java.net.URL;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.swt.graphics.Image;
-import org.eclipse.tm.te.tcf.processes.ui.interfaces.ImageConsts;
+import org.eclipse.tcf.te.tcf.processes.ui.interfaces.ImageConsts;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
@@ -75,6 +75,8 @@ public class UIPlugin extends AbstractUIPlugin {
protected void initializeImageRegistry(ImageRegistry registry) {
URL url = UIPlugin.getDefault().getBundle().getEntry(ImageConsts.IMAGE_DIR_ROOT + ImageConsts.IMAGE_DIR_OBJ + "process.gif"); //$NON-NLS-1$
registry.put(ImageConsts.OBJ_Process, ImageDescriptor.createFromURL(url));
+ url = UIPlugin.getDefault().getBundle().getEntry(ImageConsts.IMAGE_DIR_ROOT + ImageConsts.IMAGE_DIR_OBJ + "process_root.png"); //$NON-NLS-1$
+ registry.put(ImageConsts.OBJ_Process_Root, ImageDescriptor.createFromURL(url));
}
/**
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/controls/ProcessNavigatorContentProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/controls/ProcessNavigatorContentProvider.java
new file mode 100644
index 000000000..ce9755108
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/controls/ProcessNavigatorContentProvider.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.processes.ui.controls;
+
+
+/**
+ * Processes content provider for the common navigator of Target Explorer.
+ */
+public class ProcessNavigatorContentProvider extends ProcessTreeContentProvider {
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.trees.TreeContentProvider#isRootNodeVisible()
+ */
+ @Override
+ protected boolean isRootNodeVisible() {
+ return true;
+ }
+} \ No newline at end of file
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/controls/ProcessTreeContentProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/controls/ProcessTreeContentProvider.java
new file mode 100644
index 000000000..0144d9a9a
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/controls/ProcessTreeContentProvider.java
@@ -0,0 +1,158 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.processes.ui.controls;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.tcf.processes.ui.model.ProcessModel;
+import org.eclipse.tcf.te.tcf.processes.ui.model.ProcessTreeNode;
+import org.eclipse.tcf.te.ui.nls.Messages;
+import org.eclipse.tcf.te.ui.trees.TreeContentProvider;
+import org.eclipse.ui.IMemento;
+import org.eclipse.ui.internal.navigator.NavigatorFilterService;
+import org.eclipse.ui.navigator.ICommonContentExtensionSite;
+import org.eclipse.ui.navigator.ICommonContentProvider;
+import org.eclipse.ui.navigator.INavigatorContentService;
+import org.eclipse.ui.navigator.INavigatorFilterService;
+
+/**
+ * Process tree control content provider implementation.
+ */
+@SuppressWarnings("restriction")
+public class ProcessTreeContentProvider extends TreeContentProvider implements ICommonContentProvider {
+ // The "Single Thread" filter id
+ private final static String SINGLE_THREAD_FILTER_ID = "org.eclipse.tcf.te.tcf.processes.ui.navigator.filter.singleThread"; //$NON-NLS-1$
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object)
+ */
+ @Override
+ public Object getParent(Object element) {
+ if (element instanceof ProcessTreeNode) {
+ return ((ProcessTreeNode) element).parent;
+ }
+ return null;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object)
+ */
+ @Override
+ public Object[] getChildren(Object parentElement) {
+ Assert.isNotNull(parentElement);
+
+ if (parentElement instanceof IPeerModel) {
+ IPeerModel peerModel = (IPeerModel) parentElement;
+ installPropertyChangeListener(peerModel);
+ ProcessModel model = ProcessModel.getProcessModel(peerModel);
+ if(model.getRoot() == null) {
+ model.createRoot(peerModel);
+ }
+ if (isRootNodeVisible()) {
+ return new Object[] { model.getRoot() };
+ }
+ return getChildren(model.getRoot());
+ }
+ else if (parentElement instanceof ProcessTreeNode) {
+ ProcessTreeNode node = (ProcessTreeNode) parentElement;
+ if(node.type.equals("ProcPendingNode")) {//$NON-NLS-1$
+ return NO_ELEMENTS;
+ }
+ if (!node.childrenQueried) {
+ if (!node.childrenQueryRunning) {
+ ProcessModel model = ProcessModel.getProcessModel(node.peerNode);
+ model.queryChildren(node);
+ }
+ ProcessTreeNode pendingNode = new ProcessTreeNode();
+ pendingNode.name = Messages.PendingOperation_label;
+ pendingNode.type = "ProcPendingNode"; //$NON-NLS-1$
+ return new Object[] { pendingNode };
+ }
+ return node.children.toArray();
+ }
+ return NO_ELEMENTS;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object)
+ */
+ @Override
+ public boolean hasChildren(Object element) {
+ Assert.isNotNull(element);
+
+ boolean hasChildren = false;
+
+ // No children yet and the element is a process node
+ if (element instanceof ProcessTreeNode) {
+ ProcessTreeNode node = (ProcessTreeNode) element;
+ if (!node.childrenQueried || node.childrenQueryRunning) {
+ hasChildren = true;
+ }
+ else {
+ hasChildren = super.hasChildren(element);
+ }
+ }
+ else if (element instanceof IPeerModel) {
+ // Get the root node for this peer model object.
+ // If null, true is returned as it means that the file system
+ // model hasn't been created yet and have to treat is as children
+ // not queried yet.
+ IPeerModel peerModel = (IPeerModel) element;
+ ProcessModel model = ProcessModel.getProcessModel(peerModel);
+ ProcessTreeNode root = model.getRoot();
+ hasChildren = root != null ? hasChildren(root) : true;
+ }
+ return hasChildren;
+ }
+
+ /**
+ * If the root node of the tree is visible.
+ *
+ * @return true if it is visible.
+ */
+ protected boolean isRootNodeVisible() {
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.navigator.ICommonContentProvider#init(org.eclipse.ui.navigator.ICommonContentExtensionSite)
+ */
+ @Override
+ public void init(ICommonContentExtensionSite config) {
+ Assert.isNotNull(config);
+
+ // Make sure that the hidden "Single Thread" filter is active
+ INavigatorContentService cs = config.getService();
+ INavigatorFilterService fs = cs != null ? cs.getFilterService() : null;
+ if (fs != null && !fs.isActive(SINGLE_THREAD_FILTER_ID)) {
+ if (fs instanceof NavigatorFilterService) {
+ NavigatorFilterService navFilterService = (NavigatorFilterService)fs;
+ navFilterService.addActiveFilterIds(new String[] { SINGLE_THREAD_FILTER_ID });
+ navFilterService.updateViewer();
+ }
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.navigator.IMementoAware#restoreState(org.eclipse.ui.IMemento)
+ */
+ @Override
+ public void restoreState(IMemento aMemento) {
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.navigator.IMementoAware#saveState(org.eclipse.ui.IMemento)
+ */
+ @Override
+ public void saveState(IMemento aMemento) {
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/controls/ProcessViewerSorter.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/controls/ProcessViewerSorter.java
new file mode 100644
index 000000000..5cac1f4d3
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/controls/ProcessViewerSorter.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.processes.ui.controls;
+
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerSorter;
+import org.eclipse.tcf.te.tcf.processes.ui.internal.columns.ProcessComparator;
+import org.eclipse.tcf.te.tcf.processes.ui.model.ProcessTreeNode;
+
+/**
+ * The common sorter for the process contribution to the target explorer.
+ */
+public class ProcessViewerSorter extends ViewerSorter {
+ private ProcessComparator comparator = new ProcessComparator();
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ViewerComparator#compare(org.eclipse.jface.viewers.Viewer,
+ * java.lang.Object, java.lang.Object)
+ */
+ @Override
+ public int compare(Viewer viewer, Object e1, Object e2) {
+ if (e1 instanceof ProcessTreeNode && e2 instanceof ProcessTreeNode) {
+ return comparator.compare((ProcessTreeNode) e1, (ProcessTreeNode) e2);
+ }
+ return super.compare(viewer, e1, e2);
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/dialogs/ProcessSelectionDialog.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/dialogs/ProcessSelectionDialog.java
new file mode 100644
index 000000000..889adbe22
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/dialogs/ProcessSelectionDialog.java
@@ -0,0 +1,125 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.processes.ui.dialogs;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.viewers.DecoratingLabelProvider;
+import org.eclipse.jface.viewers.ILabelDecorator;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.tcf.te.tcf.processes.ui.controls.ProcessTreeContentProvider;
+import org.eclipse.tcf.te.tcf.processes.ui.controls.ProcessViewerSorter;
+import org.eclipse.tcf.te.tcf.processes.ui.internal.columns.ProcessLabelProvider;
+import org.eclipse.tcf.te.tcf.processes.ui.model.ProcessTreeNode;
+import org.eclipse.tcf.te.ui.activator.UIPlugin;
+import org.eclipse.tcf.te.ui.interfaces.IUIConstants;
+import org.eclipse.tcf.te.ui.trees.FilterDescriptor;
+import org.eclipse.tcf.te.ui.trees.ViewerStateManager;
+import org.eclipse.ui.IDecoratorManager;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.dialogs.ElementTreeSelectionDialog;
+import org.eclipse.ui.dialogs.ISelectionStatusValidator;
+
+/**
+ * Process selection dialog.
+ */
+public class ProcessSelectionDialog extends ElementTreeSelectionDialog {
+ /**
+ * Create an FSFolderSelectionDialog using the specified shell as the parent.
+ *
+ * @param parentShell The parent shell.
+ */
+ public ProcessSelectionDialog(Shell parentShell) {
+ this(parentShell, new ProcessLabelProvider(), new ProcessTreeContentProvider());
+ }
+
+ /**
+ * Create an FSFolderSelectionDialog using the specified shell, an FSTreeLabelProvider, and a
+ * content provider that provides the tree nodes.
+ *
+ * @param parentShell The parent shell.
+ * @param labelProvider The label provider.
+ * @param contentProvider The content provider.
+ */
+ private ProcessSelectionDialog(Shell parentShell, ILabelProvider labelProvider, ITreeContentProvider contentProvider) {
+ super(parentShell, createDecoratingLabelProvider(labelProvider), contentProvider);
+ this.setAllowMultiple(false);
+ this.setStatusLineAboveButtons(false);
+ this.setComparator(new ProcessViewerSorter());
+ this.setValidator(new ISelectionStatusValidator() {
+ @Override
+ public IStatus validate(Object[] selection) {
+ return isValidSelection(selection);
+ }
+ });
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.dialogs.ElementTreeSelectionDialog#setInput(java.lang.Object)
+ */
+ @Override
+ public void setInput(Object input) {
+ super.setInput(input);
+ FilterDescriptor[] filterDescriptors = ViewerStateManager.getInstance().
+ getFilterDescriptors(IUIConstants.ID_CONTROL_MENUS_BASE + ".viewer.processes", input); //$NON-NLS-1$
+ if (filterDescriptors != null) {
+ for(FilterDescriptor descriptor : filterDescriptors) {
+ if(descriptor.isEnabled()) addFilter(descriptor.getFilter());
+ }
+ }
+ }
+
+ /**
+ * Create a decorating label provider using the specified label provider.
+ *
+ * @param labelProvider The label provider that actually provides labels and images.
+ * @return The decorating label provider.
+ */
+ private static ILabelProvider createDecoratingLabelProvider(ILabelProvider labelProvider) {
+ IWorkbench workbench = PlatformUI.getWorkbench();
+ IDecoratorManager manager = workbench.getDecoratorManager();
+ ILabelDecorator decorator = manager.getLabelDecorator();
+ return new DecoratingLabelProvider(labelProvider,decorator);
+ }
+
+ /**
+ * Create the tree viewer and set it to the label provider.
+ */
+ @Override
+ protected TreeViewer doCreateTreeViewer(Composite parent, int style) {
+ TreeViewer viewer = super.doCreateTreeViewer(parent, style);
+ viewer.getTree().setLinesVisible(false);
+ return viewer;
+ }
+
+ /**
+ * If the specified selection is a valid folder to be selected.
+ *
+ * @param selection The selected folders.
+ * @return An error status if it is invalid or an OK status indicating it is valid.
+ */
+ IStatus isValidSelection(Object[] selection) {
+ String pluginId = UIPlugin.getUniqueIdentifier();
+ IStatus error = new Status(IStatus.ERROR, pluginId, null);
+ if (selection == null || selection.length == 0) {
+ return error;
+ }
+ if (!(selection[0] instanceof ProcessTreeNode)) {
+ return error;
+ }
+ return new Status(IStatus.OK, pluginId, null);
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/src/org/eclipse/tm/te/tcf/processes/ui/internal/help/IContextHelpIds.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/help/IContextHelpIds.java
index 17b17f7b0..675dacaab 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/src/org/eclipse/tm/te/tcf/processes/ui/internal/help/IContextHelpIds.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/help/IContextHelpIds.java
@@ -7,9 +7,9 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.processes.ui.internal.help;
+package org.eclipse.tcf.te.tcf.processes.ui.help;
-import org.eclipse.tm.te.tcf.processes.ui.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.processes.ui.activator.UIPlugin;
/**
* Plugin context help id definitions.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/src/org/eclipse/tm/te/tcf/processes/ui/interfaces/ImageConsts.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/interfaces/ImageConsts.java
index 46280509e..0c5bc5a46 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/src/org/eclipse/tm/te/tcf/processes/ui/interfaces/ImageConsts.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/interfaces/ImageConsts.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.processes.ui.interfaces;
+package org.eclipse.tcf.te.tcf.processes.ui.interfaces;
/**
* Image registry constants.
@@ -28,4 +28,6 @@ public interface ImageConsts {
// ***** The image constants *****
public static final String OBJ_Process = "OBJ_Process"; //$NON-NLS-1$
+
+ public static final String OBJ_Process_Root = "OBJ_Process_Root"; //$NON-NLS-1$
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/adapters/ProcessTreeNodeAdapterFactory.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/adapters/ProcessTreeNodeAdapterFactory.java
new file mode 100644
index 000000000..6f0756498
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/adapters/ProcessTreeNodeAdapterFactory.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.processes.ui.internal.adapters;
+
+import org.eclipse.core.runtime.IAdapterFactory;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.tcf.te.tcf.processes.ui.internal.columns.ProcessLabelProvider;
+import org.eclipse.tcf.te.tcf.processes.ui.model.ProcessTreeNode;
+
+/**
+ * The adapter factory for ProcessTreeNode.
+ */
+public class ProcessTreeNodeAdapterFactory implements IAdapterFactory {
+ // The adapter for ILabelProvider.class
+ private ILabelProvider labelProvider = new ProcessLabelProvider();
+ // The adapter class.
+ private Class<?>[] adapters = {ILabelProvider.class};
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.core.runtime.IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class)
+ */
+ @Override
+ public Object getAdapter(Object adaptableObject, Class adapterType) {
+ if(adaptableObject instanceof ProcessTreeNode) {
+ if(adapterType == ILabelProvider.class) {
+ return labelProvider;
+ }
+ }
+ return null;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.core.runtime.IAdapterFactory#getAdapterList()
+ */
+ @Override
+ public Class[] getAdapterList() {
+ return adapters;
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/callbacks/QueryDoneGetChildren.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/callbacks/QueryDoneGetChildren.java
new file mode 100644
index 000000000..bd5033f5b
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/callbacks/QueryDoneGetChildren.java
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.processes.ui.internal.callbacks;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.services.ISysMonitor;
+import org.eclipse.tcf.te.tcf.core.Tcf;
+import org.eclipse.tcf.te.tcf.processes.ui.model.ProcessTreeNode;
+
+/**
+ * The callback handler that handles the result of service.getChildren when querying.
+ */
+public class QueryDoneGetChildren implements ISysMonitor.DoneGetChildren {
+ // The channel used for query.
+ IChannel channel;
+ // The service used for query.
+ ISysMonitor service;
+ // The parent node to be queried.
+ ProcessTreeNode parentNode;
+
+ /**
+ * Create an instance with the field parameters.
+ */
+ public QueryDoneGetChildren(IChannel channel, ISysMonitor service, ProcessTreeNode parentNode) {
+ this.channel = channel;
+ this.service = service;
+ this.parentNode = parentNode;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.services.ISysMonitor.DoneGetChildren#doneGetChildren(org.eclipse.tcf.protocol.IToken, java.lang.Exception, java.lang.String[])
+ */
+ @Override
+ public void doneGetChildren(IToken token, Exception error, String[] context_ids) {
+ if (error == null && context_ids != null && context_ids.length > 0) {
+ Map<String, Boolean> status = createStatusMap(context_ids);
+ for (String contextId : context_ids) {
+ service.getContext(contextId, new QueryDoneGetContext(contextId, channel, status, parentNode));
+ }
+ } else {
+ parentNode.childrenQueryRunning = false;
+ parentNode.childrenQueried = true;
+ parentNode.firePropertyChanged();
+ Tcf.getChannelManager().closeChannel(channel);
+ }
+ }
+
+ /**
+ * Create and initialize a status map with all the context ids and completion status
+ * set to false.
+ *
+ * @param context_ids All the context ids.
+ * @return A map with initial values
+ */
+ private Map<String, Boolean> createStatusMap(String[] context_ids) {
+ Map<String, Boolean> status = new HashMap<String, Boolean>();
+ for (String contextId : context_ids) {
+ status.put(contextId, Boolean.FALSE);
+ }
+ return status;
+ }
+} \ No newline at end of file
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/callbacks/QueryDoneGetContext.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/callbacks/QueryDoneGetContext.java
new file mode 100644
index 000000000..3d85693a1
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/callbacks/QueryDoneGetContext.java
@@ -0,0 +1,121 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.processes.ui.internal.callbacks;
+
+import java.util.Map;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.services.ISysMonitor;
+import org.eclipse.tcf.te.tcf.core.Tcf;
+import org.eclipse.tcf.te.tcf.processes.ui.model.ProcessTreeNode;
+
+/**
+ * The callback handler that handles the result of service.getContext when querying.
+ */
+public class QueryDoneGetContext implements ISysMonitor.DoneGetContext {
+ // The current context id.
+ String contextId;
+ // The channel used for query.
+ IChannel channel;
+ // The parent node to be queried.
+ ProcessTreeNode parentNode;
+ // The status map to mark and check the completion status.
+ Map<String, Boolean> status;
+
+ /**
+ * Create an instance with the field parameters.
+ */
+ public QueryDoneGetContext(String contextId, IChannel channel, Map<String, Boolean> status, ProcessTreeNode parentNode) {
+ this.contextId = contextId;
+ this.channel = channel;
+ this.parentNode = parentNode;
+ this.status = status;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.services.ISysMonitor.DoneGetContext#doneGetContext(org.eclipse.tcf.protocol.IToken, java.lang.Exception, org.eclipse.tcf.services.ISysMonitor.SysMonitorContext)
+ */
+ @Override
+ public void doneGetContext(IToken token, Exception error, ISysMonitor.SysMonitorContext context) {
+ if (error == null && context != null) {
+ ProcessTreeNode childNode = createNodeForContext(context);
+ childNode.parent = parentNode;
+ childNode.peerNode = parentNode.peerNode;
+ parentNode.children.add(childNode);
+ }
+ setAndCheckStatus();
+ }
+
+ /**
+ * Set the complete flag for this context id and check if
+ * all tasks have completed.
+ */
+ private void setAndCheckStatus() {
+ synchronized(status) {
+ status.put(contextId, Boolean.TRUE);
+ if(isAllComplete()){
+ parentNode.childrenQueryRunning = false;
+ parentNode.childrenQueried = true;
+ parentNode.firePropertyChanged();
+ Tcf.getChannelManager().closeChannel(channel);
+ }
+ }
+ }
+
+ /**
+ * Check if all tasks have completed by checking
+ * the status entries.
+ *
+ * @return true if all of them are marked finished.
+ */
+ private boolean isAllComplete() {
+ synchronized (status) {
+ for (String id : status.keySet()) {
+ Boolean bool = status.get(id);
+ if (!bool.booleanValue()) {
+ return false;
+ }
+ }
+ return true;
+ }
+ }
+
+ /**
+ * Creates a node from the given system monitor context.
+ *
+ * @param context The system monitor context. Must be not <code>null</code>.
+ *
+ * @return The node.
+ */
+ private ProcessTreeNode createNodeForContext(ISysMonitor.SysMonitorContext context) {
+ Assert.isTrue(Protocol.isDispatchThread());
+ Assert.isNotNull(context);
+
+ ProcessTreeNode node = new ProcessTreeNode();
+
+ node.childrenQueried = false;
+ node.childrenQueryRunning = false;
+ node.context = context;
+ node.name = context.getFile();
+ node.type = "ProcNode"; //$NON-NLS-1$
+ node.id = context.getID();
+ node.pid = context.getPID();
+ node.ppid = context.getPPID();
+ node.parentId = context.getParentID();
+ node.state = context.getState();
+ node.username = context.getUserName();
+
+ return node;
+ }
+} \ No newline at end of file
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/callbacks/QueryDoneOpenChannel.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/callbacks/QueryDoneOpenChannel.java
new file mode 100644
index 000000000..7c1725c94
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/callbacks/QueryDoneOpenChannel.java
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.processes.ui.internal.callbacks;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.services.ISysMonitor;
+import org.eclipse.tcf.te.tcf.core.interfaces.IChannelManager;
+import org.eclipse.tcf.te.tcf.processes.ui.model.ProcessTreeNode;
+
+/**
+ * The callback handler that handles the event when the channel opens when querying.
+ */
+public class QueryDoneOpenChannel implements IChannelManager.DoneOpenChannel {
+ // The parent node to be queried.
+ ProcessTreeNode parentNode;
+
+ /**
+ * Create an instance with a process model and a parent node.
+ *
+ * @param model The process model.
+ * @param parentNode The parent node to be queried.
+ */
+ public QueryDoneOpenChannel(ProcessTreeNode parentNode) {
+ this.parentNode = parentNode;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.core.interfaces.IChannelManager.DoneOpenChannel#doneOpenChannel(java.lang.Throwable, org.eclipse.tcf.protocol.IChannel)
+ */
+ @Override
+ public void doneOpenChannel(Throwable error, final IChannel channel) {
+ Assert.isTrue(Protocol.isDispatchThread());
+ if (error == null && channel != null) {
+ ISysMonitor service = channel.getRemoteService(ISysMonitor.class);
+ if (service != null) {
+ service.getChildren(parentNode.id, new QueryDoneGetChildren(channel, service, parentNode));
+ }
+ }
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/callbacks/RefreshDoneGetChildren.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/callbacks/RefreshDoneGetChildren.java
new file mode 100644
index 000000000..20408bbe0
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/callbacks/RefreshDoneGetChildren.java
@@ -0,0 +1,94 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.processes.ui.internal.callbacks;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Queue;
+
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.services.ISysMonitor;
+import org.eclipse.tcf.te.tcf.core.Tcf;
+import org.eclipse.tcf.te.tcf.processes.ui.model.ProcessTreeNode;
+
+/**
+ * The callback handler that handles the result of service.getChildren when refreshing.
+ */
+public class RefreshDoneGetChildren implements ISysMonitor.DoneGetChildren {
+ // The channel used for refreshing.
+ IChannel channel;
+ // The service used for refreshing.
+ ISysMonitor service;
+ // The parent node to be refreshed.
+ ProcessTreeNode parentNode;
+ // The queue to iterate the legitimate node in the whole tree.
+ Queue<ProcessTreeNode> queue;
+ // The service used for refreshing.
+ Runnable callback;
+
+ /**
+ * Create an instance with the field parameters.
+ */
+ public RefreshDoneGetChildren(Runnable callback, Queue<ProcessTreeNode> queue, IChannel channel, ISysMonitor service, ProcessTreeNode parentNode) {
+ this.callback = callback;
+ this.queue = queue;
+ this.channel = channel;
+ this.service = service;
+ this.parentNode = parentNode;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.services.ISysMonitor.DoneGetChildren#doneGetChildren(org.eclipse.tcf.protocol.IToken, java.lang.Exception, java.lang.String[])
+ */
+ @Override
+ public void doneGetChildren(IToken token, Exception error, String[] context_ids) {
+ if (error == null && context_ids != null && context_ids.length > 0) {
+ Map<String, Boolean> status = createStatusMap(context_ids);
+ List<ProcessTreeNode> newNodes = Collections.synchronizedList(new ArrayList<ProcessTreeNode>());
+ for (String contextId : context_ids) {
+ service.getContext(contextId, new RefreshDoneGetContext(newNodes, callback, service, queue, contextId, channel, status, parentNode));
+ }
+ } else {
+ parentNode.childrenQueryRunning = false;
+ parentNode.childrenQueried = true;
+ parentNode.children.clear();
+ if (queue.isEmpty()) {
+ parentNode.firePropertyChanged();
+ Tcf.getChannelManager().closeChannel(channel);
+ if(callback != null) {
+ callback.run();
+ }
+ } else {
+ ProcessTreeNode node = queue.poll();
+ service.getChildren(node.id, new RefreshDoneGetChildren(callback, queue, channel, service, node));
+ }
+ }
+ }
+
+ /**
+ * Create and initialize a status map with all the context ids and completion status
+ * set to false.
+ *
+ * @param context_ids All the context ids.
+ * @return A map with initial values
+ */
+ private Map<String, Boolean> createStatusMap(String[] context_ids) {
+ Map<String, Boolean> status = new HashMap<String, Boolean>();
+ for (String contextId : context_ids) {
+ status.put(contextId, Boolean.FALSE);
+ }
+ return status;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/callbacks/RefreshDoneGetContext.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/callbacks/RefreshDoneGetContext.java
new file mode 100644
index 000000000..691ce7c4c
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/callbacks/RefreshDoneGetContext.java
@@ -0,0 +1,221 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.processes.ui.internal.callbacks;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Queue;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.services.ISysMonitor;
+import org.eclipse.tcf.te.tcf.core.Tcf;
+import org.eclipse.tcf.te.tcf.processes.ui.model.ProcessTreeNode;
+
+/**
+ * The callback handler that handles the result of service.getContext when refreshing.
+ */
+public class RefreshDoneGetContext implements ISysMonitor.DoneGetContext {
+ // The current context id.
+ String contextId;
+ // The channel used for refreshing.
+ IChannel channel;
+ // The parent node to be refreshed.
+ ProcessTreeNode parentNode;
+ // The status map to mark and check the completion status.
+ Map<String, Boolean> status;
+ // The queue to iterate the legitimate node in the whole tree.
+ Queue<ProcessTreeNode> queue;
+ // The list to record all new nodes for merging.
+ List<ProcessTreeNode> newNodes;
+ // The service used for refreshing.
+ ISysMonitor service;
+ // The callback to be called when refresh is done.
+ Runnable callback;
+
+ /**
+ * Create an instance with the field parameters.
+ */
+ public RefreshDoneGetContext(List<ProcessTreeNode> newNodes,
+ Runnable callback, ISysMonitor service, Queue<ProcessTreeNode>queue, String contextId,
+ IChannel channel, Map<String, Boolean> status, ProcessTreeNode parentNode) {
+ this.callback = callback;
+ this.service = service;
+ this.queue = queue;
+ this.contextId = contextId;
+ this.channel = channel;
+ this.parentNode = parentNode;
+ this.status = status;
+ this.newNodes = newNodes;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.services.ISysMonitor.DoneGetContext#doneGetContext(org.eclipse.tcf.protocol.IToken, java.lang.Exception, org.eclipse.tcf.services.ISysMonitor.SysMonitorContext)
+ */
+ @Override
+ public void doneGetContext(IToken token, Exception error, ISysMonitor.SysMonitorContext context) {
+ if (error == null && context != null) {
+ ProcessTreeNode childNode = createNodeForContext(context);
+ childNode.parent = parentNode;
+ childNode.peerNode = parentNode.peerNode;
+ int index = searchChild(childNode);
+ if (index != -1) {
+ ProcessTreeNode node = parentNode.children.get(index);
+ updateData(childNode, node);
+ }
+ else parentNode.children.add(childNode);
+ newNodes.add(childNode);
+ }
+ setAndCheckStatus();
+ }
+
+ /**
+ * Update the destination node's data with the source node's data.
+ *
+ * @param src The source node.
+ * @param dest The destination node.
+ */
+ private void updateData(ProcessTreeNode src, ProcessTreeNode dest) {
+ dest.context = src.context;
+ dest.name = src.name;
+ dest.pid = src.pid;
+ dest.ppid = src.ppid;
+ dest.state = src.state;
+ dest.type = src.type;
+ dest.username = src.username;
+ }
+
+ /**
+ * Remove the dead process nodes.
+ */
+ private void removeDead() {
+ List<ProcessTreeNode> dead = new ArrayList<ProcessTreeNode>();
+ for (ProcessTreeNode node : parentNode.children) {
+ int index = searchInList(node, newNodes);
+ if (index == -1) {
+ dead.add(node);
+ }
+ }
+ for (ProcessTreeNode node : dead) {
+ parentNode.children.remove(node);
+ }
+ }
+
+ /**
+ * Search the specified child node in the specified list.
+ *
+ * @param childNode The child node.
+ * @param list The process node list.
+ * @return The index of the child node or -1 if no such node.
+ */
+ private int searchInList(ProcessTreeNode childNode, List<ProcessTreeNode> list) {
+ synchronized (list) {
+ for (int i = 0; i < list.size(); i++) {
+ ProcessTreeNode node = list.get(i);
+ if (childNode.id.equals(node.id)) {
+ return i;
+ }
+ }
+ return -1;
+ }
+ }
+
+ /**
+ * Search the specified child node in the children of the parent node.
+ *
+ * @param childNode The child node.
+ * @return The index of the child node or -1 if no such node.
+ */
+ private int searchChild(ProcessTreeNode childNode) {
+ return searchInList(childNode, parentNode.children);
+ }
+
+ /**
+ * Set the complete flag for this context id and check if
+ * all tasks have completed. If it is all completed, then
+ * merge the resulting children and continue with the
+ * next node in the queue.
+ */
+ private void setAndCheckStatus() {
+ synchronized(status) {
+ status.put(contextId, Boolean.TRUE);
+ if(isAllComplete()){
+ parentNode.childrenQueryRunning = false;
+ parentNode.childrenQueried = true;
+ removeDead();
+ for(ProcessTreeNode node:parentNode.children) {
+ if(node.childrenQueried && !node.childrenQueryRunning) {
+ queue.offer(node);
+ }
+ }
+ if (queue.isEmpty()) {
+ parentNode.firePropertyChanged();
+ Tcf.getChannelManager().closeChannel(channel);
+ if(callback != null) {
+ callback.run();
+ }
+ } else {
+ ProcessTreeNode node = queue.poll();
+ service.getChildren(node.id, new RefreshDoneGetChildren(callback, queue, channel, service, node));
+ }
+ }
+ }
+ }
+
+ /**
+ * Check if all tasks have completed by checking
+ * the status entries.
+ *
+ * @return true if all of them are marked finished.
+ */
+ private boolean isAllComplete() {
+ synchronized (status) {
+ for (String id : status.keySet()) {
+ Boolean bool = status.get(id);
+ if (!bool.booleanValue()) {
+ return false;
+ }
+ }
+ return true;
+ }
+ }
+
+ /**
+ * Creates a node from the given system monitor context.
+ *
+ * @param context The system monitor context. Must be not <code>null</code>.
+ *
+ * @return The node.
+ */
+ private ProcessTreeNode createNodeForContext(ISysMonitor.SysMonitorContext context) {
+ Assert.isTrue(Protocol.isDispatchThread());
+ Assert.isNotNull(context);
+
+ ProcessTreeNode node = new ProcessTreeNode();
+
+ node.childrenQueried = false;
+ node.childrenQueryRunning = false;
+ node.context = context;
+ node.name = context.getFile();
+ node.type = "ProcNode"; //$NON-NLS-1$
+ node.id = context.getID();
+ node.pid = context.getPID();
+ node.ppid = context.getPPID();
+ node.parentId = context.getParentID();
+ node.state = context.getState();
+ node.username = context.getUserName();
+
+ return node;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/callbacks/RefreshDoneOpenChannel.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/callbacks/RefreshDoneOpenChannel.java
new file mode 100644
index 000000000..6a7c978f1
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/callbacks/RefreshDoneOpenChannel.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.processes.ui.internal.callbacks;
+
+import java.util.Queue;
+import java.util.concurrent.ConcurrentLinkedQueue;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.services.ISysMonitor;
+import org.eclipse.tcf.te.tcf.core.interfaces.IChannelManager;
+import org.eclipse.tcf.te.tcf.processes.ui.model.ProcessTreeNode;
+
+/**
+ * The callback handler that handles the event when the channel opens when refreshing.
+ */
+public class RefreshDoneOpenChannel implements IChannelManager.DoneOpenChannel {
+ // The parent node to be refreshed.
+ ProcessTreeNode parentNode;
+ // The callback to be called when refresh is done.
+ Runnable callback;
+
+ /**
+ * Create an instance with the specified field parameters.
+ */
+ public RefreshDoneOpenChannel(Runnable callback, ProcessTreeNode parentNode) {
+ this.callback = callback;
+ this.parentNode = parentNode;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.core.interfaces.IChannelManager.DoneOpenChannel#doneOpenChannel(java.lang.Throwable, org.eclipse.tcf.protocol.IChannel)
+ */
+ @Override
+ public void doneOpenChannel(Throwable error, IChannel channel) {
+ Assert.isTrue(Protocol.isDispatchThread());
+ if (error == null && channel != null) {
+ ISysMonitor service = channel.getRemoteService(ISysMonitor.class);
+ if (service != null) {
+ Queue<ProcessTreeNode> queue = new ConcurrentLinkedQueue<ProcessTreeNode>();
+ service.getChildren(parentNode.id, new RefreshDoneGetChildren(callback, queue, channel, service, parentNode));
+ }
+ }
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/columns/PIDComparator.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/columns/PIDComparator.java
new file mode 100644
index 000000000..8259a7ba0
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/columns/PIDComparator.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.processes.ui.internal.columns;
+
+import java.util.Comparator;
+
+import org.eclipse.tcf.te.tcf.processes.ui.model.ProcessTreeNode;
+
+/**
+ * The comparator for the tree column "PID".
+ */
+public class PIDComparator implements Comparator<ProcessTreeNode> {
+
+ /*
+ * (non-Javadoc)
+ * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
+ */
+ @Override
+ public int compare(ProcessTreeNode o1, ProcessTreeNode o2) {
+ return o1.pid == o2.pid ? 0 : (o1.pid < o2.pid ? -1 : 1);
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/columns/PIDLabelProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/columns/PIDLabelProvider.java
new file mode 100644
index 000000000..d6ec023fb
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/columns/PIDLabelProvider.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.processes.ui.internal.columns;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.tcf.te.tcf.processes.ui.model.ProcessTreeNode;
+
+/**
+ * The label provider for the tree column "PID".
+ */
+public class PIDLabelProvider extends LabelProvider {
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnText(java.lang.Object, int)
+ */
+ @Override
+ public String getText(Object element) {
+ Assert.isTrue(element instanceof ProcessTreeNode);
+ ProcessTreeNode node = (ProcessTreeNode) element;
+ // Pending nodes does not have column texts at all
+ if (node.type.endsWith("PendingNode")) return ""; //$NON-NLS-1$ //$NON-NLS-2$
+ String id = Long.toString(node.pid);
+ if (id == null) id = node.id;
+ if (id != null) return id.startsWith("P") ? id.substring(1) : id; //$NON-NLS-1$
+ return ""; //$NON-NLS-1$
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/columns/PPIDComparator.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/columns/PPIDComparator.java
new file mode 100644
index 000000000..010366f61
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/columns/PPIDComparator.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.processes.ui.internal.columns;
+
+import java.util.Comparator;
+
+import org.eclipse.tcf.te.tcf.processes.ui.model.ProcessTreeNode;
+
+/**
+ * The comparator for the tree column "PPID".
+ */
+public class PPIDComparator implements Comparator<ProcessTreeNode> {
+
+ /*
+ * (non-Javadoc)
+ * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
+ */
+ @Override
+ public int compare(ProcessTreeNode o1, ProcessTreeNode o2) {
+ return o1.ppid == o2.ppid ? 0 : (o1.ppid < o2.ppid ? -1 : 1);
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/columns/PPIDLabelProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/columns/PPIDLabelProvider.java
new file mode 100644
index 000000000..216a5a217
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/columns/PPIDLabelProvider.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.processes.ui.internal.columns;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.tcf.te.tcf.processes.ui.model.ProcessTreeNode;
+
+/**
+ * The label provider for the tree column "PPID".
+ */
+public class PPIDLabelProvider extends LabelProvider {
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnText(java.lang.Object, int)
+ */
+ @Override
+ public String getText(Object element) {
+ Assert.isTrue(element instanceof ProcessTreeNode);
+ ProcessTreeNode node = (ProcessTreeNode) element;
+ // Pending nodes does not have column texts at all
+ if (node.type.endsWith("PendingNode")) return ""; //$NON-NLS-1$ //$NON-NLS-2$
+ String ppid = Long.toString(node.ppid);
+ if (ppid != null) return ppid;
+ return ""; //$NON-NLS-1$
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/columns/ProcessComparator.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/columns/ProcessComparator.java
new file mode 100644
index 000000000..182aa3da2
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/columns/ProcessComparator.java
@@ -0,0 +1,109 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.processes.ui.internal.columns;
+
+import java.util.Comparator;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.eclipse.tcf.te.tcf.processes.ui.model.ProcessTreeNode;
+
+/**
+ * The comparator for the tree column "name".
+ */
+public class ProcessComparator implements Comparator<ProcessTreeNode> {
+
+ /*
+ * (non-Javadoc)
+ * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
+ */
+ @Override
+ public int compare(ProcessTreeNode node1, ProcessTreeNode node2) {
+ if (node1 == null && node2 == null) return 0;
+ if (node1 != null && node2 == null) return 1;
+ if (node1 == null && node2 != null) return -1;
+
+ // Get the labels
+ String text1 = node1.name;
+ String text2 = node2.name;
+
+ // Normalize labels
+ if (text1 == null) text1 = ""; //$NON-NLS-1$
+ if (text2 == null) text2 = ""; //$NON-NLS-1$
+
+ // The tree sorts not strictly alphabetical. First comes entries starting with numbers,
+ // second entries starting with uppercase and than all the rest. Additional, if a label
+ // contains
+ // uppercase characters, it is sorted in before any labels being lowercase only.
+ if (text1.length() > 0 && text2.length() > 0) {
+ // Get the first characters of both
+ char c1 = text1.charAt(0);
+ char c2 = text2.charAt(0);
+
+ if (Character.isDigit(c1) || Character.isDigit(c2)) {
+ // Check on the differences. If both are digits, the standard compare will do it
+ if (Character.isDigit(c1) && !Character.isDigit(c2)) return -1;
+ if (!Character.isDigit(c1) && Character.isDigit(c2)) return 1;
+ }
+
+ if (Character.isUpperCase(c1) || Character.isUpperCase(c2)) {
+ // Check on the differences. If both are uppercase characters, the standard compare
+ // will do it
+ if (Character.isUpperCase(c1) && !Character.isUpperCase(c2)) return -1;
+ if (!Character.isUpperCase(c1) && Character.isUpperCase(c2)) return 1;
+ }
+
+ Matcher m1 = Pattern.compile("(\\D+)(\\d+)").matcher(text1); //$NON-NLS-1$
+ Matcher m2 = Pattern.compile("(\\D+)(\\d+)").matcher(text2); //$NON-NLS-1$
+ if (m1.matches() && m2.matches()) {
+ String p11 = m1.group(1);
+ String p12 = m1.group(2);
+
+ String p21 = m2.group(1);
+ String p22 = m2.group(2);
+
+ if (p11 != null && p11.equals(p21)) {
+ // Compare the second parts as number
+ try {
+ int result = 0;
+ long l1 = Long.parseLong(p12);
+ long l2 = Long.parseLong(p22);
+
+ if (l1 > l2) result = 1;
+ if (l1 < l2) result = -1;
+
+ return result;
+ }
+ catch (NumberFormatException e) { /* ignored on purpose */
+ }
+ }
+ }
+
+ if (text1.matches(".*[A-Z]+.*") || text2.matches(".*[A-Z]+.*")) { //$NON-NLS-1$ //$NON-NLS-2$
+ if (text1.matches(".*[A-Z]+.*") && !text2.matches(".*[A-Z]+.*")) return -1; //$NON-NLS-1$ //$NON-NLS-2$
+ if (!text1.matches(".*[A-Z]+.*") && text2.matches(".*[A-Z]+.*")) return 1; //$NON-NLS-1$ //$NON-NLS-2$
+
+ // Additionally, it even depends on the position of the first uppercase
+ // character if both strings contains them :-(
+ int minLength = Math.min(text1.length(), text2.length());
+ for (int i = 0; i < minLength; i++) {
+ char ch1 = text1.charAt(i);
+ char ch2 = text2.charAt(i);
+
+ if (Character.isUpperCase(ch1) && !Character.isUpperCase(ch2)) return -1;
+ if (!Character.isUpperCase(ch1) && Character.isUpperCase(ch2)) return 1;
+ // If both are uppercase, we break the loop and compare as usual
+ if (Character.isUpperCase(ch1) && Character.isUpperCase(ch2)) break;
+ }
+ }
+ }
+ return text1.compareTo(text2);
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/columns/ProcessLabelProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/columns/ProcessLabelProvider.java
new file mode 100644
index 000000000..892848afd
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/columns/ProcessLabelProvider.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.processes.ui.internal.columns;
+
+import java.io.File;
+
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.tcf.te.tcf.processes.ui.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.processes.ui.interfaces.ImageConsts;
+import org.eclipse.tcf.te.tcf.processes.ui.model.ProcessTreeNode;
+import org.eclipse.tcf.te.tcf.processes.ui.nls.Messages;
+
+/**
+ * The label provider for the tree column "name".
+ */
+public class ProcessLabelProvider extends LabelProvider {
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.viewers.LabelProvider#getText(java.lang.Object)
+ */
+ @Override
+ public String getText(Object element) {
+ if (element instanceof ProcessTreeNode) {
+ ProcessTreeNode node = (ProcessTreeNode) element;
+ if(node.type.equals("ProcRootNode")) { //$NON-NLS-1$
+ return Messages.ProcessLabelProvider_RootNodeLabel;
+ }
+ String name = node.name;
+ if (name == null) name = Messages.ProcessLabelProvider_NullNameNodeLabel;
+ int slash = name.lastIndexOf(File.separator);
+ if (slash != -1) name = name.substring(slash + 1);
+ return name;
+ }
+ return super.getText(element);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.viewers.LabelProvider#getImage(java.lang.Object)
+ */
+ @Override
+ public Image getImage(Object element) {
+ if (element instanceof ProcessTreeNode) {
+ ProcessTreeNode node = (ProcessTreeNode) element;
+ if(node.type.equals("ProcRootNode")) { //$NON-NLS-1$
+ return UIPlugin.getImage(ImageConsts.OBJ_Process_Root);
+ }
+ return UIPlugin.getImage(ImageConsts.OBJ_Process);
+ }
+ return super.getImage(element);
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/columns/StateComparator.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/columns/StateComparator.java
new file mode 100644
index 000000000..d91ef75dd
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/columns/StateComparator.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.processes.ui.internal.columns;
+
+import java.util.Comparator;
+
+import org.eclipse.tcf.te.tcf.processes.ui.model.ProcessTreeNode;
+
+/**
+ * The comparator for the tree column "state".
+ */
+public class StateComparator implements Comparator<ProcessTreeNode> {
+
+ /*
+ * (non-Javadoc)
+ * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
+ */
+ @Override
+ public int compare(ProcessTreeNode o1, ProcessTreeNode o2) {
+ if (o1.state == null) {
+ if (o2.state == null) return 0;
+ return -1;
+ }
+ if (o2.state == null) return 1;
+ return o1.state.compareTo(o2.state);
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/columns/StateLabelProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/columns/StateLabelProvider.java
new file mode 100644
index 000000000..16465f684
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/columns/StateLabelProvider.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.processes.ui.internal.columns;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.tcf.te.tcf.processes.ui.model.ProcessTreeNode;
+
+/**
+ * The label provider for the tree column "state".
+ */
+public class StateLabelProvider extends LabelProvider {
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnText(java.lang.Object, int)
+ */
+ @Override
+ public String getText(Object element) {
+ Assert.isTrue(element instanceof ProcessTreeNode);
+ ProcessTreeNode node = (ProcessTreeNode) element;
+ // Pending nodes does not have column texts at all
+ if (node.type.endsWith("PendingNode")) return ""; //$NON-NLS-1$ //$NON-NLS-2$
+ String state = node.state;
+ if (state != null) return state;
+ return ""; //$NON-NLS-1$
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/columns/UserComparator.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/columns/UserComparator.java
new file mode 100644
index 000000000..9b818c2a9
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/columns/UserComparator.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.processes.ui.internal.columns;
+
+import java.util.Comparator;
+
+import org.eclipse.tcf.te.tcf.processes.ui.model.ProcessTreeNode;
+
+/**
+ * The comparator for the tree column "user".
+ */
+public class UserComparator implements Comparator<ProcessTreeNode> {
+
+ /*
+ * (non-Javadoc)
+ * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
+ */
+ @Override
+ public int compare(ProcessTreeNode o1, ProcessTreeNode o2) {
+ if (o1.username == null) {
+ if (o2.username == null) return 0;
+ return -1;
+ }
+ if (o2.username == null) return 1;
+ return o1.username.compareTo(o2.username);
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/columns/UserLabelProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/columns/UserLabelProvider.java
new file mode 100644
index 000000000..a74cd3cf1
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/columns/UserLabelProvider.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.processes.ui.internal.columns;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.tcf.te.tcf.processes.ui.model.ProcessTreeNode;
+
+/**
+ * The label provider for the tree column "user".
+ */
+public class UserLabelProvider extends LabelProvider {
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnText(java.lang.Object, int)
+ */
+ @Override
+ public String getText(Object element) {
+ Assert.isTrue(element instanceof ProcessTreeNode);
+ ProcessTreeNode node = (ProcessTreeNode) element;
+ // Pending nodes does not have column texts at all
+ if (node.type.endsWith("PendingNode")) return ""; //$NON-NLS-1$ //$NON-NLS-2$
+ String username = node.username;
+ if (username != null) return username;
+ return ""; //$NON-NLS-1$
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/dialogs/EditSpeedGradeDialog.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/dialogs/EditSpeedGradeDialog.java
new file mode 100644
index 000000000..d6c5d462b
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/dialogs/EditSpeedGradeDialog.java
@@ -0,0 +1,212 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.processes.ui.internal.dialogs;
+
+import java.util.List;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.StatusDialog;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+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.tcf.te.tcf.processes.ui.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.processes.ui.model.IntervalGrade;
+import org.eclipse.tcf.te.tcf.processes.ui.nls.Messages;
+
+/**
+ * The dialog to edit an existing grade for refreshing the process list.
+ */
+public class EditSpeedGradeDialog extends StatusDialog implements ModifyListener {
+ // The text field to enter the name.
+ private Text nameText;
+ // The text field to enter the value.
+ private Text valueText;
+ // The grade that is currently edited.
+ private IntervalGrade intervalGrade;
+ // The grade list currently edited.
+ private List<IntervalGrade> grades;
+
+ /**
+ * Constructor
+ */
+ public EditSpeedGradeDialog(Shell parent) {
+ super(parent);
+ }
+
+ /**
+ * Set the currently edited grade list for validation purpose.
+ *
+ * @param grades The grade list.
+ */
+ public void setGrades(List<IntervalGrade> grades) {
+ this.grades = grades;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.dialogs.StatusDialog#configureShell(org.eclipse.swt.widgets.Shell)
+ */
+ @Override
+ protected void configureShell(Shell shell) {
+ shell.setText(Messages.EditSpeedGradeDialog_DialogTitle);
+ super.configureShell(shell);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+ */
+ @Override
+ protected Control createDialogArea(Composite parent) {
+ // create a composite with standard margins and spacing
+ Composite composite = new Composite(parent, SWT.NONE);
+ GridLayout layout = new GridLayout(2, false);
+ layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
+ layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
+ layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
+ layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
+ composite.setLayout(layout);
+ composite.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ //Create the message area.
+ Label label = new Label(composite, SWT.NONE);
+ GridData data = new GridData();
+ data.horizontalSpan = 2;
+ label.setLayoutData(data);
+ label.setText(Messages.EditSpeedGradeDialog_DialogMessage);
+
+ label = new Label(composite, SWT.NONE);
+ label.setText(Messages.EditSpeedGradeDialog_NameLabel);
+
+ nameText = new Text(composite, SWT.SINGLE | SWT.BORDER);
+ if(intervalGrade!=null) {
+ nameText.setText(intervalGrade.getName());
+ nameText.setEnabled(false);
+ }
+ nameText.setTextLimit(Text.LIMIT);
+ nameText.addModifyListener(this);
+ data = new GridData(SWT.FILL, SWT.CENTER, true, false);
+ data.widthHint = 250;
+ nameText.setLayoutData(data);
+
+ label = new Label(composite, SWT.NONE);
+ label.setText(Messages.EditSpeedGradeDialog_ValueLabel);
+
+ valueText = new Text(composite, SWT.SINGLE | SWT.BORDER);
+ if(intervalGrade!=null) {
+ valueText.setText(""+intervalGrade.getValue()); //$NON-NLS-1$
+ }
+ valueText.setTextLimit(Text.LIMIT);
+ valueText.addModifyListener(this);
+ data = new GridData(SWT.FILL, SWT.CENTER, true, false);
+ valueText.setLayoutData(data);
+
+ applyDialogFont(composite);
+
+ return composite;
+ }
+
+ /**
+ * Check if the current input is valid and return an IStatus object to return
+ * the checking result, containing the message and the validating code.
+ *
+ * @return A status to indicate if the input is valid.
+ */
+ private IStatus isInputValid() {
+ String pluginId = UIPlugin.getUniqueIdentifier();
+ String txt = valueText.getText();
+ if (txt == null || txt.trim().length() == 0) {
+ return new Status(IStatus.CANCEL, pluginId, null);
+ }
+ try {
+ int interval = Integer.parseInt(txt.trim());
+ if (interval <= 0) return new Status(IStatus.ERROR, pluginId, Messages.IntervalConfigDialog_BiggerThanZero);
+ String name = valueExists(interval);
+ if(name != null) return new Status(IStatus.WARNING, pluginId, NLS.bind(Messages.EditSpeedGradeDialog_GradeSameValue, name));
+ }
+ catch (NumberFormatException e) {
+ return new Status(IStatus.ERROR, pluginId, Messages.IntervalConfigDialog_InvalidNumber);
+ }
+ return Status.OK_STATUS;
+ }
+
+ /**
+ * Check if the grade with the same value exists. Return its
+ * name if it exists.
+ *
+ * @param value The value to be checked.
+ * @return The grade's name or null if no such grade is found.
+ */
+ private String valueExists(int value) {
+ for(IntervalGrade grade:grades) {
+ if(grade != intervalGrade && grade.getValue() == value)
+ return grade.getName();
+ }
+ return null;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.dialogs.Dialog#okPressed()
+ */
+ @Override
+ protected void okPressed() {
+ int value = Integer.parseInt(valueText.getText().trim());
+ intervalGrade.setValue(value);
+ super.okPressed();
+ }
+
+ /**
+ * Set the currently edited grade.
+ *
+ * @param grade The currently edited grade.
+ */
+ public void setGrade(IntervalGrade grade) {
+ this.intervalGrade = grade;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.dialogs.StatusDialog#updateButtonsEnableState(org.eclipse.core.runtime.IStatus)
+ */
+ @Override
+ protected void updateButtonsEnableState(IStatus status) {
+ if (getButton(IDialogConstants.OK_ID) != null && !getButton(IDialogConstants.OK_ID).isDisposed()) {
+ getButton(IDialogConstants.OK_ID).setEnabled(status.isOK());
+ }
+ }
+
+ /**
+ * Validate the current input and update the button and the error message.
+ */
+ private void validateInput() {
+ IStatus status = isInputValid();
+ updateStatus(status);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.swt.events.ModifyListener#modifyText(org.eclipse.swt.events.ModifyEvent)
+ */
+ @Override
+ public void modifyText(ModifyEvent e) {
+ validateInput();
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/dialogs/IntervalConfigDialog.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/dialogs/IntervalConfigDialog.java
new file mode 100644
index 000000000..fa0c456c5
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/dialogs/IntervalConfigDialog.java
@@ -0,0 +1,311 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.processes.ui.internal.dialogs;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.StringTokenizer;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.StatusDialog;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.viewers.ArrayContentProvider;
+import org.eclipse.jface.viewers.ComboViewer;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.tcf.te.tcf.processes.ui.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.processes.ui.internal.preferences.IPreferenceConsts;
+import org.eclipse.tcf.te.tcf.processes.ui.model.IntervalGrade;
+import org.eclipse.tcf.te.tcf.processes.ui.nls.Messages;
+
+/**
+ * The dialog to configure the refreshing interval of the process list.
+ */
+public class IntervalConfigDialog extends StatusDialog implements SelectionListener, ModifyListener, ISelectionChangedListener, IPreferenceConsts {
+ // The option to enter the interval value in a text field.
+ private Button button1;
+ // The option to enter the interval value in a combo field.
+ private Button button2;
+ // The combo viewer to input the interval value.
+ private ComboViewer comboViewer;
+ // The text field to enter the interval value.
+ private Text text;
+ // The entered result
+ private int result;
+
+ /**
+ * Constructor
+ */
+ public IntervalConfigDialog(Shell parent) {
+ super(parent);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.dialogs.StatusDialog#configureShell(org.eclipse.swt.widgets.Shell)
+ */
+ @Override
+ protected void configureShell(Shell shell) {
+ shell.setText(Messages.IntervalConfigDialog_DialogTitle);
+ super.configureShell(shell);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+ */
+ @Override
+ protected Control createDialogArea(Composite parent) {
+ Composite composite = (Composite) super.createDialogArea(parent);
+
+ Composite comp0 = new Composite(composite, SWT.NONE);
+ GridData data = new GridData(SWT.FILL, SWT.CENTER, true, false);
+ comp0.setLayoutData(data);
+ GridLayout layout = new GridLayout(3, false);
+ layout.horizontalSpacing = 0;
+ comp0.setLayout(layout);
+
+ Label label = new Label(comp0, SWT.NONE);
+ label.setText(Messages.IntervalConfigDialog_DialogMessage);
+
+ Composite comp1 = new Composite(composite, SWT.NONE);
+ data = new GridData(SWT.FILL, SWT.CENTER, true, false);
+ comp1.setLayoutData(data);
+ layout = new GridLayout(3, false);
+ layout.horizontalSpacing = 0;
+ comp1.setLayout(layout);
+
+ button1 = new Button(comp1, SWT.RADIO);
+ button1.setText(Messages.IntervalConfigDialog_ChoiceOneLabel);
+ button1.addSelectionListener(this);
+
+ text = new Text(comp1, SWT.SINGLE | SWT.BORDER);
+ text.setTextLimit(Text.LIMIT);
+ text.addModifyListener(this);
+ data = new GridData();
+ data.widthHint = 70;
+ text.setLayoutData(data);
+
+ label = new Label(comp1, SWT.NONE);
+ label.setText(Messages.IntervalConfigDialog_SECONDS);
+
+ Composite comp2 = new Composite(composite, SWT.NONE);
+ data = new GridData(SWT.FILL, SWT.CENTER, true, false);
+ comp2.setLayoutData(data);
+ layout = new GridLayout(3, false);
+ layout.horizontalSpacing = 0;
+ comp2.setLayout(layout);
+
+ button2 = new Button(comp2, SWT.RADIO);
+ button2.setText(Messages.IntervalConfigDialog_ChoiceTwoLabel);
+ button2.addSelectionListener(this);
+
+ comboViewer = new ComboViewer(comp2, SWT.READ_ONLY);
+ comboViewer.setContentProvider(ArrayContentProvider.getInstance());
+ comboViewer.setLabelProvider(new GradeLabelProvider());
+ comboViewer.setInput(getGrades());
+ comboViewer.addSelectionChangedListener(this);
+ data = new GridData();
+ data.widthHint = 70;
+ comboViewer.getCombo().setLayoutData(data);
+
+ label = new Label(comp2, SWT.NONE);
+ label.setText(Messages.IntervalConfigDialog_SPEED);
+
+ button1.setSelection(true);
+ button2.setSelection(false);
+ comboViewer.getCombo().setEnabled(false);
+ // Interval has not yet been initialized.
+ IPreferenceStore prefStore = UIPlugin.getDefault().getPreferenceStore();
+ int interval = prefStore.getInt(PREF_LAST_INTERVAL);
+ text.setText(""+interval); //$NON-NLS-1$
+
+ return composite;
+ }
+
+ /**
+ * Check if the current input is valid and return an IStatus object to return
+ * the checking result, containing the message and the validating code.
+ *
+ * @return A status to indicate if the input is valid.
+ */
+ private IStatus isInputValid() {
+ String pluginId = UIPlugin.getUniqueIdentifier();
+ if(button1.getSelection()) {
+ String txt = text.getText();
+ if(txt == null || txt.trim().length() == 0) {
+ return new Status(IStatus.CANCEL, pluginId, null);
+ }
+ try{
+ int interval = Integer.parseInt(txt.trim());
+ if(interval <= 0)
+ return new Status(IStatus.ERROR, pluginId, Messages.IntervalConfigDialog_BiggerThanZero);
+ }catch(NumberFormatException e) {
+ return new Status(IStatus.ERROR, pluginId, Messages.IntervalConfigDialog_InvalidNumber);
+ }
+ }else if(button2.getSelection()) {
+ ISelection selection = comboViewer.getSelection();
+ if(selection.isEmpty()) {
+ return new Status(IStatus.CANCEL, pluginId, null);
+ }
+ }
+ return Status.OK_STATUS;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.dialogs.Dialog#okPressed()
+ */
+ @Override
+ protected void okPressed() {
+ if(button1.getSelection()) {
+ String txt = text.getText().trim();
+ result = Integer.parseInt(txt);
+ }else if(button2.getSelection()) {
+ IStructuredSelection selection = (IStructuredSelection) comboViewer.getSelection();
+ IntervalGrade grade = (IntervalGrade) selection.getFirstElement();
+ result = grade.getValue();
+ }
+ super.okPressed();
+ }
+
+ /**
+ * Get the input result, a time interval.
+ *
+ * @return The input result.
+ */
+ public int getResult() {
+ return result;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.dialogs.StatusDialog#updateButtonsEnableState(org.eclipse.core.runtime.IStatus)
+ */
+ @Override
+ protected void updateButtonsEnableState(IStatus status) {
+ if (getButton(IDialogConstants.OK_ID) != null && !getButton(IDialogConstants.OK_ID).isDisposed()) {
+ getButton(IDialogConstants.OK_ID).setEnabled(status.isOK());
+ }
+ }
+
+ /**
+ * Validate the current input and update the button and the error message.
+ */
+ private void validateInput() {
+ IStatus status = isInputValid();
+ updateStatus(status);
+ }
+
+ /**
+ * The label provider used to display the speed grades in the combo viewer.
+ */
+ class GradeLabelProvider extends LabelProvider {
+ @Override
+ public String getText(Object element) {
+ if(element instanceof IntervalGrade) {
+ IntervalGrade grade = (IntervalGrade) element;
+ return grade.getName() + " ("+grade.getValue()+" "+Messages.IntervalConfigDialog_SECOND_ABBR+")"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+ return super.getText(element);
+ }
+ }
+
+ /**
+ * Get the current the speed grades in an array of Grade.
+ *
+ * @return The current speed grades.
+ */
+ IntervalGrade[] getGrades(){
+ List<IntervalGrade> gradeList = new ArrayList<IntervalGrade>();
+ IPreferenceStore prefStore = UIPlugin.getDefault().getPreferenceStore();
+ String grades = prefStore.getString(PREF_INTERVAL_GRADES);
+ Assert.isNotNull(grades);
+ StringTokenizer st = new StringTokenizer(grades, "|"); //$NON-NLS-1$
+ while(st.hasMoreTokens()) {
+ String token = st.nextToken();
+ StringTokenizer st2 = new StringTokenizer(token, ":"); //$NON-NLS-1$
+ String name = st2.nextToken();
+ String value = st2.nextToken();
+ try{
+ int seconds = Integer.parseInt(value);
+ if(seconds > 0) {
+ gradeList.add(new IntervalGrade(name, seconds));
+ }
+ }
+ catch (NumberFormatException nfe) {
+ }
+ }
+ return gradeList.toArray(new IntervalGrade[gradeList.size()]);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+ */
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ if(e.getSource() == button1) {
+ text.setEnabled(true);
+ button2.setSelection(false);
+ comboViewer.getCombo().setEnabled(false);
+ } else if(e.getSource() == button2) {
+ comboViewer.getCombo().setEnabled(true);
+ button1.setSelection(false);
+ text.setEnabled(false);
+ }
+ validateInput();
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
+ */
+ @Override
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.swt.events.ModifyListener#modifyText(org.eclipse.swt.events.ModifyEvent)
+ */
+ @Override
+ public void modifyText(ModifyEvent e) {
+ validateInput();
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
+ */
+ @Override
+ public void selectionChanged(SelectionChangedEvent event) {
+ validateInput();
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/src/org/eclipse/tm/te/tcf/processes/ui/internal/dialogs/LaunchObjectDialog.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/dialogs/LaunchObjectDialog.java
index 0d3e326a0..68e018157 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/src/org/eclipse/tm/te/tcf/processes/ui/internal/dialogs/LaunchObjectDialog.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/dialogs/LaunchObjectDialog.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.processes.ui.internal.dialogs;
+package org.eclipse.tcf.te.tcf.processes.ui.internal.dialogs;
import java.util.HashMap;
import java.util.Map;
@@ -15,8 +15,6 @@ import java.util.Map;
import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.window.Window;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
@@ -32,19 +30,19 @@ import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
-import org.eclipse.tm.te.core.utils.text.StringUtil;
-import org.eclipse.tm.te.runtime.services.interfaces.constants.ILineSeparatorConstants;
-import org.eclipse.tm.te.runtime.services.interfaces.constants.ITerminalsConnectorConstants;
-import org.eclipse.tm.te.tcf.filesystem.controls.FSTreeContentProvider;
-import org.eclipse.tm.te.tcf.filesystem.dialogs.FSOpenFileDialog;
-import org.eclipse.tm.te.tcf.filesystem.model.FSTreeNode;
-import org.eclipse.tm.te.tcf.processes.core.interfaces.launcher.IProcessLauncher;
-import org.eclipse.tm.te.tcf.processes.ui.internal.help.IContextHelpIds;
-import org.eclipse.tm.te.tcf.processes.ui.nls.Messages;
-import org.eclipse.tm.te.ui.jface.dialogs.CustomTrayDialog;
-import org.eclipse.tm.te.ui.swt.SWTControlUtil;
+import org.eclipse.tcf.te.core.utils.text.StringUtil;
+import org.eclipse.tcf.te.runtime.services.interfaces.constants.ILineSeparatorConstants;
+import org.eclipse.tcf.te.runtime.services.interfaces.constants.ITerminalsConnectorConstants;
+import org.eclipse.tcf.te.tcf.filesystem.controls.FSTreeContentProvider;
+import org.eclipse.tcf.te.tcf.filesystem.dialogs.FSOpenFileDialog;
+import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.tcf.processes.core.interfaces.launcher.IProcessLauncher;
+import org.eclipse.tcf.te.tcf.processes.ui.help.IContextHelpIds;
+import org.eclipse.tcf.te.tcf.processes.ui.nls.Messages;
+import org.eclipse.tcf.te.ui.jface.dialogs.CustomTrayDialog;
+import org.eclipse.tcf.te.ui.swt.SWTControlUtil;
import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.forms.editor.FormPage;
/**
* Launch object at selected peer dialog.
@@ -53,6 +51,7 @@ public class LaunchObjectDialog extends CustomTrayDialog {
private Text imagePath;
private Button imagePathBrowse;
private Text arguments;
+ /* default */ IPeerModel node;
/* default */ Button lineSeparatorDefault;
/* default */ Button lineSeparatorLF;
/* default */ Button lineSeparatorCRLF;
@@ -91,8 +90,17 @@ public class LaunchObjectDialog extends CustomTrayDialog {
this.part = part;
}
+ /**
+ * Set the peer node that this dialog relates to.
+ *
+ * @param node The peer node.
+ */
+ public void setNode(IPeerModel node) {
+ this.node = node;
+ }
+
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.jface.dialogs.CustomTrayDialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+ * @see org.eclipse.tcf.te.ui.jface.dialogs.CustomTrayDialog#createDialogArea(org.eclipse.swt.widgets.Composite)
*/
@Override
protected Control createDialogArea(Composite parent) {
@@ -120,21 +128,19 @@ public class LaunchObjectDialog extends CustomTrayDialog {
});
imagePathBrowse = new Button(panel, SWT.PUSH);
- imagePathBrowse.setText(org.eclipse.tm.te.ui.nls.Messages.EditBrowseTextControl_button_label);
+ imagePathBrowse.setText(org.eclipse.tcf.te.ui.nls.Messages.EditBrowseTextControl_button_label);
imagePathBrowse.addSelectionListener(new SelectionAdapter() {
@SuppressWarnings("synthetic-access")
@Override
public void widgetSelected(SelectionEvent e) {
- FSOpenFileDialog dialog = new FSOpenFileDialog(part instanceof FormPage ? (FormPage) part : null, getShell(), null);
+ FSOpenFileDialog dialog = new FSOpenFileDialog(getShell());
+ dialog.setInput(node);
if (dialog.open() == Window.OK) {
- ISelection selection = dialog.getSelection();
- if (selection instanceof IStructuredSelection && !selection.isEmpty()) {
- Object candidate = ((IStructuredSelection) selection).getFirstElement();
- if (candidate instanceof FSTreeNode) {
- String absPath = FSTreeContentProvider.getEntryAbsoluteName((FSTreeNode) candidate);
- if (absPath != null) {
- imagePath.setText(absPath);
- }
+ Object candidate = dialog.getFirstResult();
+ if (candidate instanceof FSTreeNode) {
+ String absPath = FSTreeContentProvider.getEntryAbsoluteName((FSTreeNode) candidate);
+ if (absPath != null) {
+ imagePath.setText(absPath);
}
}
}
@@ -331,7 +337,7 @@ public class LaunchObjectDialog extends CustomTrayDialog {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.jface.dialogs.CustomTrayDialog#dispose()
+ * @see org.eclipse.tcf.te.ui.jface.dialogs.CustomTrayDialog#dispose()
*/
@Override
protected void dispose() {
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/dialogs/NewSpeedGradeDialog.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/dialogs/NewSpeedGradeDialog.java
new file mode 100644
index 000000000..8eb35ee70
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/dialogs/NewSpeedGradeDialog.java
@@ -0,0 +1,231 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.processes.ui.internal.dialogs;
+
+import java.util.List;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.StatusDialog;
+import org.eclipse.jface.util.Util;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+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.tcf.te.tcf.processes.ui.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.processes.ui.model.IntervalGrade;
+import org.eclipse.tcf.te.tcf.processes.ui.nls.Messages;
+
+/**
+ * The dialog to create a new grade for refreshing the process list.
+ */
+public class NewSpeedGradeDialog extends StatusDialog implements ModifyListener {
+ // The text field to enter the name.
+ private Text nameText;
+ // The text field to enter the interval value.
+ private Text valueText;
+ // The grade that is currently edited.
+ private IntervalGrade intervalGrade;
+ // The grade list currently edited.
+ private List<IntervalGrade> grades;
+
+
+ /**
+ * Constructor
+ */
+ public NewSpeedGradeDialog(Shell parent) {
+ super(parent);
+ updateStatus(new Status(IStatus.INFO, UIPlugin.getUniqueIdentifier(), Util.ZERO_LENGTH_STRING));
+ }
+
+ /**
+ * Set the currently edited grade list for validation purpose.
+ *
+ * @param grades The grade list.
+ */
+ public void setGrades(List<IntervalGrade> grades) {
+ this.grades = grades;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.dialogs.StatusDialog#configureShell(org.eclipse.swt.widgets.Shell)
+ */
+ @Override
+ protected void configureShell(Shell shell) {
+ shell.setText(Messages.NewSpeedGradeDialog_DialogTitle);
+ super.configureShell(shell);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+ */
+ @Override
+ protected Control createDialogArea(Composite parent) {
+ // create a composite with standard margins and spacing
+ Composite composite = new Composite(parent, SWT.NONE);
+ GridLayout layout = new GridLayout(2, false);
+ layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
+ layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
+ layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
+ layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
+ composite.setLayout(layout);
+ composite.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ //Create the message area.
+ Label label = new Label(composite, SWT.NONE);
+ GridData data = new GridData();
+ data.horizontalSpan = 2;
+ label.setLayoutData(data);
+ label.setText(Messages.NewSpeedGradeDialog_DialogMessage);
+
+ label = new Label(composite, SWT.NONE);
+ label.setText(Messages.NewSpeedGradeDialog_NameLabel);
+
+ nameText = new Text(composite, SWT.SINGLE | SWT.BORDER);
+ nameText.setTextLimit(Text.LIMIT);
+ nameText.addModifyListener(this);
+ data = new GridData(SWT.FILL, SWT.CENTER, true, false);
+ data.widthHint = 250;
+ nameText.setLayoutData(data);
+
+ label = new Label(composite, SWT.NONE);
+ label.setText(Messages.NewSpeedGradeDialog_ValueLabel);
+
+ valueText = new Text(composite, SWT.SINGLE | SWT.BORDER);
+ valueText.setTextLimit(Text.LIMIT);
+ valueText.addModifyListener(this);
+ data = new GridData(SWT.FILL, SWT.CENTER, true, false);
+ valueText.setLayoutData(data);
+
+ applyDialogFont(composite);
+
+ return composite;
+ }
+
+ /**
+ * Check if the current input is valid and return an IStatus object to return
+ * the checking result, containing the message and the validating code.
+ *
+ * @return A status to indicate if the input is valid.
+ */
+ private IStatus isInputValid() {
+ String pluginId = UIPlugin.getUniqueIdentifier();
+ String name = nameText.getText();
+ if (name == null || name.trim().length() == 0) {
+ return new Status(IStatus.CANCEL, pluginId, null);
+ }
+ if (nameExists(name)) {
+ return new Status(IStatus.ERROR, pluginId, NLS.bind(Messages.NewSpeedGradeDialog_GradeExists, name));
+ }
+ String txt = valueText.getText();
+ if (txt == null || txt.trim().length() == 0) {
+ return new Status(IStatus.CANCEL, pluginId, null);
+ }
+ try {
+ int interval = Integer.parseInt(txt.trim());
+ if (interval <= 0) return new Status(IStatus.ERROR, pluginId, Messages.IntervalConfigDialog_BiggerThanZero);
+ name = valueExists(interval);
+ if(name != null) return new Status(IStatus.WARNING, pluginId, NLS.bind(Messages.NewSpeedGradeDialog_GradeSameValue, name));
+ }
+ catch (NumberFormatException e) {
+ return new Status(IStatus.ERROR, pluginId, Messages.IntervalConfigDialog_InvalidNumber);
+ }
+ return Status.OK_STATUS;
+ }
+
+ /**
+ * Check if the grade with the same value exists. Return its
+ * name if it exists.
+ *
+ * @param value The value to be checked.
+ * @return The grade's name or null if no such grade is found.
+ */
+ private String valueExists(int interval) {
+ for(IntervalGrade grade:grades) {
+ if(grade != intervalGrade && grade.getValue() == interval)
+ return grade.getName();
+ }
+ return null;
+ }
+
+ /**
+ * Check if the grade with the same name exists. Return true
+ * if it exists.
+ *
+ * @param name The name to be checked.
+ * @return true if there exists a grade with the same name.
+ */
+ private boolean nameExists(String name) {
+ for(IntervalGrade grade:grades) {
+ if(name.equals(grade.getName()))
+ return true;
+ }
+ return false;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.dialogs.Dialog#okPressed()
+ */
+ @Override
+ protected void okPressed() {
+ String name = nameText.getText().trim();
+ int value = Integer.parseInt(valueText.getText().trim());
+ intervalGrade = new IntervalGrade(name, value);
+ super.okPressed();
+ }
+
+ /**
+ * Get the input result, a time interval.
+ *
+ * @return The input result.
+ */
+ public IntervalGrade getResult() {
+ return intervalGrade;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.dialogs.StatusDialog#updateButtonsEnableState(org.eclipse.core.runtime.IStatus)
+ */
+ @Override
+ protected void updateButtonsEnableState(IStatus status) {
+ if (getButton(IDialogConstants.OK_ID) != null && !getButton(IDialogConstants.OK_ID).isDisposed()) {
+ getButton(IDialogConstants.OK_ID).setEnabled(status.isOK());
+ }
+ }
+
+ /**
+ * Validate the current input and update the button and the error message.
+ */
+ private void validateInput() {
+ IStatus status = isInputValid();
+ updateStatus(status);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.swt.events.ModifyListener#modifyText(org.eclipse.swt.events.ModifyEvent)
+ */
+ @Override
+ public void modifyText(ModifyEvent e) {
+ validateInput();
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/filters/SingleThreadFilter.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/filters/SingleThreadFilter.java
new file mode 100644
index 000000000..b84f8fe09
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/filters/SingleThreadFilter.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.processes.ui.internal.filters;
+
+import org.eclipse.jface.viewers.TreePath;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.tcf.te.tcf.processes.ui.model.ProcessTreeNode;
+
+/**
+ * The filter to filter out the single thread of a process which has the same name
+ * and id with its parent process.
+ */
+public class SingleThreadFilter extends ViewerFilter {
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
+ */
+ @Override
+ public boolean select(Viewer viewer, Object parentElement, Object element) {
+ if(parentElement instanceof TreePath) {
+ parentElement = ((TreePath)parentElement).getLastSegment();
+ }
+ if(parentElement instanceof ProcessTreeNode && element instanceof ProcessTreeNode) {
+ ProcessTreeNode parent = (ProcessTreeNode) parentElement;
+ ProcessTreeNode child = (ProcessTreeNode) element;
+ if(parent.children.size() == 1) {
+ if(parent.pid == child.pid) {
+ if (parent.name != null) {
+ return !parent.name.equals(child.name);
+ }
+ else if (child.name != null) {
+ return !child.name.equals(parent.name);
+ }
+ return false;
+ }
+ }
+ }
+ return true;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/src/org/eclipse/tm/te/tcf/processes/ui/internal/handler/AbstractChannelCommandHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/handler/AbstractChannelCommandHandler.java
index 92c3e5c3a..9b0ac52d8 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/src/org/eclipse/tm/te/tcf/processes/ui/internal/handler/AbstractChannelCommandHandler.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/handler/AbstractChannelCommandHandler.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.processes.ui.internal.handler;
+package org.eclipse.tcf.te.tcf.processes.ui.internal.handler;
import java.util.Iterator;
@@ -20,21 +20,20 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IPeer;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer;
-import org.eclipse.tm.te.runtime.properties.PropertiesContainer;
-import org.eclipse.tm.te.runtime.statushandler.StatusHandlerManager;
-import org.eclipse.tm.te.runtime.statushandler.interfaces.IStatusHandler;
-import org.eclipse.tm.te.runtime.statushandler.interfaces.IStatusHandlerConstants;
-import org.eclipse.tm.te.tcf.core.Tcf;
-import org.eclipse.tm.te.tcf.core.interfaces.IChannelManager;
-import org.eclipse.tm.te.tcf.locator.interfaces.nodes.IPeerModel;
-import org.eclipse.tm.te.tcf.processes.ui.activator.UIPlugin;
-import org.eclipse.tm.te.tcf.processes.ui.internal.help.IContextHelpIds;
-import org.eclipse.tm.te.tcf.processes.ui.nls.Messages;
-import org.eclipse.tm.te.ui.swt.DisplayUtil;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.runtime.properties.PropertiesContainer;
+import org.eclipse.tcf.te.runtime.statushandler.StatusHandlerManager;
+import org.eclipse.tcf.te.runtime.statushandler.interfaces.IStatusHandler;
+import org.eclipse.tcf.te.runtime.statushandler.interfaces.IStatusHandlerConstants;
+import org.eclipse.tcf.te.tcf.core.Tcf;
+import org.eclipse.tcf.te.tcf.core.interfaces.IChannelManager;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.tcf.processes.ui.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.processes.ui.help.IContextHelpIds;
+import org.eclipse.tcf.te.tcf.processes.ui.nls.Messages;
+import org.eclipse.tcf.te.ui.swt.DisplayUtil;
import org.eclipse.ui.handlers.HandlerUtil;
/**
@@ -63,7 +62,7 @@ public abstract class AbstractChannelCommandHandler extends AbstractHandler {
// If the peer is available, we can open a channel to the remote peer
if (peer != null) {
// Get the channel
- Tcf.getChannelManager().openChannel(peer, new IChannelManager.DoneOpenChannel() {
+ Tcf.getChannelManager().openChannel(peer, false, new IChannelManager.DoneOpenChannel() {
@Override
public void doneOpenChannel(final Throwable error, final IChannel channel) {
if (error == null) {
@@ -78,19 +77,7 @@ public abstract class AbstractChannelCommandHandler extends AbstractHandler {
handleException(channel, new CoreException(status));
} else {
// Close the channel
- if (channel != null) {
- final IChannel finChannel = channel;
- if (Protocol.isDispatchThread()) {
- finChannel.close();
- } else {
- Protocol.invokeAndWait(new Runnable() {
- @Override
- public void run() {
- finChannel.close();
- }
- });
- }
- }
+ if (channel != null) Tcf.getChannelManager().closeChannel(channel);
}
}
});
@@ -145,19 +132,7 @@ public abstract class AbstractChannelCommandHandler extends AbstractHandler {
Assert.isNotNull(exception);
// Close the backend channel
- if (channel != null) {
- final IChannel finChannel = channel;
- if (Protocol.isDispatchThread()) {
- finChannel.close();
- } else {
- Protocol.invokeAndWait(new Runnable() {
- @Override
- public void run() {
- finChannel.close();
- }
- });
- }
- }
+ if (channel != null) Tcf.getChannelManager().closeChannel(channel);
// Get the status handler
IStatusHandler[] handler = StatusHandlerManager.getInstance().getHandler(getClass());
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/handler/ConfigIntervalDynamicContribution.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/handler/ConfigIntervalDynamicContribution.java
new file mode 100644
index 000000000..5efc51906
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/handler/ConfigIntervalDynamicContribution.java
@@ -0,0 +1,197 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.processes.ui.internal.handler;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.StringTokenizer;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.ActionContributionItem;
+import org.eclipse.jface.action.IContributionItem;
+import org.eclipse.jface.action.Separator;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.tcf.processes.ui.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.processes.ui.internal.preferences.IPreferenceConsts;
+import org.eclipse.tcf.te.tcf.processes.ui.model.ProcessModel;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.actions.CompoundContributionItem;
+
+/**
+ * The dynamic contribution class to create a drop down menu of interval configuration.
+ */
+public class ConfigIntervalDynamicContribution extends CompoundContributionItem implements IPreferenceConsts {
+
+ /**
+ * The action to allow a most recently used interval to be selected.
+ */
+ class MRUAction extends Action {
+ // The process model.
+ private ProcessModel model;
+ // The interval of this most recently used item.
+ private int seconds;
+ /**
+ * Constructor
+ *
+ * @param model The process model.
+ * @param seconds The interval time.
+ */
+ public MRUAction(ProcessModel model, int seconds) {
+ super("" + seconds + " S", AS_RADIO_BUTTON); //$NON-NLS-1$//$NON-NLS-2$
+ this.seconds = seconds;
+ this.model = model;
+ if(model.getInterval() == seconds) {
+ setChecked(true);
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.action.Action#run()
+ */
+ @Override
+ public void run() {
+ if (isChecked()) {
+ this.model.setInterval(seconds);
+ }
+ }
+ }
+
+ /**
+ * The action to allow a speed grade to be selected.
+ */
+ class GradeAction extends Action {
+ // The process model.
+ private ProcessModel model;
+ // The interval time represented by this grade.
+ private int seconds;
+
+ /**
+ * Constructor
+ *
+ * @param model The process model.
+ * @param name The grade name.
+ * @param seconds The interval time.
+ */
+ public GradeAction(ProcessModel model, String name, int seconds) {
+ super(name+" ("+seconds+" s)", AS_RADIO_BUTTON); //$NON-NLS-1$//$NON-NLS-2$
+ this.model = model;
+ this.seconds = seconds;
+ if(model.getInterval() == seconds) {
+ setChecked(true);
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.action.Action#run()
+ */
+ @Override
+ public void run() {
+ if (isChecked()) {
+ this.model.setInterval(seconds);
+ model.addMRUInterval(seconds);
+ }
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.actions.CompoundContributionItem#getContributionItems()
+ */
+ @Override
+ protected IContributionItem[] getContributionItems() {
+ IEditorInput editorInput = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor().getEditorInput();
+ IPeerModel peerModel = (IPeerModel) editorInput.getAdapter(IPeerModel.class);
+ List<IContributionItem> items = new ArrayList<IContributionItem>();
+ if (peerModel != null) {
+ ProcessModel model = ProcessModel.getProcessModel(peerModel);
+ List<IContributionItem> groupItems = createGradeActions(model);
+ if(!groupItems.isEmpty()) {
+ items.addAll(groupItems);
+ }
+ groupItems = createMRUActions(model);
+ if(!groupItems.isEmpty()) {
+ items.add(new Separator("MRU")); //$NON-NLS-1$
+ items.addAll(groupItems);
+ }
+ }
+ return items.toArray(new IContributionItem[items.size()]);
+ }
+
+ /**
+ * Create and return the speed grade actions.
+ *
+ * @param model The current process model.
+ * @return The grade action list.
+ */
+ private List<IContributionItem> createGradeActions(ProcessModel model) {
+ List<IContributionItem> items = new ArrayList<IContributionItem>();
+ IPreferenceStore prefStore = UIPlugin.getDefault().getPreferenceStore();
+ String grades = prefStore.getString(PREF_INTERVAL_GRADES);
+ Assert.isNotNull(grades);
+ StringTokenizer st = new StringTokenizer(grades, "|"); //$NON-NLS-1$
+ while(st.hasMoreTokens()) {
+ String token = st.nextToken();
+ StringTokenizer st2 = new StringTokenizer(token, ":"); //$NON-NLS-1$
+ String name = st2.nextToken();
+ String value = st2.nextToken();
+ try{
+ int seconds = Integer.parseInt(value);
+ if(seconds > 0) {
+ items.add(new ActionContributionItem(new GradeAction(model, name, seconds)));
+ }
+ }
+ catch (NumberFormatException nfe) {
+ }
+ }
+ return items;
+ }
+
+ /**
+ * Create and return the most recently used actions.
+ *
+ * @param model The current process model.
+ * @return The MRU action list.
+ */
+ private List<IContributionItem> createMRUActions(ProcessModel model) {
+ List<IContributionItem> items = new ArrayList<IContributionItem>();
+ IPreferenceStore prefStore = UIPlugin.getDefault().getPreferenceStore();
+ String mruList = prefStore.getString(PREF_INTERVAL_MRU_LIST);
+ if (mruList != null) {
+ StringTokenizer st = new StringTokenizer(mruList, ":"); //$NON-NLS-1$
+ int maxCount = prefStore.getInt(PREF_INTERVAL_MRU_COUNT);
+ int count = 0;
+ List<Integer> mru = new ArrayList<Integer>();
+ while (st.hasMoreTokens()) {
+ String token = st.nextToken();
+ try {
+ int seconds = Integer.parseInt(token);
+ if (seconds > 0) {
+ mru.add(Integer.valueOf(seconds));
+ count ++;
+ if (count >= maxCount) break;
+ }
+ }
+ catch (NumberFormatException nfe) {
+ }
+ }
+ if(count > 0) {
+ for(int seconds : mru) {
+ items.add(new ActionContributionItem(new MRUAction(model, seconds)));
+ }
+ }
+ }
+ return items;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/handler/ConfigRefreshIntervalHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/handler/ConfigRefreshIntervalHandler.java
new file mode 100644
index 000000000..7fb391645
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/handler/ConfigRefreshIntervalHandler.java
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.processes.ui.internal.handler;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.window.Window;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.tcf.processes.ui.internal.dialogs.IntervalConfigDialog;
+import org.eclipse.tcf.te.tcf.processes.ui.model.ProcessModel;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+/**
+ * The handler to configure the refreshing interval in a dialog.
+ */
+public class ConfigRefreshIntervalHandler extends AbstractHandler {
+
+ /*
+ * (non-Javadoc)
+ * @see
+ * org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+ */
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ IEditorInput editorInput = HandlerUtil.getActiveEditorInputChecked(event);
+ IPeerModel peer = (IPeerModel) editorInput.getAdapter(IPeerModel.class);
+ if (peer != null) {
+ Shell parent = HandlerUtil.getActiveShellChecked(event);
+ IntervalConfigDialog dialog = new IntervalConfigDialog(parent);
+ if (dialog.open() == Window.OK) {
+ int interval = dialog.getResult();
+ ProcessModel processModel = ProcessModel.getProcessModel(peer);
+ processModel.setInterval(interval);
+ processModel.addMRUInterval(interval);
+ }
+ }
+ return null;
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/src/org/eclipse/tm/te/tcf/processes/ui/internal/handler/LaunchProcessesCommandHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/handler/LaunchProcessesCommandHandler.java
index 9c6ca4881..8e76d4b6c 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/src/org/eclipse/tm/te/tcf/processes/ui/internal/handler/LaunchProcessesCommandHandler.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/handler/LaunchProcessesCommandHandler.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.processes.ui.internal.handler;
+package org.eclipse.tcf.te.tcf.processes.ui.internal.handler;
import java.util.Map;
@@ -17,19 +17,19 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.window.Window;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.te.runtime.callback.Callback;
-import org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer;
-import org.eclipse.tm.te.runtime.properties.PropertiesContainer;
-import org.eclipse.tm.te.runtime.statushandler.StatusHandlerManager;
-import org.eclipse.tm.te.runtime.statushandler.interfaces.IStatusHandler;
-import org.eclipse.tm.te.runtime.statushandler.interfaces.IStatusHandlerConstants;
-import org.eclipse.tm.te.tcf.locator.interfaces.nodes.IPeerModel;
-import org.eclipse.tm.te.tcf.processes.core.interfaces.launcher.IProcessLauncher;
-import org.eclipse.tm.te.tcf.processes.core.launcher.ProcessLauncher;
-import org.eclipse.tm.te.tcf.processes.ui.internal.dialogs.LaunchObjectDialog;
-import org.eclipse.tm.te.tcf.processes.ui.internal.help.IContextHelpIds;
-import org.eclipse.tm.te.tcf.processes.ui.nls.Messages;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.te.tcf.processes.ui.help.IContextHelpIds;
+import org.eclipse.tcf.te.tcf.processes.ui.internal.dialogs.LaunchObjectDialog;
+import org.eclipse.tcf.te.tcf.processes.ui.nls.Messages;
+import org.eclipse.tcf.te.runtime.callback.Callback;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.runtime.properties.PropertiesContainer;
+import org.eclipse.tcf.te.runtime.statushandler.StatusHandlerManager;
+import org.eclipse.tcf.te.runtime.statushandler.interfaces.IStatusHandler;
+import org.eclipse.tcf.te.runtime.statushandler.interfaces.IStatusHandlerConstants;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.tcf.processes.core.interfaces.launcher.IProcessLauncher;
+import org.eclipse.tcf.te.tcf.processes.core.launcher.ProcessLauncher;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.handlers.HandlerUtil;
@@ -40,7 +40,7 @@ import org.eclipse.ui.handlers.HandlerUtil;
public class LaunchProcessesCommandHandler extends AbstractChannelCommandHandler {
/* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.processes.ui.internal.handler.AbstractChannelCommandHandler#execute(org.eclipse.core.commands.ExecutionEvent, org.eclipse.tm.tcf.protocol.IChannel, org.eclipse.tm.te.tcf.locator.interfaces.nodes.IPeerModel, org.eclipse.tm.te.tcf.processes.ui.internal.handler.AbstractChannelCommandHandler.DoneExecute)
+ * @see org.eclipse.tcf.te.tcf.processes.ui.internal.handler.AbstractChannelCommandHandler#execute(org.eclipse.core.commands.ExecutionEvent, org.eclipse.tcf.protocol.IChannel, org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel, org.eclipse.tcf.te.tcf.processes.ui.internal.handler.AbstractChannelCommandHandler.DoneExecute)
*/
@Override
protected void execute(final ExecutionEvent event, final IChannel channel, final IPeerModel node, final DoneExecute callback) {
@@ -56,6 +56,7 @@ public class LaunchProcessesCommandHandler extends AbstractChannelCommandHandler
IEditorPart editorPart = activePart != null ? (IEditorPart)activePart.getAdapter(IEditorPart.class) : null;
// Open the dialog
LaunchObjectDialog dialog = doCreateDialog(editorPart, shell);
+ dialog.setNode(node);
if (dialog.open() == Window.OK) {
// Get the new launch attributes
Map<String, Object> launchAttributes = dialog.getLaunchAttributes();
@@ -71,7 +72,7 @@ public class LaunchProcessesCommandHandler extends AbstractChannelCommandHandler
container.setProperties(launchAttributes);
launcher.launch(channel.getRemotePeer(), container, new Callback() {
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.callback.Callback#internalDone(java.lang.Object, org.eclipse.core.runtime.IStatus)
+ * @see org.eclipse.tcf.te.runtime.callback.Callback#internalDone(java.lang.Object, org.eclipse.core.runtime.IStatus)
*/
@Override
protected void internalDone(Object caller, IStatus status) {
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/handler/RefreshProcessListHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/handler/RefreshProcessListHandler.java
new file mode 100644
index 000000000..deab215d0
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/handler/RefreshProcessListHandler.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.processes.ui.internal.handler;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.tcf.processes.ui.model.ProcessModel;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+/**
+ * The handler to refresh the process list.
+ */
+public class RefreshProcessListHandler extends AbstractHandler {
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+ */
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ IEditorInput editorInput = HandlerUtil.getActiveEditorInputChecked(event);
+ IPeerModel peer = (IPeerModel) editorInput.getAdapter(IPeerModel.class);
+ if (peer != null) {
+ ProcessModel processModel = ProcessModel.getProcessModel(peer);
+ processModel.refresh();
+ }
+ return null;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/handler/StartPollingHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/handler/StartPollingHandler.java
new file mode 100644
index 000000000..7a2db5f3d
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/handler/StartPollingHandler.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.processes.ui.internal.handler;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.tcf.processes.ui.model.ProcessModel;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+/**
+ * The handler to start the periodical polling in the process monitor.
+ */
+public class StartPollingHandler extends AbstractHandler {
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+ */
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ IEditorInput editorInput = HandlerUtil.getActiveEditorInputChecked(event);
+ IPeerModel peer = (IPeerModel) editorInput.getAdapter(IPeerModel.class);
+ if (peer != null) {
+ ProcessModel processModel = ProcessModel.getProcessModel(peer);
+ processModel.startPolling();
+ }
+ return null;
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/handler/StopPollingHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/handler/StopPollingHandler.java
new file mode 100644
index 000000000..245015cd1
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/handler/StopPollingHandler.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.processes.ui.internal.handler;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.tcf.processes.ui.model.ProcessModel;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+/**
+ * The handler to stop the periodical polling in the process monitor.
+ */
+public class StopPollingHandler extends AbstractHandler {
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+ */
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ IEditorInput editorInput = HandlerUtil.getActiveEditorInputChecked(event);
+ IPeerModel peer = (IPeerModel) editorInput.getAdapter(IPeerModel.class);
+ if (peer != null) {
+ ProcessModel processModel = ProcessModel.getProcessModel(peer);
+ processModel.stopPolling();
+ }
+ return null;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/preferences/IPreferenceConsts.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/preferences/IPreferenceConsts.java
new file mode 100644
index 000000000..5f6e9c75b
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/preferences/IPreferenceConsts.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.processes.ui.internal.preferences;
+
+/**
+ * The constants for the preferences used in the process monitor.
+ */
+public interface IPreferenceConsts {
+ // The key to access the interval grades for refreshing.
+ String PREF_INTERVAL_GRADES = "PrefIntervalGrades"; //$NON-NLS-1$
+ // The default value of the interval grades.
+ String DEFAULT_INTERVAL_GRADES = "Slow:10|Normal:5|Fast:1"; //$NON-NLS-1$
+ // The key to access the max count of the most recently used intervals.
+ String PREF_INTERVAL_MRU_COUNT = "PrefIntervalMRUCount"; //$NON-NLS-1$
+ // The key to access the list of the most recently used intervals.
+ String PREF_INTERVAL_MRU_LIST = "PrefIntervalMRUList"; //$NON-NLS-1$
+ // The default count of the most recently used intervals.
+ int DEFAULT_INTERVAL_MRU_COUNT = 3;
+ // The key to access the last selected interval.
+ String PREF_LAST_INTERVAL = "PrefLastInterval"; //$NON-NLS-1$
+ // The default last selected interval value.
+ int DEFAULT_LAST_INTERVAL = 5;
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/preferences/PreferencesInitializer.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/preferences/PreferencesInitializer.java
new file mode 100644
index 000000000..48c5dfa3e
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/preferences/PreferencesInitializer.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.processes.ui.internal.preferences;
+
+import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.tcf.te.tcf.processes.ui.activator.UIPlugin;
+
+
+/**
+ * The bundle's preference initializer implementation.
+ */
+public class PreferencesInitializer extends AbstractPreferenceInitializer implements IPreferenceConsts {
+
+ /**
+ * Constructor.
+ */
+ public PreferencesInitializer() {
+ super();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
+ */
+ @Override
+ public void initializeDefaultPreferences() {
+ IPreferenceStore preferenceStore = UIPlugin.getDefault().getPreferenceStore();
+ preferenceStore.setDefault(PREF_INTERVAL_GRADES, DEFAULT_INTERVAL_GRADES);
+ preferenceStore.setDefault(PREF_INTERVAL_MRU_COUNT, DEFAULT_INTERVAL_MRU_COUNT);
+ preferenceStore.setDefault(PREF_LAST_INTERVAL, DEFAULT_LAST_INTERVAL);
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/preferences/ProcessPreferencePage.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/preferences/ProcessPreferencePage.java
new file mode 100644
index 000000000..9568e7081
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/preferences/ProcessPreferencePage.java
@@ -0,0 +1,575 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.processes.ui.internal.preferences;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.StringTokenizer;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.IMessageProvider;
+import org.eclipse.jface.layout.PixelConverter;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferencePage;
+import org.eclipse.jface.viewers.DoubleClickEvent;
+import org.eclipse.jface.viewers.IDoubleClickListener;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.window.Window;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.KeyAdapter;
+import org.eclipse.swt.events.KeyEvent;
+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.graphics.Font;
+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.Table;
+import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.tcf.te.runtime.utils.Host;
+import org.eclipse.tcf.te.tcf.processes.ui.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.processes.ui.internal.dialogs.EditSpeedGradeDialog;
+import org.eclipse.tcf.te.tcf.processes.ui.internal.dialogs.NewSpeedGradeDialog;
+import org.eclipse.tcf.te.tcf.processes.ui.model.IntervalGrade;
+import org.eclipse.tcf.te.tcf.processes.ui.nls.Messages;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * The preference page for Process Monitor.
+ */
+public class ProcessPreferencePage extends PreferencePage implements IWorkbenchPreferencePage, IPreferenceConsts {
+
+ // The table to configure the refreshing grades.
+ TableViewer gradesTable;
+ // The button to add a grade.
+ Button addButton;
+ // The button to edit a grade.
+ Button editButton;
+ // The button to remove a grade.
+ Button removeButton;
+ // The text field to enter the maximum count of MRU
+ Text mruCountText;
+ // The currently edited grades.
+ List<IntervalGrade> grades;
+
+ /**
+ * Constructor.
+ */
+ public ProcessPreferencePage() {
+ setDescription(Messages.ProcessPreferencePage_PageDescription);
+ }
+
+ /**
+ * @see PreferencePage#createControl(Composite)
+ */
+ @Override
+ public void createControl(Composite parent) {
+ super.createControl(parent);
+ PlatformUI.getWorkbench().getHelpSystem()
+ .setHelp(getControl(), UIPlugin.getUniqueIdentifier() + ".preferencePage"); //$NON-NLS-1$
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite)
+ */
+ @Override
+ protected Control createContents(Composite parent) {
+ Font font = parent.getFont();
+
+ // The main composite
+ Composite composite = new Composite(parent, SWT.NONE);
+ GridLayout layout = new GridLayout();
+ layout.marginHeight = 10;
+ layout.marginWidth = 0;
+ layout.verticalSpacing = 10;
+ layout.numColumns = 2;
+ composite.setLayout(layout);
+ composite.setFont(font);
+ createMRUField(composite);
+ createTable(composite);
+ createButtons(composite);
+ return composite;
+ }
+
+ /**
+ * Creates the field to edit the maximum MRU count.
+ */
+ private void createMRUField(Composite composite) {
+ GridLayout layout;
+ Composite mruGroup = new Composite(composite, SWT.NONE);
+ GridData data = new GridData(SWT.FILL, SWT.CENTER, true, false);
+ data.horizontalSpan = 2;
+ mruGroup.setLayoutData(data);
+ layout = new GridLayout();
+ layout.marginHeight = 0;
+ layout.marginWidth = 0;
+ layout.numColumns = 2;
+ mruGroup.setLayout(layout);
+ Label label = new Label(mruGroup, SWT.NONE);
+ label.setText(Messages.ProcessPreferencePage_MRUCountLabel);
+ mruCountText = new Text(mruGroup, SWT.BORDER | SWT.SINGLE);
+ IPreferenceStore prefStore = UIPlugin.getDefault().getPreferenceStore();
+ int maxCount = prefStore.getInt(PREF_INTERVAL_MRU_COUNT);
+ mruCountText.setText("" + maxCount); //$NON-NLS-1$
+ data = new GridData();
+ data.widthHint = 50;
+ mruCountText.setLayoutData(data);
+ mruCountText.addModifyListener(new ModifyListener() {
+ @Override
+ public void modifyText(ModifyEvent e) {
+ validateInput();
+ }
+ });
+ }
+
+ /**
+ * Validate the current input and update the button and the error message.
+ */
+ void validateInput() {
+ IStatus status = isInputValid();
+ setValid(status.isOK());
+ if (status.isOK()) {
+ setMessage(null);
+ }
+ else {
+ int severity = status.getSeverity();
+ int msgType = IMessageProvider.NONE;
+ String message = status.getMessage();
+ switch (severity) {
+ case IStatus.ERROR:
+ msgType = IMessageProvider.ERROR;
+ break;
+ case IStatus.INFO:
+ msgType = IMessageProvider.INFORMATION;
+ break;
+ case IStatus.WARNING:
+ msgType = IMessageProvider.WARNING;
+ break;
+ case IStatus.CANCEL:
+ msgType = IMessageProvider.NONE;
+ break;
+ }
+ setMessage(message, msgType);
+ }
+ }
+
+ /**
+ * Check if the current input is valid and return a status to
+ * describe the validity.
+ *
+ * @return The checking result.
+ */
+ private IStatus isInputValid() {
+ String txt = mruCountText.getText();
+ if (txt == null || txt.trim().length() == 0) {
+ return new Status(IStatus.ERROR, UIPlugin.getUniqueIdentifier(), Messages.ProcessPreferencePage_MaxMRUCount);
+ }
+ try {
+ int interval = Integer.parseInt(txt.trim());
+ if (interval <= 0) return new Status(IStatus.ERROR, UIPlugin.getUniqueIdentifier(), Messages.ProcessPreferencePage_BiggerThanZero);
+ }
+ catch (NumberFormatException e) {
+ return new Status(IStatus.ERROR, UIPlugin.getUniqueIdentifier(), Messages.ProcessPreferencePage_InvalidNumber);
+ }
+ if (grades.isEmpty()) {
+ return new Status(IStatus.ERROR, UIPlugin.getUniqueIdentifier(), Messages.ProcessPreferencePage_DefineMoreThanOne);
+ }
+ return Status.OK_STATUS;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.preference.PreferencePage#performOk()
+ */
+ @Override
+ public boolean performOk() {
+ IPreferenceStore prefStore = UIPlugin.getDefault().getPreferenceStore();
+ String countText = mruCountText.getText().trim();
+ try{
+ int count = Integer.parseInt(countText);
+ prefStore.setValue(PREF_INTERVAL_MRU_COUNT, count);
+ } catch (NumberFormatException nfe){
+ }
+ StringBuilder builder = new StringBuilder();
+ for (int i = 0; i < grades.size(); i++) {
+ IntervalGrade grade = grades.get(i);
+ if(i > 0) {
+ builder.append('|');
+ }
+ builder.append(grade.getName());
+ builder.append(':');
+ builder.append(grade.getValue());
+ }
+ prefStore.setValue(PREF_INTERVAL_GRADES, builder.toString());
+ return true;
+ }
+
+ /**
+ * Creates and configures the table containing the grades of refreshing the process list.
+ *
+ * @param parent the composite in which the table should be created
+ */
+ private void createTable(Composite parent) {
+ Font font = parent.getFont();
+ // Create table composite
+ Composite tableComposite = new Composite(parent, SWT.NONE);
+ GridLayout layout = new GridLayout();
+ layout.marginHeight = 0;
+ layout.marginWidth = 0;
+ layout.numColumns = 1;
+ GridData gridData = new GridData(GridData.FILL_BOTH);
+ gridData.heightHint = 150;
+ tableComposite.setLayout(layout);
+ tableComposite.setLayoutData(gridData);
+ tableComposite.setFont(font);
+ // Create table
+ gradesTable = new TableViewer(tableComposite, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI | SWT.FULL_SELECTION);
+ Table table = gradesTable.getTable();
+ table.setHeaderVisible(true);
+ table.setLinesVisible(true);
+ table.setFont(font);
+ gridData = new GridData(GridData.FILL_BOTH);
+ gradesTable.getControl().setLayoutData(gridData);
+ gradesTable.setContentProvider(new ListContentProvider());
+
+ gradesTable.addSelectionChangedListener(new ISelectionChangedListener() {
+ @Override
+ public void selectionChanged(SelectionChangedEvent event) {
+ handleTableSelectionChanged(event);
+ }
+ });
+
+ gradesTable.addDoubleClickListener(new IDoubleClickListener() {
+ @Override
+ public void doubleClick(DoubleClickEvent event) {
+ if (!gradesTable.getSelection().isEmpty()) {
+ handleEditButtonPressed();
+ }
+ }
+ });
+ gradesTable.getTable().addKeyListener(new KeyAdapter() {
+ @Override
+ public void keyPressed(KeyEvent event) {
+ if (event.character == SWT.DEL && event.stateMask == 0) {
+ handleRemoveButtonPressed();
+ }
+ }
+ });
+
+ TableColumn column = new TableColumn(table, SWT.LEFT);
+ column.setResizable(true);
+ column.setText(Messages.ProcessPreferencePage_NameLabel);
+ column.setWidth(100);
+ column = new TableColumn(table, SWT.RIGHT);
+ column.setResizable(true);
+ column.setText(Messages.ProcessPreferencePage_ValueLabel);
+ column.setWidth(100);
+ //Create an empty column to pad the table (on Linux).
+ if (!Host.isWindowsHost()) {
+ column = new TableColumn(table, SWT.LEFT);
+ column.setText(""); //$NON-NLS-1$
+ column.setWidth(100);
+ }
+
+ gradesTable.setInput(getGrades());
+ gradesTable.setLabelProvider(new GradeLabelProvider());
+ }
+
+ /**
+ * Create a push button.
+ */
+ Button createPushButton(Composite parent, String label, Image image) {
+ Button button = new Button(parent, SWT.PUSH);
+ button.setFont(parent.getFont());
+ if (image != null) {
+ button.setImage(image);
+ }
+ if (label != null) {
+ button.setText(label);
+ }
+ GridData gd = new GridData();
+ button.setLayoutData(gd);
+ setButtonDimensionHint(button);
+ return button;
+ }
+
+ /**
+ * Set the button's dimension hint.
+ */
+ void setButtonDimensionHint(Button button) {
+ Assert.isNotNull(button);
+ Object gd = button.getLayoutData();
+ if (gd instanceof GridData) {
+ ((GridData) gd).widthHint = getButtonWidthHint(button);
+ ((GridData) gd).horizontalAlignment = GridData.FILL;
+ }
+ }
+
+ /**
+ * Get the button's width hint.
+ */
+ int getButtonWidthHint(Button button) {
+ /* button.setFont(JFaceResources.getDialogFont()); */
+ PixelConverter converter = new PixelConverter(button);
+ int widthHint = converter.convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
+ return Math.max(widthHint, button.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x);
+ }
+
+ /**
+ * Creates the new/edit/remove buttons for the grade table
+ *
+ * @param parent the composite in which the buttons should be created
+ */
+ private void createButtons(Composite parent) {
+ // Create button composite
+ Composite buttonComposite = new Composite(parent, SWT.NONE);
+ GridLayout glayout = new GridLayout();
+ glayout.marginHeight = 0;
+ glayout.marginWidth = 0;
+ glayout.numColumns = 1;
+ GridData gdata = new GridData(GridData.VERTICAL_ALIGN_BEGINNING);
+ buttonComposite.setLayout(glayout);
+ buttonComposite.setLayoutData(gdata);
+ buttonComposite.setFont(parent.getFont());
+
+ // Create buttons
+ addButton = createPushButton(buttonComposite, Messages.ProcessPreferencePage_NewButtonLabel, null);
+ addButton.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent event) {
+ handleAddButtonPressed();
+ }
+ });
+ editButton = createPushButton(buttonComposite, Messages.ProcessPreferencePage_EditButtonLabel, null);
+ editButton.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent event) {
+ handleEditButtonPressed();
+ }
+ });
+ editButton.setEnabled(false);
+ removeButton = createPushButton(buttonComposite, Messages.ProcessPreferencePage_RemoveButtonLabel, null);
+ removeButton.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent event) {
+ handleRemoveButtonPressed();
+ }
+ });
+ removeButton.setEnabled(false);
+ }
+
+ /**
+ * Handle the pressed event of the add button.
+ */
+ void handleAddButtonPressed() {
+ NewSpeedGradeDialog dialog = new NewSpeedGradeDialog(getShell());
+ dialog.setGrades(grades);
+ if (dialog.open() == Window.OK) {
+ IntervalGrade grade = dialog.getResult();
+ grades.add(grade);
+ gradesTable.refresh();
+ }
+ validateInput();
+ }
+
+ /**
+ * Handle the pressed event of the edit button.
+ */
+ void handleEditButtonPressed() {
+ IStructuredSelection selection = (IStructuredSelection) gradesTable.getSelection();
+ IntervalGrade grade = (IntervalGrade) selection.getFirstElement();
+ if (grade != null) {
+ EditSpeedGradeDialog dialog = new EditSpeedGradeDialog(getShell());
+ dialog.setGrades(grades);
+ dialog.setGrade(grade);
+
+ if (dialog.open() == Window.OK) {
+ gradesTable.update(grade, null);
+ }
+ validateInput();
+ }
+ }
+
+ /**
+ * Remove the selection grade.
+ */
+ void handleRemoveButtonPressed() {
+ IStructuredSelection selection = (IStructuredSelection) gradesTable.getSelection();
+ List<IntervalGrade> toRemove = selection.toList();
+ Iterator<IntervalGrade> iter = toRemove.iterator();
+ while (iter.hasNext()) {
+ IntervalGrade grade = iter.next();
+ grades.remove(grade);
+ }
+ gradesTable.refresh();
+ validateInput();
+ }
+
+ /**
+ * Responds to a selection changed event in the variable table
+ *
+ * @param event the selection change event
+ */
+ void handleTableSelectionChanged(SelectionChangedEvent event) {
+ IStructuredSelection selection = ((IStructuredSelection) event.getSelection());
+ IntervalGrade variable = (IntervalGrade) selection.getFirstElement();
+ if (variable == null) {
+ editButton.setEnabled(false);
+ removeButton.setEnabled(false);
+ }
+ else {
+ editButton.setEnabled(selection.size() == 1);
+ removeButton.setEnabled(selection.size() > 0);
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
+ */
+ @Override
+ public void init(IWorkbench workbench) {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.preference.PreferencePage#performDefaults()
+ */
+ @Override
+ protected void performDefaults() {
+ grades = null;
+ gradesTable.setInput(getGrades());
+ gradesTable.refresh();
+ validateInput();
+ super.performDefaults();
+ }
+
+ /**
+ * A content provider that accepts a list as the input and return an array
+ * as the children.
+ */
+ class ListContentProvider implements IStructuredContentProvider {
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.viewers.IContentProvider#dispose()
+ */
+ @Override
+ public void dispose() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
+ */
+ @Override
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
+ */
+ @Override
+ public Object[] getElements(Object inputElement) {
+ if (inputElement instanceof List<?>) {
+ return ((List<?>) inputElement).toArray();
+ }
+ return null;
+ }
+ }
+
+ /**
+ * Get the current the speed grades in an array of Grade.
+ *
+ * @return The current speed grades.
+ */
+ List<IntervalGrade> getGrades() {
+ if (grades == null) {
+ grades = new ArrayList<IntervalGrade>();
+ IPreferenceStore prefStore = UIPlugin.getDefault().getPreferenceStore();
+ String gradestr = prefStore.getString(PREF_INTERVAL_GRADES);
+ Assert.isNotNull(gradestr);
+ StringTokenizer st = new StringTokenizer(gradestr, "|"); //$NON-NLS-1$
+ while (st.hasMoreTokens()) {
+ String token = st.nextToken();
+ StringTokenizer st2 = new StringTokenizer(token, ":"); //$NON-NLS-1$
+ String name = st2.nextToken();
+ String value = st2.nextToken();
+ try {
+ int seconds = Integer.parseInt(value);
+ if (seconds > 0) {
+ IntervalGrade grade = new IntervalGrade(name, seconds);
+ grades.add(grade);
+ }
+ }
+ catch (NumberFormatException nfe) {
+ }
+ }
+ }
+ return grades;
+ }
+
+ /**
+ * The table label provider to display refreshing grades in the table.
+ */
+ class GradeLabelProvider extends LabelProvider implements ITableLabelProvider {
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnImage(java.lang.Object, int)
+ */
+ @Override
+ public Image getColumnImage(Object element, int columnIndex) {
+ return null;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnText(java.lang.Object, int)
+ */
+ @Override
+ public String getColumnText(Object element, int columnIndex) {
+ if (element instanceof IntervalGrade) {
+ IntervalGrade grade = (IntervalGrade) element;
+ switch (columnIndex) {
+ case 0:
+ return grade.getName();
+ case 1:
+ int value = grade.getValue();
+ if (value == 0) {
+ return ""; //$NON-NLS-1$
+ }
+ return "" + value; //$NON-NLS-1$
+ }
+ }
+ return null;
+ }
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/tabbed/AdvancedPropertiesSection.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/tabbed/AdvancedPropertiesSection.java
new file mode 100644
index 000000000..f2306082f
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/tabbed/AdvancedPropertiesSection.java
@@ -0,0 +1,126 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.processes.ui.internal.tabbed;
+
+import java.util.Map;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.tcf.te.tcf.processes.ui.model.ProcessTreeNode;
+import org.eclipse.tcf.te.tcf.processes.ui.nls.Messages;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.views.properties.tabbed.AbstractPropertySection;
+import org.eclipse.ui.views.properties.tabbed.ITabbedPropertyConstants;
+import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
+
+/**
+ * The property section to display the advanced properties of a process context.
+ */
+public class AdvancedPropertiesSection extends AbstractPropertySection {
+ // The properties map.
+ protected Map<String, Object> properties;
+
+ // The table control to display the properties.
+ private TableViewer viewer;
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#createControls(org.eclipse.swt.widgets.Composite, org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage)
+ */
+ @Override
+ public void createControls(Composite parent, TabbedPropertySheetPage aTabbedPropertySheetPage) {
+ super.createControls(parent, aTabbedPropertySheetPage);
+ Composite composite = getWidgetFactory().createFlatFormComposite(parent);
+ Table table = getWidgetFactory().createTable(composite, SWT.FULL_SELECTION | SWT.MULTI | SWT.BORDER);
+ FormData data = new FormData();
+ data.left = new FormAttachment(0, 0);
+ data.right = new FormAttachment(100, 0);
+ data.top = new FormAttachment(0, ITabbedPropertyConstants.VSPACE);
+ data.bottom = new FormAttachment(100, -ITabbedPropertyConstants.VSPACE);
+ table.setLayoutData(data);
+ TableColumn column = new TableColumn(table, SWT.LEFT);
+ column.setText(Messages.AdvancedPropertiesSection_Name);
+ column.setWidth(100);
+ column = new TableColumn(table, SWT.LEFT);
+ column.setText(Messages.AdvancedPropertiesSection_Value);
+ column.setWidth(150);
+ table.setHeaderVisible(true);
+ table.setLinesVisible(true);
+ viewer = new TableViewer(table);
+ viewer.setContentProvider(new MapContentProvider());
+ viewer.setLabelProvider(new PropertyLabelProvider());
+ }
+
+ /**
+ * The label provider to display the property and its value in the table.
+ */
+ class PropertyLabelProvider extends LabelProvider implements ITableLabelProvider {
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnImage(java.lang.Object, int)
+ */
+ @Override
+ public Image getColumnImage(Object element, int columnIndex) {
+ return null;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnText(java.lang.Object, int)
+ */
+ @Override
+ public String getColumnText(Object element, int columnIndex) {
+ if(element instanceof String) {
+ if(columnIndex == 0)
+ return (String) element;
+ Object object = properties.get(element);
+ if(object == null)
+ return ""; //$NON-NLS-1$
+ return object.toString();
+ }
+ return null;
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#setInput(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
+ */
+ @Override
+ public void setInput(IWorkbenchPart part, ISelection selection) {
+ super.setInput(part, selection);
+ Assert.isTrue(selection instanceof IStructuredSelection);
+ Object input = ((IStructuredSelection) selection).getFirstElement();
+ Assert.isTrue(input instanceof ProcessTreeNode);
+ ProcessTreeNode node = (ProcessTreeNode) input;
+ Assert.isNotNull(node.context);
+ properties = node.context.getProperties();
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#refresh()
+ */
+ @Override
+ public void refresh() {
+ viewer.setInput(properties);
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/tabbed/BasicContextSection.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/tabbed/BasicContextSection.java
new file mode 100644
index 000000000..ce4f8bca6
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/tabbed/BasicContextSection.java
@@ -0,0 +1,96 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.processes.ui.internal.tabbed;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.tcf.services.ISysMonitor;
+import org.eclipse.tcf.te.tcf.processes.ui.model.ProcessTreeNode;
+import org.eclipse.tcf.te.tcf.processes.ui.nls.Messages;
+import org.eclipse.tcf.te.ui.views.tabbed.BaseTitledSection;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
+
+/**
+ * The property section to display the basic context information of a process.
+ */
+public class BasicContextSection extends BaseTitledSection {
+ // The process context to be displayed.
+ protected ISysMonitor.SysMonitorContext context;
+ // The text field for the executable file.
+ protected Text fileText;
+ // The text field for the working directory.
+ protected Text workDirText;
+ // The text field for the root directory.
+ protected Text rootText;
+ // The state of the process.
+ protected Text stateText;
+ // The owner of the process.
+ protected Text userText;
+ // The owner group of the process.
+ protected Text groupText;
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.views.tabbed.BaseTitledSection#createControls(org.eclipse.swt.widgets.Composite, org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage)
+ */
+ @Override
+ public void createControls(Composite parent, TabbedPropertySheetPage aTabbedPropertySheetPage) {
+ super.createControls(parent, aTabbedPropertySheetPage);
+ fileText = createWrapTextField(null, Messages.BasicContextSection_File);
+ workDirText = createWrapTextField(fileText, Messages.BasicContextSection_WorkDir);
+ rootText = createWrapTextField(workDirText, Messages.BasicContextSection_Root);
+ stateText = createTextField(rootText, Messages.BasicContextSection_State);
+ userText = createTextField(stateText, Messages.BasicContextSection_User);
+ groupText = createTextField(userText, Messages.BasicContextSection_Group);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#setInput(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
+ */
+ @Override
+ public void setInput(IWorkbenchPart part, ISelection selection) {
+ super.setInput(part, selection);
+ Assert.isTrue(selection instanceof IStructuredSelection);
+ Object input = ((IStructuredSelection) selection).getFirstElement();
+ Assert.isTrue(input instanceof ProcessTreeNode);
+ ProcessTreeNode node = (ProcessTreeNode) input;
+ Assert.isNotNull(node.context);
+ context = node.context;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#refresh()
+ */
+ @Override
+ public void refresh() {
+ fileText.setText(context.getFile() == null ? "" : context.getFile()); //$NON-NLS-1$
+ workDirText.setText(context.getCurrentWorkingDirectory() == null ? "" : context.getCurrentWorkingDirectory()); //$NON-NLS-1$
+ rootText.setText(context.getRoot() == null ? "" : context.getRoot()); //$NON-NLS-1$
+ stateText.setText(context.getState() == null ? "" : context.getState()); //$NON-NLS-1$
+ userText.setText(context.getUserName() == null ? "" : context.getUserName()); //$NON-NLS-1$
+ groupText.setText(context.getGroupName() == null ? "" : context.getGroupName()); //$NON-NLS-1$
+ super.refresh();
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.views.tabbed.BaseTitledSection#getText()
+ */
+ @Override
+ protected String getText() {
+ return Messages.BasicContextSection_Title;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/tabbed/BasicInformationSection.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/tabbed/BasicInformationSection.java
new file mode 100644
index 000000000..0258bc6c7
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/tabbed/BasicInformationSection.java
@@ -0,0 +1,86 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.processes.ui.internal.tabbed;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.tcf.te.tcf.processes.ui.model.ProcessTreeNode;
+import org.eclipse.tcf.te.tcf.processes.ui.nls.Messages;
+import org.eclipse.tcf.te.ui.views.tabbed.BaseTitledSection;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
+
+/**
+ * The property section to display the basic information of a process.
+ */
+public class BasicInformationSection extends BaseTitledSection {
+ // The process tree node to be displayed.
+ protected ProcessTreeNode node;
+ // The text field for the name of the process.
+ protected Text nameText;
+ // The text field for the type of the process.
+ protected Text typeText;
+ // The text field for the state of the process.
+ protected Text stateText;
+ // The text field for the ownere of the process.
+ protected Text userText;
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.views.tabbed.BaseTitledSection#createControls(org.eclipse.swt.widgets.Composite, org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage)
+ */
+ @Override
+ public void createControls(Composite parent, TabbedPropertySheetPage aTabbedPropertySheetPage) {
+ super.createControls(parent, aTabbedPropertySheetPage);
+ nameText = createWrapTextField(null, Messages.BasicInformationSection_Name);
+ typeText = createTextField(nameText, Messages.BasicInformationSection_Type);
+ stateText = createTextField(typeText, Messages.BasicInformationSection_State);
+ userText = createTextField(stateText, Messages.BasicInformationSection_User);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#setInput(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
+ */
+ @Override
+ public void setInput(IWorkbenchPart part, ISelection selection) {
+ super.setInput(part, selection);
+ Assert.isTrue(selection instanceof IStructuredSelection);
+ Object input = ((IStructuredSelection) selection).getFirstElement();
+ Assert.isTrue(input instanceof ProcessTreeNode);
+ this.node = (ProcessTreeNode) input;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#refresh()
+ */
+ @Override
+ public void refresh() {
+ nameText.setText(node.name == null ? Messages.ProcessLabelProvider_RootNodeLabel : node.name);
+ typeText.setText(node.type == null ? "" : node.type); //$NON-NLS-1$
+ stateText.setText(node.state == null ? "" : node.state); //$NON-NLS-1$
+ userText.setText(node.username == null ? "" : node.username); //$NON-NLS-1$
+ super.refresh();
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.views.tabbed.BaseTitledSection#getText()
+ */
+ @Override
+ protected String getText() {
+ return Messages.BasicInformationSection_Title;
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/tabbed/ContextIDSection.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/tabbed/ContextIDSection.java
new file mode 100644
index 000000000..177232bab
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/tabbed/ContextIDSection.java
@@ -0,0 +1,105 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.processes.ui.internal.tabbed;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.tcf.services.ISysMonitor;
+import org.eclipse.tcf.te.tcf.processes.ui.model.ProcessTreeNode;
+import org.eclipse.tcf.te.tcf.processes.ui.nls.Messages;
+import org.eclipse.tcf.te.ui.views.tabbed.BaseTitledSection;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
+
+/**
+ * The property section to display the context IDs of a process.
+ */
+public class ContextIDSection extends BaseTitledSection {
+ // The system monitor context for the selected process node.
+ protected ISysMonitor.SysMonitorContext context;
+ // The text field to display the id of the process context.
+ protected Text idText;
+ // The text field to display the parent id of the process context.
+ protected Text parentIdText;
+ // The text field to display the process group id.
+ protected Text pgrpText;
+ // The text field to display the process id.
+ protected Text pidText;
+ // The text field to display the parent process id.
+ protected Text ppidText;
+ // The text field to display the process TTY group ID.
+ protected Text tgidText;
+ // The text field to display the tracer process's id.
+ protected Text tracerPidText;
+ // The text field to display the user id of the process.
+ protected Text uidText;
+ // The text field to display the user group id of the process.
+ protected Text ugidText;
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.views.tabbed.BaseTitledSection#createControls(org.eclipse.swt.widgets.Composite, org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage)
+ */
+ @Override
+ public void createControls(Composite parent, TabbedPropertySheetPage aTabbedPropertySheetPage) {
+ super.createControls(parent, aTabbedPropertySheetPage);
+ idText = createTextField(null, Messages.ContextIDSection_ID);
+ parentIdText = createTextField(idText, Messages.ContextIDSection_ParentID);
+ pgrpText = createTextField(parentIdText, Messages.ContextIDSection_GroupID);
+ pidText = createTextField(pgrpText, Messages.ContextIDSection_PID);
+ ppidText = createTextField(pidText, Messages.ContextIDSection_PPID);
+ tgidText = createTextField(ppidText, Messages.ContextIDSection_TTY_GRPID);
+ tracerPidText = createTextField(tgidText, Messages.ContextIDSection_TracerPID);
+ uidText = createTextField(tracerPidText, Messages.ContextIDSection_UserID);
+ ugidText = createTextField(uidText, Messages.ContextIDSection_UserGRPID);
+ }
+
+ @Override
+ public void setInput(IWorkbenchPart part, ISelection selection) {
+ super.setInput(part, selection);
+ Assert.isTrue(selection instanceof IStructuredSelection);
+ Object input = ((IStructuredSelection) selection).getFirstElement();
+ Assert.isTrue(input instanceof ProcessTreeNode);
+ ProcessTreeNode node = (ProcessTreeNode) input;
+ Assert.isNotNull(node.context);
+ context = node.context;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#refresh()
+ */
+ @Override
+ public void refresh() {
+ this.idText.setText(context.getID() != null ? "" : context.getID()); //$NON-NLS-1$
+ this.parentIdText.setText(context.getParentID()==null?"":context.getParentID()); //$NON-NLS-1$
+ this.pgrpText.setText(""+context.getPGRP()); //$NON-NLS-1$
+ this.pidText.setText(""+context.getPID()); //$NON-NLS-1$
+ this.ppidText.setText(""+context.getPPID()); //$NON-NLS-1$
+ this.tgidText.setText(""+context.getTGID()); //$NON-NLS-1$
+ this.tracerPidText.setText(""+context.getTracerPID()); //$NON-NLS-1$
+ this.uidText.setText(""+context.getUID()); //$NON-NLS-1$
+ this.ugidText.setText("" +context.getUGID()); //$NON-NLS-1$
+ super.refresh();
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.views.tabbed.BaseTitledSection#getText()
+ */
+ @Override
+ protected String getText() {
+ return Messages.ContextIDSection_ContextIDs;
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/tabbed/IDSection.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/tabbed/IDSection.java
new file mode 100644
index 000000000..11a4f9504
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/tabbed/IDSection.java
@@ -0,0 +1,85 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.processes.ui.internal.tabbed;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.tcf.te.tcf.processes.ui.model.ProcessTreeNode;
+import org.eclipse.tcf.te.tcf.processes.ui.nls.Messages;
+import org.eclipse.tcf.te.ui.views.tabbed.BaseTitledSection;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
+
+/**
+ * The property section to display the IDs of a process.
+ */
+public class IDSection extends BaseTitledSection {
+ // The process tree node selected.
+ protected ProcessTreeNode node;
+ // The text field to display the process id.
+ protected Text pidText;
+ // The text field to display the parent process id.
+ protected Text ppidText;
+ // The text field to display the internal process id.
+ protected Text ipidText;
+ // The text field to display the internal parent process id.
+ protected Text ippidText;
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.views.tabbed.BaseTitledSection#createControls(org.eclipse.swt.widgets.Composite, org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage)
+ */
+ @Override
+ public void createControls(Composite parent, TabbedPropertySheetPage aTabbedPropertySheetPage) {
+ super.createControls(parent, aTabbedPropertySheetPage);
+ pidText = createTextField(null, Messages.IDSection_ProcessID);
+ ppidText = createTextField(pidText, Messages.IDSection_ParentID);
+ ipidText = createTextField(ppidText, Messages.IDSection_InternalID);
+ ippidText = createTextField(ipidText, Messages.IDSection_InternalPPID);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#setInput(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
+ */
+ @Override
+ public void setInput(IWorkbenchPart part, ISelection selection) {
+ super.setInput(part, selection);
+ Assert.isTrue(selection instanceof IStructuredSelection);
+ Object input = ((IStructuredSelection) selection).getFirstElement();
+ Assert.isTrue(input instanceof ProcessTreeNode);
+ this.node = (ProcessTreeNode) input;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#refresh()
+ */
+ @Override
+ public void refresh() {
+ pidText.setText(""+node.pid); //$NON-NLS-1$
+ ppidText.setText(""+node.ppid); //$NON-NLS-1$
+ ipidText.setText(node.id == null ? "" : node.id); //$NON-NLS-1$
+ ippidText.setText(node.parentId == null ? "" : node.parentId); //$NON-NLS-1$
+ super.refresh();
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.views.tabbed.BaseTitledSection#getText()
+ */
+ @Override
+ protected String getText() {
+ return Messages.IDSection_Title;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/internal/navigator/ContentProviderDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/tabbed/MapContentProvider.java
index 136850299..f835cd72c 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/internal/navigator/ContentProviderDelegate.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/tabbed/MapContentProvider.java
@@ -1,67 +1,50 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.te.ui.views.internal.navigator;
-
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.Viewer;
-
-
-/**
- * Content provider delegate implementation.
- */
-public class ContentProviderDelegate implements ITreeContentProvider {
- private final static Object[] NO_ELEMENTS = new Object[0];
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object)
- */
- @Override
- public Object[] getChildren(Object parentElement) {
- return NO_ELEMENTS;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object)
- */
- @Override
- public Object getParent(Object element) {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object)
- */
- @Override
- public boolean hasChildren(Object element) {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
- */
- @Override
- public Object[] getElements(Object inputElement) {
- return getChildren(inputElement);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IContentProvider#dispose()
- */
- @Override
- public void dispose() {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
- */
- @Override
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- }
-}
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.processes.ui.internal.tabbed;
+
+import java.util.Map;
+
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+
+/**
+ * A content provider used to get the properties from a map.
+ */
+public class MapContentProvider implements IStructuredContentProvider {
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.viewers.IContentProvider#dispose()
+ */
+ @Override
+ public void dispose() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
+ */
+ @Override
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
+ */
+ @Override
+ public Object[] getElements(Object inputElement) {
+ if(inputElement instanceof Map) {
+ Map<?, ?> map = (Map<?, ?>) inputElement;
+ return map.keySet().toArray();
+ }
+ return null;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/tabbed/MemorySection.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/tabbed/MemorySection.java
new file mode 100644
index 000000000..4115fc74f
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/tabbed/MemorySection.java
@@ -0,0 +1,84 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.processes.ui.internal.tabbed;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.tcf.services.ISysMonitor;
+import org.eclipse.tcf.te.tcf.processes.ui.model.ProcessTreeNode;
+import org.eclipse.tcf.te.tcf.processes.ui.nls.Messages;
+import org.eclipse.tcf.te.ui.views.tabbed.BaseTitledSection;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
+
+/**
+ * The property section to display the memory usage of a process.
+ */
+public class MemorySection extends BaseTitledSection {
+ // The context of the process selected.
+ protected ISysMonitor.SysMonitorContext context;
+ // The text field for the virtual memory size in bytes.
+ protected Text vsizeText;
+ // The text field for the virtual memory pages.
+ protected Text psizeText;
+ // The number of memory pages in process resident set.
+ protected Text rssText;
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.views.tabbed.BaseTitledSection#createControls(org.eclipse.swt.widgets.Composite, org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage)
+ */
+ @Override
+ public void createControls(Composite parent, TabbedPropertySheetPage aTabbedPropertySheetPage) {
+ super.createControls(parent, aTabbedPropertySheetPage);
+ vsizeText = createTextField(null, Messages.MemorySection_VSize);
+ psizeText = createTextField(vsizeText, Messages.MemorySection_PSize);
+ rssText = createTextField(psizeText, Messages.MemorySection_RSS);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.views.tabbed.BaseTitledSection#getText()
+ */
+ @Override
+ protected String getText() {
+ return Messages.MemorySection_Title;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#setInput(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
+ */
+ @Override
+ public void setInput(IWorkbenchPart part, ISelection selection) {
+ super.setInput(part, selection);
+ Assert.isTrue(selection instanceof IStructuredSelection);
+ Object input = ((IStructuredSelection) selection).getFirstElement();
+ Assert.isTrue(input instanceof ProcessTreeNode);
+ ProcessTreeNode node = (ProcessTreeNode) input;
+ Assert.isNotNull(node.context);
+ context = node.context;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#refresh()
+ */
+ @Override
+ public void refresh() {
+ vsizeText.setText("" + context.getVSize()); //$NON-NLS-1$
+ psizeText.setText("" + context.getPSize()); //$NON-NLS-1$
+ rssText.setText("" + context.getRSS()); //$NON-NLS-1$
+ super.refresh();
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/tabbed/ProcessFilter.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/tabbed/ProcessFilter.java
new file mode 100644
index 000000000..5ec893f2e
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/tabbed/ProcessFilter.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.processes.ui.internal.tabbed;
+
+import org.eclipse.jface.viewers.IFilter;
+import org.eclipse.tcf.te.tcf.processes.ui.model.ProcessTreeNode;
+
+/**
+ * The filter to filter out root and pending process node.
+ */
+public class ProcessFilter implements IFilter {
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.viewers.IFilter#select(java.lang.Object)
+ */
+ @Override
+ public boolean select(Object toTest) {
+ if(toTest instanceof ProcessTreeNode) {
+ ProcessTreeNode node = (ProcessTreeNode) toTest;
+ return !(node.type.equals("ProcRootNode") || node.type.equals("ProcPendingNode")); //$NON-NLS-1$//$NON-NLS-2$
+ }
+ return false;
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/testers/EditorInputPropertyTester.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/testers/EditorInputPropertyTester.java
new file mode 100644
index 000000000..664ac0113
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/testers/EditorInputPropertyTester.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.processes.ui.internal.testers;
+
+import org.eclipse.core.expressions.PropertyTester;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.tcf.processes.ui.model.ProcessModel;
+import org.eclipse.ui.IEditorInput;
+
+/**
+ * The property tester to test the editor input of an editor.
+ */
+public class EditorInputPropertyTester extends PropertyTester {
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.core.expressions.IPropertyTester#test(java.lang.Object, java.lang.String, java.lang.Object[], java.lang.Object)
+ */
+ @Override
+ public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
+ if (receiver instanceof IEditorInput) {
+ IEditorInput editorInput = (IEditorInput) receiver;
+ IPeerModel peerModel = (IPeerModel) editorInput.getAdapter(IPeerModel.class);
+ if (peerModel != null && property.equals("isRefreshStopped")) { //$NON-NLS-1$
+ ProcessModel processModel = ProcessModel.getProcessModel(peerModel);
+ return processModel.isRefreshStopped();
+ }
+ }
+ return false;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/model/IntervalGrade.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/model/IntervalGrade.java
new file mode 100644
index 000000000..749ba452d
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/model/IntervalGrade.java
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.processes.ui.model;
+
+/**
+ * The data model to contain the information of a refreshing grade including
+ * its name and its value.
+ */
+public class IntervalGrade {
+ // The grade's name.
+ private String name;
+ // The grade's value.
+ private int value;
+
+ /**
+ * Constructor.
+ */
+ public IntervalGrade(String name, int value) {
+ this.name = name;
+ this.value = value;
+ }
+
+ /**
+ * Get the name of the grade.
+ *
+ * @return The grade's name.
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * Set the name of the grade.
+ *
+ * @param name The grade's name.
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ * Get the grade's value.
+ *
+ * @return The grade's value.
+ */
+ public int getValue() {
+ return value;
+ }
+
+ /**
+ * Set the grade's value.
+ *
+ * @param value The grade's value.
+ */
+ public void setValue(int value) {
+ this.value = value;
+ }
+} \ No newline at end of file
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/model/ProcessModel.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/model/ProcessModel.java
new file mode 100644
index 000000000..14dc7d23d
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/model/ProcessModel.java
@@ -0,0 +1,308 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.processes.ui.model;
+
+import java.util.StringTokenizer;
+import java.util.Timer;
+import java.util.TimerTask;
+import java.util.concurrent.atomic.AtomicReference;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.te.tcf.core.Tcf;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.tcf.processes.ui.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.processes.ui.internal.callbacks.QueryDoneOpenChannel;
+import org.eclipse.tcf.te.tcf.processes.ui.internal.callbacks.RefreshDoneOpenChannel;
+import org.eclipse.tcf.te.tcf.processes.ui.internal.preferences.IPreferenceConsts;
+import org.eclipse.tcf.te.ui.interfaces.IViewerInput;
+
+/**
+ * The process tree model implementation.
+ */
+public class ProcessModel implements IPreferenceConsts{
+ /* default */static final String PROCESS_ROOT_KEY = UIPlugin.getUniqueIdentifier() + ".process.root"; //$NON-NLS-1$
+
+ /**
+ * Get the process model stored in the peer model.
+ * If there's no process model yet, create a new process model.
+ *
+ * @param peerModel The target's peer model.
+ * @return The process model representing the process.
+ */
+ public static ProcessModel getProcessModel(final IPeerModel peerModel) {
+ if (peerModel != null) {
+ if (Protocol.isDispatchThread()) {
+ ProcessModel model = (ProcessModel) peerModel.getProperty(PROCESS_ROOT_KEY);
+ if (model == null) {
+ model = new ProcessModel(peerModel);
+ peerModel.setProperty(PROCESS_ROOT_KEY, model);
+ }
+ return model;
+ }
+ final AtomicReference<ProcessModel> reference = new AtomicReference<ProcessModel>();
+ Protocol.invokeAndWait(new Runnable() {
+ @Override
+ public void run() {
+ reference.set(getProcessModel(peerModel));
+ }
+ });
+ return reference.get();
+ }
+ return null;
+ }
+
+ // The root node of the peer model
+ private ProcessTreeNode root;
+ // The polling interval in seconds. If it is zero, then stop polling periodically.
+ /* default */int interval;
+ // The timer to schedule polling task.
+ /* default */Timer pollingTimer;
+ // The flag to indicate if the polling has been stopped.
+ /* default */boolean stopped;
+ private IPeerModel peerModel;
+
+ /**
+ * Create a File System Model.
+ */
+ ProcessModel(IPeerModel peerModel) {
+ this.peerModel = peerModel;
+ }
+
+ /**
+ * Get the root node of the peer model.
+ *
+ * @return The root node.
+ */
+ public ProcessTreeNode getRoot() {
+ return root;
+ }
+
+ /**
+ * Set the root node of the peer model.
+ *
+ * @param root The root node
+ */
+ public void createRoot(IPeerModel peerModel ) {
+ ProcessTreeNode root = new ProcessTreeNode();
+ root.type = "ProcRootNode"; //$NON-NLS-1$
+ root.peerNode = peerModel;
+ root.childrenQueried = false;
+ root.childrenQueryRunning = false;
+ this.root = root;
+ startPolling();
+ }
+
+ /**
+ * Start the periodical polling.
+ */
+ public void startPolling() {
+ setStopped(false);
+ pollingTimer = new Timer();
+ schedulePolling();
+ }
+
+ /**
+ * Set the status of the polling and
+ * fire a property change event.
+ *
+ * @param stopped if the polling should be stopped.
+ */
+ void setStopped(boolean stopped) {
+ if(this.stopped != stopped) {
+ boolean old = this.stopped;
+ this.stopped = stopped;
+ Boolean oldValue = Boolean.valueOf(old);
+ Boolean newValue = Boolean.valueOf(stopped);
+ PropertyChangeEvent event = new PropertyChangeEvent(peerModel, "stopped", oldValue, newValue); //$NON-NLS-1$
+ IViewerInput viewerInput = (IViewerInput) peerModel.getAdapter(IViewerInput.class);
+ viewerInput.firePropertyChange(event);
+ }
+ }
+
+ /**
+ * Stop the periodical polling.
+ */
+ public void stopPolling() {
+ setStopped(true);
+ }
+
+ /**
+ * Schedule the periodical polling.
+ */
+ void schedulePolling() {
+ TimerTask pollingTask = new TimerTask(){
+ @Override
+ public void run() {
+ refresh(new Runnable() {
+ @Override
+ public void run() {
+ if (!stopped) {
+ schedulePolling();
+ }
+ else {
+ pollingTimer.cancel();
+ pollingTimer = null;
+ }
+ }
+ });
+ }};
+ if(interval == 0) {
+ // Interval has not yet been initialized.
+ IPreferenceStore prefStore = UIPlugin.getDefault().getPreferenceStore();
+ interval = prefStore.getInt(PREF_LAST_INTERVAL);
+ }
+ pollingTimer.schedule(pollingTask, interval * 1000);
+ }
+
+ /**
+ * Set new interval.
+ *
+ * @param interval The new interval.
+ */
+ public void setInterval(int interval) {
+ Assert.isTrue(interval > 0);
+ if (this.interval != interval) {
+ this.interval = interval;
+ IPreferenceStore prefStore = UIPlugin.getDefault().getPreferenceStore();
+ prefStore.setValue(PREF_LAST_INTERVAL, interval);
+ }
+ }
+
+ /**
+ * Get the current interval.
+ *
+ * @return the current interval.
+ */
+ public int getInterval() {
+ return interval;
+ }
+
+ /**
+ * Query the children of the given process context.
+ *
+ * @param parentNode The process context node. Must be not <code>null</code>.
+ */
+ public void queryChildren(ProcessTreeNode parentNode) {
+ Assert.isNotNull(parentNode);
+ parentNode.childrenQueryRunning = true;
+ Tcf.getChannelManager().openChannel(parentNode.peerNode.getPeer(), false, new QueryDoneOpenChannel(parentNode));
+ }
+
+ /**
+ * Recursively refresh the children of the given process context with a callback, which is
+ * called when whole process is finished.
+ *
+ * @param parentNode The process context node. Must be not <code>null</code>.
+ * @param callback The callback object, or <code>null</code> when callback is not needed.
+ */
+ public void refresh(ProcessTreeNode parentNode, Runnable callback) {
+ Assert.isNotNull(parentNode);
+ parentNode.childrenQueryRunning = true;
+ Tcf.getChannelManager().openChannel(parentNode.peerNode.getPeer(), false, new RefreshDoneOpenChannel(callback, parentNode));
+ }
+
+ /**
+ * Recursively refresh the children of the given process context.
+ *
+ * @param parentNode The process context node. Must be not <code>null</code>.
+ */
+ public void refresh(final ProcessTreeNode parentNode) {
+ refresh(parentNode, null);
+ }
+
+ /**
+ * Recursively refresh the tree from the root node with a callback, which
+ * is called when the whole process is finished.
+ *
+ * @param runnable The callback object or <code>null</code> when callback is not needed.
+ */
+ public void refresh(Runnable runnable) {
+ if (this.root.childrenQueried && !this.root.childrenQueryRunning) {
+ refresh(this.root, runnable);
+ }
+ else {
+ if (runnable != null) {
+ runnable.run();
+ }
+ }
+ }
+
+ /**
+ * Recursively refresh the tree from the root node.
+ */
+ public void refresh() {
+ if(this.root.childrenQueried && !this.root.childrenQueryRunning) {
+ refresh(this.root, null);
+ }
+ }
+
+ /**
+ * Update the most recently used interval adding
+ * a new interval.
+ *
+ * @param interval The new interval.
+ */
+ public void addMRUInterval(int interval){
+ IPreferenceStore prefStore = UIPlugin.getDefault().getPreferenceStore();
+ String mruList = prefStore.getString(PREF_INTERVAL_MRU_LIST);
+ if (mruList == null || mruList.trim().length() == 0) {
+ mruList = "" + interval; //$NON-NLS-1$
+ }else{
+ StringTokenizer st = new StringTokenizer(mruList, ":"); //$NON-NLS-1$
+ int maxCount = prefStore.getInt(PREF_INTERVAL_MRU_COUNT);
+ boolean found = false;
+ while (st.hasMoreTokens()) {
+ String token = st.nextToken();
+ try {
+ int s = Integer.parseInt(token);
+ if(s == interval ) {
+ found = true;
+ break;
+ }
+ }
+ catch (NumberFormatException nfe) {
+ }
+ }
+ if(!found) {
+ mruList = mruList + ":" + interval; //$NON-NLS-1$
+ st = new StringTokenizer(mruList, ":"); //$NON-NLS-1$
+ if(st.countTokens() > maxCount) {
+ int comma = mruList.indexOf(":"); //$NON-NLS-1$
+ if(comma != -1) {
+ mruList = mruList.substring(comma+1);
+ }
+ }
+ }
+ }
+ prefStore.setValue(PREF_INTERVAL_MRU_LIST, mruList);
+ }
+
+ /**
+ * If the polling has been stopped.
+ *
+ * @return true if it is stopped.
+ */
+ public boolean isRefreshStopped() {
+ return stopped;
+ }
+
+ /**
+ * Get the peer model associated with this model.
+ *
+ * @return The peer model.
+ */
+ IPeerModel getPeerModel() {
+ return peerModel;
+ }
+}
+
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/src/org/eclipse/tm/te/tcf/processes/ui/controls/ProcessesTreeNode.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/model/ProcessTreeNode.java
index 9fb6e20e3..9a516a2e4 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/src/org/eclipse/tm/te/tcf/processes/ui/controls/ProcessesTreeNode.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/model/ProcessTreeNode.java
@@ -7,19 +7,22 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.processes.ui.controls;
+package org.eclipse.tcf.te.tcf.processes.ui.model;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
import org.eclipse.core.runtime.PlatformObject;
-import org.eclipse.tm.tcf.services.ISysMonitor;
+import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.tcf.services.ISysMonitor;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.ui.interfaces.IViewerInput;
/**
- * Representation of a file system tree node.
+ * Representation of a process tree node.
*/
-public final class ProcessesTreeNode extends PlatformObject {
+public final class ProcessTreeNode extends PlatformObject {
private final UUID uuid = UUID.randomUUID();
/**
@@ -70,12 +73,12 @@ public final class ProcessesTreeNode extends PlatformObject {
/**
* The tree node parent.
*/
- public ProcessesTreeNode parent = null;
+ public ProcessTreeNode parent = null;
/**
* The tree node children.
*/
- public List<ProcessesTreeNode> children = new ArrayList<ProcessesTreeNode>();
+ public List<ProcessTreeNode> children = new ArrayList<ProcessTreeNode>();
/**
* Flag to mark once the children of the node got queried
@@ -87,6 +90,11 @@ public final class ProcessesTreeNode extends PlatformObject {
*/
public boolean childrenQueryRunning = false;
+ /**
+ * The peer node the process node is associated with.
+ */
+ public IPeerModel peerNode;
+
/*
* (non-Javadoc)
* @see java.lang.Object#hashCode()
@@ -102,8 +110,8 @@ public final class ProcessesTreeNode extends PlatformObject {
*/
@Override
public final boolean equals(Object obj) {
- if (obj instanceof ProcessesTreeNode) {
- return uuid.equals(((ProcessesTreeNode) obj).uuid);
+ if (obj instanceof ProcessTreeNode) {
+ return uuid.equals(((ProcessTreeNode) obj).uuid);
}
return super.equals(obj);
}
@@ -116,4 +124,13 @@ public final class ProcessesTreeNode extends PlatformObject {
public String toString() {
return name != null ? name : super.toString();
}
+
+ /**
+ * Fire a property change event.
+ */
+ public void firePropertyChanged() {
+ IViewerInput provider = (IViewerInput) peerNode.getAdapter(IViewerInput.class);
+ PropertyChangeEvent event = new PropertyChangeEvent(this, "state", null, null); //$NON-NLS-1$
+ provider.firePropertyChange(event);
+ }
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/nls/Messages.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/nls/Messages.java
new file mode 100644
index 000000000..fdd566bbd
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/nls/Messages.java
@@ -0,0 +1,193 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.processes.ui.nls;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * Target Explorer TCF processes extensions UI plug-in externalized strings management.
+ */
+public class Messages extends NLS {
+
+ // The plug-in resource bundle name
+ private static final String BUNDLE_NAME = "org.eclipse.tcf.te.tcf.processes.ui.nls.Messages"; //$NON-NLS-1$
+
+ /**
+ * Static constructor.
+ */
+ static {
+ // Load message values from bundle file
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ // **** Declare externalized string id's down here *****
+
+ public static String ProcessExplorerTreeControl_section_title;
+
+ public static String ProcessesTreeControl_column_name_label;
+ public static String ProcessesTreeControl_column_pid_label;
+ public static String ProcessesTreeControl_column_ppid_label;
+ public static String ProcessesTreeControl_column_state_label;
+ public static String ProcessesTreeControl_column_user_label;
+
+ public static String ProcessLabelProvider_NullNameNodeLabel;
+
+ public static String ProcessLabelProvider_RootNodeLabel;
+
+ public static String ProcessPreferencePage_BiggerThanZero;
+
+ public static String ProcessPreferencePage_DefineMoreThanOne;
+
+ public static String ProcessPreferencePage_EditButtonLabel;
+
+ public static String ProcessPreferencePage_InvalidNumber;
+
+ public static String ProcessPreferencePage_MaxMRUCount;
+
+ public static String ProcessPreferencePage_MRUCountLabel;
+
+ public static String ProcessPreferencePage_NameLabel;
+
+ public static String ProcessPreferencePage_NewButtonLabel;
+
+ public static String ProcessPreferencePage_PageDescription;
+
+ public static String ProcessPreferencePage_RemoveButtonLabel;
+
+ public static String ProcessPreferencePage_ValueLabel;
+
+ public static String ProcessSelectionDialog_title;
+
+ public static String LaunchObjectDialog_title;
+ public static String LaunchObjectDialog_image_label;
+ public static String LaunchObjectDialog_arguments_label;
+ public static String LaunchObjectDialog_group_label;
+ public static String LaunchObjectDialog_lineseparator_label;
+ public static String LaunchObjectDialog_lineseparator_default;
+ public static String LaunchObjectDialog_lineseparator_lf;
+ public static String LaunchObjectDialog_lineseparator_crlf;
+ public static String LaunchObjectDialog_lineseparator_cr;
+
+ public static String LaunchProcessesCommandHandler_error_title;
+
+ public static String AbstractChannelCommandHandler_statusDialog_title;
+
+ public static String AdvancedPropertiesSection_Name;
+
+ public static String AdvancedPropertiesSection_Value;
+
+ public static String BasicContextSection_File;
+
+ public static String BasicContextSection_Group;
+
+ public static String BasicContextSection_Root;
+
+ public static String BasicContextSection_State;
+
+ public static String BasicContextSection_Title;
+
+ public static String BasicContextSection_User;
+
+ public static String BasicContextSection_WorkDir;
+
+ public static String BasicInformationSection_Name;
+
+ public static String BasicInformationSection_State;
+
+ public static String BasicInformationSection_Title;
+
+ public static String BasicInformationSection_Type;
+
+ public static String BasicInformationSection_User;
+
+ public static String ContextIDSection_ContextIDs;
+
+ public static String ContextIDSection_GroupID;
+
+ public static String ContextIDSection_ID;
+
+ public static String ContextIDSection_ParentID;
+
+ public static String ContextIDSection_PID;
+
+ public static String ContextIDSection_PPID;
+
+ public static String ContextIDSection_TracerPID;
+
+ public static String ContextIDSection_TTY_GRPID;
+
+ public static String ContextIDSection_UserGRPID;
+
+ public static String ContextIDSection_UserID;
+
+ public static String EditSpeedGradeDialog_DialogMessage;
+
+ public static String EditSpeedGradeDialog_DialogTitle;
+
+ public static String EditSpeedGradeDialog_GradeSameValue;
+
+ public static String EditSpeedGradeDialog_NameLabel;
+
+ public static String EditSpeedGradeDialog_ValueLabel;
+
+ public static String IDSection_InternalID;
+
+ public static String IDSection_InternalPPID;
+
+ public static String IDSection_ParentID;
+
+ public static String IDSection_ProcessID;
+
+ public static String IDSection_Title;
+
+ public static String IntervalConfigDialog_BiggerThanZero;
+
+ public static String IntervalConfigDialog_ChoiceOneLabel;
+
+ public static String IntervalConfigDialog_ChoiceTwoLabel;
+
+ public static String IntervalConfigDialog_DialogMessage;
+
+ public static String IntervalConfigDialog_DialogTitle;
+
+ public static String IntervalConfigDialog_InvalidNumber;
+
+ public static String IntervalConfigDialog_NonEmpty;
+
+ public static String IntervalConfigDialog_SECOND_ABBR;
+
+ public static String IntervalConfigDialog_SECONDS;
+
+ public static String IntervalConfigDialog_SelectSpeed;
+
+ public static String IntervalConfigDialog_SPEED;
+
+ public static String MemorySection_PSize;
+
+ public static String MemorySection_RSS;
+
+ public static String MemorySection_Title;
+
+ public static String MemorySection_VSize;
+
+ public static String NewSpeedGradeDialog_DialogMessage;
+
+ public static String NewSpeedGradeDialog_DialogTitle;
+
+ public static String NewSpeedGradeDialog_EnterName;
+
+ public static String NewSpeedGradeDialog_GradeExists;
+
+ public static String NewSpeedGradeDialog_GradeSameValue;
+
+ public static String NewSpeedGradeDialog_NameLabel;
+
+ public static String NewSpeedGradeDialog_ValueLabel;
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/nls/Messages.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/nls/Messages.properties
new file mode 100644
index 000000000..42993618a
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/nls/Messages.properties
@@ -0,0 +1,97 @@
+#
+# org.eclipse.tcf.te.tcf.processes.ui
+# Externalized Strings.
+#
+
+ProcessExplorerTreeControl_section_title=Exploring Processes
+
+ProcessesTreeControl_column_name_label=Name
+ProcessesTreeControl_column_pid_label=PID
+ProcessesTreeControl_column_ppid_label=PPID
+ProcessesTreeControl_column_state_label=State
+ProcessesTreeControl_column_user_label=User
+ProcessLabelProvider_NullNameNodeLabel=System
+ProcessLabelProvider_RootNodeLabel=Processes
+ProcessPreferencePage_BiggerThanZero=The number must be bigger than zero\!
+ProcessPreferencePage_DefineMoreThanOne=Please define at least one grade of speed\!
+ProcessPreferencePage_EditButtonLabel=&Edit...
+ProcessPreferencePage_InvalidNumber=Invalid number. Please enter a number\!
+ProcessPreferencePage_MaxMRUCount=Please specify the maximum MRU intervals\!
+ProcessPreferencePage_MRUCountLabel=Specify the maximum MRU intervals:
+ProcessPreferencePage_NameLabel=Name
+ProcessPreferencePage_NewButtonLabel=&New...
+ProcessPreferencePage_PageDescription=Configure how the process list should be refreshed.
+ProcessPreferencePage_RemoveButtonLabel=&Remove
+ProcessPreferencePage_ValueLabel=Value (seconds)
+
+ProcessSelectionDialog_title=Select Process to Attach
+
+LaunchObjectDialog_title=Launch Process
+LaunchObjectDialog_image_label=Process Image:
+LaunchObjectDialog_arguments_label=Process Arguments:
+LaunchObjectDialog_group_label=Process Line Separator Settings
+LaunchObjectDialog_lineseparator_label=Please specify the line separator used by the launched process.
+LaunchObjectDialog_lineseparator_default=Default
+LaunchObjectDialog_lineseparator_lf=LF
+LaunchObjectDialog_lineseparator_crlf=CRLF
+LaunchObjectDialog_lineseparator_cr=CR
+
+AbstractChannelCommandHandler_statusDialog_title=Error
+AdvancedPropertiesSection_Name=Name
+AdvancedPropertiesSection_Value=Value
+BasicContextSection_File=File:
+BasicContextSection_Group=Group:
+BasicContextSection_Root=Root:
+BasicContextSection_State=State:
+BasicContextSection_Title=Basic Context Information
+BasicContextSection_User=User:
+BasicContextSection_WorkDir=Work Home:
+BasicInformationSection_Name=Name:
+BasicInformationSection_State=State:
+BasicInformationSection_Title=Basic Information
+BasicInformationSection_Type=Type:
+BasicInformationSection_User=User:
+ContextIDSection_ContextIDs=Context IDs
+ContextIDSection_GroupID=Group ID:
+ContextIDSection_ID=ID:
+ContextIDSection_ParentID=Parent ID:
+ContextIDSection_PID=PID:
+ContextIDSection_PPID=PPID:
+ContextIDSection_TracerPID=Tracer PID:
+ContextIDSection_TTY_GRPID=TTY GRPID:
+ContextIDSection_UserGRPID=User GRPID:
+ContextIDSection_UserID=User ID:
+EditSpeedGradeDialog_DialogMessage=Edit the data of the selected grade below:
+EditSpeedGradeDialog_DialogTitle=Edit Grade
+EditSpeedGradeDialog_GradeSameValue=Grade ''{0}'' has the same value.
+EditSpeedGradeDialog_NameLabel=Name:
+EditSpeedGradeDialog_ValueLabel=Value:
+IDSection_InternalID=Internal PID:
+IDSection_InternalPPID=InternalPPID:
+IDSection_ParentID=Parent ID:
+IDSection_ProcessID=Process ID:
+IDSection_Title=Process IDs
+IntervalConfigDialog_BiggerThanZero=The number must be bigger than zero\!
+IntervalConfigDialog_ChoiceOneLabel=Refresh the process list every
+IntervalConfigDialog_ChoiceTwoLabel=Refresh the process list at a
+IntervalConfigDialog_DialogMessage=Specify how the process list should be refreshed:
+IntervalConfigDialog_DialogTitle=Configure Refreshing
+IntervalConfigDialog_InvalidNumber=Invalid number format\!
+IntervalConfigDialog_NonEmpty=Please enter a number\!
+IntervalConfigDialog_SECOND_ABBR=s
+IntervalConfigDialog_SECONDS=\ seconds.
+IntervalConfigDialog_SelectSpeed=Please select a speed.
+IntervalConfigDialog_SPEED=\ speed.
+
+LaunchProcessesCommandHandler_error_title=Process Launch Failed
+MemorySection_PSize=Pages:
+MemorySection_RSS=Resident:
+MemorySection_Title=Memory Usage
+MemorySection_VSize=Virtual:
+NewSpeedGradeDialog_DialogMessage=Edit the data of the new grade below:
+NewSpeedGradeDialog_DialogTitle=New Grade
+NewSpeedGradeDialog_EnterName=Enter the name of the grade\!
+NewSpeedGradeDialog_GradeExists=Grade ''{0}'' already exists\!
+NewSpeedGradeDialog_GradeSameValue=Grade ''{0}'' has the same value.
+NewSpeedGradeDialog_NameLabel=Name:
+NewSpeedGradeDialog_ValueLabel=Value:
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.swt/.classpath b/target_explorer/plugins/org.eclipse.tcf.te.tcf.services.contexts/.classpath
index 8a8f1668c..8a8f1668c 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.swt/.classpath
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.services.contexts/.classpath
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.services.contexts/.options b/target_explorer/plugins/org.eclipse.tcf.te.tcf.services.contexts/.options
new file mode 100644
index 000000000..f6ded7444
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.services.contexts/.options
@@ -0,0 +1 @@
+org.eclipse.tcf.te.tcf.services.contexts/debugmode = 0
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.services.contexts/.project b/target_explorer/plugins/org.eclipse.tcf.te.tcf.services.contexts/.project
new file mode 100644
index 000000000..d5113ef90
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.services.contexts/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.tcf.te.tcf.services.contexts</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/target_explorer/plugins/org.eclipse.tcf.te.tcf.services.contexts/.settings/org.eclipse.jdt.core.prefs b/target_explorer/plugins/org.eclipse.tcf.te.tcf.services.contexts/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3d56fc49e
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.services.contexts/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,362 @@
+#Thu Jan 05 16:27:00 CET 2012
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+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.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.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=enabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=enabled
+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.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=warning
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
+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=warning
+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=enabled
+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.unusedObjectAllocation=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
+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.6
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=0
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=0
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=0
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=0
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=0
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=true
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
+org.eclipse.jdt.core.formatter.comment.line_length=100
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=4
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=4
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=true
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=true
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=true
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=true
+org.eclipse.jdt.core.formatter.lineSplit=100
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=true
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.services.contexts/.settings/org.eclipse.jdt.ui.prefs b/target_explorer/plugins/org.eclipse.tcf.te.tcf.services.contexts/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 000000000..5fddae2c3
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.services.contexts/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,4 @@
+#Thu Jan 05 16:27:00 CET 2012
+eclipse.preferences.version=1
+formatter_profile=_Target Explorer Java STD
+formatter_settings_version=12
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.services.contexts/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.tcf.services.contexts/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..3d9845938
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.services.contexts/META-INF/MANIFEST.MF
@@ -0,0 +1,17 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.tcf.te.tcf.services.contexts;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipse.tcf.te.tcf.services.contexts.activator.CoreBundleActivator
+Bundle-Vendor: %providerName
+Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
+ org.eclipse.tcf.te.runtime;bundle-version="1.0.0",
+ org.eclipse.tcf;bundle-version="1.0.0",
+ org.eclipse.tcf.core;bundle-version="1.0.0",
+ org.eclipse.tcf.te.tcf.locator;bundle-version="1.0.0"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
+Export-Package: org.eclipse.tcf.te.tcf.services.contexts.activator;x-internal:=true,
+ org.eclipse.tcf.te.tcf.services.contexts.interfaces,
+ org.eclipse.tcf.te.tcf.services.contexts.internal;x-internal:=true
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.services.contexts/build.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.services.contexts/build.properties
new file mode 100644
index 000000000..6f20375d6
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.services.contexts/build.properties
@@ -0,0 +1,5 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.services.contexts/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.services.contexts/plugin.properties
new file mode 100644
index 000000000..d299c8cb4
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.services.contexts/plugin.properties
@@ -0,0 +1,12 @@
+##################################################################################
+# Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+# This program and the accompanying materials are made available under the terms
+# of the Eclipse Public License v1.0 which accompanies this distribution, and is
+# available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Wind River Systems - initial API and implementation
+##################################################################################
+
+pluginName = Target Explorer, TCF Service Provider, Contexts
+providerName = Eclipse.org
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.services.contexts/plugin.xml b/target_explorer/plugins/org.eclipse.tcf.te.tcf.services.contexts/plugin.xml
new file mode 100644
index 000000000..a3129ec43
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.services.contexts/plugin.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+
+<!-- Adapter factory contributions -->
+ <extension point="org.eclipse.core.runtime.adapters">
+ <factory
+ adaptableType="org.eclipse.tcf.protocol.IPeer"
+ class="org.eclipse.tcf.te.tcf.services.contexts.internal.AdapterFactory">
+ <adapter type="org.eclipse.tcf.te.tcf.services.contexts.interfaces.IContextService"/>
+ </factory>
+ </extension>
+
+</plugin>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.services.contexts/pom.xml b/target_explorer/plugins/org.eclipse.tcf.te.tcf.services.contexts/pom.xml
new file mode 100644
index 000000000..289023a07
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.services.contexts/pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.tcf</groupId>
+ <artifactId>tcf-parent</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../../../pom.xml</relativePath>
+ </parent>
+
+ <version>1.0.0.qualifier</version>
+ <artifactId>org.eclipse.tcf.te.tcf.services.contexts</artifactId>
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.services.contexts/src/org/eclipse/tcf/te/tcf/services/contexts/activator/CoreBundleActivator.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.services.contexts/src/org/eclipse/tcf/te/tcf/services/contexts/activator/CoreBundleActivator.java
new file mode 100644
index 000000000..7ae6cae51
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.services.contexts/src/org/eclipse/tcf/te/tcf/services/contexts/activator/CoreBundleActivator.java
@@ -0,0 +1,73 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.services.contexts.activator;
+
+import org.eclipse.tcf.te.runtime.tracing.TraceHandler;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class CoreBundleActivator implements BundleActivator {
+ // The bundle context
+ private static BundleContext context;
+ // The trace handler instance
+ private static TraceHandler traceHandler;
+
+ /**
+ * Returns the bundle context
+ *
+ * @return the bundle context
+ */
+ public static BundleContext getContext() {
+ return context;
+ }
+
+ /**
+ * Convenience method which returns the unique identifier of this plugin.
+ */
+ public static String getUniqueIdentifier() {
+ if (getContext() != null && getContext().getBundle() != null) {
+ return getContext().getBundle().getSymbolicName();
+ }
+ return null;
+ }
+
+ /**
+ * Returns the bundles trace handler.
+ *
+ * @return The bundles trace handler.
+ */
+ public static TraceHandler getTraceHandler() {
+ if (traceHandler == null) {
+ traceHandler = new TraceHandler(getUniqueIdentifier());
+ }
+ return traceHandler;
+ }
+
+ /* (non-Javadoc)
+ * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext bundleContext) throws Exception {
+ CoreBundleActivator.context = bundleContext;
+ }
+
+ /* (non-Javadoc)
+ * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext bundleContext) throws Exception {
+ CoreBundleActivator.context = null;
+ traceHandler = null;
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.services.contexts/src/org/eclipse/tcf/te/tcf/services/contexts/interfaces/IContextService.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.services.contexts/src/org/eclipse/tcf/te/tcf/services/contexts/interfaces/IContextService.java
new file mode 100644
index 000000000..d161d5a57
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.services.contexts/src/org/eclipse/tcf/te/tcf/services/contexts/interfaces/IContextService.java
@@ -0,0 +1,93 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.services.contexts.interfaces;
+
+
+/**
+ * Context service.
+ */
+public interface IContextService {
+
+ /**
+ * Context handler delegate.
+ */
+ public interface IDelegate {
+
+ /**
+ * Checks if the delegate can handle the context identified by the
+ * given id.
+ *
+ * @param contextID The context id. Must not be <code>null</code>.
+ * @return <code>True</code> if the delegate can handle the context id, <code>false</code> otherwise.
+ */
+ public boolean canHandle(String contextID);
+
+ /**
+ * Returns the name of the context identified by the given id.
+ *
+ * @param contextID The context id. Must not be <code>null</code>.
+ * @return The name of the context, or <code>null</code> if the context does not exist
+ * or is not handled by this delegate.
+ */
+ public String getName(String contextID);
+
+ /**
+ * Checks if the context identified by the given id is available. Available in this
+ * context means other clients can access data for this context.
+ *
+ * @param contextID The context id. Must not be <code>null</code>.
+ * @return <code>True</code> if the context is available, <code>false</code> otherwise.
+ */
+ public boolean isAvailable(String contextID);
+
+ /**
+ * Client call back interface for makeAvailable().
+ */
+ public interface DoneMakeAvailable {
+ /**
+ * Called when context has been made available.
+ *
+ * @param error The error description if the operation failed, <code>null</code> if succeeded.
+ */
+ void doneMakeAvailable(Throwable error);
+ }
+
+ /**
+ * Attempt to make the context identified by the given id available to other
+ * clients.
+ *
+ * @param contextID The context id. Must not be <code>null</code>.
+ * @param done The call back interface called when the operation is completed. Must not be <code>null</code>.
+ */
+ public void makeAvailable(String contextID, DoneMakeAvailable done);
+ }
+
+ /**
+ * Returns the first delegate that can handle the given context ID.
+ *
+ * @param contextID The context id. Must not be <code>null</code>.
+ * @return The delegate or <code>null</code>.
+ */
+ public IDelegate getDelegate(String contextID);
+
+ /**
+ * Adds the given context handler delegate to the service.
+ *
+ * @param delegate The context handler delegate. Must not be <code>null</code>.
+ */
+ public void addDelegate(IDelegate delegate);
+
+ /**
+ * Removes the given context handler delegate from the service.
+ *
+ * @param delegate The context handler delegate. Must not be <code>null</code>.
+ */
+ public void removeDelegate(IDelegate delegate);
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.services.contexts/src/org/eclipse/tcf/te/tcf/services/contexts/internal/AdapterFactory.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.services.contexts/src/org/eclipse/tcf/te/tcf/services/contexts/internal/AdapterFactory.java
new file mode 100644
index 000000000..6ef0f4473
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.services.contexts/src/org/eclipse/tcf/te/tcf/services/contexts/internal/AdapterFactory.java
@@ -0,0 +1,80 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.services.contexts.internal;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IAdapterFactory;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.te.runtime.interfaces.IDisposable;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.ILocatorModel;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.tcf.locator.listener.ModelAdapter;
+import org.eclipse.tcf.te.tcf.locator.model.Model;
+import org.eclipse.tcf.te.tcf.services.contexts.interfaces.IContextService;
+
+/**
+ * Context service adapter factory implementation.
+ */
+public class AdapterFactory implements IAdapterFactory {
+ // Maintain a map of contexts service adapters per peer
+ /* default */ Map<IPeer, IContextService> adapters = new HashMap<IPeer, IContextService>();
+
+ private static final Class<?>[] CLASSES = new Class[] {
+ IContextService.class
+ };
+
+ /**
+ * Constructor.
+ */
+ public AdapterFactory() {
+ Model.getModel().addListener(new ModelAdapter() {
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.locator.listener.ModelAdapter#locatorModelChanged(org.eclipse.tcf.te.tcf.locator.interfaces.nodes.ILocatorModel, org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel, boolean)
+ */
+ @Override
+ public void locatorModelChanged(ILocatorModel model, IPeerModel peer, boolean added) {
+ // If a peer gets removed, remove the context service proxy
+ if (peer != null && peer.getPeer() != null) {
+ IContextService adapter = adapters.remove(peer.getPeer());
+ if (adapter instanceof IDisposable) ((IDisposable)adapter).dispose();
+ }
+ }
+ });
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.runtime.IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class)
+ */
+ @Override
+ public Object getAdapter(Object adaptableObject, Class adapterType) {
+ if (adaptableObject instanceof IPeer) {
+ // Lookup the adapter
+ IContextService adapter = adapters.get(adaptableObject);
+ // No adapter yet -> create a new one for this peer
+ if (adapter == null) {
+ adapter = new ContextServiceAdapter((IPeer)adaptableObject);
+ adapters.put((IPeer)adaptableObject, adapter);
+ }
+ return adapter;
+ }
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.runtime.IAdapterFactory#getAdapterList()
+ */
+ @Override
+ public Class[] getAdapterList() {
+ return CLASSES;
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.services.contexts/src/org/eclipse/tcf/te/tcf/services/contexts/internal/ContextServiceAdapter.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.services.contexts/src/org/eclipse/tcf/te/tcf/services/contexts/internal/ContextServiceAdapter.java
new file mode 100644
index 000000000..a2a86eb86
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.services.contexts/src/org/eclipse/tcf/te/tcf/services/contexts/internal/ContextServiceAdapter.java
@@ -0,0 +1,88 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.services.contexts.internal;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.te.runtime.interfaces.IDisposable;
+import org.eclipse.tcf.te.tcf.services.contexts.interfaces.IContextService;
+
+/**
+ * Context service adapter implementation.
+ */
+public class ContextServiceAdapter implements IContextService, IDisposable {
+ // The peer instance the proxy is associated with
+ /* default */ final IPeer peer;
+
+ // The list of context handler delegates
+ private final List<IContextService.IDelegate> delegates = new ArrayList<IContextService.IDelegate>();
+
+ /**
+ * Constructor.
+ *
+ * @param peer The peer. Must not be <code>null</code>.
+ */
+ public ContextServiceAdapter(IPeer peer) {
+ Assert.isNotNull(peer);
+ this.peer = peer;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.interfaces.IDisposable#dispose()
+ */
+ @Override
+ public void dispose() {
+ // Clear out the delegates list
+ delegates.clear();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.services.contexts.interfaces.IContextService#getDelegate(java.lang.String)
+ */
+ @Override
+ public IDelegate getDelegate(String contextID) {
+ Assert.isTrue(Protocol.isDispatchThread(), "Illegal Thread Access"); //$NON-NLS-1$
+ Assert.isNotNull(contextID);
+
+ // Make a snapshot of the registered delegates
+ IContextService.IDelegate[] candidates = delegates.toArray(new IContextService.IDelegate[delegates.size()]);
+ for (IContextService.IDelegate candidate : candidates) {
+ if (candidate.canHandle(contextID)) {
+ return candidate;
+ }
+ }
+
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.services.contexts.interfaces.IContextService#addDelegate(org.eclipse.tcf.te.tcf.services.contexts.interfaces.IContextService.IDelegate)
+ */
+ @Override
+ public void addDelegate(IDelegate delegate) {
+ Assert.isTrue(Protocol.isDispatchThread(), "Illegal Thread Access"); //$NON-NLS-1$
+ Assert.isNotNull(delegate);
+ if (!delegates.contains(delegate)) delegates.add(delegate);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.services.contexts.interfaces.IContextService#removeDelegate(org.eclipse.tcf.te.tcf.services.contexts.interfaces.IContextService.IDelegate)
+ */
+ @Override
+ public void removeDelegate(IDelegate delegate) {
+ Assert.isTrue(Protocol.isDispatchThread(), "Illegal Thread Access"); //$NON-NLS-1$
+ Assert.isNotNull(delegate);
+ delegates.remove(delegate);
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.process/.classpath b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/.classpath
index 8a8f1668c..8a8f1668c 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.process/.classpath
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/.classpath
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/.options b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/.options
new file mode 100644
index 000000000..01b4a8797
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/.options
@@ -0,0 +1,4 @@
+org.eclipse.tcf.te.tcf.terminals.core/debugmode = 0
+org.eclipse.tcf.te.tcf.terminals.core/trace/terminalsLauncher = false
+org.eclipse.tcf.te.tcf.terminals.core/trace/terminalsListener = false
+org.eclipse.tcf.te.tcf.processes.core/trace/streamsListener = false
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/.project b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/.project
new file mode 100644
index 000000000..78c0c754d
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.tcf.te.tcf.terminals.core</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/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.core/.settings/org.eclipse.jdt.core.prefs b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/.settings/org.eclipse.jdt.core.prefs
index 5f9d30b9a..5f9d30b9a 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.core/.settings/org.eclipse.jdt.core.prefs
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/.settings/org.eclipse.jdt.core.prefs
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.core/.settings/org.eclipse.jdt.ui.prefs b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/.settings/org.eclipse.jdt.ui.prefs
index 20cb663f8..20cb663f8 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.core/.settings/org.eclipse.jdt.ui.prefs
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/.settings/org.eclipse.jdt.ui.prefs
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..73ed19866
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/META-INF/MANIFEST.MF
@@ -0,0 +1,21 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.tcf.te.tcf.terminals.core;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipse.tcf.te.tcf.terminals.core.activator.CoreBundleActivator
+Bundle-Vendor: %providerName
+Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
+ org.eclipse.tcf.te.runtime;bundle-version="1.0.0",
+ org.eclipse.tcf.te.runtime.services;bundle-version="1.0.0",
+ org.eclipse.tcf.te.core;bundle-version="1.0.0",
+ org.eclipse.tcf.core;bundle-version="1.0.0",
+ org.eclipse.tcf.te.tcf.core;bundle-version="1.0.0"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
+Bundle-Localization: plugin
+Export-Package: org.eclipse.tcf.te.tcf.terminals.core.activator;x-internal:=true,
+ org.eclipse.tcf.te.tcf.terminals.core.interfaces.launcher,
+ org.eclipse.tcf.te.tcf.terminals.core.interfaces.tracing;x-internal:=true,
+ org.eclipse.tcf.te.tcf.terminals.core.launcher,
+ org.eclipse.tcf.te.tcf.terminals.core.nls;x-internal:=true
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.swt/build.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/build.properties
index f4ae97015..f4ae97015 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.swt/build.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/build.properties
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.core/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/plugin.properties
index 9969ab30d..9969ab30d 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.core/plugin.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/plugin.properties
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/pom.xml b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/pom.xml
new file mode 100644
index 000000000..e4d4dcb0c
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.tcf</groupId>
+ <artifactId>tcf-parent</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../../../pom.xml</relativePath>
+ </parent>
+
+ <version>1.0.0.qualifier</version>
+ <artifactId>org.eclipse.tcf.te.tcf.terminals.core</artifactId>
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/src/org/eclipse/tcf/te/tcf/terminals/core/activator/CoreBundleActivator.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/src/org/eclipse/tcf/te/tcf/terminals/core/activator/CoreBundleActivator.java
new file mode 100644
index 000000000..359d80934
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/src/org/eclipse/tcf/te/tcf/terminals/core/activator/CoreBundleActivator.java
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.terminals.core.activator;
+
+import org.eclipse.tcf.te.runtime.tracing.TraceHandler;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class CoreBundleActivator implements BundleActivator {
+ // The bundle context
+ private static BundleContext context;
+ // The trace handler instance
+ private static TraceHandler traceHandler;
+
+ /**
+ * Returns the bundle context
+ *
+ * @return the bundle context
+ */
+ public static BundleContext getContext() {
+ return context;
+ }
+
+ /**
+ * Convenience method which returns the unique identifier of this plugin.
+ */
+ public static String getUniqueIdentifier() {
+ if (getContext() != null && getContext().getBundle() != null) {
+ return getContext().getBundle().getSymbolicName();
+ }
+ return null;
+ }
+
+ /**
+ * Returns the bundles trace handler.
+ *
+ * @return The bundles trace handler.
+ */
+ public static TraceHandler getTraceHandler() {
+ if (traceHandler == null) {
+ traceHandler = new TraceHandler(getUniqueIdentifier());
+ }
+ return traceHandler;
+ }
+
+ /* (non-Javadoc)
+ * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext bundleContext) throws Exception {
+ CoreBundleActivator.context = bundleContext;
+ }
+
+ /* (non-Javadoc)
+ * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext bundleContext) throws Exception {
+ CoreBundleActivator.context = null;
+ traceHandler = null;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.core/src/org/eclipse/tm/te/tcf/terminals/core/interfaces/launcher/ITerminalsContextAwareListener.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/src/org/eclipse/tcf/te/tcf/terminals/core/interfaces/launcher/ITerminalsContextAwareListener.java
index 84613e870..131104f6a 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.core/src/org/eclipse/tm/te/tcf/terminals/core/interfaces/launcher/ITerminalsContextAwareListener.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/src/org/eclipse/tcf/te/tcf/terminals/core/interfaces/launcher/ITerminalsContextAwareListener.java
@@ -7,9 +7,9 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.terminals.core.interfaces.launcher;
+package org.eclipse.tcf.te.tcf.terminals.core.interfaces.launcher;
-import org.eclipse.tm.tcf.services.ITerminals;
+import org.eclipse.tcf.services.ITerminals;
/**
* Remote terminal context aware listener.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.core/src/org/eclipse/tm/te/tcf/terminals/core/interfaces/launcher/ITerminalsLauncher.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/src/org/eclipse/tcf/te/tcf/terminals/core/interfaces/launcher/ITerminalsLauncher.java
index f19cdb46f..7d5fc33b3 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.core/src/org/eclipse/tm/te/tcf/terminals/core/interfaces/launcher/ITerminalsLauncher.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/src/org/eclipse/tcf/te/tcf/terminals/core/interfaces/launcher/ITerminalsLauncher.java
@@ -7,14 +7,14 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.terminals.core.interfaces.launcher;
+package org.eclipse.tcf.te.tcf.terminals.core.interfaces.launcher;
import java.util.Map;
import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.tm.tcf.protocol.IPeer;
-import org.eclipse.tm.te.runtime.interfaces.callback.ICallback;
-import org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
/**
* Interface to be implemented by classes providing a remote terminals launcher.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.core/src/org/eclipse/tm/te/tcf/terminals/core/internal/tracing/ITraceIds.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/src/org/eclipse/tcf/te/tcf/terminals/core/interfaces/tracing/ITraceIds.java
index 713ded046..f0b42046f 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.core/src/org/eclipse/tm/te/tcf/terminals/core/internal/tracing/ITraceIds.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/src/org/eclipse/tcf/te/tcf/terminals/core/interfaces/tracing/ITraceIds.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.terminals.core.internal.tracing;
+package org.eclipse.tcf.te.tcf.terminals.core.interfaces.tracing;
/**
* Core plug-in trace slot identifiers.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.core/src/org/eclipse/tm/te/tcf/terminals/core/launcher/TerminalsLauncher.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/src/org/eclipse/tcf/te/tcf/terminals/core/launcher/TerminalsLauncher.java
index 1a2abd7d7..21a25e5c3 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.core/src/org/eclipse/tm/te/tcf/terminals/core/launcher/TerminalsLauncher.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/src/org/eclipse/tcf/te/tcf/terminals/core/launcher/TerminalsLauncher.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.terminals.core.launcher;
+package org.eclipse.tcf.te.tcf.terminals.core.launcher;
import java.io.BufferedWriter;
import java.io.FileWriter;
@@ -31,34 +31,35 @@ import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.PlatformObject;
import org.eclipse.core.runtime.Status;
import org.eclipse.osgi.util.NLS;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IChannel.IChannelListener;
-import org.eclipse.tm.tcf.protocol.IPeer;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.tcf.services.IStreams;
-import org.eclipse.tm.tcf.services.ITerminals;
-import org.eclipse.tm.tcf.services.ITerminals.TerminalContext;
-import org.eclipse.tm.te.core.async.AsyncCallbackCollector;
-import org.eclipse.tm.te.runtime.callback.Callback;
-import org.eclipse.tm.te.runtime.events.DisposedEvent;
-import org.eclipse.tm.te.runtime.events.EventManager;
-import org.eclipse.tm.te.runtime.interfaces.callback.ICallback;
-import org.eclipse.tm.te.runtime.interfaces.events.IEventListener;
-import org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer;
-import org.eclipse.tm.te.runtime.properties.PropertiesContainer;
-import org.eclipse.tm.te.runtime.services.ServiceManager;
-import org.eclipse.tm.te.runtime.services.interfaces.ITerminalService;
-import org.eclipse.tm.te.runtime.services.interfaces.constants.ITerminalsConnectorConstants;
-import org.eclipse.tm.te.tcf.core.Tcf;
-import org.eclipse.tm.te.tcf.core.interfaces.IChannelManager;
-import org.eclipse.tm.te.tcf.core.streams.StreamsDataProvider;
-import org.eclipse.tm.te.tcf.core.streams.StreamsDataReceiver;
-import org.eclipse.tm.te.tcf.terminals.core.activator.CoreBundleActivator;
-import org.eclipse.tm.te.tcf.terminals.core.interfaces.launcher.ITerminalsContextAwareListener;
-import org.eclipse.tm.te.tcf.terminals.core.interfaces.launcher.ITerminalsLauncher;
-import org.eclipse.tm.te.tcf.terminals.core.internal.tracing.ITraceIds;
-import org.eclipse.tm.te.tcf.terminals.core.nls.Messages;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IChannel.IChannelListener;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.services.IStreams;
+import org.eclipse.tcf.services.ITerminals;
+import org.eclipse.tcf.services.ITerminals.TerminalContext;
+import org.eclipse.tcf.te.core.async.AsyncCallbackCollector;
+import org.eclipse.tcf.te.runtime.callback.Callback;
+import org.eclipse.tcf.te.runtime.events.DisposedEvent;
+import org.eclipse.tcf.te.runtime.events.EventManager;
+import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback;
+import org.eclipse.tcf.te.runtime.interfaces.events.IEventListener;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.runtime.properties.PropertiesContainer;
+import org.eclipse.tcf.te.runtime.services.ServiceManager;
+import org.eclipse.tcf.te.runtime.services.interfaces.ITerminalService;
+import org.eclipse.tcf.te.runtime.services.interfaces.constants.ITerminalsConnectorConstants;
+import org.eclipse.tcf.te.tcf.core.Tcf;
+import org.eclipse.tcf.te.tcf.core.async.CallbackInvocationDelegate;
+import org.eclipse.tcf.te.tcf.core.interfaces.IChannelManager;
+import org.eclipse.tcf.te.tcf.core.streams.StreamsDataProvider;
+import org.eclipse.tcf.te.tcf.core.streams.StreamsDataReceiver;
+import org.eclipse.tcf.te.tcf.terminals.core.activator.CoreBundleActivator;
+import org.eclipse.tcf.te.tcf.terminals.core.interfaces.launcher.ITerminalsContextAwareListener;
+import org.eclipse.tcf.te.tcf.terminals.core.interfaces.launcher.ITerminalsLauncher;
+import org.eclipse.tcf.te.tcf.terminals.core.interfaces.tracing.ITraceIds;
+import org.eclipse.tcf.te.tcf.terminals.core.nls.Messages;
/**
* Remote terminals launcher.
@@ -96,7 +97,7 @@ public class TerminalsLauncher extends PlatformObject implements ITerminalsLaunc
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.terminals.core.interfaces.launcher.ITerminalsLauncher#dispose()
+ * @see org.eclipse.tcf.te.tcf.terminals.core.interfaces.launcher.ITerminalsLauncher#dispose()
*/
@Override
public void dispose() {
@@ -112,25 +113,15 @@ public class TerminalsLauncher extends PlatformObject implements ITerminalsLaunc
eventListener = null;
}
- // Create the callback invocation delegate
- AsyncCallbackCollector.ICallbackInvocationDelegate delegate = new AsyncCallbackCollector.ICallbackInvocationDelegate() {
- @Override
- public void invoke(Runnable runnable) {
- Assert.isNotNull(runnable);
- if (Protocol.isDispatchThread()) runnable.run();
- else Protocol.invokeLater(runnable);
- }
- };
-
// Create the callback collector
final AsyncCallbackCollector collector = new AsyncCallbackCollector(new Callback() {
@Override
protected void internalDone(Object caller, IStatus status) {
Assert.isTrue(Protocol.isDispatchThread(), "Illegal Thread Access"); //$NON-NLS-1$
// Close the channel as all disposal is done
- if (finChannel != null) finChannel.close();
+ if (finChannel != null) Tcf.getChannelManager().closeChannel(finChannel);
}
- }, delegate);
+ }, new CallbackInvocationDelegate());
if (streamsListener != null) {
// Dispose the streams listener
@@ -159,7 +150,7 @@ public class TerminalsLauncher extends PlatformObject implements ITerminalsLaunc
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.terminals.core.interfaces.launcher.ITerminalsLauncher#exit()
+ * @see org.eclipse.tcf.te.tcf.terminals.core.interfaces.launcher.ITerminalsLauncher#exit()
*/
@Override
public void exit() {
@@ -230,7 +221,7 @@ public class TerminalsLauncher extends PlatformObject implements ITerminalsLaunc
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.terminals.core.interfaces.launcher.ITerminalsLauncher#launch(org.eclipse.tm.tcf.protocol.IPeer, org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer, org.eclipse.tm.te.runtime.interfaces.callback.ICallback)
+ * @see org.eclipse.tcf.te.tcf.terminals.core.interfaces.launcher.ITerminalsLauncher#launch(org.eclipse.tcf.protocol.IPeer, org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer, org.eclipse.tcf.te.runtime.interfaces.callback.ICallback)
*/
@Override
public void launch(final IPeer peer, final IPropertiesContainer properties, final ICallback callback) {
@@ -241,7 +232,7 @@ public class TerminalsLauncher extends PlatformObject implements ITerminalsLaunc
if (callback == null) {
this.callback = new Callback() {
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.callback.Callback#internalDone(java.lang.Object, org.eclipse.core.runtime.IStatus)
+ * @see org.eclipse.tcf.te.runtime.callback.Callback#internalDone(java.lang.Object, org.eclipse.core.runtime.IStatus)
*/
@Override
public void internalDone(Object caller, IStatus status) {
@@ -255,10 +246,10 @@ public class TerminalsLauncher extends PlatformObject implements ITerminalsLaunc
// Remember the terminal properties
this.properties = properties;
- // Open a channel to the given peer
- Tcf.getChannelManager().openChannel(peer, new IChannelManager.DoneOpenChannel() {
+ // Open a dedicated channel to the given peer
+ Tcf.getChannelManager().openChannel(peer, true, new IChannelManager.DoneOpenChannel() {
/* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.core.interfaces.IChannelManager.DoneOpenChannel#doneOpenChannel(java.lang.Throwable, org.eclipse.tm.tcf.protocol.IChannel)
+ * @see org.eclipse.tcf.te.tcf.core.interfaces.IChannelManager.DoneOpenChannel#doneOpenChannel(java.lang.Throwable, org.eclipse.tcf.protocol.IChannel)
*/
@Override
public void doneOpenChannel(Throwable error, IChannel channel) {
@@ -269,13 +260,13 @@ public class TerminalsLauncher extends PlatformObject implements ITerminalsLaunc
// is closed from the remote side.
channel.addChannelListener(new IChannelListener() {
/* (non-Javadoc)
- * @see org.eclipse.tm.tcf.protocol.IChannel.IChannelListener#onChannelOpened()
+ * @see org.eclipse.tcf.protocol.IChannel.IChannelListener#onChannelOpened()
*/
@Override
public void onChannelOpened() {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.tcf.protocol.IChannel.IChannelListener#onChannelClosed(java.lang.Throwable)
+ * @see org.eclipse.tcf.protocol.IChannel.IChannelListener#onChannelClosed(java.lang.Throwable)
*/
@Override
public void onChannelClosed(Throwable error) {
@@ -287,7 +278,7 @@ public class TerminalsLauncher extends PlatformObject implements ITerminalsLaunc
}
}
/* (non-Javadoc)
- * @see org.eclipse.tm.tcf.protocol.IChannel.IChannelListener#congestionLevel(int)
+ * @see org.eclipse.tcf.protocol.IChannel.IChannelListener#congestionLevel(int)
*/
@Override
public void congestionLevel(int level) {
@@ -384,7 +375,7 @@ public class TerminalsLauncher extends PlatformObject implements ITerminalsLaunc
/**
* Initialize and attach the output console and/or the output file.
* <p>
- * Called from {@link IStreams#subscribe(String, org.eclipse.tm.tcf.services.IStreams.StreamsListener, org.eclipse.tm.tcf.services.IStreams.DoneSubscribe)}.
+ * Called from {@link IStreams#subscribe(String, org.eclipse.tcf.services.IStreams.StreamsListener, org.eclipse.tcf.services.IStreams.DoneSubscribe)}.
*/
protected void onSubscribeStreamsDone() {
// Get the properties container
@@ -408,8 +399,8 @@ public class TerminalsLauncher extends PlatformObject implements ITerminalsLaunc
if (terminal != null) {
// Create the terminal streams settings
PropertiesContainer props = new PropertiesContainer();
- props.setProperty(ITerminalsConnectorConstants.PROP_CONNECTOR_TYPE_ID, "org.eclipse.tm.te.ui.terminals.type.terminals"); //$NON-NLS-1$
- props.setProperty(ITerminalsConnectorConstants.PROP_ID, "org.eclipse.tm.te.ui.terminals.TerminalsView"); //$NON-NLS-1$
+ props.setProperty(ITerminalsConnectorConstants.PROP_CONNECTOR_TYPE_ID, "org.eclipse.tcf.te.ui.terminals.type.terminals"); //$NON-NLS-1$
+ props.setProperty(ITerminalsConnectorConstants.PROP_ID, "org.eclipse.tcf.te.ui.terminals.TerminalsView"); //$NON-NLS-1$
// Set the terminal tab title
String terminalTitle = getTerminalTitle();
if (terminalTitle != null) {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.core/src/org/eclipse/tm/te/tcf/terminals/core/launcher/TerminalsLauncherEventListener.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/src/org/eclipse/tcf/te/tcf/terminals/core/launcher/TerminalsLauncherEventListener.java
index 4fdfaf44c..b663b8a47 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.core/src/org/eclipse/tm/te/tcf/terminals/core/launcher/TerminalsLauncherEventListener.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/src/org/eclipse/tcf/te/tcf/terminals/core/launcher/TerminalsLauncherEventListener.java
@@ -7,14 +7,14 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.terminals.core.launcher;
+package org.eclipse.tcf.te.tcf.terminals.core.launcher;
import java.util.EventObject;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.PlatformObject;
-import org.eclipse.tm.te.runtime.events.DisposedEvent;
-import org.eclipse.tm.te.runtime.interfaces.events.IEventListener;
+import org.eclipse.tcf.te.runtime.events.DisposedEvent;
+import org.eclipse.tcf.te.runtime.interfaces.events.IEventListener;
/**
* Remote terminals launcher default notification listener implementation.
@@ -38,7 +38,7 @@ public class TerminalsLauncherEventListener extends PlatformObject implements IE
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.events.IEventListener#eventFired(java.util.EventObject)
+ * @see org.eclipse.tcf.te.runtime.interfaces.events.IEventListener#eventFired(java.util.EventObject)
*/
@Override
public void eventFired(EventObject event) {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.core/src/org/eclipse/tm/te/tcf/terminals/core/launcher/TerminalsListener.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/src/org/eclipse/tcf/te/tcf/terminals/core/launcher/TerminalsListener.java
index b5b9442e1..f28b6f7f4 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.core/src/org/eclipse/tm/te/tcf/terminals/core/launcher/TerminalsListener.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/src/org/eclipse/tcf/te/tcf/terminals/core/launcher/TerminalsListener.java
@@ -7,18 +7,18 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.terminals.core.launcher;
+package org.eclipse.tcf.te.tcf.terminals.core.launcher;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
-import org.eclipse.tm.tcf.services.ITerminals;
-import org.eclipse.tm.tcf.services.ITerminals.TerminalContext;
-import org.eclipse.tm.te.runtime.events.EventManager;
-import org.eclipse.tm.te.runtime.interfaces.callback.ICallback;
-import org.eclipse.tm.te.tcf.terminals.core.activator.CoreBundleActivator;
-import org.eclipse.tm.te.tcf.terminals.core.interfaces.launcher.ITerminalsContextAwareListener;
-import org.eclipse.tm.te.tcf.terminals.core.internal.tracing.ITraceIds;
+import org.eclipse.tcf.services.ITerminals;
+import org.eclipse.tcf.services.ITerminals.TerminalContext;
+import org.eclipse.tcf.te.tcf.terminals.core.activator.CoreBundleActivator;
+import org.eclipse.tcf.te.tcf.terminals.core.interfaces.launcher.ITerminalsContextAwareListener;
+import org.eclipse.tcf.te.tcf.terminals.core.interfaces.tracing.ITraceIds;
+import org.eclipse.tcf.te.runtime.events.EventManager;
+import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback;
/**
* Remote process processes listener implementation.
@@ -69,7 +69,7 @@ public class TerminalsListener implements ITerminals.TerminalsListener, ITermina
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.terminals.core.interfaces.launcher.ITerminalsContextAwareListener#setTerminalsContext(org.eclipse.tm.tcf.services.ITerminals.TerminalContext)
+ * @see org.eclipse.tcf.te.tcf.terminals.core.interfaces.launcher.ITerminalsContextAwareListener#setTerminalsContext(org.eclipse.tcf.services.ITerminals.TerminalContext)
*/
@Override
public void setTerminalsContext(TerminalContext context) {
@@ -84,7 +84,7 @@ public class TerminalsListener implements ITerminals.TerminalsListener, ITermina
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.terminals.core.interfaces.launcher.ITerminalsContextAwareListener#getTerminalsContext()
+ * @see org.eclipse.tcf.te.tcf.terminals.core.interfaces.launcher.ITerminalsContextAwareListener#getTerminalsContext()
*/
@Override
public TerminalContext getTerminalsContext() {
@@ -92,7 +92,7 @@ public class TerminalsListener implements ITerminals.TerminalsListener, ITermina
}
/* (non-Javadoc)
- * @see org.eclipse.tm.tcf.services.ITerminals.TerminalsListener#exited(java.lang.String, int)
+ * @see org.eclipse.tcf.services.ITerminals.TerminalsListener#exited(java.lang.String, int)
*/
@Override
public void exited(String terminalId, int exitCode) {
@@ -128,7 +128,7 @@ public class TerminalsListener implements ITerminals.TerminalsListener, ITermina
}
/* (non-Javadoc)
- * @see org.eclipse.tm.tcf.services.ITerminals.TerminalsListener#winSizeChanged(java.lang.String, int, int)
+ * @see org.eclipse.tcf.services.ITerminals.TerminalsListener#winSizeChanged(java.lang.String, int, int)
*/
@Override
public void winSizeChanged(String terminalId, int newWidth, int newHeight) {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.core/src/org/eclipse/tm/te/tcf/terminals/core/launcher/TerminalsStateChangeEvent.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/src/org/eclipse/tcf/te/tcf/terminals/core/launcher/TerminalsStateChangeEvent.java
index 25259840d..f95c9aadb 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.core/src/org/eclipse/tm/te/tcf/terminals/core/launcher/TerminalsStateChangeEvent.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/src/org/eclipse/tcf/te/tcf/terminals/core/launcher/TerminalsStateChangeEvent.java
@@ -7,9 +7,9 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.terminals.core.launcher;
+package org.eclipse.tcf.te.tcf.terminals.core.launcher;
-import org.eclipse.tm.te.runtime.events.ChangeEvent;
+import org.eclipse.tcf.te.runtime.events.ChangeEvent;
/**
* Remote terminals state change event implementation.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.core/src/org/eclipse/tm/te/tcf/terminals/core/launcher/TerminalsStreamsListener.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/src/org/eclipse/tcf/te/tcf/terminals/core/launcher/TerminalsStreamsListener.java
index 4d12ab394..bf0c55da5 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.core/src/org/eclipse/tm/te/tcf/terminals/core/launcher/TerminalsStreamsListener.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/src/org/eclipse/tcf/te/tcf/terminals/core/launcher/TerminalsStreamsListener.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.terminals.core.launcher;
+package org.eclipse.tcf.te.tcf.terminals.core.launcher;
import java.io.IOException;
import java.io.Writer;
@@ -21,22 +21,23 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
import org.eclipse.osgi.util.NLS;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.tcf.services.IStreams;
-import org.eclipse.tm.tcf.services.ITerminals;
-import org.eclipse.tm.tcf.services.ITerminals.TerminalContext;
-import org.eclipse.tm.tcf.util.TCFTask;
-import org.eclipse.tm.te.core.async.AsyncCallbackCollector;
-import org.eclipse.tm.te.runtime.callback.Callback;
-import org.eclipse.tm.te.runtime.interfaces.callback.ICallback;
-import org.eclipse.tm.te.tcf.core.streams.StreamsDataProvider;
-import org.eclipse.tm.te.tcf.core.streams.StreamsDataReceiver;
-import org.eclipse.tm.te.tcf.core.utils.ExceptionUtils;
-import org.eclipse.tm.te.tcf.terminals.core.activator.CoreBundleActivator;
-import org.eclipse.tm.te.tcf.terminals.core.interfaces.launcher.ITerminalsContextAwareListener;
-import org.eclipse.tm.te.tcf.terminals.core.internal.tracing.ITraceIds;
-import org.eclipse.tm.te.tcf.terminals.core.nls.Messages;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.services.IStreams;
+import org.eclipse.tcf.services.ITerminals;
+import org.eclipse.tcf.services.ITerminals.TerminalContext;
+import org.eclipse.tcf.te.core.async.AsyncCallbackCollector;
+import org.eclipse.tcf.te.runtime.callback.Callback;
+import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback;
+import org.eclipse.tcf.te.tcf.core.async.CallbackInvocationDelegate;
+import org.eclipse.tcf.te.tcf.core.streams.StreamsDataProvider;
+import org.eclipse.tcf.te.tcf.core.streams.StreamsDataReceiver;
+import org.eclipse.tcf.te.tcf.core.util.ExceptionUtils;
+import org.eclipse.tcf.te.tcf.terminals.core.activator.CoreBundleActivator;
+import org.eclipse.tcf.te.tcf.terminals.core.interfaces.launcher.ITerminalsContextAwareListener;
+import org.eclipse.tcf.te.tcf.terminals.core.interfaces.tracing.ITraceIds;
+import org.eclipse.tcf.te.tcf.terminals.core.nls.Messages;
+import org.eclipse.tcf.util.TCFTask;
/**
* Remote terminal streams listener implementation.
@@ -354,7 +355,7 @@ public class TerminalsStreamsListener implements IStreams.StreamsListener, ITerm
public void run() {
service.read(streamId, size, new IStreams.DoneRead() {
/* (non-Javadoc)
- * @see org.eclipse.tm.tcf.services.IStreams.DoneRead#doneRead(org.eclipse.tm.tcf.protocol.IToken, java.lang.Exception, int, byte[], boolean)
+ * @see org.eclipse.tcf.services.IStreams.DoneRead#doneRead(org.eclipse.tcf.protocol.IToken, java.lang.Exception, int, byte[], boolean)
*/
@Override
public void doneRead(IToken token, Exception error, int lostSize, byte[] data, boolean eos) {
@@ -601,7 +602,7 @@ public class TerminalsStreamsListener implements IStreams.StreamsListener, ITerm
public void run() {
service.write(streamId, data, 0, size, new IStreams.DoneWrite() {
/* (non-Javadoc)
- * @see org.eclipse.tm.tcf.services.IStreams.DoneWrite#doneWrite(org.eclipse.tm.tcf.protocol.IToken, java.lang.Exception)
+ * @see org.eclipse.tcf.services.IStreams.DoneWrite#doneWrite(org.eclipse.tcf.protocol.IToken, java.lang.Exception)
*/
@Override
public void doneWrite(IToken token, Exception error) {
@@ -656,20 +657,10 @@ public class TerminalsStreamsListener implements IStreams.StreamsListener, ITerm
dataReceiver.clear();
}
- // Create the callback invocation delegate
- AsyncCallbackCollector.ICallbackInvocationDelegate delegate = new AsyncCallbackCollector.ICallbackInvocationDelegate() {
- @Override
- public void invoke(Runnable runnable) {
- Assert.isNotNull(runnable);
- if (Protocol.isDispatchThread()) runnable.run();
- else Protocol.invokeLater(runnable);
- }
- };
-
// Create a new collector to catch all runnable stop callback's
AsyncCallbackCollector collector = new AsyncCallbackCollector(new Callback() {
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.callback.Callback#internalDone(java.lang.Object, org.eclipse.core.runtime.IStatus)
+ * @see org.eclipse.tcf.te.runtime.callback.Callback#internalDone(java.lang.Object, org.eclipse.core.runtime.IStatus)
*/
@Override
protected void internalDone(final Object caller, final IStatus status) {
@@ -687,7 +678,7 @@ public class TerminalsStreamsListener implements IStreams.StreamsListener, ITerm
}
});
}
- }, delegate);
+ }, new CallbackInvocationDelegate());
// Loop all runnable's and force them to stop
synchronized (runnables) {
@@ -746,7 +737,7 @@ public class TerminalsStreamsListener implements IStreams.StreamsListener, ITerm
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.terminals.core.interfaces.launcher.ITerminalsContextAwareListener#setTerminalsContext(org.eclipse.tm.tcf.services.ITerminals.TerminalContext)
+ * @see org.eclipse.tcf.te.tcf.terminals.core.interfaces.launcher.ITerminalsContextAwareListener#setTerminalsContext(org.eclipse.tcf.services.ITerminals.TerminalContext)
*/
@Override
public void setTerminalsContext(TerminalContext context) {
@@ -775,7 +766,7 @@ public class TerminalsStreamsListener implements IStreams.StreamsListener, ITerm
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.terminals.core.interfaces.launcher.ITerminalsContextAwareListener#getTerminalsContext()
+ * @see org.eclipse.tcf.te.tcf.terminals.core.interfaces.launcher.ITerminalsContextAwareListener#getTerminalsContext()
*/
@Override
public TerminalContext getTerminalsContext() {
@@ -783,7 +774,7 @@ public class TerminalsStreamsListener implements IStreams.StreamsListener, ITerm
}
/* (non-Javadoc)
- * @see org.eclipse.tm.tcf.services.IStreams.StreamsListener#created(java.lang.String, java.lang.String, java.lang.String)
+ * @see org.eclipse.tcf.services.IStreams.StreamsListener#created(java.lang.String, java.lang.String, java.lang.String)
*/
@Override
public void created(String streamType, String streamId, String contextId) {
@@ -859,7 +850,7 @@ public class TerminalsStreamsListener implements IStreams.StreamsListener, ITerm
}
/* (non-Javadoc)
- * @see org.eclipse.tm.tcf.services.IStreams.StreamsListener#disposed(java.lang.String, java.lang.String)
+ * @see org.eclipse.tcf.services.IStreams.StreamsListener#disposed(java.lang.String, java.lang.String)
*/
@Override
public void disposed(String streamType, String streamId) {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.core/src/org/eclipse/tm/te/tcf/terminals/core/nls/Messages.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/src/org/eclipse/tcf/te/tcf/terminals/core/nls/Messages.java
index 3d6e74a0a..150ea235b 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.core/src/org/eclipse/tm/te/tcf/terminals/core/nls/Messages.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/src/org/eclipse/tcf/te/tcf/terminals/core/nls/Messages.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.terminals.core.nls;
+package org.eclipse.tcf.te.tcf.terminals.core.nls;
import org.eclipse.osgi.util.NLS;
@@ -17,7 +17,7 @@ import org.eclipse.osgi.util.NLS;
public class Messages extends NLS {
// The plug-in resource bundle name
- private static final String BUNDLE_NAME = "org.eclipse.tm.te.tcf.terminals.core.nls.Messages"; //$NON-NLS-1$
+ private static final String BUNDLE_NAME = "org.eclipse.tcf.te.tcf.terminals.core.nls.Messages"; //$NON-NLS-1$
/**
* Static constructor.
@@ -31,7 +31,6 @@ public class Messages extends NLS {
public static String TerminalsLauncher_error_channelConnectFailed;
public static String TerminalsLauncher_error_channelNotConnected;
- public static String TerminalsLauncher_error_missingProcessPath;
public static String TerminalsLauncher_error_missingRequiredService;
public static String TerminalsLauncher_error_illegalNullArgument;
public static String TerminalsLauncher_error_terminalLaunchFailed;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.core/src/org/eclipse/tm/te/tcf/terminals/core/nls/Messages.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/src/org/eclipse/tcf/te/tcf/terminals/core/nls/Messages.properties
index acf749769..23a7994c4 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.core/src/org/eclipse/tm/te/tcf/terminals/core/nls/Messages.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/src/org/eclipse/tcf/te/tcf/terminals/core/nls/Messages.properties
@@ -1,5 +1,5 @@
#
-# org.eclipse.tm.te.tcf.terminals.core
+# org.eclipse.tcf.te.tcf.terminals.core
# Externalized Strings.
#
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.ssh/.classpath b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.ui/.classpath
index 8a8f1668c..8a8f1668c 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.ssh/.classpath
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.ui/.classpath
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.ui/.options b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.ui/.options
new file mode 100644
index 000000000..ed8f52a08
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.ui/.options
@@ -0,0 +1 @@
+org.eclipse.tcf.te.tcf.terminals.ui/debugmode = 0
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.ui/.project b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.ui/.project
new file mode 100644
index 000000000..ff71f257a
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.ui/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.tcf.te.tcf.terminals.ui</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/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.ui/.settings/org.eclipse.jdt.core.prefs b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.ui/.settings/org.eclipse.jdt.core.prefs
index 9413dab1b..9413dab1b 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.ui/.settings/org.eclipse.jdt.core.prefs
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.ui/.settings/org.eclipse.jdt.core.prefs
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.ui/.settings/org.eclipse.jdt.ui.prefs b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.ui/.settings/org.eclipse.jdt.ui.prefs
index 63bee28b5..63bee28b5 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.ui/.settings/org.eclipse.jdt.ui.prefs
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.ui/.settings/org.eclipse.jdt.ui.prefs
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.ui/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.ui/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..00487d62d
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.ui/META-INF/MANIFEST.MF
@@ -0,0 +1,23 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.tcf.te.tcf.terminals.ui;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipse.tcf.te.tcf.terminals.ui.activator.UIPlugin
+Bundle-Vendor: %providerName
+Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
+ org.eclipse.core.expressions;bundle-version="3.4.300",
+ org.eclipse.ui;bundle-version="3.7.0",
+ org.eclipse.ui.forms;bundle-version="3.5.100",
+ org.eclipse.tcf.te.runtime;bundle-version="1.0.0",
+ org.eclipse.tcf.te.runtime.services;bundle-version="1.0.0",
+ org.eclipse.tcf.core;bundle-version="1.0.0",
+ org.eclipse.tcf.te.tcf.locator;bundle-version="1.0.0",
+ org.eclipse.tcf.te.tcf.terminals.core;bundle-version="1.0.0",
+ org.eclipse.tcf.te.ui;bundle-version="1.0.0",
+ org.eclipse.tcf.te.ui.terminals;bundle-version="1.0.0",
+ org.eclipse.tcf.te.ui.controls;bundle-version="1.0.0",
+ org.eclipse.tm.terminal;bundle-version="3.1.1"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
+Bundle-Localization: plugin
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.ssh/build.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.ui/build.properties
index 73a5119ed..73a5119ed 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.ssh/build.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.ui/build.properties
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.ui/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.ui/plugin.properties
index 20ab21b13..20ab21b13 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.ui/plugin.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.ui/plugin.properties
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.ui/plugin.xml b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.ui/plugin.xml
index cabb2aa88..3f33082f5 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.ui/plugin.xml
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.ui/plugin.xml
@@ -6,31 +6,31 @@
<extension point="org.eclipse.tm.terminal.terminalConnectors">
<connector
name="%TerminalConnector.terminals"
- id="org.eclipse.tm.te.tcf.terminals.ui.TerminalsConnector"
+ id="org.eclipse.tcf.te.tcf.terminals.ui.TerminalsConnector"
hidden="true"
- class="org.eclipse.tm.te.tcf.terminals.ui.connector.TerminalsConnector"/>
+ class="org.eclipse.tcf.te.tcf.terminals.ui.connector.TerminalsConnector"/>
</extension>
<!-- Terminal connector type contributions -->
- <extension point="org.eclipse.tm.te.ui.terminals.connectorTypes">
+ <extension point="org.eclipse.tcf.te.ui.terminals.connectorTypes">
<connectorType
- class="org.eclipse.tm.te.tcf.terminals.ui.connector.TerminalsConnectorType"
- id="org.eclipse.tm.te.ui.terminals.type.terminals"
+ class="org.eclipse.tcf.te.tcf.terminals.ui.connector.TerminalsConnectorType"
+ id="org.eclipse.tcf.te.ui.terminals.type.terminals"
label="%TerminalsConnectorType.label">
</connectorType>
</extension>
<!-- Terminals launcher delegate contributions -->
- <extension point="org.eclipse.tm.te.ui.terminals.launcherDelegates">
+ <extension point="org.eclipse.tcf.te.ui.terminals.launcherDelegates">
<delegate
- class="org.eclipse.tm.te.tcf.terminals.ui.launcher.LauncherDelegate"
- id="org.eclipse.tm.te.ui.terminals.launcher.tcf"
+ class="org.eclipse.tcf.te.tcf.terminals.ui.launcher.LauncherDelegate"
+ id="org.eclipse.tcf.te.ui.terminals.launcher.tcf"
label="%launcherDelegate.label">
<enablement>
<with variable="selection">
<count value="1"/>
<iterate operator="and" ifEmpty="false">
- <instanceof value="org.eclipse.tm.te.tcf.locator.interfaces.nodes.IPeerModel"/>
+ <instanceof value="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel"/>
</iterate>
</with>
</enablement>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.ui/pom.xml b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.ui/pom.xml
new file mode 100644
index 000000000..0e8cb3e54
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.ui/pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.tcf</groupId>
+ <artifactId>tcf-parent</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../../../pom.xml</relativePath>
+ </parent>
+
+ <version>1.0.0.qualifier</version>
+ <artifactId>org.eclipse.tcf.te.tcf.terminals.ui</artifactId>
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.ui/src/org/eclipse/tm/te/tcf/terminals/ui/activator/UIPlugin.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.ui/src/org/eclipse/tcf/te/tcf/terminals/ui/activator/UIPlugin.java
index a99fed653..56fc1ef55 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.ui/src/org/eclipse/tm/te/tcf/terminals/ui/activator/UIPlugin.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.ui/src/org/eclipse/tcf/te/tcf/terminals/ui/activator/UIPlugin.java
@@ -7,12 +7,12 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.terminals.ui.activator;
+package org.eclipse.tcf.te.tcf.terminals.ui.activator;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.swt.graphics.Image;
-import org.eclipse.tm.te.runtime.tracing.TraceHandler;
+import org.eclipse.tcf.te.runtime.tracing.TraceHandler;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.ui/src/org/eclipse/tm/te/tcf/terminals/ui/connector/TerminalsConnector.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.ui/src/org/eclipse/tcf/te/tcf/terminals/ui/connector/TerminalsConnector.java
index d4a16efa4..1c3708a84 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.ui/src/org/eclipse/tm/te/tcf/terminals/ui/connector/TerminalsConnector.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.ui/src/org/eclipse/tcf/te/tcf/terminals/ui/connector/TerminalsConnector.java
@@ -7,18 +7,18 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.terminals.ui.connector;
+package org.eclipse.tcf.te.tcf.terminals.ui.connector;
import org.eclipse.core.runtime.Assert;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.services.ITerminals;
+import org.eclipse.tcf.te.runtime.interfaces.IDisposable;
+import org.eclipse.tcf.te.tcf.terminals.core.launcher.TerminalsLauncher;
+import org.eclipse.tcf.te.ui.terminals.streams.AbstractStreamsConnector;
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.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.tcf.services.ITerminals;
-import org.eclipse.tm.te.tcf.terminals.core.launcher.TerminalsLauncher;
-import org.eclipse.tm.te.ui.terminals.streams.AbstractStreamsConnector;
-import org.eclipse.ui.services.IDisposable;
/**
* Terminals connector implementation.
@@ -52,7 +52,7 @@ public class TerminalsConnector extends AbstractStreamsConnector implements IDis
}
/* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl#connect(org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl)
+ * @see org.eclipse.tcf.internal.terminal.provisional.api.provider.TerminalConnectorImpl#connect(org.eclipse.tcf.internal.terminal.provisional.api.ITerminalControl)
*/
@Override
public void connect(ITerminalControl control) {
@@ -67,7 +67,7 @@ public class TerminalsConnector extends AbstractStreamsConnector implements IDis
}
/* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl#isLocalEcho()
+ * @see org.eclipse.tcf.internal.terminal.provisional.api.provider.TerminalConnectorImpl#isLocalEcho()
*/
@Override
public boolean isLocalEcho() {
@@ -75,7 +75,7 @@ public class TerminalsConnector extends AbstractStreamsConnector implements IDis
}
/* (non-Javadoc)
- * @see org.eclipse.ui.services.IDisposable#dispose()
+ * @see org.eclipse.tcf.te.runtime.interfaces.IDisposable#dispose()
*/
@Override
public void dispose() {
@@ -83,7 +83,7 @@ public class TerminalsConnector extends AbstractStreamsConnector implements IDis
}
/* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl#doDisconnect()
+ * @see org.eclipse.tcf.internal.terminal.provisional.api.provider.TerminalConnectorImpl#doDisconnect()
*/
@Override
public void doDisconnect() {
@@ -95,7 +95,7 @@ public class TerminalsConnector extends AbstractStreamsConnector implements IDis
}
/* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl#setTerminalSize(int, int)
+ * @see org.eclipse.tcf.internal.terminal.provisional.api.provider.TerminalConnectorImpl#setTerminalSize(int, int)
*/
@Override
public void setTerminalSize(final int newWidth, final int newHeight) {
@@ -125,7 +125,7 @@ public class TerminalsConnector extends AbstractStreamsConnector implements IDis
// ***** Connector settings handling *****
/* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl#getSettingsSummary()
+ * @see org.eclipse.tcf.internal.terminal.provisional.api.provider.TerminalConnectorImpl#getSettingsSummary()
*/
@Override
public String getSettingsSummary() {
@@ -133,7 +133,7 @@ public class TerminalsConnector extends AbstractStreamsConnector implements IDis
}
/* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl#load(org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore)
+ * @see org.eclipse.tcf.internal.terminal.provisional.api.provider.TerminalConnectorImpl#load(org.eclipse.tcf.internal.terminal.provisional.api.ISettingsStore)
*/
@Override
public void load(ISettingsStore store) {
@@ -141,7 +141,7 @@ public class TerminalsConnector extends AbstractStreamsConnector implements IDis
}
/* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl#save(org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore)
+ * @see org.eclipse.tcf.internal.terminal.provisional.api.provider.TerminalConnectorImpl#save(org.eclipse.tcf.internal.terminal.provisional.api.ISettingsStore)
*/
@Override
public void save(ISettingsStore store) {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.ui/src/org/eclipse/tm/te/tcf/terminals/ui/connector/TerminalsConnectorType.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.ui/src/org/eclipse/tcf/te/tcf/terminals/ui/connector/TerminalsConnectorType.java
index 83d0646a9..c292f2315 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.ui/src/org/eclipse/tm/te/tcf/terminals/ui/connector/TerminalsConnectorType.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.ui/src/org/eclipse/tcf/te/tcf/terminals/ui/connector/TerminalsConnectorType.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.terminals.ui.connector;
+package org.eclipse.tcf.te.tcf.terminals.ui.connector;
import java.io.InputStream;
import java.io.OutputStream;
@@ -16,11 +16,11 @@ import org.eclipse.core.runtime.Assert;
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.TerminalConnectorExtension;
-import org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer;
-import org.eclipse.tm.te.runtime.services.interfaces.constants.ITerminalsConnectorConstants;
-import org.eclipse.tm.te.tcf.terminals.core.interfaces.launcher.ITerminalsLauncher;
-import org.eclipse.tm.te.ui.terminals.internal.SettingsStore;
-import org.eclipse.tm.te.ui.terminals.types.AbstractConnectorType;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.runtime.services.interfaces.constants.ITerminalsConnectorConstants;
+import org.eclipse.tcf.te.tcf.terminals.core.interfaces.launcher.ITerminalsLauncher;
+import org.eclipse.tcf.te.ui.terminals.internal.SettingsStore;
+import org.eclipse.tcf.te.ui.terminals.types.AbstractConnectorType;
/**
* Terminals terminal connector type implementation.
@@ -29,7 +29,7 @@ import org.eclipse.tm.te.ui.terminals.types.AbstractConnectorType;
public class TerminalsConnectorType extends AbstractConnectorType {
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.terminals.interfaces.IConnectorType#createTerminalConnector(org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer)
+ * @see org.eclipse.tcf.te.ui.terminals.interfaces.IConnectorType#createTerminalConnector(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer)
*/
@Override
public ITerminalConnector createTerminalConnector(IPropertiesContainer properties) {
@@ -37,7 +37,7 @@ public class TerminalsConnectorType extends AbstractConnectorType {
// Check for the terminal connector id
String connectorId = properties.getStringProperty(ITerminalsConnectorConstants.PROP_TERMINAL_CONNECTOR_ID);
- if (connectorId == null) connectorId = "org.eclipse.tm.te.tcf.terminals.ui.TerminalsConnector"; //$NON-NLS-1$
+ if (connectorId == null) connectorId = "org.eclipse.tcf.te.tcf.terminals.ui.TerminalsConnector"; //$NON-NLS-1$
// Extract the streams properties
OutputStream stdin = (OutputStream)properties.getProperty(ITerminalsConnectorConstants.PROP_STREAMS_STDIN);
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.ui/src/org/eclipse/tm/te/tcf/terminals/ui/connector/TerminalsSettings.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.ui/src/org/eclipse/tcf/te/tcf/terminals/ui/connector/TerminalsSettings.java
index cdf994b43..226f7b711 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.ui/src/org/eclipse/tm/te/tcf/terminals/ui/connector/TerminalsSettings.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.ui/src/org/eclipse/tcf/te/tcf/terminals/ui/connector/TerminalsSettings.java
@@ -7,15 +7,15 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.terminals.ui.connector;
+package org.eclipse.tcf.te.tcf.terminals.ui.connector;
import java.io.InputStream;
import java.io.OutputStream;
import org.eclipse.core.runtime.Assert;
import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore;
-import org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer;
-import org.eclipse.tm.te.tcf.terminals.core.interfaces.launcher.ITerminalsLauncher;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.tcf.terminals.core.interfaces.launcher.ITerminalsLauncher;
/**
* Terminals connector settings implementation.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.ui/src/org/eclipse/tm/te/tcf/terminals/ui/launcher/LauncherDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.ui/src/org/eclipse/tcf/te/tcf/terminals/ui/launcher/LauncherDelegate.java
index 1b5ec1200..118b24bbc 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.ui/src/org/eclipse/tm/te/tcf/terminals/ui/launcher/LauncherDelegate.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.ui/src/org/eclipse/tcf/te/tcf/terminals/ui/launcher/LauncherDelegate.java
@@ -7,23 +7,23 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.terminals.ui.launcher;
+package org.eclipse.tcf.te.tcf.terminals.ui.launcher;
import java.util.concurrent.atomic.AtomicReference;
import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.tm.tcf.protocol.IPeer;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.te.runtime.interfaces.callback.ICallback;
-import org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer;
-import org.eclipse.tm.te.tcf.locator.interfaces.nodes.IPeerModel;
-import org.eclipse.tm.te.tcf.terminals.core.interfaces.launcher.ITerminalsLauncher;
-import org.eclipse.tm.te.tcf.terminals.core.launcher.TerminalsLauncher;
-import org.eclipse.tm.te.ui.controls.BaseDialogPageControl;
-import org.eclipse.tm.te.ui.terminals.interfaces.IConfigurationPanel;
-import org.eclipse.tm.te.ui.terminals.launcher.AbstractLauncherDelegate;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.tcf.terminals.core.interfaces.launcher.ITerminalsLauncher;
+import org.eclipse.tcf.te.tcf.terminals.core.launcher.TerminalsLauncher;
+import org.eclipse.tcf.te.ui.controls.BaseDialogPageControl;
+import org.eclipse.tcf.te.ui.terminals.interfaces.IConfigurationPanel;
+import org.eclipse.tcf.te.ui.terminals.launcher.AbstractLauncherDelegate;
/**
* Terminals launcher delegate implementation.
@@ -31,7 +31,7 @@ import org.eclipse.tm.te.ui.terminals.launcher.AbstractLauncherDelegate;
public class LauncherDelegate extends AbstractLauncherDelegate {
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.terminals.interfaces.ILauncherDelegate#getPanel(org.eclipse.tm.te.ui.controls.BaseDialogPageControl)
+ * @see org.eclipse.tcf.te.ui.terminals.interfaces.ILauncherDelegate#getPanel(org.eclipse.tcf.te.ui.controls.BaseDialogPageControl)
*/
@Override
public IConfigurationPanel getPanel(BaseDialogPageControl parentControl) {
@@ -39,7 +39,7 @@ public class LauncherDelegate extends AbstractLauncherDelegate {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.terminals.interfaces.ILauncherDelegate#needsUserConfiguration()
+ * @see org.eclipse.tcf.te.ui.terminals.interfaces.ILauncherDelegate#needsUserConfiguration()
*/
@Override
public boolean needsUserConfiguration() {
@@ -47,7 +47,7 @@ public class LauncherDelegate extends AbstractLauncherDelegate {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.terminals.interfaces.ILauncherDelegate#execute(org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer, org.eclipse.tm.te.runtime.interfaces.callback.ICallback)
+ * @see org.eclipse.tcf.te.ui.terminals.interfaces.ILauncherDelegate#execute(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer, org.eclipse.tcf.te.runtime.interfaces.callback.ICallback)
*/
@Override
public void execute(IPropertiesContainer properties, ICallback callback) {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.ui/src/org/eclipse/tm/te/tcf/terminals/ui/nls/Messages.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.ui/src/org/eclipse/tcf/te/tcf/terminals/ui/nls/Messages.java
index 423c3affa..516d8fddb 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.ui/src/org/eclipse/tm/te/tcf/terminals/ui/nls/Messages.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.ui/src/org/eclipse/tcf/te/tcf/terminals/ui/nls/Messages.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.terminals.ui.nls;
+package org.eclipse.tcf.te.tcf.terminals.ui.nls;
import org.eclipse.osgi.util.NLS;
@@ -17,7 +17,7 @@ import org.eclipse.osgi.util.NLS;
public class Messages extends NLS {
// The plug-in resource bundle name
- private static final String BUNDLE_NAME = "org.eclipse.tm.te.tcf.terminals.ui.nls.Messages"; //$NON-NLS-1$
+ private static final String BUNDLE_NAME = "org.eclipse.tcf.te.tcf.terminals.ui.nls.Messages"; //$NON-NLS-1$
/**
* Static constructor.
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.ui/src/org/eclipse/tcf/te/tcf/terminals/ui/nls/Messages.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.ui/src/org/eclipse/tcf/te/tcf/terminals/ui/nls/Messages.properties
new file mode 100644
index 000000000..03dceeb8a
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.ui/src/org/eclipse/tcf/te/tcf/terminals/ui/nls/Messages.properties
@@ -0,0 +1,4 @@
+#
+# org.eclipse.tcf.te.tcf.terminals.ui
+# Externalized Strings.
+#
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/.classpath b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/.classpath
index 8a8f1668c..8a8f1668c 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/.classpath
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/.classpath
diff --git a/target_explorer/plugins/org.eclipse.tm.te.rcp.application/.project b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/.project
index 48eb33954..ed863bcff 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.rcp.application/.project
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/.project
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.eclipse.tm.te.rcp.application</name>
+ <name>org.eclipse.tcf.te.tcf.ui.console</name>
<comment></comment>
<projects>
</projects>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/.settings/org.eclipse.jdt.core.prefs b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..c77db4067
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,362 @@
+#Wed Dec 14 19:05:05 CET 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+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.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.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=enabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=enabled
+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.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=warning
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
+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=warning
+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=enabled
+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.unusedObjectAllocation=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
+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.6
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=0
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=0
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=0
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=0
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=0
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=true
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
+org.eclipse.jdt.core.formatter.comment.line_length=100
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=4
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=4
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=true
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=true
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=true
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=true
+org.eclipse.jdt.core.formatter.lineSplit=100
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=true
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/.settings/org.eclipse.jdt.ui.prefs b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 000000000..82699fc51
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,4 @@
+#Wed Dec 14 19:05:00 CET 2011
+eclipse.preferences.version=1
+formatter_profile=_Target Explorer Java STD
+formatter_settings_version=12
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..0de4b8642
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/META-INF/MANIFEST.MF
@@ -0,0 +1,22 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.tcf.te.tcf.ui.console;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipse.tcf.te.tcf.ui.console.activator.UIPlugin
+Bundle-Vendor: %providerName
+Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
+ org.eclipse.ui;bundle-version="3.7.0",
+ org.eclipse.ui.console;bundle-version="3.5.100",
+ org.eclipse.tcf.te.runtime;bundle-version="1.0.0",
+ org.eclipse.tcf.te.ui;bundle-version="1.0.0",
+ org.eclipse.tcf.te.ui.swt;bundle-version="1.0.0"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
+Bundle-Localization: plugin
+Export-Package: org.eclipse.tcf.te.tcf.ui.console,
+ org.eclipse.tcf.te.tcf.ui.console.activator;x-internal:=true,
+ org.eclipse.tcf.te.tcf.ui.console.handler,
+ org.eclipse.tcf.te.tcf.ui.console.interfaces,
+ org.eclipse.tcf.te.tcf.ui.console.internal.preferences;x-internal:=true,
+ org.eclipse.tcf.te.tcf.ui.console.nls;x-internal:=true
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/build.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/build.properties
index 73a5119ed..73a5119ed 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/build.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/build.properties
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/plugin.properties
new file mode 100644
index 000000000..993bfad19
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/plugin.properties
@@ -0,0 +1,26 @@
+##################################################################################
+# Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+# This program and the accompanying materials are made available under the terms
+# of the Eclipse Public License v1.0 which accompanies this distribution, and is
+# available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Wind River Systems - initial API and implementation
+##################################################################################
+
+pluginName = Target Explorer, TCF Console UI Plug-in
+providerName = Eclipse.org
+
+# ***** Preference and Property Pages *****
+
+preference.page.name = Console
+
+# ***** Command Contributions *****
+
+command.remove.name=Close Console Command
+
+# ***** Themes *****
+
+ThemeCategory.name=Target Explorer Communication Monitor Console
+Console.font.label=Communication Monitor Console Text Font
+Console.font.description=The font for the Target Explorer Communication Monitor console.
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/plugin.xml b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/plugin.xml
new file mode 100644
index 000000000..f8c4359d3
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/plugin.xml
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+
+<!-- Console command contributions -->
+ <extension point="org.eclipse.ui.commands">
+ <command
+ categoryId="org.eclipse.tcf.te.ui.commands.category"
+ helpContextId="org.eclipse.tcf.te.tcf.ui.console.command_Remove"
+ id="org.eclipse.tcf.te.tcf.ui.console.command.remove"
+ name="%command.remove.name">
+ </command>
+ </extension>
+
+ <extension point="org.eclipse.ui.commandImages">
+ <image
+ commandId="org.eclipse.tcf.te.tcf.ui.console.command.remove"
+ disabledIcon="platform:/plugin/org.eclipse.ui.console/icons/full/dlcl16/rem_co.gif"
+ icon="platform:/plugin/org.eclipse.ui.console/icons/full/elcl16/rem_co.gif">
+ </image>
+ </extension>
+
+ <extension point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.tcf.te.tcf.ui.console.handler.RemoveHandler"
+ commandId="org.eclipse.tcf.te.tcf.ui.console.command.remove">
+ </handler>
+ </extension>
+
+<!-- Preference contributions -->
+ <extension point="org.eclipse.core.runtime.preferences">
+ <initializer
+ class="org.eclipse.tcf.te.tcf.ui.console.internal.preferences.PreferencesInitializer">
+ </initializer>
+ </extension>
+
+<!-- Preference page contributions -->
+ <extension point="org.eclipse.ui.preferencePages">
+ <page
+ category="org.eclipse.tcf.te.ui.preferences.general"
+ class="org.eclipse.tcf.te.tcf.ui.console.internal.preferences.PreferencesPage"
+ id="org.eclipse.tcf.te.ui.preferences.tcf.console"
+ name="%preference.page.name">
+ </page>
+ </extension>
+
+<!-- UI Themes contributions -->
+ <extension point="org.eclipse.ui.themes">
+ <themeElementCategory
+ id="org.eclipse.tcf.te.tcf.ui.console.theme"
+ label="%ThemeCategory.name"/>
+ <fontDefinition
+ label="%Console.font.label"
+ categoryId="org.eclipse.tcf.te.tcf.ui.console.theme"
+ defaultsTo="org.eclipse.jface.textfont"
+ id="te.tcf.ui.console.pref.font">
+ <description>
+ %Console.font.description
+ </description>
+ </fontDefinition>
+ </extension>
+
+</plugin>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/pom.xml b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/pom.xml
new file mode 100644
index 000000000..f51dcc032
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.tcf</groupId>
+ <artifactId>tcf-parent</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../../../pom.xml</relativePath>
+ </parent>
+
+ <version>1.0.0.qualifier</version>
+ <artifactId>org.eclipse.tcf.te.tcf.ui.console</artifactId>
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/src/org/eclipse/tcf/te/tcf/ui/console/AbstractConsole.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/src/org/eclipse/tcf/te/tcf/ui/console/AbstractConsole.java
new file mode 100644
index 000000000..38716bde9
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/src/org/eclipse/tcf/te/tcf/ui/console/AbstractConsole.java
@@ -0,0 +1,456 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.ui.console;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.preferences.IEclipsePreferences.IPreferenceChangeListener;
+import org.eclipse.core.runtime.preferences.IEclipsePreferences.PreferenceChangeEvent;
+import org.eclipse.jface.resource.FontRegistry;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.resource.StringConverter;
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.tcf.te.runtime.preferences.ScopedEclipsePreferences;
+import org.eclipse.tcf.te.tcf.ui.console.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.ui.console.interfaces.IPreferenceKeys;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.console.ConsolePlugin;
+import org.eclipse.ui.console.IConsole;
+import org.eclipse.ui.console.IConsoleListener;
+import org.eclipse.ui.console.MessageConsole;
+import org.eclipse.ui.console.MessageConsoleStream;
+
+/**
+ * Abstract console implementation.
+ */
+public class AbstractConsole extends MessageConsole implements IConsoleListener, IPreferenceChangeListener, IPropertyChangeListener {
+
+ /**
+ * Immutable buffered console line.
+ */
+ protected static final class ConsoleBufferLine {
+ protected final String message;
+ protected final char messageType;
+
+ /**
+ * Constructor.
+ *
+ * @param message The message. Must not be <code>null</code>.
+ * @param messageType The message type.
+ */
+ public ConsoleBufferLine(String message, char messageType) {
+ assert message != null;
+ this.message = message;
+ this.messageType = messageType;
+ }
+ }
+
+ /**
+ * AbstractConsole buffer implementation. Buffers the lines to output if the console itself is
+ * invisible. Once the console gets visible, the buffered lines are send to the console itself.
+ */
+ protected static class ConsoleBuffer {
+ // The buffer limit (in characters) is retrieved from the console
+ // preferences. If 0, there is no limit.
+ private int bufferLimit = 0;
+ // The consumed characters
+ private int charactersConsumed = 0;
+
+ // The buffer of console lines
+ private final List<ConsoleBufferLine> lines = new ArrayList<ConsoleBufferLine>();
+
+ /**
+ * Constructor.
+ */
+ public ConsoleBuffer() {
+ }
+
+ /**
+ * Set the buffer limit in characters.
+ *
+ * @param limit The buffer limit or 0 for unlimited.
+ */
+ public void setBufferLimit(int limit) {
+ this.bufferLimit = limit > 0 ? limit : 0;
+ }
+
+ /**
+ * Adds a new line to the buffer.
+ *
+ * @param line The line. Must not be <code>null</code>.
+ */
+ public void addLine(ConsoleBufferLine line) {
+ assert line != null;
+
+ // If the limit has been reached, we have to remove the oldest buffered line first.
+ while (bufferLimit > 0 && charactersConsumed + line.message.length() >= bufferLimit) {
+ ConsoleBufferLine droppedLine = lines.remove(0);
+ charactersConsumed -= droppedLine.message.length();
+ if (charactersConsumed < 0) charactersConsumed = 0;
+ }
+
+ // Add the new line at the end of the buffer
+ lines.add(line); charactersConsumed += line.message.length();
+ }
+
+ /**
+ * Returns the list of currently buffered lines. The list
+ * of buffered lines is cleared.
+ *
+ * @return The currently buffered lines or an empty list.
+ */
+ public ConsoleBufferLine[] getLinesAndClear() {
+ ConsoleBufferLine[] result = lines.toArray(new ConsoleBufferLine[lines.size()]);
+ lines.clear();
+ return result;
+ }
+ }
+
+ // Map to store the created colors per stream type (dispose on shutdown!)
+ private final Map<String, Color> streamColors = new HashMap<String, Color>();
+ // Map to store the created message streams per stream type
+ private final Map<String, MessageConsoleStream> streams = new HashMap<String, MessageConsoleStream>();
+
+ // The console buffer
+ private final ConsoleBuffer buffer = new ConsoleBuffer();
+
+ // Flag to show the console on every output
+ private boolean showOnOutput;
+ // Flag to show the console on first output only
+ private boolean showOnFirstOutput;
+ // Flag to mark if the console is visible in the console view.
+ private boolean visible = false;
+ // Flag to mark if the console is fully initialized (means all colors and streams created).
+ private boolean initialized = false;
+
+ /**
+ * Constructor.
+ * <p>
+ * Initializes preferences and colors but doesn't create the console page yet.
+ *
+ * @param name The console name.
+ * @param imageDescriptor. The console image descriptor or <code>null</code>.
+ */
+ public AbstractConsole(String name, ImageDescriptor imageDescriptor) {
+ super(name, imageDescriptor);
+ // Initialize the flags from the preferences
+ showOnOutput = UIPlugin.getScopedPreferences().getBoolean(IPreferenceKeys.PREF_CONSOLE_SHOW_ON_OUTPUT);
+ showOnFirstOutput = !showOnOutput;
+ // Listen to preference change events
+ UIPlugin.getScopedPreferences().addPreferenceChangeListener(this);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.console.MessageConsole#dispose()
+ */
+ @Override
+ protected void dispose() {
+ // Do not disconnect the partitioner yet. Dispose is called
+ // if the console is removed from the console view. This does
+ // not mean the user does not want to show the console again later
+ // with the full content preserved. The console will be destroyed
+ // if shutdown() is called.
+ synchronized (buffer) {
+ visible = false;
+ JFaceResources.getFontRegistry().removeListener(this);
+ }
+ }
+
+ /**
+ * Shutdown and cleanup the console.
+ */
+ public void shutdown() {
+ // Detach the preferences listener
+ UIPlugin.getScopedPreferences().removePreferenceChangeListener(this);
+
+ // Partitioner should be disconnected before disposing the colors
+ super.dispose();
+
+ // Dispose the colors
+ for (Color color : streamColors.values()) color.dispose();
+ streamColors.clear();
+
+ // Clean the streams
+ streams.clear();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.console.AbstractConsole#init()
+ */
+ @Override
+ protected void init() {
+ // Called when console is added to the console view
+ super.init();
+
+ initConsoleOutputLimitSettings();
+ initConsoleWidthSetting();
+
+ // Ensure that initialization occurs in the UI thread
+ PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
+ @Override
+ public void run() {
+ JFaceResources.getFontRegistry().addListener(AbstractConsole.this);
+ initializeStreams();
+ flushBuffer();
+ }
+ });
+ }
+
+ /**
+ * Appends the cached lines from the buffer to the console.
+ */
+ protected final void flushBuffer() {
+ synchronized(buffer) {
+ visible = true;
+ for (ConsoleBufferLine line : buffer.getLinesAndClear()) {
+ appendMessage(line.messageType, line.message);
+ }
+ }
+ }
+
+ /**
+ * Helper method to initialize the console width settings
+ */
+ private void initConsoleWidthSetting() {
+ // Get the preferences store
+ ScopedEclipsePreferences store = UIPlugin.getScopedPreferences();
+ // If the console width shall be limited
+ if(store.getBoolean(IPreferenceKeys.PREF_CONSOLE_FIXED_WIDTH)) {
+ // Set the width limit
+ setConsoleWidth(store.getInt(IPreferenceKeys.PREF_CONSOLE_WIDTH));
+ } else {
+ // Reset to unlimited width
+ setConsoleWidth(-1);
+ }
+ }
+
+ /**
+ * Helper method to initialize the console output limit settings.
+ */
+ private void initConsoleOutputLimitSettings() {
+ // Get the preferences store
+ ScopedEclipsePreferences store = UIPlugin.getScopedPreferences();
+ // If the console output limit shall be set
+ if(store.getBoolean(IPreferenceKeys.PREF_CONSOLE_LIMIT_OUTPUT)) {
+ // Apply the limits
+ setWaterMarks(1000, store.getInt(IPreferenceKeys.PREF_CONSOLE_BUFFER_SIZE));
+ } else {
+ // Reset to no limits
+ setWaterMarks(-1, 0);
+ }
+ // Update the buffer too
+ synchronized (buffer) { buffer.setBufferLimit(getHighWaterMark()); }
+ }
+
+ // Internal list of available stream types
+ private static final String[] STREAM_TYPES = new String[] { IPreferenceKeys.PREF_CONSOLE_COLOR_TEXT,
+ IPreferenceKeys.PREF_CONSOLE_COLOR_COMMAND, IPreferenceKeys.PREF_CONSOLE_COLOR_COMMAND_RESPONSE,
+ IPreferenceKeys.PREF_CONSOLE_COLOR_EVENT, IPreferenceKeys.PREF_CONSOLE_COLOR_PROGRESS,
+ IPreferenceKeys.PREF_CONSOLE_COLOR_ERROR
+ };
+
+ /*
+ * Initialize the streams of the console.
+ * <p>
+ * Must be called from the UI thread.
+ */
+ void initializeStreams() {
+ // Synchronize on the buffer to avoid something is dumped
+ // if the console streams have not been fully initialized
+ synchronized (buffer) {
+ if (!initialized) {
+ // Black is the default color. Get the corresponding RGB from the platform
+ RGB defaultColorBlack = PlatformUI.getWorkbench().getDisplay().getSystemColor(SWT.COLOR_BLACK).getRGB();
+ // create the message streams and associate stream colors
+ for (String streamType : STREAM_TYPES) {
+ MessageConsoleStream stream = newMessageStream();
+ Color color = new Color(PlatformUI.getWorkbench().getDisplay(),
+ StringConverter.asRGB(UIPlugin.getScopedPreferences().getString(streamType), defaultColorBlack));
+ stream.setColor(color);
+ streams.put(streamType, stream);
+ streamColors.put(streamType, color);
+ }
+
+ // Apply font
+ setFont(PlatformUI.getWorkbench().getThemeManager().getCurrentTheme().getFontRegistry().get(IPreferenceKeys.PREF_CONSOLE_FONT));
+
+ // The console is now initialized
+ initialized = true;
+ }
+ }
+ }
+
+ /**
+ * Returns if or if not this console is visible in the console view.
+ *
+ * @return <code>True</code> if the console is visible, <code>false</code> otherwise.
+ */
+ public final boolean isVisible() {
+ return visible;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.runtime.preferences.IEclipsePreferences.IPreferenceChangeListener#preferenceChange(org.eclipse.core.runtime.preferences.IEclipsePreferences.PreferenceChangeEvent)
+ */
+ @Override
+ public void preferenceChange(PreferenceChangeEvent event) {
+ Assert.isNotNull(event);
+
+ String property = event.getKey();
+ if (property == null) return;
+
+ // Apply the common properties if changed
+ if(IPreferenceKeys.PREF_CONSOLE_FIXED_WIDTH.equals(property)) {
+ initConsoleWidthSetting();
+ } else if(IPreferenceKeys.PREF_CONSOLE_LIMIT_OUTPUT.equals(property)) {
+ initConsoleOutputLimitSettings();
+ } else if (IPreferenceKeys.PREF_CONSOLE_SHOW_ON_OUTPUT.equals(property)) {
+ showOnOutput = UIPlugin.getScopedPreferences().getBoolean(IPreferenceKeys.PREF_CONSOLE_SHOW_ON_OUTPUT);
+ }
+
+ // Color changes are applied only if the console is visible
+ if (isVisible()) {
+ // Black is the default color. Get the corresponding RGB from the platform
+ RGB defaultColorBlack = PlatformUI.getWorkbench().getDisplay().getSystemColor(SWT.COLOR_BLACK).getRGB();
+ for (String streamType : STREAM_TYPES) {
+ if (property.equals(streamType)) {
+ // Get the new RGB values from the preferences
+ RGB newRGB = StringConverter.asRGB(UIPlugin.getScopedPreferences().getString(streamType), defaultColorBlack);
+ // Get the old color
+ Color oldColor = streamColors.get(streamType);
+ // Update the stream color will work only if the color is really different from the old one
+ if ((oldColor == null && newRGB != null) || (oldColor != null && !oldColor.getRGB().equals(newRGB))) {
+ // Create the new color object
+ Color newColor = new Color(PlatformUI.getWorkbench().getDisplay(), newRGB);
+ // Update the stream
+ MessageConsoleStream stream = streams.get(streamType);
+ stream.setColor(newColor);
+ // Dispose the old color
+ oldColor.dispose();
+ // and update the stream color map
+ streamColors.put(streamType, newColor);
+ }
+ }
+ }
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.console.IConsoleListener#consolesAdded(org.eclipse.ui.console.IConsole[])
+ */
+ @Override
+ public void consolesAdded(IConsole[] consoles) {
+ for (int i = 0; i < consoles.length; i++) {
+ IConsole console = consoles[i];
+ if (console == AbstractConsole.this) {
+ ConsolePlugin.getDefault().getConsoleManager().addConsoleListener(this);
+ init();
+ }
+ }
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.console.IConsoleListener#consolesRemoved(org.eclipse.ui.console.IConsole[])
+ */
+ @Override
+ public void consolesRemoved(IConsole[] consoles) {
+ for (int i = 0; i < consoles.length; i++) {
+ IConsole console = consoles[i];
+ if (console == AbstractConsole.this) {
+ ConsolePlugin.getDefault().getConsoleManager().removeConsoleListener(this);
+ dispose();
+ }
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
+ */
+ @Override
+ public void propertyChange(PropertyChangeEvent event) {
+ String property = event != null ? event.getProperty() : null;
+
+ // Font changes are applied only if the console is visible
+ if (property != null && isVisible()) {
+ if (property.equals(IPreferenceKeys.PREF_CONSOLE_FONT)) {
+ setFont(((FontRegistry) event.getSource()).get(IPreferenceKeys.PREF_CONSOLE_FONT));
+ }
+ }
+ }
+
+ /**
+ * Append message to the console.
+ *
+ * @param type The message type.
+ * @param message The message.
+ */
+ public void appendMessage(char type, String message) {
+ // If no message is passed in, nothing to do
+ if (message == null) return;
+ // Open the console if necessary
+ showConsole(false);
+
+ // Append the message to the console
+ synchronized (buffer) {
+ if (isVisible()) {
+ switch (type) {
+ case 'C':
+ MessageConsoleStream stream = streams.get(IPreferenceKeys.PREF_CONSOLE_COLOR_COMMAND);
+ if (stream != null) stream.println(message);
+ break;
+ case 'R':
+ stream = streams.get(IPreferenceKeys.PREF_CONSOLE_COLOR_COMMAND_RESPONSE);
+ if (stream != null) stream.println(message);
+ break;
+ case 'E':
+ stream = streams.get(IPreferenceKeys.PREF_CONSOLE_COLOR_EVENT);
+ if (stream != null) stream.println(message);
+ break;
+ case 'P':
+ stream = streams.get(IPreferenceKeys.PREF_CONSOLE_COLOR_PROGRESS);
+ if (stream != null) stream.println(message);
+ break;
+ case 'N':
+ case 'F':
+ stream = streams.get(IPreferenceKeys.PREF_CONSOLE_COLOR_TEXT);
+ if (stream != null) stream.println(message);
+ break;
+ default:
+ stream = streams.get(IPreferenceKeys.PREF_CONSOLE_COLOR_ERROR);
+ if (stream != null) stream.println(message);
+ }
+ } else {
+ buffer.addLine(new ConsoleBufferLine(message, type));
+ }
+ }
+ }
+
+ /**
+ * Ensure that the console is shown if needed.
+ *
+ * @param showNoMatterWhat If <code>True</code>, the console will be forced to be shown.
+ */
+ private void showConsole(boolean showNoMatterWhat) {
+ if(showNoMatterWhat || showOnOutput || showOnFirstOutput) {
+ showOnFirstOutput = false;
+ ConsolePlugin.getDefault().getConsoleManager().showConsoleView(this);
+ }
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/src/org/eclipse/tcf/te/tcf/ui/console/PageParticipant.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/src/org/eclipse/tcf/te/tcf/ui/console/PageParticipant.java
new file mode 100644
index 000000000..986bef24f
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/src/org/eclipse/tcf/te/tcf/ui/console/PageParticipant.java
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.ui.console;
+
+import org.eclipse.core.runtime.PlatformObject;
+import org.eclipse.tcf.te.tcf.ui.console.nls.Messages;
+import org.eclipse.ui.console.IConsole;
+import org.eclipse.ui.console.IConsoleConstants;
+import org.eclipse.ui.console.IConsolePageParticipant;
+import org.eclipse.ui.menus.CommandContributionItem;
+import org.eclipse.ui.menus.CommandContributionItemParameter;
+import org.eclipse.ui.part.IPageBookViewPage;
+
+/**
+ * Console page participant implementation.
+ */
+public class PageParticipant extends PlatformObject implements IConsolePageParticipant {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.console.IConsolePageParticipant#activated()
+ */
+ @Override
+ public void activated() {
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.console.IConsolePageParticipant#deactivated()
+ */
+ @Override
+ public void deactivated() {
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.console.IConsolePageParticipant#dispose()
+ */
+ @Override
+ public void dispose() {
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.console.IConsolePageParticipant#init(org.eclipse.ui.part.IPageBookViewPage, org.eclipse.ui.console.IConsole)
+ */
+ @Override
+ public void init(IPageBookViewPage page, IConsole console) {
+ if (page == null || page.getSite() == null || page.getSite().getActionBars() == null || page.getSite().getActionBars().getToolBarManager() == null) return;
+
+ // Create the command contribution item parameters
+ CommandContributionItemParameter parameters;
+ parameters = new CommandContributionItemParameter(page.getSite(),
+ "org.eclipse.tcf.te.tcf.ui.console.commands.remove", //$NON-NLS-1$
+ "org.eclipse.tcf.te.tcf.ui.console.command.remove", //$NON-NLS-1$
+ CommandContributionItem.STYLE_PUSH);
+ parameters.label = Messages.PageParticipant_command_remove_label;
+ parameters.tooltip = Messages.PageParticipant_command_remove_label;
+
+ // Create the contribution item and append to the LAUNCH_GROUP
+ page.getSite().getActionBars().getToolBarManager().appendToGroup(IConsoleConstants.LAUNCH_GROUP, new CommandContributionItem(parameters));
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/src/org/eclipse/tcf/te/tcf/ui/console/activator/UIPlugin.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/src/org/eclipse/tcf/te/tcf/ui/console/activator/UIPlugin.java
new file mode 100644
index 000000000..9af61be60
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/src/org/eclipse/tcf/te/tcf/ui/console/activator/UIPlugin.java
@@ -0,0 +1,133 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.ui.console.activator;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.ImageRegistry;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.tcf.te.runtime.preferences.ScopedEclipsePreferences;
+import org.eclipse.tcf.te.ui.jface.images.AbstractImageDescriptor;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class UIPlugin extends AbstractUIPlugin {
+ // The shared instance
+ private static UIPlugin plugin;
+ // The scoped preferences instance
+ private static ScopedEclipsePreferences scopedPreferences = null;
+
+ /**
+ * The constructor
+ */
+ public UIPlugin() {
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static UIPlugin getDefault() {
+ return plugin;
+ }
+
+ /**
+ * Convenience method which returns the unique identifier of this plugin.
+ */
+ public static String getUniqueIdentifier() {
+ if (getDefault() != null && getDefault().getBundle() != null) {
+ return getDefault().getBundle().getSymbolicName();
+ }
+ return null;
+ }
+
+ /**
+ * Return the scoped preferences for this plugin.
+ */
+ public static ScopedEclipsePreferences getScopedPreferences() {
+ if (scopedPreferences == null) {
+ scopedPreferences = new ScopedEclipsePreferences(getUniqueIdentifier());
+ }
+ return scopedPreferences;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ scopedPreferences = null;
+ super.stop(context);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#initializeImageRegistry(org.eclipse.jface.resource.ImageRegistry)
+ */
+ @Override
+ protected void initializeImageRegistry(ImageRegistry registry) {
+ }
+
+ /**
+ * Loads the image registered under the specified key from the image
+ * registry and returns the <code>Image</code> object instance.
+ *
+ * @param key The key the image is registered with.
+ * @return The <code>Image</code> object instance or <code>null</code>.
+ */
+ public static Image getImage(String key) {
+ return getDefault().getImageRegistry().get(key);
+ }
+
+ /**
+ * Loads the image registered under the specified key from the image
+ * registry and returns the <code>ImageDescriptor</code> object instance.
+ *
+ * @param key The key the image is registered with.
+ * @return The <code>ImageDescriptor</code> object instance or <code>null</code>.
+ */
+ public static ImageDescriptor getImageDescriptor(String key) {
+ return getDefault().getImageRegistry().getDescriptor(key);
+ }
+
+ /**
+ * Loads the image given by the specified image descriptor from the image
+ * registry. If the image has been loaded ones before already, the cached
+ * <code>Image</code> object instance is returned. Otherwise, the <code>
+ * Image</code> object instance will be created and cached before returned.
+ *
+ * @param descriptor The image descriptor.
+ * @return The corresponding <code>Image</code> object instance or <code>null</code>.
+ */
+ public static Image getSharedImage(AbstractImageDescriptor descriptor) {
+ ImageRegistry registry = getDefault().getImageRegistry();
+
+ String imageKey = descriptor.getDecriptorKey();
+ Image image = registry.get(imageKey);
+ if (image == null) {
+ registry.put(imageKey, descriptor);
+ image = registry.get(imageKey);
+ }
+
+ return image;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/src/org/eclipse/tcf/te/tcf/ui/console/handler/RemoveHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/src/org/eclipse/tcf/te/tcf/ui/console/handler/RemoveHandler.java
new file mode 100644
index 000000000..00b7ba96f
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/src/org/eclipse/tcf/te/tcf/ui/console/handler/RemoveHandler.java
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.ui.console.handler;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.console.ConsolePlugin;
+import org.eclipse.ui.console.IConsole;
+import org.eclipse.ui.console.IConsoleView;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+/**
+ * Remove handler implementation.
+ */
+public class RemoveHandler extends AbstractHandler {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+ */
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ // The currently display console
+ IConsole console = null;
+
+ // Determine the currently display console from the console view
+ IWorkbenchPart part = HandlerUtil.getActivePart(event);
+ if (part instanceof IConsoleView) console = ((IConsoleView)part).getConsole();
+
+ // Remove the console
+ if (console != null) {
+ ConsolePlugin.getDefault().getConsoleManager().removeConsoles(new IConsole[] { console });
+ }
+
+ return null;
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/src/org/eclipse/tcf/te/tcf/ui/console/help/IContextHelpIds.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/src/org/eclipse/tcf/te/tcf/ui/console/help/IContextHelpIds.java
new file mode 100644
index 000000000..576e5a854
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/src/org/eclipse/tcf/te/tcf/ui/console/help/IContextHelpIds.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.ui.console.help;
+
+import org.eclipse.tcf.te.tcf.ui.console.activator.UIPlugin;
+
+/**
+ * UI Context help id definitions.
+ */
+public interface IContextHelpIds {
+
+ /**
+ * UI plug-in common context help id prefix.
+ */
+ public final static String PREFIX = UIPlugin.getUniqueIdentifier() + "."; //$NON-NLS-1$
+
+ /**
+ * Communication monitor console preferences page.
+ */
+ public final static String MONITOR_CONSOLE_PREFERENCES_PAGE = PREFIX + "MonitorConsolePreferencesPage"; //$NON-NLS-1$
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/src/org/eclipse/tcf/te/tcf/ui/console/interfaces/IPreferenceKeys.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/src/org/eclipse/tcf/te/tcf/ui/console/interfaces/IPreferenceKeys.java
new file mode 100644
index 000000000..1fd2ce8d7
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/src/org/eclipse/tcf/te/tcf/ui/console/interfaces/IPreferenceKeys.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.ui.console.interfaces;
+
+/**
+ * Console preference key identifiers.
+ */
+public interface IPreferenceKeys {
+ /**
+ * Common prefix for all UI preference keys
+ */
+ public final String PREFIX = "te.tcf.ui.console."; //$NON-NLS-1$
+
+ /**
+ * Limit console output to a fixed width.
+ */
+ public final String PREF_CONSOLE_FIXED_WIDTH = PREFIX + "pref.fixedWidth"; //$NON-NLS-1$
+
+ /**
+ * The fixed width size in characters.
+ */
+ public final String PREF_CONSOLE_WIDTH = PREFIX + "pref.width"; //$NON-NLS-1$
+
+ /**
+ * Limit console output to a maximum content.
+ */
+ public final String PREF_CONSOLE_LIMIT_OUTPUT = PREFIX + "pref.limitOutput"; //$NON-NLS-1$
+
+ /**
+ * The maximum content size in characters.
+ */
+ public final String PREF_CONSOLE_BUFFER_SIZE = PREFIX + "pref.bufferSize"; //$NON-NLS-1$
+
+ /**
+ * Show the console on output.
+ */
+ public final String PREF_CONSOLE_SHOW_ON_OUTPUT = PREFIX + "pref.showOnOutput"; //$NON-NLS-1$
+
+ // The preference id for the console font needs to be kept in sync with the plugin.xml!
+ public final String PREF_CONSOLE_FONT = PREFIX + "pref.font"; //$NON-NLS-1$
+
+ // The TCF communication monitor console color preferences
+ public final String PREF_CONSOLE_COLOR_TEXT = PREFIX + "pref.color.text"; //$NON-NLS-1$
+ public final String PREF_CONSOLE_COLOR_COMMAND = PREFIX + "pref.color.command"; //$NON-NLS-1$
+ public final String PREF_CONSOLE_COLOR_COMMAND_RESPONSE = PREFIX + "pref.color.commandResponse"; //$NON-NLS-1$
+ public final String PREF_CONSOLE_COLOR_EVENT = PREFIX + "pref.color.event"; //$NON-NLS-1$
+ public final String PREF_CONSOLE_COLOR_PROGRESS = PREFIX + "pref.color.progress"; //$NON-NLS-1$
+ public final String PREF_CONSOLE_COLOR_ERROR = PREFIX + "pref.color.error"; //$NON-NLS-1$
+}
+
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/src/org/eclipse/tcf/te/tcf/ui/console/internal/preferences/PreferencesInitializer.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/src/org/eclipse/tcf/te/tcf/ui/console/internal/preferences/PreferencesInitializer.java
new file mode 100644
index 000000000..ffba93d06
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/src/org/eclipse/tcf/te/tcf/ui/console/internal/preferences/PreferencesInitializer.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.ui.console.internal.preferences;
+
+import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
+import org.eclipse.jface.resource.StringConverter;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.tcf.te.runtime.preferences.ScopedEclipsePreferences;
+import org.eclipse.tcf.te.tcf.ui.console.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.ui.console.interfaces.IPreferenceKeys;
+
+/**
+ * Preference initializer.
+ */
+public class PreferencesInitializer extends AbstractPreferenceInitializer {
+
+ /**
+ * Constructor.
+ */
+ public PreferencesInitializer() {
+ super();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
+ */
+ @Override
+ public void initializeDefaultPreferences() {
+ // Get the preferences store
+ ScopedEclipsePreferences store = UIPlugin.getScopedPreferences();
+
+ // Fixed console width: default off
+ store.putDefaultBoolean(IPreferenceKeys.PREF_CONSOLE_FIXED_WIDTH, false);
+ // Fixed console width in character: default 80
+ store.putDefaultInt(IPreferenceKeys.PREF_CONSOLE_WIDTH, 80);
+ // Limit console output: default on
+ store.putDefaultBoolean(IPreferenceKeys.PREF_CONSOLE_LIMIT_OUTPUT, true);
+ // Console buffer size in character: default 500000
+ store.putDefaultInt(IPreferenceKeys.PREF_CONSOLE_BUFFER_SIZE, 500000);
+ // Show console on output: default off
+ store.putDefaultBoolean(IPreferenceKeys.PREF_CONSOLE_SHOW_ON_OUTPUT, false);
+
+ // Text default color: Black
+ store.putDefaultString(IPreferenceKeys.PREF_CONSOLE_COLOR_TEXT, StringConverter.asString(new RGB(0, 0, 0)));
+ // Command default color: Black
+ store.putDefaultString(IPreferenceKeys.PREF_CONSOLE_COLOR_COMMAND, StringConverter.asString(new RGB(0, 0, 0)));
+ // Command response default color: Black
+ store.putDefaultString(IPreferenceKeys.PREF_CONSOLE_COLOR_COMMAND_RESPONSE, StringConverter.asString(new RGB(0, 0, 0)));
+ // Event default color: Blue
+ store.putDefaultString(IPreferenceKeys.PREF_CONSOLE_COLOR_EVENT, StringConverter.asString(new RGB(0, 0, 255)));
+ // Progress default color: Green
+ store.putDefaultString(IPreferenceKeys.PREF_CONSOLE_COLOR_PROGRESS, StringConverter.asString(new RGB(0, 128, 0)));
+ // Error default color: Red
+ store.putDefaultString(IPreferenceKeys.PREF_CONSOLE_COLOR_ERROR, StringConverter.asString(new RGB(255, 0, 0)));
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/src/org/eclipse/tcf/te/tcf/ui/console/internal/preferences/PreferencesPage.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/src/org/eclipse/tcf/te/tcf/ui/console/internal/preferences/PreferencesPage.java
new file mode 100644
index 000000000..52b805692
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/src/org/eclipse/tcf/te/tcf/ui/console/internal/preferences/PreferencesPage.java
@@ -0,0 +1,253 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.ui.console.internal.preferences;
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.preference.BooleanFieldEditor;
+import org.eclipse.jface.preference.ColorFieldEditor;
+import org.eclipse.jface.preference.FieldEditorPreferencePage;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.IntegerFieldEditor;
+import org.eclipse.jface.preference.PreferenceStore;
+import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.tcf.te.runtime.preferences.ScopedEclipsePreferences;
+import org.eclipse.tcf.te.tcf.ui.console.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.ui.console.help.IContextHelpIds;
+import org.eclipse.tcf.te.tcf.ui.console.interfaces.IPreferenceKeys;
+import org.eclipse.tcf.te.tcf.ui.console.nls.Messages;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * Console preference page implementation.
+ */
+public class PreferencesPage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
+ // The reference to the internal preference store
+ private final IPreferenceStore preferenceStore;
+
+ // Field editor references
+ private BooleanFieldEditor fixedConsoleWidth;
+ private IntegerFieldEditor consoleWidth;
+ private BooleanFieldEditor limitConsoleOutput;
+ private IntegerFieldEditor consoleBufferSize;
+
+ /**
+ * Constructor.
+ */
+ public PreferencesPage() {
+ super(GRID);
+ // Use a preferences store which never needs saving
+ preferenceStore = new PreferenceStore() {
+ @Override
+ public boolean needsSaving() {
+ return false;
+ }
+ };
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
+ */
+ @Override
+ public void init(IWorkbench workbench) {
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.preference.PreferencePage#getPreferenceStore()
+ */
+ @Override
+ public IPreferenceStore getPreferenceStore() {
+ return preferenceStore;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
+ */
+ @Override
+ protected void createFieldEditors() {
+ // Get the field control parent
+ final Composite composite = getFieldEditorParent();
+ // Set context help id
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IContextHelpIds.MONITOR_CONSOLE_PREFERENCES_PAGE);
+
+ // Create the top label
+ Label label = new Label(composite, SWT.LEAD);
+ label.setText(Messages.PreferencesPage_label);
+ GridData layoutData = new GridData(GridData.FILL_HORIZONTAL);
+ layoutData.horizontalSpan = 2;
+ label.setLayoutData(layoutData);
+
+ // Get the preference store to use
+ IPreferenceStore store = getPreferenceStore();
+
+ // Create the "Fixed width console" field editor
+ fixedConsoleWidth = new BooleanFieldEditor(IPreferenceKeys.PREF_CONSOLE_FIXED_WIDTH, Messages.PreferencesPage_fieldEditor_fixedWidth, composite);
+ addField(fixedConsoleWidth);
+
+ // Create the "width" field editor. Enabled if the "Fixed width console" field editor is checked
+ consoleWidth = new IntegerFieldEditor(IPreferenceKeys.PREF_CONSOLE_WIDTH, Messages.PreferencesPage_fieldEditor_width, composite); //)
+ consoleWidth.setValidRange(80, Integer.MAX_VALUE - 1);
+ addField(consoleWidth);
+ // Update enablement
+ consoleWidth.setEnabled(store.getBoolean(IPreferenceKeys.PREF_CONSOLE_FIXED_WIDTH), composite);
+
+ // Create the "Limit output" field editor
+ limitConsoleOutput = new BooleanFieldEditor(IPreferenceKeys.PREF_CONSOLE_LIMIT_OUTPUT, Messages.PreferencesPage_fieldEditor_limitOutput, composite);
+ addField(limitConsoleOutput);
+
+ // Create the "buffer size" field editor
+ consoleBufferSize = new IntegerFieldEditor(IPreferenceKeys.PREF_CONSOLE_BUFFER_SIZE, Messages.PreferencesPage_fieldEditor_bufferSize, composite); //)
+ consoleBufferSize.setValidRange(1000, Integer.MAX_VALUE - 1);
+ addField(consoleBufferSize);
+ // Update enablement
+ consoleBufferSize.setEnabled(store.getBoolean(IPreferenceKeys.PREF_CONSOLE_LIMIT_OUTPUT), composite);
+
+ // Create the "Show on output" field editor
+ BooleanFieldEditor booleanField = new BooleanFieldEditor(IPreferenceKeys.PREF_CONSOLE_SHOW_ON_OUTPUT, Messages.PreferencesPage_fieldEditor_showOnOutput, composite);
+ addField(booleanField);
+
+ // Create a spacer
+ label = new Label(composite, SWT.LEAD);
+ layoutData = new GridData(GridData.FILL_HORIZONTAL);
+ layoutData.horizontalSpan = 2;
+ label.setLayoutData(layoutData);
+
+ // Create the color field editors
+ label = new Label(composite, SWT.LEAD);
+ label.setText(Messages.PreferencesPage_group_colorSettings);
+ layoutData = new GridData(GridData.FILL_HORIZONTAL);
+ layoutData.horizontalSpan = 2;
+ label.setLayoutData(layoutData);
+
+ ColorFieldEditor colorField = createColorFieldEditor(IPreferenceKeys.PREF_CONSOLE_COLOR_COMMAND, Messages.PreferencesPage_color_command, composite);
+ addField(colorField);
+
+ colorField = createColorFieldEditor(IPreferenceKeys.PREF_CONSOLE_COLOR_COMMAND_RESPONSE, Messages.PreferencesPage_color_commandResponse, composite);
+ addField(colorField);
+
+ colorField = createColorFieldEditor(IPreferenceKeys.PREF_CONSOLE_COLOR_EVENT, Messages.PreferencesPage_color_event, composite);
+ addField(colorField);
+
+ colorField = createColorFieldEditor(IPreferenceKeys.PREF_CONSOLE_COLOR_PROGRESS, Messages.PreferencesPage_color_progress, composite);
+ addField(colorField);
+
+ colorField = createColorFieldEditor(IPreferenceKeys.PREF_CONSOLE_COLOR_ERROR, Messages.PreferencesPage_color_error, composite);
+ addField(colorField);
+
+ // Apply common dialog font
+ Dialog.applyDialogFont(composite);
+ }
+
+ /**
+ * Helper to create a {@link ColorFieldEditor}.
+ *
+ * @param slotId The preference slot id. Must not be <code>null</code>.
+ * @param label The field editor label. Must not be <code>null</code>.
+ * @param parent The field editor parent. Must not be <code>null</code>.
+ */
+ private ColorFieldEditor createColorFieldEditor(String slotId, String label, Composite parent) {
+ assert slotId != null && label != null && parent != null;
+
+ // Create the color field editor
+ ColorFieldEditor editor = new ColorFieldEditor(slotId, label, parent);
+ // Initialize the color field editor
+ editor.setPage(this);
+ editor.setPreferenceStore(getPreferenceStore());
+
+ return editor;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.preference.FieldEditorPreferencePage#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
+ */
+ @Override
+ public void propertyChange(PropertyChangeEvent event) {
+ super.propertyChange(event);
+ // Update the enablement
+ consoleWidth.setEnabled(fixedConsoleWidth.getBooleanValue(), getFieldEditorParent());
+ consoleBufferSize.setEnabled(limitConsoleOutput.getBooleanValue(), getFieldEditorParent());
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.preference.FieldEditorPreferencePage#initialize()
+ */
+ @Override
+ protected void initialize() {
+ ScopedEclipsePreferences store = UIPlugin.getScopedPreferences();
+
+ preferenceStore.setDefault(IPreferenceKeys.PREF_CONSOLE_FIXED_WIDTH, store.getDefaultBoolean(IPreferenceKeys.PREF_CONSOLE_FIXED_WIDTH));
+ preferenceStore.setValue(IPreferenceKeys.PREF_CONSOLE_FIXED_WIDTH, store.getBoolean(IPreferenceKeys.PREF_CONSOLE_FIXED_WIDTH));
+
+ preferenceStore.setDefault(IPreferenceKeys.PREF_CONSOLE_WIDTH, store.getDefaultInt(IPreferenceKeys.PREF_CONSOLE_WIDTH));
+ preferenceStore.setValue(IPreferenceKeys.PREF_CONSOLE_WIDTH, store.getInt(IPreferenceKeys.PREF_CONSOLE_WIDTH));
+
+ preferenceStore.setDefault(IPreferenceKeys.PREF_CONSOLE_LIMIT_OUTPUT, store.getDefaultBoolean(IPreferenceKeys.PREF_CONSOLE_LIMIT_OUTPUT));
+ preferenceStore.setValue(IPreferenceKeys.PREF_CONSOLE_LIMIT_OUTPUT, store.getBoolean(IPreferenceKeys.PREF_CONSOLE_LIMIT_OUTPUT));
+
+ preferenceStore.setDefault(IPreferenceKeys.PREF_CONSOLE_BUFFER_SIZE, store.getDefaultInt(IPreferenceKeys.PREF_CONSOLE_BUFFER_SIZE));
+ preferenceStore.setValue(IPreferenceKeys.PREF_CONSOLE_BUFFER_SIZE, store.getInt(IPreferenceKeys.PREF_CONSOLE_BUFFER_SIZE));
+
+ preferenceStore.setDefault(IPreferenceKeys.PREF_CONSOLE_SHOW_ON_OUTPUT, store.getDefaultBoolean(IPreferenceKeys.PREF_CONSOLE_SHOW_ON_OUTPUT));
+ preferenceStore.setValue(IPreferenceKeys.PREF_CONSOLE_SHOW_ON_OUTPUT, store.getBoolean(IPreferenceKeys.PREF_CONSOLE_SHOW_ON_OUTPUT));
+
+ preferenceStore.setDefault(IPreferenceKeys.PREF_CONSOLE_COLOR_COMMAND, store.getDefaultString(IPreferenceKeys.PREF_CONSOLE_COLOR_COMMAND));
+ preferenceStore.setValue(IPreferenceKeys.PREF_CONSOLE_COLOR_COMMAND, store.getString(IPreferenceKeys.PREF_CONSOLE_COLOR_COMMAND));
+
+ preferenceStore.setDefault(IPreferenceKeys.PREF_CONSOLE_COLOR_COMMAND_RESPONSE, store.getDefaultString(IPreferenceKeys.PREF_CONSOLE_COLOR_COMMAND_RESPONSE));
+ preferenceStore.setValue(IPreferenceKeys.PREF_CONSOLE_COLOR_COMMAND_RESPONSE, store.getString(IPreferenceKeys.PREF_CONSOLE_COLOR_COMMAND_RESPONSE));
+
+ preferenceStore.setDefault(IPreferenceKeys.PREF_CONSOLE_COLOR_EVENT, store.getDefaultString(IPreferenceKeys.PREF_CONSOLE_COLOR_EVENT));
+ preferenceStore.setValue(IPreferenceKeys.PREF_CONSOLE_COLOR_EVENT, store.getString(IPreferenceKeys.PREF_CONSOLE_COLOR_EVENT));
+
+ preferenceStore.setDefault(IPreferenceKeys.PREF_CONSOLE_COLOR_PROGRESS, store.getDefaultString(IPreferenceKeys.PREF_CONSOLE_COLOR_PROGRESS));
+ preferenceStore.setValue(IPreferenceKeys.PREF_CONSOLE_COLOR_PROGRESS, store.getString(IPreferenceKeys.PREF_CONSOLE_COLOR_PROGRESS));
+
+ preferenceStore.setDefault(IPreferenceKeys.PREF_CONSOLE_COLOR_ERROR, store.getDefaultString(IPreferenceKeys.PREF_CONSOLE_COLOR_ERROR));
+ preferenceStore.setValue(IPreferenceKeys.PREF_CONSOLE_COLOR_ERROR, store.getString(IPreferenceKeys.PREF_CONSOLE_COLOR_ERROR));
+
+ // Load values into field editors
+ super.initialize();
+
+ // Trigger an update of the enablements
+ propertyChange(new PropertyChangeEvent(this, "", null, null)); //$NON-NLS-1$
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.preference.IPreferencePage#performOk()
+ */
+ @Override
+ public boolean performOk() {
+ // The super.performOk() needs to be called before
+ // we can copy the values from the preference store.
+ boolean success = super.performOk();
+
+ // Get the plugin preferences manager
+ ScopedEclipsePreferences store = UIPlugin.getScopedPreferences();
+
+ // Copy from the preferences store to the preferences manager
+ store.putBoolean(IPreferenceKeys.PREF_CONSOLE_FIXED_WIDTH, preferenceStore.getBoolean(IPreferenceKeys.PREF_CONSOLE_FIXED_WIDTH));
+ store.putInt(IPreferenceKeys.PREF_CONSOLE_WIDTH, preferenceStore.getInt(IPreferenceKeys.PREF_CONSOLE_WIDTH));
+ store.putBoolean(IPreferenceKeys.PREF_CONSOLE_LIMIT_OUTPUT, preferenceStore.getBoolean(IPreferenceKeys.PREF_CONSOLE_LIMIT_OUTPUT));
+ store.putInt(IPreferenceKeys.PREF_CONSOLE_BUFFER_SIZE, preferenceStore.getInt(IPreferenceKeys.PREF_CONSOLE_BUFFER_SIZE));
+ store.putBoolean(IPreferenceKeys.PREF_CONSOLE_SHOW_ON_OUTPUT, preferenceStore.getBoolean(IPreferenceKeys.PREF_CONSOLE_SHOW_ON_OUTPUT));
+ store.putString(IPreferenceKeys.PREF_CONSOLE_COLOR_COMMAND, preferenceStore.getString(IPreferenceKeys.PREF_CONSOLE_COLOR_COMMAND));
+ store.putString(IPreferenceKeys.PREF_CONSOLE_COLOR_COMMAND_RESPONSE, preferenceStore.getString(IPreferenceKeys.PREF_CONSOLE_COLOR_COMMAND_RESPONSE));
+ store.putString(IPreferenceKeys.PREF_CONSOLE_COLOR_EVENT, preferenceStore.getString(IPreferenceKeys.PREF_CONSOLE_COLOR_EVENT));
+ store.putString(IPreferenceKeys.PREF_CONSOLE_COLOR_PROGRESS, preferenceStore.getString(IPreferenceKeys.PREF_CONSOLE_COLOR_PROGRESS));
+ store.putString(IPreferenceKeys.PREF_CONSOLE_COLOR_ERROR, preferenceStore.getString(IPreferenceKeys.PREF_CONSOLE_COLOR_ERROR));
+
+ return success;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/src/org/eclipse/tcf/te/tcf/ui/console/nls/Messages.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/src/org/eclipse/tcf/te/tcf/ui/console/nls/Messages.java
new file mode 100644
index 000000000..dbc55d3be
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/src/org/eclipse/tcf/te/tcf/ui/console/nls/Messages.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.ui.console.nls;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * TCF UI Plug-in externalized strings management.
+ */
+public class Messages extends NLS {
+
+ // The plug-in resource bundle name
+ private static final String BUNDLE_NAME = "org.eclipse.tcf.te.tcf.ui.console.nls.Messages"; //$NON-NLS-1$
+
+ /**
+ * Static constructor.
+ */
+ static {
+ // Load message values from bundle file
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ // **** Declare externalized string id's down here *****
+
+ public static String PageParticipant_command_remove_label;
+ public static String PageParticipant_command_remove_tooltip;
+
+ public static String PreferencesPage_label;
+ public static String PreferencesPage_fieldEditor_fixedWidth;
+ public static String PreferencesPage_fieldEditor_width;
+ public static String PreferencesPage_fieldEditor_limitOutput;
+ public static String PreferencesPage_fieldEditor_bufferSize;
+ public static String PreferencesPage_fieldEditor_showOnOutput;
+
+ public static String PreferencesPage_group_colorSettings;
+ public static String PreferencesPage_color_command;
+ public static String PreferencesPage_color_commandResponse;
+ public static String PreferencesPage_color_event;
+ public static String PreferencesPage_color_progress;
+ public static String PreferencesPage_color_error;
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/src/org/eclipse/tcf/te/tcf/ui/console/nls/Messages.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/src/org/eclipse/tcf/te/tcf/ui/console/nls/Messages.properties
new file mode 100644
index 000000000..ab03646fd
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/src/org/eclipse/tcf/te/tcf/ui/console/nls/Messages.properties
@@ -0,0 +1,21 @@
+#
+# org.eclipse.tcf.te.tcf.ui.console
+# Externalized Strings.
+#
+
+PageParticipant_command_remove_label=Close Console
+PageParticipant_command_remove_tooltip=Close Console
+
+PreferencesPage_label=Console Settings:
+PreferencesPage_fieldEditor_fixedWidth=&Fixed width console
+PreferencesPage_fieldEditor_width=Character &width:
+PreferencesPage_fieldEditor_limitOutput=&Limit console output
+PreferencesPage_fieldEditor_bufferSize=Console &buffer size (characters):
+PreferencesPage_fieldEditor_showOnOutput=&Show console automatically on output
+
+PreferencesPage_group_colorSettings=Console text color settings:
+PreferencesPage_color_command=&Command:
+PreferencesPage_color_commandResponse=Command &Response:
+PreferencesPage_color_event=&Event:
+PreferencesPage_color_progress=&Progress:
+PreferencesPage_color_error=E&rror:
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.views/.classpath b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/.classpath
index 8a8f1668c..8a8f1668c 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.views/.classpath
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/.classpath
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.model/.project b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/.project
index d3c870f8a..439dd22b4 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.model/.project
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/.project
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.eclipse.tm.te.runtime.model</name>
+ <name>org.eclipse.tcf.te.tcf.ui.views</name>
<comment></comment>
<projects>
</projects>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/.settings/org.eclipse.jdt.core.prefs b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..4ece191fb
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,362 @@
+#Thu Dec 15 12:33:44 CET 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+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.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.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=enabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=enabled
+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.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=warning
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
+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=warning
+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=enabled
+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.unusedObjectAllocation=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
+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.6
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=0
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=0
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=0
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=0
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=0
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=true
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
+org.eclipse.jdt.core.formatter.comment.line_length=100
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=4
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=4
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=true
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=true
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=true
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=true
+org.eclipse.jdt.core.formatter.lineSplit=100
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=true
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/.settings/org.eclipse.jdt.ui.prefs b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 000000000..101566689
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,4 @@
+#Thu Dec 15 12:33:44 CET 2011
+eclipse.preferences.version=1
+formatter_profile=_Target Explorer Java STD
+formatter_settings_version=12
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..13645f47c
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/META-INF/MANIFEST.MF
@@ -0,0 +1,23 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.tcf.te.tcf.ui.views;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipse.tcf.te.tcf.ui.views.activator.UIPlugin
+Bundle-Vendor: %providerName
+Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
+ org.eclipse.ui;bundle-version="3.7.0",
+ org.eclipse.ui.console;bundle-version="3.5.100",
+ org.eclipse.tcf.core;bundle-version="1.0.0",
+ org.eclipse.tcf.te.tcf.locator;bundle-version="1.0.0",
+ org.eclipse.tcf.te.runtime;bundle-version="1.0.0",
+ org.eclipse.tcf.te.runtime.statushandler;bundle-version="1.0.0",
+ org.eclipse.tcf.te.ui;bundle-version="1.0.0",
+ org.eclipse.tcf.te.ui.swt;bundle-version="1.0.0",
+ org.eclipse.tcf.te.tcf.core.scripting;bundle-version="1.0.0",
+ org.eclipse.tcf.te.tcf.log.core;bundle-version="1.0.0",
+ org.eclipse.tcf.te.tcf.ui;bundle-version="1.0.0",
+ org.eclipse.tcf.te.tcf.ui.console;bundle-version="1.0.0"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
+Bundle-Localization: plugin
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/build.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/build.properties
new file mode 100644
index 000000000..1cb217caf
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/build.properties
@@ -0,0 +1,7 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.properties,\
+ plugin.xml,\
+ icons/
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/icons/dtool16/run_exc.gif b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/icons/dtool16/run_exc.gif
new file mode 100644
index 000000000..a252bf0ae
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/icons/dtool16/run_exc.gif
Binary files differ
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/icons/etool16/run_exc.gif b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/icons/etool16/run_exc.gif
new file mode 100644
index 000000000..57f410224
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/icons/etool16/run_exc.gif
Binary files differ
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/icons/eview16/monitor_console.gif b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/icons/eview16/monitor_console.gif
new file mode 100644
index 000000000..1fc2e86b7
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/icons/eview16/monitor_console.gif
Binary files differ
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.views/icons/obj16/workingset.gif b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/icons/eview16/scriptpad.gif
index 549f74ced..c51f86fd8 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.views/icons/obj16/workingset.gif
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/icons/eview16/scriptpad.gif
Binary files differ
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/icons/eview16/scriptpad_console.gif b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/icons/eview16/scriptpad_console.gif
new file mode 100644
index 000000000..5c3f2a020
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/icons/eview16/scriptpad_console.gif
Binary files differ
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/icons/obj16/target.gif b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/icons/obj16/peer.gif
index e9df7b871..e9df7b871 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/icons/obj16/target.gif
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/icons/obj16/peer.gif
Binary files differ
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/plugin.properties
new file mode 100644
index 000000000..d782dc9a1
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/plugin.properties
@@ -0,0 +1,55 @@
+##################################################################################
+# Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+# This program and the accompanying materials are made available under the terms
+# of the Eclipse Public License v1.0 which accompanies this distribution, and is
+# available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Wind River Systems - initial API and implementation
+##################################################################################
+
+pluginName = Target Explorer, TCF Views Plug-in
+providerName = Eclipse.org
+
+# ***** Views *****
+
+ScriptPad.name=Script Pad
+
+# ***** Consoles *****
+
+ScriptConsole.label=Script Pad Console
+
+# ***** Command Contributions *****
+
+command.cut.label=Cu&t
+command.cut.tooltip=Cut
+
+command.copy.label=&Copy
+command.copy.tooltip=Copy
+
+command.paste.label=&Paste
+command.paste.tooltip=Paste
+
+command.delete.label=&Delete
+command.delete.tooltip=Delete
+
+command.selectall.label=Select &All
+command.selectall.tooltip=Select All
+
+command.save.label=&Save
+command.save.tooltip=Save
+
+command.saveas.label=Save &As...
+command.saveas.tooltip=Save As
+
+PeersSubMenuAction.label=Peers
+PeersSubMenuAction.tooltip=Select the peer to play the script on.
+
+PlayAction.label=Play
+PlayAction.tooltip=Play the script on the selected peer.
+
+OpenAction.label=Open
+OpenAction.tooltip=Opens a script.
+
+ClearAction.label=Clear
+ClearAction.tooltip=Clear the content and resets the opened file path.
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/plugin.xml b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/plugin.xml
new file mode 100644
index 000000000..d929e39c9
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/plugin.xml
@@ -0,0 +1,202 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+
+<!-- View contributions -->
+ <extension point="org.eclipse.ui.views">
+ <view
+ allowMultiple="true"
+ category="org.eclipse.tcf.te.ui.views.category"
+ class="org.eclipse.tcf.te.tcf.ui.views.scriptpad.ScriptPad"
+ icon="icons/eview16/scriptpad.gif"
+ id="org.eclipse.tcf.te.tcf.ui.views.scriptpad"
+ name="%ScriptPad.name"
+ restorable="true">
+ </view>
+ </extension>
+
+<!-- Perspective extension contributions -->
+ <extension point="org.eclipse.ui.perspectiveExtensions">
+ <perspectiveExtension targetID="org.eclipse.tcf.te.ui.perspective">
+ <view
+ closeable="true"
+ id="org.eclipse.tcf.te.tcf.ui.views.scriptpad"
+ minimized="false"
+ moveable="true"
+ ratio="0.4"
+ relationship="bottom"
+ relative="org.eclipse.tcf.te.ui.views.TargetExplorer"
+ showTitle="true"
+ standalone="false"
+ visible="false">
+ </view>
+ <viewShortcut
+ id="org.eclipse.tcf.te.tcf.ui.views.scriptpad">
+ </viewShortcut>
+ </perspectiveExtension>
+ </extension>
+
+<!-- Console contributions -->
+ <extension point="org.eclipse.ui.console.consoleFactories">
+ <consoleFactory
+ class="org.eclipse.tcf.te.tcf.ui.views.scriptpad.console.Factory"
+ icon="icons/eview16/scriptpad_console.gif"
+ label="%ScriptConsole.label">
+ </consoleFactory>
+ </extension>
+
+ <extension point="org.eclipse.ui.console.consolePageParticipants">
+ <consolePageParticipant
+ class="org.eclipse.tcf.te.tcf.ui.console.PageParticipant"
+ id="org.eclipse.tcf.te.tcf.ui.console.PageParticipant">
+ <enablement>
+ <instanceof value="org.eclipse.tcf.te.tcf.ui.views.scriptpad.console.Console"/>
+ </enablement>
+ </consolePageParticipant>
+ </extension>
+
+ <extension point="org.eclipse.ui.console.consolePageParticipants">
+ <consolePageParticipant
+ class="org.eclipse.tcf.te.tcf.ui.console.PageParticipant"
+ id="org.eclipse.tcf.te.tcf.ui.console.PageParticipant">
+ <enablement>
+ <instanceof value="org.eclipse.tcf.te.tcf.ui.views.monitor.console.Console"/>
+ </enablement>
+ </consolePageParticipant>
+ </extension>
+
+<!-- Script Pad menu contributions -->
+ <extension point="org.eclipse.ui.viewActions">
+ <viewContribution
+ id="org.eclipse.tcf.te.tcf.ui.scriptpad.toolbar"
+ targetID="org.eclipse.tcf.te.tcf.ui.views.scriptpad">
+ <action
+ class="org.eclipse.tcf.te.tcf.ui.views.scriptpad.actions.PeersSubMenuAction"
+ icon="icons/obj16/peer.gif"
+ id="org.eclipse.tcf.te.tcf.ui.scriptpad.toolbar.peers"
+ label="%PeersSubMenuAction.label"
+ style="pulldown"
+ toolbarPath="peers"
+ tooltip="%PeersSubMenuAction.tooltip">
+ </action>
+
+ <action
+ class="org.eclipse.tcf.te.tcf.ui.views.scriptpad.actions.PlayAction"
+ icon="icons/etool16/run_exc.gif"
+ id="org.eclipse.tcf.te.tcf.ui.scriptpad.toolbar.play"
+ label="%PlayAction.label"
+ style="push"
+ toolbarPath="play"
+ tooltip="%PlayAction.tooltip">
+ </action>
+
+ <action
+ class="org.eclipse.tcf.te.tcf.ui.views.scriptpad.actions.OpenAction"
+ icon="platform:/plugin/org.eclipse.ui/icons/full/obj16/fldr_obj.gif"
+ id="org.eclipse.tcf.te.tcf.ui.scriptpad.toolbar.open"
+ label="%OpenAction.label"
+ style="push"
+ toolbarPath="open"
+ tooltip="%OpenAction.tooltip">
+ </action>
+
+ <action
+ class="org.eclipse.tcf.te.tcf.ui.views.scriptpad.actions.ClearAction"
+ disabledIcon="platform:/plugin/org.eclipse.ui/icons/full/dtool16/clear.gif"
+ icon="platform:/plugin/org.eclipse.ui/icons/full/etool16/clear.gif"
+ id="org.eclipse.tcf.te.tcf.ui.scriptpad.toolbar.clear"
+ label="%ClearAction.label"
+ style="push"
+ toolbarPath="clear"
+ tooltip="%ClearAction.tooltip">
+ </action>
+ </viewContribution>
+ </extension>
+
+ <extension point="org.eclipse.ui.menus">
+ <menuContribution locationURI="popup:org.eclipse.tcf.te.tcf.ui.views.scriptpad">
+ <separator name="group.edit" visible="true"/>
+ <command
+ commandId="org.eclipse.ui.edit.cut"
+ disabledIcon="platform:/plugin/org.eclipse.ui/icons/full/dtool16/cut_edit.gif"
+ icon="platform:/plugin/org.eclipse.ui/icons/full/etool16/cut_edit.gif"
+ label="%command.cut.label"
+ style="push"
+ tooltip="%command.cut.tooltip">
+ </command>
+ <command
+ commandId="org.eclipse.ui.edit.copy"
+ disabledIcon="platform:/plugin/org.eclipse.ui/icons/full/dtool16/copy_edit.gif"
+ icon="platform:/plugin/org.eclipse.ui/icons/full/etool16/copy_edit.gif"
+ label="%command.copy.label"
+ style="push"
+ tooltip="%command.copy.tooltip">
+ </command>
+ <command
+ commandId="org.eclipse.ui.edit.paste"
+ disabledIcon="platform:/plugin/org.eclipse.ui/icons/full/dtool16/paste_edit.gif"
+ icon="platform:/plugin/org.eclipse.ui/icons/full/etool16/paste_edit.gif"
+ label="%command.paste.label"
+ style="push"
+ tooltip="%command.paste.tooltip">
+ </command>
+ <separator name="group.select" visible="true"/>
+ <command
+ commandId="org.eclipse.ui.edit.delete"
+ disabledIcon="platform:/plugin/org.eclipse.ui/icons/full/dtool16/delete.gif"
+ icon="platform:/plugin/org.eclipse.ui/icons/full/etool16/delete.gif"
+ label="%command.delete.label"
+ style="push"
+ tooltip="%command.delete.tooltip">
+ </command>
+ <command
+ commandId="org.eclipse.ui.edit.selectAll"
+ label="%command.selectall.label"
+ style="push"
+ tooltip="%command.selectall.tooltip">
+ </command>
+ </menuContribution>
+
+ <menuContribution locationURI="toolbar:org.eclipse.tcf.te.tcf.ui.views.scriptpad?after=save">
+ <command
+ commandId="org.eclipse.ui.file.save"
+ disabledIcon="platform:/plugin/org.eclipse.ui/icons/full/dtool16/save_edit.gif"
+ icon="platform:/plugin/org.eclipse.ui/icons/full/etool16/save_edit.gif"
+ label="%command.save.label"
+ style="push"
+ tooltip="%command.save.tooltip">
+ </command>
+ <command
+ commandId="org.eclipse.ui.file.saveAs"
+ disabledIcon="platform:/plugin/org.eclipse.ui/icons/full/dtool16/saveas_edit.gif"
+ icon="platform:/plugin/org.eclipse.ui/icons/full/etool16/saveas_edit.gif"
+ label="%command.saveas.label"
+ style="push"
+ tooltip="%command.saveas.tooltip">
+ </command>
+ </menuContribution>
+ </extension>
+
+<!-- Script Pad event listener contributions -->
+ <extension point="org.eclipse.tcf.te.runtime.eventListeners">
+ <eventListener
+ class="org.eclipse.tcf.te.tcf.ui.views.scriptpad.events.EventListener"
+ forcePluginActivation="true">
+ <eventType
+ class="org.eclipse.tcf.te.tcf.core.scripting.events.ScriptEvent">
+ </eventType>
+ </eventListener>
+ </extension>
+
+<!-- Monitor console event listener contributions -->
+ <extension point="org.eclipse.tcf.te.runtime.eventListeners">
+ <eventListener
+ class="org.eclipse.tcf.te.tcf.ui.views.monitor.events.EventListener"
+ forcePluginActivation="true">
+ <eventType
+ class="org.eclipse.tcf.te.tcf.log.core.events.MonitorEvent">
+ </eventType>
+ </eventListener>
+ </extension>
+
+</plugin>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/pom.xml b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/pom.xml
new file mode 100644
index 000000000..03a6a1f6a
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.tcf</groupId>
+ <artifactId>tcf-parent</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../../../pom.xml</relativePath>
+ </parent>
+
+ <version>1.0.0.qualifier</version>
+ <artifactId>org.eclipse.tcf.te.tcf.ui.views</artifactId>
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/activator/UIPlugin.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/activator/UIPlugin.java
new file mode 100644
index 000000000..3ee19ecb0
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/activator/UIPlugin.java
@@ -0,0 +1,126 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.ui.views.activator;
+
+import java.net.URL;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.ImageRegistry;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.tcf.te.tcf.ui.views.internal.ImageConsts;
+import org.eclipse.tcf.te.ui.jface.images.AbstractImageDescriptor;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class UIPlugin extends AbstractUIPlugin {
+ // The shared instance
+ private static UIPlugin plugin;
+
+ /**
+ * Constructor.
+ */
+ public UIPlugin() {
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static UIPlugin getDefault() {
+ return plugin;
+ }
+
+ /**
+ * Convenience method which returns the unique identifier of this plugin.
+ */
+ public static String getUniqueIdentifier() {
+ if (getDefault() != null && getDefault().getBundle() != null) {
+ return getDefault().getBundle().getSymbolicName();
+ }
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#initializeImageRegistry(org.eclipse.jface.resource.ImageRegistry)
+ */
+ @Override
+ protected void initializeImageRegistry(ImageRegistry registry) {
+ URL url = UIPlugin.getDefault().getBundle().getEntry(ImageConsts.IMAGE_DIR_ROOT + ImageConsts.IMAGE_DIR_EVIEW + "scriptpad_console.gif"); //$NON-NLS-1$
+ registry.put(ImageConsts.SCRIPT_PAD_CONSOLE, ImageDescriptor.createFromURL(url));
+ url = UIPlugin.getDefault().getBundle().getEntry(ImageConsts.IMAGE_DIR_ROOT + ImageConsts.IMAGE_DIR_EVIEW + "monitor_console.gif"); //$NON-NLS-1$
+ registry.put(ImageConsts.MONITOR_CONSOLE, ImageDescriptor.createFromURL(url));
+ }
+
+ /**
+ * Loads the image registered under the specified key from the image
+ * registry and returns the <code>Image</code> object instance.
+ *
+ * @param key The key the image is registered with.
+ * @return The <code>Image</code> object instance or <code>null</code>.
+ */
+ public static Image getImage(String key) {
+ return getDefault().getImageRegistry().get(key);
+ }
+
+ /**
+ * Loads the image registered under the specified key from the image
+ * registry and returns the <code>ImageDescriptor</code> object instance.
+ *
+ * @param key The key the image is registered with.
+ * @return The <code>ImageDescriptor</code> object instance or <code>null</code>.
+ */
+ public static ImageDescriptor getImageDescriptor(String key) {
+ return getDefault().getImageRegistry().getDescriptor(key);
+ }
+
+ /**
+ * Loads the image given by the specified image descriptor from the image
+ * registry. If the image has been loaded ones before already, the cached
+ * <code>Image</code> object instance is returned. Otherwise, the <code>
+ * Image</code> object instance will be created and cached before returned.
+ *
+ * @param descriptor The image descriptor.
+ * @return The corresponding <code>Image</code> object instance or <code>null</code>.
+ */
+ public static Image getSharedImage(AbstractImageDescriptor descriptor) {
+ ImageRegistry registry = getDefault().getImageRegistry();
+
+ String imageKey = descriptor.getDecriptorKey();
+ Image image = registry.get(imageKey);
+ if (image == null) {
+ registry.put(imageKey, descriptor);
+ image = registry.get(imageKey);
+ }
+
+ return image;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/help/IContextHelpIds.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/help/IContextHelpIds.java
new file mode 100644
index 000000000..0dd002483
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/help/IContextHelpIds.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.ui.views.help;
+
+import org.eclipse.tcf.te.tcf.ui.views.activator.UIPlugin;
+
+/**
+ * UI Context help id definitions.
+ */
+public interface IContextHelpIds {
+
+ /**
+ * UI plug-in common context help id prefix.
+ */
+ public final static String PREFIX = UIPlugin.getUniqueIdentifier() + "."; //$NON-NLS-1$
+
+ /**
+ * Script Pad console.
+ */
+ public final static String SCRIPT_PAD_CONSOLE = PREFIX + "ScriptPadConsole"; //$NON-NLS-1$
+
+ /**
+ * Script Pad error: open failed
+ */
+ public final static String SCRIPT_PAD_ERROR_OPEN_FILE = PREFIX + "ScriptPadErrorOpenFile"; //$NON-NLS-1$
+
+ /**
+ * Script Pad error: script play failed
+ */
+ public final static String SCRIPT_PAD_ERROR_PLAY_FAILED = PREFIX + "ScriptPadErrorPlayFailed"; //$NON-NLS-1$
+
+ /**
+ * Communication monitor console.
+ */
+ public final static String MONITOR_CONSOLE = PREFIX + "MonitorConsole"; //$NON-NLS-1$
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/internal/ImageConsts.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/internal/ImageConsts.java
index e52a30019..4e34146e8 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/internal/ImageConsts.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/internal/ImageConsts.java
@@ -7,10 +7,10 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.ui.internal;
+package org.eclipse.tcf.te.tcf.ui.views.internal;
/**
- * TCF UI Plug-in Image registry constants.
+ * TCF Console Plug-in Image registry constants.
*/
public interface ImageConsts {
@@ -46,35 +46,33 @@ public interface ImageConsts {
*/
public final static String IMAGE_DIR_OVR = "ovr16/"; //$NON-NLS-1$
- // ***** The image constants *****
-
/**
- * The key to access the base target object image.
+ * The directory where to load disabled toolbar images from,
+ * relative to the image root directory.
*/
- public static final String TARGET = "TargetObject"; //$NON-NLS-1$
+ public final static String IMAGE_DIR_DTOOL = "dtool16/"; //$NON-NLS-1$
/**
- * The key to access the target object gold overlay image.
+ * The directory where to load enabled toolbar images from,
+ * relative to the image root directory.
*/
- public static final String GOLD_OVR = "GoldOverlay"; //$NON-NLS-1$
+ public final static String IMAGE_DIR_ETOOL = "etool16/"; //$NON-NLS-1$
/**
- * The key to access the target object green overlay image.
+ * The directory where to load view related images from, relative to
+ * the image root directory.
*/
- public static final String GREEN_OVR = "GreenOverlay"; //$NON-NLS-1$
+ public final static String IMAGE_DIR_EVIEW = "eview16/"; //$NON-NLS-1$
- /**
- * The key to access the target object grey overlay image.
- */
- public static final String GREY_OVR = "GreyOverlay"; //$NON-NLS-1$
+ // ***** The image constants *****
/**
- * The key to access the target object red overlay image.
+ * The key to access the Script Pad console image.
*/
- public static final String RED_OVR = "RedOverlay"; //$NON-NLS-1$
+ public static final String SCRIPT_PAD_CONSOLE = "ScriptPadConsole"; //$NON-NLS-1$
/**
- * The key to access the target object red X overlay image.
+ * The key to access the Monitor console image.
*/
- public static final String RED_X_OVR = "RedXOverlay"; //$NON-NLS-1$
+ public static final String MONITOR_CONSOLE = "MonitorConsole"; //$NON-NLS-1$
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/monitor/console/Console.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/monitor/console/Console.java
new file mode 100644
index 000000000..3201e5659
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/monitor/console/Console.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.ui.views.monitor.console;
+
+import java.util.concurrent.atomic.AtomicReference;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.te.tcf.ui.console.AbstractConsole;
+import org.eclipse.tcf.te.tcf.ui.views.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.ui.views.help.IContextHelpIds;
+import org.eclipse.tcf.te.tcf.ui.views.internal.ImageConsts;
+import org.eclipse.tcf.te.tcf.ui.views.nls.Messages;
+
+/**
+ * Communication monitor console implementation.
+ */
+public class Console extends AbstractConsole {
+
+ /**
+ * Constructor.
+ *
+ * @param peer The peer. Must not be <code>null</code>.
+ */
+ public Console(final IPeer peer) {
+ super(Messages.Monitor_Console_name, UIPlugin.getImageDescriptor(ImageConsts.MONITOR_CONSOLE));
+
+ Assert.isNotNull(peer);
+
+ // Determine name and id of the peer
+ final AtomicReference<String> name = new AtomicReference<String>();
+ final AtomicReference<String> id = new AtomicReference<String>();
+
+ Runnable runnable = new Runnable() {
+ @Override
+ public void run() {
+ name.set(peer.getName());
+ id.set(peer.getID());
+ }
+ };
+ if (Protocol.isDispatchThread()) runnable.run();
+ else Protocol.invokeAndWait(runnable);
+
+ setName(NLS.bind(Messages.Monitor_Console_name_with_peer, name.get(), id.get()));
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.console.AbstractConsole#getHelpContextId()
+ */
+ @Override
+ public String getHelpContextId() {
+ return IContextHelpIds.MONITOR_CONSOLE;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/monitor/console/Factory.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/monitor/console/Factory.java
new file mode 100644
index 000000000..7b180571f
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/monitor/console/Factory.java
@@ -0,0 +1,108 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.ui.views.monitor.console;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.ui.console.ConsolePlugin;
+import org.eclipse.ui.console.IConsole;
+import org.eclipse.ui.console.IConsoleManager;
+
+/**
+ * Communication monitor console factory implementation.
+ */
+public class Factory {
+ // Map of active consoles per peer
+ private static final Map<IPeer, Console> CONSOLES = new HashMap<IPeer, Console>();
+
+ /**
+ * Show the console. Called by {@link Console}.
+ *
+ * @param peer The peer. Must not be <code>null</code>.
+ * @param createNew If <code>true</code>, a new console instance will be created and returned.
+ *
+ * @return The console instance or <code>null</code>.
+ */
+ public static Console showConsole(IPeer peer, boolean createNew) {
+ Assert.isNotNull(peer);
+ // Get the console for the channel
+ Console console = getConsole(peer, createNew);
+ if (console != null) {
+ // Get the console manager
+ IConsoleManager manager = ConsolePlugin.getDefault().getConsoleManager();
+ // Add the console to the manager if not yet done
+ if (!isConsoleAlreadyAdded(console)) manager.addConsoles(new IConsole[] {console});
+ // Show the console view with the monitor console
+ manager.showConsoleView(console);
+ }
+
+ return console;
+ }
+
+ /**
+ * Checks if the given console is already added to the console manager.
+ *
+ * @param console The console. Must not be <code>null</code>.
+ * @return <code>True</code> if the console exist, <code>false</code> otherwise.
+ */
+ private static boolean isConsoleAlreadyAdded(IConsole console) {
+ Assert.isNotNull(console);
+ // Assume the console to be not yet added
+ boolean alreadyAdded = false;
+ // Check all consoles if it is the same instance as the passed in one
+ for (IConsole candidate : ConsolePlugin.getDefault().getConsoleManager().getConsoles()) {
+ if (candidate == console) {
+ alreadyAdded = true;
+ break;
+ }
+ }
+ return alreadyAdded;
+ }
+
+ /**
+ * Returns the communication monitor console instance associated with the given peer.
+ *
+ * @param peer The peer. Must not be <code>null</code>.
+ * @param createNew If <code>true</code>, a new console instance will be created and returned.
+ *
+ * @return The console instance or <code>null</code>.
+ */
+ public static Console getConsole(IPeer peer, boolean createNew) {
+ Assert.isNotNull(peer);
+ // Lookup the peer specific console
+ Console console = CONSOLES.get(peer);
+ if (console == null && createNew) {
+ // Create a new console instance
+ console = new Console(peer);
+ // And store the new console in the map
+ CONSOLES.put(peer, console);
+ }
+
+ // Add the console to the manager if not yet done
+ if (console != null && !isConsoleAlreadyAdded(console)) {
+ ConsolePlugin.getDefault().getConsoleManager().addConsoles(new IConsole[] {console});
+ }
+
+ return console;
+ }
+
+ /**
+ * Shutdown all known consoles.
+ */
+ public static void shutdown() {
+ // Shutdown all channel specific consoles
+ for (Console console : CONSOLES.values()) console.shutdown();
+ // Clear the map
+ CONSOLES.clear();
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/monitor/events/EventListener.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/monitor/events/EventListener.java
new file mode 100644
index 000000000..f6ec17cb3
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/monitor/events/EventListener.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.ui.views.monitor.events;
+
+import java.util.EventObject;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.te.tcf.log.core.events.MonitorEvent;
+import org.eclipse.tcf.te.tcf.ui.views.monitor.console.Console;
+import org.eclipse.tcf.te.tcf.ui.views.monitor.console.Factory;
+import org.eclipse.tcf.te.ui.events.AbstractEventListener;
+
+/**
+ * Communication monitor console event listener
+ */
+public class EventListener extends AbstractEventListener {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.interfaces.events.IEventListener#eventFired(java.util.EventObject)
+ */
+ @Override
+ public void eventFired(EventObject event) {
+ if (event instanceof MonitorEvent) {
+ MonitorEvent monitorEvent = (MonitorEvent)event;
+
+ // Get the event type and message
+ MonitorEvent.Type type = monitorEvent.getType();
+ MonitorEvent.Message message = monitorEvent.getMessage();
+
+ switch (type) {
+ case OPEN:
+ break;
+ case CLOSE:
+ // Channel close messages are logged only if there is an error
+ if (message != null && message.text != null && !message.text.contains("(error=null)")) { //$NON-NLS-1$
+ // Get the console
+ Console console = Factory.getConsole((IPeer)monitorEvent.getSource(), true);
+ Assert.isNotNull(console);
+ // Message type 'R' is an unknown type and will lead to print the
+ // message text using the error color.
+ console.appendMessage('R', message.text);
+ }
+ break;
+ case ACTIVITY:
+ if (message != null) {
+ // Get the console
+ Console console = Factory.getConsole((IPeer)monitorEvent.getSource(), true);
+ Assert.isNotNull(console);
+ console.appendMessage(message.type, message.text);
+ }
+ break;
+ }
+ }
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/nls/Messages.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/nls/Messages.java
new file mode 100644
index 000000000..d5ad2f1ff
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/nls/Messages.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.ui.views.nls;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * TCF Views Plug-in externalized strings management.
+ */
+public class Messages extends NLS {
+
+ // The plug-in resource bundle name
+ private static final String BUNDLE_NAME = "org.eclipse.tcf.te.tcf.ui.views.nls.Messages"; //$NON-NLS-1$
+
+ /**
+ * Static constructor.
+ */
+ static {
+ // Load message values from bundle file
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ // **** Declare externalized string id's down here *****
+
+ public static String ScriptPad_Console_name;
+
+ public static String Monitor_Console_name;
+ public static String Monitor_Console_name_with_peer;
+
+ public static String ScriptPad_error_title;
+ public static String ScriptPad_error_openFile;
+ public static String ScriptPad_error_saveFile;
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/nls/Messages.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/nls/Messages.properties
new file mode 100644
index 000000000..5614f5e16
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/nls/Messages.properties
@@ -0,0 +1,14 @@
+#
+# org.eclipse.tcf.te.tcf.ui.views
+# Externalized Strings.
+#
+
+ScriptPad_Console_name=Script Pad Console
+
+Monitor_Console_name=Monitor Console
+Monitor_Console_name_with_peer=Monitor Console: {0} [{1}]
+
+ScriptPad_error_title=Error
+ScriptPad_error_openFile=Failed to open file ''{0}''.\n\nPossible cause:\n{1}
+ScriptPad_error_saveFile=Failed to save file ''{0}''.\n\nPossible cause:\n{1}
+
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/ScriptPad.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/ScriptPad.java
new file mode 100644
index 000000000..2224612ba
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/ScriptPad.java
@@ -0,0 +1,627 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.ui.views.scriptpad;
+
+import java.io.File;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.action.GroupMarker;
+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.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CaretEvent;
+import org.eclipse.swt.custom.CaretListener;
+import org.eclipse.swt.custom.StyledText;
+import org.eclipse.swt.dnd.DND;
+import org.eclipse.swt.dnd.DropTarget;
+import org.eclipse.swt.dnd.DropTargetAdapter;
+import org.eclipse.swt.dnd.DropTargetEvent;
+import org.eclipse.swt.dnd.FileTransfer;
+import org.eclipse.swt.dnd.TextTransfer;
+import org.eclipse.swt.dnd.Transfer;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.runtime.properties.PropertiesContainer;
+import org.eclipse.tcf.te.runtime.statushandler.StatusHandlerManager;
+import org.eclipse.tcf.te.runtime.statushandler.interfaces.IStatusHandler;
+import org.eclipse.tcf.te.runtime.statushandler.interfaces.IStatusHandlerConstants;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.tcf.ui.views.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.ui.views.help.IContextHelpIds;
+import org.eclipse.tcf.te.tcf.ui.views.nls.Messages;
+import org.eclipse.tcf.te.tcf.ui.views.scriptpad.actions.CopyAction;
+import org.eclipse.tcf.te.tcf.ui.views.scriptpad.actions.CutAction;
+import org.eclipse.tcf.te.tcf.ui.views.scriptpad.actions.DeleteAction;
+import org.eclipse.tcf.te.tcf.ui.views.scriptpad.actions.PasteAction;
+import org.eclipse.tcf.te.tcf.ui.views.scriptpad.actions.PeerAction;
+import org.eclipse.tcf.te.tcf.ui.views.scriptpad.actions.SelectAllAction;
+import org.eclipse.tcf.te.ui.swt.DisplayUtil;
+import org.eclipse.tcf.te.ui.swt.SWTControlUtil;
+import org.eclipse.ui.IActionBars;
+import org.eclipse.ui.ISaveablePart;
+import org.eclipse.ui.IWorkbenchActionConstants;
+import org.eclipse.ui.IWorkbenchPartConstants;
+import org.eclipse.ui.actions.ActionFactory;
+import org.eclipse.ui.part.ViewPart;
+
+/**
+ * Script Pad view implementation.
+ */
+public class ScriptPad extends ViewPart implements ISelectionProvider, SelectionListener, ISaveablePart {
+ // Reference to the header line
+ private Label head;
+ // Reference to the Text widget
+ /* default */ StyledText text;
+ // Reference to the line style listener
+ private ScriptPadLineStyleListener lineStyleListener;
+
+ // The list of registered selection changed listeners
+ private final List<ISelectionChangedListener> listeners = new ArrayList<ISelectionChangedListener>();
+
+ // Reference to the selected peer model
+ /* default */ IPeerModel peerModel;
+
+ // References to the global action handlers
+ private CutAction cutHandler;
+ private CopyAction copyHandler;
+ private PasteAction pasteHandler;
+ /* default */ DeleteAction deleteHandler;
+ private SelectAllAction selectAllHandler;
+
+ // If the user loaded a script either via the "Open" action or DnD, remember the file name
+ // so the user can save it back.
+ private String fileLoaded = null;
+
+ // The dirty state
+ private boolean dirty = false;
+
+ /**
+ * Constructor.
+ */
+ public ScriptPad() {
+ super();
+ listeners.clear();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.part.WorkbenchPart#dispose()
+ */
+ @Override
+ public void dispose() {
+ if (text != null && !text.isDisposed()) {
+ text.removeSelectionListener(this);
+ if (lineStyleListener != null) {
+ text.removeLineStyleListener(lineStyleListener);
+ lineStyleListener.dispose();
+ lineStyleListener = null;
+ }
+ }
+ listeners.clear();
+ fileLoaded = null;
+ super.dispose();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
+ */
+ @Override
+ public void createPartControl(Composite parent) {
+ Composite panel = new Composite(parent, SWT.NONE);
+ GridLayout layout = new GridLayout();
+ layout.marginHeight = 0; layout.marginWidth = 0;
+ panel.setLayout(layout);
+ panel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+
+ // Create the head label
+ head = new Label(panel, SWT.HORIZONTAL);
+ head.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+
+ // Create the StyledText widget
+ text = new StyledText(panel, SWT.BORDER | SWT.FULL_SELECTION | SWT.MULTI);
+ text.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+ text.setFont(JFaceResources.getTextFont());
+ text.addSelectionListener(this);
+ text.addCaretListener(new CaretListener() {
+ @Override
+ public void caretMoved(CaretEvent event) {
+ if (deleteHandler != null) deleteHandler.updateEnabledState();
+ }
+ });
+ text.addModifyListener(new ModifyListener() {
+ @Override
+ public void modifyText(ModifyEvent e) {
+ if (!isDirty()) markDirty(true);
+ }
+ });
+
+ lineStyleListener = new ScriptPadLineStyleListener();
+ text.addLineStyleListener(lineStyleListener);
+
+ // Register ourselves as selection provider
+ getViewSite().setSelectionProvider(this);
+
+ // Create the context menu
+ createContextMenu();
+ // Create the toolbar
+ createToolbar();
+
+ // Hook the global actions
+ hookGlobalActions();
+
+ // Setup Drag n Drop
+ setupDnD();
+
+ // Update the action bars
+ getViewSite().getActionBars().updateActionBars();
+ }
+
+ /**
+ * Creates the views context menu and register it to enable contributions.
+ */
+ private void createContextMenu() {
+ // Create menu manager.
+ MenuManager menuMgr = new MenuManager();
+ menuMgr.setRemoveAllWhenShown(true);
+ menuMgr.addMenuListener(new IMenuListener() {
+ @Override
+ public void menuAboutToShow(IMenuManager mgr) {
+ fillContextMenu(mgr);
+ }
+ });
+
+ // Create menu.
+ Menu menu = menuMgr.createContextMenu(text);
+ text.setMenu(menu);
+
+ // Register menu for extension.
+ getSite().registerContextMenu(menuMgr, this);
+ }
+
+ /**
+ * Fill the context menu.
+ *
+ * @param manager The menu manager. Must not be <code>null</code>.
+ */
+ protected void fillContextMenu(IMenuManager manager) {
+ Assert.isNotNull(manager);
+ }
+
+ /**
+ * Hook the global actions.
+ */
+ protected void hookGlobalActions() {
+ IActionBars actionBars = getViewSite().getActionBars();
+
+ cutHandler = new CutAction(this);
+ actionBars.setGlobalActionHandler(ActionFactory.CUT.getId(), cutHandler);
+
+ copyHandler = new CopyAction(this);
+ actionBars.setGlobalActionHandler(ActionFactory.COPY.getId(), copyHandler);
+
+ pasteHandler = new PasteAction(this);
+ actionBars.setGlobalActionHandler(ActionFactory.PASTE.getId(), pasteHandler);
+
+ deleteHandler = new DeleteAction(this);
+ actionBars.setGlobalActionHandler(ActionFactory.DELETE.getId(), deleteHandler);
+
+ selectAllHandler = new SelectAllAction(this);
+ actionBars.setGlobalActionHandler(ActionFactory.SELECT_ALL.getId(), selectAllHandler);
+
+ updateActionEnablements();
+ }
+
+ /**
+ * Creates the views toolbar.
+ */
+ private void createToolbar() {
+ IToolBarManager manager = getViewSite().getActionBars().getToolBarManager();
+ manager.add(new Separator());
+ manager.add(new GroupMarker("open")); //$NON-NLS-1$
+ manager.add(new GroupMarker("save")); //$NON-NLS-1$
+ manager.add(new Separator());
+ manager.add(new GroupMarker("clear")); //$NON-NLS-1$
+ manager.add(new Separator());
+ manager.add(new GroupMarker("play")); //$NON-NLS-1$
+ manager.add(new Separator());
+ manager.add(new GroupMarker("peers")); //$NON-NLS-1$
+ manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
+ }
+
+ /**
+ * Setup Drag n Drop support.
+ */
+ private void setupDnD() {
+ DropTarget target = new DropTarget(text, DND.DROP_DEFAULT | DND.DROP_COPY);
+ target.setTransfer(new Transfer[] { TextTransfer.getInstance(), FileTransfer.getInstance() });
+ target.addDropListener(new DropTargetAdapter() {
+
+ @Override
+ public void drop(DropTargetEvent event) {
+ if (FileTransfer.getInstance().isSupportedType(event.currentDataType)) {
+ String[] names = (String[]) FileTransfer.getInstance().nativeToJava(event.currentDataType);
+ if (names != null && names.length > 0) {
+ openFile(names[0]);
+ }
+ }
+ else if (TextTransfer.getInstance().isSupportedType(event.currentDataType)) {
+ String content = (String) TextTransfer.getInstance().nativeToJava(event.currentDataType);
+ if (content != null && !"".equals(content)) { //$NON-NLS-1$
+ if (text != null && !text.isDisposed()) text.setText(content);
+ }
+ }
+ }
+
+ @Override
+ public void dragOperationChanged(DropTargetEvent event) {
+ if (event.detail == DND.DROP_DEFAULT) event.detail = DND.DROP_COPY;
+ }
+
+ @Override
+ public void dragEnter(DropTargetEvent event) {
+ if (event.detail == DND.DROP_DEFAULT) event.detail = DND.DROP_COPY;
+ }
+ });
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.part.WorkbenchPart#setFocus()
+ */
+ @Override
+ public void setFocus() {
+ if (text != null) text.setFocus();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ISelectionProvider#addSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener)
+ */
+ @Override
+ public void addSelectionChangedListener(ISelectionChangedListener listener) {
+ Assert.isNotNull(listener);
+ if (!listeners.contains(listener)) listeners.add(listener);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ISelectionProvider#removeSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener)
+ */
+ @Override
+ public void removeSelectionChangedListener(ISelectionChangedListener listener) {
+ Assert.isNotNull(listener);
+ listeners.remove(listener);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ISelectionProvider#getSelection()
+ */
+ @Override
+ public ISelection getSelection() {
+ String selected = text.getSelectionText();
+ return selected != null ? new StructuredSelection(selected) : null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ISelectionProvider#setSelection(org.eclipse.jface.viewers.ISelection)
+ */
+ @Override
+ public void setSelection(ISelection selection) {
+ if (selection instanceof IStructuredSelection && !selection.isEmpty()) {
+ Object element = ((IStructuredSelection)selection).getFirstElement();
+ if (element instanceof String) {
+ int start = text.getText().indexOf((String)element);
+ if (start != -1) {
+ text.setSelection(start, start + ((String)element).length());
+ }
+ }
+ } else {
+ text.setSelection(text.getCaretOffset(), text.getCaretOffset());
+ }
+
+ // Fire the selection changed event
+ fireSelectionChanged();
+ updateActionEnablements();
+ }
+
+ /**
+ * Notify the registered selection changed listener about a changed selection.
+ */
+ private void fireSelectionChanged() {
+ if (getSelection() == null) return;
+
+ SelectionChangedEvent event = new SelectionChangedEvent(this, getSelection());
+ Iterator<ISelectionChangedListener> iterator = listeners.iterator();
+ while (iterator.hasNext()) {
+ ISelectionChangedListener listener = iterator.next();
+ listener.selectionChanged(event);
+ }
+ }
+
+ /**
+ * Update the action enablements
+ */
+ public void updateActionEnablements() {
+ if (cutHandler != null) cutHandler.updateEnabledState();
+ if (copyHandler != null) copyHandler.updateEnabledState();
+ if (pasteHandler != null) pasteHandler.updateEnabledState();
+ if (deleteHandler != null) deleteHandler.updateEnabledState();
+ if (selectAllHandler != null) selectAllHandler.updateEnabledState();
+ }
+
+ /**
+ * Update the head label
+ */
+ protected void updateHeadLabel() {
+ StringBuilder label = new StringBuilder();
+
+ if (fileLoaded == null) {
+ label.append("<no file>"); //$NON-NLS-1$
+ } else {
+ IPath path = new Path(fileLoaded);
+ label.append(path.lastSegment());
+ }
+
+ label.append(" - "); //$NON-NLS-1$
+
+ if (peerModel == null) {
+ label.append("<no peer>"); //$NON-NLS-1$
+ } else {
+ PeerAction action = new PeerAction(this, peerModel);
+ label.append(action.getText());
+ }
+
+ SWTControlUtil.setText(head, label.toString());
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
+ */
+ @Override
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+ */
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ fireSelectionChanged();
+ updateActionEnablements();
+ }
+
+ /**
+ * Sets the peer model.
+ *
+ * @param peerModel The peer model or <code>null</code>.
+ */
+ public void setPeerModel(IPeerModel peerModel) {
+ this.peerModel = peerModel;
+ // Update the head label
+ updateHeadLabel();
+ // Update the action bars
+ getViewSite().getActionBars().updateActionBars();
+ // Fire a property change (in the UI Thread)
+ DisplayUtil.safeAsyncExec(new Runnable() {
+ @SuppressWarnings("synthetic-access")
+ @Override
+ public void run() {
+ firePropertyChange(IWorkbenchPartConstants.PROP_INPUT);
+ }
+ });
+ }
+
+ /**
+ * Returns the associated peer model.
+ *
+ * @return The associated peer model.
+ */
+ public IPeerModel getPeerModel() {
+ return peerModel;
+ }
+
+ /**
+ * Returns the styled text widget.
+ *
+ * @return The styled text widget or <code>null</code>.
+ */
+ public StyledText getStyledText() {
+ return text;
+ }
+
+ /**
+ * Sets the dirty state.
+ *
+ * @param dirty <code>True</code> to mark the view dirty, <code>false</code> otherwise.
+ */
+ public void markDirty(boolean dirty) {
+ if (this.dirty != dirty) {
+ this.dirty = dirty;
+ firePropertyChange(IWorkbenchPartConstants.PROP_DIRTY);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.ISaveablePart#isDirty()
+ */
+ @Override
+ public boolean isDirty() {
+ return dirty;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.ISaveablePart#doSave(org.eclipse.core.runtime.IProgressMonitor)
+ */
+ @Override
+ public void doSave(IProgressMonitor monitor) {
+ if (fileLoaded != null) saveFile(fileLoaded);
+ else doSaveAs();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.ISaveablePart#doSaveAs()
+ */
+ @Override
+ public void doSaveAs() {
+ FileDialog dialog = new FileDialog(getViewSite().getShell(), SWT.SAVE);
+ dialog.setFilterExtensions(new String[] { "*.tcf", "*" }); //$NON-NLS-1$ //$NON-NLS-2$
+ dialog.setFilterPath(fileLoaded != null ? fileLoaded : System.getProperty("user.home")); //$NON-NLS-1$
+ String file = dialog.open();
+ if (file != null) {
+ saveFile(file);
+ // Save succeeded ?
+ if (!isDirty()) {
+ fileLoaded = file;
+ updateHeadLabel();
+ }
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.ISaveablePart#isSaveAsAllowed()
+ */
+ @Override
+ public boolean isSaveAsAllowed() {
+ return true;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.ISaveablePart#isSaveOnCloseNeeded()
+ */
+ @Override
+ public boolean isSaveOnCloseNeeded() {
+ return isDirty();
+ }
+
+ /**
+ * Clears all content and reset the loaded file path.
+ */
+ public void clear() {
+ this.fileLoaded = null;
+ updateHeadLabel();
+ if (text != null && !text.isDisposed()) text.setText(""); //$NON-NLS-1$
+ }
+
+ /**
+ * Opens the file.
+ *
+ * @param file The absolute file name of the script to load. Must not be <code>null</code>.
+ */
+ public void openFile(String file) {
+ Assert.isNotNull(file);
+
+ // The file name must be absolute and denote a readable file
+ File f = new File(file);
+ if (f.isAbsolute() && f.isFile() && f.canRead()) {
+ // Remember the file name
+ this.fileLoaded = file;
+ updateHeadLabel();
+ // Clear out the old text
+ text.setText(""); //$NON-NLS-1$
+
+ FileReader reader = null;
+ try {
+ reader = new FileReader(f);
+ StringBuilder buffer = new StringBuilder();
+ int c;
+ while ((c = reader.read()) != -1) {
+ buffer.append((char)c);
+ }
+ text.setText(buffer.toString());
+ markDirty(false);
+ } catch (Exception e) {
+ IStatus status = new Status(IStatus.ERROR, UIPlugin.getUniqueIdentifier(),
+ NLS.bind(Messages.ScriptPad_error_openFile, file, e.getLocalizedMessage()), e);
+
+ IStatusHandler[] handlers = StatusHandlerManager.getInstance().getHandler(this);
+ if (handlers.length > 0) {
+ IPropertiesContainer data = new PropertiesContainer();
+ data.setProperty(IStatusHandlerConstants.PROPERTY_TITLE, Messages.ScriptPad_error_title);
+ data.setProperty(IStatusHandlerConstants.PROPERTY_CONTEXT_HELP_ID, IContextHelpIds.SCRIPT_PAD_ERROR_OPEN_FILE);
+ data.setProperty(IStatusHandlerConstants.PROPERTY_CALLER, this);
+
+ handlers[0].handleStatus(status, data, null);
+ } else {
+ UIPlugin.getDefault().getLog().log(status);
+ }
+ } finally {
+ if (reader != null) try { reader.close(); } catch (IOException e) { /* ignored on purpose */ }
+ }
+ }
+ updateActionEnablements();
+ }
+
+ /**
+ * Saves the file.
+ *
+ * @param file The absolute file name to save the script to. Must not be <code>null</code>.
+ */
+ public void saveFile(String file) {
+ Assert.isNotNull(file);
+
+ // The file name must be absolute and denote a writable file
+ File f = new File(file);
+ if (f.isAbsolute() && ((f.exists() && f.isFile() && f.canWrite() || !f.exists()))) {
+ String content = text.getText();
+
+ FileWriter writer = null;
+ try {
+ writer = new FileWriter(f);
+ writer.write(content);
+ markDirty(false);
+ } catch (Exception e) {
+ IStatus status = new Status(IStatus.ERROR, UIPlugin.getUniqueIdentifier(),
+ NLS.bind(Messages.ScriptPad_error_saveFile, file, e.getLocalizedMessage()), e);
+
+ IStatusHandler[] handlers = StatusHandlerManager.getInstance().getHandler(this);
+ if (handlers.length > 0) {
+ IPropertiesContainer data = new PropertiesContainer();
+ data.setProperty(IStatusHandlerConstants.PROPERTY_TITLE, Messages.ScriptPad_error_title);
+ data.setProperty(IStatusHandlerConstants.PROPERTY_CONTEXT_HELP_ID, IContextHelpIds.SCRIPT_PAD_ERROR_OPEN_FILE);
+ data.setProperty(IStatusHandlerConstants.PROPERTY_CALLER, this);
+
+ handlers[0].handleStatus(status, data, null);
+ } else {
+ UIPlugin.getDefault().getLog().log(status);
+ }
+ } finally {
+ if (writer != null) try { writer.close(); } catch (IOException e) { /* ignored on purpose */ }
+ }
+ }
+ updateActionEnablements();
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/ScriptPadLineStyleListener.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/ScriptPadLineStyleListener.java
new file mode 100644
index 000000000..ad019cdf7
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/ScriptPadLineStyleListener.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.ui.views.scriptpad;
+
+import java.util.regex.Pattern;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.LineStyleEvent;
+import org.eclipse.swt.custom.LineStyleListener;
+import org.eclipse.swt.custom.StyleRange;
+import org.eclipse.swt.custom.StyledText;
+import org.eclipse.tcf.te.runtime.interfaces.IDisposable;
+
+/**
+ * Script Pad line style listener implementation.
+ */
+public class ScriptPadLineStyleListener implements LineStyleListener, IDisposable {
+ private static final Pattern COMMENT_LINE = Pattern.compile("\\s*#.*"); //$NON-NLS-1$
+ private static final Pattern CONNECT_LINE = Pattern.compile("\\s*connect\\s+.*"); //$NON-NLS-1$
+// private static final Pattern COMMAND_LINE = Pattern.compile("\\s*tcf\\s+(\\w+)\\s+(\\w+)(.*)"); //$NON-NLS-1$
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.interfaces.IDisposable#dispose()
+ */
+ @Override
+ public void dispose() {
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.swt.custom.LineStyleListener#lineGetStyle(org.eclipse.swt.custom.LineStyleEvent)
+ */
+ @Override
+ public void lineGetStyle(LineStyleEvent event) {
+ String text = event.lineText;
+
+ if (text != null && !"".equals(text)) { //$NON-NLS-1$
+
+ if (COMMENT_LINE.matcher(text).matches()) {
+ StyleRange range = new StyleRange(event.lineOffset, text.length(),
+ event.widget.getDisplay().getSystemColor(SWT.COLOR_DARK_GREEN),
+ ((StyledText)event.widget).getBackground());
+ event.styles = new StyleRange[] { range };
+ }
+ else if (CONNECT_LINE.matcher(text).matches()) {
+ StyleRange range = new StyleRange(event.lineOffset, text.length(),
+ event.widget.getDisplay().getSystemColor(SWT.COLOR_GRAY),
+ ((StyledText)event.widget).getBackground(),
+ SWT.ITALIC);
+ event.styles = new StyleRange[] { range };
+ }
+ }
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/ClearAction.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/ClearAction.java
new file mode 100644
index 000000000..11e96edfb
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/ClearAction.java
@@ -0,0 +1,85 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.ui.views.scriptpad.actions;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.tcf.te.tcf.ui.views.scriptpad.ScriptPad;
+import org.eclipse.ui.IActionDelegate2;
+import org.eclipse.ui.IViewActionDelegate;
+import org.eclipse.ui.IViewPart;
+
+/**
+ * Clear script action implementation.
+ */
+public class ClearAction extends Action implements IViewActionDelegate, IActionDelegate2 {
+ // Reference to the action proxy
+ /* default */ IAction actionProxy;
+ // Parent view part
+ /* default */ IViewPart view;
+
+ /**
+ * Constructor.
+ */
+ public ClearAction() {
+ super();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IViewActionDelegate#init(org.eclipse.ui.IViewPart)
+ */
+ @Override
+ public void init(IViewPart view) {
+ this.view = view;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IActionDelegate2#init(org.eclipse.jface.action.IAction)
+ */
+ @Override
+ public void init(IAction action) {
+ this.actionProxy = action;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
+ */
+ @Override
+ public void run(IAction action) {
+ if (view instanceof ScriptPad) {
+ ((ScriptPad)view).clear();
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IActionDelegate2#runWithEvent(org.eclipse.jface.action.IAction, org.eclipse.swt.widgets.Event)
+ */
+ @Override
+ public void runWithEvent(IAction action, Event event) {
+ run(action);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
+ */
+ @Override
+ public void selectionChanged(IAction action, ISelection selection) {
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IActionDelegate2#dispose()
+ */
+ @Override
+ public void dispose() {
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/CopyAction.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/CopyAction.java
new file mode 100644
index 000000000..c61d86220
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/CopyAction.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.ui.views.scriptpad.actions;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.action.Action;
+import org.eclipse.tcf.te.tcf.ui.views.scriptpad.ScriptPad;
+
+/**
+ * Script Pad copy action handler implementation.
+ */
+public class CopyAction extends Action {
+ // Reference to the parent view
+ private final ScriptPad view;
+
+ /**
+ * Constructor.
+ *
+ * @param view The parent Script Pad view. Must not be <code>null</code>.
+ */
+ public CopyAction(ScriptPad view) {
+ super();
+
+ Assert.isNotNull(view);
+ this.view = view;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.action.Action#run()
+ */
+ @Override
+ public void run() {
+ if (view.getStyledText() == null || view.getStyledText().isDisposed()) return;
+ view.getStyledText().copy();
+ view.updateActionEnablements();
+ }
+
+ /**
+ * Updates the actions enabled state.
+ */
+ public void updateEnabledState() {
+ setEnabled(view.getStyledText() != null && view.getStyledText().getSelectionCount() > 0);
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/CutAction.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/CutAction.java
new file mode 100644
index 000000000..1e22128fd
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/CutAction.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.ui.views.scriptpad.actions;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.action.Action;
+import org.eclipse.tcf.te.tcf.ui.views.scriptpad.ScriptPad;
+
+/**
+ * Script Pad cut action handler implementation.
+ */
+public class CutAction extends Action {
+ // Reference to the parent view
+ private final ScriptPad view;
+
+ /**
+ * Constructor.
+ *
+ * @param view The parent Script Pad view. Must not be <code>null</code>.
+ */
+ public CutAction(ScriptPad view) {
+ super();
+
+ Assert.isNotNull(view);
+ this.view = view;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.action.Action#run()
+ */
+ @Override
+ public void run() {
+ if (view.getStyledText() == null || view.getStyledText().isDisposed()) return;
+ view.getStyledText().cut();
+ view.updateActionEnablements();
+ }
+
+ /**
+ * Updates the actions enabled state.
+ */
+ public void updateEnabledState() {
+ setEnabled(view.getStyledText() != null && view.getStyledText().getEditable() && view.getStyledText().getSelectionCount() > 0);
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/DeleteAction.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/DeleteAction.java
new file mode 100644
index 000000000..8cfb7c66c
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/DeleteAction.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.ui.views.scriptpad.actions;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.action.Action;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.tcf.te.tcf.ui.views.scriptpad.ScriptPad;
+
+/**
+ * Script Pad delete action handler implementation.
+ */
+public class DeleteAction extends Action {
+ // Reference to the parent view
+ private final ScriptPad view;
+
+ /**
+ * Constructor.
+ *
+ * @param view The parent Script Pad view. Must not be <code>null</code>.
+ */
+ public DeleteAction(ScriptPad view) {
+ super();
+
+ Assert.isNotNull(view);
+ this.view = view;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.action.Action#run()
+ */
+ @Override
+ public void run() {
+ if (view.getStyledText() == null || view.getStyledText().isDisposed()) return;
+ Point selection = view.getStyledText().getSelection();
+ if (selection.y == selection.x && selection.x < view.getStyledText().getCharCount()) {
+ view.getStyledText().setSelection(selection.x, selection.x + 1);
+ }
+ view.getStyledText().insert(""); //$NON-NLS-1$
+ view.updateActionEnablements();
+ }
+
+ /**
+ * Updates the actions enabled state.
+ */
+ public void updateEnabledState() {
+ setEnabled(view.getStyledText() != null && view.getStyledText().getEditable()
+ && (view.getStyledText().getSelectionCount() > 0 || view.getStyledText().getCaretOffset() < view.getStyledText().getCharCount()));
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/OpenAction.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/OpenAction.java
new file mode 100644
index 000000000..45bacf2ed
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/OpenAction.java
@@ -0,0 +1,96 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.ui.views.scriptpad.actions;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.tcf.te.tcf.ui.views.scriptpad.ScriptPad;
+import org.eclipse.ui.IActionDelegate2;
+import org.eclipse.ui.IViewActionDelegate;
+import org.eclipse.ui.IViewPart;
+
+/**
+ * Open script action implementation.
+ */
+public class OpenAction extends Action implements IViewActionDelegate, IActionDelegate2 {
+ // Reference to the action proxy
+ /* default */ IAction actionProxy;
+ // Parent view part
+ /* default */ IViewPart view;
+
+ // Remember the last file path opened
+ private String lastFile = null;
+
+ /**
+ * Constructor.
+ */
+ public OpenAction() {
+ super();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IViewActionDelegate#init(org.eclipse.ui.IViewPart)
+ */
+ @Override
+ public void init(IViewPart view) {
+ this.view = view;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IActionDelegate2#init(org.eclipse.jface.action.IAction)
+ */
+ @Override
+ public void init(IAction action) {
+ this.actionProxy = action;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
+ */
+ @Override
+ public void run(IAction action) {
+ // Open a file open dialog
+ FileDialog dialog = new FileDialog(view.getViewSite().getShell(), SWT.OPEN);
+ dialog.setFilterExtensions(new String[] { "*.tcf", "*" }); //$NON-NLS-1$ //$NON-NLS-2$
+ dialog.setFilterPath(lastFile != null ? lastFile : System.getProperty("user.home")); //$NON-NLS-1$
+ String file = dialog.open();
+ if (file != null && view instanceof ScriptPad) {
+ lastFile = file;
+ ((ScriptPad)view).openFile(file);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IActionDelegate2#runWithEvent(org.eclipse.jface.action.IAction, org.eclipse.swt.widgets.Event)
+ */
+ @Override
+ public void runWithEvent(IAction action, Event event) {
+ run(action);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
+ */
+ @Override
+ public void selectionChanged(IAction action, ISelection selection) {
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IActionDelegate2#dispose()
+ */
+ @Override
+ public void dispose() {
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/PasteAction.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/PasteAction.java
new file mode 100644
index 000000000..7025ff3b2
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/PasteAction.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.ui.views.scriptpad.actions;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.action.Action;
+import org.eclipse.swt.dnd.Clipboard;
+import org.eclipse.swt.dnd.TextTransfer;
+import org.eclipse.swt.dnd.TransferData;
+import org.eclipse.tcf.te.tcf.ui.views.scriptpad.ScriptPad;
+
+/**
+ * Script Pad paste action handler implementation.
+ */
+public class PasteAction extends Action {
+ // Reference to the parent view
+ private final ScriptPad view;
+
+ /**
+ * Constructor.
+ *
+ * @param view The parent Script Pad view. Must not be <code>null</code>.
+ */
+ public PasteAction(ScriptPad view) {
+ super();
+
+ Assert.isNotNull(view);
+ this.view = view;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.action.Action#run()
+ */
+ @Override
+ public void run() {
+ if (view.getStyledText() == null || view.getStyledText().isDisposed()) return;
+ view.getStyledText().paste();
+ view.updateActionEnablements();
+ }
+
+ /**
+ * Updates the actions enabled state.
+ */
+ public void updateEnabledState() {
+ boolean canPaste = false;
+ if (view.getStyledText() != null && view.getStyledText().getEditable()) {
+ Clipboard clipboard = new Clipboard(view.getStyledText().getDisplay());
+ TransferData[] td = clipboard.getAvailableTypes();
+ for (int i = 0; i < td.length; ++i) {
+ if (TextTransfer.getInstance().isSupportedType(td[i])) {
+ canPaste = true;
+ break;
+ }
+ }
+
+ clipboard.dispose();
+ }
+
+ setEnabled(canPaste);
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/PeerAction.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/PeerAction.java
new file mode 100644
index 000000000..843667a64
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/PeerAction.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.ui.views.scriptpad.actions;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.action.Action;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.tcf.ui.navigator.LabelProviderDelegate;
+import org.eclipse.tcf.te.tcf.ui.views.scriptpad.ScriptPad;
+import org.eclipse.ui.IViewPart;
+
+/**
+ * Peer toggle action implementation.
+ */
+public class PeerAction extends Action {
+ // Static reference to a label provider delegate providing the action label and image
+ private final static LabelProviderDelegate delegate = new LabelProviderDelegate();
+
+ // Reference to the peer model
+ private IPeerModel peerModel;
+ // Reference to the parent view part
+ private IViewPart view;
+
+ /**
+ * Constructor.
+ *
+ * @param view The parent view part. Must not be <code>null</code>.
+ * @param peerModel The peer model. Must not be <code>null</code>.
+ */
+ public PeerAction(IViewPart view, IPeerModel peerModel) {
+ super("", AS_CHECK_BOX); //$NON-NLS-1$
+
+ Assert.isNotNull(peerModel);
+ this.peerModel = peerModel;
+
+ String label = delegate.getText(peerModel);
+ if (label != null) {
+ setText(delegate.decorateText(label, peerModel));
+ }
+
+ Assert.isNotNull(view);
+ this.view = view;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.action.Action#run()
+ */
+ @Override
+ public void run() {
+ setChecked(true);
+
+ // Pass on the selected peer model to the parent view
+ if (view instanceof ScriptPad) {
+ ((ScriptPad)view).setPeerModel(peerModel);
+ }
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/PeersSubMenuAction.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/PeersSubMenuAction.java
new file mode 100644
index 000000000..396441d1d
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/PeersSubMenuAction.java
@@ -0,0 +1,224 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.ui.views.scriptpad.actions;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.ActionContributionItem;
+import org.eclipse.jface.action.ContributionItem;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.IMenuCreator;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.swt.events.MenuAdapter;
+import org.eclipse.swt.events.MenuEvent;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.MenuItem;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.te.tcf.locator.interfaces.IModelListener;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.ILocatorModel;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.tcf.locator.listener.ModelAdapter;
+import org.eclipse.tcf.te.tcf.locator.model.Model;
+import org.eclipse.tcf.te.tcf.ui.views.scriptpad.ScriptPad;
+import org.eclipse.ui.IActionDelegate2;
+import org.eclipse.ui.IViewActionDelegate;
+import org.eclipse.ui.IViewPart;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.IWorkbenchWindowPulldownDelegate2;
+import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
+
+/**
+ * Peers selection sub menu action implementation.
+ */
+public class PeersSubMenuAction extends Action implements IMenuCreator, IViewActionDelegate, IActionDelegate2, IWorkbenchAction, IWorkbenchWindowPulldownDelegate2 {
+ // Reference to the action proxy
+ /* default */ IAction actionProxy;
+ // Reference to the locator model listener
+ /* default */ IModelListener listener;
+
+ // Parent view part
+ /* default */ IViewPart view;
+
+ /**
+ * Constructor.
+ */
+ public PeersSubMenuAction() {
+ super();
+
+ // Create and register the locator model listener
+ listener = new ModelAdapter() {
+ @Override
+ public void locatorModelChanged(ILocatorModel model, IPeerModel peer, boolean added) {
+ // Re-evaluate the enablement
+ if (actionProxy != null) {
+ IPeerModel[] peers = Model.getModel().getPeers();
+ actionProxy.setEnabled(peers != null && peers.length > 0);
+
+ // If the peer is not set to the view yet, but the action get's
+ // enabled, than force the first peer in the list to be the selected one.
+ if (actionProxy.isEnabled() && view instanceof ScriptPad && ((ScriptPad)view).getPeerModel() == null) {
+ ((ScriptPad)view).setPeerModel(peers[0]);
+ }
+ }
+ }
+ };
+
+ Protocol.invokeLater(new Runnable() {
+ @Override
+ public void run() {
+ Model.getModel().addListener(listener);
+ }
+ });
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#init(org.eclipse.ui.IWorkbenchWindow)
+ */
+ @Override
+ public void init(IWorkbenchWindow window) {
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IViewActionDelegate#init(org.eclipse.ui.IViewPart)
+ */
+ @Override
+ public void init(IViewPart view) {
+ this.view = view;
+ // If the action proxy is already set, it means that the init(IAction)
+ // has been called before. Re-trigger the action enablement.
+ if (actionProxy != null) {
+ listener.locatorModelChanged(Model.getModel(), null, false);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IActionDelegate2#init(org.eclipse.jface.action.IAction)
+ */
+ @Override
+ public void init(IAction action) {
+ this.actionProxy = action;
+ if (action != null) {
+ action.setMenuCreator(this);
+
+ // Determine the enablement. The action is disabled
+ // if no peers are available.
+ IPeerModel[] peers = Model.getModel().getPeers();
+ if (peers != null && peers.length > 0) {
+ action.setEnabled(true);
+ if (view instanceof ScriptPad) ((ScriptPad)view).setPeerModel(peers[0]);
+ } else {
+ action.setEnabled(false);
+ if (view instanceof ScriptPad) ((ScriptPad)view).setPeerModel(null);
+ }
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
+ */
+ @Override
+ public void run(IAction action) {
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IActionDelegate2#runWithEvent(org.eclipse.jface.action.IAction, org.eclipse.swt.widgets.Event)
+ */
+ @Override
+ public void runWithEvent(IAction action, Event event) {
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
+ */
+ @Override
+ public void selectionChanged(IAction action, ISelection selection) {
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.action.IMenuCreator#dispose()
+ */
+ @Override
+ public void dispose() {
+ if (listener != null) {
+ Protocol.invokeLater(new Runnable() {
+ @Override
+ public void run() {
+ Model.getModel().removeListener(listener);
+ listener = null;
+ }
+ });
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.action.IMenuCreator#getMenu(org.eclipse.swt.widgets.Control)
+ */
+ @Override
+ public Menu getMenu(Control parent) {
+ Menu menu = new Menu(parent);
+ return getSubMenu(menu);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.action.IMenuCreator#getMenu(org.eclipse.swt.widgets.Menu)
+ */
+ @Override
+ public Menu getMenu(Menu parent) {
+ Menu menu = new Menu(parent);
+ return getSubMenu(menu);
+ }
+
+ /*
+ * Create the new sub menu.
+ */
+ private Menu getSubMenu(Menu menu) {
+ menu.addMenuListener(new MenuAdapter() {
+ /* (non-Javadoc)
+ * @see org.eclipse.swt.events.MenuAdapter#menuShown(org.eclipse.swt.events.MenuEvent)
+ */
+ @Override
+ public void menuShown(MenuEvent e) {
+ ContributionItem item;
+ // dispose all "old" menu items before fill up the menu with new ones
+ Menu m = (Menu)e.widget;
+ MenuItem[] items = m.getItems();
+ for (MenuItem item2 : items) {
+ item2.dispose();
+ }
+
+ // Get the selected peer model
+ IPeerModel selected = null;
+ if (view instanceof ScriptPad) selected = ((ScriptPad)view).getPeerModel();
+
+ boolean selectFirst = selected == null;
+
+ IPeerModel[] peers = Model.getModel().getPeers();
+ if (peers != null && peers.length > 0) {
+ for (IPeerModel peer : peers) {
+ Action action = new PeerAction(view, peer);
+ if (selectFirst) {
+ action.setChecked(true);
+ selectFirst = false;
+ if (view instanceof ScriptPad) ((ScriptPad)view).setPeerModel(peer);
+ } else if (selected != null && selected.equals(peer)) {
+ action.setChecked(true);
+ if (view instanceof ScriptPad) ((ScriptPad)view).setPeerModel(peer);
+ }
+ item = new ActionContributionItem(action);
+ item.fill(m, -1);
+ }
+ }
+ }
+ });
+
+ return menu;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/PlayAction.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/PlayAction.java
new file mode 100644
index 000000000..a2d5fc9af
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/PlayAction.java
@@ -0,0 +1,185 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.ui.views.scriptpad.actions;
+
+import java.util.concurrent.atomic.AtomicReference;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.te.runtime.callback.Callback;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.runtime.properties.PropertiesContainer;
+import org.eclipse.tcf.te.runtime.statushandler.StatusHandlerManager;
+import org.eclipse.tcf.te.runtime.statushandler.interfaces.IStatusHandler;
+import org.eclipse.tcf.te.runtime.statushandler.interfaces.IStatusHandlerConstants;
+import org.eclipse.tcf.te.tcf.core.scripting.interfaces.IScriptLauncherProperties;
+import org.eclipse.tcf.te.tcf.core.scripting.launcher.ScriptLauncher;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.tcf.ui.views.help.IContextHelpIds;
+import org.eclipse.tcf.te.tcf.ui.views.nls.Messages;
+import org.eclipse.tcf.te.tcf.ui.views.scriptpad.ScriptPad;
+import org.eclipse.ui.IActionDelegate2;
+import org.eclipse.ui.IPropertyListener;
+import org.eclipse.ui.IViewActionDelegate;
+import org.eclipse.ui.IViewPart;
+import org.eclipse.ui.IWorkbenchPartConstants;
+
+/**
+ * Play script action implementation.
+ */
+public class PlayAction extends Action implements IViewActionDelegate, IActionDelegate2 {
+ // Reference to the action proxy
+ /* default */ IAction actionProxy;
+ // Parent view part
+ /* default */ IViewPart view;
+
+ // Reference to the view property listener
+ private IPropertyListener listener;
+
+ // Flag to remember if a script is currently running
+ /* default */ boolean running;
+
+ /**
+ * Constructor.
+ */
+ public PlayAction() {
+ super();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IViewActionDelegate#init(org.eclipse.ui.IViewPart)
+ */
+ @Override
+ public void init(IViewPart view) {
+ this.view = view;
+
+ if (listener == null) {
+ listener = new IPropertyListener() {
+ @Override
+ public void propertyChanged(Object source, int propId) {
+ if (IWorkbenchPartConstants.PROP_INPUT == propId && actionProxy != null) {
+ // Update the action enablement
+ boolean enabled = false;
+ if (PlayAction.this.view instanceof ScriptPad) enabled = ((ScriptPad)PlayAction.this.view).getPeerModel() != null;
+ actionProxy.setEnabled(enabled && !running);
+ }
+ }
+ };
+ view.addPropertyListener(listener);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IActionDelegate2#init(org.eclipse.jface.action.IAction)
+ */
+ @Override
+ public void init(IAction action) {
+ this.actionProxy = action;
+ if (action != null) {
+ boolean enabled = false;
+ if (view instanceof ScriptPad) enabled = ((ScriptPad)view).getPeerModel() != null;
+ action.setEnabled(enabled && !running);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.action.Action#run()
+ */
+ @Override
+ public void run() {
+ String script = null;
+ IPeerModel peerModel = null;
+
+ if (view instanceof ScriptPad && ((ScriptPad)view).getStyledText() != null) {
+ script = ((ScriptPad)view).getStyledText().getText();
+ peerModel = ((ScriptPad)view).getPeerModel();
+ }
+
+ if (script != null && !"".equals(script) && peerModel != null) { //$NON-NLS-1$
+ final ScriptLauncher launcher = new ScriptLauncher();
+
+ IPropertiesContainer properties = new PropertiesContainer();
+ properties.setProperty(IScriptLauncherProperties.PROP_SCRIPT, script);
+
+ final AtomicReference<IPeer> peer = new AtomicReference<IPeer>();
+ final IPeerModel finPeerModel = peerModel;
+ Runnable runnable = new Runnable() {
+ @Override
+ public void run() {
+ peer.set(finPeerModel.getPeer());
+ }
+ };
+ if (Protocol.isDispatchThread()) runnable.run();
+ else Protocol.invokeAndWait(runnable);
+
+ running = true;
+
+ launcher.launch(peer.get(), properties, new Callback() {
+ @Override
+ protected void internalDone(Object caller, IStatus status) {
+ running = false;
+ launcher.dispose();
+
+ boolean enabled = false;
+ if (PlayAction.this.view instanceof ScriptPad) enabled = ((ScriptPad)PlayAction.this.view).getPeerModel() != null;
+ actionProxy.setEnabled(enabled && !running);
+
+ if (status != null && (status.getSeverity() == IStatus.ERROR || status.getSeverity() == IStatus.WARNING)) {
+ IStatusHandler[] handler = StatusHandlerManager.getInstance().getHandler(view);
+ if (handler != null && handler.length > 0) {
+ IPropertiesContainer data = new PropertiesContainer();
+ data.setProperty(IStatusHandlerConstants.PROPERTY_TITLE, Messages.ScriptPad_error_title);
+ data.setProperty(IStatusHandlerConstants.PROPERTY_CONTEXT_HELP_ID, IContextHelpIds.SCRIPT_PAD_ERROR_PLAY_FAILED);
+ data.setProperty(IStatusHandlerConstants.PROPERTY_CALLER, view);
+
+ handler[0].handleStatus(status, data, null);
+ }
+ }
+ }
+ });
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
+ */
+ @Override
+ public void run(IAction action) {
+ run();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IActionDelegate2#runWithEvent(org.eclipse.jface.action.IAction, org.eclipse.swt.widgets.Event)
+ */
+ @Override
+ public void runWithEvent(IAction action, Event event) {
+ runWithEvent(event);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
+ */
+ @Override
+ public void selectionChanged(IAction action, ISelection selection) {
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IActionDelegate2#dispose()
+ */
+ @Override
+ public void dispose() {
+ if (listener != null) view.removePropertyListener(listener);
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/SelectAllAction.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/SelectAllAction.java
new file mode 100644
index 000000000..2f4545070
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/SelectAllAction.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.ui.views.scriptpad.actions;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.action.Action;
+import org.eclipse.tcf.te.tcf.ui.views.scriptpad.ScriptPad;
+
+/**
+ * Script Pad select all action handler implementation.
+ */
+public class SelectAllAction extends Action {
+ // Reference to the parent view
+ private final ScriptPad view;
+
+ /**
+ * Constructor.
+ *
+ * @param view The parent Script Pad view. Must not be <code>null</code>.
+ */
+ public SelectAllAction(ScriptPad view) {
+ super();
+
+ Assert.isNotNull(view);
+ this.view = view;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.action.Action#run()
+ */
+ @Override
+ public void run() {
+ if (view.getStyledText() == null || view.getStyledText().isDisposed()) return;
+ view.getStyledText().selectAll();
+ view.updateActionEnablements();
+ }
+
+ /**
+ * Updates the actions enabled state.
+ */
+ public void updateEnabledState() {
+ setEnabled(view.getStyledText() != null && view.getStyledText().getCharCount() > 0);
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/console/Console.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/console/Console.java
new file mode 100644
index 000000000..65b3d7fb8
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/console/Console.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.ui.views.scriptpad.console;
+
+import org.eclipse.tcf.te.tcf.ui.console.AbstractConsole;
+import org.eclipse.tcf.te.tcf.ui.views.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.ui.views.help.IContextHelpIds;
+import org.eclipse.tcf.te.tcf.ui.views.internal.ImageConsts;
+import org.eclipse.tcf.te.tcf.ui.views.nls.Messages;
+
+/**
+ * Script Pad console implementation.
+ */
+public class Console extends AbstractConsole {
+
+ /**
+ * Constructor.
+ */
+ public Console() {
+ super(Messages.ScriptPad_Console_name, UIPlugin.getImageDescriptor(ImageConsts.SCRIPT_PAD_CONSOLE));
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.console.AbstractConsole#getHelpContextId()
+ */
+ @Override
+ public String getHelpContextId() {
+ return IContextHelpIds.SCRIPT_PAD_CONSOLE;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/console/Factory.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/console/Factory.java
new file mode 100644
index 000000000..47f486f7b
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/console/Factory.java
@@ -0,0 +1,86 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.ui.views.scriptpad.console;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.ui.console.ConsolePlugin;
+import org.eclipse.ui.console.IConsole;
+import org.eclipse.ui.console.IConsoleFactory;
+import org.eclipse.ui.console.IConsoleManager;
+
+/**
+ * Script Pad console factory implementation.
+ */
+public class Factory implements IConsoleFactory {
+ // Reference to the console
+ private static Console console;
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.console.IConsoleFactory#openConsole()
+ */
+ @Override
+ public void openConsole() {
+ showConsole();
+ }
+
+ /**
+ * Checks if the given console is already added to the console manager.
+ *
+ * @param console The console. Must not be <code>null</code>.
+ * @return <code>True</code> if the console exist, <code>false</code> otherwise.
+ */
+ private static boolean isConsoleAlreadyAdded(IConsole console) {
+ Assert.isNotNull(console);
+ // Assume the console to be not yet added
+ boolean alreadyAdded = false;
+ // Check all consoles if it is the same instance as the passed in one
+ for (IConsole candidate : ConsolePlugin.getDefault().getConsoleManager().getConsoles()) {
+ if (candidate == console) {
+ alreadyAdded = true;
+ break;
+ }
+ }
+ return alreadyAdded;
+ }
+
+ /**
+ * Shows the Script Pad console.
+ */
+ public static void showConsole() {
+ // Create a new console if not yet created
+ if (console == null) console = new Console();
+
+ // Get the console manager
+ IConsoleManager manager = ConsolePlugin.getDefault().getConsoleManager();
+ // Add the console to the manager if not yet done
+ if (!isConsoleAlreadyAdded(console)) manager.addConsoles(new IConsole[] {console});
+ // Show the console view with the TCF communication monitor console
+ manager.showConsoleView(console);
+ }
+
+ /**
+ * Returns the Script Pad console.
+ *
+ * @return The Script Pad console or <code>null</code>.
+ */
+ public static Console getConsole() {
+ return console;
+ }
+
+ /**
+ * Shutdown the Script Pad console.
+ */
+ public static void shutdownConsole() {
+ if (console != null) {
+ console.shutdown();
+ console = null;
+ }
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/events/EventListener.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/events/EventListener.java
new file mode 100644
index 000000000..5dc14fa9a
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/events/EventListener.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.ui.views.scriptpad.events;
+
+import java.util.EventObject;
+
+import org.eclipse.tcf.te.tcf.core.scripting.events.ScriptEvent;
+import org.eclipse.tcf.te.tcf.ui.views.scriptpad.console.Console;
+import org.eclipse.tcf.te.tcf.ui.views.scriptpad.console.Factory;
+import org.eclipse.tcf.te.ui.events.AbstractEventListener;
+
+/**
+ * Script Pad console event listener
+ */
+public class EventListener extends AbstractEventListener {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.interfaces.events.IEventListener#eventFired(java.util.EventObject)
+ */
+ @Override
+ public void eventFired(EventObject event) {
+ if (event instanceof ScriptEvent) {
+ ScriptEvent scriptEvent = (ScriptEvent)event;
+
+ // Get the event type
+ ScriptEvent.Type type = scriptEvent.getType();
+
+ switch (type) {
+ case START:
+ Factory.showConsole();
+ break;
+ case OUTPUT:
+ Console console = Factory.getConsole();
+ if (console != null) {
+ ScriptEvent.Message message = scriptEvent.getMessage();
+ if (message != null) console.appendMessage(message.type, message.text);
+ }
+ break;
+ case STOP:
+ break;
+ }
+ }
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui/.classpath b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/.classpath
index 8a8f1668c..8a8f1668c 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui/.classpath
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/.classpath
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/.project b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/.project
index 733b9827d..673c58a93 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/.project
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/.project
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.eclipse.tm.te.tcf.ui</name>
+ <name>org.eclipse.tcf.te.tcf.ui</name>
<comment></comment>
<projects>
</projects>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/.settings/org.eclipse.jdt.core.prefs b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/.settings/org.eclipse.jdt.core.prefs
index cc849d463..cc849d463 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/.settings/org.eclipse.jdt.core.prefs
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/.settings/org.eclipse.jdt.core.prefs
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/.settings/org.eclipse.jdt.ui.prefs b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/.settings/org.eclipse.jdt.ui.prefs
index af93ddefb..af93ddefb 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/.settings/org.eclipse.jdt.ui.prefs
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/.settings/org.eclipse.jdt.ui.prefs
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..437bdd039
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/META-INF/MANIFEST.MF
@@ -0,0 +1,43 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.tcf.te.tcf.ui;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipse.tcf.te.tcf.ui.activator.UIPlugin
+Bundle-Vendor: %providerName
+Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
+ org.eclipse.ui;bundle-version="3.7.0",
+ org.eclipse.ui.forms;bundle-version="3.5.100",
+ org.eclipse.ui.navigator;bundle-version="3.5.100",
+ org.eclipse.tcf.core;bundle-version="1.0.0",
+ org.eclipse.tcf.te.ui;bundle-version="1.0.0",
+ org.eclipse.tcf.te.ui.controls;bundle-version="1.0.0",
+ org.eclipse.tcf.te.ui.forms;bundle-version="1.0.0",
+ org.eclipse.tcf.te.ui.swt;bundle-version="1.0.0",
+ org.eclipse.tcf.te.ui.views;bundle-version="1.0.0",
+ org.eclipse.tcf.te.runtime;bundle-version="1.0.0",
+ org.eclipse.tcf.te.runtime.persistence;bundle-version="1.0.0",
+ org.eclipse.tcf.te.runtime.services;bundle-version="1.0.0",
+ org.eclipse.tcf.te.runtime.statushandler;bundle-version="1.0.0",
+ org.eclipse.tcf.te.tcf.core;bundle-version="1.0.0",
+ org.eclipse.tcf.te.tcf.core.scripting;bundle-version="1.0.0",
+ org.eclipse.tcf.te.tcf.locator;bundle-version="1.0.0",
+ org.eclipse.tcf.te.tcf.log.core;bundle-version="1.0.0",
+ org.eclipse.ui.views.properties.tabbed;bundle-version="3.5.200"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
+Bundle-Localization: plugin
+Export-Package: org.eclipse.tcf.te.tcf.ui.activator;x-internal:=true,
+ org.eclipse.tcf.te.tcf.ui.controls,
+ org.eclipse.tcf.te.tcf.ui.dialogs,
+ org.eclipse.tcf.te.tcf.ui.editor,
+ org.eclipse.tcf.te.tcf.ui.filter,
+ org.eclipse.tcf.te.tcf.ui.handler,
+ org.eclipse.tcf.te.tcf.ui.help,
+ org.eclipse.tcf.te.tcf.ui.internal;x-internal:=true,
+ org.eclipse.tcf.te.tcf.ui.navigator,
+ org.eclipse.tcf.te.tcf.ui.navigator.images,
+ org.eclipse.tcf.te.tcf.ui.navigator.nodes,
+ org.eclipse.tcf.te.tcf.ui.nls,
+ org.eclipse.tcf.te.tcf.ui.preferences,
+ org.eclipse.tcf.te.tcf.ui.wizards
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/build.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/build.properties
index d24082bdb..d24082bdb 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/build.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/build.properties
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/icons/dlcl16/newTarget_wiz.gif b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/icons/dlcl16/newTarget_wiz.gif
index fd7af8403..fd7af8403 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/icons/dlcl16/newTarget_wiz.gif
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/icons/dlcl16/newTarget_wiz.gif
Binary files differ
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/icons/elcl16/newTarget_wiz.gif b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/icons/elcl16/newTarget_wiz.gif
index 5b0b25fbe..5b0b25fbe 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/icons/elcl16/newTarget_wiz.gif
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/icons/elcl16/newTarget_wiz.gif
Binary files differ
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/icons/obj16/discovery_root.gif b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/icons/obj16/discovery_root.gif
new file mode 100644
index 000000000..80e538f9f
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/icons/obj16/discovery_root.gif
Binary files differ
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/icons/obj16/peer.gif b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/icons/obj16/peer.gif
new file mode 100644
index 000000000..e9df7b871
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/icons/obj16/peer.gif
Binary files differ
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/icons/obj16/rootNode_obj.gif b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/icons/obj16/rootNode_obj.gif
index f1bf387e1..f1bf387e1 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/icons/obj16/rootNode_obj.gif
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/icons/obj16/rootNode_obj.gif
Binary files differ
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/icons/ovr16/gold_ovr.gif b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/icons/ovr16/gold_ovr.gif
index a05073c2f..a05073c2f 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/icons/ovr16/gold_ovr.gif
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/icons/ovr16/gold_ovr.gif
Binary files differ
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/icons/ovr16/green_ovr.gif b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/icons/ovr16/green_ovr.gif
index 35ed218ad..35ed218ad 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/icons/ovr16/green_ovr.gif
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/icons/ovr16/green_ovr.gif
Binary files differ
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/icons/ovr16/grey_ovr.gif b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/icons/ovr16/grey_ovr.gif
index 3f5fb9f6f..3f5fb9f6f 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/icons/ovr16/grey_ovr.gif
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/icons/ovr16/grey_ovr.gif
Binary files differ
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/icons/ovr16/redX_ovr.gif b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/icons/ovr16/redX_ovr.gif
index 8fa687bb2..8fa687bb2 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/icons/ovr16/redX_ovr.gif
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/icons/ovr16/redX_ovr.gif
Binary files differ
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/icons/ovr16/red_ovr.gif b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/icons/ovr16/red_ovr.gif
index ea5aaa545..ea5aaa545 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/icons/ovr16/red_ovr.gif
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/icons/ovr16/red_ovr.gif
Binary files differ
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/plugin.properties
index 0fb07dd50..e33a937d5 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/plugin.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/plugin.properties
@@ -13,21 +13,25 @@ providerName = Eclipse.org
# ***** Filter *****
-UnreachablePeersFilter.name=Unreachable TCF Targets
+UnreachablePeersFilter.name=Unreachable Peers
+RedirectPeersFilter.name=Redirected Peers (Root Level)
# ***** Wizards *****
-NewWizards.category.name=Target Communication Framework (TCF)
+NewWizards.category.name=Target Communication Framework
NewTargetWizard.name=Peer
NewTargetWizard.description=Specify the attributes of the peer to connect to.
# ***** Editor Pages *****
-NodePropertiesEditorPage.name=General
+OverviewEditorPage.name=Overview
+
+# ***** Preference and Property Pages *****
+
+preference.page.name = Logging
# ***** Command Contributions *****
-command.category.name=Target Explorer Commands (TCF)
command.refresh.name=Refresh Command
command.refresh.label=Re&fresh
@@ -35,3 +39,14 @@ command.refresh.tooltip=Refresh
command.delete.label=&Delete
command.delete.tooltip=Delete
+
+command.redirect.name=Redirect Command
+command.redirect.label=Re&direct...
+command.redirect.tooltip=Redirect communication to this peer through a proxy
+
+command.resetredirect.name=Reset Redirect Command
+command.resetredirect.label=Re&set Redirect
+command.resetredirect.tooltip=Reset communication redirection of this peer
+
+navigatorContent.name = Dynamic Target Discovery
+propertyTab.general.label = General
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/plugin.xml b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/plugin.xml
new file mode 100644
index 000000000..0d27d7524
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/plugin.xml
@@ -0,0 +1,350 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+
+<!-- Event listener contributions -->
+ <extension point="org.eclipse.tcf.te.runtime.eventListeners">
+ <eventListener
+ class="org.eclipse.tcf.te.tcf.ui.navigator.EventListener">
+ <eventSourceType
+ bundleId="org.eclipse.tcf.te.tcf.locator"
+ class="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel">
+ </eventSourceType>
+ </eventListener>
+ </extension>
+
+<!-- Common navigator contributions -->
+ <extension point="org.eclipse.ui.navigator.viewer">
+ <viewerContentBinding viewerId="org.eclipse.tcf.te.ui.views.TargetExplorer">
+ <includes>
+ <contentExtension
+ isRoot="true"
+ pattern="org.eclipse.tcf.te.tcf.ui.navigator.*"/>
+ </includes>
+ </viewerContentBinding>
+ </extension>
+
+ <extension point="org.eclipse.ui.navigator.navigatorContent">
+ <navigatorContent
+ activeByDefault="true"
+ contentProvider="org.eclipse.tcf.te.tcf.ui.navigator.ContentProviderDelegate"
+ icon="icons/obj16/rootNode_obj.gif"
+ id="org.eclipse.tcf.te.tcf.ui.navigator.content"
+ labelProvider="org.eclipse.tcf.te.tcf.ui.navigator.LabelProvider"
+ name="%navigatorContent.name"
+ priority="normal">
+ <enablement>
+ <or>
+ <instanceof value="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel"/>
+ <instanceof value="org.eclipse.tcf.te.tcf.ui.navigator.nodes.PeerRedirectorGroupNode"/>
+ </or>
+ </enablement>
+ <commonSorter
+ class="org.eclipse.tcf.te.ui.trees.TreeViewerSorter"
+ id="org.eclipse.tcf.te.tcf.ui.navigator.sorter"/>
+ <commonWizard
+ type="new"
+ wizardId="org.eclipse.tcf.te.tcf.ui.wizards.NewTargetWizard">
+ <enablement>
+ <instanceof value="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel"/>
+ </enablement>
+ </commonWizard>
+ </navigatorContent>
+ <commonFilter
+ activeByDefault="false"
+ class="org.eclipse.tcf.te.tcf.ui.filter.UnreachablePeersFilter"
+ id="org.eclipse.tcf.te.tcf.ui.navigator.UnreachablePeersFilter"
+ name="%UnreachablePeersFilter.name"
+ visibleInUI="true">
+ </commonFilter>
+ <commonFilter
+ activeByDefault="true"
+ class="org.eclipse.tcf.te.tcf.ui.filter.RedirectPeersFilter"
+ id="org.eclipse.tcf.te.tcf.ui.navigator.RedirectPeersFilter"
+ name="%RedirectPeersFilter.name"
+ visibleInUI="false">
+ </commonFilter>
+ </extension>
+
+<!-- New target wizard contributions -->
+ <extension point="org.eclipse.tcf.te.ui.newWizards">
+ <category
+ id="org.eclipse.tcf.te.tcf.ui.newWizards.category"
+ name="%NewWizards.category.name">
+ </category>
+ <wizard
+ canFinishEarly="true"
+ category="org.eclipse.tcf.te.tcf.ui.newWizards.category"
+ class="org.eclipse.tcf.te.tcf.ui.wizards.NewTargetWizard"
+ hasPages="false"
+ icon="icons/elcl16/newTarget_wiz.gif"
+ id="org.eclipse.tcf.te.tcf.ui.wizards.NewTargetWizard"
+ name="%NewTargetWizard.name">
+ <description>
+ %NewTargetWizard.description
+ </description>
+ </wizard>
+ </extension>
+
+<!-- Editor page contributions -->
+ <extension point="org.eclipse.tcf.te.ui.views.editorPages">
+ <editorPage
+ class="org.eclipse.tcf.te.tcf.ui.editor.OverviewEditorPage"
+ name="%OverviewEditorPage.name"
+ id="org.eclipse.tcf.te.tcf.ui.OverviewEditorPage">
+ </editorPage>
+ </extension>
+
+<!-- Editor page binding contributions -->
+ <extension point="org.eclipse.tcf.te.ui.views.editorPageBindings">
+ <editorPageBinding
+ id="org.eclipse.tcf.te.tcf.ui.binding.OverviewEditorPage"
+ pageId="org.eclipse.tcf.te.tcf.ui.OverviewEditorPage"
+ insertBefore="first">
+ <enablement>
+ <with variable="activeEditorInput">
+ <instanceof value="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel"/>
+ </with>
+ </enablement>
+ </editorPageBinding>
+ </extension>
+
+<!-- Preference page contributions -->
+ <extension point="org.eclipse.ui.preferencePages">
+ <page
+ category="org.eclipse.tcf.te.ui.preferences.general"
+ class="org.eclipse.tcf.te.tcf.ui.preferences.LoggingPreferencePage"
+ id="org.eclipse.tcf.te.ui.preferences.tcf.logging"
+ name="%preference.page.name">
+ </page>
+ </extension>
+
+<!-- Menu contributions -->
+ <extension point="org.eclipse.ui.menus">
+ <menuContribution locationURI="popup:org.eclipse.tcf.te.ui.views.TargetExplorer#Popup?after=group.refresh">
+ <command
+ commandId="org.eclipse.tcf.te.tcf.ui.command.refresh"
+ disabledIcon="platform:/plugin/org.eclipse.ui/icons/full/dlcl16/refresh_nav.gif"
+ helpContextId="org.eclipse.tcf.te.tcf.ui.command_Refresh"
+ icon="platform:/plugin/org.eclipse.ui/icons/full/elcl16/refresh_nav.gif"
+ id="org.eclipse.tcf.te.tcf.ui.commands.refresh"
+ label="%command.refresh.label"
+ style="push"
+ tooltip="%command.refresh.tooltip">
+ <visibleWhen checkEnabled="false">
+ <with variable="selection">
+ <count value="+"/>
+ <iterate operator="and" ifEmpty="false">
+ <instanceof value="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel"/>
+ </iterate>
+ </with>
+ </visibleWhen>
+ </command>
+ <separator name="operationsGroupMarker" visible="true"/>
+ </menuContribution>
+
+ <menuContribution locationURI="popup:org.eclipse.tcf.te.ui.views.TargetExplorer#Popup?after=group.delete">
+ <command
+ commandId="org.eclipse.ui.edit.delete"
+ disabledIcon="platform:/plugin/org.eclipse.ui/icons/full/dtool16/delete.gif"
+ helpContextId="org.eclipse.tcf.te.tcf.ui.command_Delete"
+ icon="platform:/plugin/org.eclipse.ui/icons/full/etool16/delete.gif"
+ id="org.eclipse.tcf.te.tcf.ui.commands.delete"
+ label="%command.delete.label"
+ style="push"
+ tooltip="%command.delete.tooltip">
+ <visibleWhen checkEnabled="false">
+ <with variable="selection">
+ <count value="+"/>
+ <iterate operator="and" ifEmpty="false">
+ <and>
+ <instanceof value="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel"/>
+ <test property="org.eclipse.tcf.te.tcf.locator.isStaticPeer" value="true"/>
+ </and>
+ </iterate>
+ </with>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+
+ <menuContribution locationURI="popup:org.eclipse.tcf.te.ui.views.TargetExplorer#Popup?after=group.redirect">
+ <command
+ commandId="org.eclipse.tcf.te.tcf.ui.command.redirect"
+ helpContextId="org.eclipse.tcf.te.tcf.ui.command_Redirect"
+ id="org.eclipse.tcf.te.tcf.ui.commands.redirect"
+ label="%command.redirect.label"
+ style="push"
+ tooltip="%command.redirect.tooltip">
+ <visibleWhen checkEnabled="false">
+ <with variable="selection">
+ <count value="+"/>
+ <iterate operator="and" ifEmpty="false">
+ <and>
+ <instanceof value="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel"/>
+ <test property="org.eclipse.tcf.te.tcf.locator.isStaticPeer" value="true"/>
+ </and>
+ </iterate>
+ </with>
+ </visibleWhen>
+ </command>
+
+ <command
+ commandId="org.eclipse.tcf.te.tcf.ui.command.resetredirect"
+ helpContextId="org.eclipse.tcf.te.tcf.ui.command_ResetRedirect"
+ id="org.eclipse.tcf.te.tcf.ui.commands.resetredirect"
+ label="%command.resetredirect.label"
+ style="push"
+ tooltip="%command.resetredirect.tooltip">
+ <visibleWhen checkEnabled="false">
+ <with variable="selection">
+ <count value="+"/>
+ <iterate operator="and" ifEmpty="false">
+ <and>
+ <instanceof value="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel"/>
+ <test property="org.eclipse.tcf.te.tcf.locator.isStaticPeer" value="true"/>
+ </and>
+ </iterate>
+ </with>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ </extension>
+
+<!-- Command contributions -->
+ <extension point="org.eclipse.ui.commands">
+ <command
+ categoryId="org.eclipse.tcf.te.ui.commands.category"
+ helpContextId="org.eclipse.tcf.te.tcf.ui.command_Refresh"
+ id="org.eclipse.tcf.te.tcf.ui.command.refresh"
+ name="%command.refresh.name">
+ </command>
+ <command
+ categoryId="org.eclipse.tcf.te.ui.commands.category"
+ helpContextId="org.eclipse.tcf.te.tcf.ui.command_Redirect"
+ id="org.eclipse.tcf.te.tcf.ui.command.redirect"
+ name="%command.redirect.name">
+ </command>
+ <command
+ categoryId="org.eclipse.tcf.te.ui.commands.category"
+ helpContextId="org.eclipse.tcf.te.tcf.ui.command_ResetRedirect"
+ id="org.eclipse.tcf.te.tcf.ui.command.resetredirect"
+ name="%command.resetredirect.name">
+ </command>
+ </extension>
+
+<!-- Handler contributions -->
+ <extension point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.tcf.te.tcf.ui.handler.RefreshHandler"
+ commandId="org.eclipse.tcf.te.tcf.ui.command.refresh">
+ <activeWhen>
+ <reference definitionId="te.expressions.tcf.peerModel.handlerActivation"/>
+ </activeWhen>
+ </handler>
+
+ <handler
+ class="org.eclipse.tcf.te.tcf.ui.handler.DeleteHandler"
+ commandId="org.eclipse.ui.edit.delete">
+ <activeWhen>
+ <reference definitionId="te.expressions.tcf.peerModel.handlerActivation"/>
+ </activeWhen>
+ </handler>
+
+ <handler
+ class="org.eclipse.tcf.te.tcf.ui.handler.RedirectHandler"
+ commandId="org.eclipse.tcf.te.tcf.ui.command.redirect">
+ <activeWhen>
+ <reference definitionId="te.expressions.tcf.peerModel.handlerActivation"/>
+ </activeWhen>
+ <enabledWhen>
+ <with variable="selection">
+ <count value="1"/>
+ <iterate operator="and" ifEmpty="false">
+ <and>
+ <instanceof value="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel"/>
+ <test property="org.eclipse.tcf.te.tcf.locator.isRedirected" value="false"/>
+ </and>
+ </iterate>
+ </with>
+ </enabledWhen>
+ </handler>
+
+ <handler
+ class="org.eclipse.tcf.te.tcf.ui.handler.ResetRedirectHandler"
+ commandId="org.eclipse.tcf.te.tcf.ui.command.resetredirect">
+ <activeWhen>
+ <reference definitionId="te.expressions.tcf.peerModel.handlerActivation"/>
+ </activeWhen>
+ <enabledWhen>
+ <with variable="selection">
+ <count value="1"/>
+ <iterate operator="and" ifEmpty="false">
+ <and>
+ <instanceof value="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel"/>
+ <test property="org.eclipse.tcf.te.tcf.locator.isRedirected" value="true"/>
+ </and>
+ </iterate>
+ </with>
+ </enabledWhen>
+ </handler>
+ </extension>
+
+<!-- Reusable core expression fragments -->
+ <extension point="org.eclipse.core.expressions.definitions">
+
+ <!-- Expression to test if the active part is the Target Explorer and
+ the selection contains only elements of type IPeerModel.
+
+ This expression is for use in the handlers activeWhen markup.
+ -->
+ <definition id="te.expressions.tcf.peerModel.handlerActivation">
+ <and>
+ <with variable="activePartId">
+ <equals value="org.eclipse.tcf.te.ui.views.TargetExplorer"/>
+ </with>
+ <with variable="selection">
+ <count value="+"/>
+ <iterate operator="and" ifEmpty="false">
+ <instanceof value="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel"/>
+ </iterate>
+ </with>
+ </and>
+ </definition>
+ </extension>
+ <extension
+ point="org.eclipse.ui.views.properties.tabbed.propertyTabs">
+ <propertyTabs
+ contributorId="org.eclipse.tcf.te.ui">
+ <propertyTab
+ category="target_explorer"
+ id="org.eclipse.tcf.te.ui.views.propertyTab.peer.general"
+ label="%propertyTab.general.label">
+ </propertyTab>
+ </propertyTabs>
+ </extension>
+ <extension
+ point="org.eclipse.ui.views.properties.tabbed.propertySections">
+ <propertySections
+ contributorId="org.eclipse.tcf.te.ui">
+ <propertySection
+ class="org.eclipse.tcf.te.tcf.ui.internal.tabbed.PeerGeneralSection"
+ enablesFor="1"
+ id="org.eclipse.tcf.te.ui.views.propertysections.peer.general"
+ tab="org.eclipse.tcf.te.ui.views.propertyTab.peer.general">
+ <input
+ type="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel">
+ </input>
+ </propertySection>
+ </propertySections>
+ </extension>
+ <extension
+ point="org.eclipse.core.runtime.adapters">
+ <factory
+ adaptableType="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel"
+ class="org.eclipse.tcf.te.tcf.ui.internal.adapters.PeerModelAdapterFactory">
+ <adapter
+ type="org.eclipse.jface.viewers.ILabelProvider">
+ </adapter>
+ </factory>
+ </extension>
+</plugin>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime/pom.xml b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/pom.xml
index 2062c5d7b..51fbae0d6 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime/pom.xml
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/pom.xml
@@ -7,11 +7,11 @@
<parent>
<groupId>org.eclipse.tcf</groupId>
<artifactId>tcf-parent</artifactId>
- <version>0.5.0-SNAPSHOT</version>
+ <version>1.0.0-SNAPSHOT</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<version>1.0.0.qualifier</version>
- <artifactId>org.eclipse.tm.te.runtime</artifactId>
+ <artifactId>org.eclipse.tcf.te.tcf.ui</artifactId>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/activator/UIPlugin.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/activator/UIPlugin.java
index c95969bfe..0c0879b5e 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/activator/UIPlugin.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/activator/UIPlugin.java
@@ -7,15 +7,19 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.ui.activator;
+package org.eclipse.tcf.te.tcf.ui.activator;
import java.net.URL;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.swt.graphics.Image;
-import org.eclipse.tm.te.tcf.ui.internal.ImageConsts;
-import org.eclipse.tm.te.ui.jface.images.AbstractImageDescriptor;
+import org.eclipse.tcf.te.tcf.core.Tcf;
+import org.eclipse.tcf.te.tcf.ui.internal.ImageConsts;
+import org.eclipse.tcf.te.ui.jface.images.AbstractImageDescriptor;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchListener;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
@@ -26,6 +30,8 @@ import org.osgi.framework.BundleContext;
public class UIPlugin extends AbstractUIPlugin {
// The shared instance
private static UIPlugin plugin;
+ // The workbench listener instance
+ private IWorkbenchListener listener;
/**
* Constructor.
@@ -59,6 +65,21 @@ public class UIPlugin extends AbstractUIPlugin {
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
+
+ // Create and register the workbench listener instance
+ listener = new IWorkbenchListener() {
+
+ @Override
+ public boolean preShutdown(IWorkbench workbench, boolean forced) {
+ Tcf.getChannelManager().closeAll();
+ return true;
+ }
+
+ @Override
+ public void postShutdown(IWorkbench workbench) {
+ }
+ };
+ PlatformUI.getWorkbench().addWorkbenchListener(listener);
}
/* (non-Javadoc)
@@ -67,6 +88,7 @@ public class UIPlugin extends AbstractUIPlugin {
@Override
public void stop(BundleContext context) throws Exception {
plugin = null;
+ if (listener != null) { PlatformUI.getWorkbench().removeWorkbenchListener(listener); listener = null; }
super.stop(context);
}
@@ -75,8 +97,10 @@ public class UIPlugin extends AbstractUIPlugin {
*/
@Override
protected void initializeImageRegistry(ImageRegistry registry) {
- URL url = UIPlugin.getDefault().getBundle().getEntry(ImageConsts.IMAGE_DIR_ROOT + ImageConsts.IMAGE_DIR_OBJ + "target.gif"); //$NON-NLS-1$
- registry.put(ImageConsts.TARGET, ImageDescriptor.createFromURL(url));
+ URL url = UIPlugin.getDefault().getBundle().getEntry(ImageConsts.IMAGE_DIR_ROOT + ImageConsts.IMAGE_DIR_OBJ + "peer.gif"); //$NON-NLS-1$
+ registry.put(ImageConsts.PEER, ImageDescriptor.createFromURL(url));
+ url = UIPlugin.getDefault().getBundle().getEntry(ImageConsts.IMAGE_DIR_ROOT + ImageConsts.IMAGE_DIR_OBJ + "discovery_root.gif"); //$NON-NLS-1$
+ registry.put(ImageConsts.DISCOVERY_ROOT, ImageDescriptor.createFromURL(url));
url = UIPlugin.getDefault().getBundle().getEntry(ImageConsts.IMAGE_DIR_ROOT + ImageConsts.IMAGE_DIR_OVR + "gold_ovr.gif"); //$NON-NLS-1$
registry.put(ImageConsts.GOLD_OVR, ImageDescriptor.createFromURL(url));
@@ -88,6 +112,11 @@ public class UIPlugin extends AbstractUIPlugin {
registry.put(ImageConsts.RED_OVR, ImageDescriptor.createFromURL(url));
url = UIPlugin.getDefault().getBundle().getEntry(ImageConsts.IMAGE_DIR_ROOT + ImageConsts.IMAGE_DIR_OVR + "redX_ovr.gif"); //$NON-NLS-1$
registry.put(ImageConsts.RED_X_OVR, ImageDescriptor.createFromURL(url));
+
+ url = UIPlugin.getDefault().getBundle().getEntry(ImageConsts.IMAGE_DIR_ROOT + ImageConsts.IMAGE_DIR_DTOOL + "run_exc.gif"); //$NON-NLS-1$
+ registry.put(ImageConsts.RUN_DISABLED, ImageDescriptor.createFromURL(url));
+ url = UIPlugin.getDefault().getBundle().getEntry(ImageConsts.IMAGE_DIR_ROOT + ImageConsts.IMAGE_DIR_ETOOL + "run_exc.gif"); //$NON-NLS-1$
+ registry.put(ImageConsts.RUN_ENABLED, ImageDescriptor.createFromURL(url));
}
/**
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/wizards/controls/CustomTransportPanel.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/controls/CustomTransportPanel.java
index 5d5be863e..eb8c40bce 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/wizards/controls/CustomTransportPanel.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/controls/CustomTransportPanel.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.ui.wizards.controls;
+package org.eclipse.tcf.te.tcf.ui.controls;
import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.dialogs.IDialogPage;
@@ -19,22 +19,23 @@ import org.eclipse.swt.events.TypedEvent;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
-import org.eclipse.tm.tcf.protocol.IPeer;
-import org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer;
-import org.eclipse.tm.te.tcf.ui.nls.Messages;
-import org.eclipse.tm.te.ui.controls.BaseDialogPageControl;
-import org.eclipse.tm.te.ui.controls.BaseEditBrowseTextControl;
-import org.eclipse.tm.te.ui.controls.panels.AbstractWizardConfigurationPanel;
-import org.eclipse.tm.te.ui.controls.validator.RegexValidator;
-import org.eclipse.tm.te.ui.controls.validator.Validator;
-import org.eclipse.tm.te.ui.wizards.interfaces.ISharedDataWizardPage;
-import org.eclipse.tm.te.ui.wizards.interfaces.IValidatableWizardPage;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.tcf.ui.nls.Messages;
+import org.eclipse.tcf.te.ui.controls.BaseDialogPageControl;
+import org.eclipse.tcf.te.ui.controls.BaseEditBrowseTextControl;
+import org.eclipse.tcf.te.ui.controls.panels.AbstractWizardConfigurationPanel;
+import org.eclipse.tcf.te.ui.controls.validator.RegexValidator;
+import org.eclipse.tcf.te.ui.controls.validator.Validator;
+import org.eclipse.tcf.te.ui.interfaces.data.IDataExchangeNode3;
+import org.eclipse.tcf.te.ui.jface.interfaces.IValidatingContainer;
+import org.eclipse.tcf.te.ui.swt.SWTControlUtil;
import org.eclipse.ui.forms.widgets.FormToolkit;
/**
* Custom transport type panel implementation.
*/
-public class CustomTransportPanel extends AbstractWizardConfigurationPanel implements ISharedDataWizardPage {
+public class CustomTransportPanel extends AbstractWizardConfigurationPanel implements IDataExchangeNode3 {
private CustomTransportNameControl customTransportNameControl;
@@ -58,7 +59,7 @@ public class CustomTransportPanel extends AbstractWizardConfigurationPanel imple
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.BaseEditBrowseTextControl#doCreateEditFieldValidator()
+ * @see org.eclipse.tcf.te.ui.controls.BaseEditBrowseTextControl#doCreateEditFieldValidator()
*/
@Override
protected Validator doCreateEditFieldValidator() {
@@ -66,7 +67,7 @@ public class CustomTransportPanel extends AbstractWizardConfigurationPanel imple
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.BaseEditBrowseTextControl#configureEditFieldValidator(org.eclipse.tm.te.ui.controls.validator.Validator)
+ * @see org.eclipse.tcf.te.ui.controls.BaseEditBrowseTextControl#configureEditFieldValidator(org.eclipse.tcf.te.ui.controls.validator.Validator)
*/
@Override
protected void configureEditFieldValidator(Validator validator) {
@@ -76,16 +77,16 @@ public class CustomTransportPanel extends AbstractWizardConfigurationPanel imple
}
}
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.BaseDialogPageControl#getValidatableWizardPage()
- */
- @Override
- public IValidatableWizardPage getValidatableWizardPage() {
- return CustomTransportPanel.this.getParentControl().getValidatableWizardPage();
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.controls.BaseDialogPageControl#getValidatingContainer()
+ */
+ @Override
+ public IValidatingContainer getValidatingContainer() {
+ return CustomTransportPanel.this.getParentControl().getValidatingContainer();
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.BaseEditBrowseTextControl#modifyText(org.eclipse.swt.events.ModifyEvent)
+ * @see org.eclipse.tcf.te.ui.controls.BaseEditBrowseTextControl#modifyText(org.eclipse.swt.events.ModifyEvent)
*/
@Override
public void modifyText(ModifyEvent e) {
@@ -106,7 +107,7 @@ public class CustomTransportPanel extends AbstractWizardConfigurationPanel imple
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.panels.AbstractWizardConfigurationPanel#dispose()
+ * @see org.eclipse.tcf.te.ui.controls.panels.AbstractWizardConfigurationPanel#dispose()
*/
@Override
public void dispose() {
@@ -116,7 +117,7 @@ public class CustomTransportPanel extends AbstractWizardConfigurationPanel imple
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.interfaces.IWizardConfigurationPanel#setupPanel(org.eclipse.swt.widgets.Composite, org.eclipse.ui.forms.widgets.FormToolkit)
+ * @see org.eclipse.tcf.te.ui.controls.interfaces.IWizardConfigurationPanel#setupPanel(org.eclipse.swt.widgets.Composite, org.eclipse.ui.forms.widgets.FormToolkit)
*/
@Override
public void setupPanel(Composite parent, FormToolkit toolkit) {
@@ -149,7 +150,7 @@ public class CustomTransportPanel extends AbstractWizardConfigurationPanel imple
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.panels.AbstractWizardConfigurationPanel#isValid()
+ * @see org.eclipse.tcf.te.ui.controls.panels.AbstractWizardConfigurationPanel#isValid()
*/
@Override
public boolean isValid() {
@@ -163,7 +164,7 @@ public class CustomTransportPanel extends AbstractWizardConfigurationPanel imple
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.interfaces.IWizardConfigurationPanel#dataChanged(org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer, org.eclipse.swt.events.TypedEvent)
+ * @see org.eclipse.tcf.te.ui.controls.interfaces.IWizardConfigurationPanel#dataChanged(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer, org.eclipse.swt.events.TypedEvent)
*/
@Override
public boolean dataChanged(IPropertiesContainer data, TypedEvent e) {
@@ -180,7 +181,7 @@ public class CustomTransportPanel extends AbstractWizardConfigurationPanel imple
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.wizards.interfaces.ISharedDataWizardPage#setupData(org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer)
+ * @see org.eclipse.tcf.te.ui.wizards.interfaces.ISharedDataExchangeNode#setupData(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer)
*/
@Override
public void setupData(IPropertiesContainer data) {
@@ -192,7 +193,7 @@ public class CustomTransportPanel extends AbstractWizardConfigurationPanel imple
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.wizards.interfaces.ISharedDataWizardPage#extractData(org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer)
+ * @see org.eclipse.tcf.te.ui.wizards.interfaces.ISharedDataExchangeNode#extractData(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer)
*/
@Override
public void extractData(IPropertiesContainer data) {
@@ -204,14 +205,14 @@ public class CustomTransportPanel extends AbstractWizardConfigurationPanel imple
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.wizards.interfaces.ISharedDataWizardPage#initializeData(org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer)
+ * @see org.eclipse.tcf.te.ui.interfaces.data.IDataExchangeNode2#initializeData(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer)
*/
@Override
public void initializeData(IPropertiesContainer data) {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.wizards.interfaces.ISharedDataWizardPage#removeData(org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer)
+ * @see org.eclipse.tcf.te.ui.interfaces.data.IDataExchangeNode3#removeData(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer)
*/
@Override
public void removeData(IPropertiesContainer data) {
@@ -220,7 +221,17 @@ public class CustomTransportPanel extends AbstractWizardConfigurationPanel imple
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.panels.AbstractWizardConfigurationPanel#doSaveWidgetValues(org.eclipse.jface.dialogs.IDialogSettings, java.lang.String)
+ * @see org.eclipse.tcf.te.ui.interfaces.data.IDataExchangeNode3#copyData(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer, org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer)
+ */
+ @Override
+ public void copyData(IPropertiesContainer src, IPropertiesContainer dst) {
+ Assert.isNotNull(src);
+ Assert.isNotNull(dst);
+ dst.setProperty(IPeer.ATTR_TRANSPORT_NAME, src.getProperty(IPeer.ATTR_TRANSPORT_NAME));
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.controls.panels.AbstractWizardConfigurationPanel#doSaveWidgetValues(org.eclipse.jface.dialogs.IDialogSettings, java.lang.String)
*/
@Override
public void doSaveWidgetValues(IDialogSettings settings, String idPrefix) {
@@ -229,11 +240,21 @@ public class CustomTransportPanel extends AbstractWizardConfigurationPanel imple
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.panels.AbstractWizardConfigurationPanel#doRestoreWidgetValues(org.eclipse.jface.dialogs.IDialogSettings, java.lang.String)
+ * @see org.eclipse.tcf.te.ui.controls.panels.AbstractWizardConfigurationPanel#doRestoreWidgetValues(org.eclipse.jface.dialogs.IDialogSettings, java.lang.String)
*/
@Override
public void doRestoreWidgetValues(IDialogSettings settings, String idPrefix) {
super.doRestoreWidgetValues(settings, idPrefix);
if (customTransportNameControl != null) customTransportNameControl.doRestoreWidgetValues(settings, idPrefix);
}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.controls.panels.AbstractWizardConfigurationPanel#setEnabled(boolean)
+ */
+ @Override
+ public void setEnabled(boolean enabled) {
+ if (customTransportNameControl != null) {
+ SWTControlUtil.setEnabled(customTransportNameControl.getEditFieldControl(), enabled);
+ }
+ }
}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/wizards/controls/PeerAttributesTablePart.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/controls/PeerAttributesTablePart.java
index 168cd6902..e0fb96be4 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/wizards/controls/PeerAttributesTablePart.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/controls/PeerAttributesTablePart.java
@@ -7,9 +7,10 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.ui.wizards.controls;
+package org.eclipse.tcf.te.tcf.ui.controls;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.List;
@@ -41,12 +42,13 @@ import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.swt.widgets.TableItem;
import org.eclipse.swt.widgets.Text;
-import org.eclipse.tm.te.tcf.ui.nls.Messages;
-import org.eclipse.tm.te.ui.dialogs.NameValuePairDialog;
-import org.eclipse.tm.te.ui.forms.parts.TablePart;
-import org.eclipse.tm.te.ui.swt.SWTControlUtil;
+import org.eclipse.tcf.te.runtime.interfaces.IDisposable;
+import org.eclipse.tcf.te.tcf.ui.nls.Messages;
+import org.eclipse.tcf.te.ui.dialogs.NameValuePairDialog;
+import org.eclipse.tcf.te.ui.forms.parts.TablePart;
+import org.eclipse.tcf.te.ui.swt.SWTControlUtil;
+import org.eclipse.tcf.te.ui.tables.TableViewerComparator;
import org.eclipse.ui.forms.widgets.FormToolkit;
-import org.eclipse.ui.services.IDisposable;
/**
* Peer attributes table part implementation.
@@ -58,6 +60,9 @@ public class PeerAttributesTablePart extends TablePart implements IDisposable {
// A list of names which are banned from using
private String[] bannedNames;
+ // A flag to mark the table part "read-only"
+ /* default */ boolean readOnly;
+
/**
* Peer attributes table table node implementation.
*/
@@ -119,14 +124,14 @@ public class PeerAttributesTablePart extends TablePart implements IDisposable {
}
/* (non-Javadoc)
- * @see org.eclipse.ui.services.IDisposable#dispose()
+ * @see org.eclipse.tcf.te.runtime.interfaces.IDisposable#dispose()
*/
@Override
public void dispose() {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.forms.parts.TablePart#configureTableViewer(org.eclipse.jface.viewers.TableViewer)
+ * @see org.eclipse.tcf.te.ui.forms.parts.TablePart#configureTableViewer(org.eclipse.jface.viewers.TableViewer)
*/
@Override
protected void configureTableViewer(final TableViewer viewer) {
@@ -161,7 +166,7 @@ public class PeerAttributesTablePart extends TablePart implements IDisposable {
viewer.setCellModifier(new ICellModifier() {
@Override
public boolean canModify(Object element, String property) {
- return element instanceof TableNode;
+ return element instanceof TableNode && !readOnly;
}
@Override
public Object getValue(Object element, String property) {
@@ -187,6 +192,7 @@ public class PeerAttributesTablePart extends TablePart implements IDisposable {
((TableNode)element).value = value != null ? value.toString() : ""; //$NON-NLS-1$
}
viewer.setInput(nodes);
+ onTableModified();
}
}
});
@@ -195,6 +201,9 @@ public class PeerAttributesTablePart extends TablePart implements IDisposable {
viewer.setContentProvider(new ArrayContentProvider());
viewer.setLabelProvider(new TableLabelProvider());
+ // Configure the comparator
+ viewer.setComparator(new TableViewerComparator(viewer, (ITableLabelProvider)viewer.getLabelProvider()));
+
// Attach listeners
viewer.addSelectionChangedListener(new ISelectionChangedListener() {
@Override
@@ -206,7 +215,7 @@ public class PeerAttributesTablePart extends TablePart implements IDisposable {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.forms.parts.AbstractPartWithButtons#createControl(org.eclipse.swt.widgets.Composite, int, int, org.eclipse.ui.forms.widgets.FormToolkit)
+ * @see org.eclipse.tcf.te.ui.forms.parts.AbstractPartWithButtons#createControl(org.eclipse.swt.widgets.Composite, int, int, org.eclipse.ui.forms.widgets.FormToolkit)
*/
@Override
public void createControl(Composite parent, int style, int span, FormToolkit toolkit) {
@@ -217,7 +226,7 @@ public class PeerAttributesTablePart extends TablePart implements IDisposable {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.forms.parts.AbstractPartWithButtons#onButtonSelected(org.eclipse.swt.widgets.Button)
+ * @see org.eclipse.tcf.te.ui.forms.parts.AbstractPartWithButtons#onButtonSelected(org.eclipse.swt.widgets.Button)
*/
@Override
protected void onButtonSelected(Button button) {
@@ -240,8 +249,22 @@ public class PeerAttributesTablePart extends TablePart implements IDisposable {
protected void updateButtons() {
int selectionCount = getTableViewer().getTable().getSelectionCount();
- SWTControlUtil.setEnabled(getButton(Messages.PeerAttributesTablePart_button_edit), selectionCount == 1);
- SWTControlUtil.setEnabled(getButton(Messages.PeerAttributesTablePart_button_remove), selectionCount == 1);
+ SWTControlUtil.setEnabled(getButton(Messages.PeerAttributesTablePart_button_new), !readOnly);
+
+ // Listed banned nodes are always read only
+ boolean banned = false;
+ if (selectionCount == 1) {
+ ISelection selection = getTableViewer().getSelection();
+ if (selection instanceof IStructuredSelection && !selection.isEmpty()) {
+ Object element = ((IStructuredSelection)selection).getFirstElement();
+ if (element instanceof TableNode) {
+ banned = Arrays.asList(bannedNames).contains(((TableNode)element).name);
+ }
+ }
+ }
+
+ SWTControlUtil.setEnabled(getButton(Messages.PeerAttributesTablePart_button_edit), selectionCount == 1 && !readOnly && !banned);
+ SWTControlUtil.setEnabled(getButton(Messages.PeerAttributesTablePart_button_remove), selectionCount == 1 && !readOnly && !banned);
}
/**
@@ -275,6 +298,7 @@ public class PeerAttributesTablePart extends TablePart implements IDisposable {
getTableViewer().setInput(nodes);
if (index < nodes.size()) getTableViewer().setSelection(new StructuredSelection(nodes.get(index)));
updateButtons();
+ onTableModified();
}
}
@@ -334,10 +358,17 @@ public class PeerAttributesTablePart extends TablePart implements IDisposable {
// Refresh the view
getTableViewer().setInput(nodes);
getTableViewer().setSelection(new StructuredSelection(node));
+ onTableModified();
}
}
/**
+ * Signals the modification of the table.
+ */
+ protected void onTableModified() {
+ }
+
+ /**
* Convert the given list into a map.
*
* @param list The list of table node. Must not be <code>null</code>:
@@ -362,6 +393,32 @@ public class PeerAttributesTablePart extends TablePart implements IDisposable {
}
/**
+ * Set the configured attributes to what is present in the given attributes map.
+ * <p>
+ * <b>Note:</b> If the given attributes map is <code>null</code> or empty, the table
+ * will be effectively cleared.
+ *
+ * @param attributes The map of attributes, an empty map or <code>null</code>.
+ */
+ public void setAttributes(Map<String, String> attributes) {
+ // Clear the old nodes
+ nodes.clear();
+
+ if (attributes != null && !attributes.isEmpty()) {
+ // Create the corresponding nodes for the given attributes
+ for (String key : attributes.keySet()) {
+ TableNode node = new TableNode();
+ node.name = key;
+ node.value = attributes.get(key);
+ nodes.add(node);
+ }
+ }
+
+ // Refresh the view
+ getTableViewer().setInput(nodes);
+ }
+
+ /**
* Set a list of banned names.
*
* @param bannedNames The list of banned names or <code>null</code>.
@@ -378,4 +435,23 @@ public class PeerAttributesTablePart extends TablePart implements IDisposable {
public final String[] getBannedNames() {
return bannedNames;
}
+
+ /**
+ * Set the table part read-only state.
+ *
+ * @param readOnly <code>True</code> to set the table part read-only.
+ */
+ public final void setReadOnly(boolean readOnly) {
+ this.readOnly = readOnly;
+ updateButtons();
+ }
+
+ /**
+ * Returns the table part read-only state.
+ *
+ * @return <code>True</code> if the table part is read-only, <code>false</code> otherwise.
+ */
+ public final boolean isReadOnly() {
+ return readOnly;
+ }
}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/wizards/controls/PeerIdControl.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/controls/PeerIdControl.java
index 551806c41..10fad0a3f 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/wizards/controls/PeerIdControl.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/controls/PeerIdControl.java
@@ -7,11 +7,11 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.ui.wizards.controls;
+package org.eclipse.tcf.te.tcf.ui.controls;
import org.eclipse.jface.dialogs.IDialogPage;
-import org.eclipse.tm.te.tcf.ui.nls.Messages;
-import org.eclipse.tm.te.ui.controls.BaseEditBrowseTextControl;
+import org.eclipse.tcf.te.tcf.ui.nls.Messages;
+import org.eclipse.tcf.te.ui.controls.BaseEditBrowseTextControl;
/**
* Peer id control implementation.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/wizards/controls/PeerNameControl.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/controls/PeerNameControl.java
index 1c9df762d..f3aac7a6e 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/wizards/controls/PeerNameControl.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/controls/PeerNameControl.java
@@ -7,11 +7,11 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.ui.wizards.controls;
+package org.eclipse.tcf.te.tcf.ui.controls;
import org.eclipse.jface.dialogs.IDialogPage;
-import org.eclipse.tm.te.tcf.ui.nls.Messages;
-import org.eclipse.tm.te.ui.controls.BaseEditBrowseTextControl;
+import org.eclipse.tcf.te.tcf.ui.nls.Messages;
+import org.eclipse.tcf.te.ui.controls.BaseEditBrowseTextControl;
/**
* Peer name control implementation.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/wizards/controls/PipeTransportPanel.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/controls/PipeTransportPanel.java
index a7b648dd8..2d87cfc07 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/wizards/controls/PipeTransportPanel.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/controls/PipeTransportPanel.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.ui.wizards.controls;
+package org.eclipse.tcf.te.tcf.ui.controls;
import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.dialogs.IDialogPage;
@@ -19,21 +19,22 @@ import org.eclipse.swt.events.TypedEvent;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
-import org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer;
-import org.eclipse.tm.te.tcf.ui.nls.Messages;
-import org.eclipse.tm.te.ui.controls.BaseDialogPageControl;
-import org.eclipse.tm.te.ui.controls.BaseEditBrowseTextControl;
-import org.eclipse.tm.te.ui.controls.panels.AbstractWizardConfigurationPanel;
-import org.eclipse.tm.te.ui.controls.validator.RegexValidator;
-import org.eclipse.tm.te.ui.controls.validator.Validator;
-import org.eclipse.tm.te.ui.wizards.interfaces.ISharedDataWizardPage;
-import org.eclipse.tm.te.ui.wizards.interfaces.IValidatableWizardPage;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.tcf.ui.nls.Messages;
+import org.eclipse.tcf.te.ui.controls.BaseDialogPageControl;
+import org.eclipse.tcf.te.ui.controls.BaseEditBrowseTextControl;
+import org.eclipse.tcf.te.ui.controls.panels.AbstractWizardConfigurationPanel;
+import org.eclipse.tcf.te.ui.controls.validator.RegexValidator;
+import org.eclipse.tcf.te.ui.controls.validator.Validator;
+import org.eclipse.tcf.te.ui.interfaces.data.IDataExchangeNode3;
+import org.eclipse.tcf.te.ui.jface.interfaces.IValidatingContainer;
+import org.eclipse.tcf.te.ui.swt.SWTControlUtil;
import org.eclipse.ui.forms.widgets.FormToolkit;
/**
* Pipe transport type panel implementation.
*/
-public class PipeTransportPanel extends AbstractWizardConfigurationPanel implements ISharedDataWizardPage {
+public class PipeTransportPanel extends AbstractWizardConfigurationPanel implements IDataExchangeNode3 {
private PipeNameControl pipeNameControl;
@@ -57,7 +58,7 @@ public class PipeTransportPanel extends AbstractWizardConfigurationPanel impleme
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.BaseEditBrowseTextControl#doCreateEditFieldValidator()
+ * @see org.eclipse.tcf.te.ui.controls.BaseEditBrowseTextControl#doCreateEditFieldValidator()
*/
@Override
protected Validator doCreateEditFieldValidator() {
@@ -65,7 +66,7 @@ public class PipeTransportPanel extends AbstractWizardConfigurationPanel impleme
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.BaseEditBrowseTextControl#configureEditFieldValidator(org.eclipse.tm.te.ui.controls.validator.Validator)
+ * @see org.eclipse.tcf.te.ui.controls.BaseEditBrowseTextControl#configureEditFieldValidator(org.eclipse.tcf.te.ui.controls.validator.Validator)
*/
@Override
protected void configureEditFieldValidator(Validator validator) {
@@ -75,16 +76,16 @@ public class PipeTransportPanel extends AbstractWizardConfigurationPanel impleme
}
}
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.BaseDialogPageControl#getValidatableWizardPage()
- */
- @Override
- public IValidatableWizardPage getValidatableWizardPage() {
- return PipeTransportPanel.this.getParentControl().getValidatableWizardPage();
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.controls.BaseDialogPageControl#getValidatingContainer()
+ */
+ @Override
+ public IValidatingContainer getValidatingContainer() {
+ return PipeTransportPanel.this.getParentControl().getValidatingContainer();
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.BaseEditBrowseTextControl#modifyText(org.eclipse.swt.events.ModifyEvent)
+ * @see org.eclipse.tcf.te.ui.controls.BaseEditBrowseTextControl#modifyText(org.eclipse.swt.events.ModifyEvent)
*/
@Override
public void modifyText(ModifyEvent e) {
@@ -105,7 +106,7 @@ public class PipeTransportPanel extends AbstractWizardConfigurationPanel impleme
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.panels.AbstractWizardConfigurationPanel#dispose()
+ * @see org.eclipse.tcf.te.ui.controls.panels.AbstractWizardConfigurationPanel#dispose()
*/
@Override
public void dispose() {
@@ -115,7 +116,7 @@ public class PipeTransportPanel extends AbstractWizardConfigurationPanel impleme
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.interfaces.IWizardConfigurationPanel#setupPanel(org.eclipse.swt.widgets.Composite, org.eclipse.ui.forms.widgets.FormToolkit)
+ * @see org.eclipse.tcf.te.ui.controls.interfaces.IWizardConfigurationPanel#setupPanel(org.eclipse.swt.widgets.Composite, org.eclipse.ui.forms.widgets.FormToolkit)
*/
@Override
public void setupPanel(Composite parent, FormToolkit toolkit) {
@@ -148,7 +149,7 @@ public class PipeTransportPanel extends AbstractWizardConfigurationPanel impleme
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.panels.AbstractWizardConfigurationPanel#isValid()
+ * @see org.eclipse.tcf.te.ui.controls.panels.AbstractWizardConfigurationPanel#isValid()
*/
@Override
public boolean isValid() {
@@ -162,7 +163,7 @@ public class PipeTransportPanel extends AbstractWizardConfigurationPanel impleme
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.interfaces.IWizardConfigurationPanel#dataChanged(org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer, org.eclipse.swt.events.TypedEvent)
+ * @see org.eclipse.tcf.te.ui.controls.interfaces.IWizardConfigurationPanel#dataChanged(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer, org.eclipse.swt.events.TypedEvent)
*/
@Override
public boolean dataChanged(IPropertiesContainer data, TypedEvent e) {
@@ -179,7 +180,7 @@ public class PipeTransportPanel extends AbstractWizardConfigurationPanel impleme
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.wizards.interfaces.ISharedDataWizardPage#setupData(org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer)
+ * @see org.eclipse.tcf.te.ui.wizards.interfaces.ISharedDataExchangeNode#setupData(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer)
*/
@Override
public void setupData(IPropertiesContainer data) {
@@ -191,26 +192,27 @@ public class PipeTransportPanel extends AbstractWizardConfigurationPanel impleme
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.wizards.interfaces.ISharedDataWizardPage#extractData(org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer)
+ * @see org.eclipse.tcf.te.ui.wizards.interfaces.ISharedDataExchangeNode#extractData(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer)
*/
@Override
public void extractData(IPropertiesContainer data) {
if (data == null) return;
if (pipeNameControl != null) {
- data.setProperty("PipeName", pipeNameControl.getEditFieldControlText()); //$NON-NLS-1$
+ String pipeName = pipeNameControl.getEditFieldControlText();
+ data.setProperty("PipeName", !"".equals(pipeName) ? pipeName : null); //$NON-NLS-1$ //$NON-NLS-2$
}
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.wizards.interfaces.ISharedDataWizardPage#initializeData(org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer)
+ * @see org.eclipse.tcf.te.ui.interfaces.data.IDataExchangeNode2#initializeData(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer)
*/
@Override
public void initializeData(IPropertiesContainer data) {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.wizards.interfaces.ISharedDataWizardPage#removeData(org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer)
+ * @see org.eclipse.tcf.te.ui.interfaces.data.IDataExchangeNode3#removeData(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer)
*/
@Override
public void removeData(IPropertiesContainer data) {
@@ -219,7 +221,17 @@ public class PipeTransportPanel extends AbstractWizardConfigurationPanel impleme
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.panels.AbstractWizardConfigurationPanel#doSaveWidgetValues(org.eclipse.jface.dialogs.IDialogSettings, java.lang.String)
+ * @see org.eclipse.tcf.te.ui.interfaces.data.IDataExchangeNode3#copyData(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer, org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer)
+ */
+ @Override
+ public void copyData(IPropertiesContainer src, IPropertiesContainer dst) {
+ Assert.isNotNull(src);
+ Assert.isNotNull(dst);
+ dst.setProperty("PipeName", src.getProperty("PipeName")); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.controls.panels.AbstractWizardConfigurationPanel#doSaveWidgetValues(org.eclipse.jface.dialogs.IDialogSettings, java.lang.String)
*/
@Override
public void doSaveWidgetValues(IDialogSettings settings, String idPrefix) {
@@ -228,11 +240,21 @@ public class PipeTransportPanel extends AbstractWizardConfigurationPanel impleme
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.panels.AbstractWizardConfigurationPanel#doRestoreWidgetValues(org.eclipse.jface.dialogs.IDialogSettings, java.lang.String)
+ * @see org.eclipse.tcf.te.ui.controls.panels.AbstractWizardConfigurationPanel#doRestoreWidgetValues(org.eclipse.jface.dialogs.IDialogSettings, java.lang.String)
*/
@Override
public void doRestoreWidgetValues(IDialogSettings settings, String idPrefix) {
super.doRestoreWidgetValues(settings, idPrefix);
if (pipeNameControl != null) pipeNameControl.doRestoreWidgetValues(settings, idPrefix);
}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.controls.panels.AbstractWizardConfigurationPanel#setEnabled(boolean)
+ */
+ @Override
+ public void setEnabled(boolean enabled) {
+ if (pipeNameControl != null) {
+ SWTControlUtil.setEnabled(pipeNameControl.getEditFieldControl(), enabled);
+ }
+ }
}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/wizards/controls/TcpTransportPanel.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/controls/TcpTransportPanel.java
index 6bf7e3abc..e5dfe4456 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/wizards/controls/TcpTransportPanel.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/controls/TcpTransportPanel.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.ui.wizards.controls;
+package org.eclipse.tcf.te.tcf.ui.controls;
import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.dialogs.IDialogPage;
@@ -19,23 +19,24 @@ import org.eclipse.swt.events.TypedEvent;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
-import org.eclipse.tm.tcf.protocol.IPeer;
-import org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer;
-import org.eclipse.tm.te.tcf.ui.nls.Messages;
-import org.eclipse.tm.te.ui.controls.BaseDialogPageControl;
-import org.eclipse.tm.te.ui.controls.net.RemoteHostAddressControl;
-import org.eclipse.tm.te.ui.controls.net.RemoteHostPortControl;
-import org.eclipse.tm.te.ui.controls.panels.AbstractWizardConfigurationPanel;
-import org.eclipse.tm.te.ui.controls.validator.NameOrIPValidator;
-import org.eclipse.tm.te.ui.controls.validator.Validator;
-import org.eclipse.tm.te.ui.wizards.interfaces.ISharedDataWizardPage;
-import org.eclipse.tm.te.ui.wizards.interfaces.IValidatableWizardPage;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.tcf.ui.nls.Messages;
+import org.eclipse.tcf.te.ui.controls.BaseDialogPageControl;
+import org.eclipse.tcf.te.ui.controls.net.RemoteHostAddressControl;
+import org.eclipse.tcf.te.ui.controls.net.RemoteHostPortControl;
+import org.eclipse.tcf.te.ui.controls.panels.AbstractWizardConfigurationPanel;
+import org.eclipse.tcf.te.ui.controls.validator.NameOrIPValidator;
+import org.eclipse.tcf.te.ui.controls.validator.Validator;
+import org.eclipse.tcf.te.ui.interfaces.data.IDataExchangeNode3;
+import org.eclipse.tcf.te.ui.jface.interfaces.IValidatingContainer;
+import org.eclipse.tcf.te.ui.swt.SWTControlUtil;
import org.eclipse.ui.forms.widgets.FormToolkit;
/**
* TCP transport type wizard configuration panel.
*/
-public class TcpTransportPanel extends AbstractWizardConfigurationPanel implements ISharedDataWizardPage {
+public class TcpTransportPanel extends AbstractWizardConfigurationPanel implements IDataExchangeNode3 {
private RemoteHostAddressControl addressControl = null;
private RemoteHostPortControl portControl = null;
@@ -56,7 +57,7 @@ public class TcpTransportPanel extends AbstractWizardConfigurationPanel implemen
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.net.RemoteHostAddressControl#configureEditFieldValidator(org.eclipse.tm.te.ui.controls.validator.Validator)
+ * @see org.eclipse.tcf.te.ui.controls.net.RemoteHostAddressControl#configureEditFieldValidator(org.eclipse.tcf.te.ui.controls.validator.Validator)
*/
@Override
protected void configureEditFieldValidator(Validator validator) {
@@ -70,24 +71,23 @@ public class TcpTransportPanel extends AbstractWizardConfigurationPanel implemen
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.net.RemoteHostAddressControl#getUserInformationTextCheckNameAddress()
+ * @see org.eclipse.tcf.te.ui.controls.net.RemoteHostAddressControl#getUserInformationTextCheckNameAddress()
*/
@Override
protected String getUserInformationTextCheckNameAddress() {
return Messages.MyRemoteHostAddressControl_information_checkNameAddressUserInformation;
}
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.BaseDialogPageControl#getValidatableWizardPage()
- */
- @Override
- public IValidatableWizardPage getValidatableWizardPage() {
- return TcpTransportPanel.this.getParentControl().getValidatableWizardPage();
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.controls.BaseDialogPageControl#getValidatingContainer()
+ */
+ @Override
+ public IValidatingContainer getValidatingContainer() {
+ return TcpTransportPanel.this.getParentControl().getValidatingContainer();
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.BaseEditBrowseTextControl#modifyText(org.eclipse.swt.events.ModifyEvent)
+ * @see org.eclipse.tcf.te.ui.controls.BaseEditBrowseTextControl#modifyText(org.eclipse.swt.events.ModifyEvent)
*/
@Override
public void modifyText(ModifyEvent e) {
@@ -112,16 +112,16 @@ public class TcpTransportPanel extends AbstractWizardConfigurationPanel implemen
super(parentPage);
}
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.BaseDialogPageControl#getValidatableWizardPage()
- */
- @Override
- public IValidatableWizardPage getValidatableWizardPage() {
- return TcpTransportPanel.this.getParentControl().getValidatableWizardPage();
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.controls.BaseDialogPageControl#getValidatingContainer()
+ */
+ @Override
+ public IValidatingContainer getValidatingContainer() {
+ return TcpTransportPanel.this.getParentControl().getValidatingContainer();
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.BaseEditBrowseTextControl#modifyText(org.eclipse.swt.events.ModifyEvent)
+ * @see org.eclipse.tcf.te.ui.controls.BaseEditBrowseTextControl#modifyText(org.eclipse.swt.events.ModifyEvent)
*/
@Override
public void modifyText(ModifyEvent e) {
@@ -142,7 +142,7 @@ public class TcpTransportPanel extends AbstractWizardConfigurationPanel implemen
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.panels.AbstractWizardConfigurationPanel#dispose()
+ * @see org.eclipse.tcf.te.ui.controls.panels.AbstractWizardConfigurationPanel#dispose()
*/
@Override
public void dispose() {
@@ -152,7 +152,7 @@ public class TcpTransportPanel extends AbstractWizardConfigurationPanel implemen
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.interfaces.IWizardConfigurationPanel#setupPanel(org.eclipse.swt.widgets.Composite, org.eclipse.ui.forms.widgets.FormToolkit)
+ * @see org.eclipse.tcf.te.ui.controls.interfaces.IWizardConfigurationPanel#setupPanel(org.eclipse.swt.widgets.Composite, org.eclipse.ui.forms.widgets.FormToolkit)
*/
@Override
public void setupPanel(Composite parent, FormToolkit toolkit) {
@@ -200,7 +200,7 @@ public class TcpTransportPanel extends AbstractWizardConfigurationPanel implemen
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.panels.AbstractWizardConfigurationPanel#isValid()
+ * @see org.eclipse.tcf.te.ui.controls.panels.AbstractWizardConfigurationPanel#isValid()
*/
@Override
public boolean isValid() {
@@ -219,7 +219,7 @@ public class TcpTransportPanel extends AbstractWizardConfigurationPanel implemen
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.interfaces.IWizardConfigurationPanel#dataChanged(org.eclipse.tm.te.runtime.interfaces.nodes.IPropertiesContainer, org.eclipse.swt.events.TypedEvent)
+ * @see org.eclipse.tcf.te.ui.controls.interfaces.IWizardConfigurationPanel#dataChanged(org.eclipse.tcf.te.runtime.interfaces.nodes.IPropertiesContainer, org.eclipse.swt.events.TypedEvent)
*/
@Override
public boolean dataChanged(IPropertiesContainer data, TypedEvent e) {
@@ -241,7 +241,7 @@ public class TcpTransportPanel extends AbstractWizardConfigurationPanel implemen
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.wizards.interfaces.ISharedDataWizardPage#setupData(org.eclipse.tm.te.runtime.interfaces.nodes.IPropertiesContainer)
+ * @see org.eclipse.tcf.te.ui.wizards.interfaces.ISharedDataExchangeNode#setupData(org.eclipse.tcf.te.runtime.interfaces.nodes.IPropertiesContainer)
*/
@Override
public void setupData(IPropertiesContainer data) {
@@ -257,30 +257,32 @@ public class TcpTransportPanel extends AbstractWizardConfigurationPanel implemen
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.wizards.interfaces.ISharedDataWizardPage#extractData(org.eclipse.tm.te.runtime.interfaces.nodes.IPropertiesContainer)
+ * @see org.eclipse.tcf.te.ui.wizards.interfaces.ISharedDataExchangeNode#extractData(org.eclipse.tcf.te.runtime.interfaces.nodes.IPropertiesContainer)
*/
@Override
public void extractData(IPropertiesContainer data) {
if (data == null) return;
if (addressControl != null) {
- data.setProperty(IPeer.ATTR_IP_HOST, addressControl.getEditFieldControlText());
+ String host = addressControl.getEditFieldControlText();
+ data.setProperty(IPeer.ATTR_IP_HOST, !"".equals(host) ? host : null); //$NON-NLS-1$
}
if (portControl != null) {
- data.setProperty(IPeer.ATTR_IP_PORT, portControl.getEditFieldControlText());
+ String port = portControl.getEditFieldControlText();
+ data.setProperty(IPeer.ATTR_IP_PORT, !"".equals(port) ? port : null); //$NON-NLS-1$
}
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.wizards.interfaces.ISharedDataWizardPage#initializeData(org.eclipse.tm.te.runtime.interfaces.nodes.IPropertiesContainer)
+ * @see org.eclipse.tcf.te.ui.interfaces.data.IDataExchangeNode2#initializeData(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer)
*/
@Override
public void initializeData(IPropertiesContainer data) {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.wizards.interfaces.ISharedDataWizardPage#removeData(org.eclipse.tm.te.runtime.interfaces.nodes.IPropertiesContainer)
+ * @see org.eclipse.tcf.te.ui.interfaces.data.IDataExchangeNode3#removeData(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer)
*/
@Override
public void removeData(IPropertiesContainer data) {
@@ -290,7 +292,18 @@ public class TcpTransportPanel extends AbstractWizardConfigurationPanel implemen
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.panels.AbstractWizardConfigurationPanel#doSaveWidgetValues(org.eclipse.jface.dialogs.IDialogSettings, java.lang.String)
+ * @see org.eclipse.tcf.te.ui.interfaces.data.IDataExchangeNode3#copyData(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer, org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer)
+ */
+ @Override
+ public void copyData(IPropertiesContainer src, IPropertiesContainer dst) {
+ Assert.isNotNull(src);
+ Assert.isNotNull(dst);
+ dst.setProperty(IPeer.ATTR_IP_HOST, src.getStringProperty(IPeer.ATTR_IP_HOST));
+ dst.setProperty(IPeer.ATTR_IP_PORT, src.getStringProperty(IPeer.ATTR_IP_PORT));
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.controls.panels.AbstractWizardConfigurationPanel#doSaveWidgetValues(org.eclipse.jface.dialogs.IDialogSettings, java.lang.String)
*/
@Override
public void doSaveWidgetValues(IDialogSettings settings, String idPrefix) {
@@ -300,7 +313,7 @@ public class TcpTransportPanel extends AbstractWizardConfigurationPanel implemen
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.panels.AbstractWizardConfigurationPanel#doRestoreWidgetValues(org.eclipse.jface.dialogs.IDialogSettings, java.lang.String)
+ * @see org.eclipse.tcf.te.ui.controls.panels.AbstractWizardConfigurationPanel#doRestoreWidgetValues(org.eclipse.jface.dialogs.IDialogSettings, java.lang.String)
*/
@Override
public void doRestoreWidgetValues(IDialogSettings settings, String idPrefix) {
@@ -308,4 +321,18 @@ public class TcpTransportPanel extends AbstractWizardConfigurationPanel implemen
if (addressControl != null) addressControl.doRestoreWidgetValues(settings, idPrefix);
if (portControl != null) portControl.doRestoreWidgetValues(settings, idPrefix);
}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.controls.panels.AbstractWizardConfigurationPanel#setEnabled(boolean)
+ */
+ @Override
+ public void setEnabled(boolean enabled) {
+ if (addressControl != null) {
+ SWTControlUtil.setEnabled(addressControl.getEditFieldControl(), enabled);
+ SWTControlUtil.setEnabled(addressControl.getButtonControl(), enabled);
+ }
+ if (portControl != null) {
+ SWTControlUtil.setEnabled(portControl.getEditFieldControl(), enabled);
+ }
+ }
}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/wizards/controls/TransportTypeControl.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/controls/TransportTypeControl.java
index 50cc636c3..525f00d89 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/wizards/controls/TransportTypeControl.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/controls/TransportTypeControl.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.ui.wizards.controls;
+package org.eclipse.tcf.te.tcf.ui.controls;
import java.util.ArrayList;
import java.util.List;
@@ -16,10 +16,10 @@ import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.dialogs.IDialogPage;
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.swt.widgets.Composite;
-import org.eclipse.tm.te.tcf.core.interfaces.ITransportTypes;
-import org.eclipse.tm.te.tcf.ui.nls.Messages;
-import org.eclipse.tm.te.ui.controls.BaseEditBrowseTextControl;
-import org.eclipse.tm.te.ui.swt.SWTControlUtil;
+import org.eclipse.tcf.te.tcf.ui.nls.Messages;
+import org.eclipse.tcf.te.tcf.core.interfaces.ITransportTypes;
+import org.eclipse.tcf.te.ui.controls.BaseEditBrowseTextControl;
+import org.eclipse.tcf.te.ui.swt.SWTControlUtil;
/**
* Transport type control implementation.
@@ -49,7 +49,7 @@ public class TransportTypeControl extends BaseEditBrowseTextControl {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.BaseEditBrowseTextControl#setupPanel(org.eclipse.swt.widgets.Composite)
+ * @see org.eclipse.tcf.te.ui.controls.BaseEditBrowseTextControl#setupPanel(org.eclipse.swt.widgets.Composite)
*/
@Override
public void setupPanel(Composite parent) {
@@ -114,7 +114,7 @@ public class TransportTypeControl extends BaseEditBrowseTextControl {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.BaseEditBrowseTextControl#doRestoreWidgetValues(org.eclipse.jface.dialogs.IDialogSettings, java.lang.String)
+ * @see org.eclipse.tcf.te.ui.controls.BaseEditBrowseTextControl#doRestoreWidgetValues(org.eclipse.jface.dialogs.IDialogSettings, java.lang.String)
*/
@Override
public void doRestoreWidgetValues(IDialogSettings settings, String idPrefix) {
@@ -124,7 +124,7 @@ public class TransportTypeControl extends BaseEditBrowseTextControl {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.BaseEditBrowseTextControl#doSaveWidgetValues(org.eclipse.jface.dialogs.IDialogSettings, java.lang.String)
+ * @see org.eclipse.tcf.te.ui.controls.BaseEditBrowseTextControl#doSaveWidgetValues(org.eclipse.jface.dialogs.IDialogSettings, java.lang.String)
*/
@Override
public void doSaveWidgetValues(IDialogSettings settings, String idPrefix) {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/wizards/controls/TransportTypePanelControl.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/controls/TransportTypePanelControl.java
index bd3c60494..51f1424a6 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/wizards/controls/TransportTypePanelControl.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/controls/TransportTypePanelControl.java
@@ -7,10 +7,10 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.ui.wizards.controls;
+package org.eclipse.tcf.te.tcf.ui.controls;
import org.eclipse.jface.dialogs.IDialogPage;
-import org.eclipse.tm.te.ui.controls.BaseWizardConfigurationPanelControl;
+import org.eclipse.tcf.te.ui.controls.BaseWizardConfigurationPanelControl;
/**
* Transport type wizard panel control.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/dialogs/AgentSelectionDialog.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/dialogs/AgentSelectionDialog.java
index ab3b559c2..241a7b41e 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/dialogs/AgentSelectionDialog.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/dialogs/AgentSelectionDialog.java
@@ -7,12 +7,13 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.ui.dialogs;
+package org.eclipse.tcf.te.tcf.ui.dialogs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
+import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.IMessageProvider;
import org.eclipse.jface.viewers.ArrayContentProvider;
@@ -30,16 +31,16 @@ import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.te.tcf.locator.interfaces.nodes.ILocatorModel;
-import org.eclipse.tm.te.tcf.locator.interfaces.nodes.IPeerModel;
-import org.eclipse.tm.te.tcf.locator.interfaces.services.ILocatorModelLookupService;
-import org.eclipse.tm.te.tcf.ui.internal.help.IContextHelpIds;
-import org.eclipse.tm.te.tcf.ui.internal.navigator.LabelProviderDelegate;
-import org.eclipse.tm.te.tcf.ui.model.Model;
-import org.eclipse.tm.te.tcf.ui.nls.Messages;
-import org.eclipse.tm.te.ui.jface.dialogs.CustomTitleAreaDialog;
-import org.eclipse.tm.te.ui.swt.SWTControlUtil;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.ILocatorModel;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.tcf.locator.interfaces.services.ILocatorModelLookupService;
+import org.eclipse.tcf.te.tcf.locator.model.Model;
+import org.eclipse.tcf.te.tcf.ui.help.IContextHelpIds;
+import org.eclipse.tcf.te.tcf.ui.navigator.LabelProviderDelegate;
+import org.eclipse.tcf.te.tcf.ui.nls.Messages;
+import org.eclipse.tcf.te.ui.jface.dialogs.CustomTitleAreaDialog;
+import org.eclipse.tcf.te.ui.swt.SWTControlUtil;
/**
* TCF agent selection dialog implementation.
@@ -83,8 +84,19 @@ public class AgentSelectionDialog extends CustomTitleAreaDialog {
return true;
}
+ /**
+ * Returns whether the dialog shall support multi selection or not.
+ * <p>
+ * The default implementation returns <code>true</code>.
+ *
+ * @return <code>True</code> if multi selection is supported, <code>false</code> otherwise.
+ */
+ protected boolean supportsMultiSelection() {
+ return true;
+ }
+
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.jface.dialogs.CustomTitleAreaDialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+ * @see org.eclipse.tcf.te.ui.jface.dialogs.CustomTitleAreaDialog#createDialogArea(org.eclipse.swt.widgets.Composite)
*/
@Override
protected Control createDialogArea(Composite parent) {
@@ -95,7 +107,7 @@ public class AgentSelectionDialog extends CustomTitleAreaDialog {
setDefaultMessage(getDefaultMessage(), IMessageProvider.NONE);
// Create the table viewer
- viewer = new TableViewer(top, SWT.MULTI | SWT.BORDER);
+ viewer = new TableViewer(top, (supportsMultiSelection() ? SWT.MULTI : SWT.SINGLE) | SWT.BORDER);
// Configure the table
Table table = viewer.getTable();
@@ -113,7 +125,7 @@ public class AgentSelectionDialog extends CustomTitleAreaDialog {
viewer.setContentProvider(new ArrayContentProvider());
LabelProviderDelegate labelProvider = new LabelProviderDelegate() {
/* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.ui.internal.navigator.LabelProviderDelegate#decorateImage(org.eclipse.swt.graphics.Image, java.lang.Object)
+ * @see org.eclipse.tcf.te.tcf.ui.navigator.LabelProviderDelegate#decorateImage(org.eclipse.swt.graphics.Image, java.lang.Object)
*/
@Override
public Image decorateImage(Image image, Object element) {
@@ -122,6 +134,9 @@ public class AgentSelectionDialog extends CustomTitleAreaDialog {
};
viewer.setLabelProvider(new DecoratingLabelProvider(labelProvider, labelProvider));
+ // Subclasses may customize the viewer before setting the input
+ configureTableViewer(viewer);
+
// The content to show is static. Do the filtering manually so that
// we can disable the OK Button if the dialog would not show any content.
final ILocatorModelLookupService service = getModel().getService(ILocatorModelLookupService.class);
@@ -152,6 +167,19 @@ public class AgentSelectionDialog extends CustomTitleAreaDialog {
return buttonBar;
}
+
+ /**
+ * Configure the table viewer.
+ * <p>
+ * The default implementation does nothing. Subclasses may overwrite this
+ * method to customize the table viewer before the input gets set.
+ *
+ * @param viewer The table viewer. Must not be <code>null</code>.
+ */
+ protected void configureTableViewer(TableViewer viewer) {
+ Assert.isNotNull(viewer);
+ }
+
/**
* Returns the dialog title.
*
@@ -200,7 +228,7 @@ public class AgentSelectionDialog extends CustomTitleAreaDialog {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.jface.dialogs.CustomTitleAreaDialog#okPressed()
+ * @see org.eclipse.tcf.te.ui.jface.dialogs.CustomTitleAreaDialog#okPressed()
*/
@Override
protected void okPressed() {
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/dialogs/RedirectAgentSelectionDialog.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/dialogs/RedirectAgentSelectionDialog.java
new file mode 100644
index 000000000..6e0d0d12c
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/dialogs/RedirectAgentSelectionDialog.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.ui.dialogs;
+
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.tcf.te.tcf.ui.nls.Messages;
+
+
+/**
+ * Agent selection dialog implementation to choose the proxy to redirect the communication through.
+ */
+public class RedirectAgentSelectionDialog extends AgentSelectionDialog {
+
+ /**
+ * Constructor.
+ *
+ * @param services The list of (remote) services the agents must provide to be selectable, or <code>null</code>.
+ */
+ public RedirectAgentSelectionDialog(String[] services) {
+ super(services);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param parent The parent shell used to view the dialog, or <code>null</code>.
+ * @param services The list of (remote) services the agents must provide to be selectable, or <code>null</code>.
+ */
+ public RedirectAgentSelectionDialog(Shell parent, String[] services) {
+ super(parent, services);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.ui.dialogs.AgentSelectionDialog#getDialogTitle()
+ */
+ @Override
+ protected String getDialogTitle() {
+ return Messages.RedirectAgentSelectionDialog_dialogTitle;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.ui.dialogs.AgentSelectionDialog#getTitle()
+ */
+ @Override
+ protected String getTitle() {
+ return Messages.RedirectAgentSelectionDialog_title;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.ui.dialogs.AgentSelectionDialog#getDefaultMessage()
+ */
+ @Override
+ protected String getDefaultMessage() {
+ return Messages.RedirectAgentSelectionDialog_message;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.ui.dialogs.AgentSelectionDialog#supportsMultiSelection()
+ */
+ @Override
+ protected boolean supportsMultiSelection() {
+ return false;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/OverviewEditorPage.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/OverviewEditorPage.java
new file mode 100644
index 000000000..755d487d3
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/OverviewEditorPage.java
@@ -0,0 +1,173 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.ui.editor;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.dialogs.IMessageProvider;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.tcf.te.tcf.ui.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.ui.editor.sections.AttributesSection;
+import org.eclipse.tcf.te.tcf.ui.editor.sections.GeneralInformationSection;
+import org.eclipse.tcf.te.tcf.ui.editor.sections.ServicesSection;
+import org.eclipse.tcf.te.tcf.ui.editor.sections.TransportSection;
+import org.eclipse.tcf.te.tcf.ui.help.IContextHelpIds;
+import org.eclipse.tcf.te.tcf.ui.internal.ImageConsts;
+import org.eclipse.tcf.te.tcf.ui.nls.Messages;
+import org.eclipse.tcf.te.ui.forms.CustomFormToolkit;
+import org.eclipse.tcf.te.ui.jface.interfaces.IValidatingContainer;
+import org.eclipse.tcf.te.ui.views.editor.pages.AbstractCustomFormToolkitEditorPage;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
+import org.eclipse.ui.forms.widgets.TableWrapData;
+import org.eclipse.ui.forms.widgets.TableWrapLayout;
+
+/**
+ * Peer overview page implementation.
+ */
+public class OverviewEditorPage extends AbstractCustomFormToolkitEditorPage implements IValidatingContainer {
+ // References to the page sub sections
+ private GeneralInformationSection infoSection;
+ private TransportSection transportSection;
+ private ServicesSection servicesSection;
+ private AttributesSection attributesSection;
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.views.editor.pages.AbstractCustomFormToolkitEditorPage#dispose()
+ */
+ @Override
+ public void dispose() {
+ if (infoSection != null) { infoSection.dispose(); infoSection = null; }
+ if (transportSection != null) { transportSection.dispose(); transportSection = null; }
+ if (servicesSection != null) { servicesSection.dispose(); servicesSection = null; }
+ if (attributesSection != null) { attributesSection.dispose(); attributesSection = null; }
+ super.dispose();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.views.editor.pages.AbstractCustomFormToolkitEditorPage#getContextHelpId()
+ */
+ @Override
+ protected String getContextHelpId() {
+ return IContextHelpIds.OVERVIEW_EDITOR_PAGE;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.views.editor.pages.AbstractCustomFormToolkitEditorPage#getFormTitle()
+ */
+ @Override
+ protected String getFormTitle() {
+ return Messages.OverviewEditorPage_title;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.views.editor.pages.AbstractCustomFormToolkitEditorPage#getFormImage()
+ */
+ @Override
+ protected Image getFormImage() {
+ return UIPlugin.getImage(ImageConsts.PEER);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.views.editor.pages.AbstractCustomFormToolkitEditorPage#doCreateFormContent(org.eclipse.swt.widgets.Composite, org.eclipse.tcf.te.ui.forms.CustomFormToolkit)
+ */
+ @Override
+ protected void doCreateFormContent(Composite parent, CustomFormToolkit toolkit) {
+ Assert.isNotNull(parent);
+ Assert.isNotNull(toolkit);
+
+ // Setup the main panel (using the table wrap layout)
+ Composite panel = toolkit.getFormToolkit().createComposite(parent);
+ TableWrapLayout layout = new TableWrapLayout();
+ layout.makeColumnsEqualWidth = true;
+ layout.numColumns = 2;
+ panel.setLayout(layout);
+ panel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+
+ infoSection = new GeneralInformationSection(getManagedForm(), panel);
+ infoSection.getSection().setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.TOP));
+ getManagedForm().addPart(infoSection);
+
+ transportSection = new TransportSection(getManagedForm(), (Composite)infoSection.getSection().getClient());
+ ((GridData)transportSection.getSection().getLayoutData()).horizontalSpan = 2;
+ getManagedForm().addPart(transportSection);
+
+ servicesSection = new ServicesSection(getManagedForm(), panel);
+ TableWrapData layoutData = new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.TOP);
+ servicesSection.getSection().setLayoutData(layoutData);
+ getManagedForm().addPart(servicesSection);
+
+ attributesSection = new AttributesSection(getManagedForm(), panel);
+ layoutData = new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.FILL_GRAB);
+ layoutData.colspan = 2;
+ attributesSection.getSection().setLayoutData(layoutData);
+ getManagedForm().addPart(attributesSection);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.forms.editor.FormPage#setActive(boolean)
+ */
+ @Override
+ public void setActive(boolean active) {
+ super.setActive(active);
+ if (infoSection != null) infoSection.setActive(active);
+ if (transportSection != null) transportSection.setActive(active);
+ if (servicesSection != null) servicesSection.setActive(active);
+ if (attributesSection != null) attributesSection.setActive(active);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.jface.interfaces.IValidatingContainer#validate()
+ */
+ @Override
+ public void validate() {
+ // Get the scrolled form
+ ScrolledForm form = getManagedForm().getForm();
+
+ String message = null;
+ int messageType = IMessageProvider.NONE;
+
+ if (infoSection != null) {
+ infoSection.isValid();
+ if (infoSection.getMessageType() > messageType) {
+ message = infoSection.getMessage();
+ messageType = infoSection.getMessageType();
+ }
+ }
+
+ if (transportSection != null) {
+ transportSection.isValid();
+ if (transportSection.getMessageType() > messageType) {
+ message = transportSection.getMessage();
+ messageType = transportSection.getMessageType();
+ }
+ }
+
+ if (servicesSection != null) {
+ servicesSection.isValid();
+ if (servicesSection.getMessageType() > messageType) {
+ message = servicesSection.getMessage();
+ messageType = servicesSection.getMessageType();
+ }
+ }
+
+ if (attributesSection != null) {
+ attributesSection.isValid();
+ if (attributesSection.getMessageType() > messageType) {
+ message = attributesSection.getMessage();
+ messageType = attributesSection.getMessageType();
+ }
+ }
+
+ // Apply the message to the form
+ form.setMessage(message, messageType);
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/controls/InfoSectionPeerIdControl.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/controls/InfoSectionPeerIdControl.java
new file mode 100644
index 000000000..ea242a107
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/controls/InfoSectionPeerIdControl.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.ui.editor.controls;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.tcf.te.tcf.ui.controls.PeerIdControl;
+import org.eclipse.tcf.te.tcf.ui.editor.sections.GeneralInformationSection;
+import org.eclipse.tcf.te.ui.jface.interfaces.IValidatingContainer;
+
+/**
+ * General information section peer id control implementation.
+ */
+public class InfoSectionPeerIdControl extends PeerIdControl {
+ // Reference to the parent general information section
+ private final GeneralInformationSection infoSection;
+
+ /**
+ * Constructor.
+ *
+ * @param infoSection The parent general information section. Must not be <code>null</code>.
+ */
+ public InfoSectionPeerIdControl(GeneralInformationSection infoSection) {
+ super(null);
+
+ Assert.isNotNull(infoSection);
+ this.infoSection = infoSection;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.controls.BaseDialogPageControl#getValidatingContainer()
+ */
+ @Override
+ public IValidatingContainer getValidatingContainer() {
+ Object container = infoSection.getManagedForm().getContainer();
+ return container instanceof IValidatingContainer ? (IValidatingContainer)container : null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.controls.BaseEditBrowseTextControl#modifyText(org.eclipse.swt.events.ModifyEvent)
+ */
+ @Override
+ public void modifyText(ModifyEvent e) {
+ super.modifyText(e);
+ infoSection.dataChanged(e);
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/controls/InfoSectionPeerNameControl.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/controls/InfoSectionPeerNameControl.java
new file mode 100644
index 000000000..d2f24ba81
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/controls/InfoSectionPeerNameControl.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.ui.editor.controls;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.tcf.te.tcf.ui.controls.PeerNameControl;
+import org.eclipse.tcf.te.tcf.ui.editor.sections.GeneralInformationSection;
+import org.eclipse.tcf.te.ui.jface.interfaces.IValidatingContainer;
+
+/**
+ * General information section peer name control implementation.
+ */
+public class InfoSectionPeerNameControl extends PeerNameControl {
+ // Reference to the parent general information section
+ private final GeneralInformationSection infoSection;
+
+ /**
+ * Constructor.
+ *
+ * @param infoSection The parent general information section. Must not be <code>null</code>.
+ */
+ public InfoSectionPeerNameControl(GeneralInformationSection infoSection) {
+ super(null);
+
+ Assert.isNotNull(infoSection);
+ this.infoSection = infoSection;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.controls.BaseDialogPageControl#getValidatingContainer()
+ */
+ @Override
+ public IValidatingContainer getValidatingContainer() {
+ Object container = infoSection.getManagedForm().getContainer();
+ return container instanceof IValidatingContainer ? (IValidatingContainer)container : null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.controls.BaseEditBrowseTextControl#modifyText(org.eclipse.swt.events.ModifyEvent)
+ */
+ @Override
+ public void modifyText(ModifyEvent e) {
+ super.modifyText(e);
+ infoSection.dataChanged(e);
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/controls/TransportSectionTypeControl.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/controls/TransportSectionTypeControl.java
new file mode 100644
index 000000000..d2452f3f0
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/controls/TransportSectionTypeControl.java
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.ui.editor.controls;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.tcf.te.tcf.ui.controls.TransportTypeControl;
+import org.eclipse.tcf.te.tcf.ui.editor.sections.TransportSection;
+import org.eclipse.tcf.te.ui.jface.interfaces.IValidatingContainer;
+
+/**
+ * Transport section transport type control implementation.
+ */
+public class TransportSectionTypeControl extends TransportTypeControl {
+ // Reference to the parent transport section
+ private final TransportSection transportSection;
+
+ /**
+ * Constructor.
+ *
+ * @param transportSection The parent transport section. Must not be <code>null</code>.
+ */
+ public TransportSectionTypeControl(TransportSection transportSection) {
+ super(null);
+
+ Assert.isNotNull(transportSection);
+ this.transportSection = transportSection;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.controls.BaseEditBrowseTextControl#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+ */
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ TransportSectionTypePanelControl transportTypePanelControl = (TransportSectionTypePanelControl)transportSection.getAdapter(TransportSectionTypePanelControl.class);
+
+ if (transportTypePanelControl != null) {
+ transportTypePanelControl.showConfigurationPanel(getSelectedTransportType());
+
+ IValidatingContainer validatingContainer = getValidatingContainer();
+ if (validatingContainer != null) validatingContainer.validate();
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.controls.BaseDialogPageControl#getValidatingContainer()
+ */
+ @Override
+ public IValidatingContainer getValidatingContainer() {
+ Object container = transportSection.getManagedForm().getContainer();
+ return container instanceof IValidatingContainer ? (IValidatingContainer)container : null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.controls.BaseEditBrowseTextControl#modifyText(org.eclipse.swt.events.ModifyEvent)
+ */
+ @Override
+ public void modifyText(ModifyEvent e) {
+ super.modifyText(e);
+ transportSection.dataChanged(e);
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/controls/TransportSectionTypePanelControl.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/controls/TransportSectionTypePanelControl.java
new file mode 100644
index 000000000..a9ce72707
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/controls/TransportSectionTypePanelControl.java
@@ -0,0 +1,81 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.ui.editor.controls;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.tcf.te.tcf.ui.controls.TransportTypePanelControl;
+import org.eclipse.tcf.te.tcf.ui.editor.sections.TransportSection;
+import org.eclipse.tcf.te.ui.controls.interfaces.IWizardConfigurationPanel;
+import org.eclipse.tcf.te.ui.jface.interfaces.IValidatingContainer;
+
+/**
+ * Transport section transport type panel control implementation.
+ */
+public class TransportSectionTypePanelControl extends TransportTypePanelControl implements ModifyListener {
+ // Reference to the parent transport section
+ private final TransportSection transportSection;
+
+ /**
+ * Constructor.
+ *
+ * @param transportSection The parent transport section. Must not be <code>null</code>.
+ */
+ public TransportSectionTypePanelControl(TransportSection transportSection) {
+ super(null);
+
+ Assert.isNotNull(transportSection);
+ this.transportSection = transportSection;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.controls.BaseControl#isValid()
+ */
+ @Override
+ public boolean isValid() {
+ boolean valid = super.isValid();
+ if (!valid) return false;
+
+ TransportSectionTypeControl transportTypeControl = (TransportSectionTypeControl)transportSection.getAdapter(TransportSectionTypeControl.class);
+ if (transportTypeControl != null) {
+ // Get the currently selected transport type
+ String transportType = transportTypeControl.getSelectedTransportType();
+ if (transportType != null) {
+ // get the panel for the transport type and validate the panel
+ IWizardConfigurationPanel panel = getConfigurationPanel(transportType);
+
+ if (panel != null) {
+ valid = panel.isValid();
+ setMessage(panel.getMessage(), panel.getMessageType());
+ }
+ }
+ }
+
+ return valid;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.controls.BaseDialogPageControl#getValidatingContainer()
+ */
+ @Override
+ public IValidatingContainer getValidatingContainer() {
+ Object container = transportSection.getManagedForm().getContainer();
+ return container instanceof IValidatingContainer ? (IValidatingContainer)container : null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.swt.events.ModifyListener#modifyText(org.eclipse.swt.events.ModifyEvent)
+ */
+ @Override
+ public void modifyText(ModifyEvent e) {
+ transportSection.dataChanged(e);
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/sections/AttributesSection.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/sections/AttributesSection.java
new file mode 100644
index 000000000..097b5f2cb
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/sections/AttributesSection.java
@@ -0,0 +1,381 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.ui.editor.sections;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.TypedEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.tcf.core.TransientPeer;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.runtime.persistence.interfaces.IPersistenceService;
+import org.eclipse.tcf.te.runtime.properties.PropertiesContainer;
+import org.eclipse.tcf.te.runtime.services.ServiceManager;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModelProperties;
+import org.eclipse.tcf.te.tcf.locator.nodes.PeerRedirector;
+import org.eclipse.tcf.te.tcf.ui.controls.PeerAttributesTablePart;
+import org.eclipse.tcf.te.tcf.ui.nls.Messages;
+import org.eclipse.tcf.te.ui.forms.parts.AbstractSection;
+import org.eclipse.tcf.te.ui.swt.SWTControlUtil;
+import org.eclipse.tcf.te.ui.views.editor.pages.AbstractEditorPage;
+import org.eclipse.ui.forms.IManagedForm;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.Section;
+
+/**
+ * Peer custom attributes section implementation.
+ */
+public class AttributesSection extends AbstractSection {
+ // The section sub controls
+ private PeerAttributesTablePart tablePart;
+
+ // Reference to the original data object
+ /* default */ IPeerModel od;
+ // Reference to a copy of the original data
+ /* default */ final IPropertiesContainer odc = new PropertiesContainer();
+ // Reference to the properties container representing the working copy for the section
+ /* default */ final IPropertiesContainer wc = new PropertiesContainer();
+
+ /*
+ * The list of banned names for the table parts. Banned names are names the user is not allowed
+ * to add to the table.
+ */
+ private static final String[] BANNED_NAMES = new String[] {
+ IPeer.ATTR_ID, IPeer.ATTR_AGENT_ID, IPeer.ATTR_SERVICE_MANGER_ID,
+ IPeer.ATTR_NAME, IPeer.ATTR_TRANSPORT_NAME, IPeer.ATTR_IP_HOST,
+ IPeer.ATTR_IP_PORT, "PipeName" //$NON-NLS-1$
+ };
+
+ /*
+ * The list of filtered attributes. This attributes are filtered from the data given to the
+ * table part on initialization. The attributes listed here are handled by other controls of the
+ * overview page.
+ */
+ private static final String[] FILTERED_NAMES = new String [] {
+ IPeer.ATTR_ID, IPeer.ATTR_NAME,
+ IPeer.ATTR_TRANSPORT_NAME, IPeer.ATTR_IP_HOST, IPeer.ATTR_IP_PORT,
+ "PipeName" //$NON-NLS-1$
+ };
+
+ /**
+ * Constructor.
+ *
+ * @param form The parent managed form. Must not be <code>null</code>.
+ * @param parent The parent composite. Must not be <code>null</code>.
+ */
+ public AttributesSection(IManagedForm form, Composite parent) {
+ super(form, parent, Section.DESCRIPTION);
+ createClient(getSection(), form.getToolkit());
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.forms.AbstractFormPart#dispose()
+ */
+ @Override
+ public void dispose() {
+ super.dispose();
+ if (tablePart != null) { tablePart.dispose(); tablePart = null; }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.forms.parts.AbstractSection#getAdapter(java.lang.Class)
+ */
+ @Override
+ public Object getAdapter(Class adapter) {
+ if (PeerAttributesTablePart.class.equals(adapter)) {
+ return tablePart;
+ }
+ return super.getAdapter(adapter);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.forms.parts.AbstractSection#createClient(org.eclipse.ui.forms.widgets.Section, org.eclipse.ui.forms.widgets.FormToolkit)
+ */
+ @Override
+ protected void createClient(Section section, FormToolkit toolkit) {
+ Assert.isNotNull(section);
+ Assert.isNotNull(toolkit);
+
+ // Configure the section
+ section.setText(Messages.AttributesSection_title);
+ section.setDescription(Messages.AttributesSection_description);
+
+ section.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+
+ // Create the section client
+ Composite client = createClientContainer(section, 2, toolkit);
+ Assert.isNotNull(client);
+ section.setClient(client);
+
+ tablePart = new PeerAttributesTablePart() {
+ @Override
+ protected void onTableModified() {
+ dataChanged(null);
+ }
+ };
+ tablePart.setMinSize(SWTControlUtil.convertWidthInCharsToPixels(client, 20), SWTControlUtil.convertHeightInCharsToPixels(client, 6));
+ tablePart.setBannedNames(BANNED_NAMES);
+ tablePart.createControl(client, SWT.SINGLE | SWT.FULL_SELECTION, 2, toolkit);
+
+ // Adjust the control enablement
+ updateEnablement();
+ }
+
+ /**
+ * Indicates whether the sections parent page has become the active in the editor.
+ *
+ * @param active <code>True</code> if the parent page should be visible, <code>false</code> otherwise.
+ */
+ public void setActive(boolean active) {
+ // If the parent page has become the active and it does not contain
+ // unsaved data, than fill in the data from the selected node
+ if (active) {
+ // Leave everything unchanged if the page is in dirty state
+ if (getManagedForm().getContainer() instanceof AbstractEditorPage
+ && !((AbstractEditorPage)getManagedForm().getContainer()).isDirty()) {
+ Object node = ((AbstractEditorPage)getManagedForm().getContainer()).getEditorInputNode();
+ if (node instanceof IPeerModel) {
+ setupData((IPeerModel)node);
+ }
+ }
+ }
+ }
+
+ /**
+ * Initialize the page widgets based of the data from the given peer node.
+ * <p>
+ * This method may called multiple times during the lifetime of the page and
+ * the given configuration node might be even <code>null</code>.
+ *
+ * @param node The peer node or <code>null</code>.
+ */
+ public void setupData(final IPeerModel node) {
+ // Store a reference to the original data
+ od = node;
+ // Clean the original data copy
+ odc.clearProperties();
+ // Clean the working copy
+ wc.clearProperties();
+
+ // If no data is available, we are done
+ if (node == null) return;
+
+ // Thread access to the model is limited to the executors thread.
+ // Copy the data over to the working copy to ease the access.
+ Protocol.invokeAndWait(new Runnable() {
+ @Override
+ public void run() {
+ Map<String, String> properties = node.getPeer().getAttributes();
+ for (String key : properties.keySet()) {
+ wc.setProperty(key, properties.get(key));
+ odc.setProperty(key, properties.get(key));
+ }
+ }
+ });
+
+ // From here on, work with the working copy only!
+
+ // Remove the filtered attributes from the original data and working copy in
+ // order to get an exact base to determine the dirty state of the section.
+ for (String filteredName : FILTERED_NAMES) {
+ wc.setProperty(filteredName, null);
+ odc.setProperty(filteredName, null);
+ }
+
+ // Remove all "*.transient" properties
+ for (String name : odc.getProperties().keySet()) {
+ if (name.endsWith(".silent") || name.endsWith(".transient")) { //$NON-NLS-1$ //$NON-NLS-2$
+ wc.setProperty(name, null);
+ odc.setProperty(name, null);
+ }
+ }
+
+ // Make a <String, String> map out of the remaining properties
+ Map<String, String> attributes = new HashMap<String, String>();
+ Map<String, Object> properties = wc.getProperties();
+ for (String key : properties.keySet()) {
+ attributes.put(key, properties.get(key).toString());
+ }
+
+ // Pass on to the table part
+ if (tablePart != null) tablePart.setAttributes(attributes);
+
+ // Adjust the control enablement
+ updateEnablement();
+ }
+
+ /**
+ * Stores the page widgets current values to the given peer node.
+ * <p>
+ * This method may called multiple times during the lifetime of the page and
+ * the given peer node might be even <code>null</code>.
+ *
+ * @param node The GDB Remote configuration node or <code>null</code>.
+ */
+ public void extractData(final IPeerModel node) {
+ // If no data is available, we are done
+ if (node == null) return;
+
+ // Extract the table part attributes into the working copy
+ // Properties not longer available in the table part attributes
+ // are removed.
+ Map<String, String> attributes = tablePart.getAttributes();
+ Map<String, Object> properties = wc.getProperties();
+ final List<String> removed = new ArrayList<String>();
+ for (String key : properties.keySet()) {
+ if (attributes.containsKey(key)) {
+ wc.setProperty(key, attributes.get(key));
+ attributes.remove(key);
+ } else {
+ wc.setProperty(key, null);
+ removed.add(key);
+ }
+ }
+ // Add all remaining (new) attributes
+ if (!attributes.isEmpty()) {
+ for (String key : attributes.keySet()) {
+ wc.setProperty(key, attributes.get(key));
+ }
+ }
+
+ // Copy the working copy data back to the original properties container
+ Protocol.invokeAndWait(new Runnable() {
+ @Override
+ public void run() {
+ // To update the peer attributes, the peer needs to be recreated
+ IPeer oldPeer = node.getPeer();
+ // Create a write able copy of the peer attributes
+ Map<String, String> attributes = new HashMap<String, String>(oldPeer.getAttributes());
+ // Update with the current configured attributes
+ for (String key : wc.getProperties().keySet()) {
+ String value = wc.getStringProperty(key);
+ if (value != null) {
+ attributes.put(key, value);
+ } else {
+ attributes.remove(key);
+ }
+ }
+ // Remove the disappeared properties
+ for (String key : removed) attributes.remove(key);
+
+ // Create the new peer
+ IPeer newPeer = oldPeer instanceof PeerRedirector ? new PeerRedirector(((PeerRedirector)oldPeer).getParent(), attributes) : new TransientPeer(attributes);
+ // Update the peer node instance (silently)
+ boolean changed = node.setChangeEventsEnabled(false);
+ node.setProperty(IPeerModelProperties.PROP_INSTANCE, newPeer);
+ if (changed) node.setChangeEventsEnabled(true);
+ }
+ });
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.forms.AbstractFormPart#commit(boolean)
+ */
+ @Override
+ public void commit(boolean onSave) {
+ // Remember the current dirty state
+ boolean needsSaving = isDirty();
+ // Call the super implementation (resets the dirty state)
+ super.commit(onSave);
+
+ // Nothing to do if not on save or saving is not needed
+ if (!onSave || !needsSaving) return;
+
+ // Extract the data into the original data node
+ extractData(od);
+
+ // If the working copy and the original data copy differs at this point,
+ // the data changed really and we have to write the peer to the persistence
+ // storage.
+ if (!odc.equals(wc)) {
+ try {
+ // Get the persistence service
+ IPersistenceService persistenceService = ServiceManager.getInstance().getService(IPersistenceService.class);
+ if (persistenceService == null) throw new IOException("Persistence service instance unavailable."); //$NON-NLS-1$
+ // Save the peer node to the new persistence storage
+ persistenceService.write(od.getPeer().getAttributes());
+ } catch (IOException e) {
+ // Pass on to the editor page
+ }
+
+ Protocol.invokeLater(new Runnable() {
+ @Override
+ public void run() {
+ // Trigger a change event for the original data node
+ od.fireChangeEvent("properties", null, od.getProperties()); //$NON-NLS-1$
+ }
+ });
+ }
+ }
+
+ /**
+ * Called to signal that the data associated has been changed.
+ *
+ * @param e The event which triggered the invocation or <code>null</code>.
+ */
+ public void dataChanged(TypedEvent e) {
+ boolean isDirty = false;
+
+ if (tablePart != null) {
+ // Get the attributes from the table part
+ Map<String, String> attributes = tablePart.getAttributes();
+ Map<String, Object> properties = odc.getProperties();
+ if (attributes.size() != properties.size()) {
+ isDirty = true;
+ } else {
+ for (String key : attributes.keySet()) {
+ if (!properties.containsKey(key) || !properties.get(key).equals(attributes.get(key))) {
+ isDirty = true;
+ break;
+ }
+ }
+ }
+ }
+
+ // If dirty, mark the form part dirty.
+ // Otherwise call refresh() to reset the dirty (and stale) flag
+ markDirty(isDirty);
+ }
+
+ /**
+ * Updates the control enablement.
+ */
+ protected void updateEnablement() {
+ // Determine the input
+ final Object input = getManagedForm().getInput();
+
+ // Determine if the peer is a static peer
+ final AtomicBoolean isStatic = new AtomicBoolean();
+ Runnable runnable = new Runnable() {
+ @Override
+ public void run() {
+ if (input instanceof IPeerModel) {
+ String value = ((IPeerModel)input).getPeer().getAttributes().get("static.transient"); //$NON-NLS-1$
+ isStatic.set(value != null && Boolean.parseBoolean(value.trim()));
+ }
+ }
+ };
+ if (Protocol.isDispatchThread()) runnable.run();
+ else Protocol.invokeAndWait(runnable);
+
+ if (tablePart != null) tablePart.setReadOnly(!isStatic.get());
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/sections/GeneralInformationSection.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/sections/GeneralInformationSection.java
new file mode 100644
index 000000000..92116bd0f
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/sections/GeneralInformationSection.java
@@ -0,0 +1,437 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.ui.editor.sections;
+
+import java.io.IOException;
+import java.net.URI;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.fieldassist.FieldDecorationRegistry;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.TypedEvent;
+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.tcf.core.TransientPeer;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.runtime.persistence.interfaces.IPersistableNodeProperties;
+import org.eclipse.tcf.te.runtime.persistence.interfaces.IPersistenceService;
+import org.eclipse.tcf.te.runtime.properties.PropertiesContainer;
+import org.eclipse.tcf.te.runtime.services.ServiceManager;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModelProperties;
+import org.eclipse.tcf.te.tcf.locator.nodes.PeerRedirector;
+import org.eclipse.tcf.te.tcf.ui.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.ui.editor.controls.InfoSectionPeerIdControl;
+import org.eclipse.tcf.te.tcf.ui.editor.controls.InfoSectionPeerNameControl;
+import org.eclipse.tcf.te.tcf.ui.internal.ImageConsts;
+import org.eclipse.tcf.te.tcf.ui.nls.Messages;
+import org.eclipse.tcf.te.ui.forms.parts.AbstractSection;
+import org.eclipse.tcf.te.ui.swt.SWTControlUtil;
+import org.eclipse.tcf.te.ui.views.editor.pages.AbstractEditorPage;
+import org.eclipse.ui.forms.IManagedForm;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.Section;
+
+/**
+ * Peer general information section implementation.
+ */
+public class GeneralInformationSection extends AbstractSection {
+ // The section sub controls
+ private InfoSectionPeerIdControl idControl = null;
+ private InfoSectionPeerNameControl nameControl = null;
+
+ private Text linkState = null;
+ private Label linkStateImage = null;
+
+ // Reference to the original data object
+ /* default */ IPeerModel od;
+ // Reference to a copy of the original data
+ /* default */ final IPropertiesContainer odc = new PropertiesContainer();
+ // Reference to the properties container representing the working copy for the section
+ /* default */ final IPropertiesContainer wc = new PropertiesContainer();
+
+ /**
+ * Constructor.
+ *
+ * @param form The parent managed form. Must not be <code>null</code>.
+ * @param parent The parent composite. Must not be <code>null</code>.
+ */
+ public GeneralInformationSection(IManagedForm form, Composite parent) {
+ super(form, parent, Section.DESCRIPTION);
+ createClient(getSection(), form.getToolkit());
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.forms.AbstractFormPart#dispose()
+ */
+ @Override
+ public void dispose() {
+ if (idControl != null) { idControl.dispose(); idControl = null; }
+ if (nameControl != null) { nameControl.dispose(); nameControl = null; }
+ super.dispose();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.forms.parts.AbstractSection#getAdapter(java.lang.Class)
+ */
+ @Override
+ public Object getAdapter(Class adapter) {
+ if (InfoSectionPeerIdControl.class.equals(adapter)) {
+ return idControl;
+ }
+ if (InfoSectionPeerNameControl.class.equals(adapter)) {
+ return nameControl;
+ }
+ return super.getAdapter(adapter);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.forms.parts.AbstractSection#createClient(org.eclipse.ui.forms.widgets.Section, org.eclipse.ui.forms.widgets.FormToolkit)
+ */
+ @Override
+ protected void createClient(Section section, FormToolkit toolkit) {
+ Assert.isNotNull(section);
+ Assert.isNotNull(toolkit);
+
+ // Configure the section
+ section.setText(Messages.GeneralInformationSection_title);
+ section.setDescription(Messages.GeneralInformationSection_description);
+
+ section.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+
+ // Create the section client
+ Composite client = createClientContainer(section, 2, toolkit);
+ Assert.isNotNull(client);
+ section.setClient(client);
+
+ // Create the peer id control
+ idControl = new InfoSectionPeerIdControl(this);
+ idControl.setFormToolkit(toolkit);
+ idControl.setParentControlIsInnerPanel(true);
+ idControl.setupPanel(client);
+
+ // Create the peer name control
+ nameControl = new InfoSectionPeerNameControl(this);
+ nameControl.setFormToolkit(toolkit);
+ nameControl.setParentControlIsInnerPanel(true);
+ nameControl.setupPanel(client);
+
+ // Create the peer link state control
+ Label label = new Label(client, SWT.HORIZONTAL);
+ label.setText(Messages.GeneralInformationSection_state);
+ GridData layoutData = new GridData(SWT.LEFT, SWT.TOP, false, false);
+ layoutData.verticalIndent = 4;
+ label.setLayoutData(layoutData);
+
+ Composite panel = new Composite(client, SWT.NONE);
+ GridLayout layout = new GridLayout(2, false);
+ layout.marginHeight = 0; layout.marginWidth = 0; layout.horizontalSpacing = 0;
+ panel.setLayout(new GridLayout(2, false));
+ layoutData = new GridData(SWT.FILL, SWT.CENTER, true, false);
+ if (nameControl.getEditFieldControlDecoration() != null) {
+ layoutData.horizontalIndent = FieldDecorationRegistry.getDefault().getMaximumDecorationWidth() / 2;
+ }
+ panel.setLayoutData(layoutData);
+
+ linkStateImage = new Label(panel, SWT.HORIZONTAL);
+ layoutData = new GridData(SWT.CENTER, SWT.TOP, false, false);
+ layoutData.verticalIndent = 1; layoutData.widthHint = 10;
+ linkStateImage.setLayoutData(layoutData);
+
+ linkState = new Text(panel, SWT.READ_ONLY | SWT.WRAP | SWT.MULTI);
+ layoutData = new GridData(SWT.FILL, SWT.CENTER, true, false);
+ layoutData.heightHint = SWTControlUtil.convertHeightInCharsToPixels(linkState, 2);
+ linkState.setLayoutData(layoutData);
+
+ // Adjust the control enablement
+ updateEnablement();
+ }
+
+ /**
+ * Indicates whether the sections parent page has become the active in the editor.
+ *
+ * @param active <code>True</code> if the parent page should be visible, <code>false</code> otherwise.
+ */
+ public void setActive(boolean active) {
+ // If the parent page has become the active and it does not contain
+ // unsaved data, than fill in the data from the selected node
+ if (active) {
+ // Leave everything unchanged if the page is in dirty state
+ if (getManagedForm().getContainer() instanceof AbstractEditorPage
+ && !((AbstractEditorPage)getManagedForm().getContainer()).isDirty()) {
+ Object node = ((AbstractEditorPage)getManagedForm().getContainer()).getEditorInputNode();
+ if (node instanceof IPeerModel) {
+ setupData((IPeerModel)node);
+ }
+ }
+ }
+ }
+
+ /**
+ * Initialize the page widgets based of the data from the given peer node.
+ * <p>
+ * This method may called multiple times during the lifetime of the page and
+ * the given peer node might be even <code>null</code>.
+ *
+ * @param node The peer node or <code>null</code>.
+ */
+ public void setupData(final IPeerModel node) {
+ // Store a reference to the original data
+ od = node;
+ // Clean the original data copy
+ odc.clearProperties();
+ // Clean the working copy
+ wc.clearProperties();
+
+ // If no data is available, we are done
+ if (node == null) return;
+
+ // Thread access to the model is limited to the executors thread.
+ // Copy the data over to the working copy to ease the access.
+ Protocol.invokeAndWait(new Runnable() {
+ @Override
+ public void run() {
+ // The section is handling the ID, the name and
+ // the link state. Ignore other properties.
+ odc.setProperty(IPeerModelProperties.PROP_STATE, node.getProperty(IPeerModelProperties.PROP_STATE));
+ odc.setProperty(IPeer.ATTR_ID, node.getPeer().getAttributes().get(IPeer.ATTR_ID));
+ odc.setProperty(IPeer.ATTR_NAME, node.getPeer().getAttributes().get(IPeer.ATTR_NAME));
+ // Initially, the working copy is a duplicate of the original data copy
+ wc.setProperties(odc.getProperties());
+ }
+ });
+
+ // From here on, work with the working copy only!
+
+ if (idControl != null) {
+ idControl.setEditFieldControlText(wc.getStringProperty(IPeer.ATTR_ID));
+ }
+
+ if (nameControl != null) {
+ nameControl.setEditFieldControlText(wc.getStringProperty(IPeer.ATTR_NAME));
+ }
+
+ if (linkState != null && linkStateImage != null) {
+ String state = wc.getStringProperty(IPeerModelProperties.PROP_STATE);
+ linkState.setText(Messages.getString("GeneralInformationSection_state_" + (state != null ? state.replace('-', '_') : "_1"))); //$NON-NLS-1$ //$NON-NLS-2$
+
+ switch (wc.getIntProperty(IPeerModelProperties.PROP_STATE)) {
+ case 0:
+ linkStateImage.setImage(UIPlugin.getImage(ImageConsts.GOLD_OVR));
+ break;
+ case 1:
+ linkStateImage.setImage(UIPlugin.getImage(ImageConsts.GREEN_OVR));
+ break;
+ case 2:
+ linkStateImage.setImage(UIPlugin.getImage(ImageConsts.RED_OVR));
+ break;
+ case 3:
+ linkStateImage.setImage(UIPlugin.getImage(ImageConsts.RED_X_OVR));
+ break;
+ default:
+ linkStateImage.setImage(UIPlugin.getImage(ImageConsts.GREY_OVR));
+ }
+ }
+
+ // Adjust the control enablement
+ updateEnablement();
+ }
+
+ /**
+ * Stores the page widgets current values to the given peer node.
+ * <p>
+ * This method may called multiple times during the lifetime of the page and
+ * the given peer node might be even <code>null</code>.
+ *
+ * @param node The GDB Remote configuration node or <code>null</code>.
+ */
+ public void extractData(final IPeerModel node) {
+ // If no data is available, we are done
+ if (node == null) return;
+
+ // Extract the widget data into the working copy
+ if (idControl != null) {
+ wc.setProperty(IPeer.ATTR_ID, idControl.getEditFieldControlText());
+ }
+
+ if (nameControl != null) {
+ wc.setProperty(IPeer.ATTR_NAME, nameControl.getEditFieldControlText());
+ }
+
+ // If the peer name changed, copy the working copy data back to
+ // the original properties container
+ if (!odc.getStringProperty(IPeer.ATTR_NAME).equals(wc.getStringProperty(IPeer.ATTR_NAME))) {
+ Protocol.invokeAndWait(new Runnable() {
+ @Override
+ public void run() {
+ // To update the peer attributes, the peer needs to be recreated
+ IPeer oldPeer = node.getPeer();
+ // Create a write able copy of the peer attributes
+ Map<String, String> attributes = new HashMap<String, String>(oldPeer.getAttributes());
+ // Update the (managed) attributes from the working copy
+ attributes.put(IPeer.ATTR_NAME, wc.getStringProperty(IPeer.ATTR_NAME));
+ // Update the persistence storage URI (if set)
+ if (attributes.containsKey(IPersistableNodeProperties.PROPERTY_URI)) {
+ IPersistenceService persistenceService = ServiceManager.getInstance().getService(IPersistenceService.class);
+ if (persistenceService != null) {
+ URI uri = null;
+ try {
+ uri = persistenceService.getURI(attributes);
+ } catch (IOException e) { /* ignored on purpose */ }
+ if (uri != null) attributes.put(IPersistableNodeProperties.PROPERTY_URI, uri.toString());
+ else attributes.remove(IPersistableNodeProperties.PROPERTY_URI);
+ }
+ }
+ // Create the new peer
+ IPeer newPeer = oldPeer instanceof PeerRedirector ? new PeerRedirector(((PeerRedirector)oldPeer).getParent(), attributes) : new TransientPeer(attributes);
+ // Update the peer node instance (silently)
+ boolean changed = node.setChangeEventsEnabled(false);
+ node.setProperty(IPeerModelProperties.PROP_INSTANCE, newPeer);
+ if (changed) node.setChangeEventsEnabled(true);
+ }
+ });
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.forms.parts.AbstractSection#isValid()
+ */
+ @Override
+ public boolean isValid() {
+ boolean valid = super.isValid();
+
+ if (idControl != null) {
+ valid &= idControl.isValid();
+ setMessage(idControl.getMessage(), idControl.getMessageType());
+ }
+
+ if (nameControl != null) {
+ valid &= nameControl.isValid();
+ if (nameControl.getMessageType() > getMessageType()) {
+ setMessage(nameControl.getMessage(), nameControl.getMessageType());
+ }
+ }
+
+ return valid;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.forms.AbstractFormPart#commit(boolean)
+ */
+ @Override
+ public void commit(boolean onSave) {
+ // Remember the current dirty state
+ boolean needsSaving = isDirty();
+ // Call the super implementation (resets the dirty state)
+ super.commit(onSave);
+
+ // Nothing to do if not on save or saving is not needed
+ if (!onSave || !needsSaving) return;
+
+ // Remember the old name
+ String oldName = odc.getStringProperty(IPeer.ATTR_NAME);
+ // Extract the data into the original data node
+ extractData(od);
+
+ // If the name changed, trigger a save of the data
+ if (!oldName.equals(wc.getStringProperty(IPeer.ATTR_NAME))) {
+ try {
+ // Get the persistence service
+ IPersistenceService persistenceService = ServiceManager.getInstance().getService(IPersistenceService.class);
+ if (persistenceService == null) throw new IOException("Persistence service instance unavailable."); //$NON-NLS-1$
+ // Remove the old persistence storage using the original data copy
+ persistenceService.delete(odc.getProperties());
+ // Save the peer node to the new persistence storage
+ persistenceService.write(od.getPeer().getAttributes());
+ } catch (IOException e) {
+ // Pass on to the editor page
+ }
+
+ Protocol.invokeLater(new Runnable() {
+ @Override
+ public void run() {
+ // Trigger a change event for the original data node
+ od.fireChangeEvent("properties", null, od.getProperties()); //$NON-NLS-1$
+ }
+ });
+ }
+ }
+
+ /**
+ * Called to signal that the data associated has been changed.
+ *
+ * @param e The event which triggered the invocation or <code>null</code>.
+ */
+ public void dataChanged(TypedEvent e) {
+ boolean isDirty = false;
+
+ // Compare the data
+ if (idControl != null) {
+ String id = idControl.getEditFieldControlText();
+ if ("".equals(id)) { //$NON-NLS-1$
+ String value = odc.getStringProperty(IPeer.ATTR_ID);
+ isDirty |= value != null && !"".equals(value.trim()); //$NON-NLS-1$
+ } else {
+ isDirty |= !odc.isProperty(IPeer.ATTR_ID, id);
+ }
+ }
+
+ if (nameControl != null) {
+ String name = nameControl.getEditFieldControlText();
+ if ("".equals(name)) { //$NON-NLS-1$
+ String value = odc.getStringProperty(IPeer.ATTR_NAME);
+ isDirty |= value != null && !"".equals(value.trim()); //$NON-NLS-1$
+ } else {
+ isDirty |= !odc.isProperty(IPeer.ATTR_NAME, name);
+ }
+ }
+
+ // If dirty, mark the form part dirty.
+ // Otherwise call refresh() to reset the dirty (and stale) flag
+ markDirty(isDirty);
+ }
+
+ /**
+ * Updates the control enablement.
+ */
+ protected void updateEnablement() {
+ // Determine the input
+ final Object input = getManagedForm().getInput();
+
+ // The id control is always read-only
+ if (idControl != null) SWTControlUtil.setEnabled(idControl.getEditFieldControl(), false);
+
+ // The name control is enabled for static peers
+ if (nameControl != null) {
+ final AtomicBoolean isStatic = new AtomicBoolean();
+ Runnable runnable = new Runnable() {
+ @Override
+ public void run() {
+ if (input instanceof IPeerModel) {
+ String value = ((IPeerModel)input).getPeer().getAttributes().get("static.transient"); //$NON-NLS-1$
+ isStatic.set(value != null && Boolean.parseBoolean(value.trim()));
+ }
+ }
+ };
+ if (Protocol.isDispatchThread()) runnable.run();
+ else Protocol.invokeAndWait(runnable);
+
+ SWTControlUtil.setEnabled(nameControl.getEditFieldControl(), isStatic.get());
+ }
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/sections/ServicesSection.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/sections/ServicesSection.java
new file mode 100644
index 000000000..05b2620b0
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/sections/ServicesSection.java
@@ -0,0 +1,152 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.ui.editor.sections;
+
+import java.util.Map;
+
+import org.eclipse.core.runtime.Assert;
+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.Group;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.runtime.properties.PropertiesContainer;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModelProperties;
+import org.eclipse.tcf.te.tcf.ui.nls.Messages;
+import org.eclipse.tcf.te.ui.forms.parts.AbstractSection;
+import org.eclipse.tcf.te.ui.swt.SWTControlUtil;
+import org.eclipse.tcf.te.ui.views.editor.pages.AbstractEditorPage;
+import org.eclipse.ui.forms.IManagedForm;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.Section;
+
+/**
+ * Peer services section implementation.
+ */
+public class ServicesSection extends AbstractSection {
+ // The section sub controls
+ private Text local;
+ private Text remote;
+
+ // Reference to the original data object
+ /* default */ IPeerModel od;
+ // Reference to a copy of the original data
+ /* default */ final IPropertiesContainer odc = new PropertiesContainer();
+
+ /**
+ * Constructor.
+ *
+ * @param form The parent managed form. Must not be <code>null</code>.
+ * @param parent The parent composite. Must not be <code>null</code>.
+ */
+ public ServicesSection(IManagedForm form, Composite parent) {
+ super(form, parent, Section.DESCRIPTION);
+ createClient(getSection(), form.getToolkit());
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.forms.parts.AbstractSection#createClient(org.eclipse.ui.forms.widgets.Section, org.eclipse.ui.forms.widgets.FormToolkit)
+ */
+ @Override
+ protected void createClient(Section section, FormToolkit toolkit) {
+ Assert.isNotNull(section);
+ Assert.isNotNull(toolkit);
+
+ // Configure the section
+ section.setText(Messages.ServicesSection_title);
+ section.setDescription(Messages.ServicesSection_description);
+
+ section.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+
+ // Create the section client
+ Composite client = createClientContainer(section, 1, toolkit);
+ Assert.isNotNull(client);
+ section.setClient(client);
+
+ Group group = new Group(client, SWT.NONE);
+ group.setText(Messages.ServicesSection_group_local_title);
+ group.setLayout(new GridLayout());
+ group.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+
+ local = new Text(group, SWT.READ_ONLY | SWT.WRAP | SWT.MULTI);
+ GridData layoutData = new GridData(SWT.FILL, SWT.CENTER, true, false);
+ layoutData.widthHint = SWTControlUtil.convertWidthInCharsToPixels(local, 20);
+ layoutData.heightHint = SWTControlUtil.convertHeightInCharsToPixels(local, 5);
+ local.setLayoutData(layoutData);
+
+ group = new Group(client, SWT.NONE);
+ group.setText(Messages.ServicesSection_group_remote_title);
+ group.setLayout(new GridLayout());
+ group.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+
+ remote = new Text(group, SWT.READ_ONLY | SWT.WRAP | SWT.MULTI);
+ layoutData = new GridData(SWT.FILL, SWT.CENTER, true, false);
+ layoutData.widthHint = SWTControlUtil.convertWidthInCharsToPixels(local, 20);
+ layoutData.heightHint = SWTControlUtil.convertHeightInCharsToPixels(remote, 5);
+ remote.setLayoutData(layoutData);
+ }
+
+ /**
+ * Indicates whether the sections parent page has become the active in the editor.
+ *
+ * @param active <code>True</code> if the parent page should be visible, <code>false</code> otherwise.
+ */
+ public void setActive(boolean active) {
+ // If the parent page has become the active and it does not contain
+ // unsaved data, than fill in the data from the selected node
+ if (active) {
+ // Leave everything unchanged if the page is in dirty state
+ if (getManagedForm().getContainer() instanceof AbstractEditorPage
+ && !((AbstractEditorPage)getManagedForm().getContainer()).isDirty()) {
+ Object node = ((AbstractEditorPage)getManagedForm().getContainer()).getEditorInputNode();
+ if (node instanceof IPeerModel) {
+ setupData((IPeerModel)node);
+ }
+ }
+ }
+ }
+
+ /**
+ * Initialize the page widgets based of the data from the given peer node.
+ * <p>
+ * This method may called multiple times during the lifetime of the page and
+ * the given configuration node might be even <code>null</code>.
+ *
+ * @param node The peer node or <code>null</code>.
+ */
+ public void setupData(final IPeerModel node) {
+ // Store a reference to the original data
+ od = node;
+ // Clean the original data copy
+ odc.clearProperties();
+
+ // If no data is available, we are done
+ if (node == null) return;
+
+ // Thread access to the model is limited to the executors thread.
+ // Copy the data over to the working copy to ease the access.
+ Protocol.invokeAndWait(new Runnable() {
+ @Override
+ public void run() {
+ Map<String, Object> properties = node.getProperties();
+ odc.setProperties(properties);
+ }
+ });
+
+ String value = odc.getStringProperty(IPeerModelProperties.PROP_LOCAL_SERVICES);
+ SWTControlUtil.setText(local, value != null ? value : ""); //$NON-NLS-1$
+ value = odc.getStringProperty(IPeerModelProperties.PROP_REMOTE_SERVICES);
+ SWTControlUtil.setText(remote, value != null ? value : ""); //$NON-NLS-1$
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/sections/TransportSection.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/sections/TransportSection.java
new file mode 100644
index 000000000..459982a8c
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/sections/TransportSection.java
@@ -0,0 +1,454 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.ui.editor.sections;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.TypedEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.tcf.core.TransientPeer;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.runtime.persistence.interfaces.IPersistenceService;
+import org.eclipse.tcf.te.runtime.properties.PropertiesContainer;
+import org.eclipse.tcf.te.runtime.services.ServiceManager;
+import org.eclipse.tcf.te.tcf.core.Tcf;
+import org.eclipse.tcf.te.tcf.core.interfaces.ITransportTypes;
+import org.eclipse.tcf.te.tcf.locator.ScannerRunnable;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModelProperties;
+import org.eclipse.tcf.te.tcf.locator.nodes.PeerRedirector;
+import org.eclipse.tcf.te.tcf.ui.controls.CustomTransportPanel;
+import org.eclipse.tcf.te.tcf.ui.controls.PipeTransportPanel;
+import org.eclipse.tcf.te.tcf.ui.controls.TcpTransportPanel;
+import org.eclipse.tcf.te.tcf.ui.controls.TransportTypeControl;
+import org.eclipse.tcf.te.tcf.ui.editor.controls.TransportSectionTypeControl;
+import org.eclipse.tcf.te.tcf.ui.editor.controls.TransportSectionTypePanelControl;
+import org.eclipse.tcf.te.tcf.ui.nls.Messages;
+import org.eclipse.tcf.te.ui.controls.interfaces.IWizardConfigurationPanel;
+import org.eclipse.tcf.te.ui.forms.parts.AbstractSection;
+import org.eclipse.tcf.te.ui.interfaces.data.IDataExchangeNode;
+import org.eclipse.tcf.te.ui.interfaces.data.IDataExchangeNode3;
+import org.eclipse.tcf.te.ui.swt.SWTControlUtil;
+import org.eclipse.tcf.te.ui.views.editor.pages.AbstractEditorPage;
+import org.eclipse.ui.forms.IManagedForm;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.Section;
+
+/**
+ * Peer transport section implementation.
+ */
+public class TransportSection extends AbstractSection {
+ // The section sub controls
+ private TransportSectionTypeControl transportTypeControl = null;
+ /* default */ TransportSectionTypePanelControl transportTypePanelControl = null;
+
+ // Reference to the original data object
+ /* default */ IPeerModel od;
+ // Reference to a copy of the original data
+ /* default */ final IPropertiesContainer odc = new PropertiesContainer();
+ // Reference to the properties container representing the working copy for the section
+ /* default */ final IPropertiesContainer wc = new PropertiesContainer();
+
+ /**
+ * Constructor.
+ *
+ * @param form The parent managed form. Must not be <code>null</code>.
+ * @param parent The parent composite. Must not be <code>null</code>.
+ */
+ public TransportSection(IManagedForm form, Composite parent) {
+ super(form, parent, Section.DESCRIPTION);
+ createClient(getSection(), form.getToolkit());
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.forms.AbstractFormPart#dispose()
+ */
+ @Override
+ public void dispose() {
+ super.dispose();
+ if (transportTypeControl != null) { transportTypeControl.dispose(); transportTypeControl = null; }
+ if (transportTypePanelControl != null) { transportTypePanelControl.dispose(); transportTypePanelControl = null; }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.forms.parts.AbstractSection#getAdapter(java.lang.Class)
+ */
+ @Override
+ public Object getAdapter(Class adapter) {
+ if (TransportSectionTypeControl.class.equals(adapter)) {
+ return transportTypeControl;
+ }
+ if (TransportSectionTypePanelControl.class.equals(adapter)) {
+ return transportTypePanelControl;
+ }
+ return super.getAdapter(adapter);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.forms.parts.AbstractSection#createClient(org.eclipse.ui.forms.widgets.Section, org.eclipse.ui.forms.widgets.FormToolkit)
+ */
+ @Override
+ protected void createClient(Section section, FormToolkit toolkit) {
+ Assert.isNotNull(section);
+ Assert.isNotNull(toolkit);
+
+ // Configure the section
+ section.setText(Messages.TransportSection_title);
+ section.setDescription(Messages.TransportSection_description);
+
+ section.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+
+ // Create the section client
+ Composite client = createClientContainer(section, 2, toolkit);
+ Assert.isNotNull(client);
+ section.setClient(client);
+
+ // Create the transport type control
+ transportTypeControl = new TransportSectionTypeControl(this);
+ transportTypeControl.setFormToolkit(toolkit);
+ transportTypeControl.setupPanel(client);
+
+ createEmptySpace(client, 2, toolkit);
+
+ // The transport type specific controls are placed into a stack
+ transportTypePanelControl = new TransportSectionTypePanelControl(this);
+
+ // Create and add the panels
+ TcpTransportPanel tcpTransportPanel = new TcpTransportPanel(transportTypePanelControl);
+ transportTypePanelControl.addConfigurationPanel(ITransportTypes.TRANSPORT_TYPE_TCP, tcpTransportPanel);
+ transportTypePanelControl.addConfigurationPanel(ITransportTypes.TRANSPORT_TYPE_SSL, tcpTransportPanel);
+ transportTypePanelControl.addConfigurationPanel(ITransportTypes.TRANSPORT_TYPE_PIPE, new PipeTransportPanel(transportTypePanelControl));
+ transportTypePanelControl.addConfigurationPanel(ITransportTypes.TRANSPORT_TYPE_CUSTOM, new CustomTransportPanel(transportTypePanelControl));
+
+ // Setup the panel control
+ transportTypePanelControl.setupPanel(client, TransportTypeControl.TRANSPORT_TYPES, toolkit);
+ GridData layoutData = new GridData(SWT.FILL, SWT.FILL, true, true);
+ layoutData.horizontalSpan = 2;
+ transportTypePanelControl.getPanel().setLayoutData(layoutData);
+ toolkit.adapt(transportTypePanelControl.getPanel());
+
+ transportTypePanelControl.showConfigurationPanel(transportTypeControl.getSelectedTransportType());
+
+ // Adjust the control enablement
+ updateEnablement();
+ }
+
+ /**
+ * Indicates whether the sections parent page has become the active in the editor.
+ *
+ * @param active <code>True</code> if the parent page should be visible, <code>false</code> otherwise.
+ */
+ public void setActive(boolean active) {
+ // If the parent page has become the active and it does not contain
+ // unsaved data, than fill in the data from the selected node
+ if (active) {
+ // Leave everything unchanged if the page is in dirty state
+ if (getManagedForm().getContainer() instanceof AbstractEditorPage
+ && !((AbstractEditorPage)getManagedForm().getContainer()).isDirty()) {
+ Object node = ((AbstractEditorPage)getManagedForm().getContainer()).getEditorInputNode();
+ if (node instanceof IPeerModel) {
+ setupData((IPeerModel)node);
+ }
+ }
+ }
+ }
+
+ /**
+ * Initialize the page widgets based of the data from the given peer node.
+ * <p>
+ * This method may called multiple times during the lifetime of the page and
+ * the given configuration node might be even <code>null</code>.
+ *
+ * @param node The peer node or <code>null</code>.
+ */
+ public void setupData(final IPeerModel node) {
+ // Store a reference to the original data
+ od = node;
+ // Clean the original data copy
+ odc.clearProperties();
+ // Clean the working copy
+ wc.clearProperties();
+
+ // If no data is available, we are done
+ if (node == null) return;
+
+ // Thread access to the model is limited to the executors thread.
+ // Copy the data over to the working copy to ease the access.
+ Protocol.invokeAndWait(new Runnable() {
+ @Override
+ public void run() {
+ // The section is handling the transport name and the
+ // transport type specific properties. Ignore other properties.
+ odc.setProperty(IPeer.ATTR_TRANSPORT_NAME, node.getPeer().getTransportName());
+ if (transportTypePanelControl != null) {
+ IPropertiesContainer src = new PropertiesContainer();
+ Map<String, String> properties = node.getPeer().getAttributes();
+ for (String key : properties.keySet()) {
+ src.setProperty(key, properties.get(key));
+ }
+
+ for (String id : transportTypePanelControl.getConfigurationPanelIds()) {
+ IWizardConfigurationPanel panel = transportTypePanelControl.getConfigurationPanel(id);
+ if (panel instanceof IDataExchangeNode3) ((IDataExchangeNode3)panel).copyData(src, odc);
+ }
+ }
+
+ // Initially, the working copy is a duplicate of the original data copy
+ wc.setProperties(odc.getProperties());
+ }
+ });
+
+ // From here on, work with the working copy only!
+
+ if (transportTypeControl != null) {
+ String transportType = wc.getStringProperty(IPeer.ATTR_TRANSPORT_NAME);
+ if (transportType != null && !"".equals(transportType)) { //$NON-NLS-1$
+ transportTypeControl.setSelectedTransportType(transportType);
+
+ if (transportTypePanelControl != null) {
+ transportTypePanelControl.showConfigurationPanel(transportType);
+ IWizardConfigurationPanel panel = transportTypePanelControl.getConfigurationPanel(transportType);
+ if (panel instanceof IDataExchangeNode) ((IDataExchangeNode)panel).setupData(wc);
+ }
+ }
+ }
+
+ // Adjust the control enablement
+ updateEnablement();
+ }
+
+ /**
+ * Stores the page widgets current values to the given peer node.
+ * <p>
+ * This method may called multiple times during the lifetime of the page and
+ * the given peer node might be even <code>null</code>.
+ *
+ * @param node The GDB Remote configuration node or <code>null</code>.
+ */
+ public void extractData(final IPeerModel node) {
+ // If no data is available, we are done
+ if (node == null) return;
+
+ // The list of removed attributes
+ final List<String> removed = new ArrayList<String>();
+ // Get the current key set from the working copy
+ Set<String> currentKeySet = wc.getProperties().keySet();
+
+ // Get the current transport type from the working copy
+ String oldTransportType = wc.getStringProperty(IPeer.ATTR_TRANSPORT_NAME);
+ if (oldTransportType != null) {
+ // Get the current transport type configuration panel
+ IWizardConfigurationPanel panel = transportTypePanelControl.getConfigurationPanel(oldTransportType);
+ // And clean out the current transport type specific attributes from the working copy
+ if (panel instanceof IDataExchangeNode3) ((IDataExchangeNode3)panel).removeData(wc);
+ }
+
+ // Get the new transport type from the widget
+ String transportType = transportTypeControl.getSelectedTransportType();
+ // And write the new transport to the working copy
+ wc.setProperty(IPeer.ATTR_TRANSPORT_NAME, transportType);
+ // Get the new transport type configuration panel
+ IWizardConfigurationPanel panel = transportTypePanelControl.getConfigurationPanel(transportType);
+ // And extract the new attributes into the working copy
+ if (panel instanceof IDataExchangeNode) ((IDataExchangeNode)panel).extractData(wc);
+
+ // If the data has not changed compared to the original data copy,
+ // we are done here and return immediately
+ if (odc.equals(wc)) return;
+
+ // Get the new key set from the working copy
+ Set<String> newKeySet = wc.getProperties().keySet();
+ // Everything from the old key set not found in the new key set is a removed attribute
+ for (String key : currentKeySet) {
+ if (!newKeySet.contains(key)) removed.add(key);
+ }
+
+ // Copy the working copy data back to the original properties container
+ Protocol.invokeAndWait(new Runnable() {
+ @Override
+ public void run() {
+ // To update the peer attributes, the peer needs to be recreated
+ IPeer oldPeer = node.getPeer();
+ // Create a write able copy of the peer attributes
+ Map<String, String> attributes = new HashMap<String, String>(oldPeer.getAttributes());
+ // Clean out the removed attributes
+ for (String key : removed) attributes.remove(key);
+ // Update with the current configured attributes
+ for (String key : wc.getProperties().keySet()) {
+ String value = wc.getStringProperty(key);
+ if (value != null) {
+ attributes.put(key, value);
+ } else {
+ attributes.remove(key);
+ }
+ }
+
+ // If there is still a open channel to the old peer, close it by force
+ IChannel channel = Tcf.getChannelManager().getChannel(oldPeer);
+ if (channel != null) channel.close();
+
+ // Create the new peer
+ IPeer newPeer = oldPeer instanceof PeerRedirector ? new PeerRedirector(((PeerRedirector)oldPeer).getParent(), attributes) : new TransientPeer(attributes);
+ // Update the peer node instance (silently)
+ boolean changed = node.setChangeEventsEnabled(false);
+ node.setProperty(IPeerModelProperties.PROP_INSTANCE, newPeer);
+ // As the transport changed, we have to reset the state back to "unknown"
+ // and clear out the services and DNS markers
+ node.setProperty(IPeerModelProperties.PROP_STATE, IPeerModelProperties.STATE_UNKNOWN);
+ node.setProperty(IPeerModelProperties.PROP_LOCAL_SERVICES, null);
+ node.setProperty(IPeerModelProperties.PROP_REMOTE_SERVICES, null);
+ node.setProperty("dns.name.transient", null); //$NON-NLS-1$
+ node.setProperty("dns.lastIP.transient", null); //$NON-NLS-1$
+ node.setProperty("dns.skip.transient", null); //$NON-NLS-1$
+ if (changed) node.setChangeEventsEnabled(true);
+ }
+ });
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.forms.parts.AbstractSection#isValid()
+ */
+ @Override
+ public boolean isValid() {
+ boolean valid = super.isValid();
+
+ if (transportTypeControl != null) {
+ valid &= transportTypeControl.isValid();
+ if (transportTypeControl.getMessageType() > getMessageType()) {
+ setMessage(transportTypeControl.getMessage(), transportTypeControl.getMessageType());
+ }
+ }
+
+ if (transportTypePanelControl != null) {
+ valid &= transportTypePanelControl.isValid();
+ if (transportTypePanelControl.getMessageType() > getMessageType()) {
+ setMessage(transportTypePanelControl.getMessage(), transportTypePanelControl.getMessageType());
+ }
+ }
+
+ return valid;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.forms.AbstractFormPart#commit(boolean)
+ */
+ @Override
+ public void commit(boolean onSave) {
+ // Remember the current dirty state
+ boolean needsSaving = isDirty();
+ // Call the super implementation (resets the dirty state)
+ super.commit(onSave);
+
+ // Nothing to do if not on save or saving is not needed
+ if (!onSave || !needsSaving) return;
+ // Extract the data into the original data node
+ extractData(od);
+
+ // If the working copy and the original data copy differs at this point,
+ // the data changed really and we have to write the peer to the persistence
+ // storage.
+ if (!odc.equals(wc)) {
+ try {
+ // Get the persistence service
+ IPersistenceService persistenceService = ServiceManager.getInstance().getService(IPersistenceService.class);
+ if (persistenceService == null) throw new IOException("Persistence service instance unavailable."); //$NON-NLS-1$
+ // Save the peer node to the new persistence storage
+ persistenceService.write(od.getPeer().getAttributes());
+ } catch (IOException e) {
+ // Pass on to the editor page
+ }
+
+ Protocol.invokeLater(new Runnable() {
+ @Override
+ public void run() {
+ // Trigger a change event for the original data node
+ od.fireChangeEvent("properties", null, od.getProperties()); //$NON-NLS-1$
+ // And make sure the editor tabs are updated
+ od.fireChangeEvent("editor.refreshTab", Boolean.FALSE, Boolean.TRUE); //$NON-NLS-1$
+ }
+ });
+
+ // As the transport section changed, force a scan of the peer
+ ScannerRunnable runnable = new ScannerRunnable(null, od);
+ Protocol.invokeLater(runnable);
+ }
+ }
+
+ /**
+ * Called to signal that the data associated has been changed.
+ *
+ * @param e The event which triggered the invocation or <code>null</code>.
+ */
+ public void dataChanged(TypedEvent e) {
+ boolean isDirty = false;
+
+ if (transportTypeControl != null) {
+ String transportType = transportTypeControl.getSelectedTransportType();
+ if ("".equals(transportType)) { //$NON-NLS-1$
+ String value = odc.getStringProperty(IPeer.ATTR_TRANSPORT_NAME);
+ isDirty |= value != null && !"".equals(value.trim()); //$NON-NLS-1$
+ } else {
+ isDirty |= !odc.isProperty(IPeer.ATTR_TRANSPORT_NAME, transportType);
+ }
+
+ if (transportTypePanelControl != null) {
+ IWizardConfigurationPanel panel = transportTypePanelControl.getConfigurationPanel(transportType);
+ if (panel != null) isDirty |= panel.dataChanged(odc, e);
+ }
+ }
+
+ // If dirty, mark the form part dirty.
+ // Otherwise call refresh() to reset the dirty (and stale) flag
+ markDirty(isDirty);
+ }
+
+ /**
+ * Updates the control enablement.
+ */
+ protected void updateEnablement() {
+ // Determine the input
+ final Object input = getManagedForm().getInput();
+
+ // Determine if the peer is a static peer
+ final AtomicBoolean isStatic = new AtomicBoolean();
+ Runnable runnable = new Runnable() {
+ @Override
+ public void run() {
+ if (input instanceof IPeerModel) {
+ String value = ((IPeerModel)input).getPeer().getAttributes().get("static.transient"); //$NON-NLS-1$
+ isStatic.set(value != null && Boolean.parseBoolean(value.trim()));
+ }
+ }
+ };
+ if (Protocol.isDispatchThread()) runnable.run();
+ else Protocol.invokeAndWait(runnable);
+
+ // The transport type control is enabled for static peers
+ if (transportTypeControl != null) {
+ SWTControlUtil.setEnabled(transportTypeControl.getEditFieldControl(), isStatic.get());
+ if (transportTypePanelControl != null) {
+ IWizardConfigurationPanel panel = transportTypePanelControl.getConfigurationPanel(transportTypeControl.getSelectedTransportType());
+ if (panel != null) panel.setEnabled(isStatic.get());
+ }
+ }
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/filter/RedirectPeersFilter.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/filter/RedirectPeersFilter.java
new file mode 100644
index 000000000..61d162a97
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/filter/RedirectPeersFilter.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.ui.filter;
+
+import java.util.concurrent.atomic.AtomicReference;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.ui.views.interfaces.IRoot;
+
+/**
+ * Filter implementation filtering redirected peers from the root level.
+ */
+public class RedirectPeersFilter extends ViewerFilter {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
+ */
+ @Override
+ public boolean select(final Viewer viewer, final Object parentElement, final Object element) {
+ if (element instanceof IPeerModel && parentElement instanceof IRoot) {
+ final AtomicReference<IPeerModel> parent = new AtomicReference<IPeerModel>();
+ Runnable runnable = new Runnable() {
+ @Override
+ public void run() {
+ parent.set(((IPeerModel)element).getParentNode());
+ }
+ };
+ Assert.isTrue(!Protocol.isDispatchThread());
+ Protocol.invokeAndWait(runnable);
+
+ return parent.get() == null;
+ }
+
+ return true;
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/internal/filter/UnreachablePeersFilter.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/filter/UnreachablePeersFilter.java
index af8c2bea0..a11b7cb3c 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/internal/filter/UnreachablePeersFilter.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/filter/UnreachablePeersFilter.java
@@ -7,13 +7,13 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.ui.internal.filter;
+package org.eclipse.tcf.te.tcf.ui.filter;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.te.tcf.locator.interfaces.nodes.IPeerModel;
-import org.eclipse.tm.te.tcf.locator.interfaces.nodes.IPeerModelProperties;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModelProperties;
/**
* Filter implementation filtering unreachable peers.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/internal/handler/DeleteCommandHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/handler/DeleteHandler.java
index 1c6df6b5a..bc65d0e4c 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/internal/handler/DeleteCommandHandler.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/handler/DeleteHandler.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.ui.internal.handler;
+package org.eclipse.tcf.te.tcf.ui.handler;
import java.io.IOException;
import java.util.Iterator;
@@ -19,27 +19,27 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer;
-import org.eclipse.tm.te.runtime.persistence.interfaces.IPersistenceService;
-import org.eclipse.tm.te.runtime.properties.PropertiesContainer;
-import org.eclipse.tm.te.runtime.services.ServiceManager;
-import org.eclipse.tm.te.runtime.statushandler.StatusHandlerManager;
-import org.eclipse.tm.te.runtime.statushandler.interfaces.IStatusHandler;
-import org.eclipse.tm.te.runtime.statushandler.interfaces.IStatusHandlerConstants;
-import org.eclipse.tm.te.tcf.locator.interfaces.nodes.ILocatorModel;
-import org.eclipse.tm.te.tcf.locator.interfaces.nodes.IPeerModel;
-import org.eclipse.tm.te.tcf.locator.interfaces.services.ILocatorModelRefreshService;
-import org.eclipse.tm.te.tcf.ui.activator.UIPlugin;
-import org.eclipse.tm.te.tcf.ui.internal.help.IContextHelpIds;
-import org.eclipse.tm.te.tcf.ui.model.Model;
-import org.eclipse.tm.te.tcf.ui.nls.Messages;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.runtime.persistence.interfaces.IPersistenceService;
+import org.eclipse.tcf.te.runtime.properties.PropertiesContainer;
+import org.eclipse.tcf.te.runtime.services.ServiceManager;
+import org.eclipse.tcf.te.runtime.statushandler.StatusHandlerManager;
+import org.eclipse.tcf.te.runtime.statushandler.interfaces.IStatusHandler;
+import org.eclipse.tcf.te.runtime.statushandler.interfaces.IStatusHandlerConstants;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.ILocatorModel;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.tcf.locator.interfaces.services.ILocatorModelRefreshService;
+import org.eclipse.tcf.te.tcf.locator.model.Model;
+import org.eclipse.tcf.te.tcf.ui.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.ui.help.IContextHelpIds;
+import org.eclipse.tcf.te.tcf.ui.nls.Messages;
import org.eclipse.ui.handlers.HandlerUtil;
/**
* TCF static peers delete command handler implementation.
*/
-public class DeleteCommandHandler extends AbstractHandler {
+public class DeleteHandler extends AbstractHandler {
/* (non-Javadoc)
* @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
@@ -59,13 +59,12 @@ public class DeleteCommandHandler extends AbstractHandler {
} catch (IOException e) {
// Create the status
IStatus status = new Status(IStatus.ERROR, UIPlugin.getUniqueIdentifier(),
- Messages.DeleteCommandHandler_error_deleteFailed, e);
+ Messages.DeleteHandler_error_deleteFailed, e);
// Fill in the status handler custom data
IPropertiesContainer data = new PropertiesContainer();
- data.setProperty(IStatusHandlerConstants.PROPERTY_TITLE, Messages.DeleteCommandHandler_error_title);
+ data.setProperty(IStatusHandlerConstants.PROPERTY_TITLE, Messages.DeleteHandler_error_title);
data.setProperty(IStatusHandlerConstants.PROPERTY_CONTEXT_HELP_ID, IContextHelpIds.MESSAGE_DELETE_FAILED);
- data.setProperty(IStatusHandlerConstants.PROPERTY_DONT_ASK_AGAIN_ID, IContextHelpIds.MESSAGE_DELETE_FAILED);
data.setProperty(IStatusHandlerConstants.PROPERTY_CALLER, this);
// Get the status handler
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/handler/RedirectHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/handler/RedirectHandler.java
new file mode 100644
index 000000000..0bc7c1514
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/handler/RedirectHandler.java
@@ -0,0 +1,188 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.ui.handler;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.jface.window.Window;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.runtime.persistence.interfaces.IPersistenceService;
+import org.eclipse.tcf.te.runtime.properties.PropertiesContainer;
+import org.eclipse.tcf.te.runtime.services.ServiceManager;
+import org.eclipse.tcf.te.runtime.statushandler.StatusHandlerManager;
+import org.eclipse.tcf.te.runtime.statushandler.interfaces.IStatusHandler;
+import org.eclipse.tcf.te.runtime.statushandler.interfaces.IStatusHandlerConstants;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModelProperties;
+import org.eclipse.tcf.te.tcf.locator.interfaces.services.ILocatorModelRefreshService;
+import org.eclipse.tcf.te.tcf.locator.interfaces.services.ILocatorModelUpdateService;
+import org.eclipse.tcf.te.tcf.locator.model.Model;
+import org.eclipse.tcf.te.tcf.locator.nodes.PeerRedirector;
+import org.eclipse.tcf.te.tcf.ui.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.ui.dialogs.RedirectAgentSelectionDialog;
+import org.eclipse.tcf.te.tcf.ui.help.IContextHelpIds;
+import org.eclipse.tcf.te.tcf.ui.nls.Messages;
+import org.eclipse.tcf.te.ui.swt.DisplayUtil;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.eclipse.ui.navigator.CommonNavigator;
+
+/**
+ * Redirect peer command handler implementation.
+ */
+public class RedirectHandler extends AbstractHandler {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+ */
+ @Override
+ public Object execute(final ExecutionEvent event) throws ExecutionException {
+ // Determine the peer selected in Target Explorer tree
+ ISelection selection = HandlerUtil.getCurrentSelection(event);
+ if (selection instanceof IStructuredSelection && !selection.isEmpty()) {
+ // Redirect is supporting single selection only
+ Object candidate = ((IStructuredSelection)selection).getFirstElement();
+ if (candidate instanceof IPeerModel) {
+ final IPeerModel peerModel = (IPeerModel)candidate;
+
+ // Create the agent selection dialog
+ RedirectAgentSelectionDialog dialog = new RedirectAgentSelectionDialog(HandlerUtil.getActiveShell(event), null) {
+ @Override
+ protected void configureTableViewer(TableViewer viewer) {
+ Assert.isNotNull(viewer);
+
+ List<ViewerFilter> filter = new ArrayList<ViewerFilter>();
+ if (viewer.getFilters() != null && viewer.getFilters().length > 0) {
+ filter.addAll(Arrays.asList(viewer.getFilters()));
+ }
+
+ filter.add(new ViewerFilter() {
+ @Override
+ public boolean select(Viewer viewer, Object parentElement, Object element) {
+ if (peerModel.equals(element)) return false;
+ return true;
+ }
+ });
+
+ viewer.setFilters(filter.toArray(new ViewerFilter[filter.size()]));
+ }
+ };
+
+ // Open the dialog
+ if (dialog.open() == Window.OK) {
+ // Get the selected proxy from the dialog
+ selection = dialog.getSelection();
+ if (selection instanceof IStructuredSelection && !selection.isEmpty()) {
+ candidate = ((IStructuredSelection)selection).getFirstElement();
+ if (candidate instanceof IPeerModel) {
+ final IPeerModel proxy = (IPeerModel)candidate;
+
+ Protocol.invokeLater(new Runnable() {
+ @Override
+ public void run() {
+ redirect(peerModel, proxy);
+
+ DisplayUtil.safeAsyncExec(new Runnable() {
+ @Override
+ public void run() {
+ IWorkbenchPart part = HandlerUtil.getActivePart(event);
+ if (part instanceof CommonNavigator) {
+ CommonNavigator navigator = (CommonNavigator)part;
+ navigator.selectReveal(new StructuredSelection(peerModel));
+ }
+ }
+ });
+ }
+ });
+ }
+ }
+ }
+ }
+ }
+
+
+ return null;
+ }
+
+ /**
+ * Redirect the communication to the given peer through the given proxy.
+ * <p>
+ * The method must be called from within the TCF dispatch thread.
+ *
+ * @param peerModel The peer to redirect. Must not be <code>null</code>.
+ * @param proxy The proxy. Must not be <code>null</code>
+ */
+ public void redirect(IPeerModel peerModel, IPeerModel proxy) {
+ Assert.isNotNull(peerModel);
+ Assert.isNotNull(proxy);
+ Assert.isTrue(Protocol.isDispatchThread(), "Illegal Thread Access"); //$NON-NLS-1$
+
+ // Get the peer attributes
+ Map<String, String> attributes = new HashMap<String, String>();
+ attributes.putAll(peerModel.getPeer().getAttributes());
+ // Set the redirection
+ attributes.put(IPeerModelProperties.PROP_REDIRECT_PROXY, proxy.getPeerId());
+
+ try {
+ IPersistenceService persistenceService = ServiceManager.getInstance().getService(IPersistenceService.class);
+ if (persistenceService == null) throw new IOException("Persistence service instance unavailable."); //$NON-NLS-1$
+ persistenceService.write(attributes);
+
+ // Create a peer redirector
+ PeerRedirector redirector = new PeerRedirector(proxy.getPeer(), attributes);
+ // And update the instance
+ peerModel.setProperty(IPeerModelProperties.PROP_INSTANCE, redirector);
+
+ // Associate proxy (parent) and peer model (child)
+ peerModel.setParentNode(proxy);
+ Model.getModel().getService(ILocatorModelUpdateService.class).addChild(peerModel);
+
+ // Trigger a refresh of the locator model in a later dispatch cycle
+ Protocol.invokeLater(new Runnable() {
+ @Override
+ public void run() {
+ Model.getModel().getService(ILocatorModelRefreshService.class).refresh();
+ }
+ });
+ } catch (IOException e) {
+ // Create the status
+ IStatus status = new Status(IStatus.ERROR, UIPlugin.getUniqueIdentifier(),
+ Messages.RedirectHandler_error_redirectFailed, e);
+
+ // Fill in the status handler custom data
+ IPropertiesContainer data = new PropertiesContainer();
+ data.setProperty(IStatusHandlerConstants.PROPERTY_TITLE, Messages.RedirectHandler_error_title);
+ data.setProperty(IStatusHandlerConstants.PROPERTY_CONTEXT_HELP_ID, IContextHelpIds.MESSAGE_REDIRECT_FAILED);
+ data.setProperty(IStatusHandlerConstants.PROPERTY_CALLER, this);
+
+ // Get the status handler
+ IStatusHandler[] handler = StatusHandlerManager.getInstance().getHandler(peerModel);
+ if (handler.length > 0) handler[0].handleStatus(status, data, null);
+ }
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/internal/handler/RefreshCommandHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/handler/RefreshHandler.java
index 935d8d099..f80bdb7be 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/internal/handler/RefreshCommandHandler.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/handler/RefreshHandler.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.ui.internal.handler;
+package org.eclipse.tcf.te.tcf.ui.handler;
import java.util.ArrayList;
import java.util.Iterator;
@@ -19,16 +19,16 @@ import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.te.tcf.locator.interfaces.nodes.ILocatorModel;
-import org.eclipse.tm.te.tcf.locator.interfaces.services.ILocatorModelRefreshService;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.ILocatorModel;
+import org.eclipse.tcf.te.tcf.locator.interfaces.services.ILocatorModelRefreshService;
import org.eclipse.ui.handlers.HandlerUtil;
/**
* TCF refresh command handler.
*/
-public class RefreshCommandHandler extends AbstractHandler {
+public class RefreshHandler extends AbstractHandler {
/* (non-Javadoc)
* @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/handler/ResetRedirectHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/handler/ResetRedirectHandler.java
new file mode 100644
index 000000000..f81ef4ef6
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/handler/ResetRedirectHandler.java
@@ -0,0 +1,132 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.ui.handler;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.tcf.core.TransientPeer;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.runtime.persistence.interfaces.IPersistenceService;
+import org.eclipse.tcf.te.runtime.properties.PropertiesContainer;
+import org.eclipse.tcf.te.runtime.services.ServiceManager;
+import org.eclipse.tcf.te.runtime.statushandler.StatusHandlerManager;
+import org.eclipse.tcf.te.runtime.statushandler.interfaces.IStatusHandler;
+import org.eclipse.tcf.te.runtime.statushandler.interfaces.IStatusHandlerConstants;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModelProperties;
+import org.eclipse.tcf.te.tcf.locator.interfaces.services.ILocatorModelRefreshService;
+import org.eclipse.tcf.te.tcf.locator.interfaces.services.ILocatorModelUpdateService;
+import org.eclipse.tcf.te.tcf.locator.model.Model;
+import org.eclipse.tcf.te.tcf.ui.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.ui.help.IContextHelpIds;
+import org.eclipse.tcf.te.tcf.ui.nls.Messages;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+/**
+ * Reset peer redirection command handler.
+ */
+public class ResetRedirectHandler extends AbstractHandler {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+ */
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ // Determine the peer selected in Target Explorer tree
+ ISelection selection = HandlerUtil.getCurrentSelection(event);
+ if (selection instanceof IStructuredSelection && !selection.isEmpty()) {
+ // Redirect is supporting single selection only
+ Object candidate = ((IStructuredSelection)selection).getFirstElement();
+ if (candidate instanceof IPeerModel) {
+ final IPeerModel peerModel = (IPeerModel)candidate;
+
+ Protocol.invokeLater(new Runnable() {
+ @Override
+ public void run() {
+ resetRedirect(peerModel);
+ }
+ });
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * Reset the communication redirection for the given peer.
+ * <p>
+ * The method must be called from within the TCF dispatch thread.
+ *
+ * @param peerModel The peer to reset. Must not be <code>null</code>.
+ */
+ public void resetRedirect(IPeerModel peerModel) {
+ Assert.isNotNull(peerModel);
+ Assert.isTrue(Protocol.isDispatchThread(), "Illegal Thread Access"); //$NON-NLS-1$
+
+ // Get the peer attributes
+ Map<String, String> attributes = new HashMap<String, String>();
+ attributes.putAll(peerModel.getPeer().getAttributes());
+ // Redirection set?
+ if (attributes.get(IPeerModelProperties.PROP_REDIRECT_PROXY) != null) {
+ // Remove the redirection
+ attributes.remove(IPeerModelProperties.PROP_REDIRECT_PROXY);
+
+ try {
+ // Save it
+ IPersistenceService persistenceService = ServiceManager.getInstance().getService(IPersistenceService.class);
+ if (persistenceService == null) throw new IOException("Persistence service instance unavailable."); //$NON-NLS-1$
+ persistenceService.write(attributes);
+
+ // Create a peer
+ IPeer peer = new TransientPeer(attributes);
+ // And update the instance
+ peerModel.setProperty(IPeerModelProperties.PROP_INSTANCE, peer);
+
+ // Reset proxy (parent) and peer model (child) association
+ Model.getModel().getService(ILocatorModelUpdateService.class).removeChild(peerModel);
+ peerModel.setParentNode(null);
+
+ // Trigger a refresh of the locator model in a later dispatch cycle
+ Protocol.invokeLater(new Runnable() {
+ @Override
+ public void run() {
+ Model.getModel().getService(ILocatorModelRefreshService.class).refresh();
+ }
+ });
+ } catch (IOException e) {
+ // Create the status
+ IStatus status = new Status(IStatus.ERROR, UIPlugin.getUniqueIdentifier(),
+ Messages.ResetRedirectHandler_error_resetRedirectFailed, e);
+
+ // Fill in the status handler custom data
+ IPropertiesContainer data = new PropertiesContainer();
+ data.setProperty(IStatusHandlerConstants.PROPERTY_TITLE, Messages.ResetRedirectHandler_error_title);
+ data.setProperty(IStatusHandlerConstants.PROPERTY_CONTEXT_HELP_ID, IContextHelpIds.MESSAGE_RESET_REDIRECT_FAILED);
+ data.setProperty(IStatusHandlerConstants.PROPERTY_CALLER, this);
+
+ // Get the status handler
+ IStatusHandler[] handler = StatusHandlerManager.getInstance().getHandler(peerModel);
+ if (handler.length > 0) handler[0].handleStatus(status, data, null);
+ }
+ }
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/internal/help/IContextHelpIds.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/help/IContextHelpIds.java
index 00e4f94e7..7a3cf0c8d 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/internal/help/IContextHelpIds.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/help/IContextHelpIds.java
@@ -7,9 +7,9 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.ui.internal.help;
+package org.eclipse.tcf.te.tcf.ui.help;
-import org.eclipse.tm.te.tcf.ui.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.ui.activator.UIPlugin;
/**
* Context help id definitions.
@@ -35,6 +35,11 @@ public interface IContextHelpIds {
*/
public final static String NODE_PROPERTIES_EDITOR_PAGE = PREFIX + "NodePropertiesEditorPage"; //$NON-NLS-1$
+ /**
+ * Peer overview editor page.
+ */
+ public final static String OVERVIEW_EDITOR_PAGE = PREFIX + "OverviewEditorPage"; //$NON-NLS-1$
+
// ***** Dialogs and Dialog Pages *****
/**
@@ -48,4 +53,14 @@ public interface IContextHelpIds {
* Delete command handler: Delete operation failed.
*/
public final static String MESSAGE_DELETE_FAILED = PREFIX + ".status.messageDeleteFailed"; //$NON-NLS-1$
+
+ /**
+ * Redirect command handler: Redirect operation failed.
+ */
+ public final static String MESSAGE_REDIRECT_FAILED = PREFIX + ".status.messageRedirectFailed"; //$NON-NLS-1$
+
+ /**
+ * Reset redirect command handler: Reset redirect operation failed.
+ */
+ public final static String MESSAGE_RESET_REDIRECT_FAILED = PREFIX + ".status.messageResetRedirectFailed"; //$NON-NLS-1$
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/ImageConsts.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/ImageConsts.java
new file mode 100644
index 000000000..67f8c4c8a
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/ImageConsts.java
@@ -0,0 +1,107 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.ui.internal;
+
+/**
+ * TCF UI Plug-in Image registry constants.
+ */
+public interface ImageConsts {
+
+ // ***** The directory structure constants *****
+
+ /**
+ * The root directory where to load the images from, relative to
+ * the bundle directory.
+ */
+ public final static String IMAGE_DIR_ROOT = "icons/"; //$NON-NLS-1$
+
+ /**
+ * The directory where to load disabled local toolbar images from,
+ * relative to the image root directory.
+ */
+ public final static String IMAGE_DIR_DLCL = "dlcl16/"; //$NON-NLS-1$
+
+ /**
+ * The directory where to load enabled local toolbar images from,
+ * relative to the image root directory.
+ */
+ public final static String IMAGE_DIR_ELCL = "elcl16/"; //$NON-NLS-1$
+
+ /**
+ * The directory where to load model object images from,
+ * relative to the image root directory.
+ */
+ public final static String IMAGE_DIR_OBJ = "obj16/"; //$NON-NLS-1$
+
+ /**
+ * The directory where to load object overlay images from,
+ * relative to the image root directory.
+ */
+ public final static String IMAGE_DIR_OVR = "ovr16/"; //$NON-NLS-1$
+
+ /**
+ * The directory where to load disabled toolbar images from,
+ * relative to the image root directory.
+ */
+ public final static String IMAGE_DIR_DTOOL = "dtool16/"; //$NON-NLS-1$
+
+ /**
+ * The directory where to load enabled toolbar images from,
+ * relative to the image root directory.
+ */
+ public final static String IMAGE_DIR_ETOOL = "etool16/"; //$NON-NLS-1$
+
+ // ***** The image constants *****
+
+ /**
+ * The key to access the base peer object image.
+ */
+ public static final String PEER = "PeerObject"; //$NON-NLS-1$
+
+ /**
+ * The key to access the base remote peer discover root node object image.
+ */
+ public static final String DISCOVERY_ROOT = "RemotePeerDiscoverRootNodeObject"; //$NON-NLS-1$
+
+ /**
+ * The key to access the peer object gold overlay image.
+ */
+ public static final String GOLD_OVR = "GoldOverlay"; //$NON-NLS-1$
+
+ /**
+ * The key to access the peer object green overlay image.
+ */
+ public static final String GREEN_OVR = "GreenOverlay"; //$NON-NLS-1$
+
+ /**
+ * The key to access the peer object grey overlay image.
+ */
+ public static final String GREY_OVR = "GreyOverlay"; //$NON-NLS-1$
+
+ /**
+ * The key to access the peer object red overlay image.
+ */
+ public static final String RED_OVR = "RedOverlay"; //$NON-NLS-1$
+
+ /**
+ * The key to access the peer object red X overlay image.
+ */
+ public static final String RED_X_OVR = "RedXOverlay"; //$NON-NLS-1$
+
+ /**
+ * The key to access the base run action image.
+ */
+ public static final String RUN_ENABLED = "RunEnabled"; //$NON-NLS-1$
+
+ /**
+ * The key to access the base run action image.
+ */
+ public static final String RUN_DISABLED = "RunDisabled"; //$NON-NLS-1$
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/adapters/PeerModelAdapterFactory.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/adapters/PeerModelAdapterFactory.java
new file mode 100644
index 000000000..df52e6285
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/adapters/PeerModelAdapterFactory.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.ui.internal.adapters;
+
+import org.eclipse.core.runtime.IAdapterFactory;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.tcf.ui.navigator.LabelProvider;
+
+/**
+ * The adapter factory for IPeerModel.
+ */
+public class PeerModelAdapterFactory implements IAdapterFactory {
+ // The adapter for ILabelProvider.class
+ private LabelProvider labelProvider = new LabelProvider();
+ // The adapter class.
+ private Class<?>[] adapters = {ILabelProvider.class};
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.core.runtime.IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class)
+ */
+ @Override
+ public Object getAdapter(Object adaptableObject, Class adapterType) {
+ if(adaptableObject instanceof IPeerModel) {
+ if(adapterType == ILabelProvider.class) {
+ return labelProvider;
+ }
+ }
+ return null;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.core.runtime.IAdapterFactory#getAdapterList()
+ */
+ @Override
+ public Class[] getAdapterList() {
+ return adapters;
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/tabbed/PeerGeneralSection.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/tabbed/PeerGeneralSection.java
new file mode 100644
index 000000000..3a0c3b174
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/tabbed/PeerGeneralSection.java
@@ -0,0 +1,96 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.ui.internal.tabbed;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.ViewerComparator;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.ui.forms.CustomFormToolkit;
+import org.eclipse.tcf.te.ui.tables.TableViewerComparator;
+import org.eclipse.tcf.te.ui.tables.properties.NodePropertiesTableControl;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.views.properties.tabbed.AbstractPropertySection;
+import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
+/**
+ * The property section to display the general properties of a peer.
+ */
+public class PeerGeneralSection extends AbstractPropertySection {
+ // The peer to be displayed.
+ private IPeerModel peer;
+ // The table control to display the properties.
+ private NodePropertiesTableControl tableControl;
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#createControls(org.eclipse.swt.widgets.Composite, org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage)
+ */
+ @Override
+ public void createControls(Composite parent, TabbedPropertySheetPage aTabbedPropertySheetPage) {
+ super.createControls(parent, aTabbedPropertySheetPage);
+ Composite composite = getWidgetFactory().createFlatFormComposite(parent);
+ composite.setLayout(new GridLayout());
+ tableControl = new NodePropertiesTableControl(this.getPart()) {
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.vtl.ui.datasource.controls.tables.NodePropertiesTableControl#doCreateTableViewerContentProvider(org.eclipse.jface.viewers.TableViewer)
+ */
+ @Override
+ protected IStructuredContentProvider doCreateTableViewerContentProvider(TableViewer viewer) {
+ return new PeerGeneralSectionContentProvider(true);
+ }
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.vtl.ui.datasource.controls.tables.properties.NodePropertiesTableControl#doCreateTableViewerLabelProvider(org.eclipse.jface.viewers.TableViewer)
+ */
+ @Override
+ protected ITableLabelProvider doCreateTableViewerLabelProvider(TableViewer viewer) {
+ return new PeerGeneralSectionLabelProvider(viewer);
+ }
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.vtl.ui.datasource.controls.tables.NodePropertiesTableControl#doCreateTableViewerComparator(org.eclipse.jface.viewers.TableViewer)
+ */
+ @Override
+ protected ViewerComparator doCreateTableViewerComparator(TableViewer viewer) {
+ return new TableViewerComparator(viewer, (ITableLabelProvider)viewer.getLabelProvider());
+ }
+ };
+ CustomFormToolkit toolkit = new CustomFormToolkit(new FormToolkit(parent.getDisplay()));
+ tableControl.setupFormPanel(composite, toolkit);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#setInput(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
+ */
+ @Override
+ public void setInput(IWorkbenchPart part, ISelection selection) {
+ super.setInput(part, selection);
+ Assert.isTrue(selection instanceof IStructuredSelection);
+ Object input = ((IStructuredSelection) selection).getFirstElement();
+ Assert.isTrue(input instanceof IPeerModel);
+ this.peer = (IPeerModel) input;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#refresh()
+ */
+ @Override
+ public void refresh() {
+ tableControl.getViewer().setInput(peer);
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/tables/NodePropertiesContentProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/tabbed/PeerGeneralSectionContentProvider.java
index fc504ae7c..233ce07f0 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/tables/NodePropertiesContentProvider.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/tabbed/PeerGeneralSectionContentProvider.java
@@ -7,10 +7,9 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.ui.tables;
+package org.eclipse.tcf.te.tcf.ui.internal.tabbed;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -22,28 +21,16 @@ import org.eclipse.jface.viewers.Viewer;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.SWTException;
import org.eclipse.swt.widgets.Control;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.te.tcf.locator.interfaces.nodes.IPeerModel;
-import org.eclipse.tm.te.tcf.locator.interfaces.nodes.IPeerModelProperties;
-import org.eclipse.tm.te.tcf.ui.nls.Messages;
-import org.eclipse.tm.te.ui.tables.properties.NodePropertiesTableTableNode;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.ui.tables.properties.NodePropertiesTableTableNode;
import org.eclipse.ui.forms.widgets.Section;
/**
- * TCF node properties table content provider implementation.
+ * Peer properties general section table content provider implementation.
*/
-public class NodePropertiesContentProvider implements IStructuredContentProvider {
-
- /**
- * The list of properties to filter out and not to show within the table.
- */
- protected final static String[] FILTERED_PROPERTIES = new String[] {
- "name", "typeLabel", //$NON-NLS-1$ //$NON-NLS-2$
- "instance", "childrenQueried", //$NON-NLS-1$ //$NON-NLS-2$
- IPeerModelProperties.PROP_CHANNEL_REF_COUNTER, "Path", //$NON-NLS-1$
- "hasTabularProperties" //$NON-NLS-1$
- };
+public class PeerGeneralSectionContentProvider implements IStructuredContentProvider {
// Flag to control if the content provide may update the parent section title
private final boolean updateParentSectionTitle;
@@ -54,7 +41,7 @@ public class NodePropertiesContentProvider implements IStructuredContentProvider
* @param updateParentSectionTitle Specify <code>true</code> to allow the content provider to update
* the parent section title, <code>false</code> if no title update is desired.
*/
- public NodePropertiesContentProvider(boolean updateParentSectionTitle) {
+ public PeerGeneralSectionContentProvider(boolean updateParentSectionTitle) {
this.updateParentSectionTitle = updateParentSectionTitle;
}
@@ -73,19 +60,15 @@ public class NodePropertiesContentProvider implements IStructuredContentProvider
List<NodePropertiesTableTableNode> nodes = new ArrayList<NodePropertiesTableTableNode>();
if (inputElement instanceof IPeerModel) {
- NodePropertiesTableTableNode lastErrorNode = null;
-
// Get all custom properties of the node
final Map<String, Object> properties = new HashMap<String, Object>();
// And get all native properties of the peer
if (Protocol.isDispatchThread()) {
- properties.putAll(((IPeerModel)inputElement).getProperties());
properties.putAll(((IPeerModel)inputElement).getPeer().getAttributes());
} else {
Protocol.invokeAndWait(new Runnable() {
@Override
public void run() {
- properties.putAll(((IPeerModel)inputElement).getProperties());
properties.putAll(((IPeerModel)inputElement).getPeer().getAttributes());
}
});
@@ -93,58 +76,10 @@ public class NodePropertiesContentProvider implements IStructuredContentProvider
for (String name : properties.keySet()) {
// Check if the property is filtered
- if (name.endsWith(".silent") || Arrays.asList(FILTERED_PROPERTIES).contains(name)) continue; //$NON-NLS-1$
- // Create the properties node, if not one of the services nodes
- if (!IPeerModelProperties.PROP_LOCAL_SERVICES.equals(name) && !IPeerModelProperties.PROP_REMOTE_SERVICES.equals(name)) {
- NodePropertiesTableTableNode propertiesNode = new NodePropertiesTableTableNode(name, properties.get(name) != null ? properties.get(name).toString() : ""); //$NON-NLS-1$
- if (!IPeerModelProperties.PROP_LAST_SCANNER_ERROR.equals(name)) nodes.add(propertiesNode);
- else lastErrorNode = propertiesNode;
- } else {
- // For the services nodes, additional nodes might be necessary to make
- // reading all the service names in the table easier
- String services = properties.get(name) != null ? properties.get(name).toString() : ""; //$NON-NLS-1$
- if (services.split(",").length > 6) { //$NON-NLS-1$
- // More than 6 services listed -> generate nodes with 6 service names each
- String[] serviceNames = services.split(","); //$NON-NLS-1$
- boolean withName = true;
- StringBuilder nodeValue = new StringBuilder();
- int counter = 1;
- for (String serviceName : serviceNames) {
- nodeValue.append(serviceName.trim());
- nodeValue.append(", "); //$NON-NLS-1$
- if (counter < 6) {
- counter++;
- } else {
- NodePropertiesTableTableNode propertiesNode = new NodePropertiesTableTableNode(withName ? name : "\t", nodeValue.toString()); //$NON-NLS-1$
- nodes.add(propertiesNode);
- if (withName) withName = false;
- counter = 1;
- nodeValue = new StringBuilder();
- }
- }
- // Anything left in the string builder?
- if (nodeValue.toString().trim().length() > 0) {
- String value = nodeValue.toString();
- if (value.endsWith(", ")) value = value.substring(0, value.length() - 2); //$NON-NLS-1$
- if (value.trim().length() > 0) {
- NodePropertiesTableTableNode propertiesNode = new NodePropertiesTableTableNode(withName ? name : "\t", value); //$NON-NLS-1$
- nodes.add(propertiesNode);
- }
- }
-
- } else {
- // Less than 6 service names listed -> generate a single node
- NodePropertiesTableTableNode propertiesNode = new NodePropertiesTableTableNode(name, services);
- nodes.add(propertiesNode);
- }
- }
- }
-
- if (lastErrorNode != null) {
- // Add an empty line before the error
- NodePropertiesTableTableNode propertiesNode = new NodePropertiesTableTableNode("", ""); //$NON-NLS-1$ //$NON-NLS-2$
+ if (name.endsWith(".silent") || name.contains(".transient")) continue; //$NON-NLS-1$ //$NON-NLS-2$
+ // Create the properties node
+ NodePropertiesTableTableNode propertiesNode = new NodePropertiesTableTableNode(name, properties.get(name) != null ? properties.get(name).toString() : ""); //$NON-NLS-1$
nodes.add(propertiesNode);
- nodes.add(lastErrorNode);
}
}
@@ -179,11 +114,11 @@ public class NodePropertiesContentProvider implements IStructuredContentProvider
// Determine the section header text
if (element instanceof IPeerModel) {
- sectionTitle = NLS.bind(org.eclipse.tm.te.ui.nls.Messages.NodePropertiesTableControl_section_title, Messages.NodePropertiesContentProvider_peerNode_sectionTitle);
+ sectionTitle = NLS.bind(org.eclipse.tcf.te.ui.nls.Messages.NodePropertiesTableControl_section_title, "Peer"); //$NON-NLS-1$
}
// Set the standard (no selection) section title if none could be determined
- if (sectionTitle == null || "".equals(sectionTitle.trim())) sectionTitle = org.eclipse.tm.te.ui.nls.Messages.NodePropertiesTableControl_section_title_noSelection; //$NON-NLS-1$
+ if (sectionTitle == null || "".equals(sectionTitle.trim())) sectionTitle = org.eclipse.tcf.te.ui.nls.Messages.NodePropertiesTableControl_section_title_noSelection; //$NON-NLS-1$
// Stretch to a length of 40 characters to make sure the title can be changed
// to hold and show text up to this length
while (sectionTitle.length() < 40) sectionTitle += " "; //$NON-NLS-1$
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/tabbed/PeerGeneralSectionLabelProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/tabbed/PeerGeneralSectionLabelProvider.java
new file mode 100644
index 000000000..129a70491
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/tabbed/PeerGeneralSectionLabelProvider.java
@@ -0,0 +1,76 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.ui.internal.tabbed;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.tcf.te.ui.tables.properties.NodePropertiesTableTableNode;
+
+
+/**
+ * Peer properties general section table label provider implementation.
+ */
+public class PeerGeneralSectionLabelProvider extends LabelProvider implements ITableLabelProvider {
+ // Reference to the parent table viewer
+ private final TableViewer parentViewer;
+
+ /**
+ * Constructor.
+ *
+ * @param viewer The table viewer or <code>null</code>.
+ */
+ public PeerGeneralSectionLabelProvider(TableViewer viewer) {
+ super();
+ parentViewer = viewer;
+ }
+
+ /**
+ * Returns the parent table viewer instance.
+ *
+ * @return The parent table viewer or <code>null</code>.
+ */
+ protected final TableViewer getParentViewer() {
+ return parentViewer;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.vtl.ui.datasource.controls.tables.TableLabelProvider#getColumnText(org.eclipse.tcf.te.tcf.core.runtime.model.interfaces.IModelNode, int)
+ */
+ @Override
+ public String getColumnText(Object element, int columnIndex) {
+ Assert.isNotNull(element);
+
+ String label = null;
+
+ if (element instanceof NodePropertiesTableTableNode) {
+ switch (columnIndex) {
+ case 0:
+ label = ((NodePropertiesTableTableNode)element).name;
+ break;
+ case 1:
+ label = ((NodePropertiesTableTableNode)element).value;
+ break;
+ }
+ }
+
+ return label;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnImage(java.lang.Object, int)
+ */
+ @Override
+ public Image getColumnImage(Object element, int columnIndex) {
+ return null;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/navigator/ContentProviderDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/navigator/ContentProviderDelegate.java
new file mode 100644
index 000000000..af915a0a9
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/navigator/ContentProviderDelegate.java
@@ -0,0 +1,228 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.ui.navigator;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.atomic.AtomicReference;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.te.tcf.locator.interfaces.IModelListener;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.ILocatorModel;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerRedirector;
+import org.eclipse.tcf.te.tcf.locator.interfaces.services.ILocatorModelLookupService;
+import org.eclipse.tcf.te.tcf.locator.interfaces.services.ILocatorModelRefreshService;
+import org.eclipse.tcf.te.tcf.locator.model.Model;
+import org.eclipse.tcf.te.tcf.ui.navigator.nodes.PeerRedirectorGroupNode;
+import org.eclipse.tcf.te.ui.views.interfaces.IRoot;
+import org.eclipse.ui.IMemento;
+import org.eclipse.ui.internal.navigator.NavigatorFilterService;
+import org.eclipse.ui.navigator.CommonViewer;
+import org.eclipse.ui.navigator.ICommonContentExtensionSite;
+import org.eclipse.ui.navigator.ICommonContentProvider;
+import org.eclipse.ui.navigator.INavigatorContentService;
+import org.eclipse.ui.navigator.INavigatorFilterService;
+
+
+/**
+ * Content provider delegate implementation.
+ */
+@SuppressWarnings("restriction")
+public class ContentProviderDelegate implements ICommonContentProvider {
+ private final static Object[] NO_ELEMENTS = new Object[0];
+
+ // The "Redirected Peers" filter id
+ private final static String REDIRECT_PEERS_FILTER_ID = "org.eclipse.tcf.te.tcf.ui.navigator.RedirectPeersFilter"; //$NON-NLS-1$
+
+ // The locator model listener instance
+ /* default */ IModelListener modelListener = null;
+
+ // Internal map of RemotePeerDiscoverRootNodes per peer id
+ private final Map<String, PeerRedirectorGroupNode> roots = new HashMap<String, PeerRedirectorGroupNode>();
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object)
+ */
+ @Override
+ public Object[] getChildren(Object parentElement) {
+ Object[] children = NO_ELEMENTS;
+
+ // If the parent element is null or IRoot, than we assume
+ // the locator model as parent element.
+ if (parentElement == null || parentElement instanceof IRoot) {
+ parentElement = Model.getModel();
+ }
+ // If it is the locator model, get the peers
+ if (parentElement instanceof ILocatorModel) {
+ children = ((ILocatorModel)parentElement).getPeers();
+ }
+ // If it is a peer model itself, get the child peers
+ else if (parentElement instanceof IPeerModel) {
+ String parentPeerId = ((IPeerModel)parentElement).getPeerId();
+ List<IPeerModel> candidates = Model.getModel().getChildren(parentPeerId);
+ if (candidates != null && candidates.size() > 0) {
+ PeerRedirectorGroupNode rootNode = roots.get(parentPeerId);
+ if (rootNode == null) {
+ rootNode = new PeerRedirectorGroupNode(parentPeerId);
+ roots.put(parentPeerId, rootNode);
+ }
+ children = new Object[] { rootNode };
+ } else {
+ roots.remove(parentPeerId);
+ }
+ }
+ // If it is a remote peer discover root node, return the children
+ // for the associated peer id.
+ else if (parentElement instanceof PeerRedirectorGroupNode) {
+ List<IPeerModel> candidates = Model.getModel().getChildren(((PeerRedirectorGroupNode)parentElement).peerId);
+ if (candidates != null && candidates.size() > 0) {
+ children = candidates.toArray();
+ }
+ }
+
+ return children;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object)
+ */
+ @Override
+ public Object getParent(final Object element) {
+ // If it is a peer model node, return the parent locator model
+ if (element instanceof IPeerModel) {
+ // If it is a peer redirector, return the parent remote peer discover root node
+ if (((IPeerModel)element).getPeer() instanceof IPeerRedirector) {
+ IPeer parentPeer = ((IPeerRedirector)((IPeerModel)element).getPeer()).getParent();
+ String parentPeerId = parentPeer.getID();
+ if (!roots.containsKey(parentPeerId)) roots.put(parentPeer.getID(), new PeerRedirectorGroupNode(parentPeerId));
+ return roots.get(parentPeerId);
+ }
+ } else if (element instanceof PeerRedirectorGroupNode) {
+ // Return the parent peer model node
+ final AtomicReference<IPeerModel> parent = new AtomicReference<IPeerModel>();
+ Runnable runnable = new Runnable() {
+ @Override
+ public void run() {
+ parent.set(Model.getModel().getService(ILocatorModelLookupService.class).lkupPeerModelById(((PeerRedirectorGroupNode)element).peerId));
+ }
+ };
+ if (Protocol.isDispatchThread()) runnable.run();
+ else Protocol.invokeAndWait(runnable);
+
+ return parent.get();
+ }
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object)
+ */
+ @Override
+ public boolean hasChildren(Object element) {
+ boolean hasChildren = false;
+
+ if (element instanceof ILocatorModel) {
+ hasChildren = ((ILocatorModel)element).getPeers().length > 0;
+ }
+ else if (element instanceof IPeerModel) {
+ List<IPeerModel> children = Model.getModel().getChildren(((IPeerModel)element).getPeerId());
+ hasChildren = children != null && children.size() > 0;
+ }
+ else if (element instanceof PeerRedirectorGroupNode) {
+ List<IPeerModel> children = Model.getModel().getChildren(((PeerRedirectorGroupNode)element).peerId);
+ hasChildren = children != null && children.size() > 0;
+ }
+
+ return hasChildren;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
+ */
+ @Override
+ public Object[] getElements(Object inputElement) {
+ return getChildren(inputElement);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.IContentProvider#dispose()
+ */
+ @Override
+ public void dispose() {
+ roots.clear();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
+ */
+ @Override
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ final ILocatorModel model = Model.getModel();
+
+ // Create and attach the model listener if not yet done
+ if (modelListener == null && model != null && viewer instanceof CommonViewer) {
+ modelListener = new ModelListener(model, (CommonViewer)viewer);
+ Protocol.invokeLater(new Runnable() {
+ @Override
+ public void run() {
+ model.addListener(modelListener);
+ }
+ });
+ }
+
+ if (model != null && newInput instanceof IRoot) {
+ // Refresh the model asynchronously
+ Protocol.invokeLater(new Runnable() {
+ @Override
+ public void run() {
+ model.getService(ILocatorModelRefreshService.class).refresh();
+ }
+ });
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.navigator.ICommonContentProvider#init(org.eclipse.ui.navigator.ICommonContentExtensionSite)
+ */
+ @Override
+ public void init(ICommonContentExtensionSite config) {
+ Assert.isNotNull(config);
+
+ // Make sure that the hidden "Redirected Peers" filter is active
+ INavigatorContentService cs = config.getService();
+ INavigatorFilterService fs = cs != null ? cs.getFilterService() : null;
+ if (fs != null && !fs.isActive(REDIRECT_PEERS_FILTER_ID)) {
+ if (fs instanceof NavigatorFilterService) {
+ NavigatorFilterService navFilterService = (NavigatorFilterService)fs;
+ navFilterService.addActiveFilterIds(new String[] { REDIRECT_PEERS_FILTER_ID });
+ navFilterService.updateViewer();
+ }
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.navigator.IMementoAware#restoreState(org.eclipse.ui.IMemento)
+ */
+ @Override
+ public void restoreState(IMemento aMemento) {
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.navigator.IMementoAware#saveState(org.eclipse.ui.IMemento)
+ */
+ @Override
+ public void saveState(IMemento aMemento) {
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/navigator/EventListener.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/navigator/EventListener.java
new file mode 100644
index 000000000..eb4c24b7b
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/navigator/EventListener.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.ui.navigator;
+
+import java.util.EventObject;
+
+import org.eclipse.tcf.te.runtime.events.ChangeEvent;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.ui.views.events.AbstractEventListener;
+
+/**
+ * UI event listener updating the target explorer view.
+ */
+public class EventListener extends AbstractEventListener {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.interfaces.events.IEventListener#eventFired(java.util.EventObject)
+ */
+ @Override
+ public void eventFired(EventObject event) {
+ if (event instanceof ChangeEvent) {
+ final ChangeEvent changeEvent = (ChangeEvent)event;
+ final Object source = changeEvent.getSource();
+
+ // Property changes for individual peer model nodes refreshes the node only
+ if (source instanceof IPeerModel) {
+ if ("expanded".equals(changeEvent.getEventId())) { //$NON-NLS-1$
+ // Expansion state of the node changed.
+ boolean expanded = ((Boolean)changeEvent.getNewValue()).booleanValue();
+ // Update the nodes expansion state
+ getViewer().setExpandedState(source, expanded);
+ } else {
+ // Refresh the node
+ refresh(source, false);
+ }
+ }
+ }
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/internal/navigator/LabelProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/navigator/LabelProvider.java
index 2013ca091..297024712 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/internal/navigator/LabelProvider.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/navigator/LabelProvider.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.ui.internal.navigator;
+package org.eclipse.tcf.te.tcf.ui.navigator;
import org.eclipse.jface.viewers.DecoratingLabelProvider;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/internal/navigator/LabelProviderDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/navigator/LabelProviderDelegate.java
index c724592f4..d265b5fe6 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/internal/navigator/LabelProviderDelegate.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/navigator/LabelProviderDelegate.java
@@ -7,19 +7,21 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.ui.internal.navigator;
+package org.eclipse.tcf.te.tcf.ui.navigator;
import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.viewers.ILabelDecorator;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.swt.graphics.Image;
-import org.eclipse.tm.tcf.protocol.IPeer;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.te.tcf.locator.interfaces.nodes.IPeerModel;
-import org.eclipse.tm.te.tcf.ui.activator.UIPlugin;
-import org.eclipse.tm.te.tcf.ui.internal.ImageConsts;
-import org.eclipse.tm.te.tcf.ui.internal.navigator.images.PeerImageDescriptor;
-import org.eclipse.tm.te.ui.jface.images.AbstractImageDescriptor;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.tcf.ui.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.ui.internal.ImageConsts;
+import org.eclipse.tcf.te.tcf.ui.navigator.images.PeerImageDescriptor;
+import org.eclipse.tcf.te.tcf.ui.navigator.nodes.PeerRedirectorGroupNode;
+import org.eclipse.tcf.te.tcf.ui.nls.Messages;
+import org.eclipse.tcf.te.ui.jface.images.AbstractImageDescriptor;
/**
@@ -52,25 +54,28 @@ public class LabelProviderDelegate extends LabelProvider implements ILabelDecora
if (label != null && !"".equals(label.trim())) { //$NON-NLS-1$
return label;
}
+ } else if (element instanceof PeerRedirectorGroupNode) {
+ return Messages.RemotePeerDiscoveryRootNode_label;
}
return ""; //$NON-NLS-1$
}
-
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.LabelProvider#getImage(java.lang.Object)
*/
@Override
public Image getImage(Object element) {
if (element instanceof IPeerModel) {
- return UIPlugin.getImage(ImageConsts.TARGET);
+ return UIPlugin.getImage(ImageConsts.PEER);
+ }
+ if (element instanceof PeerRedirectorGroupNode) {
+ return UIPlugin.getImage(ImageConsts.DISCOVERY_ROOT);
}
return super.getImage(element);
}
-
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.ILabelDecorator#decorateImage(org.eclipse.swt.graphics.Image, java.lang.Object)
*/
@@ -88,27 +93,29 @@ public class LabelProviderDelegate extends LabelProvider implements ILabelDecora
return decoratedImage;
}
-
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.ILabelDecorator#decorateText(java.lang.String, java.lang.Object)
*/
@Override
- public String decorateText(String text, Object element) {
+ public String decorateText(final String text, final Object element) {
if (element instanceof IPeerModel) {
String label = text;
- final IPeer peer = ((IPeerModel)element).getPeer();
final StringBuilder builder = new StringBuilder(label != null && !"".equals(label.trim()) ? label.trim() : "<noname>"); //$NON-NLS-1$ //$NON-NLS-2$
- if (Protocol.isDispatchThread()) {
- doDecorateText(builder, peer);
- } else {
- Protocol.invokeAndWait(new Runnable() {
- @Override
- public void run() {
- doDecorateText(builder, peer);
- }
- });
- }
+
+ Runnable runnable = new Runnable() {
+ @Override
+ public void run() {
+ IPeer peer = ((IPeerModel)element).getPeer();
+ String dnsName = ((IPeerModel)element).getStringProperty("dns.name.transient"); //$NON-NLS-1$
+
+ doDecorateText(builder, peer, dnsName);
+ }
+ };
+
+ if (Protocol.isDispatchThread()) runnable.run();
+ else Protocol.invokeAndWait(runnable);
+
label = builder.toString();
if (label != null && !"".equals(label.trim()) && !"<noname>".equals(label.trim())) { //$NON-NLS-1$ //$NON-NLS-2$
@@ -125,30 +132,25 @@ public class LabelProviderDelegate extends LabelProvider implements ILabelDecora
*
* @param builder The string builder to decorate. Must not be <code>null</code>.
* @param peer The peer. Must not be <code>null</code>.
+ * @param dnsName The peers DNS name or <code>null</code>.
*/
- /* default */ void doDecorateText(StringBuilder builder, IPeer peer) {
+ /* default */ void doDecorateText(StringBuilder builder, IPeer peer, String dnsName) {
Assert.isNotNull(builder);
Assert.isNotNull(peer);
Assert.isTrue(Protocol.isDispatchThread());
- String osName = peer.getOSName();
-
- if (osName != null && !"".equals(osName.trim())) { //$NON-NLS-1$
- builder.append(" [" + osName.trim() + "]"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
String ip = peer.getAttributes().get(IPeer.ATTR_IP_HOST);
String port = peer.getAttributes().get(IPeer.ATTR_IP_PORT);
if (ip != null && !"".equals(ip.trim())) { //$NON-NLS-1$
- builder.append(" @ "); //$NON-NLS-1$
- builder.append(ip.trim());
+ builder.append(" ["); //$NON-NLS-1$
+ builder.append(dnsName != null && !"".equals(dnsName.trim()) ? dnsName.trim() : ip.trim()); //$NON-NLS-1$
if (port != null && !"".equals(port.trim()) && !"1534".equals(port.trim())) { //$NON-NLS-1$ //$NON-NLS-2$
builder.append(":"); //$NON-NLS-1$
builder.append(port.trim());
}
+ builder.append("]"); //$NON-NLS-1$
}
-
}
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/navigator/ModelListener.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/navigator/ModelListener.java
new file mode 100644
index 000000000..ac4931be6
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/navigator/ModelListener.java
@@ -0,0 +1,93 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.ui.navigator;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.ILocatorModel;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.tcf.locator.listener.ModelAdapter;
+import org.eclipse.tcf.te.ui.views.editor.EditorInput;
+import org.eclipse.tcf.te.ui.views.interfaces.IUIConstants;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorReference;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.navigator.CommonViewer;
+
+
+/**
+ * TCF locator model listener implementation.
+ */
+public class ModelListener extends ModelAdapter {
+ private final ILocatorModel parentModel;
+ /* default */ final CommonViewer viewer;
+
+ /**
+ * Constructor.
+ *
+ * @param parent The parent locator model. Must not be <code>null</code>.
+ * @param viewer The common viewer instance. Must not be <code>null</code>.
+ */
+ public ModelListener(ILocatorModel parent, CommonViewer viewer) {
+ Assert.isNotNull(parent);
+ Assert.isNotNull(viewer);
+
+ this.parentModel = parent;
+ this.viewer = viewer;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.locator.listener.ModelAdapter#locatorModelChanged(org.eclipse.tcf.te.tcf.locator.interfaces.nodes.ILocatorModel, org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel, boolean)
+ */
+ @Override
+ public void locatorModelChanged(final ILocatorModel model, final IPeerModel peer, final boolean added) {
+ if (parentModel.equals(model)) {
+ Tree tree = viewer.getTree();
+ if (tree != null && !tree.isDisposed()) {
+ Display display = tree.getDisplay();
+ display.asyncExec(new Runnable() {
+ @Override
+ public void run() {
+ if (viewer.getTree() != null && !viewer.getTree().isDisposed()) {
+ viewer.refresh();
+ }
+ }
+ });
+
+ // If a peer model got removed, check if there is still an properties
+ // editor open, and if yes, close the editor.
+ if (!added && peer != null) {
+ display.asyncExec(new Runnable() {
+ @Override
+ public void run() {
+ // Get the currently active workbench window
+ IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+ if (window != null) {
+ // Get the active page
+ IWorkbenchPage page = window.getActivePage();
+ // Create the editor input object
+ IEditorInput input = new EditorInput(peer);
+ // Lookup the editors matching the editor input
+ IEditorReference[] editors = page.findEditors(input, IUIConstants.ID_EDITOR, IWorkbenchPage.MATCH_INPUT);
+ if (editors != null && editors.length > 0) {
+ // Close the editors
+ page.closeEditors(editors, true);
+ }
+ }
+ }
+ });
+ }
+ }
+ }
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/internal/navigator/images/PeerImageDescriptor.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/navigator/images/PeerImageDescriptor.java
index 2fe4f09b0..5d5908702 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/internal/navigator/images/PeerImageDescriptor.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/navigator/images/PeerImageDescriptor.java
@@ -7,17 +7,17 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.ui.internal.navigator.images;
+package org.eclipse.tcf.te.tcf.ui.navigator.images;
import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Point;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.te.tcf.locator.interfaces.nodes.IPeerModel;
-import org.eclipse.tm.te.tcf.locator.interfaces.nodes.IPeerModelProperties;
-import org.eclipse.tm.te.tcf.ui.internal.ImageConsts;
-import org.eclipse.tm.te.ui.jface.images.AbstractImageDescriptor;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModelProperties;
+import org.eclipse.tcf.te.tcf.ui.internal.ImageConsts;
+import org.eclipse.tcf.te.ui.jface.images.AbstractImageDescriptor;
/**
@@ -69,6 +69,11 @@ public class PeerImageDescriptor extends AbstractImageDescriptor {
state = node.getIntProperty(IPeerModelProperties.PROP_STATE);
}
+ /**
+ * Define the peer image descriptor key.
+ *
+ * @param hashCode The hash code of the base image.
+ */
protected void defineKey(int hashCode) {
String key = "PMID:" + //$NON-NLS-1$
hashCode + ":" + //$NON-NLS-1$
@@ -84,13 +89,7 @@ public class PeerImageDescriptor extends AbstractImageDescriptor {
protected void drawCompositeImage(int width, int height) {
drawCentered(baseImage, width, height);
- if (state == IPeerModelProperties.STATE_UNKNOWN) { /* unknown */
- drawBottomRight(ImageConsts.GREY_OVR);
- }
- else if (state == IPeerModelProperties.STATE_REACHABLE) { /* not connected, but reachable */
- drawBottomRight(ImageConsts.GOLD_OVR);
- }
- else if (state == IPeerModelProperties.STATE_CONNECTED) { /* connected */
+ if (state == IPeerModelProperties.STATE_CONNECTED) { /* connected */
drawBottomRight(ImageConsts.GREEN_OVR);
}
else if (state == IPeerModelProperties.STATE_NOT_REACHABLE) { /* not connected, not reachable */
@@ -110,7 +109,7 @@ public class PeerImageDescriptor extends AbstractImageDescriptor {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.ide.util.ui.AbstractImageDescriptor#getBaseImage()
+ * @see org.eclipse.tcf.te.tcf.ide.util.ui.AbstractImageDescriptor#getBaseImage()
*/
@Override
protected Image getBaseImage() {
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/navigator/nodes/PeerRedirectorGroupNode.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/navigator/nodes/PeerRedirectorGroupNode.java
new file mode 100644
index 000000000..b096f9dbb
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/navigator/nodes/PeerRedirectorGroupNode.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.ui.navigator.nodes;
+
+import org.eclipse.core.runtime.Assert;
+
+/**
+ * A node grouping discovered child peers of a proxy peer.
+ * <p>
+ * Instances of this class are immutable.
+ */
+public class PeerRedirectorGroupNode {
+ public final String peerId;
+
+ /**
+ * Constructor.
+ */
+ public PeerRedirectorGroupNode(String peerId) {
+ Assert.isNotNull(peerId);
+ this.peerId = peerId;
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj) {
+ if (obj instanceof PeerRedirectorGroupNode) {
+ return peerId.equals(((PeerRedirectorGroupNode)obj).peerId);
+ }
+ return super.equals(obj);
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode() {
+ return peerId.hashCode();
+ }
+} \ No newline at end of file
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/nls/Messages.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/nls/Messages.java
index 81279c0c5..f90be47f9 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/nls/Messages.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/nls/Messages.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.ui.nls;
+package org.eclipse.tcf.te.tcf.ui.nls;
import java.lang.reflect.Field;
@@ -19,7 +19,7 @@ import org.eclipse.osgi.util.NLS;
public class Messages extends NLS {
// The plug-in resource bundle name
- private static final String BUNDLE_NAME = "org.eclipse.tm.te.tcf.ui.nls.Messages"; //$NON-NLS-1$
+ private static final String BUNDLE_NAME = "org.eclipse.tcf.te.tcf.ui.nls.Messages"; //$NON-NLS-1$
/**
* Static constructor.
@@ -69,21 +69,31 @@ public class Messages extends NLS {
// **** Declare externalized string id's down here *****
- public static String NodePropertiesContentProvider_peerNode_sectionTitle;
+ public static String OverviewEditorPage_title;
- public static String NodePropertiesLabelProvider_state;
- public static String NodePropertiesLabelProvider_state__1;
- public static String NodePropertiesLabelProvider_state_0;
- public static String NodePropertiesLabelProvider_state_1;
- public static String NodePropertiesLabelProvider_state_2;
- public static String NodePropertiesLabelProvider_state_3;
+ public static String GeneralInformationSection_title;
+ public static String GeneralInformationSection_description;
- public static String NodePropertiesLabelProvider_lastScannerError;
+ public static String GeneralInformationSection_state;
+ public static String GeneralInformationSection_state__1;
+ public static String GeneralInformationSection_state_0;
+ public static String GeneralInformationSection_state_1;
+ public static String GeneralInformationSection_state_2;
+ public static String GeneralInformationSection_state_3;
- public static String NodePropertiesLabelProvider_services_local;
- public static String NodePropertiesLabelProvider_services_remote;
+ public static String TransportSection_title;
+ public static String TransportSection_description;
+
+ public static String ServicesSection_title;
+ public static String ServicesSection_description;
+ public static String ServicesSection_group_local_title;
+ public static String ServicesSection_group_remote_title;
+
+ public static String AttributesSection_title;
+ public static String AttributesSection_description;
public static String NewTargetWizard_windowTitle;
+ public static String NewTargetWizard_newPeer_name;
public static String NewTargetWizard_error_savePeer;
public static String NewTargetWizardPage_title;
@@ -91,6 +101,8 @@ public class Messages extends NLS {
public static String NewTargetWizardPage_section_transportType;
public static String NewTargetWizardPage_section_attributes;
+ public static String RemotePeerDiscoveryRootNode_label;
+
public static String PeerIdControl_label;
public static String PeerNameControl_label;
@@ -127,10 +139,31 @@ public class Messages extends NLS {
public static String PeerAttributesTablePart_edit_title;
public static String PeerAttributesTablePart_edit_message;
- public static String DeleteCommandHandler_error_title;
- public static String DeleteCommandHandler_error_deleteFailed;
+ public static String DeleteHandler_error_title;
+ public static String DeleteHandler_error_deleteFailed;
public static String AgentSelectionDialog_dialogTitle;
public static String AgentSelectionDialog_title;
public static String AgentSelectionDialog_message;
+
+ public static String RedirectHandler_error_title;
+ public static String RedirectHandler_error_redirectFailed;
+
+ public static String RedirectAgentSelectionDialog_dialogTitle;
+ public static String RedirectAgentSelectionDialog_title;
+ public static String RedirectAgentSelectionDialog_message;
+
+ public static String ResetRedirectHandler_error_title;
+ public static String ResetRedirectHandler_error_resetRedirectFailed;
+
+ public static String LoggingPreferencePage_label;
+ public static String LoggingPreferencePage_enabled_label;
+ public static String LoggingPreferencePage_monitorEnabled_label;
+ public static String LoggingPreferencePage_filterGroup_label;
+ public static String LoggingPreferencePage_showHeartbeats_label;
+ public static String LoggingPreferencePage_showFrameworkEvents_label;
+ public static String LoggingPreferencePage_logfileGroup_label;
+ public static String LoggingPreferencePage_maxFileSize_label;
+ public static String LoggingPreferencePage_maxFileSize_error;
+ public static String LoggingPreferencePage_maxFilesInCycle_label;
}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/nls/Messages.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/nls/Messages.properties
index c2d6912cc..632771d12 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/nls/Messages.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/nls/Messages.properties
@@ -1,23 +1,33 @@
#
-# org.eclipse.tm.te.tcf.ui
+# org.eclipse.tcf.te.tcf.ui
# Externalized Strings.
#
-NodePropertiesContentProvider_peerNode_sectionTitle=Peer
+OverviewEditorPage_title=Overview
-NodePropertiesLabelProvider_state=Link State
-NodePropertiesLabelProvider_state__1=Unknown
-NodePropertiesLabelProvider_state_0=Reachable
-NodePropertiesLabelProvider_state_1=Communicating
-NodePropertiesLabelProvider_state_2=Not Reachable. Connection attempt timed out.
-NodePropertiesLabelProvider_state_3=Not Reachable. Connection attempt failed.
+GeneralInformationSection_title=General Information
+GeneralInformationSection_description=This section describes general information about this peer.
-NodePropertiesLabelProvider_lastScannerError=Communication failed. Possible cause:
+GeneralInformationSection_state=Link State:
+GeneralInformationSection_state__1=Unknown
+GeneralInformationSection_state_0=Reachable
+GeneralInformationSection_state_1=Communicating
+GeneralInformationSection_state_2=Not Reachable. Connection attempt timed out.
+GeneralInformationSection_state_3=Not Reachable. Connection attempt failed.
-NodePropertiesLabelProvider_services_local=Local Services
-NodePropertiesLabelProvider_services_remote=Remote Services
+TransportSection_title=Transport
+TransportSection_description=This section describes the peers transport.
+
+ServicesSection_title=Services
+ServicesSection_description=This section describes the peer services.
+ServicesSection_group_local_title=Local Services
+ServicesSection_group_remote_title=Remote Services
+
+AttributesSection_title=Attributes
+AttributesSection_description=This section describes the custom peer attributes.
NewTargetWizard_windowTitle=New Peer
+NewTargetWizard_newPeer_name=New Peer {0}
NewTargetWizard_error_savePeer=Failed to save peer: {0}
NewTargetWizardPage_title=New Peer
@@ -25,6 +35,8 @@ NewTargetWizardPage_description=Define the properties of the new peer.
NewTargetWizardPage_section_transportType=Specify the transport type and properties:
NewTargetWizardPage_section_attributes=Specify additional peer attributes:
+RemotePeerDiscoveryRootNode_label=Peers Discovered
+
PeerIdControl_label=Peer ID:
PeerNameControl_label=Peer Name:
@@ -61,9 +73,32 @@ PeerAttributesTablePart_edit_dialogTitle=Edit
PeerAttributesTablePart_edit_title=Edit Attribute
PeerAttributesTablePart_edit_message=Edit the selected peer attribute.
-DeleteCommandHandler_error_title=Error
-DeleteCommandHandler_error_deleteFailed=Failed to delete static peer.
+DeleteHandler_error_title=Error
+DeleteHandler_error_deleteFailed=Failed to delete static peer.
AgentSelectionDialog_dialogTitle=Select Agent(s)
AgentSelectionDialog_title=Select Agent(s)
AgentSelectionDialog_message=Select the agent(s) for the operation to perform.
+
+RedirectHandler_error_title=Error
+RedirectHandler_error_redirectFailed=Failed to redirect peer communication.
+
+RedirectAgentSelectionDialog_dialogTitle=Redirect
+RedirectAgentSelectionDialog_title=Select Proxy
+RedirectAgentSelectionDialog_message=Select the proxy to redirect the communication through.
+
+ResetRedirectHandler_error_title=Error
+ResetRedirectHandler_error_resetRedirectFailed=Failed to reset peer communication redirect.
+
+# ***** Preference Pages *****
+
+LoggingPreferencePage_label=Logging settings for agent communication:
+LoggingPreferencePage_enabled_label=Enable logging
+LoggingPreferencePage_monitorEnabled_label=Enable agent communication monitor
+LoggingPreferencePage_filterGroup_label=Event Filter Settings
+LoggingPreferencePage_showHeartbeats_label=Log peer heart beat events
+LoggingPreferencePage_showFrameworkEvents_label=Log low-level framework events
+LoggingPreferencePage_logfileGroup_label=Log File Settings
+LoggingPreferencePage_maxFileSize_label=Maximum Log File Size:
+LoggingPreferencePage_maxFileSize_error=Invalid Log File Size.
+LoggingPreferencePage_maxFilesInCycle_label=Maximum # of Files in Rotation:
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/preferences/LoggingPreferencePage.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/preferences/LoggingPreferencePage.java
new file mode 100644
index 000000000..268d24dc3
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/preferences/LoggingPreferencePage.java
@@ -0,0 +1,251 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.ui.preferences;
+
+import java.util.regex.Pattern;
+
+import org.eclipse.core.runtime.Assert;
+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.jface.preference.PreferenceStore;
+import org.eclipse.jface.preference.StringFieldEditor;
+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.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.tcf.te.runtime.preferences.ScopedEclipsePreferences;
+import org.eclipse.tcf.te.tcf.log.core.activator.CoreBundleActivator;
+import org.eclipse.tcf.te.tcf.log.core.interfaces.IPreferenceKeys;
+import org.eclipse.tcf.te.tcf.ui.nls.Messages;
+import org.eclipse.tcf.te.ui.swt.SWTControlUtil;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+
+/**
+ * Agent communication logging preference page.
+ */
+@SuppressWarnings("restriction")
+public class LoggingPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
+ // References to the field editors
+ private BooleanFieldEditor enabled;
+ private BooleanFieldEditor monitorEnabled;
+ private BooleanFieldEditor showHeartbeats;
+ private BooleanFieldEditor showFrameworkEvents;
+ private StringFieldEditor logfileSize;
+ private IntegerFieldEditor filesInCycle;
+
+ // The preference store used internally for the field editors
+ private IPreferenceStore store;
+
+ /**
+ * Log file size field editor implementation.
+ */
+ private class LogfileSizeFieldEditor extends StringFieldEditor {
+ private Pattern valid = Pattern.compile("0|[1-9][0-9]*[KMG]?"); //$NON-NLS-1$
+
+ /**
+ * Constructor.
+ *
+ * @param name The name of the preference this field editor works on.
+ * @param labelText The label text.
+ * @param parent the parent of the field editor's control
+ */
+ public LogfileSizeFieldEditor(String name, String labelText, Composite parent) {
+ super(name, labelText, parent);
+ this.setEmptyStringAllowed(false);
+ this.setTextLimit(6);
+ this.setErrorMessage(Messages.LoggingPreferencePage_maxFileSize_error);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.preference.StringFieldEditor#doCheckState()
+ */
+ @Override
+ protected boolean doCheckState() {
+ if (valid.matcher(getStringValue()).matches()) {
+ return true;
+ }
+ return false;
+ }
+ }
+
+
+ /**
+ * Constructor.
+ */
+ public LoggingPreferencePage() {
+ super(FieldEditorPreferencePage.GRID);
+
+ // The internal preference store never needs saving
+ store = new PreferenceStore() {
+ @Override
+ public boolean needsSaving() {
+ return false;
+ }
+ };
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
+ */
+ @Override
+ public void init(IWorkbench workbench) {
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
+ */
+ @Override
+ protected void createFieldEditors() {
+ Composite parent = getFieldEditorParent();
+ ((GridLayout)parent.getLayout()).makeColumnsEqualWidth = false;
+
+ Composite panel = new Composite(parent, SWT.NONE);
+ panel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+ GridLayout layout = new GridLayout(2, false);
+ layout.marginHeight = 0; layout.marginWidth = 0;
+ panel.setLayout(layout);
+ panel.setFont(parent.getFont());
+
+ Label label = new Label(panel, SWT.HORIZONTAL);
+ label.setText(Messages.LoggingPreferencePage_label);
+ GridData layoutData = new GridData(SWT.FILL, SWT.CENTER, true, false);
+ layoutData.horizontalSpan = 2;
+ label.setLayoutData(layoutData);
+
+ createSpacer(panel, 2);
+
+ enabled = new BooleanFieldEditor(IPreferenceKeys.PREF_LOGGING_ENABLED,
+ Messages.LoggingPreferencePage_enabled_label, panel);
+ addField(enabled);
+
+ monitorEnabled = new BooleanFieldEditor(IPreferenceKeys.PREF_MONITOR_ENABLED,
+ Messages.LoggingPreferencePage_monitorEnabled_label, panel);
+ addField(monitorEnabled);
+
+ createSpacer(panel, 2);
+
+ Group filterGroup = new Group(panel, SWT.NONE);
+ filterGroup.setText(Messages.LoggingPreferencePage_filterGroup_label);
+ filterGroup.setLayout(new GridLayout(2, false));
+ filterGroup.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+
+ // The composite is necessary to get the margins within the group right!
+ Composite filterPanel = new Composite(filterGroup, SWT.NONE);
+ filterPanel.setLayout(new GridLayout());
+ filterPanel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+
+ showHeartbeats = new BooleanFieldEditor(IPreferenceKeys.PREF_SHOW_HEARTBEATS,
+ Messages.LoggingPreferencePage_showHeartbeats_label, filterPanel);
+ addField(showHeartbeats);
+
+ showFrameworkEvents = new BooleanFieldEditor(IPreferenceKeys.PREF_SHOW_FRAMEWORK_EVENTS,
+ Messages.LoggingPreferencePage_showFrameworkEvents_label, filterPanel);
+ addField(showFrameworkEvents);
+
+ createSpacer(panel, 2);
+
+ Group logfileGroup = new Group(panel, SWT.NONE);
+ logfileGroup.setText(Messages.LoggingPreferencePage_logfileGroup_label);
+ logfileGroup.setLayout(new GridLayout(2, false));
+ logfileGroup.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+
+ // The composite is necessary to get the margins within the group right!
+ Composite logfilePanel = new Composite(logfileGroup, SWT.NONE);
+ logfilePanel.setLayout(new GridLayout());
+ logfilePanel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+
+ logfileSize = new LogfileSizeFieldEditor(IPreferenceKeys.PREF_MAX_FILE_SIZE,
+ Messages.LoggingPreferencePage_maxFileSize_label, logfilePanel);
+ addField(logfileSize);
+
+ filesInCycle = new IntegerFieldEditor(IPreferenceKeys.PREF_MAX_FILES_IN_CYCLE,
+ Messages.LoggingPreferencePage_maxFilesInCycle_label, logfilePanel);
+ addField(filesInCycle);
+ }
+
+ /**
+ * Creates a empty space, 1/4 as high as a line.
+ *
+ * @param parent The parent composite. Must not be <code>null</code>.
+ * @param columnSpan The horizontal span.
+ */
+ protected void createSpacer(Composite parent, int columnSpan) {
+ Assert.isNotNull(parent);
+ GridData gd = new GridData();
+ gd.horizontalSpan = columnSpan;
+ gd.heightHint = SWTControlUtil.convertHeightInCharsToPixels(parent, 1) / 4;
+ new Label(parent, SWT.NONE).setLayoutData(gd);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.preference.PreferencePage#getPreferenceStore()
+ */
+ @Override
+ public IPreferenceStore getPreferenceStore() {
+ return store;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.preference.FieldEditorPreferencePage#initialize()
+ */
+ @Override
+ protected void initialize() {
+ ScopedEclipsePreferences prefs = CoreBundleActivator.getScopedPreferences();
+
+ store.setDefault(IPreferenceKeys.PREF_LOGGING_ENABLED, prefs.getDefaultBoolean(IPreferenceKeys.PREF_LOGGING_ENABLED));
+ store.setValue(IPreferenceKeys.PREF_LOGGING_ENABLED, prefs.getBoolean(IPreferenceKeys.PREF_LOGGING_ENABLED));
+
+ store.setDefault(IPreferenceKeys.PREF_MONITOR_ENABLED, prefs.getDefaultBoolean(IPreferenceKeys.PREF_MONITOR_ENABLED));
+ store.setValue(IPreferenceKeys.PREF_MONITOR_ENABLED, prefs.getBoolean(IPreferenceKeys.PREF_MONITOR_ENABLED));
+
+ store.setDefault(IPreferenceKeys.PREF_SHOW_HEARTBEATS, prefs.getDefaultBoolean(IPreferenceKeys.PREF_SHOW_HEARTBEATS));
+ store.setValue(IPreferenceKeys.PREF_SHOW_HEARTBEATS, prefs.getBoolean(IPreferenceKeys.PREF_SHOW_HEARTBEATS));
+
+ store.setDefault(IPreferenceKeys.PREF_SHOW_FRAMEWORK_EVENTS, prefs.getDefaultBoolean(IPreferenceKeys.PREF_SHOW_FRAMEWORK_EVENTS));
+ store.setValue(IPreferenceKeys.PREF_SHOW_FRAMEWORK_EVENTS, prefs.getBoolean(IPreferenceKeys.PREF_SHOW_FRAMEWORK_EVENTS));
+
+ store.setDefault(IPreferenceKeys.PREF_MAX_FILE_SIZE, prefs.getDefaultString(IPreferenceKeys.PREF_MAX_FILE_SIZE));
+ store.setValue(IPreferenceKeys.PREF_MAX_FILE_SIZE, prefs.getString(IPreferenceKeys.PREF_MAX_FILE_SIZE));
+
+ store.setDefault(IPreferenceKeys.PREF_MAX_FILES_IN_CYCLE, prefs.getDefaultInt(IPreferenceKeys.PREF_MAX_FILES_IN_CYCLE));
+ store.setValue(IPreferenceKeys.PREF_MAX_FILES_IN_CYCLE, prefs.getInt(IPreferenceKeys.PREF_MAX_FILES_IN_CYCLE));
+
+ // Load values into field editors
+ super.initialize();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.preference.FieldEditorPreferencePage#performOk()
+ */
+ @Override
+ public boolean performOk() {
+ boolean success = super.performOk();
+
+ if (success) {
+ ScopedEclipsePreferences prefs = CoreBundleActivator.getScopedPreferences();
+
+ prefs.putBoolean(IPreferenceKeys.PREF_LOGGING_ENABLED, store.getBoolean(IPreferenceKeys.PREF_LOGGING_ENABLED));
+ prefs.putBoolean(IPreferenceKeys.PREF_MONITOR_ENABLED, store.getBoolean(IPreferenceKeys.PREF_MONITOR_ENABLED));
+
+ prefs.putBoolean(IPreferenceKeys.PREF_SHOW_HEARTBEATS, store.getBoolean(IPreferenceKeys.PREF_SHOW_HEARTBEATS));
+ prefs.putBoolean(IPreferenceKeys.PREF_SHOW_FRAMEWORK_EVENTS, store.getBoolean(IPreferenceKeys.PREF_SHOW_FRAMEWORK_EVENTS));
+
+ prefs.putString(IPreferenceKeys.PREF_MAX_FILE_SIZE, store.getString(IPreferenceKeys.PREF_MAX_FILE_SIZE));
+ prefs.putInt(IPreferenceKeys.PREF_MAX_FILES_IN_CYCLE, store.getInt(IPreferenceKeys.PREF_MAX_FILES_IN_CYCLE));
+ }
+
+ return success;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/wizards/NewTargetWizard.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/wizards/NewTargetWizard.java
new file mode 100644
index 000000000..8fbfbbacd
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/wizards/NewTargetWizard.java
@@ -0,0 +1,112 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.ui.wizards;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+import java.util.concurrent.atomic.AtomicInteger;
+
+import org.eclipse.jface.dialogs.IMessageProvider;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.te.runtime.persistence.interfaces.IPersistenceService;
+import org.eclipse.tcf.te.runtime.services.ServiceManager;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.ILocatorModel;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.tcf.locator.interfaces.services.ILocatorModelLookupService;
+import org.eclipse.tcf.te.tcf.locator.interfaces.services.ILocatorModelRefreshService;
+import org.eclipse.tcf.te.tcf.locator.model.Model;
+import org.eclipse.tcf.te.tcf.ui.nls.Messages;
+import org.eclipse.tcf.te.ui.views.ViewsUtil;
+import org.eclipse.tcf.te.ui.views.interfaces.IUIConstants;
+import org.eclipse.tcf.te.ui.wizards.AbstractWizard;
+import org.eclipse.ui.INewWizard;
+import org.eclipse.ui.IWorkbench;
+
+/**
+ * New peer wizard implementation.
+ */
+public class NewTargetWizard extends AbstractWizard implements INewWizard {
+ // Session wide new peer counter
+ private final static AtomicInteger counter = new AtomicInteger();
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IWorkbenchWizard#init(org.eclipse.ui.IWorkbench, org.eclipse.jface.viewers.IStructuredSelection)
+ */
+ @Override
+ public void init(IWorkbench workbench, IStructuredSelection selection) {
+ // Set the window title
+ setWindowTitle(Messages.NewTargetWizard_windowTitle);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.wizard.Wizard#performFinish()
+ */
+ @Override
+ public boolean performFinish() {
+ // Create the minimum set of peer attributes to create a new peer
+ final Map<String, String> peerAttributes = new HashMap<String, String>();
+ peerAttributes.put(IPeer.ATTR_ID, UUID.randomUUID().toString());
+ peerAttributes.put(IPeer.ATTR_NAME, NLS.bind(Messages.NewTargetWizard_newPeer_name, Integer.valueOf(counter.incrementAndGet())));
+
+ try {
+ // Save the new peer
+ IPersistenceService persistenceService = ServiceManager.getInstance().getService(IPersistenceService.class);
+ if (persistenceService == null) throw new IOException("Persistence service instance unavailable."); //$NON-NLS-1$
+ persistenceService.write(peerAttributes);
+
+ // Get the locator model
+ final ILocatorModel model = Model.getModel();
+ if (model != null) {
+ // Trigger a refresh of the model to read in the newly created static peer
+ final ILocatorModelRefreshService service = model.getService(ILocatorModelRefreshService.class);
+ if (service != null) {
+ Protocol.invokeLater(new Runnable() {
+ @Override
+ public void run() {
+ // Refresh the model now (must be executed within the TCF dispatch thread)
+ service.refresh();
+
+ // Get the peer model node from the model and select it in the tree
+ final IPeerModel peerNode = model.getService(ILocatorModelLookupService.class).lkupPeerModelById(peerAttributes.get(IPeer.ATTR_ID));
+ if (peerNode != null) {
+ // Refresh the viewer
+ ViewsUtil.refresh(IUIConstants.ID_EXPLORER);
+ // Create the selection
+ ISelection selection = new StructuredSelection(peerNode);
+ // Set the selection
+ ViewsUtil.setSelection(IUIConstants.ID_EXPLORER, selection);
+ // And open the properties on the selection
+ ViewsUtil.openProperties(selection);
+ }
+ }
+ });
+ }
+ }
+ } catch (IOException e) {
+ if (getContainer().getCurrentPage() instanceof WizardPage) {
+ String message = NLS.bind(Messages.NewTargetWizard_error_savePeer, e.getLocalizedMessage());
+ ((WizardPage)getContainer().getCurrentPage()).setMessage(message, IMessageProvider.ERROR);
+ getContainer().updateMessage();
+ }
+ return false;
+ }
+
+ return true;
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tests/.classpath b/target_explorer/plugins/org.eclipse.tcf.te.tests/.classpath
new file mode 100644
index 000000000..8a8f1668c
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tests/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tests/.project b/target_explorer/plugins/org.eclipse.tcf.te.tests/.project
index eed51a163..225f44a4f 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tests/.project
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tests/.project
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.eclipse.tm.te.tests</name>
+ <name>org.eclipse.tcf.te.tests</name>
<comment></comment>
<projects>
</projects>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tests/.settings/org.eclipse.jdt.core.prefs b/target_explorer/plugins/org.eclipse.tcf.te.tests/.settings/org.eclipse.jdt.core.prefs
index b6e6995d4..b6e6995d4 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tests/.settings/org.eclipse.jdt.core.prefs
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tests/.settings/org.eclipse.jdt.core.prefs
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tests/.settings/org.eclipse.jdt.ui.prefs b/target_explorer/plugins/org.eclipse.tcf.te.tests/.settings/org.eclipse.jdt.ui.prefs
index f3d3bd949..f3d3bd949 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tests/.settings/org.eclipse.jdt.ui.prefs
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tests/.settings/org.eclipse.jdt.ui.prefs
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tests/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.tests/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..6b312455e
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tests/META-INF/MANIFEST.MF
@@ -0,0 +1,22 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.tcf.te.tests;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipse.tcf.te.tests.activator.UIPlugin
+Bundle-Vendor: %providerName
+Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
+ org.eclipse.ui;bundle-version="3.7.0",
+ org.junit;bundle-version="4.8.2",
+ org.eclipse.tcf.te.ui.views;bundle-version="1.0.0",
+ org.eclipse.tcf.te.runtime;bundle-version="1.0.0",
+ org.eclipse.tcf.te.runtime.statushandler;bundle-version="1.0.0",
+ org.eclipse.tcf.te.runtime.stepper;bundle-version="1.0.0"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
+Bundle-Localization: plugin
+Export-Package: org.eclipse.tcf.te.tests,
+ org.eclipse.tcf.te.tests.activator;x-internal:=true,
+ org.eclipse.tcf.te.tests.interfaces,
+ org.eclipse.tcf.te.tests.statushandler,
+ org.eclipse.tcf.te.tests.suites
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tests/build.properties b/target_explorer/plugins/org.eclipse.tcf.te.tests/build.properties
new file mode 100644
index 000000000..73a5119ed
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tests/build.properties
@@ -0,0 +1,6 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.properties,\
+ plugin.xml
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tests/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.tests/plugin.properties
index 08b3c4299..08b3c4299 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tests/plugin.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tests/plugin.properties
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tests/plugin.xml b/target_explorer/plugins/org.eclipse.tcf.te.tests/plugin.xml
new file mode 100644
index 000000000..364e7dd70
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tests/plugin.xml
@@ -0,0 +1,188 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+
+<!-- Test status handler contributions -->
+ <extension point="org.eclipse.tcf.te.runtime.statushandler.handlers">
+ <handler
+ id="org.eclipse.tcf.te.tests.handler1"
+ class="org.eclipse.tcf.te.tests.statushandler.TestStatusHandler">
+ </handler>
+
+ <handler
+ id="org.eclipse.tcf.te.tests.handler2"
+ class="org.eclipse.tcf.te.tests.statushandler.TestStatusHandler">
+ </handler>
+ </extension>
+
+ <extension point="org.eclipse.tcf.te.runtime.statushandler.bindings">
+ <binding
+ handlerId="org.eclipse.tcf.te.tests.handler1"
+ id="org.eclipse.tcf.te.tests.binding1">
+ <enablement>
+ <instanceof value="org.eclipse.tcf.te.tests.CoreTestCase"/>
+ </enablement>
+ </binding>
+
+ <binding
+ handlerId="org.eclipse.tcf.te.tests.handler2"
+ id="org.eclipse.tcf.te.tests.binding2">
+ <enablement>
+ <instanceof value="org.eclipse.tcf.te.tests.interfaces.IInterruptCondition"/>
+ </enablement>
+ </binding>
+ </extension>
+
+<!-- Test stepper engine contributions -->
+ <extension point="org.eclipse.tcf.te.runtime.stepper.steps">
+ <step
+ class="org.eclipse.tcf.te.tests.stepper.TestStep"
+ id="org.eclipse.tcf.te.tests.stepper.step1"
+ label="Test Step 1">
+ </step>
+
+ <step
+ id="org.eclipse.tcf.te.tests.stepper.step2"
+ label="Test Step 2">
+ <class
+ class="org.eclipse.tcf.te.tests.stepper.ParameterizedTestStep">
+ <parameter
+ name="param1"
+ value="value1">
+ </parameter>
+ </class>
+ </step>
+
+ <step
+ class="org.eclipse.tcf.te.tests.stepper.TestStep"
+ id="org.eclipse.tcf.te.tests.stepper.step3"
+ label="Test Step 3">
+ <description>
+ Just another test step
+ </description>
+ </step>
+
+ <step
+ class="org.eclipse.tcf.te.tests.stepper.TestStep"
+ id="org.eclipse.tcf.te.tests.stepper.step4"
+ label="Test Step 4">
+ <requires
+ id="org.eclipse.tcf.te.tests.stepper.step1">
+ </requires>
+ </step>
+
+ <step
+ class="org.eclipse.tcf.te.tests.stepper.TestStep"
+ id="org.eclipse.tcf.te.tests.stepper.step5"
+ label="Test Step 5">
+ </step>
+ </extension>
+
+ <extension point="org.eclipse.tcf.te.runtime.stepper.stepBindings">
+ <binding
+ id="org.eclipse.tcf.te.tests.stepper.steps.binding1"
+ stepId="org.eclipse.tcf.te.tests.stepper.step5">
+ <enablement>
+ <with variable="activeContexts">
+ <count value="1"/>
+ </with>
+ </enablement>
+ </binding>
+ </extension>
+
+ <extension point="org.eclipse.tcf.te.runtime.stepper.stepGroups">
+ <stepGroup
+ id="org.eclipse.tcf.te.tests.stepper.stepGroup1"
+ label="Test Step Group 1"
+ locked="false">
+ </stepGroup>
+
+ <stepGroup
+ id="org.eclipse.tcf.te.tests.stepper.stepGroup2"
+ label="Test Step Group 2"
+ locked="true">
+ <description>
+ Just a step group description
+ </description>
+ </stepGroup>
+
+ <stepGroup
+ id="org.eclipse.tcf.te.tests.stepper.stepGroup3"
+ label="Test Step Group 3"
+ locked="false">
+ <references>
+ <reference
+ disable="false"
+ hidden="false"
+ id="org.eclipse.tcf.te.tests.stepper.step1"
+ removable="true"
+ singleton="true">
+ </reference>
+ <reference
+ disable="false"
+ hidden="false"
+ id="org.eclipse.tcf.te.tests.stepper.step2"
+ removable="true"
+ singleton="true">
+ </reference>
+ <reference
+ disable="false"
+ hidden="false"
+ id="org.eclipse.tcf.te.tests.stepper.step3"
+ removable="true"
+ singleton="true">
+ </reference>
+ <reference
+ disable="false"
+ hidden="false"
+ id="org.eclipse.tcf.te.tests.stepper.step4"
+ removable="true"
+ singleton="true">
+ </reference>
+ </references>
+ </stepGroup>
+
+ <stepGroup
+ id="org.eclipse.tcf.te.tests.stepper.stepGroup4"
+ label="Test Step Group 4"
+ locked="false">
+ <references>
+ <reference
+ disable="false"
+ hidden="false"
+ id="org.eclipse.tcf.te.tests.stepper.step1"
+ removable="true"
+ singleton="true">
+ </reference>
+ <reference
+ disable="false"
+ hidden="false"
+ id="org.eclipse.tcf.te.tests.stepper.step2"
+ removable="true"
+ singleton="true">
+ </reference>
+ <reference
+ disable="false"
+ hidden="false"
+ id="org.eclipse.tcf.te.tests.stepper.step3"
+ removable="true"
+ singleton="true">
+ </reference>
+ <reference
+ disable="false"
+ hidden="false"
+ id="org.eclipse.tcf.te.tests.stepper.step4"
+ removable="true"
+ singleton="true">
+ </reference>
+ <reference
+ disable="false"
+ hidden="false"
+ id="org.eclipse.tcf.te.tests.stepper.step5"
+ removable="true"
+ singleton="true">
+ </reference>
+ </references>
+ </stepGroup>
+ </extension>
+</plugin>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tests/pom.xml b/target_explorer/plugins/org.eclipse.tcf.te.tests/pom.xml
index 4a3da61af..07b30ecf6 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tests/pom.xml
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tests/pom.xml
@@ -7,12 +7,12 @@
<parent>
<groupId>org.eclipse.tcf</groupId>
<artifactId>tcf-parent</artifactId>
- <version>0.5.0-SNAPSHOT</version>
+ <version>1.0.0-SNAPSHOT</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<version>1.0.0.qualifier</version>
- <artifactId>org.eclipse.tm.te.tests</artifactId>
+ <artifactId>org.eclipse.tcf.te.tests</artifactId>
<packaging>eclipse-test-plugin</packaging>
<properties>
@@ -26,8 +26,8 @@
<artifactId>tycho-surefire-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
- <testSuite>org.eclipse.tm.te.tests</testSuite>
- <testClass>org.eclipse.tm.te.tests.suites.AllCoreTests</testClass>
+ <testSuite>org.eclipse.tcf.te.tests</testSuite>
+ <testClass>org.eclipse.tcf.te.tests.suites.AllCoreTests</testClass>
<useUIHarness>true</useUIHarness>
<useUIThread>true</useUIThread>
<product>org.eclipse.sdk.ide</product>
@@ -41,7 +41,7 @@
</dependency>
<dependency>
<type>p2-installable-unit</type>
- <artifactId>org.eclipse.tm.te.feature.feature.group</artifactId>
+ <artifactId>org.eclipse.tcf.te.feature.feature.group</artifactId>
<version>1.0.0</version>
</dependency>
</dependencies>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tests/src/org/eclipse/tm/te/tests/CoreTestCase.java b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/CoreTestCase.java
index abf863880..9dca899a4 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tests/src/org/eclipse/tm/te/tests/CoreTestCase.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/CoreTestCase.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tests;
+package org.eclipse.tcf.te.tests;
import java.io.IOException;
import java.net.URL;
@@ -30,10 +30,10 @@ import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
import org.eclipse.swt.widgets.Display;
-import org.eclipse.tm.te.tests.activator.UIPlugin;
-import org.eclipse.tm.te.tests.interfaces.IConfigurationProperties;
-import org.eclipse.tm.te.tests.interfaces.IInterruptCondition;
-import org.eclipse.tm.te.ui.views.interfaces.IUIConstants;
+import org.eclipse.tcf.te.tests.activator.UIPlugin;
+import org.eclipse.tcf.te.tests.interfaces.IConfigurationProperties;
+import org.eclipse.tcf.te.tests.interfaces.IInterruptCondition;
+import org.eclipse.tcf.te.ui.views.interfaces.IUIConstants;
import org.eclipse.ui.IViewPart;
import org.eclipse.ui.IViewReference;
import org.eclipse.ui.IWorkbench;
@@ -150,7 +150,7 @@ public class CoreTestCase extends TestCase {
setProperty(VIEW_ZOOM_STATE_CHANGED, false);
setProperty(IConfigurationProperties.MAXIMIZE_VIEW, false);
- setProperty(IConfigurationProperties.TARGET_PERSPECTIVE, "org.eclipse.tm.te.ui.perspective"); //$NON-NLS-1$
+ setProperty(IConfigurationProperties.TARGET_PERSPECTIVE, "org.eclipse.tcf.te.ui.perspective"); //$NON-NLS-1$
}
/**
@@ -267,7 +267,7 @@ public class CoreTestCase extends TestCase {
* @param startTime The start time in milliseconds.
*/
protected void printEnd(String name, long startTime) {
- Assert.isNotNull(null);
+ Assert.isNotNull(name);
long endTime = System.currentTimeMillis();
long duration = endTime - startTime;
System.out.println("=== " + name + " finished at: " + DATE_FORMAT.format(new Date(endTime)) + " (duration: " + duration + " ms)"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
@@ -555,7 +555,7 @@ public class CoreTestCase extends TestCase {
* <p>
* The returned path is calculated as follow:<br>
* <ul>
- * <li>Add org.eclipse.tm.te.tests bundle location</li>
+ * <li>Add org.eclipse.tcf.te.tests bundle location</li>
* <li>Add &quot;test.data&quot;</li>
* <li>If &quot;hostSpecific&quot; is true, add &quot;Platform.getOS()&quot;</li>
* <li>Add the given relative path</li>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tests/src/org/eclipse/tm/te/tests/activator/UIPlugin.java b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/activator/UIPlugin.java
index 95b3ab7f5..99e40f04f 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tests/src/org/eclipse/tm/te/tests/activator/UIPlugin.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/activator/UIPlugin.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tests.activator;
+package org.eclipse.tcf.te.tests.activator;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tests/src/org/eclipse/tm/te/tests/interfaces/IConfigurationProperties.java b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/interfaces/IConfigurationProperties.java
index d4fe54abf..dd6df5b08 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tests/src/org/eclipse/tm/te/tests/interfaces/IConfigurationProperties.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/interfaces/IConfigurationProperties.java
@@ -7,9 +7,9 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tests.interfaces;
+package org.eclipse.tcf.te.tests.interfaces;
-import org.eclipse.tm.te.tests.activator.UIPlugin;
+import org.eclipse.tcf.te.tests.activator.UIPlugin;
/**
* Public test configuration property id's.
@@ -27,7 +27,7 @@ public interface IConfigurationProperties {
/**
* Set to the perspective id to switch to before starting the test.
* <p>
- * Default value is <b><code>org.eclipse.tm.te.ui.perspective</code></b>.
+ * Default value is <b><code>org.eclipse.tcf.te.ui.perspective</code></b>.
*/
public static final String TARGET_PERSPECTIVE = UIPlugin.getUniqueIdentifier() + ".targetPerspective"; //$NON-NLS-1$
}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tests/src/org/eclipse/tm/te/tests/interfaces/IInterruptCondition.java b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/interfaces/IInterruptCondition.java
index 887b7f7ec..f4c4d16c4 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tests/src/org/eclipse/tm/te/tests/interfaces/IInterruptCondition.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/interfaces/IInterruptCondition.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tests.interfaces;
+package org.eclipse.tcf.te.tests.interfaces;
/**
* Interface to be implemented for conditional test wait interrupts.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tests/src/org/eclipse/tm/te/tests/statushandler/StatusHandlerTestCase.java b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/statushandler/StatusHandlerTestCase.java
index 75f8ec8aa..33f45de20 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tests/src/org/eclipse/tm/te/tests/statushandler/StatusHandlerTestCase.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/statushandler/StatusHandlerTestCase.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tests.statushandler;
+package org.eclipse.tcf.te.tests.statushandler;
import java.util.ArrayList;
import java.util.List;
@@ -15,10 +15,10 @@ import java.util.List;
import junit.framework.Test;
import junit.framework.TestSuite;
-import org.eclipse.tm.te.runtime.statushandler.StatusHandlerManager;
-import org.eclipse.tm.te.runtime.statushandler.interfaces.IStatusHandler;
-import org.eclipse.tm.te.tests.CoreTestCase;
-import org.eclipse.tm.te.tests.interfaces.IInterruptCondition;
+import org.eclipse.tcf.te.tests.CoreTestCase;
+import org.eclipse.tcf.te.tests.interfaces.IInterruptCondition;
+import org.eclipse.tcf.te.runtime.statushandler.StatusHandlerManager;
+import org.eclipse.tcf.te.runtime.statushandler.interfaces.IStatusHandler;
/**
* Status handler test cases.
@@ -50,7 +50,7 @@ public class StatusHandlerTestCase extends CoreTestCase {
IStatusHandler[] handlers = StatusHandlerManager.getInstance().getHandlers(false);
for (IStatusHandler handler : handlers) {
- if (handler.getId().startsWith("org.eclipse.tm.te.tests")) { //$NON-NLS-1$
+ if (handler.getId().startsWith("org.eclipse.tcf.te.tests")) { //$NON-NLS-1$
testHandlerCount++;
}
}
@@ -71,8 +71,8 @@ public class StatusHandlerTestCase extends CoreTestCase {
handlerIds.add(handler.getId());
}
- assertTrue("Global enabled test status handler not active.", handlerIds.contains("org.eclipse.tm.te.tests.handler1")); //$NON-NLS-1$ //$NON-NLS-2$
- assertFalse("Context enabled test status handler is active.", handlerIds.contains("org.eclipse.tm.te.tests.handler2")); //$NON-NLS-1$ //$NON-NLS-2$
+ assertTrue("Global enabled test status handler not active.", handlerIds.contains("org.eclipse.tcf.te.tests.handler1")); //$NON-NLS-1$ //$NON-NLS-2$
+ assertFalse("Context enabled test status handler is active.", handlerIds.contains("org.eclipse.tcf.te.tests.handler2")); //$NON-NLS-1$ //$NON-NLS-2$
handlerIds.clear();
@@ -93,7 +93,7 @@ public class StatusHandlerTestCase extends CoreTestCase {
handlerIds.add(handler.getId());
}
- assertTrue("Global enabled test status handler not active.", handlerIds.contains("org.eclipse.tm.te.tests.handler1")); //$NON-NLS-1$ //$NON-NLS-2$
- assertTrue("Context enabled test status handler not active.", handlerIds.contains("org.eclipse.tm.te.tests.handler2")); //$NON-NLS-1$ //$NON-NLS-2$
+ assertTrue("Global enabled test status handler not active.", handlerIds.contains("org.eclipse.tcf.te.tests.handler1")); //$NON-NLS-1$ //$NON-NLS-2$
+ assertTrue("Context enabled test status handler not active.", handlerIds.contains("org.eclipse.tcf.te.tests.handler2")); //$NON-NLS-1$ //$NON-NLS-2$
}
}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tests/src/org/eclipse/tm/te/tests/statushandler/TestStatusHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/statushandler/TestStatusHandler.java
index b2ba030d3..a359b4329 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tests/src/org/eclipse/tm/te/tests/statushandler/TestStatusHandler.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/statushandler/TestStatusHandler.java
@@ -7,11 +7,11 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tests.statushandler;
+package org.eclipse.tcf.te.tests.statushandler;
import org.eclipse.core.runtime.IStatus;
-import org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer;
-import org.eclipse.tm.te.runtime.statushandler.AbstractStatusHandler;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.runtime.statushandler.AbstractStatusHandler;
/**
* Test status handler implementation.
@@ -19,7 +19,7 @@ import org.eclipse.tm.te.runtime.statushandler.AbstractStatusHandler;
public class TestStatusHandler extends AbstractStatusHandler {
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.statushandler.interfaces.IStatusHandler#handleStatus(org.eclipse.core.runtime.IStatus, org.eclipse.tm.te.runtime.interfaces.IPropertiesContainer, org.eclipse.tm.te.runtime.statushandler.interfaces.IStatusHandler.DoneHandleStatus)
+ * @see org.eclipse.tcf.te.runtime.statushandler.interfaces.IStatusHandler#handleStatus(org.eclipse.core.runtime.IStatus, org.eclipse.tcf.te.runtime.interfaces.IPropertiesContainer, org.eclipse.tcf.te.runtime.statushandler.interfaces.IStatusHandler.DoneHandleStatus)
*/
@Override
public void handleStatus(IStatus status, IPropertiesContainer data, DoneHandleStatus done) {
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/stepper/ParameterizedTestStep.java b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/stepper/ParameterizedTestStep.java
new file mode 100644
index 000000000..09eb5058e
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/stepper/ParameterizedTestStep.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tests.stepper;
+
+import java.util.Map;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+
+/**
+ * Parameterized test step implementation.
+ */
+public class ParameterizedTestStep extends TestStep {
+ public Map<?,?> params = null;
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.stepper.extensions.AbstractContextStep#doSetInitializationData(org.eclipse.core.runtime.IConfigurationElement, java.lang.String, java.lang.Object)
+ */
+ @Override
+ public void doSetInitializationData(IConfigurationElement config, String propertyName, Object data) throws CoreException {
+ super.doSetInitializationData(config, propertyName, data);
+
+ if (data instanceof Map<?,?>) params = (Map<?,?>)data;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/stepper/StepperTestCase.java b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/stepper/StepperTestCase.java
new file mode 100644
index 000000000..8b3b96ed7
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/stepper/StepperTestCase.java
@@ -0,0 +1,265 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tests.stepper;
+
+import java.util.Map;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.tcf.te.runtime.stepper.StepperManager;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.IContext;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStep;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStepGroup;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStepGroupable;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStepper;
+import org.eclipse.tcf.te.tests.CoreTestCase;
+
+/**
+ * Stepper engine test cases.
+ */
+public class StepperTestCase extends CoreTestCase {
+
+ /**
+ * Provides a test suite to the caller which combines all single
+ * test bundled within this category.
+ *
+ * @return Test suite containing all test for this test category.
+ */
+ public static Test getTestSuite() {
+ TestSuite testSuite = new TestSuite("Test stepper engine"); //$NON-NLS-1$
+
+ // add ourself to the test suite
+ testSuite.addTestSuite(StepperTestCase.class);
+
+ return testSuite;
+ }
+
+ /**
+ * Test the stepper extension point mechanism.
+ */
+ public void testStepperContributions() {
+ assertNotNull("Unexpected return value 'null'.", StepperManager.getInstance()); //$NON-NLS-1$
+ assertNotNull("Unexpected return value 'null'.", StepperManager.getInstance().getStepperExtManager()); //$NON-NLS-1$
+
+ // Lookup the default multi-context and single-context stepper contributions
+ boolean multiContext = false;
+ boolean singleContext = false;
+
+ IContextStepper[] steppers = StepperManager.getInstance().getStepperExtManager().getStepper(false);
+ for (IContextStepper stepper : steppers) {
+ if (stepper.getId().equals("org.eclipse.tcf.te.runtime.stepper.multiContext")) { //$NON-NLS-1$
+ multiContext = true;
+ }
+ if (stepper.getId().equals("org.eclipse.tcf.te.runtime.stepper.singleContext")) { //$NON-NLS-1$
+ singleContext = true;
+ }
+ if (multiContext && singleContext) break;
+ }
+ assertTrue("Default multi context stepper contribution not found.", multiContext); //$NON-NLS-1$
+ assertTrue("Default single context stepper contribution not found.", singleContext); //$NON-NLS-1$
+ }
+
+ /**
+ * Test the steps extension point mechanism.
+ */
+ public void testStepContributions() {
+ assertNotNull("Unexpected return value 'null'.", StepperManager.getInstance()); //$NON-NLS-1$
+ assertNotNull("Unexpected return value 'null'.", StepperManager.getInstance().getStepExtManager()); //$NON-NLS-1$
+
+ IContextStep[] steps = StepperManager.getInstance().getStepExtManager().getSteps(false);
+ int testStepCount = 0;
+
+ for (IContextStep step : steps) {
+ if (step.getId().startsWith("org.eclipse.tcf.te.tests.stepper.step")) { //$NON-NLS-1$
+ testStepCount++;
+ } else {
+ continue;
+ }
+
+ if (step.getId().endsWith(".step1")) { //$NON-NLS-1$
+ assertEquals("Unexpected step label found.", "Test Step 1", step.getLabel()); //$NON-NLS-1$ //$NON-NLS-2$
+ assertEquals("Unexpected step description found.", "", step.getDescription()); //$NON-NLS-1$ //$NON-NLS-2$
+ assertTrue("Unexpected step class type found.", step instanceof TestStep); //$NON-NLS-1$
+ assertEquals("Unexpected number of dependencies found.", 0, step.getDependencies().length); //$NON-NLS-1$
+
+ assertTrue("Step is not enabled but should.", StepperManager.getInstance().getStepBindingsExtManager().isStepEnabled(step.getId(), null)); //$NON-NLS-1$
+ assertTrue("Step is not enabled but should.", StepperManager.getInstance().getStepBindingsExtManager().isStepEnabled(step.getId(), new IContext[0])); //$NON-NLS-1$
+ assertTrue("Step is not enabled but should.", StepperManager.getInstance().getStepBindingsExtManager().isStepEnabled(step.getId(), new IContext[1])); //$NON-NLS-1$
+ }
+
+ if (step.getId().endsWith(".step2")) { //$NON-NLS-1$
+ assertEquals("Unexpected step label found.", "Test Step 2", step.getLabel()); //$NON-NLS-1$ //$NON-NLS-2$
+ assertEquals("Unexpected step description found.", "", step.getDescription()); //$NON-NLS-1$ //$NON-NLS-2$
+ assertTrue("Unexpected step class type found.", step instanceof ParameterizedTestStep); //$NON-NLS-1$
+
+ Map<?,?> params = ((ParameterizedTestStep)step).params;
+ assertNotNull("Unexpected value 'null'.", params); //$NON-NLS-1$
+ assertEquals("Unexpected number of parameter found.", 1, params.keySet().size()); //$NON-NLS-1$
+ assertTrue("Missing expected key 'param1'.", params.containsKey("param1")); //$NON-NLS-1$ //$NON-NLS-2$
+ assertTrue("Missing expected value 'value1'.", params.containsValue("value1")); //$NON-NLS-1$ //$NON-NLS-2$
+
+ assertEquals("Unexpected number of dependencies found.", 0, step.getDependencies().length); //$NON-NLS-1$
+ }
+
+ if (step.getId().endsWith(".step3")) { //$NON-NLS-1$
+ assertEquals("Unexpected step label found.", "Test Step 3", step.getLabel()); //$NON-NLS-1$ //$NON-NLS-2$
+ assertEquals("Unexpected step description found.", "Just another test step", step.getDescription()); //$NON-NLS-1$ //$NON-NLS-2$
+ assertTrue("Unexpected step class type found.", step instanceof TestStep); //$NON-NLS-1$
+ assertEquals("Unexpected number of dependencies found.", 0, step.getDependencies().length); //$NON-NLS-1$
+ }
+
+ if (step.getId().endsWith(".step4")) { //$NON-NLS-1$
+ assertEquals("Unexpected step label found.", "Test Step 4", step.getLabel()); //$NON-NLS-1$ //$NON-NLS-2$
+ assertEquals("Unexpected step description found.", "", step.getDescription()); //$NON-NLS-1$ //$NON-NLS-2$
+ assertTrue("Unexpected step class type found.", step instanceof TestStep); //$NON-NLS-1$
+ assertEquals("Unexpected number of dependencies found.", 1, step.getDependencies().length); //$NON-NLS-1$
+ }
+
+ if (step.getId().endsWith(".step5")) { //$NON-NLS-1$
+ assertEquals("Unexpected step label found.", "Test Step 5", step.getLabel()); //$NON-NLS-1$ //$NON-NLS-2$
+ assertEquals("Unexpected step description found.", "", step.getDescription()); //$NON-NLS-1$ //$NON-NLS-2$
+ assertTrue("Unexpected step class type found.", step instanceof TestStep); //$NON-NLS-1$
+ assertEquals("Unexpected number of dependencies found.", 0, step.getDependencies().length); //$NON-NLS-1$
+
+ assertFalse("Step is enabled but should not.", StepperManager.getInstance().getStepBindingsExtManager().isStepEnabled(step.getId(), null)); //$NON-NLS-1$
+ assertFalse("Step is enabled but should not.", StepperManager.getInstance().getStepBindingsExtManager().isStepEnabled(step.getId(), new IContext[0])); //$NON-NLS-1$
+ assertTrue("Step is not enabled but should.", StepperManager.getInstance().getStepBindingsExtManager().isStepEnabled(step.getId(), new IContext[1])); //$NON-NLS-1$
+ }
+ }
+
+ assertEquals("Unexpected number of test steps found.", 5, testStepCount); //$NON-NLS-1$
+ }
+
+ /**
+ * Test the step group extension point mechanism.
+ */
+ public void testStepGroupContributions() {
+ assertNotNull("Unexpected return value 'null'.", StepperManager.getInstance()); //$NON-NLS-1$
+ assertNotNull("Unexpected return value 'null'.", StepperManager.getInstance().getStepGroupExtManager()); //$NON-NLS-1$
+
+ IContextStepGroup[] stepGroups = StepperManager.getInstance().getStepGroupExtManager().getStepGroups(false);
+ int testStepGroupCount = 0;
+
+ for (IContextStepGroup stepGroup : stepGroups) {
+ if (stepGroup.getId().startsWith("org.eclipse.tcf.te.tests.stepper.stepGroup")) { //$NON-NLS-1$
+ testStepGroupCount++;
+ } else {
+ continue;
+ }
+
+ Throwable error = null;
+ String message = null;
+ IContextStepGroupable[] steps = null;
+
+ if (stepGroup.getId().endsWith(".stepGroup1")) { //$NON-NLS-1$
+ assertEquals("Unexpected step group label found.", "Test Step Group 1", stepGroup.getLabel()); //$NON-NLS-1$ //$NON-NLS-2$
+ assertEquals("Unexpected step description found.", "", stepGroup.getDescription()); //$NON-NLS-1$ //$NON-NLS-2$
+ assertFalse("Step group is locked but should not.", stepGroup.isLocked()); //$NON-NLS-1$
+ assertNull("Unexpected non-null value.", stepGroup.getStepGroupIterator()); //$NON-NLS-1$
+
+ try {
+ steps = stepGroup.getSteps(new IContext[0]);
+ } catch (CoreException e) {
+ error = e;
+ message = e.getLocalizedMessage();
+ }
+ assertNull("Failed to determine steps from step group. Possible cause: " + message, error); //$NON-NLS-1$
+ assertNotNull("Unexpected return value 'null'.", steps); //$NON-NLS-1$
+ assertEquals("Unexpected number of steps returned.", 0, steps.length); //$NON-NLS-1$
+ }
+
+ if (stepGroup.getId().endsWith(".stepGroup2")) { //$NON-NLS-1$
+ assertEquals("Unexpected step group label found.", "Test Step Group 2", stepGroup.getLabel()); //$NON-NLS-1$ //$NON-NLS-2$
+ assertEquals("Unexpected step description found.", "Just a step group description", stepGroup.getDescription()); //$NON-NLS-1$ //$NON-NLS-2$
+ assertTrue("Step group is not locked but should.", stepGroup.isLocked()); //$NON-NLS-1$
+ assertNull("Unexpected non-null value.", stepGroup.getStepGroupIterator()); //$NON-NLS-1$
+
+ error = null; message = null; steps = null;
+ try {
+ steps = stepGroup.getSteps(new IContext[0]);
+ } catch (CoreException e) {
+ error = e;
+ message = e.getLocalizedMessage();
+ }
+ assertNull("Failed to determine steps from step group. Possible cause: " + message, error); //$NON-NLS-1$
+ assertNotNull("Unexpected return value 'null'.", steps); //$NON-NLS-1$
+ assertEquals("Unexpected number of steps returned.", 0, steps.length); //$NON-NLS-1$
+ }
+
+ if (stepGroup.getId().endsWith(".stepGroup3")) { //$NON-NLS-1$
+ assertEquals("Unexpected step group label found.", "Test Step Group 3", stepGroup.getLabel()); //$NON-NLS-1$ //$NON-NLS-2$
+ assertEquals("Unexpected step description found.", "", stepGroup.getDescription()); //$NON-NLS-1$ //$NON-NLS-2$
+ assertFalse("Step group is locked but should not.", stepGroup.isLocked()); //$NON-NLS-1$
+ assertNull("Unexpected non-null value.", stepGroup.getStepGroupIterator()); //$NON-NLS-1$
+
+ error = null; message = null; steps = null;
+ try {
+ steps = stepGroup.getSteps(new IContext[0]);
+ } catch (CoreException e) {
+ error = e;
+ message = e.getLocalizedMessage();
+ }
+ assertNull("Failed to determine steps from step group. Possible cause: " + message, error); //$NON-NLS-1$
+ assertNotNull("Unexpected return value 'null'.", steps); //$NON-NLS-1$
+ assertEquals("Unexpected number of steps returned.", 4, steps.length); //$NON-NLS-1$
+
+ assertEquals("Unexpected step order.", "org.eclipse.tcf.te.tests.stepper.step1", steps[0].getExtension().getId()); //$NON-NLS-1$ //$NON-NLS-2$
+ assertEquals("Unexpected step order.", "org.eclipse.tcf.te.tests.stepper.step2", steps[1].getExtension().getId()); //$NON-NLS-1$ //$NON-NLS-2$
+ assertEquals("Unexpected step order.", "org.eclipse.tcf.te.tests.stepper.step3", steps[2].getExtension().getId()); //$NON-NLS-1$ //$NON-NLS-2$
+ assertEquals("Unexpected step order.", "org.eclipse.tcf.te.tests.stepper.step4", steps[3].getExtension().getId()); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+
+ if (stepGroup.getId().endsWith(".stepGroup4")) { //$NON-NLS-1$
+ assertEquals("Unexpected step group label found.", "Test Step Group 4", stepGroup.getLabel()); //$NON-NLS-1$ //$NON-NLS-2$
+ assertEquals("Unexpected step description found.", "", stepGroup.getDescription()); //$NON-NLS-1$ //$NON-NLS-2$
+ assertFalse("Step group is locked but should not.", stepGroup.isLocked()); //$NON-NLS-1$
+ assertNull("Unexpected non-null value.", stepGroup.getStepGroupIterator()); //$NON-NLS-1$
+
+ error = null; message = null; steps = null;
+ try {
+ steps = stepGroup.getSteps(new IContext[0]);
+ } catch (CoreException e) {
+ error = e;
+ message = e.getLocalizedMessage();
+ }
+ assertNull("Failed to determine steps from step group. Possible cause: " + message, error); //$NON-NLS-1$
+ assertNotNull("Unexpected return value 'null'.", steps); //$NON-NLS-1$
+ assertEquals("Unexpected number of steps returned.", 4, steps.length); //$NON-NLS-1$
+
+ assertEquals("Unexpected step order.", "org.eclipse.tcf.te.tests.stepper.step1", steps[0].getExtension().getId()); //$NON-NLS-1$ //$NON-NLS-2$
+ assertEquals("Unexpected step order.", "org.eclipse.tcf.te.tests.stepper.step2", steps[1].getExtension().getId()); //$NON-NLS-1$ //$NON-NLS-2$
+ assertEquals("Unexpected step order.", "org.eclipse.tcf.te.tests.stepper.step3", steps[2].getExtension().getId()); //$NON-NLS-1$ //$NON-NLS-2$
+ assertEquals("Unexpected step order.", "org.eclipse.tcf.te.tests.stepper.step4", steps[3].getExtension().getId()); //$NON-NLS-1$ //$NON-NLS-2$
+
+ error = null; message = null; steps = null;
+ try {
+ steps = stepGroup.getSteps(new IContext[1]);
+ } catch (CoreException e) {
+ error = e;
+ message = e.getLocalizedMessage();
+ }
+ assertNull("Failed to determine steps from step group. Possible cause: " + message, error); //$NON-NLS-1$
+ assertNotNull("Unexpected return value 'null'.", steps); //$NON-NLS-1$
+ assertEquals("Unexpected number of steps returned.", 5, steps.length); //$NON-NLS-1$
+
+ assertEquals("Unexpected step order.", "org.eclipse.tcf.te.tests.stepper.step1", steps[0].getExtension().getId()); //$NON-NLS-1$ //$NON-NLS-2$
+ assertEquals("Unexpected step order.", "org.eclipse.tcf.te.tests.stepper.step2", steps[1].getExtension().getId()); //$NON-NLS-1$ //$NON-NLS-2$
+ assertEquals("Unexpected step order.", "org.eclipse.tcf.te.tests.stepper.step3", steps[2].getExtension().getId()); //$NON-NLS-1$ //$NON-NLS-2$
+ assertEquals("Unexpected step order.", "org.eclipse.tcf.te.tests.stepper.step4", steps[3].getExtension().getId()); //$NON-NLS-1$ //$NON-NLS-2$
+ assertEquals("Unexpected step order.", "org.eclipse.tcf.te.tests.stepper.step5", steps[4].getExtension().getId()); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+
+ assertEquals("Unexpected number of test step groups found.", 4, testStepGroupCount); //$NON-NLS-1$
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/stepper/TestStep.java b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/stepper/TestStep.java
new file mode 100644
index 000000000..f4925b5b1
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/stepper/TestStep.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tests.stepper;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.runtime.stepper.extensions.AbstractContextStep;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.IContext;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.IFullQualifiedId;
+
+/**
+ * Empty test step contribution.
+ */
+public class TestStep extends AbstractContextStep {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.stepper.interfaces.IExtendedContextStep#validateExecute(org.eclipse.tcf.te.runtime.stepper.interfaces.IContext, org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer, org.eclipse.tcf.te.runtime.stepper.interfaces.IFullQualifiedId, org.eclipse.core.runtime.IProgressMonitor)
+ */
+ @Override
+ public void validateExecute(IContext context, IPropertiesContainer data, IFullQualifiedId fullQualifiedId, IProgressMonitor monitor) throws CoreException {
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStep#execute(org.eclipse.tcf.te.runtime.stepper.interfaces.IContext, org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer, org.eclipse.tcf.te.runtime.stepper.interfaces.IFullQualifiedId, org.eclipse.core.runtime.IProgressMonitor, org.eclipse.tcf.te.runtime.interfaces.callback.ICallback)
+ */
+ @Override
+ public void execute(IContext context, IPropertiesContainer data, IFullQualifiedId fullQualifiedId, IProgressMonitor monitor, ICallback callback) {
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tests/src/org/eclipse/tm/te/tests/suites/AllCoreTests.java b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/suites/AllCoreTests.java
index 6975b3b73..fc1c56ecc 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tests/src/org/eclipse/tm/te/tests/suites/AllCoreTests.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/suites/AllCoreTests.java
@@ -7,12 +7,13 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tests.suites;
+package org.eclipse.tcf.te.tests.suites;
import junit.framework.Test;
import junit.framework.TestSuite;
-import org.eclipse.tm.te.tests.statushandler.StatusHandlerTestCase;
+import org.eclipse.tcf.te.tests.statushandler.StatusHandlerTestCase;
+import org.eclipse.tcf.te.tests.stepper.StepperTestCase;
/**
* All core test suites.
@@ -41,6 +42,7 @@ public class AllCoreTests {
TestSuite suite = new TestSuite("All Target Explorer Core Tests"); //$NON-NLS-1$
suite.addTest(StatusHandlerTestCase.getTestSuite());
+ suite.addTest(StepperTestCase.getTestSuite());
return suite;
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/.classpath b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/.classpath
new file mode 100644
index 000000000..8a8f1668c
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/.project b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/.project
index df73121e2..bb45f6f76 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/.project
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/.project
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.eclipse.tm.te.ui.controls</name>
+ <name>org.eclipse.tcf.te.ui.controls</name>
<comment></comment>
<projects>
</projects>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/.settings/org.eclipse.jdt.core.prefs b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/.settings/org.eclipse.jdt.core.prefs
index 743bb6425..743bb6425 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/.settings/org.eclipse.jdt.core.prefs
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/.settings/org.eclipse.jdt.core.prefs
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/.settings/org.eclipse.jdt.ui.prefs b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/.settings/org.eclipse.jdt.ui.prefs
index fcb0cb027..fcb0cb027 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/.settings/org.eclipse.jdt.ui.prefs
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/.settings/org.eclipse.jdt.ui.prefs
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..0754a5b05
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/META-INF/MANIFEST.MF
@@ -0,0 +1,25 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.tcf.te.ui.controls;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipse.tcf.te.ui.controls.activator.UIPlugin
+Bundle-Vendor: %providerName
+Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
+ org.eclipse.core.resources;bundle-version="3.7.100";resolution:=optional,
+ org.eclipse.ui;bundle-version="3.7.0",
+ org.eclipse.ui.forms;bundle-version="3.5.100",
+ org.eclipse.tcf.te.runtime;bundle-version="1.0.0",
+ org.eclipse.tcf.te.ui;bundle-version="1.0.0",
+ org.eclipse.tcf.te.ui.swt;bundle-version="1.0.0"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
+Bundle-Localization: plugin
+Export-Package: org.eclipse.tcf.te.ui.controls,
+ org.eclipse.tcf.te.ui.controls.activator;x-internal:=true,
+ org.eclipse.tcf.te.ui.controls.file,
+ org.eclipse.tcf.te.ui.controls.interfaces,
+ org.eclipse.tcf.te.ui.controls.net,
+ org.eclipse.tcf.te.ui.controls.nls,
+ org.eclipse.tcf.te.ui.controls.panels,
+ org.eclipse.tcf.te.ui.controls.validator
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/build.properties b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/build.properties
index c5906f02c..c5906f02c 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/build.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/build.properties
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/plugin.properties
index b5cc7f39b..b5cc7f39b 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/plugin.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/plugin.properties
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/pom.xml b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/pom.xml
new file mode 100644
index 000000000..ea1b64aa1
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.tcf</groupId>
+ <artifactId>tcf-parent</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../../../pom.xml</relativePath>
+ </parent>
+
+ <version>1.0.0.qualifier</version>
+ <artifactId>org.eclipse.tcf.te.ui.controls</artifactId>
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/BaseControl.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/BaseControl.java
index d6223c03c..8ff94547c 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/BaseControl.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/BaseControl.java
@@ -7,13 +7,14 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.controls;
+package org.eclipse.tcf.te.ui.controls;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.PlatformObject;
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jface.dialogs.IMessageProvider;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.tcf.te.ui.jface.interfaces.IValidatable;
/**
* Base implementation of a common UI control.
@@ -21,7 +22,7 @@ import org.eclipse.swt.widgets.Composite;
* The control can be embedded into any UI container like dialogs,
* wizard pages or preference pages.
*/
-public class BaseControl extends PlatformObject implements IMessageProvider {
+public class BaseControl extends PlatformObject implements IValidatable {
/**
* Reference to the parent control.
@@ -104,16 +105,11 @@ public class BaseControl extends PlatformObject implements IMessageProvider {
return enabled;
}
- /**
- * Validates the control and sets the message text and type so the parent
- * page or control is able to display validation result informations.
- * The validation should be done by implementations of WRValidator!
- * The default implementation of this method does nothing.
- * Use the isValid(WRBaseControl, boolean) method to validate child-controls.
- *
- * @return Result of validation.
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.interfaces.validator.IValidatable#isValid()
*/
- public boolean isValid() {
+ @Override
+ public boolean isValid() {
setMessage(null, IMessageProvider.NONE);
return true;
}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/BaseDialogPageControl.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/BaseDialogPageControl.java
index 913a52b3a..7c897f9ba 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/BaseDialogPageControl.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/BaseDialogPageControl.java
@@ -7,14 +7,14 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.controls;
+package org.eclipse.tcf.te.ui.controls;
import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.dialogs.IDialogPage;
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jface.operation.IRunnableContext;
-import org.eclipse.tm.te.ui.controls.interfaces.IRunnableContextProvider;
-import org.eclipse.tm.te.ui.wizards.interfaces.IValidatableWizardPage;
+import org.eclipse.tcf.te.ui.controls.interfaces.IRunnableContextProvider;
+import org.eclipse.tcf.te.ui.jface.interfaces.IValidatingContainer;
import org.eclipse.ui.forms.widgets.FormToolkit;
@@ -57,17 +57,17 @@ public class BaseDialogPageControl extends BaseControl implements IRunnableConte
}
/**
- * Returns the validatable wizard page instance.
+ * Returns the validating container instance.
* <p>
* The default implementation is testing the associated
- * parent page to implement the {@link IValidatableWizardPage} interface.
+ * parent page to implement the {@link IValidatingContainer} interface.
*
* @return The validatable wizard page instance or <code>null</code>.
*/
- public IValidatableWizardPage getValidatableWizardPage() {
+ public IValidatingContainer getValidatingContainer() {
IDialogPage parentPage = getParentPage();
- if (parentPage instanceof IValidatableWizardPage) {
- return (IValidatableWizardPage)parentPage;
+ if (parentPage instanceof IValidatingContainer) {
+ return (IValidatingContainer)parentPage;
}
return null;
}
@@ -91,7 +91,7 @@ public class BaseDialogPageControl extends BaseControl implements IRunnableConte
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.interfaces.IRunnableContextProvider#getRunnableContext()
+ * @see org.eclipse.tcf.te.ui.controls.interfaces.IRunnableContextProvider#getRunnableContext()
*/
@Override
public IRunnableContext getRunnableContext() {
@@ -99,7 +99,7 @@ public class BaseDialogPageControl extends BaseControl implements IRunnableConte
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.BaseControl#doGetParentSection(org.eclipse.jface.dialogs.IDialogSettings)
+ * @see org.eclipse.tcf.te.ui.controls.BaseControl#doGetParentSection(org.eclipse.jface.dialogs.IDialogSettings)
*/
@Override
protected IDialogSettings doGetParentSection(IDialogSettings settings) {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/BaseDialogSelectionControl.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/BaseDialogSelectionControl.java
index 785471250..ba9d880b5 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/BaseDialogSelectionControl.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/BaseDialogSelectionControl.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.controls;
+package org.eclipse.tcf.te.ui.controls;
import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.dialogs.IDialogPage;
@@ -37,7 +37,7 @@ public class BaseDialogSelectionControl extends BaseEditBrowseTextControl {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.BaseEditBrowseTextControl#isAdjustEditFieldControlWidthHint()
+ * @see org.eclipse.tcf.te.ui.controls.BaseEditBrowseTextControl#isAdjustEditFieldControlWidthHint()
*/
@Override
protected boolean isAdjustEditFieldControlWidthHint() {
@@ -117,7 +117,7 @@ public class BaseDialogSelectionControl extends BaseEditBrowseTextControl {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.BaseEditBrowseTextControl#onButtonControlSelected()
+ * @see org.eclipse.tcf.te.ui.controls.BaseEditBrowseTextControl#onButtonControlSelected()
*/
@Override
protected void onButtonControlSelected() {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/BaseEditBrowseTextControl.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/BaseEditBrowseTextControl.java
index 6e87427e7..b978d3d80 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/BaseEditBrowseTextControl.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/BaseEditBrowseTextControl.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.controls;
+package org.eclipse.tcf.te.ui.controls;
import java.util.ArrayList;
import java.util.Arrays;
@@ -42,10 +42,11 @@ import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Layout;
import org.eclipse.swt.widgets.Scrollable;
import org.eclipse.swt.widgets.Text;
-import org.eclipse.tm.te.ui.controls.nls.Messages;
-import org.eclipse.tm.te.ui.controls.validator.Validator;
-import org.eclipse.tm.te.ui.swt.SWTControlUtil;
-import org.eclipse.tm.te.ui.wizards.interfaces.IValidatableWizardPage;
+import org.eclipse.tcf.te.ui.controls.nls.Messages;
+import org.eclipse.tcf.te.ui.controls.validator.Validator;
+import org.eclipse.tcf.te.ui.jface.interfaces.IValidatingContainer;
+import org.eclipse.tcf.te.ui.swt.SWTControlUtil;
+import org.eclipse.tcf.te.ui.utils.DialogSettingsUtil;
import org.eclipse.ui.forms.widgets.FormToolkit;
/**
@@ -618,8 +619,8 @@ public class BaseEditBrowseTextControl extends BaseDialogPageControl implements
}
// validate the page
- IValidatableWizardPage validatable = getValidatableWizardPage();
- if (validatable != null) validatable.validatePage();
+ IValidatingContainer validatingContainer = getValidatingContainer();
+ if (validatingContainer != null) validatingContainer.validate();
}
}
@@ -1010,8 +1011,8 @@ public class BaseEditBrowseTextControl extends BaseDialogPageControl implements
@Override
public void modifyText(ModifyEvent e) {
// validate the page
- IValidatableWizardPage validatable = getValidatableWizardPage();
- if (validatable != null) validatable.validatePage();
+ IValidatingContainer validatingContainer = getValidatingContainer();
+ if (validatingContainer != null) validatingContainer.validate();
}
/**
@@ -1054,8 +1055,8 @@ public class BaseEditBrowseTextControl extends BaseDialogPageControl implements
@Override
public void widgetSelected(SelectionEvent e) {
// validate the page
- IValidatableWizardPage validatable = getValidatableWizardPage();
- if (validatable != null) validatable.validatePage();
+ IValidatingContainer validatingContainer = getValidatingContainer();
+ if (validatingContainer != null) validatingContainer.validate();
}
/**
@@ -1260,7 +1261,7 @@ public class BaseEditBrowseTextControl extends BaseDialogPageControl implements
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.BaseControl#setupPanel(org.eclipse.swt.widgets.Composite)
+ * @see org.eclipse.tcf.te.ui.controls.BaseControl#setupPanel(org.eclipse.swt.widgets.Composite)
*/
@Override
public void setupPanel(Composite parent) {
@@ -1357,7 +1358,7 @@ public class BaseEditBrowseTextControl extends BaseDialogPageControl implements
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.BaseControl#dispose()
+ * @see org.eclipse.tcf.te.ui.controls.BaseControl#dispose()
*/
@Override
public void dispose() {
@@ -1396,7 +1397,7 @@ public class BaseEditBrowseTextControl extends BaseDialogPageControl implements
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.BaseControl#doRestoreWidgetValues(org.eclipse.jface.dialogs.IDialogSettings, java.lang.String)
+ * @see org.eclipse.tcf.te.ui.controls.BaseControl#doRestoreWidgetValues(org.eclipse.jface.dialogs.IDialogSettings, java.lang.String)
*/
@Override
public void doRestoreWidgetValues(IDialogSettings settings, String idPrefix) {
@@ -1423,7 +1424,7 @@ public class BaseEditBrowseTextControl extends BaseDialogPageControl implements
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.BaseControl#doSaveWidgetValues(org.eclipse.jface.dialogs.IDialogSettings, java.lang.String)
+ * @see org.eclipse.tcf.te.ui.controls.BaseControl#doSaveWidgetValues(org.eclipse.jface.dialogs.IDialogSettings, java.lang.String)
*/
@Override
public void doSaveWidgetValues(IDialogSettings settings, String idPrefix) {
@@ -1456,7 +1457,7 @@ public class BaseEditBrowseTextControl extends BaseDialogPageControl implements
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.BaseControl#isValid()
+ * @see org.eclipse.tcf.te.ui.controls.BaseControl#isValid()
*/
@Override
public boolean isValid() {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/BaseJFaceDialogSelectionControl.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/BaseJFaceDialogSelectionControl.java
index 014b6a5d7..79545dc93 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/BaseJFaceDialogSelectionControl.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/BaseJFaceDialogSelectionControl.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.controls;
+package org.eclipse.tcf.te.ui.controls;
import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.dialogs.Dialog;
@@ -35,7 +35,7 @@ public class BaseJFaceDialogSelectionControl extends BaseEditBrowseTextControl {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.BaseEditBrowseTextControl#isAdjustEditFieldControlWidthHint()
+ * @see org.eclipse.tcf.te.ui.controls.BaseEditBrowseTextControl#isAdjustEditFieldControlWidthHint()
*/
@Override
protected boolean isAdjustEditFieldControlWidthHint() {
@@ -89,7 +89,7 @@ public class BaseJFaceDialogSelectionControl extends BaseEditBrowseTextControl {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.BaseEditBrowseTextControl#onButtonControlSelected()
+ * @see org.eclipse.tcf.te.ui.controls.BaseEditBrowseTextControl#onButtonControlSelected()
*/
@Override
protected void onButtonControlSelected() {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/BaseWizardConfigurationPanelControl.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/BaseWizardConfigurationPanelControl.java
index 6cac1e80d..c92351f63 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/BaseWizardConfigurationPanelControl.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/BaseWizardConfigurationPanelControl.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.controls;
+package org.eclipse.tcf.te.ui.controls;
import java.util.Hashtable;
import java.util.Map;
@@ -19,7 +19,7 @@ import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.StackLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Group;
-import org.eclipse.tm.te.ui.controls.interfaces.IWizardConfigurationPanel;
+import org.eclipse.tcf.te.ui.controls.interfaces.IWizardConfigurationPanel;
import org.eclipse.ui.forms.widgets.FormToolkit;
/**
@@ -193,7 +193,7 @@ public class BaseWizardConfigurationPanelControl extends BaseDialogPageControl {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.BaseControl#doSaveWidgetValues(org.eclipse.jface.dialogs.IDialogSettings, java.lang.String)
+ * @see org.eclipse.tcf.te.ui.controls.BaseControl#doSaveWidgetValues(org.eclipse.jface.dialogs.IDialogSettings, java.lang.String)
*/
@Override
public void doSaveWidgetValues(IDialogSettings settings, String idPrefix) {
@@ -201,13 +201,17 @@ public class BaseWizardConfigurationPanelControl extends BaseDialogPageControl {
if (settings != null) {
for (String key : configurationPanels.keySet()) {
IWizardConfigurationPanel configPanel = getConfigurationPanel(key);
- if (configPanel != null) configPanel.doSaveWidgetValues(settings, idPrefix);
+ if (configPanel != null) {
+ IDialogSettings configPanelSettings = settings.getSection(key);
+ if (configPanelSettings == null) configPanelSettings = settings.addNewSection(key);
+ configPanel.doSaveWidgetValues(configPanelSettings, idPrefix);
+ }
}
}
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.BaseControl#doRestoreWidgetValues(org.eclipse.jface.dialogs.IDialogSettings, java.lang.String)
+ * @see org.eclipse.tcf.te.ui.controls.BaseControl#doRestoreWidgetValues(org.eclipse.jface.dialogs.IDialogSettings, java.lang.String)
*/
@Override
public void doRestoreWidgetValues(IDialogSettings settings, String idPrefix) {
@@ -215,7 +219,11 @@ public class BaseWizardConfigurationPanelControl extends BaseDialogPageControl {
if (settings != null) {
for (String key : configurationPanels.keySet()) {
IWizardConfigurationPanel configPanel = getConfigurationPanel(key);
- if (configPanel != null) configPanel.doRestoreWidgetValues(settings, idPrefix);
+ if (configPanel != null) {
+ IDialogSettings configPanelSettings = settings.getSection(key);
+ if (configPanelSettings == null) configPanelSettings = settings.addNewSection(key);
+ configPanel.doRestoreWidgetValues(configPanelSettings, idPrefix);
+ }
}
}
}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/activator/UIPlugin.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/activator/UIPlugin.java
index 6be8c5f2a..337e09912 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/activator/UIPlugin.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/activator/UIPlugin.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.controls.activator;
+package org.eclipse.tcf.te.ui.controls.activator;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/DirectorySelectionControl.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/file/DirectorySelectionControl.java
index d9423eace..1543c1ae5 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/DirectorySelectionControl.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/file/DirectorySelectionControl.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.controls;
+package org.eclipse.tcf.te.ui.controls.file;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.Platform;
@@ -15,9 +15,10 @@ import org.eclipse.jface.dialogs.IDialogPage;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Dialog;
import org.eclipse.swt.widgets.DirectoryDialog;
-import org.eclipse.tm.te.ui.controls.nls.Messages;
-import org.eclipse.tm.te.ui.controls.validator.DirectoryNameValidator;
-import org.eclipse.tm.te.ui.controls.validator.Validator;
+import org.eclipse.tcf.te.ui.controls.BaseDialogSelectionControl;
+import org.eclipse.tcf.te.ui.controls.nls.Messages;
+import org.eclipse.tcf.te.ui.controls.validator.DirectoryNameValidator;
+import org.eclipse.tcf.te.ui.controls.validator.Validator;
import org.osgi.framework.Bundle;
@@ -67,7 +68,7 @@ public class DirectorySelectionControl extends BaseDialogSelectionControl {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.BaseDialogSelectionControl#doCreateDialogControl(org.eclipse.swt.widgets.Composite)
+ * @see org.eclipse.tcf.te.ui.controls.BaseDialogSelectionControl#doCreateDialogControl(org.eclipse.swt.widgets.Composite)
*/
@Override
protected Dialog doCreateDialogControl(Composite parent) {
@@ -78,7 +79,7 @@ public class DirectorySelectionControl extends BaseDialogSelectionControl {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.BaseDialogSelectionControl#configureDialogControl(org.eclipse.swt.widgets.Dialog)
+ * @see org.eclipse.tcf.te.ui.controls.BaseDialogSelectionControl#configureDialogControl(org.eclipse.swt.widgets.Dialog)
*/
@Override
protected void configureDialogControl(Dialog dialog) {
@@ -114,7 +115,7 @@ public class DirectorySelectionControl extends BaseDialogSelectionControl {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.BaseEditBrowseTextControl#doCreateEditFieldValidator()
+ * @see org.eclipse.tcf.te.ui.controls.BaseEditBrowseTextControl#doCreateEditFieldValidator()
*/
@Override
protected Validator doCreateEditFieldValidator() {
@@ -126,7 +127,7 @@ public class DirectorySelectionControl extends BaseDialogSelectionControl {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.BaseEditBrowseTextControl#setEditFieldValidator(org.eclipse.tm.te.ui.controls.validator.Validator)
+ * @see org.eclipse.tcf.te.ui.controls.BaseEditBrowseTextControl#setEditFieldValidator(org.eclipse.tcf.te.ui.controls.validator.Validator)
*/
@Override
public void setEditFieldValidator(Validator editFieldValidator) {
@@ -138,7 +139,7 @@ public class DirectorySelectionControl extends BaseDialogSelectionControl {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.BaseDialogSelectionControl#doOpenDialogControl(org.eclipse.swt.widgets.Dialog)
+ * @see org.eclipse.tcf.te.ui.controls.BaseDialogSelectionControl#doOpenDialogControl(org.eclipse.swt.widgets.Dialog)
*/
@Override
protected String doOpenDialogControl(Dialog dialog) {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/FileSelectionControl.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/file/FileSelectionControl.java
index b5e236898..80390e332 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/FileSelectionControl.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/file/FileSelectionControl.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.controls;
+package org.eclipse.tcf.te.ui.controls.file;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IPath;
@@ -18,9 +18,10 @@ import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Dialog;
import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.tm.te.ui.controls.nls.Messages;
-import org.eclipse.tm.te.ui.controls.validator.FileNameValidator;
-import org.eclipse.tm.te.ui.controls.validator.Validator;
+import org.eclipse.tcf.te.ui.controls.BaseDialogSelectionControl;
+import org.eclipse.tcf.te.ui.controls.nls.Messages;
+import org.eclipse.tcf.te.ui.controls.validator.FileNameValidator;
+import org.eclipse.tcf.te.ui.controls.validator.Validator;
import org.osgi.framework.Bundle;
@@ -90,7 +91,7 @@ public class FileSelectionControl extends BaseDialogSelectionControl {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.BaseDialogSelectionControl#doCreateDialogControl(org.eclipse.swt.widgets.Composite)
+ * @see org.eclipse.tcf.te.ui.controls.BaseDialogSelectionControl#doCreateDialogControl(org.eclipse.swt.widgets.Composite)
*/
@Override
protected Dialog doCreateDialogControl(Composite parent) {
@@ -102,7 +103,7 @@ public class FileSelectionControl extends BaseDialogSelectionControl {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.BaseDialogSelectionControl#configureDialogControl(org.eclipse.swt.widgets.Dialog)
+ * @see org.eclipse.tcf.te.ui.controls.BaseDialogSelectionControl#configureDialogControl(org.eclipse.swt.widgets.Dialog)
*/
@Override
protected void configureDialogControl(Dialog dialog) {
@@ -156,7 +157,7 @@ public class FileSelectionControl extends BaseDialogSelectionControl {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.BaseEditBrowseTextControl#doCreateEditFieldValidator()
+ * @see org.eclipse.tcf.te.ui.controls.BaseEditBrowseTextControl#doCreateEditFieldValidator()
*/
@Override
protected Validator doCreateEditFieldValidator() {
@@ -167,7 +168,7 @@ public class FileSelectionControl extends BaseDialogSelectionControl {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.BaseEditBrowseTextControl#configureEditFieldValidator(org.eclipse.tm.te.ui.controls.validator.Validator)
+ * @see org.eclipse.tcf.te.ui.controls.BaseEditBrowseTextControl#configureEditFieldValidator(org.eclipse.tcf.te.ui.controls.validator.Validator)
*/
@Override
protected void configureEditFieldValidator(Validator editFieldValidator) {
@@ -179,7 +180,7 @@ public class FileSelectionControl extends BaseDialogSelectionControl {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.BaseDialogSelectionControl#doOpenDialogControl(org.eclipse.swt.widgets.Dialog)
+ * @see org.eclipse.tcf.te.ui.controls.BaseDialogSelectionControl#doOpenDialogControl(org.eclipse.swt.widgets.Dialog)
*/
@Override
protected String doOpenDialogControl(Dialog dialog) {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/interfaces/IRunnableContextProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/interfaces/IRunnableContextProvider.java
index 6f7fd6898..69b6ceb11 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/interfaces/IRunnableContextProvider.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/interfaces/IRunnableContextProvider.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.controls.interfaces;
+package org.eclipse.tcf.te.ui.controls.interfaces;
import org.eclipse.jface.operation.IRunnableContext;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/interfaces/IWizardConfigurationPanel.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/interfaces/IWizardConfigurationPanel.java
index 39d7599c1..482c939cc 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/interfaces/IWizardConfigurationPanel.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/interfaces/IWizardConfigurationPanel.java
@@ -7,13 +7,13 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.controls.interfaces;
+package org.eclipse.tcf.te.ui.controls.interfaces;
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jface.dialogs.IMessageProvider;
import org.eclipse.swt.events.TypedEvent;
import org.eclipse.swt.widgets.Composite;
-import org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
import org.eclipse.ui.forms.widgets.FormToolkit;
/**
@@ -86,7 +86,9 @@ public interface IWizardConfigurationPanel extends IMessageProvider {
public void doSaveWidgetValues(IDialogSettings settings, String idPrefix);
/**
- * Called to adjust the wizard configuration panels child controls enablement.
+ * Enables or disables all UI elements belonging to the wizard configuration panel.
+ *
+ * @param enabled <code>True</code> to enable the UI elements, <code>false</code> otherwise.
*/
- public void adjustControlEnablement();
+ public void setEnabled(boolean enabled);
}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/net/RemoteHostAddressControl.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/net/RemoteHostAddressControl.java
index 0bd73cc1a..5a013bbd1 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/net/RemoteHostAddressControl.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/net/RemoteHostAddressControl.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.controls.net;
+package org.eclipse.tcf.te.ui.controls.net;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
@@ -25,12 +25,12 @@ import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.wizard.IWizardContainer;
import org.eclipse.swt.events.VerifyListener;
import org.eclipse.swt.widgets.Control;
-import org.eclipse.tm.te.ui.controls.BaseEditBrowseTextControl;
-import org.eclipse.tm.te.ui.controls.activator.UIPlugin;
-import org.eclipse.tm.te.ui.controls.nls.Messages;
-import org.eclipse.tm.te.ui.controls.validator.NameOrIPValidator;
-import org.eclipse.tm.te.ui.controls.validator.NameOrIPVerifyListener;
-import org.eclipse.tm.te.ui.controls.validator.Validator;
+import org.eclipse.tcf.te.ui.controls.BaseEditBrowseTextControl;
+import org.eclipse.tcf.te.ui.controls.activator.UIPlugin;
+import org.eclipse.tcf.te.ui.controls.nls.Messages;
+import org.eclipse.tcf.te.ui.controls.validator.NameOrIPValidator;
+import org.eclipse.tcf.te.ui.controls.validator.NameOrIPVerifyListener;
+import org.eclipse.tcf.te.ui.controls.validator.Validator;
/**
@@ -53,7 +53,7 @@ public class RemoteHostAddressControl extends BaseEditBrowseTextControl {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.BaseEditBrowseTextControl#onButtonControlSelected()
+ * @see org.eclipse.tcf.te.ui.controls.BaseEditBrowseTextControl#onButtonControlSelected()
*/
@Override
protected void onButtonControlSelected() {
@@ -69,7 +69,7 @@ public class RemoteHostAddressControl extends BaseEditBrowseTextControl {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.BaseEditBrowseTextControl#doCreateEditFieldValidator()
+ * @see org.eclipse.tcf.te.ui.controls.BaseEditBrowseTextControl#doCreateEditFieldValidator()
*/
@Override
protected Validator doCreateEditFieldValidator() {
@@ -81,7 +81,7 @@ public class RemoteHostAddressControl extends BaseEditBrowseTextControl {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.BaseEditBrowseTextControl#configureEditFieldValidator(org.eclipse.tm.te.ui.controls.validator.Validator)
+ * @see org.eclipse.tcf.te.ui.controls.BaseEditBrowseTextControl#configureEditFieldValidator(org.eclipse.tcf.te.ui.controls.validator.Validator)
*/
@Override
protected void configureEditFieldValidator(Validator validator) {
@@ -97,7 +97,7 @@ public class RemoteHostAddressControl extends BaseEditBrowseTextControl {
private VerifyListener verifyListener;
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.BaseEditBrowseTextControl#doGetEditFieldControlVerifyListener()
+ * @see org.eclipse.tcf.te.ui.controls.BaseEditBrowseTextControl#doGetEditFieldControlVerifyListener()
*/
@Override
protected VerifyListener doGetEditFieldControlVerifyListener() {
@@ -191,15 +191,17 @@ public class RemoteHostAddressControl extends BaseEditBrowseTextControl {
try {
// Try to get the wizard container from the parent page
- Class<?>[] paramTypes = new Class[0];
- Object[] args = new Object[0];
- Method method = parentPage.getClass().getMethod("getContainer", paramTypes); //$NON-NLS-1$
- if (!method.isAccessible()) {
- method.setAccessible(true);
- }
- Object result = method.invoke(parentPage, args);
- if (result instanceof IWizardContainer) {
- container = (IWizardContainer)result;
+ if (parentPage != null) {
+ Class<?>[] paramTypes = new Class[0];
+ Object[] args = new Object[0];
+ Method method = parentPage.getClass().getMethod("getContainer", paramTypes); //$NON-NLS-1$
+ if (!method.isAccessible()) {
+ method.setAccessible(true);
+ }
+ Object result = method.invoke(parentPage, args);
+ if (result instanceof IWizardContainer) {
+ container = (IWizardContainer)result;
+ }
}
} catch (Exception e) {
// If the object does not have a "getContainer()" method,
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/net/RemoteHostPortControl.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/net/RemoteHostPortControl.java
index f5b2bc06d..672170e15 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/net/RemoteHostPortControl.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/net/RemoteHostPortControl.java
@@ -7,15 +7,15 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.controls.net;
+package org.eclipse.tcf.te.ui.controls.net;
import org.eclipse.jface.dialogs.IDialogPage;
import org.eclipse.swt.events.VerifyListener;
-import org.eclipse.tm.te.ui.controls.BaseEditBrowseTextControl;
-import org.eclipse.tm.te.ui.controls.nls.Messages;
-import org.eclipse.tm.te.ui.controls.validator.PortNumberValidator;
-import org.eclipse.tm.te.ui.controls.validator.PortNumberVerifyListener;
-import org.eclipse.tm.te.ui.controls.validator.Validator;
+import org.eclipse.tcf.te.ui.controls.BaseEditBrowseTextControl;
+import org.eclipse.tcf.te.ui.controls.nls.Messages;
+import org.eclipse.tcf.te.ui.controls.validator.PortNumberValidator;
+import org.eclipse.tcf.te.ui.controls.validator.PortNumberVerifyListener;
+import org.eclipse.tcf.te.ui.controls.validator.Validator;
/**
* Basic remote host port control.
@@ -38,7 +38,7 @@ public class RemoteHostPortControl extends BaseEditBrowseTextControl {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.BaseEditBrowseTextControl#doCreateEditFieldValidator()
+ * @see org.eclipse.tcf.te.ui.controls.BaseEditBrowseTextControl#doCreateEditFieldValidator()
*/
@Override
protected Validator doCreateEditFieldValidator() {
@@ -48,7 +48,7 @@ public class RemoteHostPortControl extends BaseEditBrowseTextControl {
private VerifyListener verifyListener;
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.BaseEditBrowseTextControl#doGetEditFieldControlVerifyListener()
+ * @see org.eclipse.tcf.te.ui.controls.BaseEditBrowseTextControl#doGetEditFieldControlVerifyListener()
*/
@Override
protected VerifyListener doGetEditFieldControlVerifyListener() {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/nls/Messages.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/nls/Messages.java
index 95d4e81e2..634743748 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/nls/Messages.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/nls/Messages.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.controls.nls;
+package org.eclipse.tcf.te.ui.controls.nls;
import java.lang.reflect.Field;
@@ -19,7 +19,7 @@ import org.eclipse.osgi.util.NLS;
public class Messages extends NLS {
// The plug-in resource bundle name
- private static final String BUNDLE_NAME = "org.eclipse.tm.te.ui.controls.nls.Messages"; //$NON-NLS-1$
+ private static final String BUNDLE_NAME = "org.eclipse.tcf.te.ui.controls.nls.Messages"; //$NON-NLS-1$
/**
* Static constructor.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/nls/Messages.properties b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/nls/Messages.properties
index 122efc896..ff4d2580a 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/nls/Messages.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/nls/Messages.properties
@@ -1,5 +1,5 @@
#
-# org.eclipse.tm.te.ui.controls
+# org.eclipse.tcf.te.ui.controls
# Externalized Strings.
#
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/panels/AbstractWizardConfigurationPanel.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/panels/AbstractWizardConfigurationPanel.java
index d60c2fc25..c8eaf5cb2 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/panels/AbstractWizardConfigurationPanel.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/panels/AbstractWizardConfigurationPanel.java
@@ -7,14 +7,14 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.controls.panels;
+package org.eclipse.tcf.te.ui.controls.panels;
import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jface.dialogs.IMessageProvider;
import org.eclipse.swt.widgets.Composite;
-import org.eclipse.tm.te.ui.controls.BaseDialogPageControl;
-import org.eclipse.tm.te.ui.controls.interfaces.IWizardConfigurationPanel;
+import org.eclipse.tcf.te.ui.controls.BaseDialogPageControl;
+import org.eclipse.tcf.te.ui.controls.interfaces.IWizardConfigurationPanel;
/**
* Abstract base implementation of the <code>IWizardConfigurationPanel</code> interface.
@@ -75,7 +75,7 @@ public abstract class AbstractWizardConfigurationPanel implements IWizardConfigu
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.interfaces.IWizardConfigurationPanel#dispose()
+ * @see org.eclipse.tcf.te.ui.controls.interfaces.IWizardConfigurationPanel#dispose()
*/
@Override
public void dispose() {
@@ -91,7 +91,7 @@ public abstract class AbstractWizardConfigurationPanel implements IWizardConfigu
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.interfaces.IWizardConfigurationPanel#getControl()
+ * @see org.eclipse.tcf.te.ui.controls.interfaces.IWizardConfigurationPanel#getControl()
*/
@Override
public Composite getControl() {
@@ -99,28 +99,28 @@ public abstract class AbstractWizardConfigurationPanel implements IWizardConfigu
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.interfaces.IWizardConfigurationPanel#doRestoreWidgetValues(org.eclipse.jface.dialogs.IDialogSettings, java.lang.String)
+ * @see org.eclipse.tcf.te.ui.controls.interfaces.IWizardConfigurationPanel#doRestoreWidgetValues(org.eclipse.jface.dialogs.IDialogSettings, java.lang.String)
*/
@Override
public void doRestoreWidgetValues(IDialogSettings settings, String idPrefix) {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.interfaces.IWizardConfigurationPanel#doSaveWidgetValues(org.eclipse.jface.dialogs.IDialogSettings, java.lang.String)
+ * @see org.eclipse.tcf.te.ui.controls.interfaces.IWizardConfigurationPanel#doSaveWidgetValues(org.eclipse.jface.dialogs.IDialogSettings, java.lang.String)
*/
@Override
public void doSaveWidgetValues(IDialogSettings settings, String idPrefix) {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.interfaces.IWizardConfigurationPanel#adjustControlEnablement()
+ * @see org.eclipse.tcf.te.ui.controls.interfaces.IWizardConfigurationPanel#setEnabled(boolean)
*/
@Override
- public void adjustControlEnablement() {
+ public void setEnabled(boolean enabled) {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.interfaces.IWizardConfigurationPanel#isValid()
+ * @see org.eclipse.tcf.te.ui.controls.interfaces.IWizardConfigurationPanel#isValid()
*/
@Override
public boolean isValid() {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/validator/DirectoryNameValidator.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/validator/DirectoryNameValidator.java
index eef172d2d..480603fd2 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/validator/DirectoryNameValidator.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/validator/DirectoryNameValidator.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.controls.validator;
+package org.eclipse.tcf.te.ui.controls.validator;
import java.io.File;
@@ -61,7 +61,7 @@ public class DirectoryNameValidator extends Validator {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.validator.Validator#init()
+ * @see org.eclipse.tcf.te.ui.controls.validator.Validator#init()
*/
@Override
protected void init() {
@@ -74,7 +74,7 @@ public class DirectoryNameValidator extends Validator {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.validator.Validator#isValid(java.lang.String)
+ * @see org.eclipse.tcf.te.ui.controls.validator.Validator#isValid(java.lang.String)
*/
@Override
public boolean isValid(String newFile) {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/validator/DoubleNumberVerifyListener.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/validator/DoubleNumberVerifyListener.java
index f4be6a326..11bd4708a 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/validator/DoubleNumberVerifyListener.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/validator/DoubleNumberVerifyListener.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.controls.validator;
+package org.eclipse.tcf.te.ui.controls.validator;
import org.eclipse.swt.events.VerifyEvent;
@@ -24,7 +24,7 @@ public class DoubleNumberVerifyListener extends RegexVerifyListener {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.validator.RegexVerifyListener#verifyText(org.eclipse.swt.events.VerifyEvent)
+ * @see org.eclipse.tcf.te.ui.controls.validator.RegexVerifyListener#verifyText(org.eclipse.swt.events.VerifyEvent)
*/
@Override
public void verifyText(VerifyEvent e) {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/validator/FileNameValidator.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/validator/FileNameValidator.java
index d7e74ef22..38508de9a 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/validator/FileNameValidator.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/validator/FileNameValidator.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.controls.validator;
+package org.eclipse.tcf.te.ui.controls.validator;
import java.io.File;
import java.util.Arrays;
@@ -90,7 +90,7 @@ public class FileNameValidator extends Validator {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.validator.Validator#init()
+ * @see org.eclipse.tcf.te.ui.controls.validator.Validator#init()
*/
@Override
protected void init() {
@@ -104,7 +104,7 @@ public class FileNameValidator extends Validator {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.validator.Validator#isValid(java.lang.String)
+ * @see org.eclipse.tcf.te.ui.controls.validator.Validator#isValid(java.lang.String)
*/
@Override
public boolean isValid(String newFile) {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/validator/HexValidator.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/validator/HexValidator.java
index a2e0e8b30..0b9a1d211 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/validator/HexValidator.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/validator/HexValidator.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.controls.validator;
+package org.eclipse.tcf.te.ui.controls.validator;
import java.math.BigInteger;
@@ -115,7 +115,7 @@ public class HexValidator extends RegexValidator {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.validator.RegexValidator#isValid(java.lang.String)
+ * @see org.eclipse.tcf.te.ui.controls.validator.RegexValidator#isValid(java.lang.String)
*/
@Override
public boolean isValid(String newText) {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/validator/HexVerifyListener.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/validator/HexVerifyListener.java
index 1a7d07507..348e2a0aa 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/validator/HexVerifyListener.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/validator/HexVerifyListener.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.controls.validator;
+package org.eclipse.tcf.te.ui.controls.validator;
import org.eclipse.core.runtime.Assert;
import org.eclipse.swt.events.VerifyEvent;
@@ -66,7 +66,7 @@ public class HexVerifyListener extends RegexVerifyListener {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.validator.RegexVerifyListener#verifyText(org.eclipse.swt.events.VerifyEvent)
+ * @see org.eclipse.tcf.te.ui.controls.validator.RegexVerifyListener#verifyText(org.eclipse.swt.events.VerifyEvent)
*/
@Override
public void verifyText(VerifyEvent e) {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/validator/NameOrIPValidator.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/validator/NameOrIPValidator.java
index 2a0577299..dbddd8623 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/validator/NameOrIPValidator.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/validator/NameOrIPValidator.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.controls.validator;
+package org.eclipse.tcf.te.ui.controls.validator;
/**
@@ -56,7 +56,7 @@ public class NameOrIPValidator extends Validator {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.validator.Validator#init()
+ * @see org.eclipse.tcf.te.ui.controls.validator.Validator#init()
*/
@Override
protected void init() {
@@ -66,7 +66,7 @@ public class NameOrIPValidator extends Validator {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.validator.Validator#isValid(java.lang.String)
+ * @see org.eclipse.tcf.te.ui.controls.validator.Validator#isValid(java.lang.String)
*/
@Override
public boolean isValid(String ipOrHostName) {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/validator/NameOrIPVerifyListener.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/validator/NameOrIPVerifyListener.java
index bed30785e..1c3e1fd21 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/validator/NameOrIPVerifyListener.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/validator/NameOrIPVerifyListener.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.controls.validator;
+package org.eclipse.tcf.te.ui.controls.validator;
/**
* Verify listener for text widgets to receive host names or IP addresses.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/validator/NetMaskValidator.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/validator/NetMaskValidator.java
index b2af0c276..3e12c3a5f 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/validator/NetMaskValidator.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/validator/NetMaskValidator.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.controls.validator;
+package org.eclipse.tcf.te.ui.controls.validator;
/**
* Netmask validator.
@@ -27,7 +27,7 @@ public class NetMaskValidator extends NameOrIPValidator {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.validator.NameOrIPValidator#isValid(java.lang.String)
+ * @see org.eclipse.tcf.te.ui.controls.validator.NameOrIPValidator#isValid(java.lang.String)
*/
@Override
public boolean isValid(String netMask) {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/validator/NetMaskVerifyListener.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/validator/NetMaskVerifyListener.java
index e683c22e4..40429b6dc 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/validator/NetMaskVerifyListener.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/validator/NetMaskVerifyListener.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.controls.validator;
+package org.eclipse.tcf.te.ui.controls.validator;
/**
* Netmask verify listener.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/validator/NumberValidator.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/validator/NumberValidator.java
index ec79fb242..9178c2dd9 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/validator/NumberValidator.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/validator/NumberValidator.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.controls.validator;
+package org.eclipse.tcf.te.ui.controls.validator;
import java.text.MessageFormat;
@@ -75,7 +75,7 @@ public class NumberValidator extends RegexValidator {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.validator.RegexValidator#isValid(java.lang.String)
+ * @see org.eclipse.tcf.te.ui.controls.validator.RegexValidator#isValid(java.lang.String)
*/
@Override
public boolean isValid(String newText) {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/validator/NumberVerifyListener.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/validator/NumberVerifyListener.java
index 1af5acb53..b970d7917 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/validator/NumberVerifyListener.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/validator/NumberVerifyListener.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.controls.validator;
+package org.eclipse.tcf.te.ui.controls.validator;
import org.eclipse.swt.events.VerifyEvent;
@@ -60,7 +60,7 @@ public class NumberVerifyListener extends RegexVerifyListener {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.validator.RegexVerifyListener#verifyText(org.eclipse.swt.events.VerifyEvent)
+ * @see org.eclipse.tcf.te.ui.controls.validator.RegexVerifyListener#verifyText(org.eclipse.swt.events.VerifyEvent)
*/
@Override
public void verifyText(VerifyEvent e) {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/validator/PortNumberValidator.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/validator/PortNumberValidator.java
index 6a9976c55..fa1b402f4 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/validator/PortNumberValidator.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/validator/PortNumberValidator.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.controls.validator;
+package org.eclipse.tcf.te.ui.controls.validator;
/**
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/validator/PortNumberVerifyListener.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/validator/PortNumberVerifyListener.java
index d4ae944a7..8bd055bca 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/validator/PortNumberVerifyListener.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/validator/PortNumberVerifyListener.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.controls.validator;
+package org.eclipse.tcf.te.ui.controls.validator;
/**
* Verify listener for text widgets to receive port numbers.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/validator/RegexValidator.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/validator/RegexValidator.java
index 05b16e08d..1cb5f1d13 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/validator/RegexValidator.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/validator/RegexValidator.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.controls.validator;
+package org.eclipse.tcf.te.ui.controls.validator;
/**
@@ -34,7 +34,7 @@ public class RegexValidator extends Validator {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.validator.Validator#isValid(java.lang.String)
+ * @see org.eclipse.tcf.te.ui.controls.validator.Validator#isValid(java.lang.String)
*/
@Override
public boolean isValid(String newText) {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/validator/RegexVerifyListener.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/validator/RegexVerifyListener.java
index 3fc20e262..2b45b41cb 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/validator/RegexVerifyListener.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/validator/RegexVerifyListener.java
@@ -7,14 +7,14 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.controls.validator;
+package org.eclipse.tcf.te.ui.controls.validator;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.swt.events.VerifyEvent;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Text;
-import org.eclipse.tm.te.ui.controls.activator.UIPlugin;
+import org.eclipse.tcf.te.ui.controls.activator.UIPlugin;
/**
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/validator/Validator.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/validator/Validator.java
index 71919a70d..3bb3b1fce 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/validator/Validator.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/validator/Validator.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.controls.validator;
+package org.eclipse.tcf.te.ui.controls.validator;
import java.util.HashMap;
import java.util.Map;
@@ -15,7 +15,7 @@ import java.util.Map;
import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.dialogs.IMessageProvider;
import org.eclipse.jface.viewers.ICellEditorValidator;
-import org.eclipse.tm.te.ui.controls.nls.Messages;
+import org.eclipse.tcf.te.ui.controls.nls.Messages;
/**
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/validator/VerifyListener.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/validator/VerifyListener.java
index 8b401bb63..f93cc8e20 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/validator/VerifyListener.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/validator/VerifyListener.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.controls.validator;
+package org.eclipse.tcf.te.ui.controls.validator;
/**
* Base class for verify listener.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/validator/WorkspaceContainerValidator.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/validator/WorkspaceContainerValidator.java
index 730676df1..a690b7ccb 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/validator/WorkspaceContainerValidator.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/validator/WorkspaceContainerValidator.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.controls.validator;
+package org.eclipse.tcf.te.ui.controls.validator;
import java.text.MessageFormat;
@@ -38,7 +38,7 @@ public class WorkspaceContainerValidator extends Validator {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.validator.Validator#isValid(java.lang.String)
+ * @see org.eclipse.tcf.te.ui.controls.validator.Validator#isValid(java.lang.String)
*/
@Override
public boolean isValid(String newText) {
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.forms/.classpath b/target_explorer/plugins/org.eclipse.tcf.te.ui.forms/.classpath
new file mode 100644
index 000000000..8a8f1668c
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.forms/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.forms/.project b/target_explorer/plugins/org.eclipse.tcf.te.ui.forms/.project
new file mode 100644
index 000000000..edbcd87de
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.forms/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.tcf.te.ui.forms</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/target_explorer/plugins/org.eclipse.tm.te.ui.forms/.settings/org.eclipse.jdt.core.prefs b/target_explorer/plugins/org.eclipse.tcf.te.ui.forms/.settings/org.eclipse.jdt.core.prefs
index 113e21588..113e21588 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.forms/.settings/org.eclipse.jdt.core.prefs
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.forms/.settings/org.eclipse.jdt.core.prefs
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.forms/.settings/org.eclipse.jdt.ui.prefs b/target_explorer/plugins/org.eclipse.tcf.te.ui.forms/.settings/org.eclipse.jdt.ui.prefs
index ac8a2c52f..ac8a2c52f 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.forms/.settings/org.eclipse.jdt.ui.prefs
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.forms/.settings/org.eclipse.jdt.ui.prefs
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.forms/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.ui.forms/META-INF/MANIFEST.MF
index 54c041e82..09726b40e 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.forms/META-INF/MANIFEST.MF
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.forms/META-INF/MANIFEST.MF
@@ -1,17 +1,17 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.tm.te.ui.forms;singleton:=true
+Bundle-SymbolicName: org.eclipse.tcf.te.ui.forms;singleton:=true
Bundle-Version: 1.0.0.qualifier
-Bundle-Activator: org.eclipse.tm.te.ui.forms.activator.UIPlugin
+Bundle-Activator: org.eclipse.tcf.te.ui.forms.activator.UIPlugin
Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
org.eclipse.ui;bundle-version="3.7.0",
org.eclipse.ui.forms;bundle-version="3.5.100",
- org.eclipse.tm.te.ui.swt;bundle-version="1.0.0"
+ org.eclipse.tcf.te.ui.swt;bundle-version="1.0.0"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-Localization: plugin
Bundle-Vendor: %providerName
-Export-Package: org.eclipse.tm.te.ui.forms,
- org.eclipse.tm.te.ui.forms.activator;x-internal:=true,
- org.eclipse.tm.te.ui.forms.parts
+Export-Package: org.eclipse.tcf.te.ui.forms,
+ org.eclipse.tcf.te.ui.forms.activator;x-internal:=true,
+ org.eclipse.tcf.te.ui.forms.parts
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.forms/build.properties b/target_explorer/plugins/org.eclipse.tcf.te.ui.forms/build.properties
new file mode 100644
index 000000000..f4ae97015
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.forms/build.properties
@@ -0,0 +1,5 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.properties
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.forms/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.ui.forms/plugin.properties
index 3e8aaf21b..3e8aaf21b 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.forms/plugin.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.forms/plugin.properties
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.forms/pom.xml b/target_explorer/plugins/org.eclipse.tcf.te.ui.forms/pom.xml
new file mode 100644
index 000000000..c5f475ca9
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.forms/pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.tcf</groupId>
+ <artifactId>tcf-parent</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../../../pom.xml</relativePath>
+ </parent>
+
+ <version>1.0.0.qualifier</version>
+ <artifactId>org.eclipse.tcf.te.ui.forms</artifactId>
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.forms/src/org/eclipse/tm/te/ui/forms/CustomFormToolkit.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.forms/src/org/eclipse/tcf/te/ui/forms/CustomFormToolkit.java
index e4803709c..fb021b69f 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.forms/src/org/eclipse/tm/te/ui/forms/CustomFormToolkit.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.forms/src/org/eclipse/tcf/te/ui/forms/CustomFormToolkit.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.forms;
+package org.eclipse.tcf.te.ui.forms;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.PlatformObject;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.forms/src/org/eclipse/tm/te/ui/forms/FormLayoutFactory.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.forms/src/org/eclipse/tcf/te/ui/forms/FormLayoutFactory.java
index 0315f8198..2a1fcba1c 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.forms/src/org/eclipse/tm/te/ui/forms/FormLayoutFactory.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.forms/src/org/eclipse/tcf/te/ui/forms/FormLayoutFactory.java
@@ -9,7 +9,7 @@
* IBM Corporation - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.forms;
+package org.eclipse.tcf.te.ui.forms;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.forms/src/org/eclipse/tm/te/ui/forms/activator/UIPlugin.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.forms/src/org/eclipse/tcf/te/ui/forms/activator/UIPlugin.java
index 09775d173..1d56f4810 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.forms/src/org/eclipse/tm/te/ui/forms/activator/UIPlugin.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.forms/src/org/eclipse/tcf/te/ui/forms/activator/UIPlugin.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.forms.activator;
+package org.eclipse.tcf.te.ui.forms.activator;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.forms/src/org/eclipse/tm/te/ui/forms/parts/AbstractFormTextSection.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.forms/src/org/eclipse/tcf/te/ui/forms/parts/AbstractFormTextSection.java
index f192e09aa..10ffb866a 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.forms/src/org/eclipse/tm/te/ui/forms/parts/AbstractFormTextSection.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.forms/src/org/eclipse/tcf/te/ui/forms/parts/AbstractFormTextSection.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.forms.parts;
+package org.eclipse.tcf.te.ui.forms.parts;
import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.action.IStatusLineManager;
@@ -15,7 +15,7 @@ import org.eclipse.swt.SWT;
import org.eclipse.swt.SWTException;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Composite;
-import org.eclipse.tm.te.ui.forms.FormLayoutFactory;
+import org.eclipse.tcf.te.ui.forms.FormLayoutFactory;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.forms.IManagedForm;
import org.eclipse.ui.forms.events.HyperlinkEvent;
@@ -55,7 +55,7 @@ public abstract class AbstractFormTextSection extends AbstractSection implements
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.forms.parts.AbstractSection#createClient(org.eclipse.ui.forms.widgets.Section, org.eclipse.ui.forms.widgets.FormToolkit)
+ * @see org.eclipse.tcf.te.ui.forms.parts.AbstractSection#createClient(org.eclipse.ui.forms.widgets.Section, org.eclipse.ui.forms.widgets.FormToolkit)
*/
@Override
protected void createClient(Section section, FormToolkit toolkit) {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.forms/src/org/eclipse/tm/te/ui/forms/parts/AbstractPart.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.forms/src/org/eclipse/tcf/te/ui/forms/parts/AbstractPart.java
index 179fc8305..fd2ff7172 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.forms/src/org/eclipse/tm/te/ui/forms/parts/AbstractPart.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.forms/src/org/eclipse/tcf/te/ui/forms/parts/AbstractPart.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.forms.parts;
+package org.eclipse.tcf.te.ui.forms.parts;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.PlatformObject;
@@ -15,7 +15,7 @@ import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
-import org.eclipse.tm.te.ui.swt.SWTControlUtil;
+import org.eclipse.tcf.te.ui.swt.SWTControlUtil;
import org.eclipse.ui.forms.widgets.FormToolkit;
/**
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.forms/src/org/eclipse/tm/te/ui/forms/parts/AbstractPartWithButtons.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.forms/src/org/eclipse/tcf/te/ui/forms/parts/AbstractPartWithButtons.java
index b4688020a..2329978cd 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.forms/src/org/eclipse/tm/te/ui/forms/parts/AbstractPartWithButtons.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.forms/src/org/eclipse/tcf/te/ui/forms/parts/AbstractPartWithButtons.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.forms.parts;
+package org.eclipse.tcf.te.ui.forms.parts;
import java.util.Arrays;
@@ -46,7 +46,7 @@ public abstract class AbstractPartWithButtons extends AbstractPart {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.forms.parts.AbstractPart#createControl(org.eclipse.swt.widgets.Composite, int, int, org.eclipse.ui.forms.widgets.FormToolkit)
+ * @see org.eclipse.tcf.te.ui.forms.parts.AbstractPart#createControl(org.eclipse.swt.widgets.Composite, int, int, org.eclipse.ui.forms.widgets.FormToolkit)
*/
@Override
public void createControl(Composite parent, int style, int span, FormToolkit toolkit) {
@@ -115,6 +115,8 @@ public abstract class AbstractPartWithButtons extends AbstractPart {
button.setData(Integer.valueOf(i));
button.addSelectionListener(listener);
+ onButtonCreated(button);
+
layoutData = new GridData(SWT.FILL, SWT.BEGINNING, true, false);
layoutData.widthHint = Math.max(new PixelConverter(button).convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH), button.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x);
button.setLayoutData(layoutData);
@@ -129,6 +131,18 @@ public abstract class AbstractPartWithButtons extends AbstractPart {
}
/**
+ * Called from {@link #createButtonsPanel(Composite, FormToolkit)} for each created button.
+ * <p>
+ * <b>Note:</b> The button layout data is set by {@link #createButtonsPanel(Composite, FormToolkit)}
+ * after this method has been returned.
+ *
+ * @param button The created button. Must not be <code>null</code>.
+ */
+ protected void onButtonCreated(Button button) {
+ Assert.isNotNull(button);
+ }
+
+ /**
* Called from the buttons selection listener to signal when
* the user clicked on the button.
*
@@ -139,7 +153,7 @@ public abstract class AbstractPartWithButtons extends AbstractPart {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.forms.parts.AbstractPart#onEnabledStateChanged()
+ * @see org.eclipse.tcf.te.ui.forms.parts.AbstractPart#onEnabledStateChanged()
*/
@Override
protected void onEnabledStateChanged() {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.forms/src/org/eclipse/tm/te/ui/forms/parts/AbstractSection.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.forms/src/org/eclipse/tcf/te/ui/forms/parts/AbstractSection.java
index c460486c9..375e1453e 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.forms/src/org/eclipse/tm/te/ui/forms/parts/AbstractSection.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.forms/src/org/eclipse/tcf/te/ui/forms/parts/AbstractSection.java
@@ -7,19 +7,21 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.forms.parts;
+package org.eclipse.tcf.te.ui.forms.parts;
import java.lang.reflect.Field;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.Platform;
+import org.eclipse.jface.dialogs.IMessageProvider;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
-import org.eclipse.tm.te.ui.forms.FormLayoutFactory;
-import org.eclipse.tm.te.ui.swt.SWTControlUtil;
+import org.eclipse.tcf.te.ui.forms.FormLayoutFactory;
+import org.eclipse.tcf.te.ui.jface.interfaces.IValidatable;
+import org.eclipse.tcf.te.ui.swt.SWTControlUtil;
import org.eclipse.ui.forms.AbstractFormPart;
import org.eclipse.ui.forms.IManagedForm;
import org.eclipse.ui.forms.SectionPart;
@@ -30,7 +32,11 @@ import org.eclipse.ui.forms.widgets.Section;
/**
* Abstract section implementation.
*/
-public abstract class AbstractSection extends SectionPart implements IAdaptable {
+public abstract class AbstractSection extends SectionPart implements IAdaptable, IValidatable {
+ // The message text
+ private String message = null;
+ // The message type. See IMessageProvider
+ private int messageType = NONE;
/**
* Constructor.
@@ -133,4 +139,40 @@ public abstract class AbstractSection extends SectionPart implements IAdaptable
} catch (Exception e) { /* ignored on purpose */ }
}
}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.jface.interfaces.IValidatable#isValid()
+ */
+ @Override
+ public boolean isValid() {
+ setMessage(null, IMessageProvider.NONE);
+ return true;
+ }
+
+ /**
+ * Sets the message text and type.
+ *
+ * @param message The message or <code>null</code>.
+ * @param messageType The message type. See {@link IMessageProvider}.
+ */
+ protected final void setMessage(String message, int messageType) {
+ this.message = message;
+ this.messageType = messageType;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.dialogs.IMessageProvider#getMessage()
+ */
+ @Override
+ public final String getMessage() {
+ return message;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.dialogs.IMessageProvider#getMessageType()
+ */
+ @Override
+ public final int getMessageType() {
+ return messageType;
+ }
}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.forms/src/org/eclipse/tm/te/ui/forms/parts/AbstractStructuredViewerPart.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.forms/src/org/eclipse/tcf/te/ui/forms/parts/AbstractStructuredViewerPart.java
index 6b45cd34f..7de9a62c5 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.forms/src/org/eclipse/tm/te/ui/forms/parts/AbstractStructuredViewerPart.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.forms/src/org/eclipse/tcf/te/ui/forms/parts/AbstractStructuredViewerPart.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.forms.parts;
+package org.eclipse.tcf.te.ui.forms.parts;
import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.viewers.StructuredViewer;
@@ -79,7 +79,7 @@ public abstract class AbstractStructuredViewerPart extends AbstractPartWithButto
protected abstract StructuredViewer createStructuredViewer(Composite parent, int style, FormToolkit toolkit);
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.forms.parts.AbstractPartWithButtons#createMainControl(org.eclipse.swt.widgets.Composite, int, int, org.eclipse.ui.forms.widgets.FormToolkit)
+ * @see org.eclipse.tcf.te.ui.forms.parts.AbstractPartWithButtons#createMainControl(org.eclipse.swt.widgets.Composite, int, int, org.eclipse.ui.forms.widgets.FormToolkit)
*/
@Override
protected void createMainControl(Composite parent, int style, int span, FormToolkit toolkit) {
@@ -94,7 +94,7 @@ public abstract class AbstractStructuredViewerPart extends AbstractPartWithButto
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.forms.parts.AbstractPartWithButtons#onEnabledStateChanged()
+ * @see org.eclipse.tcf.te.ui.forms.parts.AbstractPartWithButtons#onEnabledStateChanged()
*/
@Override
protected void onEnabledStateChanged() {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.forms/src/org/eclipse/tm/te/ui/forms/parts/AbstractStructuredViewerSection.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.forms/src/org/eclipse/tcf/te/ui/forms/parts/AbstractStructuredViewerSection.java
index edc37dcd8..5589c4f9a 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.forms/src/org/eclipse/tm/te/ui/forms/parts/AbstractStructuredViewerSection.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.forms/src/org/eclipse/tcf/te/ui/forms/parts/AbstractStructuredViewerSection.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.forms.parts;
+package org.eclipse.tcf.te.ui.forms.parts;
import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.action.IMenuListener;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.forms/src/org/eclipse/tm/te/ui/forms/parts/AbstractTableSection.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.forms/src/org/eclipse/tcf/te/ui/forms/parts/AbstractTableSection.java
index 397b422b8..54f6640d7 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.forms/src/org/eclipse/tm/te/ui/forms/parts/AbstractTableSection.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.forms/src/org/eclipse/tcf/te/ui/forms/parts/AbstractTableSection.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.forms.parts;
+package org.eclipse.tcf.te.ui.forms.parts;
import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.viewers.DoubleClickEvent;
@@ -17,6 +17,7 @@ import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.tcf.te.ui.forms.parts.AbstractTreeSection.TreePartAdapter;
import org.eclipse.ui.forms.IManagedForm;
import org.eclipse.ui.forms.widgets.FormToolkit;
@@ -40,7 +41,7 @@ public abstract class AbstractTableSection extends AbstractStructuredViewerSecti
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.forms.parts.TablePart#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
+ * @see org.eclipse.tcf.te.ui.forms.parts.TablePart#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
*/
@Override
public void selectionChanged(SelectionChangedEvent event) {
@@ -48,7 +49,7 @@ public abstract class AbstractTableSection extends AbstractStructuredViewerSecti
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.forms.parts.TablePart#doubleClick(org.eclipse.jface.viewers.DoubleClickEvent)
+ * @see org.eclipse.tcf.te.ui.forms.parts.TablePart#doubleClick(org.eclipse.jface.viewers.DoubleClickEvent)
*/
@Override
public void doubleClick(DoubleClickEvent event) {
@@ -56,7 +57,7 @@ public abstract class AbstractTableSection extends AbstractStructuredViewerSecti
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.forms.parts.AbstractPartWithButtons#onButtonSelected(org.eclipse.swt.widgets.Button)
+ * @see org.eclipse.tcf.te.ui.forms.parts.AbstractPartWithButtons#onButtonSelected(org.eclipse.swt.widgets.Button)
*/
@Override
protected void onButtonSelected(Button button) {
@@ -64,7 +65,7 @@ public abstract class AbstractTableSection extends AbstractStructuredViewerSecti
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.forms.parts.AbstractPartWithButtons#createButtonsPanel(org.eclipse.swt.widgets.Composite, org.eclipse.ui.forms.widgets.FormToolkit)
+ * @see org.eclipse.tcf.te.ui.forms.parts.AbstractPartWithButtons#createButtonsPanel(org.eclipse.swt.widgets.Composite, org.eclipse.ui.forms.widgets.FormToolkit)
*/
@Override
protected Composite createButtonsPanel(Composite parent, FormToolkit toolkit) {
@@ -74,7 +75,15 @@ public abstract class AbstractTableSection extends AbstractStructuredViewerSecti
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.forms.parts.TablePart#createTableViewer(org.eclipse.swt.widgets.Composite, int)
+ * @see org.eclipse.tcf.te.ui.forms.parts.AbstractPartWithButtons#onButtonCreated(org.eclipse.swt.widgets.Button)
+ */
+ @Override
+ protected void onButtonCreated(Button button) {
+ AbstractTableSection.this.onButtonCreated(button);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.forms.parts.TablePart#createTableViewer(org.eclipse.swt.widgets.Composite, int)
*/
@Override
protected TableViewer createTableViewer(Composite parent, int style) {
@@ -82,7 +91,7 @@ public abstract class AbstractTableSection extends AbstractStructuredViewerSecti
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.forms.parts.TablePart#configureTableViewer(org.eclipse.jface.viewers.TableViewer)
+ * @see org.eclipse.tcf.te.ui.forms.parts.TablePart#configureTableViewer(org.eclipse.jface.viewers.TableViewer)
*/
@Override
protected void configureTableViewer(TableViewer viewer) {
@@ -118,7 +127,7 @@ public abstract class AbstractTableSection extends AbstractStructuredViewerSecti
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.forms.parts.AbstractStructuredViewerSection#createViewerPart(java.lang.String[])
+ * @see org.eclipse.tcf.te.ui.forms.parts.AbstractStructuredViewerSection#createViewerPart(java.lang.String[])
*/
@Override
protected AbstractStructuredViewerPart createViewerPart(String[] labels) {
@@ -170,6 +179,14 @@ public abstract class AbstractTableSection extends AbstractStructuredViewerSecti
}
/**
+ * Called from {@link TreePartAdapter#createButtonsPanel(Composite, FormToolkit)}.
+ *
+ * @param button The created button. Must not be <code>null</code>.
+ */
+ protected void onButtonCreated(Button button) {
+ }
+
+ /**
* Initialize the enablement of the buttons in the buttons bar.
* <p>
* Called from {@link TablePartAdapter#createButtonsPanel(Composite, FormToolkit)}.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.forms/src/org/eclipse/tm/te/ui/forms/parts/AbstractTreeSection.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.forms/src/org/eclipse/tcf/te/ui/forms/parts/AbstractTreeSection.java
index ea081409b..ddc6406d2 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.forms/src/org/eclipse/tm/te/ui/forms/parts/AbstractTreeSection.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.forms/src/org/eclipse/tcf/te/ui/forms/parts/AbstractTreeSection.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.forms.parts;
+package org.eclipse.tcf.te.ui.forms.parts;
import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.viewers.DoubleClickEvent;
@@ -41,7 +41,7 @@ public abstract class AbstractTreeSection extends AbstractStructuredViewerSectio
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.forms.parts.TablePart#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
+ * @see org.eclipse.tcf.te.ui.forms.parts.TablePart#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
*/
@Override
public void selectionChanged(SelectionChangedEvent event) {
@@ -50,7 +50,7 @@ public abstract class AbstractTreeSection extends AbstractStructuredViewerSectio
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.forms.parts.TablePart#doubleClick(org.eclipse.jface.viewers.DoubleClickEvent)
+ * @see org.eclipse.tcf.te.ui.forms.parts.TablePart#doubleClick(org.eclipse.jface.viewers.DoubleClickEvent)
*/
@Override
public void doubleClick(DoubleClickEvent event) {
@@ -58,7 +58,7 @@ public abstract class AbstractTreeSection extends AbstractStructuredViewerSectio
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.forms.parts.AbstractPartWithButtons#onButtonSelected(org.eclipse.swt.widgets.Button)
+ * @see org.eclipse.tcf.te.ui.forms.parts.AbstractPartWithButtons#onButtonSelected(org.eclipse.swt.widgets.Button)
*/
@Override
protected void onButtonSelected(Button button) {
@@ -66,7 +66,7 @@ public abstract class AbstractTreeSection extends AbstractStructuredViewerSectio
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.forms.parts.AbstractPartWithButtons#createButtonsPanel(org.eclipse.swt.widgets.Composite, org.eclipse.ui.forms.widgets.FormToolkit)
+ * @see org.eclipse.tcf.te.ui.forms.parts.AbstractPartWithButtons#createButtonsPanel(org.eclipse.swt.widgets.Composite, org.eclipse.ui.forms.widgets.FormToolkit)
*/
@Override
protected Composite createButtonsPanel(Composite parent, FormToolkit toolkit) {
@@ -80,7 +80,15 @@ public abstract class AbstractTreeSection extends AbstractStructuredViewerSectio
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.forms.parts.TreePart#createTreeViewer(org.eclipse.swt.widgets.Composite, int)
+ * @see org.eclipse.tcf.te.ui.forms.parts.AbstractPartWithButtons#onButtonCreated(org.eclipse.swt.widgets.Button)
+ */
+ @Override
+ protected void onButtonCreated(Button button) {
+ AbstractTreeSection.this.onButtonCreated(button);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.forms.parts.TreePart#createTreeViewer(org.eclipse.swt.widgets.Composite, int)
*/
@Override
protected TreeViewer createTreeViewer(Composite parent, int style) {
@@ -88,7 +96,7 @@ public abstract class AbstractTreeSection extends AbstractStructuredViewerSectio
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.forms.parts.TreePart#configureTreeViewer(org.eclipse.jface.viewers.TreeViewer)
+ * @see org.eclipse.tcf.te.ui.forms.parts.TreePart#configureTreeViewer(org.eclipse.jface.viewers.TreeViewer)
*/
@Override
protected void configureTreeViewer(TreeViewer viewer) {
@@ -124,7 +132,7 @@ public abstract class AbstractTreeSection extends AbstractStructuredViewerSectio
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.forms.parts.AbstractStructuredViewerSection#createViewerPart(java.lang.String[])
+ * @see org.eclipse.tcf.te.ui.forms.parts.AbstractStructuredViewerSection#createViewerPart(java.lang.String[])
*/
@Override
protected AbstractStructuredViewerPart createViewerPart(String[] labels) {
@@ -176,6 +184,14 @@ public abstract class AbstractTreeSection extends AbstractStructuredViewerSectio
}
/**
+ * Called from {@link TreePartAdapter#createButtonsPanel(Composite, FormToolkit)}.
+ *
+ * @param button The created button. Must not be <code>null</code>.
+ */
+ protected void onButtonCreated(Button button) {
+ }
+
+ /**
* Initialize the enablement of the buttons in the buttons bar.
* <p>
* Called from {@link TreePartAdapter#createButtonsPanel(Composite, FormToolkit)}.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.forms/src/org/eclipse/tm/te/ui/forms/parts/TablePart.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.forms/src/org/eclipse/tcf/te/ui/forms/parts/TablePart.java
index 36da237b5..232e34888 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.forms/src/org/eclipse/tm/te/ui/forms/parts/TablePart.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.forms/src/org/eclipse/tcf/te/ui/forms/parts/TablePart.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.forms.parts;
+package org.eclipse.tcf.te.ui.forms.parts;
import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.viewers.DoubleClickEvent;
@@ -69,14 +69,14 @@ public class TablePart extends AbstractStructuredViewerPart implements ISelectio
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.forms.parts.AbstractStructuredViewerPart#createStructuredViewer(org.eclipse.swt.widgets.Composite, int, org.eclipse.ui.forms.widgets.FormToolkit)
+ * @see org.eclipse.tcf.te.ui.forms.parts.AbstractStructuredViewerPart#createStructuredViewer(org.eclipse.swt.widgets.Composite, int, org.eclipse.ui.forms.widgets.FormToolkit)
*/
@Override
protected StructuredViewer createStructuredViewer(Composite parent, int style, FormToolkit toolkit) {
Assert.isNotNull(parent);
// Adjust the style bits
- style |= SWT.H_SCROLL | SWT.V_SCROLL | (toolkit != null ? toolkit.getBorderStyle() : SWT.BORDER);
+ style |= SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER;
TableViewer viewer = createTableViewer(parent, style);
Assert.isNotNull(viewer);
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.forms/src/org/eclipse/tm/te/ui/forms/parts/TreePart.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.forms/src/org/eclipse/tcf/te/ui/forms/parts/TreePart.java
index fd08cc78c..0d7e9b4c9 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.forms/src/org/eclipse/tm/te/ui/forms/parts/TreePart.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.forms/src/org/eclipse/tcf/te/ui/forms/parts/TreePart.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.forms.parts;
+package org.eclipse.tcf.te.ui.forms.parts;
import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.viewers.DoubleClickEvent;
@@ -70,14 +70,14 @@ public class TreePart extends AbstractStructuredViewerPart implements ISelection
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.forms.parts.AbstractStructuredViewerPart#createStructuredViewer(org.eclipse.swt.widgets.Composite, int, org.eclipse.ui.forms.widgets.FormToolkit)
+ * @see org.eclipse.tcf.te.ui.forms.parts.AbstractStructuredViewerPart#createStructuredViewer(org.eclipse.swt.widgets.Composite, int, org.eclipse.ui.forms.widgets.FormToolkit)
*/
@Override
protected StructuredViewer createStructuredViewer(Composite parent, int style, FormToolkit toolkit) {
Assert.isNotNull(parent);
// Adjust the style bits
- style |= SWT.H_SCROLL | SWT.V_SCROLL | (toolkit != null ? toolkit.getBorderStyle() : SWT.BORDER);
+ style |= SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER;
TreeViewer viewer = createTreeViewer(parent, style);
Assert.isNotNull(viewer);
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.swt/.classpath b/target_explorer/plugins/org.eclipse.tcf.te.ui.swt/.classpath
new file mode 100644
index 000000000..8a8f1668c
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.swt/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime/.project b/target_explorer/plugins/org.eclipse.tcf.te.ui.swt/.project
index 192163a1f..bcb6df025 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime/.project
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.swt/.project
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.eclipse.tm.te.runtime</name>
+ <name>org.eclipse.tcf.te.ui.swt</name>
<comment></comment>
<projects>
</projects>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.swt/.settings/org.eclipse.jdt.core.prefs b/target_explorer/plugins/org.eclipse.tcf.te.ui.swt/.settings/org.eclipse.jdt.core.prefs
index a2d50d68e..a2d50d68e 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.swt/.settings/org.eclipse.jdt.core.prefs
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.swt/.settings/org.eclipse.jdt.core.prefs
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.swt/.settings/org.eclipse.jdt.ui.prefs b/target_explorer/plugins/org.eclipse.tcf.te.ui.swt/.settings/org.eclipse.jdt.ui.prefs
index 68f0f3c3a..68f0f3c3a 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.swt/.settings/org.eclipse.jdt.ui.prefs
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.swt/.settings/org.eclipse.jdt.ui.prefs
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.swt/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.ui.swt/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..033bcb87b
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.swt/META-INF/MANIFEST.MF
@@ -0,0 +1,20 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.tcf.te.ui.swt;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipse.tcf.te.ui.swt.activator.UIPlugin
+Bundle-Vendor: %providerName
+Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
+ org.eclipse.ui;bundle-version="3.7.0"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
+Bundle-Localization: plugin
+Export-Package: org.eclipse.tcf.te.ui.jface.dialogs,
+ org.eclipse.tcf.te.ui.jface.images,
+ org.eclipse.tcf.te.ui.jface.interfaces,
+ org.eclipse.tcf.te.ui.swt,
+ org.eclipse.tcf.te.ui.swt.activator;x-internal:=true,
+ org.eclipse.tcf.te.ui.swt.listener,
+ org.eclipse.tcf.te.ui.swt.nls;x-internal:=true,
+ org.eclipse.tcf.te.ui.swt.widgets
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.swt/build.properties b/target_explorer/plugins/org.eclipse.tcf.te.ui.swt/build.properties
new file mode 100644
index 000000000..f4ae97015
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.swt/build.properties
@@ -0,0 +1,5 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.properties
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.swt/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.ui.swt/plugin.properties
index 00ecc9e73..00ecc9e73 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.swt/plugin.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.swt/plugin.properties
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/pom.xml b/target_explorer/plugins/org.eclipse.tcf.te.ui.swt/pom.xml
index 6bf9487d2..c531e8705 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/pom.xml
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.swt/pom.xml
@@ -7,11 +7,11 @@
<parent>
<groupId>org.eclipse.tcf</groupId>
<artifactId>tcf-parent</artifactId>
- <version>0.5.0-SNAPSHOT</version>
+ <version>1.0.0-SNAPSHOT</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<version>1.0.0.qualifier</version>
- <artifactId>org.eclipse.tm.te.tcf.ui</artifactId>
+ <artifactId>org.eclipse.tcf.te.ui.swt</artifactId>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.swt/src/org/eclipse/tm/te/ui/jface/dialogs/CustomTitleAreaDialog.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.swt/src/org/eclipse/tcf/te/ui/jface/dialogs/CustomTitleAreaDialog.java
index 3dc62a72a..009c69b5e 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.swt/src/org/eclipse/tm/te/ui/jface/dialogs/CustomTitleAreaDialog.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.swt/src/org/eclipse/tcf/te/ui/jface/dialogs/CustomTitleAreaDialog.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.jface.dialogs;
+package org.eclipse.tcf.te.ui.jface.dialogs;
import java.util.ArrayList;
import java.util.Arrays;
@@ -23,7 +23,7 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Layout;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.tm.te.ui.swt.activator.UIPlugin;
+import org.eclipse.tcf.te.ui.swt.activator.UIPlugin;
import org.eclipse.ui.PlatformUI;
/**
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.swt/src/org/eclipse/tm/te/ui/jface/dialogs/CustomTrayDialog.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.swt/src/org/eclipse/tcf/te/ui/jface/dialogs/CustomTrayDialog.java
index c3e8d8b7b..38e647197 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.swt/src/org/eclipse/tm/te/ui/jface/dialogs/CustomTrayDialog.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.swt/src/org/eclipse/tcf/te/ui/jface/dialogs/CustomTrayDialog.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.jface.dialogs;
+package org.eclipse.tcf.te.ui.jface.dialogs;
import java.util.ArrayList;
import java.util.Arrays;
@@ -21,7 +21,7 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Layout;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.tm.te.ui.swt.activator.UIPlugin;
+import org.eclipse.tcf.te.ui.swt.activator.UIPlugin;
import org.eclipse.ui.PlatformUI;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.swt/src/org/eclipse/tm/te/ui/jface/dialogs/OptionalMessageDialog.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.swt/src/org/eclipse/tcf/te/ui/jface/dialogs/OptionalMessageDialog.java
index b5411a8d0..ee98c6cd8 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.swt/src/org/eclipse/tm/te/ui/jface/dialogs/OptionalMessageDialog.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.swt/src/org/eclipse/tcf/te/ui/jface/dialogs/OptionalMessageDialog.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.jface.dialogs;
+package org.eclipse.tcf.te.ui.jface.dialogs;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.IDialogSettings;
@@ -31,8 +31,8 @@ import org.eclipse.swt.widgets.Link;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.ToolBar;
import org.eclipse.swt.widgets.ToolItem;
-import org.eclipse.tm.te.ui.swt.activator.UIPlugin;
-import org.eclipse.tm.te.ui.swt.nls.Messages;
+import org.eclipse.tcf.te.ui.swt.activator.UIPlugin;
+import org.eclipse.tcf.te.ui.swt.nls.Messages;
import org.eclipse.ui.PlatformUI;
/**
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.swt/src/org/eclipse/tm/te/ui/jface/images/AbstractImageDescriptor.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.swt/src/org/eclipse/tcf/te/ui/jface/images/AbstractImageDescriptor.java
index b48edb7b0..4d86a552b 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.swt/src/org/eclipse/tm/te/ui/jface/images/AbstractImageDescriptor.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.swt/src/org/eclipse/tcf/te/ui/jface/images/AbstractImageDescriptor.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.jface.images;
+package org.eclipse.tcf.te.ui.jface.images;
import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.resource.CompositeImageDescriptor;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.swt/src/org/eclipse/tcf/te/ui/jface/interfaces/IValidatable.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.swt/src/org/eclipse/tcf/te/ui/jface/interfaces/IValidatable.java
new file mode 100644
index 000000000..65325b024
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.swt/src/org/eclipse/tcf/te/ui/jface/interfaces/IValidatable.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.jface.interfaces;
+
+import org.eclipse.jface.dialogs.IMessageProvider;
+
+/**
+ * Interface to be implemented by validatable UI elements like
+ * widgets, controls, sections or any other UI element with a
+ * validatable state.
+ */
+public interface IValidatable extends IMessageProvider {
+
+ /**
+ * Validates the state of the implementor.
+ * <p>
+ * On invocation, the method is expected to set the validatable
+ * elements message and message type ready to be queried immediately
+ * after the method returned.
+ *
+ * @return <code>True</code> if the validatable is valid, <code>false</code> otherwise.
+ */
+ public boolean isValid();
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.swt/src/org/eclipse/tcf/te/ui/jface/interfaces/IValidatingContainer.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.swt/src/org/eclipse/tcf/te/ui/jface/interfaces/IValidatingContainer.java
new file mode 100644
index 000000000..46950ae24
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.swt/src/org/eclipse/tcf/te/ui/jface/interfaces/IValidatingContainer.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.jface.interfaces;
+
+
+/**
+ * Interface to be implemented by container managing the validation
+ * of contained validatable sub elements.
+ */
+public interface IValidatingContainer {
+
+ /**
+ * Validates the container status.
+ * <p>
+ * If necessary, set the corresponding messages and message types to signal when some sub
+ * elements of the container needs user attention.
+ */
+ public void validate();
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.swt/src/org/eclipse/tm/te/ui/swt/DisplayUtil.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.swt/src/org/eclipse/tcf/te/ui/swt/DisplayUtil.java
index 0c9c93447..4a325c255 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.swt/src/org/eclipse/tm/te/ui/swt/DisplayUtil.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.swt/src/org/eclipse/tcf/te/ui/swt/DisplayUtil.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.swt;
+package org.eclipse.tcf.te.ui.swt;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.PlatformUI;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.swt/src/org/eclipse/tm/te/ui/swt/SWTControlUtil.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.swt/src/org/eclipse/tcf/te/ui/swt/SWTControlUtil.java
index 84b0479e7..0037fe080 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.swt/src/org/eclipse/tm/te/ui/swt/SWTControlUtil.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.swt/src/org/eclipse/tcf/te/ui/swt/SWTControlUtil.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.swt;
+package org.eclipse.tcf.te.ui.swt;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.resource.JFaceResources;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.swt/src/org/eclipse/tm/te/ui/swt/activator/UIPlugin.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.swt/src/org/eclipse/tcf/te/ui/swt/activator/UIPlugin.java
index 5afdc2db5..50f579117 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.swt/src/org/eclipse/tm/te/ui/swt/activator/UIPlugin.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.swt/src/org/eclipse/tcf/te/ui/swt/activator/UIPlugin.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.swt.activator;
+package org.eclipse.tcf.te.ui.swt.activator;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.swt/src/org/eclipse/tm/te/ui/swt/listener/AbstractCellPaintListener.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.swt/src/org/eclipse/tcf/te/ui/swt/listener/AbstractCellPaintListener.java
index cf180d483..bdd6d9333 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.swt/src/org/eclipse/tm/te/ui/swt/listener/AbstractCellPaintListener.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.swt/src/org/eclipse/tcf/te/ui/swt/listener/AbstractCellPaintListener.java
@@ -8,7 +8,7 @@
* of this software may be licensed only pursuant to the terms
* of an applicable Wind River license agreement.
*/
-package org.eclipse.tm.te.ui.swt.listener;
+package org.eclipse.tcf.te.ui.swt.listener;
import org.eclipse.core.runtime.Assert;
import org.eclipse.swt.SWT;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.swt/src/org/eclipse/tm/te/ui/swt/listener/AbstractCheckBoxCellPaintListener.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.swt/src/org/eclipse/tcf/te/ui/swt/listener/AbstractCheckBoxCellPaintListener.java
index 23f6902aa..4dec98884 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.swt/src/org/eclipse/tm/te/ui/swt/listener/AbstractCheckBoxCellPaintListener.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.swt/src/org/eclipse/tcf/te/ui/swt/listener/AbstractCheckBoxCellPaintListener.java
@@ -8,7 +8,7 @@
* of this software may be licensed only pursuant to the terms
* of an applicable Wind River license agreement.
*/
-package org.eclipse.tm.te.ui.swt.listener;
+package org.eclipse.tcf.te.ui.swt.listener;
import org.eclipse.core.runtime.Assert;
import org.eclipse.swt.graphics.Image;
@@ -16,7 +16,7 @@ import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Item;
import org.eclipse.swt.widgets.Widget;
-import org.eclipse.tm.te.ui.swt.SWTControlUtil;
+import org.eclipse.tcf.te.ui.swt.SWTControlUtil;
/**
* Abstract check box cell paint listener implementation.
@@ -46,7 +46,7 @@ public abstract class AbstractCheckBoxCellPaintListener extends AbstractCellPain
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.swt.listener.AbstractCellPaintListener#getPaintOrigin(org.eclipse.swt.widgets.Event, org.eclipse.swt.graphics.Image)
+ * @see org.eclipse.tcf.te.ui.swt.listener.AbstractCellPaintListener#getPaintOrigin(org.eclipse.swt.widgets.Event, org.eclipse.swt.graphics.Image)
*/
@Override
protected Point getPaintOrigin(Event event, Image image) {
@@ -60,7 +60,7 @@ public abstract class AbstractCheckBoxCellPaintListener extends AbstractCellPain
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.swt.listener.AbstractCellPaintListener#getImageToDraw(org.eclipse.swt.widgets.Item, int)
+ * @see org.eclipse.tcf.te.ui.swt.listener.AbstractCellPaintListener#getImageToDraw(org.eclipse.swt.widgets.Item, int)
*/
@Override
protected Image getImageToDraw(Item item, int columnIndex) {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.swt/src/org/eclipse/tm/te/ui/swt/listener/AbstractDecorationCellPaintListener.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.swt/src/org/eclipse/tcf/te/ui/swt/listener/AbstractDecorationCellPaintListener.java
index 84fac2862..ddaf3ce6b 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.swt/src/org/eclipse/tm/te/ui/swt/listener/AbstractDecorationCellPaintListener.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.swt/src/org/eclipse/tcf/te/ui/swt/listener/AbstractDecorationCellPaintListener.java
@@ -8,7 +8,7 @@
* of this software may be licensed only pursuant to the terms
* of an applicable Wind River license agreement.
*/
-package org.eclipse.tm.te.ui.swt.listener;
+package org.eclipse.tcf.te.ui.swt.listener;
import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.dialogs.IMessageProvider;
@@ -40,7 +40,7 @@ public abstract class AbstractDecorationCellPaintListener extends AbstractCellPa
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.swt.listener.AbstractCellPaintListener#getPaintOrigin(org.eclipse.swt.widgets.Event, org.eclipse.swt.graphics.Image)
+ * @see org.eclipse.tcf.te.ui.swt.listener.AbstractCellPaintListener#getPaintOrigin(org.eclipse.swt.widgets.Event, org.eclipse.swt.graphics.Image)
*/
@Override
protected Point getPaintOrigin(Event event, Image image) {
@@ -48,7 +48,7 @@ public abstract class AbstractDecorationCellPaintListener extends AbstractCellPa
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.swt.listener.AbstractCellPaintListener#getImageToDraw(org.eclipse.swt.widgets.Item, int)
+ * @see org.eclipse.tcf.te.ui.swt.listener.AbstractCellPaintListener#getImageToDraw(org.eclipse.swt.widgets.Item, int)
*/
@Override
protected Image getImageToDraw(Item item, int columnIndex) {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.swt/src/org/eclipse/tm/te/ui/swt/nls/Messages.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.swt/src/org/eclipse/tcf/te/ui/swt/nls/Messages.java
index a193fc3df..a5b418f7e 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.swt/src/org/eclipse/tm/te/ui/swt/nls/Messages.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.swt/src/org/eclipse/tcf/te/ui/swt/nls/Messages.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.swt.nls;
+package org.eclipse.tcf.te.ui.swt.nls;
import java.lang.reflect.Field;
@@ -19,7 +19,7 @@ import org.eclipse.osgi.util.NLS;
public class Messages extends NLS {
// The plug-in resource bundle name
- private static final String BUNDLE_NAME = "org.eclipse.tm.te.ui.swt.nls.Messages"; //$NON-NLS-1$
+ private static final String BUNDLE_NAME = "org.eclipse.tcf.te.ui.swt.nls.Messages"; //$NON-NLS-1$
/**
* Static constructor.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.swt/src/org/eclipse/tm/te/ui/swt/nls/Messages.properties b/target_explorer/plugins/org.eclipse.tcf.te.ui.swt/src/org/eclipse/tcf/te/ui/swt/nls/Messages.properties
index bc4923e3d..18de15a8c 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.swt/src/org/eclipse/tm/te/ui/swt/nls/Messages.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.swt/src/org/eclipse/tcf/te/ui/swt/nls/Messages.properties
@@ -1,5 +1,5 @@
#
-# org.eclipse.tm.te.ui.swt
+# org.eclipse.tcf.te.ui.swt
# Externalized Strings.
#
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.swt/src/org/eclipse/tm/te/ui/swt/widgets/NoteCompositeHelper.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.swt/src/org/eclipse/tcf/te/ui/swt/widgets/NoteCompositeHelper.java
index d6f6deaa7..8fbd08710 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.swt/src/org/eclipse/tm/te/ui/swt/widgets/NoteCompositeHelper.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.swt/src/org/eclipse/tcf/te/ui/swt/widgets/NoteCompositeHelper.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.swt.widgets;
+package org.eclipse.tcf.te.ui.swt.widgets;
import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.jface.util.IPropertyChangeListener;
@@ -21,8 +21,8 @@ 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.tm.te.ui.swt.SWTControlUtil;
-import org.eclipse.tm.te.ui.swt.nls.Messages;
+import org.eclipse.tcf.te.ui.swt.SWTControlUtil;
+import org.eclipse.tcf.te.ui.swt.nls.Messages;
/**
* A helper class to create a composite with a highlighted note
@@ -65,9 +65,32 @@ public class NoteCompositeHelper {
* the title of the note
* @param message
* the message for the note
+ *
* @return the composite for the note
*/
public static Composite createNoteComposite(Font font, Composite composite, String title, String message) {
+ return createNoteComposite(font, composite, title, message, SWT.DEFAULT);
+ }
+
+ /**
+ * Creates a composite with a highlighted Note entry and a message text.
+ * This is designed to take up the full width of the page.
+ *
+ * @see PreferencePage#createNoteComposite, this is a plain copy of that!
+ * @param font
+ * the font to use
+ * @param composite
+ * the parent composite
+ * @param title
+ * the title of the note
+ * @param message
+ * the message for the note
+ * @param minCharsPerLine
+ * the minimum number of characters per line. Defaults to '65' if less than '20'.
+ *
+ * @return the composite for the note
+ */
+ public static Composite createNoteComposite(Font font, Composite composite, String title, String message, int minCharsPerLine) {
Composite messageComposite = new NoteComposite(composite, SWT.NONE);
GridLayout messageLayout = new GridLayout();
@@ -115,7 +138,7 @@ public class NoteCompositeHelper {
* needed
*/
layoutData = new GridData(GridData.FILL_HORIZONTAL);
- layoutData.widthHint = SWTControlUtil.convertWidthInCharsToPixels(messageLabel, 65);
+ layoutData.widthHint = SWTControlUtil.convertWidthInCharsToPixels(messageLabel, minCharsPerLine >= 20 ? minCharsPerLine : 65);
messageLabel.setLayoutData(layoutData);
return messageComposite;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/.classpath b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/.classpath
new file mode 100644
index 000000000..8a8f1668c
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/.options b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/.options
new file mode 100644
index 000000000..a9f0396bb
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/.options
@@ -0,0 +1 @@
+org.eclipse.tcf.te.ui.terminals.process/debugmode = 0
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/.project b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/.project
new file mode 100644
index 000000000..3e04d5432
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.tcf.te.ui.terminals.process</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/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.process/.settings/org.eclipse.jdt.core.prefs b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/.settings/org.eclipse.jdt.core.prefs
index 023bfc352..023bfc352 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.process/.settings/org.eclipse.jdt.core.prefs
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/.settings/org.eclipse.jdt.core.prefs
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.process/.settings/org.eclipse.jdt.ui.prefs b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/.settings/org.eclipse.jdt.ui.prefs
index a6374ff85..a6374ff85 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.process/.settings/org.eclipse.jdt.ui.prefs
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/.settings/org.eclipse.jdt.ui.prefs
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..59c89d9ab
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/META-INF/MANIFEST.MF
@@ -0,0 +1,22 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.tcf.te.ui.terminals.process;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipse.tcf.te.ui.terminals.process.activator.UIPlugin
+Bundle-Vendor: %providerName
+Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
+ org.eclipse.core.resources;bundle-version="3.7.100";resolution:=optional,
+ org.eclipse.ui;bundle-version="3.7.0",
+ org.eclipse.tm.terminal;bundle-version="3.1.1",
+ org.eclipse.cdt.core;bundle-version="5.3.1",
+ org.eclipse.tcf.te.runtime;bundle-version="1.0.0",
+ org.eclipse.tcf.te.runtime.services;bundle-version="1.0.0",
+ org.eclipse.tcf.te.ui.terminals;bundle-version="1.0.0",
+ org.eclipse.tcf.te.ui.swt;bundle-version="1.0.0"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
+Bundle-Localization: plugin
+Export-Package: org.eclipse.tcf.te.ui.terminals.process,
+ org.eclipse.tcf.te.ui.terminals.process.activator;x-internal:=true,
+ org.eclipse.tcf.te.ui.terminals.process.nls;x-internal:=true
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/build.properties b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/build.properties
new file mode 100644
index 000000000..8665ac2ff
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/build.properties
@@ -0,0 +1,6 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ plugin.properties
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.process/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/plugin.properties
index fcd1618b6..fcd1618b6 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.process/plugin.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/plugin.properties
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.process/plugin.xml b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/plugin.xml
index 335213f4f..55203c7d7 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.process/plugin.xml
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/plugin.xml
@@ -5,17 +5,17 @@
<!-- Terminal connector contributions -->
<extension point="org.eclipse.tm.terminal.terminalConnectors">
<connector
- class="org.eclipse.tm.te.ui.terminals.process.ProcessConnector"
+ class="org.eclipse.tcf.te.ui.terminals.process.ProcessConnector"
hidden="true"
- id="org.eclipse.tm.te.ui.terminals.ProcessConnector"
+ id="org.eclipse.tcf.te.ui.terminals.ProcessConnector"
name="%TerminalConnector.process"/>
</extension>
<!-- Terminal connector type contributions -->
- <extension point="org.eclipse.tm.te.ui.terminals.connectorTypes">
+ <extension point="org.eclipse.tcf.te.ui.terminals.connectorTypes">
<connectorType
- class="org.eclipse.tm.te.ui.terminals.process.ProcessConnectorType"
- id="org.eclipse.tm.te.ui.terminals.type.process"
+ class="org.eclipse.tcf.te.ui.terminals.process.ProcessConnectorType"
+ id="org.eclipse.tcf.te.ui.terminals.type.process"
label="%ProcessConnectorType.label">
</connectorType>
</extension>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.statushandler/pom.xml b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/pom.xml
index d876dd65a..893979518 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.statushandler/pom.xml
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/pom.xml
@@ -7,11 +7,11 @@
<parent>
<groupId>org.eclipse.tcf</groupId>
<artifactId>tcf-parent</artifactId>
- <version>0.5.0-SNAPSHOT</version>
+ <version>1.0.0-SNAPSHOT</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<version>1.0.0.qualifier</version>
- <artifactId>org.eclipse.tm.te.runtime.statushandler</artifactId>
+ <artifactId>org.eclipse.tcf.te.ui.terminals.process</artifactId>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.process/src/org/eclipse/tm/te/ui/terminals/process/ProcessConnector.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/src/org/eclipse/tcf/te/ui/terminals/process/ProcessConnector.java
index 4f4eb5b6c..49cb7fc80 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.process/src/org/eclipse/tm/te/ui/terminals/process/ProcessConnector.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/src/org/eclipse/tcf/te/ui/terminals/process/ProcessConnector.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.terminals.process;
+package org.eclipse.tcf.te.ui.terminals.process;
import java.io.BufferedInputStream;
import java.io.BufferedReader;
@@ -35,14 +35,14 @@ import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
import org.eclipse.osgi.service.environment.Constants;
import org.eclipse.osgi.util.NLS;
+import org.eclipse.tcf.te.ui.terminals.process.activator.UIPlugin;
+import org.eclipse.tcf.te.ui.terminals.process.nls.Messages;
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.te.runtime.services.interfaces.constants.ILineSeparatorConstants;
-import org.eclipse.tm.te.ui.terminals.process.activator.UIPlugin;
-import org.eclipse.tm.te.ui.terminals.process.nls.Messages;
-import org.eclipse.tm.te.ui.terminals.streams.AbstractStreamsConnector;
+import org.eclipse.tcf.te.runtime.services.interfaces.constants.ILineSeparatorConstants;
+import org.eclipse.tcf.te.ui.terminals.streams.AbstractStreamsConnector;
/**
* Process connector implementation.
@@ -93,7 +93,7 @@ public class ProcessConnector extends AbstractStreamsConnector {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl#connect(org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl)
+ * @see org.eclipse.tcf.internal.terminal.provisional.api.provider.TerminalConnectorImpl#connect(org.eclipse.tcf.internal.terminal.provisional.api.ITerminalControl)
*/
@Override
public void connect(ITerminalControl control) {
@@ -187,7 +187,7 @@ public class ProcessConnector extends AbstractStreamsConnector {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl#isLocalEcho()
+ * @see org.eclipse.tcf.internal.terminal.provisional.api.provider.TerminalConnectorImpl#isLocalEcho()
*/
@Override
public boolean isLocalEcho() {
@@ -195,7 +195,7 @@ public class ProcessConnector extends AbstractStreamsConnector {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl#doDisconnect()
+ * @see org.eclipse.tcf.internal.terminal.provisional.api.provider.TerminalConnectorImpl#doDisconnect()
*/
@Override
public void doDisconnect() {
@@ -212,7 +212,7 @@ public class ProcessConnector extends AbstractStreamsConnector {
// ***** Process Connector settings handling *****
/* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl#makeSettingsPage()
+ * @see org.eclipse.tcf.internal.terminal.provisional.api.provider.TerminalConnectorImpl#makeSettingsPage()
*/
@Override
public ISettingsPage makeSettingsPage() {
@@ -220,7 +220,7 @@ public class ProcessConnector extends AbstractStreamsConnector {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl#getSettingsSummary()
+ * @see org.eclipse.tcf.internal.terminal.provisional.api.provider.TerminalConnectorImpl#getSettingsSummary()
*/
@Override
public String getSettingsSummary() {
@@ -228,7 +228,7 @@ public class ProcessConnector extends AbstractStreamsConnector {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl#load(org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore)
+ * @see org.eclipse.tcf.internal.terminal.provisional.api.provider.TerminalConnectorImpl#load(org.eclipse.tcf.internal.terminal.provisional.api.ISettingsStore)
*/
@Override
public void load(ISettingsStore store) {
@@ -236,7 +236,7 @@ public class ProcessConnector extends AbstractStreamsConnector {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl#save(org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore)
+ * @see org.eclipse.tcf.internal.terminal.provisional.api.provider.TerminalConnectorImpl#save(org.eclipse.tcf.internal.terminal.provisional.api.ISettingsStore)
*/
@Override
public void save(ISettingsStore store) {
@@ -244,7 +244,7 @@ public class ProcessConnector extends AbstractStreamsConnector {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl#setTerminalSize(int, int)
+ * @see org.eclipse.tcf.internal.terminal.provisional.api.provider.TerminalConnectorImpl#setTerminalSize(int, int)
*/
@Override
public void setTerminalSize(int newWidth, int newHeight) {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.process/src/org/eclipse/tm/te/ui/terminals/process/ProcessConnectorType.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/src/org/eclipse/tcf/te/ui/terminals/process/ProcessConnectorType.java
index 0a8a64322..e951eba6b 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.process/src/org/eclipse/tm/te/ui/terminals/process/ProcessConnectorType.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/src/org/eclipse/tcf/te/ui/terminals/process/ProcessConnectorType.java
@@ -7,17 +7,17 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.terminals.process;
+package org.eclipse.tcf.te.ui.terminals.process;
import org.eclipse.cdt.utils.pty.PTY;
import org.eclipse.core.runtime.Assert;
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.TerminalConnectorExtension;
-import org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer;
-import org.eclipse.tm.te.runtime.services.interfaces.constants.ITerminalsConnectorConstants;
-import org.eclipse.tm.te.ui.terminals.internal.SettingsStore;
-import org.eclipse.tm.te.ui.terminals.types.AbstractConnectorType;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.runtime.services.interfaces.constants.ITerminalsConnectorConstants;
+import org.eclipse.tcf.te.ui.terminals.internal.SettingsStore;
+import org.eclipse.tcf.te.ui.terminals.types.AbstractConnectorType;
/**
* Streams terminal connector type implementation.
@@ -26,7 +26,7 @@ import org.eclipse.tm.te.ui.terminals.types.AbstractConnectorType;
public class ProcessConnectorType extends AbstractConnectorType {
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.terminals.interfaces.IConnectorType#createTerminalConnector(org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer)
+ * @see org.eclipse.tcf.te.ui.terminals.interfaces.IConnectorType#createTerminalConnector(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer)
*/
@Override
public ITerminalConnector createTerminalConnector(IPropertiesContainer properties) {
@@ -34,7 +34,7 @@ public class ProcessConnectorType extends AbstractConnectorType {
// Check for the terminal connector id
String connectorId = properties.getStringProperty(ITerminalsConnectorConstants.PROP_TERMINAL_CONNECTOR_ID);
- if (connectorId == null) connectorId = "org.eclipse.tm.te.ui.terminals.ProcessConnector"; //$NON-NLS-1$
+ if (connectorId == null) connectorId = "org.eclipse.tcf.te.ui.terminals.ProcessConnector"; //$NON-NLS-1$
// Extract the process properties
String image = properties.getStringProperty(ITerminalsConnectorConstants.PROP_PROCESS_PATH);
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.process/src/org/eclipse/tm/te/ui/terminals/process/ProcessMonitor.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/src/org/eclipse/tcf/te/ui/terminals/process/ProcessMonitor.java
index 98c9d6073..2e3762aaf 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.process/src/org/eclipse/tm/te/ui/terminals/process/ProcessMonitor.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/src/org/eclipse/tcf/te/ui/terminals/process/ProcessMonitor.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.terminals.process;
+package org.eclipse.tcf.te.ui.terminals.process;
import org.eclipse.core.runtime.Assert;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.process/src/org/eclipse/tm/te/ui/terminals/process/ProcessSettings.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/src/org/eclipse/tcf/te/ui/terminals/process/ProcessSettings.java
index 58e25812d..d15635dc7 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.process/src/org/eclipse/tm/te/ui/terminals/process/ProcessSettings.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/src/org/eclipse/tcf/te/ui/terminals/process/ProcessSettings.java
@@ -7,12 +7,12 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.terminals.process;
+package org.eclipse.tcf.te.ui.terminals.process;
import org.eclipse.cdt.utils.pty.PTY;
import org.eclipse.core.runtime.Assert;
import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore;
-import org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
/**
* Process connector settings implementation.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.process/src/org/eclipse/tm/te/ui/terminals/process/ProcessSettingsPage.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/src/org/eclipse/tcf/te/ui/terminals/process/ProcessSettingsPage.java
index af7a4e60b..cb28ff1f3 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.process/src/org/eclipse/tm/te/ui/terminals/process/ProcessSettingsPage.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/src/org/eclipse/tcf/te/ui/terminals/process/ProcessSettingsPage.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.terminals.process;
+package org.eclipse.tcf.te.ui.terminals.process;
import org.eclipse.cdt.utils.pty.PTY;
import org.eclipse.core.runtime.Assert;
@@ -26,8 +26,8 @@ import org.eclipse.swt.widgets.Label;
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.te.ui.swt.SWTControlUtil;
-import org.eclipse.tm.te.ui.terminals.nls.Messages;
+import org.eclipse.tcf.te.ui.swt.SWTControlUtil;
+import org.eclipse.tcf.te.ui.terminals.nls.Messages;
import org.eclipse.ui.PlatformUI;
import org.osgi.framework.Bundle;
@@ -56,7 +56,7 @@ public class ProcessSettingsPage implements ISettingsPage {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.provisional.api.ISettingsPage#createControl(org.eclipse.swt.widgets.Composite)
+ * @see org.eclipse.tcf.internal.terminal.provisional.api.ISettingsPage#createControl(org.eclipse.swt.widgets.Composite)
*/
@Override
public void createControl(Composite parent) {
@@ -155,7 +155,7 @@ public class ProcessSettingsPage implements ISettingsPage {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.provisional.api.ISettingsPage#saveSettings()
+ * @see org.eclipse.tcf.internal.terminal.provisional.api.ISettingsPage#saveSettings()
*/
@Override
public void saveSettings() {
@@ -166,7 +166,7 @@ public class ProcessSettingsPage implements ISettingsPage {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.provisional.api.ISettingsPage#loadSettings()
+ * @see org.eclipse.tcf.internal.terminal.provisional.api.ISettingsPage#loadSettings()
*/
@Override
public void loadSettings() {
@@ -176,7 +176,7 @@ public class ProcessSettingsPage implements ISettingsPage {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.provisional.api.ISettingsPage#validateSettings()
+ * @see org.eclipse.tcf.internal.terminal.provisional.api.ISettingsPage#validateSettings()
*/
@Override
public boolean validateSettings() {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.process/src/org/eclipse/tm/te/ui/terminals/process/activator/UIPlugin.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/src/org/eclipse/tcf/te/ui/terminals/process/activator/UIPlugin.java
index 70b538282..49c126ca8 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.process/src/org/eclipse/tm/te/ui/terminals/process/activator/UIPlugin.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/src/org/eclipse/tcf/te/ui/terminals/process/activator/UIPlugin.java
@@ -1,9 +1,9 @@
-package org.eclipse.tm.te.ui.terminals.process.activator;
+package org.eclipse.tcf.te.ui.terminals.process.activator;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.swt.graphics.Image;
-import org.eclipse.tm.te.runtime.tracing.TraceHandler;
+import org.eclipse.tcf.te.runtime.tracing.TraceHandler;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.process/src/org/eclipse/tm/te/ui/terminals/process/nls/Messages.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/src/org/eclipse/tcf/te/ui/terminals/process/nls/Messages.java
index c7e9346f3..220381438 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.process/src/org/eclipse/tm/te/ui/terminals/process/nls/Messages.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/src/org/eclipse/tcf/te/ui/terminals/process/nls/Messages.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.terminals.process.nls;
+package org.eclipse.tcf.te.ui.terminals.process.nls;
import org.eclipse.osgi.util.NLS;
@@ -17,7 +17,7 @@ import org.eclipse.osgi.util.NLS;
public class Messages extends NLS {
// The plug-in resource bundle name
- private static final String BUNDLE_NAME = "org.eclipse.tm.te.ui.terminals.process.nls.Messages"; //$NON-NLS-1$
+ private static final String BUNDLE_NAME = "org.eclipse.tcf.te.ui.terminals.process.nls.Messages"; //$NON-NLS-1$
/**
* Static constructor.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.process/src/org/eclipse/tm/te/ui/terminals/process/nls/Messages.properties b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/src/org/eclipse/tcf/te/ui/terminals/process/nls/Messages.properties
index c85fe60a6..2b5df32ed 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.process/src/org/eclipse/tm/te/ui/terminals/process/nls/Messages.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.process/src/org/eclipse/tcf/te/ui/terminals/process/nls/Messages.properties
@@ -1,5 +1,5 @@
#
-# org.eclipse.tm.te.ui.terminals.process
+# org.eclipse.tcf.te.ui.terminals.process
# Externalized Strings.
#
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/.classpath b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/.classpath
new file mode 100644
index 000000000..8a8f1668c
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/.options b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/.options
new file mode 100644
index 000000000..910d2e57c
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/.options
@@ -0,0 +1 @@
+org.eclipse.tcf.te.ui.terminals.ssh/debugmode = 0
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/.project b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/.project
new file mode 100644
index 000000000..ee0fb358f
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.tcf.te.ui.terminals.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>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.ssh/.settings/org.eclipse.jdt.core.prefs b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/.settings/org.eclipse.jdt.core.prefs
index 50bec15c9..6094afbd6 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.ssh/.settings/org.eclipse.jdt.core.prefs
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/.settings/org.eclipse.jdt.core.prefs
@@ -2,76 +2,80 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.6
+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.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.autoboxing=warning
org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
org.eclipse.jdt.core.compiler.problem.deadCode=warning
org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+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=ignore
+org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+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.includeNullInfoFromAsserts=disabled
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=enabled
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=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.nonExternalizedStringLiteral=warning
org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=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.redundantSpecificationOfTypeArguments=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
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=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=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.unusedDeclaredThrownExceptionWhenOverriding=enabled
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.unusedObjectAllocation=ignore
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=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.unusedParameterWhenImplementingAbstract=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.ssh/.settings/org.eclipse.jdt.ui.prefs b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/.settings/org.eclipse.jdt.ui.prefs
index 41ee4653e..41ee4653e 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.ssh/.settings/org.eclipse.jdt.ui.prefs
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/.settings/org.eclipse.jdt.ui.prefs
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.ssh/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/META-INF/MANIFEST.MF
index f9ba7c8b0..c562d516a 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.ssh/META-INF/MANIFEST.MF
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/META-INF/MANIFEST.MF
@@ -1,24 +1,22 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.tm.te.ui.terminals.ssh;singleton:=true
+Bundle-SymbolicName: org.eclipse.tcf.te.ui.terminals.ssh;singleton:=true
Bundle-Version: 1.0.0.qualifier
-Bundle-Activator: org.eclipse.tm.te.ui.terminals.ssh.activator.UIPlugin
+Bundle-Activator: org.eclipse.tcf.te.ui.terminals.ssh.activator.UIPlugin
Bundle-Vendor: %provideName
Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
org.eclipse.core.expressions;bundle-version="3.4.300",
org.eclipse.ui;bundle-version="3.7.0",
org.eclipse.ui.forms;bundle-version="3.5.100",
- org.eclipse.tm.te.runtime;bundle-version="1.0.0",
- org.eclipse.tm.te.ui;bundle-version="1.0.0",
- org.eclipse.tm.te.ui.terminals;bundle-version="1.0.0",
- org.eclipse.tm.te.ui.controls;bundle-version="1.0.0",
- org.eclipse.tm.te.ui.swt;bundle-version="1.0.0",
+ org.eclipse.tcf.te.runtime;bundle-version="1.0.0",
+ org.eclipse.tcf.te.ui;bundle-version="1.0.0",
+ org.eclipse.tcf.te.ui.terminals;bundle-version="1.0.0",
+ org.eclipse.tcf.te.ui.controls;bundle-version="1.0.0",
+ org.eclipse.tcf.te.ui.swt;bundle-version="1.0.0",
org.eclipse.tm.terminal.ssh;bundle-version="2.1.0",
org.eclipse.tm.terminal;bundle-version="3.1.1",
- org.eclipse.tm.te.runtime.services;bundle-version="1.0.0",
- org.eclipse.tm.te.tcf.locator;bundle-version="1.0.0",
- org.eclipse.tm.tcf.core;bundle-version="0.5.0",
+ org.eclipse.tcf.te.runtime.services;bundle-version="1.0.0",
org.eclipse.equinox.security;bundle-version="1.1.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/build.properties b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/build.properties
new file mode 100644
index 000000000..73a5119ed
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/build.properties
@@ -0,0 +1,6 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.properties,\
+ plugin.xml
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.ssh/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/plugin.properties
index 2e56601e8..2e56601e8 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.ssh/plugin.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/plugin.properties
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/plugin.xml b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/plugin.xml
new file mode 100644
index 000000000..7915221a6
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/plugin.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+
+<!-- Terminal connector type contributions -->
+ <extension point="org.eclipse.tcf.te.ui.terminals.connectorTypes">
+ <connectorType
+ class="org.eclipse.tcf.te.ui.terminals.ssh.types.SshConnectorType"
+ id="org.eclipse.tcf.te.ui.terminals.type.ssh"
+ label="%SshConnectorType.label">
+ </connectorType>
+ </extension>
+
+<!-- Terminals launcher delegate contributions -->
+ <extension point="org.eclipse.tcf.te.ui.terminals.launcherDelegates">
+ <delegate
+ class="org.eclipse.tcf.te.ui.terminals.ssh.launcher.SshLauncherDelegate"
+ id="org.eclipse.tcf.te.ui.terminals.ssh.launcher.ssh"
+ label="%SshLauncherDelegate.label">
+ <enablement>
+ <with variable="selection">
+ <count value="1"/>
+ <iterate operator="and" ifEmpty="false">
+ <test
+ property="org.eclipse.tcf.te.runtime.services.hasService"
+ value="org.eclipse.tcf.te.runtime.services.interfaces.IPropertiesAccessService"/>
+ </iterate>
+ </with>
+ </enablement>
+ </delegate>
+ </extension>
+</plugin>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/pom.xml b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/pom.xml
new file mode 100644
index 000000000..442a66112
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.tcf</groupId>
+ <artifactId>tcf-parent</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../../../pom.xml</relativePath>
+ </parent>
+
+ <version>1.0.0.qualifier</version>
+ <artifactId>org.eclipse.tcf.te.ui.terminals.ssh</artifactId>
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.ssh/src/org/eclipse/tm/te/ui/terminals/ssh/activator/UIPlugin.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/src/org/eclipse/tcf/te/ui/terminals/ssh/activator/UIPlugin.java
index d74e783c0..e895b44ac 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.ssh/src/org/eclipse/tm/te/ui/terminals/ssh/activator/UIPlugin.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/src/org/eclipse/tcf/te/ui/terminals/ssh/activator/UIPlugin.java
@@ -7,12 +7,12 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.terminals.ssh.activator;
+package org.eclipse.tcf.te.ui.terminals.ssh.activator;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.swt.graphics.Image;
-import org.eclipse.tm.te.runtime.tracing.TraceHandler;
+import org.eclipse.tcf.te.runtime.tracing.TraceHandler;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.ssh/src/org/eclipse/tm/te/ui/terminals/ssh/controls/SshWizardConfigurationPanel.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/src/org/eclipse/tcf/te/ui/terminals/ssh/controls/SshWizardConfigurationPanel.java
index 13cf9439e..edc9c03f4 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.ssh/src/org/eclipse/tm/te/ui/terminals/ssh/controls/SshWizardConfigurationPanel.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/src/org/eclipse/tcf/te/ui/terminals/ssh/controls/SshWizardConfigurationPanel.java
@@ -8,40 +8,33 @@
* Wind River Systems - initial API and implementation
* Max Weninger (Wind River) - [361352] [TERMINALS][SSH] Add SSH terminal support
*******************************************************************************/
-package org.eclipse.tm.te.ui.terminals.ssh.controls;
-
-import java.util.concurrent.atomic.AtomicReference;
+package org.eclipse.tcf.te.ui.terminals.ssh.controls;
import org.eclipse.core.runtime.Assert;
import org.eclipse.equinox.security.storage.ISecurePreferences;
import org.eclipse.equinox.security.storage.SecurePreferencesFactory;
import org.eclipse.equinox.security.storage.StorageException;
import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.TypedEvent;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.runtime.services.interfaces.constants.ITerminalsConnectorConstants;
+import org.eclipse.tcf.te.ui.controls.BaseDialogPageControl;
+import org.eclipse.tcf.te.ui.interfaces.data.IDataExchangeNode;
+import org.eclipse.tcf.te.ui.terminals.panels.AbstractConfigurationPanel;
import org.eclipse.tm.internal.terminal.provisional.api.ISettingsPage;
import org.eclipse.tm.internal.terminal.ssh.SshConnector;
import org.eclipse.tm.internal.terminal.ssh.SshSettings;
-import org.eclipse.tm.tcf.protocol.IPeer;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer;
-import org.eclipse.tm.te.runtime.services.interfaces.constants.ITerminalsConnectorConstants;
-import org.eclipse.tm.te.tcf.locator.interfaces.nodes.IPeerModel;
-import org.eclipse.tm.te.ui.controls.BaseDialogPageControl;
-import org.eclipse.tm.te.ui.terminals.panels.AbstractConfigurationPanel;
-import org.eclipse.tm.te.ui.wizards.interfaces.ISharedDataWizardPage;
import org.eclipse.ui.forms.widgets.FormToolkit;
/**
* SSH wizard configuration panel implementation.
*/
@SuppressWarnings("restriction")
-public class SshWizardConfigurationPanel extends AbstractConfigurationPanel implements ISharedDataWizardPage {
+public class SshWizardConfigurationPanel extends AbstractConfigurationPanel implements IDataExchangeNode {
private SshSettings sshSettings;
private ISettingsPage sshSettingsPage;
@@ -56,7 +49,7 @@ public class SshWizardConfigurationPanel extends AbstractConfigurationPanel impl
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.interfaces.IWizardConfigurationPanel#setupPanel(org.eclipse.swt.widgets.Composite, org.eclipse.ui.forms.widgets.FormToolkit)
+ * @see org.eclipse.tcf.te.ui.controls.interfaces.IWizardConfigurationPanel#setupPanel(org.eclipse.swt.widgets.Composite, org.eclipse.ui.forms.widgets.FormToolkit)
*/
@Override
public void setupPanel(Composite parent, FormToolkit toolkit) {
@@ -67,7 +60,7 @@ public class SshWizardConfigurationPanel extends AbstractConfigurationPanel impl
SshConnector conn = new SshConnector();
sshSettings = (SshSettings) conn.getSshSettings();
- sshSettings.setHost(getHost());
+ sshSettings.setHost(getSelectionHost());
sshSettings.setUser(getDefaultUser());
sshSettingsPage = conn.makeSettingsPage();
sshSettingsPage.createControl(panel);
@@ -76,7 +69,7 @@ public class SshWizardConfigurationPanel extends AbstractConfigurationPanel impl
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.interfaces.IWizardConfigurationPanel#dataChanged(org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer, org.eclipse.swt.events.TypedEvent)
+ * @see org.eclipse.tcf.te.ui.controls.interfaces.IWizardConfigurationPanel#dataChanged(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer, org.eclipse.swt.events.TypedEvent)
*/
@Override
public boolean dataChanged(IPropertiesContainer data, TypedEvent e) {
@@ -84,7 +77,7 @@ public class SshWizardConfigurationPanel extends AbstractConfigurationPanel impl
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.wizards.interfaces.ISharedDataWizardPage#setupData(org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer)
+ * @see org.eclipse.tcf.te.ui.wizards.interfaces.ISharedDataExchangeNode#setupData(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer)
*/
@Override
public void setupData(IPropertiesContainer data) {
@@ -96,48 +89,19 @@ public class SshWizardConfigurationPanel extends AbstractConfigurationPanel impl
* @return The default user name.
*/
private String getDefaultUser(){
- return System.getProperty("user.name");
- }
-
- /**
- * Returns the host name or IP from the current selection.
- *
- * @return The host name or IP.
- */
- private String getHost() {
- ISelection selection = getSelection();
- final AtomicReference<String> result = new AtomicReference<String>();
- if (selection instanceof IStructuredSelection && !selection.isEmpty()) {
- Object element = ((IStructuredSelection) selection).getFirstElement();
- if (element instanceof IPeerModel) {
- final IPeerModel peerModel = (IPeerModel) element;
- if (Protocol.isDispatchThread()) {
- result.set(peerModel.getPeer().getAttributes().get(IPeer.ATTR_IP_HOST));
- }
- else {
- Protocol.invokeAndWait(new Runnable() {
- @Override
- public void run() {
- result.set(peerModel.getPeer().getAttributes().get(IPeer.ATTR_IP_HOST));
- }
- });
- }
- }
- }
-
- return result.get();
+ return System.getProperty("user.name"); //$NON-NLS-1$
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.wizards.interfaces.ISharedDataWizardPage#extractData(org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer)
+ * @see org.eclipse.tcf.te.ui.wizards.interfaces.ISharedDataExchangeNode#extractData(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer)
*/
@Override
public void extractData(IPropertiesContainer data) {
// set the terminal connector id for ssh
- data.setProperty(ITerminalsConnectorConstants.PROP_TERMINAL_CONNECTOR_ID, "org.eclipse.tm.internal.terminal.ssh.SshConnector");
+ data.setProperty(ITerminalsConnectorConstants.PROP_TERMINAL_CONNECTOR_ID, "org.eclipse.tm.internal.terminal.ssh.SshConnector"); //$NON-NLS-1$
// set the connector type for ssh
- data.setProperty(ITerminalsConnectorConstants.PROP_CONNECTOR_TYPE_ID, "org.eclipse.tm.te.ui.terminals.type.ssh");
+ data.setProperty(ITerminalsConnectorConstants.PROP_CONNECTOR_TYPE_ID, "org.eclipse.tcf.te.ui.terminals.type.ssh"); //$NON-NLS-1$
sshSettingsPage.saveSettings();
data.setProperty(ITerminalsConnectorConstants.PROP_IP_HOST,sshSettings.getHost());
@@ -149,62 +113,62 @@ public class SshWizardConfigurationPanel extends AbstractConfigurationPanel impl
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.wizards.interfaces.ISharedDataWizardPage#initializeData(org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer)
- */
- @Override
- public void initializeData(IPropertiesContainer data) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.wizards.interfaces.ISharedDataWizardPage#removeData(org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer)
- */
- @Override
- public void removeData(IPropertiesContainer data) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.interfaces.IWizardConfigurationPanel#doRestoreWidgetValues(org.eclipse.jface.dialogs.IDialogSettings, java.lang.String)
+ * @see org.eclipse.tcf.te.ui.controls.interfaces.IWizardConfigurationPanel#doRestoreWidgetValues(org.eclipse.jface.dialogs.IDialogSettings, java.lang.String)
*/
@Override
public void doRestoreWidgetValues(IDialogSettings settings, String idPrefix) {
- String host = getHost();
- if (settings.get(getSettingsKeyWithPrefix(host, ITerminalsConnectorConstants.PROP_IP_HOST)) != null) {
- sshSettings.setHost(settings.get(getSettingsKeyWithPrefix(host, ITerminalsConnectorConstants.PROP_IP_HOST)));
- }
- if (settings.get(getSettingsKeyWithPrefix(host, ITerminalsConnectorConstants.PROP_IP_PORT)) != null) {
- sshSettings.setPort(settings.get(getSettingsKeyWithPrefix(host, ITerminalsConnectorConstants.PROP_IP_PORT)));
- }
- if (settings.get(getSettingsKeyWithPrefix(host, ITerminalsConnectorConstants.PROP_TIMEOUT)) != null) {
- sshSettings.setTimeout(settings.get(getSettingsKeyWithPrefix(host, ITerminalsConnectorConstants.PROP_TIMEOUT)));
- }
- if (settings.get(getSettingsKeyWithPrefix(host, ITerminalsConnectorConstants.PROP_SSH_KEEP_ALIVE)) != null) {
- sshSettings.setKeepalive(settings.get(getSettingsKeyWithPrefix(host, ITerminalsConnectorConstants.PROP_SSH_KEEP_ALIVE)));
- }
- if (settings.get(getSettingsKeyWithPrefix(host, ITerminalsConnectorConstants.PROP_SSH_USER)) != null) {
- sshSettings.setUser(settings.get(getSettingsKeyWithPrefix(host, ITerminalsConnectorConstants.PROP_SSH_USER)));
+ String host = getSelectionHost();
+ if (host != null) {
+ // is there a section for this host
+ IDialogSettings hostSettings = settings.getSection(host);
+ if (hostSettings != null) {
+ if (hostSettings.get(ITerminalsConnectorConstants.PROP_IP_HOST) != null) {
+ sshSettings.setHost(hostSettings.get(ITerminalsConnectorConstants.PROP_IP_HOST));
+ }
+ if (hostSettings.get(ITerminalsConnectorConstants.PROP_IP_PORT) != null) {
+ sshSettings.setPort(hostSettings.get(ITerminalsConnectorConstants.PROP_IP_PORT));
+ }
+ if (hostSettings.get(ITerminalsConnectorConstants.PROP_TIMEOUT) != null) {
+ sshSettings.setTimeout(hostSettings.get(ITerminalsConnectorConstants.PROP_TIMEOUT));
+ }
+ if (hostSettings.get(ITerminalsConnectorConstants.PROP_SSH_KEEP_ALIVE) != null) {
+ sshSettings.setKeepalive(hostSettings.get(ITerminalsConnectorConstants.PROP_SSH_KEEP_ALIVE));
+ }
+ if (hostSettings.get(ITerminalsConnectorConstants.PROP_SSH_USER) != null) {
+ sshSettings.setUser(hostSettings.get(ITerminalsConnectorConstants.PROP_SSH_USER));
+ }
+ String password = accessSecurePassword(sshSettings.getHost());
+ if (password != null) {
+ sshSettings.setPassword(password);
+ }
+ // set settings in page
+ sshSettingsPage.loadSettings();
+ }
}
- String password = accessSecurePassword(sshSettings.getHost());
- if (password != null) {
- sshSettings.setPassword(password);
+ else {
+ // MWE TODO combo for all hosts
}
- // set settings in page
- sshSettingsPage.loadSettings();
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.interfaces.IWizardConfigurationPanel#doSaveWidgetValues(org.eclipse.jface.dialogs.IDialogSettings, java.lang.String)
+ * @see org.eclipse.tcf.te.ui.controls.interfaces.IWizardConfigurationPanel#doSaveWidgetValues(org.eclipse.jface.dialogs.IDialogSettings, java.lang.String)
*/
@Override
public void doSaveWidgetValues(IDialogSettings settings, String idPrefix) {
// make sure the values are saved
// actually not needed since this is done before in extractData
sshSettingsPage.saveSettings();
- String host = getHost();
- settings.put(getSettingsKeyWithPrefix(host, ITerminalsConnectorConstants.PROP_IP_HOST), sshSettings.getHost());
- settings.put(getSettingsKeyWithPrefix(host, ITerminalsConnectorConstants.PROP_IP_PORT), sshSettings.getPort());
- settings.put(getSettingsKeyWithPrefix(host, ITerminalsConnectorConstants.PROP_TIMEOUT), sshSettings.getTimeout());
- settings.put(getSettingsKeyWithPrefix(host, ITerminalsConnectorConstants.PROP_SSH_KEEP_ALIVE), sshSettings.getKeepalive());
- settings.put(getSettingsKeyWithPrefix(host, ITerminalsConnectorConstants.PROP_SSH_USER), sshSettings.getUser());
+ String host = sshSettings.getHost();
+ IDialogSettings hostSection=settings.getSection(host);
+ if(hostSection==null){
+ hostSection=settings.addNewSection(host);
+ }
+
+ hostSection.put(ITerminalsConnectorConstants.PROP_IP_HOST, sshSettings.getHost());
+ hostSection.put(ITerminalsConnectorConstants.PROP_IP_PORT, sshSettings.getPort());
+ hostSection.put(ITerminalsConnectorConstants.PROP_TIMEOUT, sshSettings.getTimeout());
+ hostSection.put(ITerminalsConnectorConstants.PROP_SSH_KEEP_ALIVE, sshSettings.getKeepalive());
+ hostSection.put(ITerminalsConnectorConstants.PROP_SSH_USER, sshSettings.getUser());
if(sshSettings.getPassword()!=null && sshSettings.getPassword().length()!=0){
saveSecurePassword(host, sshSettings.getPassword());
@@ -212,13 +176,6 @@ public class SshWizardConfigurationPanel extends AbstractConfigurationPanel impl
}
/**
- * Constructs the full settings key.
- */
- private String getSettingsKeyWithPrefix(String host, String value) {
- return host + "." + value;
- }
-
- /**
* Save the password to the secure storage.
*
* @param host The host. Must not be <code>null</code>.
@@ -232,11 +189,11 @@ public class SshWizardConfigurationPanel extends AbstractConfigurationPanel impl
ISecurePreferences preferences = SecurePreferencesFactory.getDefault();
if (preferences != null) {
// Construct the secure preferences node key
- String nodeKey = "/Target Explorer SSH Password/" + host;
+ String nodeKey = "/Target Explorer SSH Password/" + host; //$NON-NLS-1$
ISecurePreferences node = preferences.node(nodeKey);
if (node != null) {
try {
- node.put("password", password, true);
+ node.put("password", password, true); //$NON-NLS-1$
}
catch (StorageException ex) { /* ignored on purpose */ }
}
@@ -256,12 +213,12 @@ public class SshWizardConfigurationPanel extends AbstractConfigurationPanel impl
ISecurePreferences preferences = SecurePreferencesFactory.getDefault();
if (preferences != null) {
// Construct the secure preferences node key
- String nodeKey = "/Target Explorer SSH Password/" + host;
+ String nodeKey = "/Target Explorer SSH Password/" + host; //$NON-NLS-1$
ISecurePreferences node = preferences.node(nodeKey);
if (node != null) {
String password = null;
try {
- password = node.get("password", null);
+ password = node.get("password", null); //$NON-NLS-1$
}
catch (StorageException ex) { /* ignored on purpose */ }
@@ -272,7 +229,7 @@ public class SshWizardConfigurationPanel extends AbstractConfigurationPanel impl
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.panels.AbstractWizardConfigurationPanel#isValid()
+ * @see org.eclipse.tcf.te.ui.controls.panels.AbstractWizardConfigurationPanel#isValid()
*/
@Override
public boolean isValid(){
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.ssh/src/org/eclipse/tm/te/ui/terminals/ssh/launcher/SshLauncherDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/src/org/eclipse/tcf/te/ui/terminals/ssh/launcher/SshLauncherDelegate.java
index 91a533a1f..0281ea235 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.ssh/src/org/eclipse/tm/te/ui/terminals/ssh/launcher/SshLauncherDelegate.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/src/org/eclipse/tcf/te/ui/terminals/ssh/launcher/SshLauncherDelegate.java
@@ -8,22 +8,22 @@
* Wind River Systems - initial API and implementation
* Max Weninger (Wind River) - [361352] [TERMINALS][SSH] Add SSH terminal support
*******************************************************************************/
-package org.eclipse.tm.te.ui.terminals.ssh.launcher;
+package org.eclipse.tcf.te.ui.terminals.ssh.launcher;
import java.text.DateFormat;
import java.util.Date;
import org.eclipse.osgi.util.NLS;
-import org.eclipse.tm.te.runtime.interfaces.callback.ICallback;
-import org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer;
-import org.eclipse.tm.te.runtime.services.ServiceManager;
-import org.eclipse.tm.te.runtime.services.interfaces.ITerminalService;
-import org.eclipse.tm.te.runtime.services.interfaces.constants.ITerminalsConnectorConstants;
-import org.eclipse.tm.te.ui.controls.BaseDialogPageControl;
-import org.eclipse.tm.te.ui.terminals.interfaces.IConfigurationPanel;
-import org.eclipse.tm.te.ui.terminals.launcher.AbstractLauncherDelegate;
-import org.eclipse.tm.te.ui.terminals.ssh.controls.SshWizardConfigurationPanel;
-import org.eclipse.tm.te.ui.terminals.ssh.nls.Messages;
+import org.eclipse.tcf.te.ui.terminals.ssh.controls.SshWizardConfigurationPanel;
+import org.eclipse.tcf.te.ui.terminals.ssh.nls.Messages;
+import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.runtime.services.ServiceManager;
+import org.eclipse.tcf.te.runtime.services.interfaces.ITerminalService;
+import org.eclipse.tcf.te.runtime.services.interfaces.constants.ITerminalsConnectorConstants;
+import org.eclipse.tcf.te.ui.controls.BaseDialogPageControl;
+import org.eclipse.tcf.te.ui.terminals.interfaces.IConfigurationPanel;
+import org.eclipse.tcf.te.ui.terminals.launcher.AbstractLauncherDelegate;
/**
* SSH launcher delegate implementation.
@@ -31,7 +31,7 @@ import org.eclipse.tm.te.ui.terminals.ssh.nls.Messages;
public class SshLauncherDelegate extends AbstractLauncherDelegate {
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.terminals.interfaces.ILauncherDelegate#needsUserConfiguration()
+ * @see org.eclipse.tcf.te.ui.terminals.interfaces.ILauncherDelegate#needsUserConfiguration()
*/
@Override
public boolean needsUserConfiguration() {
@@ -39,7 +39,7 @@ public class SshLauncherDelegate extends AbstractLauncherDelegate {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.terminals.interfaces.ILauncherDelegate#getPanel(org.eclipse.tm.te.ui.controls.BaseDialogPageControl)
+ * @see org.eclipse.tcf.te.ui.terminals.interfaces.ILauncherDelegate#getPanel(org.eclipse.tcf.te.ui.controls.BaseDialogPageControl)
*/
@Override
public IConfigurationPanel getPanel(BaseDialogPageControl parentControl) {
@@ -47,7 +47,7 @@ public class SshLauncherDelegate extends AbstractLauncherDelegate {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.terminals.interfaces.ILauncherDelegate#execute(org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer, org.eclipse.tm.te.runtime.interfaces.callback.ICallback)
+ * @see org.eclipse.tcf.te.ui.terminals.interfaces.ILauncherDelegate#execute(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer, org.eclipse.tcf.te.runtime.interfaces.callback.ICallback)
*/
@Override
public void execute(IPropertiesContainer properties, ICallback callback) {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.ssh/src/org/eclipse/tm/te/ui/terminals/ssh/nls/Messages.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/src/org/eclipse/tcf/te/ui/terminals/ssh/nls/Messages.java
index a68509d00..0a3133d3e 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.ssh/src/org/eclipse/tm/te/ui/terminals/ssh/nls/Messages.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/src/org/eclipse/tcf/te/ui/terminals/ssh/nls/Messages.java
@@ -8,7 +8,7 @@
* Wind River Systems - initial API and implementation
* Max Weninger (Wind River) - [361352] [TERMINALS][SSH] Add SSH terminal support
*******************************************************************************/
-package org.eclipse.tm.te.ui.terminals.ssh.nls;
+package org.eclipse.tcf.te.ui.terminals.ssh.nls;
import org.eclipse.osgi.util.NLS;
@@ -18,7 +18,7 @@ import org.eclipse.osgi.util.NLS;
public class Messages extends NLS {
// The plug-in resource bundle name
- private static final String BUNDLE_NAME = "org.eclipse.tm.te.ui.terminals.ssh.nls.Messages"; //$NON-NLS-1$
+ private static final String BUNDLE_NAME = "org.eclipse.tcf.te.ui.terminals.ssh.nls.Messages"; //$NON-NLS-1$
/**
* Static constructor.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.ssh/src/org/eclipse/tm/te/ui/terminals/ssh/nls/Messages.properties b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/src/org/eclipse/tcf/te/ui/terminals/ssh/nls/Messages.properties
index 32bb3aea9..45515da7e 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.ssh/src/org/eclipse/tm/te/ui/terminals/ssh/nls/Messages.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/src/org/eclipse/tcf/te/ui/terminals/ssh/nls/Messages.properties
@@ -1,5 +1,5 @@
#
-# org.eclipse.tm.te.ui.terminals.ssh
+# org.eclipse.tcf.te.ui.terminals.ssh
# Externalized Strings.
#
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.ssh/src/org/eclipse/tm/te/ui/terminals/ssh/types/SshConnectorType.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/src/org/eclipse/tcf/te/ui/terminals/ssh/types/SshConnectorType.java
index b264b493f..1bf05cefd 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.ssh/src/org/eclipse/tm/te/ui/terminals/ssh/types/SshConnectorType.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/src/org/eclipse/tcf/te/ui/terminals/ssh/types/SshConnectorType.java
@@ -8,17 +8,17 @@
* Wind River Systems - initial API and implementation
* Max Weninger (Wind River) - [361352] [TERMINALS][SSH] Add SSH terminal support
*******************************************************************************/
-package org.eclipse.tm.te.ui.terminals.ssh.types;
+package org.eclipse.tcf.te.ui.terminals.ssh.types;
import org.eclipse.core.runtime.Assert;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.runtime.services.interfaces.constants.ITerminalsConnectorConstants;
+import org.eclipse.tcf.te.ui.terminals.internal.SettingsStore;
+import org.eclipse.tcf.te.ui.terminals.types.AbstractConnectorType;
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.TerminalConnectorExtension;
import org.eclipse.tm.internal.terminal.ssh.SshSettings;
-import org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer;
-import org.eclipse.tm.te.runtime.services.interfaces.constants.ITerminalsConnectorConstants;
-import org.eclipse.tm.te.ui.terminals.internal.SettingsStore;
-import org.eclipse.tm.te.ui.terminals.types.AbstractConnectorType;
/**
* Ssh terminal connector type implementation.
@@ -27,7 +27,7 @@ import org.eclipse.tm.te.ui.terminals.types.AbstractConnectorType;
public class SshConnectorType extends AbstractConnectorType {
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.terminals.interfaces.IConnectorType#createTerminalConnector(org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer)
+ * @see org.eclipse.tcf.te.ui.terminals.interfaces.IConnectorType#createTerminalConnector(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer)
*/
@Override
public ITerminalConnector createTerminalConnector(IPropertiesContainer properties) {
@@ -101,7 +101,7 @@ public class SshConnectorType extends AbstractConnectorType {
sshSettings.save(store);
// MWE TODO make sure this is NOT passed outside as this is plain text
- store.put("Password", password);
+ store.put("Password", password); //$NON-NLS-1$
// Construct the terminal connector instance
ITerminalConnector connector = TerminalConnectorExtension.makeTerminalConnector(connectorId);
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/.classpath b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/.classpath
new file mode 100644
index 000000000..8a8f1668c
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/.options b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/.options
new file mode 100644
index 000000000..47f69c8a6
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/.options
@@ -0,0 +1 @@
+org.eclipse.tcf.te.ui.terminals.telnet/debugmode = 0
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.swt/.project b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/.project
index a3cf4312d..05324b1d3 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.swt/.project
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/.project
@@ -1,28 +1,28 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.tm.te.ui.swt</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>
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.tcf.te.ui.terminals.telnet</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/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/.settings/org.eclipse.jdt.core.prefs b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..6094afbd6
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,362 @@
+#Wed Oct 19 12:10:57 CEST 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+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.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.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=enabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=enabled
+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.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=warning
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
+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=warning
+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=enabled
+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.unusedObjectAllocation=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
+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.6
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=0
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=0
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=0
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=0
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=0
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=true
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
+org.eclipse.jdt.core.formatter.comment.line_length=100
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=4
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=4
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=true
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=true
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=true
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=true
+org.eclipse.jdt.core.formatter.lineSplit=100
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=true
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/.settings/org.eclipse.jdt.ui.prefs b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 000000000..41ee4653e
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,4 @@
+#Wed Oct 19 12:10:57 CEST 2011
+eclipse.preferences.version=1
+formatter_profile=_Target Explorer Java STD
+formatter_settings_version=12
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..ff25a7b53
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/META-INF/MANIFEST.MF
@@ -0,0 +1,23 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.tcf.te.ui.terminals.telnet;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipse.tcf.te.ui.terminals.telnet.activator.UIPlugin
+Bundle-Vendor: %provideName
+Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
+ org.eclipse.core.expressions;bundle-version="3.4.300",
+ org.eclipse.ui;bundle-version="3.7.0",
+ org.eclipse.ui.forms;bundle-version="3.5.100",
+ org.eclipse.tcf.te.runtime;bundle-version="1.0.0",
+ org.eclipse.tcf.te.ui;bundle-version="1.0.0",
+ org.eclipse.tcf.te.ui.terminals;bundle-version="1.0.0",
+ org.eclipse.tcf.te.ui.controls;bundle-version="1.0.0",
+ org.eclipse.tcf.te.ui.swt;bundle-version="1.0.0",
+ org.eclipse.tm.terminal;bundle-version="3.1.1",
+ org.eclipse.tcf.te.runtime.services;bundle-version="1.0.0",
+ org.eclipse.equinox.security;bundle-version="1.1.0",
+ org.eclipse.tm.terminal.telnet;bundle-version="2.1.0"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
+Bundle-Localization: plugin
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/build.properties b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/build.properties
new file mode 100644
index 000000000..73a5119ed
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/build.properties
@@ -0,0 +1,6 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.properties,\
+ plugin.xml
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/plugin.properties
new file mode 100644
index 000000000..dc6e817a4
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/plugin.properties
@@ -0,0 +1,20 @@
+##################################################################################
+# Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+# This program and the accompanying materials are made available under the terms
+# of the Eclipse Public License v1.0 which accompanies this distribution, and is
+# available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Wind River Systems - initial API and implementation
+##################################################################################
+
+pluginName = Target Explorer, Telnet Terminals Extensions
+providerName = Eclipse.org
+
+# ----- Terminal Connector Types -----
+
+TelnetConnectorType.label=Telnet Connector Type
+
+# ***** Terminal Launcher Delegates ****
+
+TelnetLauncherDelegate.label=Telnet Terminal \ No newline at end of file
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/plugin.xml b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/plugin.xml
new file mode 100644
index 000000000..a45d16108
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/plugin.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+
+<!-- Terminal connector type contributions -->
+ <extension point="org.eclipse.tcf.te.ui.terminals.connectorTypes">
+ <connectorType
+ class="org.eclipse.tcf.te.ui.terminals.telnet.types.TelnetConnectorType"
+ id="org.eclipse.tcf.te.ui.terminals.type.telnet"
+ label="%TelnetConnectorType.label">
+ </connectorType>
+ </extension>
+
+<!-- Terminals launcher delegate contributions -->
+ <extension point="org.eclipse.tcf.te.ui.terminals.launcherDelegates">
+ <delegate
+ class="org.eclipse.tcf.te.ui.terminals.telnet.launcher.TelnetLauncherDelegate"
+ id="org.eclipse.tcf.te.ui.terminals.telnet.launcher.telnet"
+ label="%TelnetLauncherDelegate.label">
+ <enablement>
+ <with variable="selection">
+ <count value="1"/>
+ <iterate operator="and" ifEmpty="false">
+ <test
+ property="org.eclipse.tcf.te.runtime.services.hasService"
+ value="org.eclipse.tcf.te.runtime.services.interfaces.IPropertiesAccessService"/>
+ </iterate>
+ </with>
+ </enablement>
+ </delegate>
+ </extension>
+</plugin>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.process/pom.xml b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/pom.xml
index 13b26f7c7..fb21ee631 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.process/pom.xml
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/pom.xml
@@ -7,11 +7,11 @@
<parent>
<groupId>org.eclipse.tcf</groupId>
<artifactId>tcf-parent</artifactId>
- <version>0.5.0-SNAPSHOT</version>
+ <version>1.0.0-SNAPSHOT</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<version>1.0.0.qualifier</version>
- <artifactId>org.eclipse.tm.te.ui.terminals.process</artifactId>
+ <artifactId>org.eclipse.tcf.te.ui.terminals.telnet</artifactId>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/src/org/eclipse/tcf/te/ui/terminals/telnet/activator/UIPlugin.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/src/org/eclipse/tcf/te/ui/terminals/telnet/activator/UIPlugin.java
new file mode 100644
index 000000000..e062d0bf1
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/src/org/eclipse/tcf/te/ui/terminals/telnet/activator/UIPlugin.java
@@ -0,0 +1,112 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ * Max Weninger (Wind River) - [366374] [TERMINALS][TELNET] Add Telnet terminal support
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.terminals.telnet.activator;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.ImageRegistry;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.tcf.te.runtime.tracing.TraceHandler;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class UIPlugin extends AbstractUIPlugin {
+ // The shared instance
+ private static UIPlugin plugin;
+ // The trace handler instance
+ private static TraceHandler traceHandler;
+
+ /**
+ * The constructor
+ */
+ public UIPlugin() {
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static UIPlugin getDefault() {
+ return plugin;
+ }
+
+ /**
+ * Convenience method which returns the unique identifier of this plugin.
+ */
+ public static String getUniqueIdentifier() {
+ if (getDefault() != null && getDefault().getBundle() != null) {
+ return getDefault().getBundle().getSymbolicName();
+ }
+ return null;
+ }
+
+ /**
+ * Returns the bundles trace handler.
+ *
+ * @return The bundles trace handler.
+ */
+ public static TraceHandler getTraceHandler() {
+ if (traceHandler == null) {
+ traceHandler = new TraceHandler(getUniqueIdentifier());
+ }
+ return traceHandler;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#initializeImageRegistry(org.eclipse.jface.resource.ImageRegistry)
+ */
+ @Override
+ protected void initializeImageRegistry(ImageRegistry registry) {
+ }
+
+ /**
+ * Loads the image registered under the specified key from the image
+ * registry and returns the <code>Image</code> object instance.
+ *
+ * @param key The key the image is registered with.
+ * @return The <code>Image</code> object instance or <code>null</code>.
+ */
+ public static Image getImage(String key) {
+ return getDefault().getImageRegistry().get(key);
+ }
+
+ /**
+ * Loads the image registered under the specified key from the image
+ * registry and returns the <code>ImageDescriptor</code> object instance.
+ *
+ * @param key The key the image is registered with.
+ * @return The <code>ImageDescriptor</code> object instance or <code>null</code>.
+ */
+ public static ImageDescriptor getImageDescriptor(String key) {
+ return getDefault().getImageRegistry().getDescriptor(key);
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/src/org/eclipse/tcf/te/ui/terminals/telnet/controls/TelnetWizardConfigurationPanel.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/src/org/eclipse/tcf/te/ui/terminals/telnet/controls/TelnetWizardConfigurationPanel.java
new file mode 100644
index 000000000..858e522a4
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/src/org/eclipse/tcf/te/ui/terminals/telnet/controls/TelnetWizardConfigurationPanel.java
@@ -0,0 +1,156 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ * Max Weninger (Wind River) - [366374] [TERMINALS][TELNET] Add Telnet terminal support
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.terminals.telnet.controls;
+
+import org.eclipse.jface.dialogs.IDialogSettings;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.TypedEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.runtime.services.interfaces.constants.ITerminalsConnectorConstants;
+import org.eclipse.tcf.te.ui.controls.BaseDialogPageControl;
+import org.eclipse.tcf.te.ui.interfaces.data.IDataExchangeNode;
+import org.eclipse.tcf.te.ui.terminals.panels.AbstractConfigurationPanel;
+import org.eclipse.tm.internal.terminal.provisional.api.ISettingsPage;
+import org.eclipse.tm.internal.terminal.telnet.NetworkPortMap;
+import org.eclipse.tm.internal.terminal.telnet.TelnetConnector;
+import org.eclipse.tm.internal.terminal.telnet.TelnetSettings;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+
+/**
+ * telnet wizard configuration panel implementation.
+ */
+@SuppressWarnings("restriction")
+public class TelnetWizardConfigurationPanel extends AbstractConfigurationPanel implements IDataExchangeNode {
+
+ private TelnetSettings telnetSettings;
+ private ISettingsPage telnetSettingsPage;
+
+ /**
+ * Constructor.
+ *
+ * @param parentControl The parent control. Must not be <code>null</code>!
+ */
+ public TelnetWizardConfigurationPanel(BaseDialogPageControl parentControl) {
+ super(parentControl);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.controls.interfaces.IWizardConfigurationPanel#setupPanel(org.eclipse.swt.widgets.Composite, org.eclipse.ui.forms.widgets.FormToolkit)
+ */
+ @Override
+ public void setupPanel(Composite parent, FormToolkit toolkit) {
+ Composite panel = new Composite(parent, SWT.NONE);
+ panel.setLayout(new GridLayout());
+ GridData data = new GridData(SWT.FILL, SWT.FILL, true, true);
+ panel.setLayoutData(data);
+
+ TelnetConnector conn = new TelnetConnector();
+ telnetSettings = (TelnetSettings) conn.getTelnetSettings();
+ telnetSettings.setHost(getSelectionHost());
+ // MWE otherwise we don't get a valid default selection of the combo
+ telnetSettings.setNetworkPort(NetworkPortMap.PROP_VALUETELNET);
+ telnetSettingsPage = conn.makeSettingsPage();
+ telnetSettingsPage.createControl(panel);
+
+ setControl(panel);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.controls.interfaces.IWizardConfigurationPanel#dataChanged(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer, org.eclipse.swt.events.TypedEvent)
+ */
+ @Override
+ public boolean dataChanged(IPropertiesContainer data, TypedEvent e) {
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.wizards.interfaces.ISharedDataExchangeNode#setupData(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer)
+ */
+ @Override
+ public void setupData(IPropertiesContainer data) {
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.wizards.interfaces.ISharedDataExchangeNode#extractData(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer)
+ */
+ @Override
+ public void extractData(IPropertiesContainer data) {
+ // set the terminal connector id for ssh
+ data.setProperty(ITerminalsConnectorConstants.PROP_TERMINAL_CONNECTOR_ID, "org.eclipse.tm.internal.terminal.telnet.TelnetConnector"); //$NON-NLS-1$
+
+ // set the connector type for ssh
+ data.setProperty(ITerminalsConnectorConstants.PROP_CONNECTOR_TYPE_ID, "org.eclipse.tcf.te.ui.terminals.type.telnet"); //$NON-NLS-1$
+
+ telnetSettingsPage.saveSettings();
+ data.setProperty(ITerminalsConnectorConstants.PROP_IP_HOST,telnetSettings.getHost());
+ data.setProperty(ITerminalsConnectorConstants.PROP_IP_PORT, telnetSettings.getNetworkPort());
+ data.setProperty(ITerminalsConnectorConstants.PROP_TIMEOUT, telnetSettings.getTimeout());
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.controls.interfaces.IWizardConfigurationPanel#doRestoreWidgetValues(org.eclipse.jface.dialogs.IDialogSettings, java.lang.String)
+ */
+ @Override
+ public void doRestoreWidgetValues(IDialogSettings settings, String idPrefix) {
+ String host = getSelectionHost();
+ if (host != null) {
+ // is there a section for this host
+ IDialogSettings hostSettings = settings.getSection(host);
+ if (hostSettings != null) {
+ if (hostSettings.get(ITerminalsConnectorConstants.PROP_IP_HOST) != null) {
+ telnetSettings.setHost(hostSettings.get(ITerminalsConnectorConstants.PROP_IP_HOST));
+ }
+ if (hostSettings.get(ITerminalsConnectorConstants.PROP_IP_PORT) != null) {
+ telnetSettings.setNetworkPort(hostSettings.get(ITerminalsConnectorConstants.PROP_IP_PORT));
+ }
+ if (hostSettings.get(ITerminalsConnectorConstants.PROP_TIMEOUT) != null) {
+ telnetSettings.setTimeout(hostSettings.get(ITerminalsConnectorConstants.PROP_TIMEOUT));
+ }
+
+ // set settings in page
+ telnetSettingsPage.loadSettings();
+ }
+ }
+ else {
+ // MWE TODO combo for all hosts
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.controls.interfaces.IWizardConfigurationPanel#doSaveWidgetValues(org.eclipse.jface.dialogs.IDialogSettings, java.lang.String)
+ */
+ @Override
+ public void doSaveWidgetValues(IDialogSettings settings, String idPrefix) {
+ // make sure the values are saved
+ // actually not needed since this is done before in extractData
+ telnetSettingsPage.saveSettings();
+
+ String host = telnetSettings.getHost();
+ IDialogSettings hostSection = settings.getSection(host);
+ if (hostSection == null) {
+ hostSection = settings.addNewSection(host);
+ }
+ hostSection.put(ITerminalsConnectorConstants.PROP_IP_HOST, telnetSettings.getHost());
+ hostSection.put(ITerminalsConnectorConstants.PROP_IP_PORT, telnetSettings.getNetworkPort());
+ hostSection.put(ITerminalsConnectorConstants.PROP_TIMEOUT, telnetSettings.getTimeout());
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.controls.panels.AbstractWizardConfigurationPanel#isValid()
+ */
+ @Override
+ public boolean isValid(){
+ return telnetSettingsPage.validateSettings();
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/src/org/eclipse/tcf/te/ui/terminals/telnet/launcher/TelnetLauncherDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/src/org/eclipse/tcf/te/ui/terminals/telnet/launcher/TelnetLauncherDelegate.java
new file mode 100644
index 000000000..a3373f3e5
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/src/org/eclipse/tcf/te/ui/terminals/telnet/launcher/TelnetLauncherDelegate.java
@@ -0,0 +1,85 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ * Max Weninger (Wind River) - [366374] [TERMINALS][TELNET] Add Telnet terminal support
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.terminals.telnet.launcher;
+
+import java.text.DateFormat;
+import java.util.Date;
+
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.runtime.services.ServiceManager;
+import org.eclipse.tcf.te.runtime.services.interfaces.ITerminalService;
+import org.eclipse.tcf.te.runtime.services.interfaces.constants.ITerminalsConnectorConstants;
+import org.eclipse.tcf.te.ui.controls.BaseDialogPageControl;
+import org.eclipse.tcf.te.ui.terminals.interfaces.IConfigurationPanel;
+import org.eclipse.tcf.te.ui.terminals.launcher.AbstractLauncherDelegate;
+import org.eclipse.tcf.te.ui.terminals.telnet.controls.TelnetWizardConfigurationPanel;
+import org.eclipse.tcf.te.ui.terminals.telnet.nls.Messages;
+
+/**
+ * SSH launcher delegate implementation.
+ */
+public class TelnetLauncherDelegate extends AbstractLauncherDelegate {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.terminals.interfaces.ILauncherDelegate#needsUserConfiguration()
+ */
+ @Override
+ public boolean needsUserConfiguration() {
+ return true;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.terminals.interfaces.ILauncherDelegate#getPanel(org.eclipse.tcf.te.ui.controls.BaseDialogPageControl)
+ */
+ @Override
+ public IConfigurationPanel getPanel(BaseDialogPageControl parentControl) {
+ return new TelnetWizardConfigurationPanel(parentControl);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.terminals.interfaces.ILauncherDelegate#execute(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer, org.eclipse.tcf.te.runtime.interfaces.callback.ICallback)
+ */
+ @Override
+ public void execute(IPropertiesContainer properties, ICallback callback) {
+ // Set the terminal tab title
+ String terminalTitle = getTerminalTitle(properties);
+ if (terminalTitle != null) {
+ properties.setProperty(ITerminalsConnectorConstants.PROP_TITLE, terminalTitle);
+ }
+
+ // Get the terminal service
+ ITerminalService terminal = ServiceManager.getInstance().getService(ITerminalService.class);
+ // If not available, we cannot fulfill this request
+ if (terminal != null) {
+ terminal.openConsole(properties, callback);
+ }
+ }
+
+ /**
+ * Returns the terminal title string.
+ * <p>
+ * The default implementation constructs a title like &quot;SSH @ host (Start time) &quot;.
+ *
+ * @return The terminal title string or <code>null</code>.
+ */
+ private String getTerminalTitle(IPropertiesContainer properties) {
+ String host = properties.getStringProperty(ITerminalsConnectorConstants.PROP_IP_HOST);
+
+ if (host != null) {
+ DateFormat format = DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.LONG);
+ String date = format.format(new Date(System.currentTimeMillis()));
+ return NLS.bind(Messages.TelnetLauncherDelegate_terminalTitle, new String[]{host, date});
+ }
+ return Messages.TelnetLauncherDelegate_terminalTitle_default;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/src/org/eclipse/tcf/te/ui/terminals/telnet/nls/Messages.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/src/org/eclipse/tcf/te/ui/terminals/telnet/nls/Messages.java
new file mode 100644
index 000000000..b1f817b86
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/src/org/eclipse/tcf/te/ui/terminals/telnet/nls/Messages.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ * Max Weninger (Wind River) - [366374] [TERMINALS][TELNET] Add Telnet terminal support
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.terminals.telnet.nls;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * Target Explorer TCF terminals extensions UI plug-in externalized strings management.
+ */
+public class Messages extends NLS {
+
+ // The plug-in resource bundle name
+ private static final String BUNDLE_NAME = "org.eclipse.tcf.te.ui.terminals.telnet.nls.Messages"; //$NON-NLS-1$
+
+ /**
+ * Static constructor.
+ */
+ static {
+ // Load message values from bundle file
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ // **** Declare externalized string id's down here *****
+
+ public static String TelnetLauncherDelegate_terminalTitle;
+ public static String TelnetLauncherDelegate_terminalTitle_default;
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/src/org/eclipse/tcf/te/ui/terminals/telnet/nls/Messages.properties b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/src/org/eclipse/tcf/te/ui/terminals/telnet/nls/Messages.properties
new file mode 100644
index 000000000..31357b701
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/src/org/eclipse/tcf/te/ui/terminals/telnet/nls/Messages.properties
@@ -0,0 +1,7 @@
+#
+# org.eclipse.tcf.te.ui.terminals.telnet
+# Externalized Strings.
+#
+
+TelnetLauncherDelegate_terminalTitle=Telnet {0} ({1})
+TelnetLauncherDelegate_terminalTitle_default=Telnet Terminal
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/src/org/eclipse/tcf/te/ui/terminals/telnet/types/TelnetConnectorType.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/src/org/eclipse/tcf/te/ui/terminals/telnet/types/TelnetConnectorType.java
new file mode 100644
index 000000000..b27d98392
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/src/org/eclipse/tcf/te/ui/terminals/telnet/types/TelnetConnectorType.java
@@ -0,0 +1,103 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ * Max Weninger (Wind River) - [366374] [TERMINALS][TELNET] Add Telnet terminal support
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.terminals.telnet.types;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.runtime.services.interfaces.constants.ITerminalsConnectorConstants;
+import org.eclipse.tcf.te.ui.terminals.internal.SettingsStore;
+import org.eclipse.tcf.te.ui.terminals.types.AbstractConnectorType;
+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.TerminalConnectorExtension;
+import org.eclipse.tm.internal.terminal.telnet.TelnetSettings;
+
+/**
+ * Telnet terminal connector type implementation.
+ */
+@SuppressWarnings("restriction")
+public class TelnetConnectorType extends AbstractConnectorType {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.terminals.interfaces.IConnectorType#createTerminalConnector(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer)
+ */
+ @Override
+ public ITerminalConnector createTerminalConnector(IPropertiesContainer properties) {
+ Assert.isNotNull(properties);
+
+ // Check for the terminal connector id
+ String connectorId = properties.getStringProperty(ITerminalsConnectorConstants.PROP_TERMINAL_CONNECTOR_ID);
+
+ // Extract the telnet properties
+ String host = properties.getStringProperty(ITerminalsConnectorConstants.PROP_IP_HOST);
+ String port = properties.getStringProperty(ITerminalsConnectorConstants.PROP_IP_PORT);
+ String timeout = properties.getStringProperty(ITerminalsConnectorConstants.PROP_TIMEOUT);
+
+ int portOffset = 0;
+ if (properties.getProperty(ITerminalsConnectorConstants.PROP_IP_PORT_OFFSET) != null) {
+ portOffset = properties.getIntProperty(ITerminalsConnectorConstants.PROP_IP_PORT_OFFSET);
+ if (portOffset < 0) portOffset = 0;
+ }
+
+ return host != null && port != null ? createTelnetConnector(connectorId, new String[] { host, port, timeout }, portOffset) : null;
+ }
+
+ /**
+ * Creates a terminal connector object based on the given telnet server attributes.
+ * <p>
+ * The telnet server attributes must contain at least 2 elements:
+ * <ul>
+ * <li>attributes[0] --> telnet server host name</li>
+ * <li>attributes[1] --> telnet port</li>
+ * <li>attributes[2] --> timeout (optional)</li>
+ * </ul>
+ *
+ * @param connectorId The terminal connector id or <code>null</code>.
+ * @param attributes The telnet server attributes. Must not be <code>null</code> and must have at least two elements.
+ * @param portOffset Offset to add to the port.
+ *
+ * @return The terminal connector object instance or <code>null</code>.
+ */
+ protected ITerminalConnector createTelnetConnector(String connectorId, String[] attributes, int portOffset) {
+ Assert.isNotNull(attributes);
+ Assert.isTrue(attributes.length >= 2);
+
+ if (connectorId == null) connectorId = "org.eclipse.tm.internal.terminal.telnet.TelnetConnector"; //$NON-NLS-1$
+
+ final String serverName = attributes[0];
+ final String serverPort = Integer.toString(Integer.decode(attributes[1]).intValue() + portOffset);
+ final String timeout = attributes.length >= 3 ? attributes[2] : null;
+
+ // Construct the terminal settings store
+ ISettingsStore store = new SettingsStore();
+
+ // Construct the telnet settings
+ TelnetSettings telnetSettings = new TelnetSettings();
+ telnetSettings.setHost(serverName);
+ telnetSettings.setNetworkPort(serverPort);
+ if (timeout != null) {
+ telnetSettings.setTimeout(timeout);
+ }
+ // And save the settings to the store
+ telnetSettings.save(store);
+
+ // Construct the terminal connector instance
+ ITerminalConnector connector = TerminalConnectorExtension.makeTerminalConnector(connectorId);
+ if (connector != null) {
+ // Apply default settings
+ connector.makeSettingsPage();
+ // And load the real settings
+ connector.load(store);
+ }
+
+ return connector;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/.classpath b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/.classpath
new file mode 100644
index 000000000..8a8f1668c
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/.options b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/.options
new file mode 100644
index 000000000..011f13645
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/.options
@@ -0,0 +1,2 @@
+org.eclipse.tcf.te.ui.terminals/debugmode = 0
+org.eclipse.tcf.te.ui.terminals/trace/outputStreamMonitor = false
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/.project b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/.project
new file mode 100644
index 000000000..020be02e5
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.tcf.te.ui.terminals</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/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/.settings/org.eclipse.jdt.core.prefs b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/.settings/org.eclipse.jdt.core.prefs
index e18689090..e18689090 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/.settings/org.eclipse.jdt.core.prefs
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/.settings/org.eclipse.jdt.core.prefs
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/.settings/org.eclipse.jdt.ui.prefs b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/.settings/org.eclipse.jdt.ui.prefs
index ec52ff1b4..ec52ff1b4 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/.settings/org.eclipse.jdt.ui.prefs
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/.settings/org.eclipse.jdt.ui.prefs
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..ad63e8e01
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/META-INF/MANIFEST.MF
@@ -0,0 +1,42 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.tcf.te.ui.terminals;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipse.tcf.te.ui.terminals.activator.UIPlugin
+Bundle-Vendor: %providerName
+Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
+ org.eclipse.core.expressions;bundle-version="3.4.300",
+ org.eclipse.core.resources;bundle-version="3.7.100";resolution:=optional,
+ org.eclipse.ui;bundle-version="3.7.0",
+ org.eclipse.ui.ide;bundle-version="3.7.0",
+ org.eclipse.ui.forms;bundle-version="3.5.100",
+ org.eclipse.tm.terminal;bundle-version="3.1.1",
+ org.eclipse.tm.terminal.telnet;bundle-version="2.1.0",
+ org.eclipse.tm.terminal.view;bundle-version="2.2.0",
+ org.eclipse.tcf.te.runtime;bundle-version="1.0.0",
+ org.eclipse.tcf.te.runtime.services;bundle-version="1.0.0",
+ org.eclipse.tcf.te.ui;bundle-version="1.0.0",
+ org.eclipse.tcf.te.ui.controls;bundle-version="1.0.0",
+ org.eclipse.tcf.te.ui.swt;bundle-version="1.0.0"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
+Bundle-Localization: plugin
+Export-Package: org.eclipse.tcf.te.ui.terminals.actions,
+ org.eclipse.tcf.te.ui.terminals.activator;x-internal:=true,
+ org.eclipse.tcf.te.ui.terminals.events,
+ org.eclipse.tcf.te.ui.terminals.help,
+ org.eclipse.tcf.te.ui.terminals.interfaces,
+ org.eclipse.tcf.te.ui.terminals.interfaces.tracing;x-internal:=true,
+ org.eclipse.tcf.te.ui.terminals.internal;x-internal:=true,
+ org.eclipse.tcf.te.ui.terminals.internal.dialogs;x-internal:=true,
+ org.eclipse.tcf.te.ui.terminals.internal.handler;x-internal:=true,
+ org.eclipse.tcf.te.ui.terminals.launcher,
+ org.eclipse.tcf.te.ui.terminals.manager,
+ org.eclipse.tcf.te.ui.terminals.nls;x-internal:=true,
+ org.eclipse.tcf.te.ui.terminals.panels,
+ org.eclipse.tcf.te.ui.terminals.services,
+ org.eclipse.tcf.te.ui.terminals.streams,
+ org.eclipse.tcf.te.ui.terminals.tabs,
+ org.eclipse.tcf.te.ui.terminals.types,
+ org.eclipse.tcf.te.ui.terminals.view
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/build.properties b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/build.properties
new file mode 100644
index 000000000..73a5119ed
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/build.properties
@@ -0,0 +1,6 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.properties,\
+ plugin.xml
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/plugin.properties
index 7b6f0d298..d0efa34aa 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/plugin.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/plugin.properties
@@ -21,7 +21,6 @@ TerminalConnector.streams=Streams Connector (hidden)
# ----- Terminal Connector Types -----
-TelnetConnectorType.label=Telnet Connector Type
StreamsConnectorType.label=Streams Connector Type
# ----- Commands and Menu contributions -----
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/plugin.xml b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/plugin.xml
index e65105631..598a6b848 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/plugin.xml
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/plugin.xml
@@ -9,10 +9,11 @@
<!-- View contributions -->
<extension point="org.eclipse.ui.views">
<view
- category="org.eclipse.tm.te.ui.views.category"
- class="org.eclipse.tm.te.ui.terminals.view.TerminalsView"
+ allowMultiple="true"
+ category="org.eclipse.tcf.te.ui.views.category"
+ class="org.eclipse.tcf.te.ui.terminals.view.TerminalsView"
icon="platform:/plugin/org.eclipse.ui.console/icons/full/eview16/console_view.gif"
- id="org.eclipse.tm.te.ui.terminals.TerminalsView"
+ id="org.eclipse.tcf.te.ui.terminals.TerminalsView"
name="%TerminalsView.name">
</view>
</extension>
@@ -21,7 +22,7 @@
<extension point="org.eclipse.ui.perspectiveExtensions">
<perspectiveExtension targetID="*">
<view
- id="org.eclipse.tm.te.ui.terminals.TerminalsView"
+ id="org.eclipse.tcf.te.ui.terminals.TerminalsView"
minimized="false"
relationship="stack"
relative="org.eclipse.ui.views.TaskList"
@@ -29,9 +30,9 @@
</view>
</perspectiveExtension>
- <perspectiveExtension targetID="org.eclipse.tm.te.ui.perspective">
+ <perspectiveExtension targetID="org.eclipse.tcf.te.ui.perspective">
<!-- Register the view shortcuts -->
- <viewShortcut id="org.eclipse.tm.te.ui.terminals.TerminalsView"/>
+ <viewShortcut id="org.eclipse.tcf.te.ui.terminals.TerminalsView"/>
</perspectiveExtension>
</extension>
@@ -39,65 +40,62 @@
<extension point="org.eclipse.tm.terminal.terminalConnectors">
<connector
name="%TerminalConnector.streams"
- id="org.eclipse.tm.te.ui.terminals.StreamsConnector"
+ id="org.eclipse.tcf.te.ui.terminals.StreamsConnector"
hidden="true"
- class="org.eclipse.tm.te.ui.terminals.streams.StreamsConnector"/>
+ class="org.eclipse.tcf.te.ui.terminals.streams.StreamsConnector"/>
</extension>
<!-- Preferences contributions -->
<extension point="org.eclipse.core.runtime.preferences">
- <initializer class="org.eclipse.tm.te.ui.terminals.internal.PreferenceInitializer"/>
+ <initializer class="org.eclipse.tcf.te.ui.terminals.internal.PreferenceInitializer"/>
</extension>
<!-- Eclipse core expressions property tester -->
<extension point="org.eclipse.core.expressions.propertyTesters">
<propertyTester
- class="org.eclipse.tm.te.ui.terminals.internal.PropertyTester"
- id="org.eclipse.tm.te.ui.terminals.PropertyTester"
- namespace="org.eclipse.tm.te.ui.terminals"
+ class="org.eclipse.tcf.te.ui.terminals.internal.PropertyTester"
+ id="org.eclipse.tcf.te.ui.terminals.PropertyTester"
+ namespace="org.eclipse.tcf.te.ui.terminals"
properties="hasApplicableLauncherDelegates"
type="java.lang.Object">
</propertyTester>
</extension>
<!-- Service contributions -->
- <extension point="org.eclipse.tm.te.runtime.services.services">
- <genericServices>
- <service class="org.eclipse.tm.te.ui.terminals.services.TerminalService">
- <serviceType class="org.eclipse.tm.te.runtime.services.interfaces.ITerminalService"/>
- </service>
- </genericServices>
+ <extension point="org.eclipse.tcf.te.runtime.services.services">
+ <service
+ class="org.eclipse.tcf.te.ui.terminals.services.TerminalService"
+ id="org.eclipse.tcf.te.runtime.services.terminal">
+ <serviceType class="org.eclipse.tcf.te.runtime.services.interfaces.ITerminalService"/>
+ </service>
</extension>
<!-- Terminal connector type contributions -->
- <extension point="org.eclipse.tm.te.ui.terminals.connectorTypes">
+ <extension point="org.eclipse.tcf.te.ui.terminals.connectorTypes">
<connectorType
- class="org.eclipse.tm.te.ui.terminals.types.TelnetConnectorType"
- id="org.eclipse.tm.te.ui.terminals.type.telnet"
- label="%TelnetConnectorType.label">
- </connectorType>
-
- <connectorType
- class="org.eclipse.tm.te.ui.terminals.types.StreamsConnectorType"
- id="org.eclipse.tm.te.ui.terminals.type.streams"
+ class="org.eclipse.tcf.te.ui.terminals.types.StreamsConnectorType"
+ id="org.eclipse.tcf.te.ui.terminals.type.streams"
label="%StreamsConnectorType.label">
</connectorType>
</extension>
<!-- Menu contributions -->
<extension point="org.eclipse.ui.menus">
- <menuContribution locationURI="popup:org.eclipse.tm.te.ui.views.TargetExplorer#Popup?after=group.launch">
+ <menuContribution locationURI="popup:org.eclipse.tcf.te.ui.views.TargetExplorer#Popup?after=group.launch">
<command
- commandId="org.eclipse.tm.te.ui.terminals.command.launch"
- helpContextId="org.eclipse.tm.te.ui.terminals.command_Launch"
+ commandId="org.eclipse.tcf.te.ui.terminals.command.launch"
+ helpContextId="org.eclipse.tcf.te.ui.terminals.command_Launch"
icon="platform:/plugin/org.eclipse.ui.console/icons/full/eview16/console_view.gif"
- id="org.eclipse.tm.te.ui.terminals.commands.launch"
+ id="org.eclipse.tcf.te.ui.terminals.commands.launch"
label="%command.launch.label"
style="push"
tooltip="%command.launch.tooltip">
<visibleWhen checkEnabled="false">
<with variable="selection">
- <test property="org.eclipse.tm.te.ui.terminals.hasApplicableLauncherDelegates" value="true"/>
+ <test
+ forcePluginActivation="true"
+ property="org.eclipse.tcf.te.ui.terminals.hasApplicableLauncherDelegates"
+ value="true"/>
</with>
</visibleWhen>
</command>
@@ -107,9 +105,9 @@
<!-- Command contributions -->
<extension point="org.eclipse.ui.commands">
<command
- categoryId="org.eclipse.tm.te.ui.commands.category"
- helpContextId="org.eclipse.tm.te.ui.terminals.command_Launch"
- id="org.eclipse.tm.te.ui.terminals.command.launch"
+ categoryId="org.eclipse.tcf.te.ui.commands.category"
+ helpContextId="org.eclipse.tcf.te.ui.terminals.command_Launch"
+ id="org.eclipse.tcf.te.ui.terminals.command.launch"
name="%command.launch.name">
</command>
</extension>
@@ -117,8 +115,8 @@
<!-- Handler contributions -->
<extension point="org.eclipse.ui.handlers">
<handler
- class="org.eclipse.tm.te.ui.terminals.internal.handler.LaunchTerminalCommandHandler"
- commandId="org.eclipse.tm.te.ui.terminals.command.launch">
+ class="org.eclipse.tcf.te.ui.terminals.internal.handler.LaunchTerminalCommandHandler"
+ commandId="org.eclipse.tcf.te.ui.terminals.command.launch">
</handler>
</extension>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/pom.xml b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/pom.xml
new file mode 100644
index 000000000..162cfe8e5
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.tcf</groupId>
+ <artifactId>tcf-parent</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../../../pom.xml</relativePath>
+ </parent>
+
+ <version>1.0.0.qualifier</version>
+ <artifactId>org.eclipse.tcf.te.ui.terminals</artifactId>
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/schema/connectorTypes.exsd b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/schema/connectorTypes.exsd
index aec58eacf..4f1321c40 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/schema/connectorTypes.exsd
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/schema/connectorTypes.exsd
@@ -1,9 +1,9 @@
<?xml version='1.0' encoding='UTF-8'?>
<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.tm.te.ui.terminals" xmlns="http://www.w3.org/2001/XMLSchema">
+<schema targetNamespace="org.eclipse.tcf.te.ui.terminals" xmlns="http://www.w3.org/2001/XMLSchema">
<annotation>
<appinfo>
- <meta.schema plugin="org.eclipse.tm.te.ui.terminals" id="connectorTypes" name="Terminals Connector Types"/>
+ <meta.schema plugin="org.eclipse.tcf.te.ui.terminals" id="connectorTypes" name="Terminals Connector Types"/>
</appinfo>
<documentation>
This extension point is used to contribute terminals connector types.
@@ -75,12 +75,12 @@
<attribute name="class" type="string">
<annotation>
<documentation>
- The class that implements &lt;code&gt;org.eclipse.tm.te.ui.terminals.interfaces.IConnectorType&lt;/code&gt; or extends &lt;code&gt;org.eclipse.tm.te.ui.terminals.types.AbstractConnectorType&lt;/code&gt;.
+ The class that implements &lt;code&gt;org.eclipse.tcf.te.ui.terminals.interfaces.IConnectorType&lt;/code&gt; or extends &lt;code&gt;org.eclipse.tcf.te.ui.terminals.types.AbstractConnectorType&lt;/code&gt;.
&lt;p&gt;
The terminal connector type implementation class must be specified either by the class attribute or the class child element!
</documentation>
<appinfo>
- <meta.attribute kind="java" basedOn="org.eclipse.tm.te.ui.terminals.types.AbstractConnectorType:org.eclipse.tm.te.ui.terminals.interfaces.IConnectorType"/>
+ <meta.attribute kind="java" basedOn="org.eclipse.tcf.te.ui.terminals.types.AbstractConnectorType:org.eclipse.tcf.te.ui.terminals.interfaces.IConnectorType"/>
</appinfo>
</annotation>
</attribute>
@@ -108,12 +108,12 @@ The terminal connector type implementation class must be specified either by the
<attribute name="class" type="string">
<annotation>
<documentation>
- The class that implements &lt;code&gt;org.eclipse.tm.te.ui.terminals.interfaces.IConnectorType&lt;/code&gt; or extends &lt;code&gt;org.eclipse.tm.te.ui.terminals.types.AbstractConnectorType&lt;/code&gt;.
+ The class that implements &lt;code&gt;org.eclipse.tcf.te.ui.terminals.interfaces.IConnectorType&lt;/code&gt; or extends &lt;code&gt;org.eclipse.tcf.te.ui.terminals.types.AbstractConnectorType&lt;/code&gt;.
&lt;p&gt;
The terminal connector type implementation class must be specified either by the class attribute or the class child element!
</documentation>
<appinfo>
- <meta.attribute kind="java" basedOn="org.eclipse.tm.te.ui.terminals.types.AbstractConnectorType:org.eclipse.tm.te.ui.terminals.interfaces.IConnectorType"/>
+ <meta.attribute kind="java" basedOn="org.eclipse.tcf.te.ui.terminals.types.AbstractConnectorType:org.eclipse.tcf.te.ui.terminals.interfaces.IConnectorType"/>
</appinfo>
</annotation>
</attribute>
@@ -161,10 +161,10 @@ The terminal connector type implementation class must be specified either by the
This is an example of the extension point usage:
&lt;p&gt;
&lt;pre&gt;&lt;code&gt;
- &lt;extension point=&quot;org.eclipse.tm.te.ui.terminals.connectorTypes&quot;&gt;
+ &lt;extension point=&quot;org.eclipse.tcf.te.ui.terminals.connectorTypes&quot;&gt;
&lt;connectorType
- id=&quot;org.eclipse.tm.te.ui.terminals.connector.telnet&quot;
- class=&quot;org.eclipse.tm.te.ui.terminals.internal.TelnetConnectorType&quot;
+ id=&quot;org.eclipse.tcf.te.ui.terminals.connector.telnet&quot;
+ class=&quot;org.eclipse.tcf.te.ui.terminals.internal.TelnetConnectorType&quot;
label=&quot;Telnet Terminal Connector Type&quot;&gt;
&lt;/connectorType&gt;
&lt;/extension&gt;
@@ -177,7 +177,7 @@ The terminal connector type implementation class must be specified either by the
<meta.section type="apiinfo"/>
</appinfo>
<documentation>
- The provider of a connector type must implement &lt;samp&gt;org.eclipse.tm.te.ui.terminals.interfaces.IConnectorType&lt;/samp&gt;.
+ The provider of a connector type must implement &lt;samp&gt;org.eclipse.tcf.te.ui.terminals.interfaces.IConnectorType&lt;/samp&gt;.
</documentation>
</annotation>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/schema/launcherDelegates.exsd b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/schema/launcherDelegates.exsd
index 4d28139e3..ac5814981 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/schema/launcherDelegates.exsd
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/schema/launcherDelegates.exsd
@@ -1,9 +1,9 @@
<?xml version='1.0' encoding='UTF-8'?>
<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.tm.te.ui.terminals" xmlns="http://www.w3.org/2001/XMLSchema">
+<schema targetNamespace="org.eclipse.tcf.te.ui.terminals" xmlns="http://www.w3.org/2001/XMLSchema">
<annotation>
<appinfo>
- <meta.schema plugin="org.eclipse.tm.te.ui.terminals" id="launcherDelegates" name="Terminal Launcher Delegates"/>
+ <meta.schema plugin="org.eclipse.tcf.te.ui.terminals" id="launcherDelegates" name="Terminal Launcher Delegates"/>
</appinfo>
<documentation>
This extension point is used to contribute terminal launcher delegates.
@@ -80,12 +80,12 @@ Terminal launcher delegates contributes terminal settings widget to the &lt;code
<attribute name="class" type="string">
<annotation>
<documentation>
- The class that implements &lt;code&gt;org.eclipse.tm.te.ui.terminals.interfaces.ILauncherDelegate&lt;/code&gt; or extends &lt;code&gt;org.eclipse.tm.te.ui.terminals.launcher.AbstractLauncherDelegate&lt;/code&gt;.
+ The class that implements &lt;code&gt;org.eclipse.tcf.te.ui.terminals.interfaces.ILauncherDelegate&lt;/code&gt; or extends &lt;code&gt;org.eclipse.tcf.te.ui.terminals.launcher.AbstractLauncherDelegate&lt;/code&gt;.
&lt;p&gt;
The terminal launcher delegate implementation class must be specified either by the class attribute or the class child element!
</documentation>
<appinfo>
- <meta.attribute kind="java" basedOn="org.eclipse.tm.te.ui.terminals.launcher.AbstractLauncherDelegate:org.eclipse.tm.te.ui.terminals.interfaces.ILauncherDelegate"/>
+ <meta.attribute kind="java" basedOn="org.eclipse.tcf.te.ui.terminals.launcher.AbstractLauncherDelegate:org.eclipse.tcf.te.ui.terminals.interfaces.ILauncherDelegate"/>
</appinfo>
</annotation>
</attribute>
@@ -113,12 +113,12 @@ The terminal launcher delegate implementation class must be specified either by
<attribute name="class" type="string">
<annotation>
<documentation>
- The class that implements &lt;code&gt;org.eclipse.tm.te.ui.terminals.interfaces.ILauncherDelegate&lt;/code&gt; or extends &lt;code&gt;org.eclipse.tm.te.ui.terminals.launcher.AbstractLauncherDelegate&lt;/code&gt;.
+ The class that implements &lt;code&gt;org.eclipse.tcf.te.ui.terminals.interfaces.ILauncherDelegate&lt;/code&gt; or extends &lt;code&gt;org.eclipse.tcf.te.ui.terminals.launcher.AbstractLauncherDelegate&lt;/code&gt;.
&lt;p&gt;
The terminal launcher delegate implementation class must be specified either by the class attribute or the class child element!
</documentation>
<appinfo>
- <meta.attribute kind="java" basedOn="org.eclipse.tm.te.ui.terminals.launcher.AbstractLauncherDelegate:org.eclipse.tm.te.ui.terminals.interfaces.ILauncherDelegate"/>
+ <meta.attribute kind="java" basedOn="org.eclipse.tcf.te.ui.terminals.launcher.AbstractLauncherDelegate:org.eclipse.tcf.te.ui.terminals.interfaces.ILauncherDelegate"/>
</appinfo>
</annotation>
</attribute>
@@ -166,10 +166,10 @@ The terminal launcher delegate implementation class must be specified either by
This is an example of the extension point usage:
&lt;p&gt;
&lt;pre&gt;&lt;code&gt;
- &lt;extension point=&quot;org.eclipse.tm.te.ui.terminals.launcherDelegates&quot;&gt;
+ &lt;extension point=&quot;org.eclipse.tcf.te.ui.terminals.launcherDelegates&quot;&gt;
&lt;delegate
- id=&quot;org.eclipse.tm.te.ui.terminals.launcher.tcf&quot;
- class=&quot;org.eclipse.tm.te.tcf.terminals.ui.internal.TerminalLauncherDelegate&quot;
+ id=&quot;org.eclipse.tcf.te.ui.terminals.launcher.tcf&quot;
+ class=&quot;org.eclipse.tcf.te.tcf.terminals.ui.internal.TerminalLauncherDelegate&quot;
label=&quot;TCF Terminal&quot;&gt;
&lt;enablement&gt;
...
@@ -185,7 +185,7 @@ The terminal launcher delegate implementation class must be specified either by
<meta.section type="apiinfo"/>
</appinfo>
<documentation>
- The provider of a launcher delegate must implement &lt;samp&gt;org.eclipse.tm.te.ui.terminals.interfaces.ILauncherDelegate&lt;/samp&gt;.
+ The provider of a launcher delegate must implement &lt;samp&gt;org.eclipse.tcf.te.ui.terminals.interfaces.ILauncherDelegate&lt;/samp&gt;.
</documentation>
</annotation>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/actions/AbstractAction.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/actions/AbstractAction.java
index 54d2ecee4..20b92005b 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/actions/AbstractAction.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/actions/AbstractAction.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.terminals.actions;
+package org.eclipse.tcf.te.ui.terminals.actions;
import java.util.Collections;
@@ -21,12 +21,12 @@ import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.custom.CTabItem;
+import org.eclipse.tcf.te.ui.terminals.activator.UIPlugin;
+import org.eclipse.tcf.te.ui.terminals.nls.Messages;
+import org.eclipse.tcf.te.ui.terminals.tabs.TabFolderManager;
+import org.eclipse.tcf.te.ui.terminals.tabs.TabFolderToolbarHandler;
import org.eclipse.tm.internal.terminal.control.ITerminalViewControl;
import org.eclipse.tm.internal.terminal.control.actions.AbstractTerminalAction;
-import org.eclipse.tm.te.ui.terminals.activator.UIPlugin;
-import org.eclipse.tm.te.ui.terminals.nls.Messages;
-import org.eclipse.tm.te.ui.terminals.tabs.TabFolderManager;
-import org.eclipse.tm.te.ui.terminals.tabs.TabFolderToolbarHandler;
import org.eclipse.ui.ISources;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.commands.ICommandService;
@@ -65,7 +65,7 @@ public abstract class AbstractAction extends AbstractTerminalAction {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.control.actions.AbstractTerminalAction#getTarget()
+ * @see org.eclipse.tcf.internal.terminal.control.actions.AbstractTerminalAction#getTarget()
*/
@Override
protected ITerminalViewControl getTarget() {
@@ -73,7 +73,7 @@ public abstract class AbstractAction extends AbstractTerminalAction {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.control.actions.AbstractTerminalAction#run()
+ * @see org.eclipse.tcf.internal.terminal.control.actions.AbstractTerminalAction#run()
*/
@Override
public void run() {
@@ -134,7 +134,7 @@ public abstract class AbstractAction extends AbstractTerminalAction {
protected abstract String getCommandId();
/* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.control.actions.AbstractTerminalAction#updateAction(boolean)
+ * @see org.eclipse.tcf.internal.terminal.control.actions.AbstractTerminalAction#updateAction(boolean)
*/
@Override
public void updateAction(boolean aboutToShow) {
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/actions/PinTerminalAction.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/actions/PinTerminalAction.java
new file mode 100644
index 000000000..477841d83
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/actions/PinTerminalAction.java
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.terminals.actions;
+
+import org.eclipse.jface.action.IAction;
+import org.eclipse.tcf.te.ui.terminals.activator.UIPlugin;
+import org.eclipse.tcf.te.ui.terminals.interfaces.ITerminalsView;
+import org.eclipse.tcf.te.ui.terminals.interfaces.ImageConsts;
+import org.eclipse.tcf.te.ui.terminals.nls.Messages;
+import org.eclipse.tm.internal.terminal.control.actions.AbstractTerminalAction;
+
+/**
+ * Pins the currently visible terminal view.
+ */
+@SuppressWarnings("restriction")
+public class PinTerminalAction extends AbstractTerminalAction {
+
+ private ITerminalsView view = null;
+
+ /**
+ * Constructor.
+ */
+ public PinTerminalAction(ITerminalsView view) {
+ super(null, PinTerminalAction.class.getName(), IAction.AS_CHECK_BOX);
+
+ this.view = view;
+ setupAction(Messages.PinTerminalAction_menu, Messages.PinTerminalAction_toolTip,
+ UIPlugin.getImageDescriptor(ImageConsts.ACTION_PinTerminal_Hover),
+ UIPlugin.getImageDescriptor(ImageConsts.ACTION_PinTerminal_Enabled),
+ UIPlugin.getImageDescriptor(ImageConsts.ACTION_PinTerminal_Disabled), true);
+ setChecked(view.isPinned());
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.action.IAction#run()
+ */
+ @Override
+ public void run() {
+ view.setPinned(isChecked());
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tm.internal.terminal.control.actions.AbstractTerminalAction#updateAction(boolean)
+ */
+ @Override
+ public void updateAction(boolean aboutToShow) {
+ setEnabled(getTarget() != null && aboutToShow);
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/actions/TabScrollLockAction.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/actions/TabScrollLockAction.java
index 73d9fd237..762f1b585 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/actions/TabScrollLockAction.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/actions/TabScrollLockAction.java
@@ -7,14 +7,14 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.terminals.actions;
+package org.eclipse.tcf.te.ui.terminals.actions;
import org.eclipse.jface.action.IAction;
+import org.eclipse.tcf.te.ui.terminals.activator.UIPlugin;
+import org.eclipse.tcf.te.ui.terminals.interfaces.ImageConsts;
import org.eclipse.tm.internal.terminal.actions.ActionMessages;
import org.eclipse.tm.internal.terminal.control.ITerminalViewControl;
import org.eclipse.tm.internal.terminal.control.actions.AbstractTerminalAction;
-import org.eclipse.tm.te.ui.terminals.activator.UIPlugin;
-import org.eclipse.tm.te.ui.terminals.interfaces.ImageConsts;
/**
* Terminal console tab scroll lock action.
@@ -37,7 +37,7 @@ public class TabScrollLockAction extends AbstractTerminalAction {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.control.actions.AbstractTerminalAction#run()
+ * @see org.eclipse.tcf.internal.terminal.control.actions.AbstractTerminalAction#run()
*/
@Override
public void run() {
@@ -49,7 +49,7 @@ public class TabScrollLockAction extends AbstractTerminalAction {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.control.actions.AbstractTerminalAction#updateAction(boolean)
+ * @see org.eclipse.tcf.internal.terminal.control.actions.AbstractTerminalAction#updateAction(boolean)
*/
@Override
public void updateAction(boolean aboutToShow) {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/activator/UIPlugin.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/activator/UIPlugin.java
index f746882b0..6c9e4a4eb 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/activator/UIPlugin.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/activator/UIPlugin.java
@@ -6,8 +6,9 @@
*
* Contributors:
* Wind River Systems - initial API and implementation
+ * Max Weninger (Wind River) - [361363] [TERMINALS] Implement "Pin&Clone" for the "Terminals" view
*******************************************************************************/
-package org.eclipse.tm.te.ui.terminals.activator;
+package org.eclipse.tcf.te.ui.terminals.activator;
import java.net.URL;
@@ -15,9 +16,9 @@ import org.eclipse.core.runtime.Platform;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.swt.graphics.Image;
-import org.eclipse.tm.te.runtime.preferences.ScopedEclipsePreferences;
-import org.eclipse.tm.te.runtime.tracing.TraceHandler;
-import org.eclipse.tm.te.ui.terminals.interfaces.ImageConsts;
+import org.eclipse.tcf.te.runtime.preferences.ScopedEclipsePreferences;
+import org.eclipse.tcf.te.runtime.tracing.TraceHandler;
+import org.eclipse.tcf.te.ui.terminals.interfaces.ImageConsts;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
@@ -28,7 +29,7 @@ import org.osgi.framework.BundleContext;
public class UIPlugin extends AbstractUIPlugin {
// The shared instance
private static UIPlugin plugin;
-
+ // The scoped preferences instance
private static ScopedEclipsePreferences scopedPreferences = null;
// The trace handler instance
private static TraceHandler traceHandler;
@@ -116,6 +117,14 @@ public class UIPlugin extends AbstractUIPlugin {
registry.put(ImageConsts.ACTION_ScrollLock_Enabled, ImageDescriptor.createFromURL(url));
url = bundle.getEntry(ImageConsts.IMAGE_DIR_ROOT + "full/" + ImageConsts.IMAGE_DIR_DLCL + "lock_co.gif"); //$NON-NLS-1$ //$NON-NLS-2$
registry.put(ImageConsts.ACTION_ScrollLock_Disabled, ImageDescriptor.createFromURL(url));
+
+ url = bundle.getEntry(ImageConsts.IMAGE_DIR_ROOT + "full/" + ImageConsts.IMAGE_DIR_CLCL + "pin.gif"); //$NON-NLS-1$ //$NON-NLS-2$
+ registry.put(ImageConsts.ACTION_PinTerminal_Hover, ImageDescriptor.createFromURL(url));
+ url = bundle.getEntry(ImageConsts.IMAGE_DIR_ROOT + "full/" + ImageConsts.IMAGE_DIR_ELCL + "pin.gif"); //$NON-NLS-1$ //$NON-NLS-2$
+ registry.put(ImageConsts.ACTION_PinTerminal_Enabled, ImageDescriptor.createFromURL(url));
+ url = bundle.getEntry(ImageConsts.IMAGE_DIR_ROOT + "full/" + ImageConsts.IMAGE_DIR_DLCL + "pin.gif"); //$NON-NLS-1$ //$NON-NLS-2$
+ registry.put(ImageConsts.ACTION_PinTerminal_Disabled, ImageDescriptor.createFromURL(url));
+
}
}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/events/SelectionChangedBroadcastEvent.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/events/SelectionChangedBroadcastEvent.java
index 1eb267f5d..037952335 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/events/SelectionChangedBroadcastEvent.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/events/SelectionChangedBroadcastEvent.java
@@ -7,13 +7,13 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.terminals.events;
+package org.eclipse.tcf.te.ui.terminals.events;
import java.util.EventObject;
import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.tm.te.runtime.events.EventManager;
-import org.eclipse.tm.te.ui.terminals.tabs.TabFolderManager;
+import org.eclipse.tcf.te.ui.terminals.tabs.TabFolderManager;
+import org.eclipse.tcf.te.runtime.events.EventManager;
/**
* Terminal console selection changed broadcast event. The event is typically fired
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/help/IContextHelpIds.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/help/IContextHelpIds.java
index c5aa435ad..ce492cc31 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/help/IContextHelpIds.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/help/IContextHelpIds.java
@@ -7,9 +7,9 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.terminals.help;
+package org.eclipse.tcf.te.ui.terminals.help;
-import org.eclipse.tm.te.ui.terminals.activator.UIPlugin;
+import org.eclipse.tcf.te.ui.terminals.activator.UIPlugin;
/**
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/interfaces/IConfigurationPanel.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/interfaces/IConfigurationPanel.java
index e9de5c79e..53d278495 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/interfaces/IConfigurationPanel.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/interfaces/IConfigurationPanel.java
@@ -7,10 +7,10 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.terminals.interfaces;
+package org.eclipse.tcf.te.ui.terminals.interfaces;
import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.tm.te.ui.controls.interfaces.IWizardConfigurationPanel;
+import org.eclipse.tcf.te.ui.controls.interfaces.IWizardConfigurationPanel;
/**
* Terminal launcher configuration panel.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/interfaces/IConnectorType.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/interfaces/IConnectorType.java
index 0e0a6edf0..cecaf0060 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/interfaces/IConnectorType.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/interfaces/IConnectorType.java
@@ -7,11 +7,11 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.terminals.interfaces;
+package org.eclipse.tcf.te.ui.terminals.interfaces;
import org.eclipse.tm.internal.terminal.provisional.api.ITerminalConnector;
-import org.eclipse.tm.te.runtime.interfaces.extensions.IExecutableExtension;
-import org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.runtime.interfaces.extensions.IExecutableExtension;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
/**
* Terminal connector type.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/interfaces/ILauncherDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/interfaces/ILauncherDelegate.java
index f28f8bb4b..6d1afb090 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/interfaces/ILauncherDelegate.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/interfaces/ILauncherDelegate.java
@@ -7,13 +7,13 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.terminals.interfaces;
+package org.eclipse.tcf.te.ui.terminals.interfaces;
import org.eclipse.core.expressions.Expression;
-import org.eclipse.tm.te.runtime.interfaces.callback.ICallback;
-import org.eclipse.tm.te.runtime.interfaces.extensions.IExecutableExtension;
-import org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer;
-import org.eclipse.tm.te.ui.controls.BaseDialogPageControl;
+import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback;
+import org.eclipse.tcf.te.runtime.interfaces.extensions.IExecutableExtension;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.ui.controls.BaseDialogPageControl;
/**
* Terminal launcher delegate.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/interfaces/IPreferenceKeys.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/interfaces/IPreferenceKeys.java
index b07359704..905b568aa 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/interfaces/IPreferenceKeys.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/interfaces/IPreferenceKeys.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.terminals.interfaces;
+package org.eclipse.tcf.te.ui.terminals.interfaces;
/**
* Terminals plug-in preference key definitions.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/interfaces/ITerminalsView.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/interfaces/ITerminalsView.java
index 3c856f0c1..fcad40175 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/interfaces/ITerminalsView.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/interfaces/ITerminalsView.java
@@ -6,8 +6,9 @@
*
* Contributors:
* Wind River Systems - initial API and implementation
+ * Max Weninger (Wind River) - [361363] [TERMINALS] Implement "Pin&Clone" for the "Terminals" view
*******************************************************************************/
-package org.eclipse.tm.te.ui.terminals.interfaces;
+package org.eclipse.tcf.te.ui.terminals.interfaces;
import org.eclipse.ui.IViewPart;
@@ -33,4 +34,19 @@ public interface ITerminalsView extends IViewPart {
* @return The context help id or <code>null</code> if none is associated.
*/
public String getContextHelpId();
+
+ /**
+ * Set the state of the view to be pinned, which means a new terminal tab will be created
+ * in a new view instance.
+ *
+ * @param pin <code>True</code> to set the view state to pinned, <code>false</code> otherwise.
+ */
+ public void setPinned(boolean pin);
+
+ /**
+ * Return the pin state of the terminal view
+ *
+ * @return <code>True</code> if the view instance is pinned, <code>false</code> if not.
+ */
+ public boolean isPinned();
}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/interfaces/IUIConstants.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/interfaces/IUIConstants.java
index 87fc1307c..7c733a0e6 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/interfaces/IUIConstants.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/interfaces/IUIConstants.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.terminals.interfaces;
+package org.eclipse.tcf.te.ui.terminals.interfaces;
/**
* Terminals common UI constants.
@@ -16,6 +16,6 @@ public interface IUIConstants {
/**
* The view id of the terminals view.
*/
- public static final String ID = "org.eclipse.tm.te.ui.terminals.TerminalsView"; //$NON-NLS-1$
+ public static final String ID = "org.eclipse.tcf.te.ui.terminals.TerminalsView"; //$NON-NLS-1$
}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/interfaces/ImageConsts.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/interfaces/ImageConsts.java
index 1fc78077c..59fc23be6 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/interfaces/ImageConsts.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/interfaces/ImageConsts.java
@@ -6,8 +6,9 @@
*
* Contributors:
* Wind River Systems - initial API and implementation
+ * Max Weninger (Wind River) - [361363] [TERMINALS] Implement "Pin&Clone" for the "Terminals" view
*******************************************************************************/
-package org.eclipse.tm.te.ui.terminals.interfaces;
+package org.eclipse.tcf.te.ui.terminals.interfaces;
/**
* Image registry constants.
@@ -62,4 +63,20 @@ public interface ImageConsts {
* The key to access the scroll lock action image (hover).
*/
public static final String ACTION_ScrollLock_Hover = "ScrollLockAction_hover"; //$NON-NLS-1$
+
+ /**
+ * The key to access the pin terminal action image (enabled).
+ */
+ public static final String ACTION_PinTerminal_Enabled = "PinTerminalAction_enabled"; //$NON-NLS-1$
+
+ /**
+ * The key to access the pin terminal action image (disabled).
+ */
+ public static final String ACTION_PinTerminal_Disabled = "PinTerminalAction_disabled"; //$NON-NLS-1$
+
+ /**
+ * The key to access the pin terminal action image (hover).
+ */
+ public static final String ACTION_PinTerminal_Hover = "PinTerminalAction_hover"; //$NON-NLS-1$
+
}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/internal/tracing/ITraceIds.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/interfaces/tracing/ITraceIds.java
index 8d05b627f..9923bed75 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/internal/tracing/ITraceIds.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/interfaces/tracing/ITraceIds.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.terminals.internal.tracing;
+package org.eclipse.tcf.te.ui.terminals.interfaces.tracing;
/**
* Core plug-in trace slot identifiers.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/internal/PreferenceInitializer.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/internal/PreferenceInitializer.java
index 8cb06cc34..269613742 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/internal/PreferenceInitializer.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/internal/PreferenceInitializer.java
@@ -7,12 +7,12 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.terminals.internal;
+package org.eclipse.tcf.te.ui.terminals.internal;
import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
-import org.eclipse.tm.te.runtime.preferences.ScopedEclipsePreferences;
-import org.eclipse.tm.te.ui.terminals.activator.UIPlugin;
-import org.eclipse.tm.te.ui.terminals.interfaces.IPreferenceKeys;
+import org.eclipse.tcf.te.ui.terminals.activator.UIPlugin;
+import org.eclipse.tcf.te.ui.terminals.interfaces.IPreferenceKeys;
+import org.eclipse.tcf.te.runtime.preferences.ScopedEclipsePreferences;
/**
* Terminals default preferences initializer.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/internal/PropertyTester.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/internal/PropertyTester.java
index 545802bb1..dfe166721 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/internal/PropertyTester.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/internal/PropertyTester.java
@@ -7,11 +7,11 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.terminals.internal;
+package org.eclipse.tcf.te.ui.terminals.internal;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.tm.te.ui.terminals.launcher.LauncherDelegateManager;
+import org.eclipse.tcf.te.ui.terminals.launcher.LauncherDelegateManager;
/**
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/internal/SettingsStore.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/internal/SettingsStore.java
index 250776a6d..bd9cfd284 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/internal/SettingsStore.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/internal/SettingsStore.java
@@ -7,10 +7,10 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.terminals.internal;
+package org.eclipse.tcf.te.ui.terminals.internal;
import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore;
-import org.eclipse.tm.te.runtime.properties.PropertiesContainer;
+import org.eclipse.tcf.te.runtime.properties.PropertiesContainer;
/**
* Simple default Terminal settings store implementation keeping the settings
@@ -26,7 +26,7 @@ public class SettingsStore extends PropertiesContainer implements ISettingsStore
}
/* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore#get(java.lang.String, java.lang.String)
+ * @see org.eclipse.tcf.internal.terminal.provisional.api.ISettingsStore#get(java.lang.String, java.lang.String)
*/
@Override
public String get(String key, String defaultValue) {
@@ -35,7 +35,7 @@ public class SettingsStore extends PropertiesContainer implements ISettingsStore
}
/* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore#get(java.lang.String)
+ * @see org.eclipse.tcf.internal.terminal.provisional.api.ISettingsStore#get(java.lang.String)
*/
@Override
public String get(String key) {
@@ -43,7 +43,7 @@ public class SettingsStore extends PropertiesContainer implements ISettingsStore
}
/* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore#put(java.lang.String, java.lang.String)
+ * @see org.eclipse.tcf.internal.terminal.provisional.api.ISettingsStore#put(java.lang.String, java.lang.String)
*/
@Override
public void put(String key, String value) {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/internal/dialogs/LaunchTerminalSettingsDialog.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/internal/dialogs/LaunchTerminalSettingsDialog.java
index 023d19875..01ae870f0 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/internal/dialogs/LaunchTerminalSettingsDialog.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/internal/dialogs/LaunchTerminalSettingsDialog.java
@@ -8,7 +8,7 @@
* Wind River Systems - initial API and implementation
* Max Weninger (Wind River) - [361352] [TERMINALS][SSH] Add SSH terminal support
*******************************************************************************/
-package org.eclipse.tm.te.ui.terminals.internal.dialogs;
+package org.eclipse.tcf.te.ui.terminals.internal.dialogs;
import java.util.ArrayList;
import java.util.Arrays;
@@ -33,21 +33,21 @@ import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.MessageBox;
import org.eclipse.swt.widgets.Shell;
+import org.eclipse.tcf.te.ui.terminals.help.IContextHelpIds;
+import org.eclipse.tcf.te.ui.terminals.interfaces.IConfigurationPanel;
+import org.eclipse.tcf.te.ui.terminals.interfaces.ILauncherDelegate;
+import org.eclipse.tcf.te.ui.terminals.launcher.LauncherDelegateManager;
+import org.eclipse.tcf.te.ui.terminals.nls.Messages;
+import org.eclipse.tcf.te.ui.terminals.panels.AbstractConfigurationPanel;
import org.eclipse.tm.internal.terminal.view.ViewMessages;
-import org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer;
-import org.eclipse.tm.te.runtime.properties.PropertiesContainer;
-import org.eclipse.tm.te.ui.controls.BaseDialogPageControl;
-import org.eclipse.tm.te.ui.controls.BaseWizardConfigurationPanelControl;
-import org.eclipse.tm.te.ui.controls.interfaces.IWizardConfigurationPanel;
-import org.eclipse.tm.te.ui.jface.dialogs.CustomTrayDialog;
-import org.eclipse.tm.te.ui.swt.SWTControlUtil;
-import org.eclipse.tm.te.ui.terminals.help.IContextHelpIds;
-import org.eclipse.tm.te.ui.terminals.interfaces.IConfigurationPanel;
-import org.eclipse.tm.te.ui.terminals.interfaces.ILauncherDelegate;
-import org.eclipse.tm.te.ui.terminals.launcher.LauncherDelegateManager;
-import org.eclipse.tm.te.ui.terminals.nls.Messages;
-import org.eclipse.tm.te.ui.terminals.panels.AbstractConfigurationPanel;
-import org.eclipse.tm.te.ui.wizards.interfaces.ISharedDataWizardPage;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.runtime.properties.PropertiesContainer;
+import org.eclipse.tcf.te.ui.controls.BaseDialogPageControl;
+import org.eclipse.tcf.te.ui.controls.BaseWizardConfigurationPanelControl;
+import org.eclipse.tcf.te.ui.controls.interfaces.IWizardConfigurationPanel;
+import org.eclipse.tcf.te.ui.interfaces.data.IDataExchangeNode;
+import org.eclipse.tcf.te.ui.jface.dialogs.CustomTrayDialog;
+import org.eclipse.tcf.te.ui.swt.SWTControlUtil;
import org.eclipse.ui.forms.widgets.FormToolkit;
/**
@@ -85,7 +85,7 @@ public class LaunchTerminalSettingsDialog extends CustomTrayDialog {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.BaseWizardConfigurationPanelControl#getGroupLabel()
+ * @see org.eclipse.tcf.te.ui.controls.BaseWizardConfigurationPanelControl#getGroupLabel()
*/
@Override
public String getGroupLabel() {
@@ -108,7 +108,7 @@ public class LaunchTerminalSettingsDialog extends CustomTrayDialog {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.interfaces.IWizardConfigurationPanel#setupPanel(org.eclipse.swt.widgets.Composite, org.eclipse.tm.te.ui.controls.interfaces.FormToolkit)
+ * @see org.eclipse.tcf.te.ui.controls.interfaces.IWizardConfigurationPanel#setupPanel(org.eclipse.swt.widgets.Composite, org.eclipse.tcf.te.ui.controls.interfaces.FormToolkit)
*/
@SuppressWarnings("synthetic-access")
@Override
@@ -127,7 +127,7 @@ public class LaunchTerminalSettingsDialog extends CustomTrayDialog {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.interfaces.IWizardConfigurationPanel#dataChanged(org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer, org.eclipse.swt.events.TypedEvent)
+ * @see org.eclipse.tcf.te.ui.controls.interfaces.IWizardConfigurationPanel#dataChanged(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer, org.eclipse.swt.events.TypedEvent)
*/
@Override
public boolean dataChanged(IPropertiesContainer data, TypedEvent e) {
@@ -163,7 +163,7 @@ public class LaunchTerminalSettingsDialog extends CustomTrayDialog {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.jface.dialogs.CustomTrayDialog#dispose()
+ * @see org.eclipse.tcf.te.ui.jface.dialogs.CustomTrayDialog#dispose()
*/
@Override
protected void dispose() {
@@ -172,7 +172,7 @@ public class LaunchTerminalSettingsDialog extends CustomTrayDialog {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.jface.dialogs.CustomTrayDialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+ * @see org.eclipse.tcf.te.ui.jface.dialogs.CustomTrayDialog#createDialogArea(org.eclipse.swt.widgets.Composite)
*/
@Override
protected Control createDialogArea(Composite parent) {
@@ -261,7 +261,7 @@ public class LaunchTerminalSettingsDialog extends CustomTrayDialog {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.jface.dialogs.CustomTrayDialog#saveWidgetValues()
+ * @see org.eclipse.tcf.te.ui.jface.dialogs.CustomTrayDialog#saveWidgetValues()
*/
@Override
protected void saveWidgetValues() {
@@ -273,7 +273,7 @@ public class LaunchTerminalSettingsDialog extends CustomTrayDialog {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.jface.dialogs.CustomTrayDialog#restoreWidgetValues()
+ * @see org.eclipse.tcf.te.ui.jface.dialogs.CustomTrayDialog#restoreWidgetValues()
*/
@Override
protected void restoreWidgetValues() {
@@ -291,7 +291,7 @@ public class LaunchTerminalSettingsDialog extends CustomTrayDialog {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.jface.dialogs.CustomTrayDialog#okPressed()
+ * @see org.eclipse.tcf.te.ui.jface.dialogs.CustomTrayDialog#okPressed()
*/
@Override
protected void okPressed() {
@@ -313,8 +313,8 @@ public class LaunchTerminalSettingsDialog extends CustomTrayDialog {
data.setProperty("selection", selection); //$NON-NLS-1$
// Store the delegate specific settings
- if (panel instanceof ISharedDataWizardPage) {
- ((ISharedDataWizardPage)panel).extractData(data);
+ if (panel instanceof IDataExchangeNode) {
+ ((IDataExchangeNode)panel).extractData(data);
}
super.okPressed();
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/internal/handler/LaunchTerminalCommandHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/internal/handler/LaunchTerminalCommandHandler.java
index c83ba4136..19e62c288 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/internal/handler/LaunchTerminalCommandHandler.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/internal/handler/LaunchTerminalCommandHandler.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.terminals.internal.handler;
+package org.eclipse.tcf.te.ui.terminals.internal.handler;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
@@ -16,11 +16,11 @@ import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.window.Window;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer;
-import org.eclipse.tm.te.runtime.properties.PropertiesContainer;
-import org.eclipse.tm.te.ui.terminals.interfaces.ILauncherDelegate;
-import org.eclipse.tm.te.ui.terminals.internal.dialogs.LaunchTerminalSettingsDialog;
-import org.eclipse.tm.te.ui.terminals.launcher.LauncherDelegateManager;
+import org.eclipse.tcf.te.ui.terminals.interfaces.ILauncherDelegate;
+import org.eclipse.tcf.te.ui.terminals.internal.dialogs.LaunchTerminalSettingsDialog;
+import org.eclipse.tcf.te.ui.terminals.launcher.LauncherDelegateManager;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.runtime.properties.PropertiesContainer;
import org.eclipse.ui.handlers.HandlerUtil;
/**
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/launcher/AbstractLauncherDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/launcher/AbstractLauncherDelegate.java
index ececb356e..29f89d565 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/launcher/AbstractLauncherDelegate.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/launcher/AbstractLauncherDelegate.java
@@ -7,14 +7,14 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.terminals.launcher;
+package org.eclipse.tcf.te.ui.terminals.launcher;
import org.eclipse.core.expressions.Expression;
import org.eclipse.core.expressions.ExpressionConverter;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.tm.te.runtime.extensions.ExecutableExtension;
-import org.eclipse.tm.te.ui.terminals.interfaces.ILauncherDelegate;
+import org.eclipse.tcf.te.ui.terminals.interfaces.ILauncherDelegate;
+import org.eclipse.tcf.te.runtime.extensions.ExecutableExtension;
/**
* Abstract launcher delegate implementation.
@@ -24,7 +24,7 @@ public abstract class AbstractLauncherDelegate extends ExecutableExtension imple
private Expression expression;
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.extensions.ExecutableExtension#doSetInitializationData(org.eclipse.core.runtime.IConfigurationElement, java.lang.String, java.lang.Object)
+ * @see org.eclipse.tcf.te.runtime.extensions.ExecutableExtension#doSetInitializationData(org.eclipse.core.runtime.IConfigurationElement, java.lang.String, java.lang.Object)
*/
@Override
public void doSetInitializationData(IConfigurationElement config, String propertyName, Object data) throws CoreException {
@@ -39,7 +39,7 @@ public abstract class AbstractLauncherDelegate extends ExecutableExtension imple
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.terminals.interfaces.ILauncherDelegate#getEnablement()
+ * @see org.eclipse.tcf.te.ui.terminals.interfaces.ILauncherDelegate#getEnablement()
*/
@Override
public Expression getEnablement() {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/launcher/LauncherDelegateManager.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/launcher/LauncherDelegateManager.java
index 384de99b1..c82a83799 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/launcher/LauncherDelegateManager.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/launcher/LauncherDelegateManager.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.terminals.launcher;
+package org.eclipse.tcf.te.ui.terminals.launcher;
import java.util.ArrayList;
import java.util.Collection;
@@ -20,10 +20,10 @@ import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.tm.te.runtime.extensions.AbstractExtensionPointManager;
-import org.eclipse.tm.te.runtime.extensions.ExecutableExtensionProxy;
-import org.eclipse.tm.te.ui.terminals.activator.UIPlugin;
-import org.eclipse.tm.te.ui.terminals.interfaces.ILauncherDelegate;
+import org.eclipse.tcf.te.ui.terminals.activator.UIPlugin;
+import org.eclipse.tcf.te.ui.terminals.interfaces.ILauncherDelegate;
+import org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager;
+import org.eclipse.tcf.te.runtime.extensions.ExecutableExtensionProxy;
import org.eclipse.ui.ISources;
/**
@@ -53,15 +53,15 @@ public class LauncherDelegateManager extends AbstractExtensionPointManager<ILaun
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.extensions.AbstractExtensionPointManager#getExtensionPointId()
+ * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#getExtensionPointId()
*/
@Override
protected String getExtensionPointId() {
- return "org.eclipse.tm.te.ui.terminals.launcherDelegates"; //$NON-NLS-1$
+ return "org.eclipse.tcf.te.ui.terminals.launcherDelegates"; //$NON-NLS-1$
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.extensions.AbstractExtensionPointManager#getConfigurationElementName()
+ * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#getConfigurationElementName()
*/
@Override
protected String getConfigurationElementName() {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/manager/ConsoleManager.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/manager/ConsoleManager.java
index b016d684c..a79a7197e 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/manager/ConsoleManager.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/manager/ConsoleManager.java
@@ -6,29 +6,33 @@
*
* Contributors:
* Wind River Systems - initial API and implementation
+ * Max Weninger (Wind River) - [361363] [TERMINALS] Implement "Pin&Clone" for the "Terminals" view
*******************************************************************************/
-package org.eclipse.tm.te.ui.terminals.manager;
+package org.eclipse.tcf.te.ui.terminals.manager;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.swt.custom.CTabItem;
import org.eclipse.swt.widgets.Display;
+import org.eclipse.tcf.te.ui.terminals.activator.UIPlugin;
+import org.eclipse.tcf.te.ui.terminals.interfaces.IPreferenceKeys;
+import org.eclipse.tcf.te.ui.terminals.interfaces.ITerminalsView;
+import org.eclipse.tcf.te.ui.terminals.interfaces.IUIConstants;
+import org.eclipse.tcf.te.ui.terminals.tabs.TabFolderManager;
+import org.eclipse.tcf.te.ui.terminals.view.TerminalsView;
import org.eclipse.tm.internal.terminal.provisional.api.ITerminalConnector;
-import org.eclipse.tm.te.ui.terminals.activator.UIPlugin;
-import org.eclipse.tm.te.ui.terminals.interfaces.IPreferenceKeys;
-import org.eclipse.tm.te.ui.terminals.interfaces.ITerminalsView;
-import org.eclipse.tm.te.ui.terminals.interfaces.IUIConstants;
-import org.eclipse.tm.te.ui.terminals.tabs.TabFolderManager;
-import org.eclipse.tm.te.ui.terminals.view.TerminalsView;
import org.eclipse.ui.IPerspectiveDescriptor;
import org.eclipse.ui.IPerspectiveListener;
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.PerspectiveAdapter;
@@ -39,6 +43,7 @@ import org.eclipse.ui.PlatformUI;
*/
@SuppressWarnings("restriction")
public class ConsoleManager {
+
// Reference to the perspective listener instance
private final IPerspectiveListener perspectiveListener;
@@ -128,10 +133,10 @@ public class ConsoleManager {
* <p>
* <b>Note:</b> The method must be called within the UI thread.
*
- * @param id The terminal console view id or <code>null</code> to show the default terminal console view.
+ * @param id The terminals console view id or <code>null</code> to show the default terminal console view.
* @return The console view instance if available or <code>null</code> otherwise.
*/
- public ITerminalsView findConsoleView(String id) {
+ public ITerminalsView findConsoleView(String id, String secondaryId) {
Assert.isNotNull(Display.findDisplay(Thread.currentThread()));
ITerminalsView view = null;
@@ -140,7 +145,7 @@ public class ConsoleManager {
IWorkbenchPage page = getActiveWorkbenchPage();
if (page != null) {
// Look for the view
- IViewPart part = page.findView(id != null ? id : IUIConstants.ID);
+ IViewPart part=getTerminalsViewWithSecondaryId(id != null ? id : IUIConstants.ID, secondaryId);
// Check the interface
if (part instanceof ITerminalsView) {
view = (ITerminalsView)part;
@@ -151,13 +156,145 @@ public class ConsoleManager {
}
/**
+ * Search and return a terminal view with a specific secondary id
+ *
+ * @param id The terminals console view id. Must not be <code>null</code>.
+ * @param secondaryId The terminals console view secondary id or <code>null</code>.
+ *
+ * @return The terminals console view instance or <code>null</code> if not found.
+ */
+ private IViewPart getTerminalsViewWithSecondaryId(String id, String secondaryId) {
+ Assert.isNotNull(id);
+
+ IWorkbenchPage page = getActiveWorkbenchPage();
+
+ IViewReference[] refs = page.getViewReferences();
+ for (int i = 0; i < refs.length; i++) {
+ IViewReference ref = refs[i];
+ if (ref.getId().equals(id)) {
+ IViewPart part = ref.getView(true);
+ if (part instanceof ITerminalsView) {
+ String secId = ((IViewSite) part.getSite()).getSecondaryId();
+ if (secId != null && secId.equals(secondaryId)) {
+ return part;
+ }
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Search and return a terminal view that is NOT pinned
+ *
+ * @param id The terminals console view id. Must not be <code>null</code>.
+ * @return The terminals console view instance or <code>null</code> if not found.
+ */
+ private IViewPart getFirstNotPinnedTerminalsView(String id) {
+ Assert.isNotNull(id);
+
+ IWorkbenchPage page = getActiveWorkbenchPage();
+
+ IViewReference[] refs = page.getViewReferences();
+ for (int i = 0; i < refs.length; i++) {
+ IViewReference ref = refs[i];
+ if (ref.getId().equals(id)) {
+ IViewPart part = ref.getView(true);
+ if (part instanceof ITerminalsView) {
+ if (!((ITerminalsView) part).isPinned()) {
+ return part;
+ }
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Search and return the first available terminal view.
+ *
+ * @param id The terminals console view id. Must not be <code>null</code>.
+ * @param useActive - return only an active terminal view.
+ *
+ * @return The terminals console view instance or <code>null</code> if not found.
+ */
+ private IViewPart getFirstTerminalsView(String id, boolean useActive) {
+ Assert.isNotNull(id);
+
+ IWorkbenchPage page = getActiveWorkbenchPage();
+
+ IViewReference[] refs = page.getViewReferences();
+ for (int i = 0; i < refs.length; i++) {
+ IViewReference ref = refs[i];
+ if (ref.getId().equals(id)) {
+ IViewPart part = ref.getView(true);
+ if (useActive) {
+ if (page.isPartVisible(part)) {
+ return part;
+ }
+ }
+ else {
+ return part;
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Return a new secondary id to use, based on the number of open terminal views.
+ *
+ * @param id The terminals console view id. Must not be <code>null</code>.
+ * @return The next secondary id, or <code>null</code> if it is the first one
+ */
+ private String getNextTerminalSecondaryId(String id) {
+ Assert.isNotNull(id);
+
+ IWorkbenchPage page = getActiveWorkbenchPage();
+ Map<String, IViewReference> terminalViews = new HashMap<String, IViewReference>();
+
+ int maxNumber = 0;
+ IViewReference[] refs = page.getViewReferences();
+ for (int i = 0; i < refs.length; i++) {
+ IViewReference ref = refs[i];
+ if (ref.getId().equals(id)) {
+ if (ref.getSecondaryId() != null) {
+ terminalViews.put(ref.getSecondaryId(), ref);
+ int scondaryIdInt = Integer.parseInt(ref.getSecondaryId());
+ if (scondaryIdInt > maxNumber) {
+ maxNumber = scondaryIdInt;
+ }
+ }
+ else {
+ // add the one with secondaryId == null with 0 by default
+ terminalViews.put(Integer.toString(0), ref);
+ }
+ }
+ }
+ if (terminalViews.size() == 0) {
+ return null;
+ }
+
+ int i = 0;
+ for (; i < maxNumber; i++) {
+ String secondaryIdStr = Integer.toString(i);
+ if (!terminalViews.keySet().contains(secondaryIdStr)) {
+ // found a free slot
+ return Integer.toString(i);
+ }
+ }
+ // add a new one
+ return Integer.toString(i + 1);
+ }
+
+ /**
* Show the terminal console view specified by the given id.
* <p>
* <b>Note:</b> The method must be called within the UI thread.
*
* @param id The terminal console view id or <code>null</code> to show the default terminal console view.
*/
- public void showConsoleView(String id) {
+ public IViewPart showConsoleView(String id, String secondaryId) {
Assert.isNotNull(Display.findDisplay(Thread.currentThread()));
// Get the active workbench page
@@ -165,15 +302,17 @@ public class ConsoleManager {
if (page != null) {
try {
// show the view
- IViewPart part = page.showView(id != null ? id : IUIConstants.ID);
+ IViewPart part = page.showView(id != null ? id : IUIConstants.ID, secondaryId, IWorkbenchPage.VIEW_ACTIVATE);
// and force the view to the foreground
page.bringToTop(part);
- } catch (PartInitException e) {
- IStatus status = new Status(IStatus.ERROR, UIPlugin.getUniqueIdentifier(),
- e.getLocalizedMessage(), e);
+ return part;
+ }
+ catch (PartInitException e) {
+ IStatus status = new Status(IStatus.ERROR, UIPlugin.getUniqueIdentifier(), e.getLocalizedMessage(), e);
UIPlugin.getDefault().getLog().log(status);
}
}
+ return null;
}
/**
@@ -182,21 +321,61 @@ public class ConsoleManager {
* @param id The terminal console view id or <code>null</code> to show the default terminal console view.
* @param activate If <code>true</code> activate the console view.
*/
- private void bringToTop(String id, boolean activate) {
+ private IViewPart bringToTop(String id, boolean activate) {
// Get the active workbench page
IWorkbenchPage page = getActiveWorkbenchPage();
if (page != null) {
- // Look for the view
- IViewPart part = page.findView(id != null ? id : IUIConstants.ID);
- if (part != null) {
- if (activate) {
- page.activate(part);
+ // Look for any terminal view
+ IViewPart anyTerminal = getFirstTerminalsView(id != null ? id : IUIConstants.ID, false);
+ // there is at least one terminal available
+ if (anyTerminal != null) {
+ // is there an active terminal view
+ IViewPart activePart = getFirstTerminalsView(id != null ? id : IUIConstants.ID, true);
+ // no terminal view active
+ if (activePart == null) {
+ // use the first not pinned
+ IViewPart notPinnedPart = getFirstNotPinnedTerminalsView(id != null ? id : IUIConstants.ID);
+ if (notPinnedPart != null) {
+ if (activate) {
+ page.activate(notPinnedPart);
+ }
+ else {
+ page.bringToTop(notPinnedPart);
+ }
+ return notPinnedPart;
+ }
+ // else we need to create a new one
+ IViewPart newPart = showConsoleView(id != null ? id : IUIConstants.ID, getNextTerminalSecondaryId(id != null ? id : IUIConstants.ID));
+ return newPart;
}
- else {
- page.bringToTop(part);
+ // we found a active terminal page
+ // if it is pinned search for a non pinned (not active)
+ if (((ITerminalsView) activePart).isPinned()) {
+ // we found one so use it
+ IViewPart notPinnedPart = getFirstNotPinnedTerminalsView(id != null ? id : IUIConstants.ID);
+ if (notPinnedPart != null) {
+ if (activate) {
+ page.activate(notPinnedPart);
+ }
+ else {
+ page.bringToTop(notPinnedPart);
+ }
+ return notPinnedPart;
+ }
+ // else we need to create a new one
+ IViewPart newPart = showConsoleView(id != null ? id : IUIConstants.ID, getNextTerminalSecondaryId(id != null ? id : IUIConstants.ID));
+ return newPart;
}
- } else if (activate) showConsoleView(id != null ? id : IUIConstants.ID);
+ // else return the active one
+ return activePart;
+ }
+ // create first new terminal
+ if (activate) {
+ IViewPart newPart = showConsoleView(id != null ? id : IUIConstants.ID, getNextTerminalSecondaryId(id != null ? id : IUIConstants.ID));
+ return newPart;
+ }
}
+ return null;
}
/**
@@ -216,18 +395,20 @@ public class ConsoleManager {
Assert.isNotNull(Display.findDisplay(Thread.currentThread()));
// make the consoles view visible
- bringToTop(id, activate);
-
- // Get the console view
- ITerminalsView view = findConsoleView(id);
- if (view == null) return;
+ IViewPart part=bringToTop(id, activate);
+ if(part==null){
+ return;
+ }
+ ITerminalsView view = (ITerminalsView)part;
// Get the tab folder manager associated with the view
TabFolderManager manager = (TabFolderManager)view.getAdapter(TabFolderManager.class);
if (manager == null) return;
// Lookup an existing console first
- CTabItem item = findConsole(id, title, connector, data);
+ String secId=((IViewSite)part.getSite()).getSecondaryId();
+
+ CTabItem item = findConsole(id, secId, title, connector, data);
// If no existing console exist -> Create the tab item
if (item == null) {
@@ -265,13 +446,13 @@ public class ConsoleManager {
*
* @return The corresponding console tab item or <code>null</code>.
*/
- public CTabItem findConsole(String id, String title, ITerminalConnector connector, Object data) {
+ public CTabItem findConsole(String id, String secondaryId, String title, ITerminalConnector connector, Object data) {
Assert.isNotNull(title);
Assert.isNotNull(connector);
Assert.isNotNull(Display.findDisplay(Thread.currentThread()));
// Get the console view
- ITerminalsView view = findConsoleView(id);
+ ITerminalsView view = findConsoleView(id, secondaryId);
if (view == null) return null;
// Get the tab folder manager associated with the view
@@ -282,6 +463,45 @@ public class ConsoleManager {
}
/**
+ * Search all console views for the one that contains a specific connector.
+ * <p>
+ * <b>Note:</b> The method will handle unified console titles itself.
+ *
+ * @param id The terminal console view id or <code>null</code> to show the default terminal console view.
+ * @param title The console title. Must not be <code>null</code>.
+ * @param connector The terminal connector. Must not be <code>null</code>.
+ * @param data The custom terminal data node or <code>null</code>.
+ *
+ * @return The corresponding console tab item or <code>null</code>.
+ */
+ private CTabItem findConsoleForTerminalConnector(String id, String title, ITerminalConnector connector, Object data) {
+ Assert.isNotNull(title);
+ Assert.isNotNull(connector);
+
+ IWorkbenchPage page = getActiveWorkbenchPage();
+
+ IViewReference[] refs = page.getViewReferences();
+ for (int i = 0; i < refs.length; i++) {
+ IViewReference ref = refs[i];
+ if (ref.getId().equals(id)) {
+ IViewPart part = ref.getView(true);
+ if (part instanceof ITerminalsView) {
+ // Get the tab folder manager associated with the view
+ TabFolderManager manager = (TabFolderManager) part.getAdapter(TabFolderManager.class);
+ if (manager == null) {
+ continue;
+ }
+ CTabItem item = manager.findTabItem(title, connector, data);
+ if (item != null) {
+ return item;
+ }
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
* Close the console with the given title and the given terminal connector.
* <p>
* <b>Note:</b> The method must be called within the UI thread.
@@ -296,9 +516,11 @@ public class ConsoleManager {
Assert.isNotNull(connector);
Assert.isNotNull(Display.findDisplay(Thread.currentThread()));
- // Lookup the console
- CTabItem console = findConsole(id, title, connector, data);
+ // Lookup the console with this connector
+ CTabItem console = findConsoleForTerminalConnector(id, title, connector, data);
// If found, dispose the console
- if (console != null) console.dispose();
+ if (console != null) {
+ console.dispose();
+ }
}
}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/nls/Messages.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/nls/Messages.java
index af8552000..0550bf91f 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/nls/Messages.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/nls/Messages.java
@@ -6,8 +6,9 @@
*
* Contributors:
* Wind River Systems - initial API and implementation
+ * Max Weninger (Wind River) - [361363] [TERMINALS] Implement "Pin&Clone" for the "Terminals" view
*******************************************************************************/
-package org.eclipse.tm.te.ui.terminals.nls;
+package org.eclipse.tcf.te.ui.terminals.nls;
import org.eclipse.osgi.util.NLS;
@@ -17,7 +18,7 @@ import org.eclipse.osgi.util.NLS;
public class Messages extends NLS {
// The plug-in resource bundle name
- private static final String BUNDLE_NAME = "org.eclipse.tm.te.ui.terminals.nls.Messages"; //$NON-NLS-1$
+ private static final String BUNDLE_NAME = "org.eclipse.tcf.te.ui.terminals.nls.Messages"; //$NON-NLS-1$
/**
* Static constructor.
@@ -33,6 +34,9 @@ public class Messages extends NLS {
public static String TabTerminalListener_consoleTerminated;
+ public static String PinTerminalAction_menu;
+ public static String PinTerminalAction_toolTip;
+
public static String ProcessSettingsPage_dialogTitle;
public static String ProcessSettingsPage_processImagePathSelectorControl_label;
public static String ProcessSettingsPage_processImagePathSelectorControl_button;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/nls/Messages.properties b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/nls/Messages.properties
index 6e86cfb30..a2a897258 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/nls/Messages.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/nls/Messages.properties
@@ -1,5 +1,5 @@
#
-# org.eclipse.tm.te.ui.terminals
+# org.eclipse.tcf.te.ui.terminals
# Externalized Strings.
#
@@ -7,6 +7,8 @@ AbstractAction_error_commandExecutionFailed="Failed to execute command (id = {0}
TabTerminalListener_consoleTerminated=<terminated> {0}
+PinTerminalAction_menu=Pin
+PinTerminalAction_toolTip=Pin the Terminal View
ProcessSettingsPage_dialogTitle=Select Process Image
ProcessSettingsPage_processImagePathSelectorControl_label=Image Path:
ProcessSettingsPage_processImagePathSelectorControl_button=Browse
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/panels/AbstractConfigurationPanel.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/panels/AbstractConfigurationPanel.java
new file mode 100644
index 000000000..e728ac98a
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/panels/AbstractConfigurationPanel.java
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.terminals.panels;
+
+import java.util.Map;
+
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.tcf.te.runtime.services.ServiceManager;
+import org.eclipse.tcf.te.runtime.services.interfaces.IPropertiesAccessService;
+import org.eclipse.tcf.te.runtime.services.interfaces.constants.IPropertiesAccessServiceConstants;
+import org.eclipse.tcf.te.ui.controls.BaseDialogPageControl;
+import org.eclipse.tcf.te.ui.controls.panels.AbstractWizardConfigurationPanel;
+import org.eclipse.tcf.te.ui.terminals.interfaces.IConfigurationPanel;
+
+/**
+ * Abstract terminal configuration panel implementation.
+ */
+public abstract class AbstractConfigurationPanel extends AbstractWizardConfigurationPanel implements IConfigurationPanel {
+ // The selection
+ private ISelection selection;
+
+ /**
+ * Constructor.
+ *
+ * @param parentControl The parent control. Must not be <code>null</code>!
+ */
+ public AbstractConfigurationPanel(BaseDialogPageControl parentControl) {
+ super(parentControl);
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.terminals.interfaces.IConfigurationPanel#setSelection(org.eclipse.jface.viewers.ISelection)
+ */
+ @Override
+ public void setSelection(ISelection selection) {
+ this.selection = selection;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.terminals.interfaces.IConfigurationPanel#getSelection()
+ */
+ @Override
+ public ISelection getSelection() {
+ return selection;
+ }
+
+ /**
+ * Returns the host name or IP from the current selection.
+ *
+ * @return The host name or IP, or <code>null</code>.
+ */
+ public String getSelectionHost() {
+ ISelection selection = getSelection();
+ if (selection instanceof IStructuredSelection && !selection.isEmpty()) {
+ Object element = ((IStructuredSelection) selection).getFirstElement();
+ IPropertiesAccessService service = ServiceManager.getInstance().getService(element, IPropertiesAccessService.class);
+ if (service != null) {
+ Map<String, String> props = service.getTargetAddress(element);
+ if (props != null && props.containsKey(IPropertiesAccessServiceConstants.PROP_ADDRESS)) {
+ return props.get(IPropertiesAccessServiceConstants.PROP_ADDRESS);
+ }
+ }
+ }
+
+ return null;
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/services/TerminalService.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/services/TerminalService.java
index 8f86cea55..0d83a9b6f 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/services/TerminalService.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/services/TerminalService.java
@@ -7,23 +7,23 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.terminals.services;
+package org.eclipse.tcf.te.ui.terminals.services;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.Status;
+import org.eclipse.tcf.te.ui.terminals.interfaces.IConnectorType;
+import org.eclipse.tcf.te.ui.terminals.interfaces.IUIConstants;
+import org.eclipse.tcf.te.ui.terminals.manager.ConsoleManager;
+import org.eclipse.tcf.te.ui.terminals.nls.Messages;
+import org.eclipse.tcf.te.ui.terminals.types.ConnectorManager;
import org.eclipse.tm.internal.terminal.provisional.api.ITerminalConnector;
-import org.eclipse.tm.te.runtime.interfaces.callback.ICallback;
-import org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer;
-import org.eclipse.tm.te.runtime.services.AbstractService;
-import org.eclipse.tm.te.runtime.services.interfaces.ITerminalService;
-import org.eclipse.tm.te.runtime.services.interfaces.constants.ITerminalsConnectorConstants;
-import org.eclipse.tm.te.runtime.utils.StatusHelper;
-import org.eclipse.tm.te.ui.swt.DisplayUtil;
-import org.eclipse.tm.te.ui.terminals.interfaces.IConnectorType;
-import org.eclipse.tm.te.ui.terminals.interfaces.IUIConstants;
-import org.eclipse.tm.te.ui.terminals.manager.ConsoleManager;
-import org.eclipse.tm.te.ui.terminals.nls.Messages;
-import org.eclipse.tm.te.ui.terminals.types.ConnectorManager;
+import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.runtime.services.AbstractService;
+import org.eclipse.tcf.te.runtime.services.interfaces.ITerminalService;
+import org.eclipse.tcf.te.runtime.services.interfaces.constants.ITerminalsConnectorConstants;
+import org.eclipse.tcf.te.runtime.utils.StatusHelper;
+import org.eclipse.tcf.te.ui.swt.DisplayUtil;
/**
* Terminal service implementation.
@@ -164,7 +164,7 @@ public class TerminalService extends AbstractService implements ITerminalService
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.services.interfaces.ITerminalService#openConsole(org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer, org.eclipse.tm.te.runtime.interfaces.callback.ICallback)
+ * @see org.eclipse.tcf.te.runtime.services.interfaces.ITerminalService#openConsole(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer, org.eclipse.tcf.te.runtime.interfaces.callback.ICallback)
*/
@Override
public void openConsole(final IPropertiesContainer properties, final ICallback callback) {
@@ -184,7 +184,7 @@ public class TerminalService extends AbstractService implements ITerminalService
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.services.interfaces.ITerminalService#closeConsole(org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer, org.eclipse.tm.te.runtime.interfaces.callback.ICallback)
+ * @see org.eclipse.tcf.te.runtime.services.interfaces.ITerminalService#closeConsole(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer, org.eclipse.tcf.te.runtime.interfaces.callback.ICallback)
*/
@Override
public void closeConsole(final IPropertiesContainer properties, final ICallback callback) {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/streams/AbstractStreamsConnector.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/streams/AbstractStreamsConnector.java
index 5f4025d67..8060f0854 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/streams/AbstractStreamsConnector.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/streams/AbstractStreamsConnector.java
@@ -7,15 +7,15 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.terminals.streams;
+package org.eclipse.tcf.te.ui.terminals.streams;
import java.io.InputStream;
import java.io.OutputStream;
import org.eclipse.core.runtime.Assert;
+import org.eclipse.tcf.te.runtime.interfaces.IDisposable;
import org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl;
import org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl;
-import org.eclipse.ui.services.IDisposable;
/**
* Streams connector implementation.
@@ -115,7 +115,7 @@ public abstract class AbstractStreamsConnector extends TerminalConnectorImpl {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl#doDisconnect()
+ * @see org.eclipse.tcf.internal.terminal.provisional.api.provider.TerminalConnectorImpl#doDisconnect()
*/
@Override
protected void doDisconnect() {
@@ -128,7 +128,7 @@ public abstract class AbstractStreamsConnector extends TerminalConnectorImpl {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl#getTerminalToRemoteStream()
+ * @see org.eclipse.tcf.internal.terminal.provisional.api.provider.TerminalConnectorImpl#getTerminalToRemoteStream()
*/
@Override
public OutputStream getTerminalToRemoteStream() {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/streams/InputStreamMonitor.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/streams/InputStreamMonitor.java
index 19d7aa877..2a0316dcf 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/streams/InputStreamMonitor.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/streams/InputStreamMonitor.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.terminals.streams;
+package org.eclipse.tcf.te.ui.terminals.streams;
import java.io.IOException;
import java.io.OutputStream;
@@ -20,11 +20,11 @@ import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.osgi.util.NLS;
+import org.eclipse.tcf.te.runtime.interfaces.IDisposable;
+import org.eclipse.tcf.te.runtime.services.interfaces.constants.ILineSeparatorConstants;
+import org.eclipse.tcf.te.ui.terminals.activator.UIPlugin;
+import org.eclipse.tcf.te.ui.terminals.nls.Messages;
import org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl;
-import org.eclipse.tm.te.runtime.services.interfaces.constants.ILineSeparatorConstants;
-import org.eclipse.tm.te.ui.terminals.activator.UIPlugin;
-import org.eclipse.tm.te.ui.terminals.nls.Messages;
-import org.eclipse.ui.services.IDisposable;
/**
* Input stream monitor implementation.
@@ -55,7 +55,7 @@ public class InputStreamMonitor extends OutputStream implements IDisposable {
private final Queue<byte[]> queue = new LinkedList<byte[]>();
// ***** Line separator replacement logic *****
- // ***** Adapted from org.eclipse.tm.internal.terminal.local.LocalTerminalOutputStream *****
+ // ***** Adapted from org.eclipse.tcf.internal.terminal.local.LocalTerminalOutputStream *****
private final static int TERMINAL_SENDS_CR = 0;
private final static int TERMINAL_SENDS_CRLF = 1;
@@ -143,7 +143,7 @@ public class InputStreamMonitor extends OutputStream implements IDisposable {
}
/* (non-Javadoc)
- * @see org.eclipse.ui.services.IDisposable#dispose()
+ * @see org.eclipse.tcf.te.runtime.interfaces.IDisposable#dispose()
*/
@Override
public void dispose() {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/streams/OutputStreamMonitor.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/streams/OutputStreamMonitor.java
index 31bcf2e07..609cf2b80 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/streams/OutputStreamMonitor.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/streams/OutputStreamMonitor.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.terminals.streams;
+package org.eclipse.tcf.te.ui.terminals.streams;
import java.io.BufferedInputStream;
import java.io.IOException;
@@ -19,12 +19,12 @@ import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.osgi.util.NLS;
+import org.eclipse.tcf.te.runtime.interfaces.IDisposable;
+import org.eclipse.tcf.te.runtime.services.interfaces.constants.ILineSeparatorConstants;
+import org.eclipse.tcf.te.ui.terminals.activator.UIPlugin;
+import org.eclipse.tcf.te.ui.terminals.interfaces.tracing.ITraceIds;
+import org.eclipse.tcf.te.ui.terminals.nls.Messages;
import org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl;
-import org.eclipse.tm.te.runtime.services.interfaces.constants.ILineSeparatorConstants;
-import org.eclipse.tm.te.ui.terminals.activator.UIPlugin;
-import org.eclipse.tm.te.ui.terminals.internal.tracing.ITraceIds;
-import org.eclipse.tm.te.ui.terminals.nls.Messages;
-import org.eclipse.ui.services.IDisposable;
/**
* Output stream monitor implementation.
@@ -98,7 +98,7 @@ public class OutputStreamMonitor implements IDisposable {
}
/* (non-Javadoc)
- * @see org.eclipse.ui.services.IDisposable#dispose()
+ * @see org.eclipse.tcf.te.runtime.interfaces.IDisposable#dispose()
*/
@Override
public void dispose() {
@@ -248,10 +248,12 @@ public class OutputStreamMonitor implements IDisposable {
// Check on the line separator setting
if (lineSeparator != null
- && !ILineSeparatorConstants.LINE_SEPARATOR_CRLF.equals(lineSeparator)
- && text.contains(lineSeparator)) {
- text = text.replaceAll(lineSeparator, "\r\n"); //$NON-NLS-1$
- changed = true;
+ && !ILineSeparatorConstants.LINE_SEPARATOR_CRLF.equals(lineSeparator)) {
+ String separator = ILineSeparatorConstants.LINE_SEPARATOR_LF.equals(lineSeparator) ? "\n" : "\r"; //$NON-NLS-1$ //$NON-NLS-2$
+ if (text.contains(separator)) {
+ text = text.replaceAll(separator, "\r\n"); //$NON-NLS-1$
+ changed = true;
+ }
}
// If changed, get the new bytes array
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/streams/StreamsConnector.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/streams/StreamsConnector.java
index 119a3f911..7f4d34607 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/streams/StreamsConnector.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/streams/StreamsConnector.java
@@ -7,13 +7,13 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.terminals.streams;
+package org.eclipse.tcf.te.ui.terminals.streams;
import org.eclipse.core.runtime.Assert;
+import org.eclipse.tcf.te.runtime.interfaces.IDisposable;
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.ui.services.IDisposable;
/**
* Streams connector implementation.
@@ -43,7 +43,7 @@ public class StreamsConnector extends AbstractStreamsConnector implements IDispo
}
/* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl#connect(org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl)
+ * @see org.eclipse.tcf.internal.terminal.provisional.api.provider.TerminalConnectorImpl#connect(org.eclipse.tcf.internal.terminal.provisional.api.ITerminalControl)
*/
@Override
public void connect(ITerminalControl control) {
@@ -58,7 +58,7 @@ public class StreamsConnector extends AbstractStreamsConnector implements IDispo
}
/* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl#isLocalEcho()
+ * @see org.eclipse.tcf.internal.terminal.provisional.api.provider.TerminalConnectorImpl#isLocalEcho()
*/
@Override
public boolean isLocalEcho() {
@@ -66,7 +66,7 @@ public class StreamsConnector extends AbstractStreamsConnector implements IDispo
}
/* (non-Javadoc)
- * @see org.eclipse.ui.services.IDisposable#dispose()
+ * @see org.eclipse.tcf.te.runtime.interfaces.IDisposable#dispose()
*/
@Override
public void dispose() {
@@ -74,7 +74,7 @@ public class StreamsConnector extends AbstractStreamsConnector implements IDispo
}
/* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl#doDisconnect()
+ * @see org.eclipse.tcf.internal.terminal.provisional.api.provider.TerminalConnectorImpl#doDisconnect()
*/
@Override
public void doDisconnect() {
@@ -88,7 +88,7 @@ public class StreamsConnector extends AbstractStreamsConnector implements IDispo
// ***** Process Connector settings handling *****
/* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl#getSettingsSummary()
+ * @see org.eclipse.tcf.internal.terminal.provisional.api.provider.TerminalConnectorImpl#getSettingsSummary()
*/
@Override
public String getSettingsSummary() {
@@ -96,7 +96,7 @@ public class StreamsConnector extends AbstractStreamsConnector implements IDispo
}
/* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl#load(org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore)
+ * @see org.eclipse.tcf.internal.terminal.provisional.api.provider.TerminalConnectorImpl#load(org.eclipse.tcf.internal.terminal.provisional.api.ISettingsStore)
*/
@Override
public void load(ISettingsStore store) {
@@ -104,7 +104,7 @@ public class StreamsConnector extends AbstractStreamsConnector implements IDispo
}
/* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl#save(org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore)
+ * @see org.eclipse.tcf.internal.terminal.provisional.api.provider.TerminalConnectorImpl#save(org.eclipse.tcf.internal.terminal.provisional.api.ISettingsStore)
*/
@Override
public void save(ISettingsStore store) {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/streams/StreamsSettings.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/streams/StreamsSettings.java
index 66118342c..ad78d7af4 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/streams/StreamsSettings.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/streams/StreamsSettings.java
@@ -7,14 +7,14 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.terminals.streams;
+package org.eclipse.tcf.te.ui.terminals.streams;
import java.io.InputStream;
import java.io.OutputStream;
import org.eclipse.core.runtime.Assert;
import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore;
-import org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
/**
* Streams connector settings implementation.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/tabs/TabDisposeListener.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/tabs/TabDisposeListener.java
index 09f7783a8..bfe352682 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/tabs/TabDisposeListener.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/tabs/TabDisposeListener.java
@@ -7,15 +7,15 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.terminals.tabs;
+package org.eclipse.tcf.te.ui.terminals.tabs;
import org.eclipse.core.runtime.Assert;
import org.eclipse.swt.custom.CTabItem;
import org.eclipse.swt.events.DisposeEvent;
import org.eclipse.swt.events.DisposeListener;
import org.eclipse.tm.internal.terminal.control.ITerminalViewControl;
-import org.eclipse.tm.te.runtime.events.DisposedEvent;
-import org.eclipse.tm.te.runtime.events.EventManager;
+import org.eclipse.tcf.te.runtime.events.DisposedEvent;
+import org.eclipse.tcf.te.runtime.events.EventManager;
/**
* Terminals tab default dispose listener implementation.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/tabs/TabFolderManager.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/tabs/TabFolderManager.java
index 491548ec4..c06c0367b 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/tabs/TabFolderManager.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/tabs/TabFolderManager.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.terminals.tabs;
+package org.eclipse.tcf.te.ui.terminals.tabs;
import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
@@ -37,18 +37,18 @@ import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Menu;
+import org.eclipse.tcf.te.ui.terminals.activator.UIPlugin;
+import org.eclipse.tcf.te.ui.terminals.events.SelectionChangedBroadcastEvent;
+import org.eclipse.tcf.te.ui.terminals.interfaces.ITerminalsView;
+import org.eclipse.tcf.te.ui.terminals.interfaces.ImageConsts;
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.provisional.api.ITerminalConnector;
import org.eclipse.tm.internal.terminal.provisional.api.TerminalState;
-import org.eclipse.tm.te.runtime.events.EventManager;
-import org.eclipse.tm.te.ui.events.AbstractEventListener;
-import org.eclipse.tm.te.ui.swt.DisplayUtil;
-import org.eclipse.tm.te.ui.terminals.activator.UIPlugin;
-import org.eclipse.tm.te.ui.terminals.events.SelectionChangedBroadcastEvent;
-import org.eclipse.tm.te.ui.terminals.interfaces.ITerminalsView;
-import org.eclipse.tm.te.ui.terminals.interfaces.ImageConsts;
+import org.eclipse.tcf.te.runtime.events.EventManager;
+import org.eclipse.tcf.te.ui.events.AbstractEventListener;
+import org.eclipse.tcf.te.ui.swt.DisplayUtil;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.ide.IDEEncoding;
@@ -166,7 +166,7 @@ public class TabFolderManager extends PlatformObject implements ISelectionProvid
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.events.IEventListener#eventFired(java.util.EventObject)
+ * @see org.eclipse.tcf.te.runtime.interfaces.events.IEventListener#eventFired(java.util.EventObject)
*/
@Override
public void eventFired(EventObject event) {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/tabs/TabFolderMenuHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/tabs/TabFolderMenuHandler.java
index 0d1bbe8a9..b3e6cc3f8 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/tabs/TabFolderMenuHandler.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/tabs/TabFolderMenuHandler.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.terminals.tabs;
+package org.eclipse.tcf.te.ui.terminals.tabs;
import java.util.ArrayList;
import java.util.List;
@@ -21,14 +21,14 @@ import org.eclipse.jface.action.Separator;
import org.eclipse.swt.custom.CTabFolder;
import org.eclipse.swt.custom.CTabItem;
import org.eclipse.swt.widgets.Menu;
+import org.eclipse.tcf.te.ui.terminals.actions.TabScrollLockAction;
+import org.eclipse.tcf.te.ui.terminals.interfaces.ITerminalsView;
import org.eclipse.tm.internal.terminal.control.ITerminalViewControl;
import org.eclipse.tm.internal.terminal.control.actions.AbstractTerminalAction;
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.TerminalActionPaste;
import org.eclipse.tm.internal.terminal.control.actions.TerminalActionSelectAll;
-import org.eclipse.tm.te.ui.terminals.actions.TabScrollLockAction;
-import org.eclipse.tm.te.ui.terminals.interfaces.ITerminalsView;
import org.eclipse.ui.IWorkbenchActionConstants;
/**
@@ -163,7 +163,7 @@ public class TabFolderMenuHandler extends PlatformObject {
// Create and add the copy action
add(new TerminalActionCopy() {
/* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.control.actions.AbstractTerminalAction#getTarget()
+ * @see org.eclipse.tcf.internal.terminal.control.actions.AbstractTerminalAction#getTarget()
*/
@Override
protected ITerminalViewControl getTarget() {
@@ -174,7 +174,7 @@ public class TabFolderMenuHandler extends PlatformObject {
// Create and add the paste action
add(new TerminalActionPaste() {
/* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.control.actions.AbstractTerminalAction#getTarget()
+ * @see org.eclipse.tcf.internal.terminal.control.actions.AbstractTerminalAction#getTarget()
*/
@Override
protected ITerminalViewControl getTarget() {
@@ -185,7 +185,7 @@ public class TabFolderMenuHandler extends PlatformObject {
// Create and add the clear all action
add(new TerminalActionClearAll() {
/* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.control.actions.AbstractTerminalAction#getTarget()
+ * @see org.eclipse.tcf.internal.terminal.control.actions.AbstractTerminalAction#getTarget()
*/
@Override
protected ITerminalViewControl getTarget() {
@@ -196,7 +196,7 @@ public class TabFolderMenuHandler extends PlatformObject {
// Create and add the select all action
add(new TerminalActionSelectAll() {
/* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.control.actions.AbstractTerminalAction#getTarget()
+ * @see org.eclipse.tcf.internal.terminal.control.actions.AbstractTerminalAction#getTarget()
*/
@Override
protected ITerminalViewControl getTarget() {
@@ -207,7 +207,7 @@ public class TabFolderMenuHandler extends PlatformObject {
// Create and add the scroll lock action
add (new TabScrollLockAction() {
/* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.control.actions.AbstractTerminalAction#getTarget()
+ * @see org.eclipse.tcf.internal.terminal.control.actions.AbstractTerminalAction#getTarget()
*/
@Override
protected ITerminalViewControl getTarget() {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/tabs/TabFolderSelectionListener.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/tabs/TabFolderSelectionListener.java
index de25ec3ea..e14255319 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/tabs/TabFolderSelectionListener.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/tabs/TabFolderSelectionListener.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.terminals.tabs;
+package org.eclipse.tcf.te.ui.terminals.tabs;
import org.eclipse.core.runtime.Assert;
import org.eclipse.swt.events.SelectionEvent;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/tabs/TabFolderToolbarHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/tabs/TabFolderToolbarHandler.java
index a291f00f8..12c366456 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/tabs/TabFolderToolbarHandler.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/tabs/TabFolderToolbarHandler.java
@@ -6,8 +6,9 @@
*
* Contributors:
* Wind River Systems - initial API and implementation
+ * Max Weninger (Wind River) - [361363] [TERMINALS] Implement "Pin&Clone" for the "Terminals" view
*******************************************************************************/
-package org.eclipse.tm.te.ui.terminals.tabs;
+package org.eclipse.tcf.te.ui.terminals.tabs;
import java.util.ArrayList;
import java.util.List;
@@ -21,14 +22,15 @@ import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.swt.custom.CTabFolder;
import org.eclipse.swt.custom.CTabItem;
+import org.eclipse.tcf.te.ui.terminals.actions.AbstractAction;
+import org.eclipse.tcf.te.ui.terminals.actions.PinTerminalAction;
+import org.eclipse.tcf.te.ui.terminals.actions.TabScrollLockAction;
+import org.eclipse.tcf.te.ui.terminals.interfaces.ITerminalsView;
import org.eclipse.tm.internal.terminal.control.ITerminalViewControl;
import org.eclipse.tm.internal.terminal.control.actions.AbstractTerminalAction;
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.TerminalActionPaste;
-import org.eclipse.tm.te.ui.terminals.actions.AbstractAction;
-import org.eclipse.tm.te.ui.terminals.actions.TabScrollLockAction;
-import org.eclipse.tm.te.ui.terminals.interfaces.ITerminalsView;
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.IWorkbenchActionConstants;
@@ -195,7 +197,7 @@ public class TabFolderToolbarHandler extends PlatformObject {
// Create and add the paste action
add(new TerminalActionPaste() {
/* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.control.actions.AbstractTerminalAction#getTarget()
+ * @see org.eclipse.tcf.internal.terminal.control.actions.AbstractTerminalAction#getTarget()
*/
@Override
protected ITerminalViewControl getTarget() {
@@ -206,7 +208,7 @@ public class TabFolderToolbarHandler extends PlatformObject {
// Create and add the copy action
add(new TerminalActionCopy() {
/* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.control.actions.AbstractTerminalAction#getTarget()
+ * @see org.eclipse.tcf.internal.terminal.control.actions.AbstractTerminalAction#getTarget()
*/
@Override
protected ITerminalViewControl getTarget() {
@@ -217,7 +219,7 @@ public class TabFolderToolbarHandler extends PlatformObject {
// Create and add the scroll lock action
add (new TabScrollLockAction() {
/* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.control.actions.AbstractTerminalAction#getTarget()
+ * @see org.eclipse.tcf.internal.terminal.control.actions.AbstractTerminalAction#getTarget()
*/
@Override
protected ITerminalViewControl getTarget() {
@@ -228,6 +230,17 @@ public class TabFolderToolbarHandler extends PlatformObject {
// Create and add the clear all action
add(new TerminalActionClearAll() {
/* (non-Javadoc)
+ * @see org.eclipse.tcf.internal.terminal.control.actions.AbstractTerminalAction#getTarget()
+ */
+ @Override
+ protected ITerminalViewControl getTarget() {
+ return getActiveTerminalViewControl();
+ }
+ });
+
+ // Create and add the pin view action
+ add (new PinTerminalAction(getParentView()) {
+ /* (non-Javadoc)
* @see org.eclipse.tm.internal.terminal.control.actions.AbstractTerminalAction#getTarget()
*/
@Override
@@ -251,6 +264,9 @@ public class TabFolderToolbarHandler extends PlatformObject {
manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
manager.add(new Separator("anchor")); //$NON-NLS-1$
+ // we want that at the end
+ PinTerminalAction pinAction=null;
+
// Loop all actions and add them to the menu manager
for (AbstractTerminalAction action : toolbarActions) {
// Add a separator before the clear all action or if the action is a separator
@@ -258,9 +274,18 @@ public class TabFolderToolbarHandler extends PlatformObject {
|| (action instanceof AbstractAction && ((AbstractAction)action).isSeparator())) {
manager.insertAfter("anchor", new Separator()); //$NON-NLS-1$
}
+ // skip pin action for now
+ if(action instanceof PinTerminalAction){
+ pinAction=(PinTerminalAction)action;
+ continue;
+ }
// Add the action itself
manager.insertAfter("anchor", action); //$NON-NLS-1$
}
+ // now add pin at the end
+ if(pinAction!=null){
+ manager.add(pinAction);
+ }
}
/**
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/tabs/TabPropertyChangeListener.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/tabs/TabPropertyChangeListener.java
index b84b8ee83..453fb70d6 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/tabs/TabPropertyChangeListener.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/tabs/TabPropertyChangeListener.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.terminals.tabs;
+package org.eclipse.tcf.te.ui.terminals.tabs;
import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.resource.JFaceResources;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/tabs/TabTerminalListener.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/tabs/TabTerminalListener.java
index 0ffa15d5e..752dc12b1 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/tabs/TabTerminalListener.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/tabs/TabTerminalListener.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.terminals.tabs;
+package org.eclipse.tcf.te.ui.terminals.tabs;
import java.util.regex.Pattern;
@@ -15,9 +15,9 @@ import org.eclipse.core.runtime.Assert;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.custom.CTabItem;
import org.eclipse.swt.widgets.Display;
+import org.eclipse.tcf.te.ui.terminals.nls.Messages;
import org.eclipse.tm.internal.terminal.control.ITerminalListener;
import org.eclipse.tm.internal.terminal.provisional.api.TerminalState;
-import org.eclipse.tm.te.ui.terminals.nls.Messages;
/**
* Terminals tab default terminal listener implementation.
@@ -47,7 +47,7 @@ public class TabTerminalListener implements ITerminalListener {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.control.ITerminalListener#setState(org.eclipse.tm.internal.terminal.provisional.api.TerminalState)
+ * @see org.eclipse.tcf.internal.terminal.control.ITerminalListener#setState(org.eclipse.tcf.internal.terminal.provisional.api.TerminalState)
*/
@Override
public void setState(final TerminalState state) {
@@ -104,7 +104,7 @@ public class TabTerminalListener implements ITerminalListener {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.control.ITerminalListener#setTerminalTitle(java.lang.String)
+ * @see org.eclipse.tcf.internal.terminal.control.ITerminalListener#setTerminalTitle(java.lang.String)
*/
@Override
public void setTerminalTitle(String title) {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/types/AbstractConnectorType.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/types/AbstractConnectorType.java
index fef945f7d..bef1abee9 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/types/AbstractConnectorType.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/types/AbstractConnectorType.java
@@ -7,10 +7,10 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.terminals.types;
+package org.eclipse.tcf.te.ui.terminals.types;
-import org.eclipse.tm.te.runtime.extensions.ExecutableExtension;
-import org.eclipse.tm.te.ui.terminals.interfaces.IConnectorType;
+import org.eclipse.tcf.te.ui.terminals.interfaces.IConnectorType;
+import org.eclipse.tcf.te.runtime.extensions.ExecutableExtension;
/**
* Abstract terminal connector type implementation.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/types/ConnectorManager.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/types/ConnectorManager.java
index 9b4cebe35..156571e05 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/types/ConnectorManager.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/types/ConnectorManager.java
@@ -7,15 +7,15 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.terminals.types;
+package org.eclipse.tcf.te.ui.terminals.types;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
-import org.eclipse.tm.te.runtime.extensions.AbstractExtensionPointManager;
-import org.eclipse.tm.te.runtime.extensions.ExecutableExtensionProxy;
-import org.eclipse.tm.te.ui.terminals.interfaces.IConnectorType;
+import org.eclipse.tcf.te.ui.terminals.interfaces.IConnectorType;
+import org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager;
+import org.eclipse.tcf.te.runtime.extensions.ExecutableExtensionProxy;
/**
* Terminal connector type extension point manager implementation.
@@ -44,15 +44,15 @@ public class ConnectorManager extends AbstractExtensionPointManager<IConnectorTy
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.extensions.AbstractExtensionPointManager#getExtensionPointId()
+ * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#getExtensionPointId()
*/
@Override
protected String getExtensionPointId() {
- return "org.eclipse.tm.te.ui.terminals.connectorTypes"; //$NON-NLS-1$
+ return "org.eclipse.tcf.te.ui.terminals.connectorTypes"; //$NON-NLS-1$
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.extensions.AbstractExtensionPointManager#getConfigurationElementName()
+ * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#getConfigurationElementName()
*/
@Override
protected String getConfigurationElementName() {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/types/StreamsConnectorType.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/types/StreamsConnectorType.java
index 5fbf1af74..b14b07e1d 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/types/StreamsConnectorType.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/types/StreamsConnectorType.java
@@ -7,19 +7,19 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.terminals.types;
+package org.eclipse.tcf.te.ui.terminals.types;
import java.io.InputStream;
import java.io.OutputStream;
import org.eclipse.core.runtime.Assert;
+import org.eclipse.tcf.te.ui.terminals.internal.SettingsStore;
+import org.eclipse.tcf.te.ui.terminals.streams.StreamsSettings;
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.TerminalConnectorExtension;
-import org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer;
-import org.eclipse.tm.te.runtime.services.interfaces.constants.ITerminalsConnectorConstants;
-import org.eclipse.tm.te.ui.terminals.internal.SettingsStore;
-import org.eclipse.tm.te.ui.terminals.streams.StreamsSettings;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.runtime.services.interfaces.constants.ITerminalsConnectorConstants;
/**
* Streams terminal connector type implementation.
@@ -28,7 +28,7 @@ import org.eclipse.tm.te.ui.terminals.streams.StreamsSettings;
public class StreamsConnectorType extends AbstractConnectorType {
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.terminals.interfaces.IConnectorType#createTerminalConnector(org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer)
+ * @see org.eclipse.tcf.te.ui.terminals.interfaces.IConnectorType#createTerminalConnector(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer)
*/
@Override
public ITerminalConnector createTerminalConnector(IPropertiesContainer properties) {
@@ -36,7 +36,7 @@ public class StreamsConnectorType extends AbstractConnectorType {
// Check for the terminal connector id
String connectorId = properties.getStringProperty(ITerminalsConnectorConstants.PROP_TERMINAL_CONNECTOR_ID);
- if (connectorId == null) connectorId = "org.eclipse.tm.te.ui.terminals.StreamsConnector"; //$NON-NLS-1$
+ if (connectorId == null) connectorId = "org.eclipse.tcf.te.ui.terminals.StreamsConnector"; //$NON-NLS-1$
// Extract the streams properties
OutputStream stdin = (OutputStream)properties.getProperty(ITerminalsConnectorConstants.PROP_STREAMS_STDIN);
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/types/TelnetConnectorType.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/types/TelnetConnectorType.java
index e1eee24e8..48d58897a 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/types/TelnetConnectorType.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/types/TelnetConnectorType.java
@@ -7,16 +7,16 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.terminals.types;
+package org.eclipse.tcf.te.ui.terminals.types;
import org.eclipse.core.runtime.Assert;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.runtime.services.interfaces.constants.ITerminalsConnectorConstants;
+import org.eclipse.tcf.te.ui.terminals.internal.SettingsStore;
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.TerminalConnectorExtension;
import org.eclipse.tm.internal.terminal.telnet.TelnetSettings;
-import org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer;
-import org.eclipse.tm.te.runtime.services.interfaces.constants.ITerminalsConnectorConstants;
-import org.eclipse.tm.te.ui.terminals.internal.SettingsStore;
/**
* Telnet terminal connector type implementation.
@@ -25,7 +25,7 @@ import org.eclipse.tm.te.ui.terminals.internal.SettingsStore;
public class TelnetConnectorType extends AbstractConnectorType {
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.terminals.interfaces.IConnectorType#createTerminalConnector(org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer)
+ * @see org.eclipse.tcf.te.ui.terminals.interfaces.IConnectorType#createTerminalConnector(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer)
*/
@Override
public ITerminalConnector createTerminalConnector(IPropertiesContainer properties) {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/view/TerminalsView.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/view/TerminalsView.java
index 29445d972..30130dbd9 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/view/TerminalsView.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/view/TerminalsView.java
@@ -6,8 +6,9 @@
*
* Contributors:
* Wind River Systems - initial API and implementation
+ * Max Weninger (Wind River) - [361363] [TERMINALS] Implement "Pin&Clone" for the "Terminals" view
*******************************************************************************/
-package org.eclipse.tm.te.ui.terminals.view;
+package org.eclipse.tcf.te.ui.terminals.view;
import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.resource.JFaceResources;
@@ -18,10 +19,11 @@ 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.tm.te.ui.terminals.interfaces.ITerminalsView;
-import org.eclipse.tm.te.ui.terminals.tabs.TabFolderManager;
-import org.eclipse.tm.te.ui.terminals.tabs.TabFolderMenuHandler;
-import org.eclipse.tm.te.ui.terminals.tabs.TabFolderToolbarHandler;
+import org.eclipse.tcf.te.ui.terminals.interfaces.ITerminalsView;
+import org.eclipse.tcf.te.ui.terminals.tabs.TabFolderManager;
+import org.eclipse.tcf.te.ui.terminals.tabs.TabFolderMenuHandler;
+import org.eclipse.tcf.te.ui.terminals.tabs.TabFolderToolbarHandler;
+import org.eclipse.ui.IViewSite;
import org.eclipse.ui.IWorkbenchPreferenceConstants;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.part.PageBook;
@@ -44,6 +46,8 @@ public class TerminalsView extends ViewPart implements ITerminalsView {
private TabFolderToolbarHandler tabFolderToolbarHandler;
// Reference to the empty page control (to be show if no console is open)
private Control emptyPageControl;
+ // Whether this terminal is pinned.
+ private boolean pinned = false;
/**
* Constructor.
@@ -108,6 +112,13 @@ public class TerminalsView extends ViewPart implements ITerminalsView {
// Show the empty page control by default
switchToEmptyPageControl();
+
+ String secondaryId=((IViewSite)getSite()).getSecondaryId();
+ if(secondaryId!=null){
+ String defaultTitle=getPartName();
+ // set title
+ setPartName(defaultTitle+ " "+secondaryId); //$NON-NLS-1$
+ }
}
/**
@@ -274,7 +285,7 @@ public class TerminalsView extends ViewPart implements ITerminalsView {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.terminals.interfaces.ITerminalsView#switchToEmptyPageControl()
+ * @see org.eclipse.tcf.te.ui.terminals.interfaces.ITerminalsView#switchToEmptyPageControl()
*/
@Override
public void switchToEmptyPageControl() {
@@ -282,7 +293,7 @@ public class TerminalsView extends ViewPart implements ITerminalsView {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.terminals.interfaces.ITerminalsView#switchToTabFolderControl()
+ * @see org.eclipse.tcf.te.ui.terminals.interfaces.ITerminalsView#switchToTabFolderControl()
*/
@Override
public void switchToTabFolderControl() {
@@ -306,4 +317,20 @@ public class TerminalsView extends ViewPart implements ITerminalsView {
return super.getAdapter(adapter);
}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.terminals.interfaces.ITerminalsView#setPinned(boolean)
+ */
+ @Override
+ public void setPinned(boolean pin) {
+ this.pinned = pin;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.terminals.interfaces.ITerminalsView#isPinned()
+ */
+ @Override
+ public boolean isPinned() {
+ return pinned;
+ }
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/.classpath b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/.classpath
new file mode 100644
index 000000000..8a8f1668c
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/.options b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/.options
new file mode 100644
index 000000000..f4eca9121
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/.options
@@ -0,0 +1,3 @@
+org.eclipse.tcf.te.ui.views/debugmode = 0
+
+org.eclipse.tcf.te.ui.views/trace/editor/eventListener = false
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.views/.project b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/.project
index fb2b5e561..41bb64a1e 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.views/.project
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/.project
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.eclipse.tm.te.ui.views</name>
+ <name>org.eclipse.tcf.te.ui.views</name>
<comment></comment>
<projects>
</projects>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.views/.settings/org.eclipse.jdt.core.prefs b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/.settings/org.eclipse.jdt.core.prefs
index 40a7ec7b2..40a7ec7b2 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.views/.settings/org.eclipse.jdt.core.prefs
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/.settings/org.eclipse.jdt.core.prefs
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.views/.settings/org.eclipse.jdt.ui.prefs b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/.settings/org.eclipse.jdt.ui.prefs
index 6d729a2fe..6d729a2fe 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.views/.settings/org.eclipse.jdt.ui.prefs
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/.settings/org.eclipse.jdt.ui.prefs
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..36cd01b52
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/META-INF/MANIFEST.MF
@@ -0,0 +1,41 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.tcf.te.ui.views;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipse.tcf.te.ui.views.activator.UIPlugin
+Bundle-Vendor: %providerName
+Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
+ org.eclipse.core.expressions;bundle-version="3.4.300",
+ org.eclipse.ui;bundle-version="3.7.0",
+ org.eclipse.ui.forms;bundle-version="3.5.100",
+ org.eclipse.ui.navigator;bundle-version="3.5.100",
+ org.eclipse.tcf.te.runtime;bundle-version="1.0.0",
+ org.eclipse.tcf.te.runtime.model;bundle-version="1.0.0",
+ org.eclipse.tcf.te.ui;bundle-version="1.0.0",
+ org.eclipse.tcf.te.ui.forms;bundle-version="1.0.0",
+ org.eclipse.ui.views.properties.tabbed;bundle-version="3.5.200"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
+Bundle-Localization: plugin
+Export-Package: org.eclipse.tcf.te.ui.views,
+ org.eclipse.tcf.te.ui.views.actions,
+ org.eclipse.tcf.te.ui.views.activator;x-internal:=true,
+ org.eclipse.tcf.te.ui.views.editor,
+ org.eclipse.tcf.te.ui.views.editor.pages,
+ org.eclipse.tcf.te.ui.views.events,
+ org.eclipse.tcf.te.ui.views.expressions,
+ org.eclipse.tcf.te.ui.views.extensions,
+ org.eclipse.tcf.te.ui.views.handler,
+ org.eclipse.tcf.te.ui.views.interfaces,
+ org.eclipse.tcf.te.ui.views.interfaces.tracing;x-internal:=true,
+ org.eclipse.tcf.te.ui.views.interfaces.workingsets,
+ org.eclipse.tcf.te.ui.views.internal;x-internal:=true,
+ org.eclipse.tcf.te.ui.views.listeners,
+ org.eclipse.tcf.te.ui.views.nls;x-internal:=true,
+ org.eclipse.tcf.te.ui.views.perspective,
+ org.eclipse.tcf.te.ui.views.tabbed,
+ org.eclipse.tcf.te.ui.views.workingsets,
+ org.eclipse.tcf.te.ui.views.workingsets.actions,
+ org.eclipse.tcf.te.ui.views.workingsets.dialogs,
+ org.eclipse.tcf.te.ui.views.workingsets.pages
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.views/build.properties b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/build.properties
index 2b24d2258..2b24d2258 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.views/build.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/build.properties
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.views/icons/eview16/editor.gif b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/icons/eview16/editor.gif
index 9ca749bbd..9ca749bbd 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.views/icons/eview16/editor.gif
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/icons/eview16/editor.gif
Binary files differ
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.views/icons/eview16/prop_ps.gif b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/icons/eview16/prop_ps.gif
index d11c996e5..d11c996e5 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.views/icons/eview16/prop_ps.gif
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/icons/eview16/prop_ps.gif
Binary files differ
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.views/icons/eview16/targets_view.gif b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/icons/eview16/targets_view.gif
index 9ca749bbd..9ca749bbd 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.views/icons/eview16/targets_view.gif
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/icons/eview16/targets_view.gif
Binary files differ
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/icons/obj16/workingset.gif b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/icons/obj16/workingset.gif
new file mode 100644
index 000000000..d46c5370d
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/icons/obj16/workingset.gif
Binary files differ
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.views/icons/obj16/workingsets.gif b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/icons/obj16/workingsets.gif
index fa8c9f758..fa8c9f758 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.views/icons/obj16/workingsets.gif
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/icons/obj16/workingsets.gif
Binary files differ
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.views/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/plugin.properties
index cd9aa991c..6da4f4a5c 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.views/plugin.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/plugin.properties
@@ -37,13 +37,18 @@ filters.workingSet.description=Hides unselected working sets [not visible in UI]
workingsets.extension.name=Working Sets
workingset.name=Target Explorer
-workingset.description=Working set for Target Explorer elements.
+workingset.description=Target Explorer working sets.
-workingset.others.name=Other Targets
-workingset.others.description=Working set containing all elements not in any Target Explorer group.
+workingset.others.name=Other
+workingset.others.description=Working set containing all elements not in any group.
# ***** Command and menu contributions *****
Command.open.name=Open
PropertiesAction.label=P&roperties
PropertiesAction.tooltip=Show Properties of Selection
+
+menu.showIn.label = Show In
+menu.properties.label = Properties
+
+command.showInProperties.label = Show In Properties
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.views/plugin.xml b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/plugin.xml
index bc8fa7e3a..c9998610f 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.views/plugin.xml
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/plugin.xml
@@ -7,10 +7,10 @@
<!-- Common Navigator contributions -->
<extension point="org.eclipse.ui.navigator.viewer">
<viewer
- helpContext="org.eclipse.tm.te.ui.views.TargetExplorer"
- viewerId="org.eclipse.tm.te.ui.views.TargetExplorer">
+ helpContext="org.eclipse.tcf.te.ui.views.TargetExplorer"
+ viewerId="org.eclipse.tcf.te.ui.views.TargetExplorer">
<popupMenu
- id="org.eclipse.tm.te.ui.views.TargetExplorer#Popup"
+ id="org.eclipse.tcf.te.ui.views.TargetExplorer#Popup"
allowsPlatformContributions="true">
<insertionPoint name="group.new" separator="true"/>
<insertionPoint name="group.goto"/>
@@ -18,7 +18,9 @@
<insertionPoint name="group.expand"/>
<insertionPoint name="group.open" separator="true"/>
<insertionPoint name="group.openWith"/>
+ <insertionPoint name="group.showIn"/>
<insertionPoint name="group.connect" separator="true"/>
+ <insertionPoint name="group.redirect" separator="true"/>
<insertionPoint name="group.symbols" separator="true"/>
<insertionPoint name="group.symbols.rd"/>
<insertionPoint name="group.symbols.loadunload"/>
@@ -51,20 +53,20 @@
</options>
</viewer>
- <viewerContentBinding viewerId="org.eclipse.tm.te.ui.views.TargetExplorer">
+ <viewerContentBinding viewerId="org.eclipse.tcf.te.ui.views.TargetExplorer">
<includes>
<contentExtension
isRoot="true"
- pattern="org.eclipse.tm.te.ui.views.navigator.content.workingSets"/>
- <contentExtension pattern="org.eclipse.tm.te.ui.views.navigator.filters.*"/>
+ pattern="org.eclipse.tcf.te.ui.views.navigator.content.workingSets"/>
+ <contentExtension pattern="org.eclipse.tcf.te.ui.views.navigator.filters.*"/>
</includes>
</viewerContentBinding>
<viewerActionBinding
- viewerId="org.eclipse.tm.te.ui.views.TargetExplorer">
+ viewerId="org.eclipse.tcf.te.ui.views.TargetExplorer">
<includes>
<actionExtension
- pattern="org.eclipse.tm.te.ui.views.navigator.actions.*">
+ pattern="org.eclipse.tcf.te.ui.views.navigator.actions.*">
</actionExtension>
</includes>
</viewerActionBinding>
@@ -72,20 +74,18 @@
<extension point="org.eclipse.ui.navigator.navigatorContent">
-<!-- Default navigator sorter contribution -->
-
<!-- Default navigator action contributions -->
<actionProvider
- class="org.eclipse.tm.te.ui.views.actions.NewActionProvider"
- id="org.eclipse.tm.te.ui.views.navigator.actions.NewActionProvider">
+ class="org.eclipse.tcf.te.ui.views.actions.NewActionProvider"
+ id="org.eclipse.tcf.te.ui.views.navigator.actions.NewActionProvider">
<enablement>
</enablement>
</actionProvider>
<!-- Working Sets navigator action contributions -->
<actionProvider
- class="org.eclipse.tm.te.ui.views.actions.WorkingSetActionProvider"
- id="org.eclipse.tm.te.ui.views.navigator.actions.WorkingSetActions">
+ class="org.eclipse.tcf.te.ui.views.workingsets.actions.WorkingSetActionProvider"
+ id="org.eclipse.tcf.te.ui.views.navigator.actions.WorkingSetActions">
<enablement>
<or>
<adapt type="java.lang.Object" />
@@ -98,31 +98,39 @@
<!-- Working Sets navigator content contributions -->
<commonFilter
- id="org.eclipse.tm.te.ui.views.navigator.filters.workingSet"
+ id="org.eclipse.tcf.te.ui.views.navigator.filters.workingSet"
name="%filters.workingSet.name"
description="%filters.workingSet.description"
- class="org.eclipse.tm.te.ui.views.workingsets.WorkingSetFilter"
+ class="org.eclipse.tcf.te.ui.views.workingsets.WorkingSetFilter"
activeByDefault="false"
visibleInUI="false">
</commonFilter>
<navigatorContent
activeByDefault="true"
- contentProvider="org.eclipse.tm.te.ui.views.workingsets.WorkingSetsContentProvider"
+ contentProvider="org.eclipse.tcf.te.ui.views.workingsets.WorkingSetsContentProvider"
icon="icons/obj16/workingsets.gif"
- id="org.eclipse.tm.te.ui.views.navigator.content.workingSets"
- labelProvider="org.eclipse.tm.te.ui.views.workingsets.WorkingSetsLabelProvider"
+ id="org.eclipse.tcf.te.ui.views.navigator.content.workingSets"
+ labelProvider="org.eclipse.tcf.te.ui.views.workingsets.WorkingSetsLabelProvider"
name="%workingsets.extension.name"
priority="higher">
<triggerPoints>
- <instanceof value="org.eclipse.ui.IWorkingSet"/>
+ <or>
+ <instanceof value="org.eclipse.tcf.te.ui.views.workingsets.WorkingSetViewStateManager"/>
+ <instanceof value="org.eclipse.ui.IWorkingSet"/>
+ <instanceof value="org.eclipse.tcf.te.ui.views.workingsets.WorkingSetElementHolder"/>
+ </or>
</triggerPoints>
<possibleChildren>
- <instanceof value="java.lang.Object"/>
+ <or>
+ <instanceof value="org.eclipse.tcf.te.ui.views.workingsets.WorkingSetViewStateManager"/>
+ <instanceof value="org.eclipse.ui.IWorkingSet"/>
+ <instanceof value="org.eclipse.tcf.te.ui.views.workingsets.WorkingSetElementHolder"/>
+ </or>
</possibleChildren>
<commonSorter
- class="org.eclipse.tm.te.ui.views.workingsets.WorkingSetViewerSorter"
- id="org.eclipse.tm.te.ui.views.navigator.content.workingSets.sorter">
+ class="org.eclipse.tcf.te.ui.views.workingsets.WorkingSetViewerSorter"
+ id="org.eclipse.tcf.te.ui.views.navigator.content.workingSets.sorter">
</commonSorter>
</navigatorContent>
@@ -131,14 +139,14 @@
<!-- View contributions -->
<extension point="org.eclipse.ui.views">
<category
- id="org.eclipse.tm.te.ui.views.category"
+ id="org.eclipse.tcf.te.ui.views.category"
name="%ViewCategory.name">
</category>
<view
- category="org.eclipse.tm.te.ui.views.category"
- class="org.eclipse.tm.te.ui.views.internal.View"
+ category="org.eclipse.tcf.te.ui.views.category"
+ class="org.eclipse.tcf.te.ui.views.internal.View"
icon="icons/eview16/targets_view.gif"
- id="org.eclipse.tm.te.ui.views.TargetExplorer"
+ id="org.eclipse.tcf.te.ui.views.TargetExplorer"
name="%TargetExplorer.name"
restorable="true">
</view>
@@ -147,30 +155,30 @@
<!-- Target Explorer Perspective -->
<extension point="org.eclipse.ui.perspectives">
<perspective
- class="org.eclipse.tm.te.ui.views.perspective.PerspectiveFactory"
+ class="org.eclipse.tcf.te.ui.views.perspective.PerspectiveFactory"
icon="icons/eview16/editor.gif"
- id="org.eclipse.tm.te.ui.perspective"
+ id="org.eclipse.tcf.te.ui.perspective"
name="%Perspective.name">
</perspective>
</extension>
<!-- Perspective contributions -->
<extension point="org.eclipse.ui.perspectiveExtensions">
- <perspectiveExtension targetID="org.eclipse.tm.te.ui.perspective">
+ <perspectiveExtension targetID="org.eclipse.tcf.te.ui.perspective">
<!-- Run/Debug actions should be available -->
<actionSet id="org.eclipse.debug.ui.launchActionSet"/>
<!-- Register the view shortcuts -->
- <viewShortcut id="org.eclipse.tm.te.ui.views.TargetExplorer"/>
+ <viewShortcut id="org.eclipse.tcf.te.ui.views.TargetExplorer"/>
</perspectiveExtension>
</extension>
<!-- Editor contributions -->
<extension point="org.eclipse.ui.editors">
<editor
- class="org.eclipse.tm.te.ui.views.internal.editor.Editor"
+ class="org.eclipse.tcf.te.ui.views.editor.Editor"
default="false"
icon="icons/eview16/prop_ps.gif"
- id="org.eclipse.tm.te.ui.view.Editor"
+ id="org.eclipse.tcf.te.ui.view.Editor"
name="%Editor.name">
</editor>
</extension>
@@ -179,46 +187,50 @@
<extension point="org.eclipse.ui.workingSets">
<workingSet
description="%workingset.description"
- elementAdapterClass="org.eclipse.tm.te.ui.views.workingsets.WorkingSetElementAdapter"
+ elementAdapterClass="org.eclipse.tcf.te.ui.views.workingsets.WorkingSetElementAdapter"
icon="icons/obj16/workingset.gif"
- id="org.eclipse.tm.te.ui.views.workingset"
+ id="org.eclipse.tcf.te.ui.views.workingset"
name="%workingset.name"
- pageClass="org.eclipse.tm.te.ui.views.workingsets.pages.TargetWorkingSetPage"
- updaterClass="org.eclipse.tm.te.ui.views.workingsets.WorkingSetElementUpdater">
+ pageClass="org.eclipse.tcf.te.ui.views.workingsets.pages.TargetWorkingSetPage"
+ updaterClass="org.eclipse.tcf.te.ui.views.workingsets.WorkingSetElementUpdater">
</workingSet>
<workingSet
description="%workingset.others.description"
icon="icons/obj16/workingset.gif"
- id="org.eclipse.tm.te.ui.views.workingset.others"
+ id="org.eclipse.tcf.te.ui.views.workingset.others"
name="%workingset.others.name"
- updaterClass="org.eclipse.tm.te.ui.views.workingsets.OthersWorkingSetElementUpdater">
+ updaterClass="org.eclipse.tcf.te.ui.views.workingsets.OthersWorkingSetElementUpdater">
</workingSet>
</extension>
<!-- Element factories -->
<extension point="org.eclipse.ui.elementFactories">
<factory
- class="org.eclipse.tm.te.ui.views.workingsets.WorkingSetElementHolderFactory"
- id="org.eclipse.tm.te.ui.views.workingsets.WorkingSetElementHolderFactory">
+ class="org.eclipse.tcf.te.ui.views.workingsets.WorkingSetElementHolderFactory"
+ id="org.eclipse.tcf.te.ui.views.workingsets.WorkingSetElementHolderFactory">
+ </factory>
+ <factory
+ class="org.eclipse.tcf.te.ui.views.workingsets.CustomizedOrderComparatorFactory"
+ id="org.eclipse.tcf.te.ui.views.workingsets.CustomizedOrderComparatorFactory">
</factory>
</extension>
<!-- Adapter factories -->
<extension point="org.eclipse.core.runtime.adapters">
<factory
- adaptableType="org.eclipse.tm.te.ui.views.workingsets.WorkingSetElementHolder"
- class="org.eclipse.tm.te.ui.views.workingsets.WorkingSetElementHolderAdapterFactory">
- <adapter type="org.eclipse.tm.te.runtime.interfaces.workingsets.IWorkingSetElement"/>
+ adaptableType="org.eclipse.tcf.te.ui.views.workingsets.WorkingSetElementHolder"
+ class="org.eclipse.tcf.te.ui.views.workingsets.WorkingSetElementHolderAdapterFactory">
+ <adapter type="org.eclipse.tcf.te.runtime.interfaces.workingsets.IWorkingSetElement"/>
</factory>
</extension>
<!-- Target Explorer menu contributions -->
<extension point="org.eclipse.ui.menus">
- <menuContribution locationURI="popup:org.eclipse.tm.te.ui.views.TargetExplorer#Popup?after=group.properties">
+ <menuContribution locationURI="popup:org.eclipse.tcf.te.ui.views.TargetExplorer#Popup?after=group.properties">
<command
commandId="org.eclipse.ui.file.properties"
- helpContextId="org.eclipse.tm.te.ui.views.command_Properties"
+ helpContextId="org.eclipse.tcf.te.ui.views.command_Properties"
id="properties"
label="%PropertiesAction.label"
tooltip="%PropertiesAction.tooltip">
@@ -226,12 +238,24 @@
<with variable="selection">
<count value="1"/>
<iterate operator="and" ifEmpty="false">
- <test property="org.eclipse.tm.te.ui.views.hasApplicableEditorBindings" value="true"/>
+ <test property="org.eclipse.tcf.te.ui.views.hasApplicableEditorBindings" value="true"/>
</iterate>
</with>
</visibleWhen>
</command>
</menuContribution>
+ <menuContribution
+ locationURI="popup:org.eclipse.tcf.te.ui.views.TargetExplorer#Popup?after=group.showIn">
+ <menu
+ label="%menu.showIn.label">
+ <command
+ commandId="org.eclipse.tcf.te.ui.views.command.ShowInProperties"
+ icon="icons/eview16/prop_ps.gif"
+ label="%menu.properties.label"
+ style="push">
+ </command>
+ </menu>
+ </menuContribution>
</extension>
<!-- Command contributions -->
@@ -240,18 +264,24 @@
action id as command.
-->
<command
- categoryId="org.eclipse.tm.te.ui.commands.category"
+ categoryId="org.eclipse.tcf.te.ui.commands.category"
helpContextId="org.eclipse.ui.navigator.Open"
id="org.eclipse.ui.navigator.Open"
name="%Command.open.name">
</command>
+ <command
+ categoryId="org.eclipse.tcf.te.ui.commands.category"
+ helpContextId="org.eclipse.tcf.te.ui.views.command.help_ShowInProperties"
+ id="org.eclipse.tcf.te.ui.views.command.ShowInProperties"
+ name="%command.showInProperties.label">
+ </command>
</extension>
<!-- Handler contributions -->
<extension point="org.eclipse.ui.handlers">
<handler
commandId="org.eclipse.ui.file.properties"
- class="org.eclipse.tm.te.ui.views.handler.PropertiesCommandHandler">
+ class="org.eclipse.tcf.te.ui.views.handler.PropertiesCommandHandler">
<enabledWhen>
<with variable="selection">
<count value="1"/>
@@ -260,11 +290,11 @@
<activeWhen>
<and>
<with variable="activePartId">
- <equals value="org.eclipse.tm.te.ui.views.TargetExplorer"/>
+ <equals value="org.eclipse.tcf.te.ui.views.TargetExplorer"/>
</with>
<with variable="selection">
<iterate operator="and" ifEmpty="false">
- <test property="org.eclipse.tm.te.ui.views.hasApplicableEditorBindings" value="true"/>
+ <test property="org.eclipse.tcf.te.ui.views.hasApplicableEditorBindings" value="true"/>
</iterate>
</with>
</and>
@@ -273,7 +303,7 @@
<handler
commandId="org.eclipse.ui.navigator.Open"
- class="org.eclipse.tm.te.ui.views.handler.OpenCommandHandler">
+ class="org.eclipse.tcf.te.ui.views.handler.OpenCommandHandler">
<enabledWhen>
<with variable="selection">
<count value="1"/>
@@ -281,7 +311,19 @@
</enabledWhen>
<activeWhen>
<with variable="activePartId">
- <equals value="org.eclipse.tm.te.ui.views.TargetExplorer"/>
+ <equals value="org.eclipse.tcf.te.ui.views.TargetExplorer"/>
+ </with>
+ </activeWhen>
+ </handler>
+ <handler
+ class="org.eclipse.tcf.te.ui.views.handler.ShowInPropertiesHandler"
+ commandId="org.eclipse.tcf.te.ui.views.command.ShowInProperties">
+ <activeWhen>
+ <with
+ variable="activePartId">
+ <equals
+ value="org.eclipse.tcf.te.ui.views.TargetExplorer">
+ </equals>
</with>
</activeWhen>
</handler>
@@ -290,12 +332,22 @@
<!-- Eclipse core expressions property tester -->
<extension point="org.eclipse.core.expressions.propertyTesters">
<propertyTester
- class="org.eclipse.tm.te.ui.views.expressions.EditorPropertyTester"
- id="org.eclipse.tm.te.ui.views.EditorPropertyTester"
- namespace="org.eclipse.tm.te.ui.views"
+ class="org.eclipse.tcf.te.ui.views.expressions.EditorPropertyTester"
+ id="org.eclipse.tcf.te.ui.views.EditorPropertyTester"
+ namespace="org.eclipse.tcf.te.ui.views"
properties="hasApplicableEditorBindings"
type="java.lang.Object">
</propertyTester>
</extension>
+ <extension
+ point="org.eclipse.ui.views.properties.tabbed.propertyContributor">
+ <propertyContributor
+ contributorId="org.eclipse.tcf.te.ui"
+ labelProvider="org.eclipse.tcf.te.ui.views.internal.PropertyContributorLabelProvider">
+ <propertyCategory
+ category="target_explorer">
+ </propertyCategory>
+ </propertyContributor>
+ </extension>
</plugin>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/pom.xml b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/pom.xml
new file mode 100644
index 000000000..30467d7d3
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.tcf</groupId>
+ <artifactId>tcf-parent</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../../../pom.xml</relativePath>
+ </parent>
+
+ <version>1.0.0.qualifier</version>
+ <artifactId>org.eclipse.tcf.te.ui.views</artifactId>
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.views/schema/editorPageBindings.exsd b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/schema/editorPageBindings.exsd
index 72955c765..5035c1371 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.views/schema/editorPageBindings.exsd
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/schema/editorPageBindings.exsd
@@ -1,9 +1,9 @@
<?xml version='1.0' encoding='UTF-8'?>
<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.tm.te.ui.views" xmlns="http://www.w3.org/2001/XMLSchema">
+<schema targetNamespace="org.eclipse.tcf.te.ui.views" xmlns="http://www.w3.org/2001/XMLSchema">
<annotation>
<appinfo>
- <meta.schema plugin="org.eclipse.tm.te.ui.views" id="editorPageBindings" name="Target Explorer Editor Page Bindings Extension Point"/>
+ <meta.schema plugin="org.eclipse.tcf.te.ui.views" id="editorPageBindings" name="Target Explorer Editor Page Bindings Extension Point"/>
</appinfo>
<documentation>
This extension point is used to declare the Target Explorer editor page bindings.
@@ -74,7 +74,7 @@
The unique id of the referenced editor page.
</documentation>
<appinfo>
- <meta.attribute kind="identifier" basedOn="org.eclipse.tm.te.ui.views.editorPages/editorPage/@id"/>
+ <meta.attribute kind="identifier" basedOn="org.eclipse.tcf.te.ui.views.editorPages/editorPage/@id"/>
</appinfo>
</annotation>
</attribute>
@@ -84,7 +84,7 @@
The id of the page this page shall be inserted before, or &quot;first&quot; to insert it at the beginning of the stack. If &quot;insertBefore&quot; is specified non-empty, it will eclipse the &quot;insertAfter&quot; attribute. If neither &quot;insertBefore&quot; or &quot;insertAfter&quot; is specified, the page will be inserted at the end of the stack.
</documentation>
<appinfo>
- <meta.attribute kind="identifier" basedOn="org.eclipse.tm.te.ui.views.editorPages/editorPage/@id"/>
+ <meta.attribute kind="identifier" basedOn="org.eclipse.tcf.te.ui.views.editorPages/editorPage/@id"/>
</appinfo>
</annotation>
<simpleType>
@@ -100,7 +100,7 @@
The id of the page this page shall be inserted after, or &quot;last&quot; to insert it at the end of the stack. If &quot;insertBefore&quot; is specified non-empty, it will eclipse the &quot;insertAfter&quot; attribute. If neither &quot;insertBefore&quot; or &quot;insertAfter&quot; is specified, the page will be inserted at the end of the stack.
</documentation>
<appinfo>
- <meta.attribute kind="identifier" basedOn="org.eclipse.tm.te.ui.views.editorPages/editorPage/@id"/>
+ <meta.attribute kind="identifier" basedOn="org.eclipse.tcf.te.ui.views.editorPages/editorPage/@id"/>
</appinfo>
</annotation>
<simpleType>
@@ -128,10 +128,10 @@
</appinfo>
<documentation>
&lt;pre&gt;
- &lt;extension point=&quot;org.eclipse.tm.te.ui.views.editorPageBindings&quot;&gt;
+ &lt;extension point=&quot;org.eclipse.tcf.te.ui.views.editorPageBindings&quot;&gt;
&lt;editorPageBinding
- id=&quot;org.eclipse.tm.te.tcf.binding.TcfPeerPropertiesPage&quot;
- pageId=&quot;org.eclipse.tm.te.tcf.ui.TcfPeerPropertiesPage&quot;&gt;
+ id=&quot;org.eclipse.tcf.te.tcf.binding.TcfPeerPropertiesPage&quot;
+ pageId=&quot;org.eclipse.tcf.te.tcf.ui.TcfPeerPropertiesPage&quot;&gt;
&lt;enablement&gt;
&lt;with variable=&quot;activeEditorInput&quot;&gt;
...
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.views/schema/editorPages.exsd b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/schema/editorPages.exsd
index 6c76732ae..7f9357a49 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.views/schema/editorPages.exsd
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/schema/editorPages.exsd
@@ -1,9 +1,9 @@
<?xml version='1.0' encoding='UTF-8'?>
<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.tm.te.ui.views" xmlns="http://www.w3.org/2001/XMLSchema">
+<schema targetNamespace="org.eclipse.tcf.te.ui.views" xmlns="http://www.w3.org/2001/XMLSchema">
<annotation>
<appinfo>
- <meta.schema plugin="org.eclipse.tm.te.ui.views" id="editorPages" name="Target Explorer Editor Pages Extension Point"/>
+ <meta.schema plugin="org.eclipse.tcf.te.ui.views" id="editorPages" name="Target Explorer Editor Pages Extension Point"/>
</appinfo>
<documentation>
This extension point is used to allow the contribution of new Target Explorer editor pages.
@@ -71,12 +71,12 @@
<attribute name="class" type="string" use="required">
<annotation>
<documentation>
- The class that implements &lt;code&gt;org.eclipse.tm.te.ui.views.interfaces.IEditorPage&lt;/code&gt; or extends &lt;code&gt;org.eclipse.tm.te.ui.views.editor.AbstractEditorPage&lt;/code&gt;.
+ The class that implements &lt;code&gt;org.eclipse.tcf.te.ui.views.interfaces.IEditorPage&lt;/code&gt; or extends &lt;code&gt;org.eclipse.tcf.te.ui.views.editor.pages.AbstractEditorPage&lt;/code&gt;.
&lt;p&gt;
The editor page implementation class must be specified either by the class attribute or the class child element!
</documentation>
<appinfo>
- <meta.attribute kind="java" basedOn="org.eclipse.tm.te.views.editor.AbstractEditorPage:org.eclipse.tm.te.ui.views.interfaces.IEditorPage"/>
+ <meta.attribute kind="java" basedOn="org.eclipse.tcf.te.views.editor.AbstractEditorPage:org.eclipse.tcf.te.ui.views.interfaces.IEditorPage"/>
</appinfo>
</annotation>
</attribute>
@@ -108,10 +108,10 @@ The editor page implementation class must be specified either by the class attri
</appinfo>
<documentation>
&lt;pre&gt;
- &lt;extension point=&quot;org.eclipse.tm.te.ui.views.editorPages&quot;&gt;
+ &lt;extension point=&quot;org.eclipse.tcf.te.ui.views.editorPages&quot;&gt;
&lt;editorPage
- class=&quot;org.eclipse.tm.te.tcf.ui.internal.TcfPeerPropertiesPage&quot;
- id=&quot;org.eclipse.tm.te.tcf.ui.TcfPeerPropertiesPage&quot;
+ class=&quot;org.eclipse.tcf.te.tcf.ui.internal.TcfPeerPropertiesPage&quot;
+ id=&quot;org.eclipse.tcf.te.tcf.ui.TcfPeerPropertiesPage&quot;
label=&quot;TCF Peer Properties Editor Page&quot;&gt;
&lt;/editorPage&gt;
&lt;/extension&gt;
@@ -124,7 +124,7 @@ The editor page implementation class must be specified either by the class attri
<meta.section type="apiinfo"/>
</appinfo>
<documentation>
- Plug-ins that want to extend this extension point, the referenced class must implement &lt;samp&gt;org.eclipse.tm.te.ui.views.interfaces.IEditorPage&lt;/samp&gt; interface.
+ Plug-ins that want to extend this extension point, the referenced class must implement &lt;samp&gt;org.eclipse.tcf.te.ui.views.interfaces.IEditorPage&lt;/samp&gt; interface.
</documentation>
</annotation>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/ViewsUtil.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/ViewsUtil.java
index 4da52265b..0fdcb639b 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/ViewsUtil.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/ViewsUtil.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.views;
+package org.eclipse.tcf.te.ui.views;
import java.util.Collections;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/actions/NewActionProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/actions/NewActionProvider.java
index 663e9e028..6a080fd95 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/actions/NewActionProvider.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/actions/NewActionProvider.java
@@ -6,26 +6,30 @@
*
* Contributors:
* Wind River Systems - initial API and implementation
+ * Tobias Schwarz (Wind River) - [368243] [UI] Allow dynamic new wizard contributions
*******************************************************************************/
-package org.eclipse.tm.te.ui.views.actions;
+package org.eclipse.tcf.te.ui.views.actions;
+import org.eclipse.jface.action.IAction;
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.tm.te.ui.interfaces.IContextHelpIds;
-import org.eclipse.tm.te.ui.interfaces.ImageConsts;
-import org.eclipse.tm.te.ui.views.interfaces.IUIConstants;
-import org.eclipse.tm.te.ui.views.nls.Messages;
-import org.eclipse.tm.te.ui.wizards.newWizard.NewWizardRegistry;
+import org.eclipse.tcf.te.ui.interfaces.IContextHelpIds;
+import org.eclipse.tcf.te.ui.interfaces.ImageConsts;
+import org.eclipse.tcf.te.ui.views.interfaces.IUIConstants;
+import org.eclipse.tcf.te.ui.views.nls.Messages;
+import org.eclipse.tcf.te.ui.wizards.newWizard.NewWizardRegistry;
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.internal.actions.CommandAction;
+import org.eclipse.ui.internal.navigator.wizards.WizardShortcutAction;
import org.eclipse.ui.navigator.CommonActionProvider;
import org.eclipse.ui.navigator.ICommonActionExtensionSite;
import org.eclipse.ui.navigator.ICommonMenuConstants;
import org.eclipse.ui.navigator.ICommonViewerWorkbenchSite;
import org.eclipse.ui.navigator.WizardActionGroup;
+import org.eclipse.ui.wizards.IWizardDescriptor;
/**
* Action provider implementation providing the "New >" content menu
@@ -51,16 +55,16 @@ public class NewActionProvider extends CommonActionProvider {
// To initialize the actions, the workbench window instance is required
IWorkbenchWindow window = ((ICommonViewerWorkbenchSite)site.getViewSite()).getWorkbenchWindow();
// Initialize the actions
- newWizardCommandAction = new CommandAction(window, "org.eclipse.tm.te.ui.command.newWizards"); //$NON-NLS-1$
+ newWizardCommandAction = new CommandAction(window, "org.eclipse.tcf.te.ui.command.newWizards"); //$NON-NLS-1$
newWizardCommandAction.setImageDescriptor(null);
newWizardCommandAction.setDisabledImageDescriptor(null);
newWizardCommandAction.setText(Messages.NewActionProvider_NewWizardCommandAction_label);
newWizardCommandAction.setToolTipText(Messages.NewActionProvider_NewWizardCommandAction_tooltip);
window.getWorkbench().getHelpSystem().setHelp(newWizardCommandAction, IContextHelpIds.NEW_TARGET_WIZARD);
- newWizardCommandActionToolbar = new CommandAction(window, "org.eclipse.tm.te.ui.command.newWizards"); //$NON-NLS-1$
- newWizardCommandActionToolbar.setImageDescriptor(org.eclipse.tm.te.ui.activator.UIPlugin.getImageDescriptor(ImageConsts.NEW_TARGET_WIZARD_ENABLED));
- newWizardCommandActionToolbar.setDisabledImageDescriptor(org.eclipse.tm.te.ui.activator.UIPlugin.getImageDescriptor(ImageConsts.NEW_TARGET_WIZARD_DISABLED));
+ newWizardCommandActionToolbar = new CommandAction(window, "org.eclipse.tcf.te.ui.command.newWizards"); //$NON-NLS-1$
+ newWizardCommandActionToolbar.setImageDescriptor(org.eclipse.tcf.te.ui.activator.UIPlugin.getImageDescriptor(ImageConsts.NEW_TARGET_WIZARD_ENABLED));
+ newWizardCommandActionToolbar.setDisabledImageDescriptor(org.eclipse.tcf.te.ui.activator.UIPlugin.getImageDescriptor(ImageConsts.NEW_TARGET_WIZARD_DISABLED));
newWizardCommandActionToolbar.setText(Messages.NewActionProvider_NewWizardCommandAction_label);
newWizardCommandActionToolbar.setToolTipText(Messages.NewActionProvider_NewWizardCommandAction_tooltip);
window.getWorkbench().getHelpSystem().setHelp(newWizardCommandActionToolbar, IContextHelpIds.NEW_TARGET_WIZARD);
@@ -100,7 +104,7 @@ public class NewActionProvider extends CommonActionProvider {
// Create the new sub menu
IMenuManager newMenu = new MenuManager(Messages.NewActionProvider_NewMenu_label,
- org.eclipse.tm.te.ui.activator.UIPlugin.getImageDescriptor(ImageConsts.NEW_TARGET_WIZARD_ENABLED),
+ org.eclipse.tcf.te.ui.activator.UIPlugin.getImageDescriptor(ImageConsts.NEW_TARGET_WIZARD_ENABLED),
IUIConstants.ID_EXPLORER + ".menu.new"); //$NON-NLS-1$
// Add the context sensitive wizards (commonWizard element)
@@ -109,6 +113,13 @@ public class NewActionProvider extends CommonActionProvider {
newWizardActionGroup.fillContextMenu(newMenu);
}
+
+ IWorkbenchWindow window = ((ICommonViewerWorkbenchSite)getActionSite().getViewSite()).getWorkbenchWindow();
+ for (IWizardDescriptor wizard : NewWizardRegistry.getInstance().getCommonWizards(getContext().getSelection())) {
+ IAction action = new WizardShortcutAction(window, wizard);
+ newMenu.add(action);
+ }
+
// Add the standard additions marker
newMenu.add(new Separator(ICommonMenuConstants.GROUP_ADDITIONS));
@@ -138,7 +149,7 @@ public class NewActionProvider extends CommonActionProvider {
// Check for the newWizard action in the toolbar. If found,
// drop out immediately to avoid adding the items to the toolbar
// again and again
- if (toolbar.find("org.eclipse.tm.te.ui.command.newWizards") != null) { //$NON-NLS-1$
+ if (toolbar.find("org.eclipse.tcf.te.ui.command.newWizards") != null) { //$NON-NLS-1$
return;
}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/activator/UIPlugin.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/activator/UIPlugin.java
index bd7d58d7e..ed2fa9893 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/activator/UIPlugin.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/activator/UIPlugin.java
@@ -7,15 +7,16 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.views.activator;
+package org.eclipse.tcf.te.ui.views.activator;
import java.net.URL;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.swt.graphics.Image;
-import org.eclipse.tm.te.ui.views.interfaces.ImageConsts;
-import org.eclipse.tm.te.ui.views.listeners.WorkbenchWindowListener;
+import org.eclipse.tcf.te.runtime.tracing.TraceHandler;
+import org.eclipse.tcf.te.ui.views.interfaces.ImageConsts;
+import org.eclipse.tcf.te.ui.views.listeners.WorkbenchWindowListener;
import org.eclipse.ui.IWindowListener;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.plugin.AbstractUIPlugin;
@@ -26,9 +27,10 @@ import org.osgi.framework.BundleContext;
* The activator class controls the plug-in life cycle
*/
public class UIPlugin extends AbstractUIPlugin {
-
// The shared instance
private static UIPlugin plugin;
+ // The trace handler instance
+ private static TraceHandler traceHandler;
// The global window listener instance
private IWindowListener windowListener;
@@ -58,6 +60,18 @@ public class UIPlugin extends AbstractUIPlugin {
return null;
}
+ /**
+ * Returns the bundles trace handler.
+ *
+ * @return The bundles trace handler.
+ */
+ public static TraceHandler getTraceHandler() {
+ if (traceHandler == null) {
+ traceHandler = new TraceHandler(getUniqueIdentifier());
+ }
+ return traceHandler;
+ }
+
/* (non-Javadoc)
* @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
*/
@@ -83,6 +97,7 @@ public class UIPlugin extends AbstractUIPlugin {
}
plugin = null;
+ traceHandler = null;
super.stop(context);
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/editor/Editor.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/editor/Editor.java
new file mode 100644
index 000000000..02e3d89a2
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/editor/Editor.java
@@ -0,0 +1,321 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.views.editor;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.tcf.te.ui.views.extensions.EditorPageBinding;
+import org.eclipse.tcf.te.ui.views.extensions.EditorPageBindingExtensionPointManager;
+import org.eclipse.tcf.te.ui.views.extensions.EditorPageExtensionPointManager;
+import org.eclipse.tcf.te.ui.views.interfaces.IEditorPage;
+import org.eclipse.tcf.te.ui.views.interfaces.IUIConstants;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.IMemento;
+import org.eclipse.ui.IPersistable;
+import org.eclipse.ui.IPersistableEditor;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.XMLMemento;
+import org.eclipse.ui.forms.editor.FormEditor;
+import org.eclipse.ui.forms.editor.IFormPage;
+import org.eclipse.ui.views.properties.IPropertySheetPage;
+import org.eclipse.ui.views.properties.tabbed.ITabbedPropertySheetPageContributor;
+import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
+
+
+/**
+ * Editor implementation.
+ */
+public final class Editor extends FormEditor implements IPersistableEditor, ITabbedPropertySheetPageContributor {
+
+ // The reference to an memento to restore once the editor got activated
+ private IMemento mementoToRestore;
+
+ // The editor event listener instance
+ private EditorEventListener listener;
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.forms.editor.FormEditor#addPages()
+ */
+ @Override
+ protected void addPages() {
+ // Read extension point and add the contributed pages.
+ IEditorInput input = getEditorInput();
+ // Get all applicable editor page bindings
+ EditorPageBinding[] bindings = EditorPageBindingExtensionPointManager.getInstance().getApplicableEditorPageBindings(input);
+ for (EditorPageBinding binding : bindings) {
+ processPageBinding(binding);
+ }
+
+ if (mementoToRestore != null) {
+ // Loop over all registered pages and pass on the editor specific memento
+ // to the pages which implements IPersistableEditor as well
+ for (Object page : pages) {
+ if (page instanceof IPersistableEditor) {
+ ((IPersistableEditor)page).restoreState(mementoToRestore);
+ }
+ }
+ mementoToRestore = null;
+ }
+ }
+
+ /**
+ * Update the editor page list. Pages which are not longer valid
+ * will be removed and pages now being valid gets added.
+ */
+ public void updatePageList() {
+ // Get the editor input object
+ IEditorInput input = getEditorInput();
+ // Get all applicable editor page bindings
+ List<EditorPageBinding> bindings = new ArrayList<EditorPageBinding>(Arrays.asList(EditorPageBindingExtensionPointManager.getInstance().getApplicableEditorPageBindings(input)));
+ // Get a copy of the currently added pages
+ List<Object> oldPages = new ArrayList<Object>(Arrays.asList(pages.toArray()));
+ // Loop through the old pages and determine if the page is still applicable
+ Iterator<Object> iterator = oldPages.iterator();
+ while (iterator.hasNext()) {
+ Object element = iterator.next();
+ // Skip over pages not being a form page.
+ if (!(element instanceof IFormPage)) continue;
+ IFormPage page = (IFormPage)element;
+ // Find the corresponding page binding
+ EditorPageBinding binding = null;
+ for (EditorPageBinding candidate : bindings) {
+ if (candidate.getPageId().equals(page.getId())) {
+ binding = candidate;
+ break;
+ }
+ }
+ if (binding != null) {
+ // Found binding -> page is still applicable
+ bindings.remove(binding);
+ } else {
+ // No binding found -> page is not longer applicable
+ removePage(pages.indexOf(page));
+ }
+ }
+ // If the are remaining bindings left, this are new pages.
+ // --> Process them now
+ for (EditorPageBinding binding : bindings) {
+ processPageBinding(binding);
+ }
+ }
+
+ /**
+ * Process the given editor page binding.
+ *
+ * @param binding The editor page binding. Must not be <code>null</code>.
+ */
+ protected void processPageBinding(EditorPageBinding binding) {
+ Assert.isNotNull(binding);
+
+ String pageId = binding.getPageId();
+ if (pageId != null) {
+ // Get the corresponding editor page instance
+ IEditorPage page = EditorPageExtensionPointManager.getInstance().getEditorPage(pageId, true);
+ if (page != null) {
+ try {
+ // Associate this editor with the page instance.
+ // This is typically done in the constructor, but we are
+ // utilizing a default constructor to instantiate the page.
+ page.initialize(this);
+
+ // Read in the "insertBefore" and "insertAfter" properties of the binding
+ String insertBefore = binding.getInsertBefore().trim();
+ String insertAfter = binding.getInsertAfter().trim();
+
+ // insertBefore will eclipse insertAfter is both is specified.
+ if (!"".equals(insertBefore)) { //$NON-NLS-1$
+ // If it is "first", we insert the page at index 0
+ if ("first".equalsIgnoreCase(insertBefore)) { //$NON-NLS-1$
+ addPage(0, page);
+ } else {
+ // Find the index of the page we shall insert this page before
+ int index = getIndexOf(insertBefore);
+ if (index != -1) addPage(index, page);
+ else addPage(page);
+ }
+ } else if (!"".equals(insertAfter) && !"last".equalsIgnoreCase(insertAfter)) { //$NON-NLS-1$ //$NON-NLS-2$
+ // Find the index of the page we shall insert this page after
+ int index = getIndexOf(insertAfter);
+ if (index != -1 && index + 1 < pages.size()) addPage(index + 1, page);
+ else addPage(page);
+ } else {
+ // And add the page to the editor as last page.
+ addPage(page);
+ }
+ } catch (PartInitException e) { /* ignored on purpose */ }
+ }
+ }
+ }
+
+ /**
+ * Returns the index of the page with the given id.
+ *
+ * @param pageId The page id. Must not be <code>null</code>.
+ * @return The page index or <code>-1</code> if not found.
+ */
+ private int getIndexOf(String pageId) {
+ Assert.isNotNull(pageId);
+ for (int i = 0; i < pages.size(); i++) {
+ Object page = pages.get(i);
+ if (page instanceof IFormPage) {
+ IFormPage fpage = (IFormPage)page;
+ if (fpage.getId().equals(pageId))
+ return i;
+ }
+ }
+ return -1;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.forms.editor.FormPage#init(org.eclipse.ui.IEditorSite, org.eclipse.ui.IEditorInput)
+ */
+ @Override
+ public void init(IEditorSite site, IEditorInput input) throws PartInitException {
+ super.init(site, input);
+
+ // Update the part name
+ if (!"".equals(input.getName())) setPartName(input.getName()); //$NON-NLS-1$
+
+ // Dispose an existing event listener instance
+ if (listener != null) { listener.dispose(); listener = null; }
+ // Create the event listener. The event listener does register itself.
+ listener = new EditorEventListener(this);
+ }
+
+ /**
+ * Update the editor part name based on the current editor input.
+ */
+ public void updatePartName() {
+ IEditorInput input = getEditorInput();
+ String oldPartName = getPartName();
+
+ if (input instanceof EditorInput) {
+ // Reset the editor input name to trigger recalculation
+ ((EditorInput)input).name = null;
+ // If the name changed, apply the new name
+ if (!oldPartName.equals(input.getName())) setPartName(input.getName());
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.forms.editor.FormEditor#dispose()
+ */
+ @Override
+ public void dispose() {
+ // Dispose an existing event listener instance
+ if (listener != null) { listener.dispose(); listener = null; }
+
+ super.dispose();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.part.EditorPart#doSave(org.eclipse.core.runtime.IProgressMonitor)
+ */
+ @Override
+ public void doSave(IProgressMonitor monitor) {
+ commitPages(true);
+ editorDirtyStateChanged();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.part.EditorPart#doSaveAs()
+ */
+ @Override
+ public void doSaveAs() {
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.part.EditorPart#isSaveAsAllowed()
+ */
+ @Override
+ public boolean isSaveAsAllowed() {
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IPersistableEditor#restoreState(org.eclipse.ui.IMemento)
+ */
+ @Override
+ public void restoreState(IMemento memento) {
+ // Get the editor specific memento
+ mementoToRestore = internalGetMemento(memento);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IPersistable#saveState(org.eclipse.ui.IMemento)
+ */
+ @Override
+ public void saveState(IMemento memento) {
+ // Get the editor specific memento
+ memento = internalGetMemento(memento);
+ // Loop over all registered pages and pass on the editor specific memento
+ // to the pages which implements IPersistable as well
+ for (Object page : pages) {
+ if (page instanceof IPersistable) {
+ ((IPersistable)page).saveState(memento);
+ }
+ }
+ }
+
+ /**
+ * Internal helper method accessing our editor local child memento
+ * from the given parent memento.
+ */
+ private IMemento internalGetMemento(IMemento memento) {
+ // Assume the editor memento to be the same as the parent memento
+ IMemento editorMemento = memento;
+
+ // If the parent memento is not null, create a child within the parent
+ if (memento != null) {
+ editorMemento = memento.getChild(Editor.class.getName());
+ if (editorMemento == null) {
+ editorMemento = memento.createChild(Editor.class.getName());
+ }
+ } else {
+ // The parent memento is null. Create a new internal instance
+ // of a XMLMemento. This case is happening if the user switches
+ // to another perspective an the view becomes visible by this switch.
+ editorMemento = XMLMemento.createWriteRoot(Editor.class.getName());
+ }
+
+ return editorMemento;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.part.MultiPageEditorPart#getAdapter(java.lang.Class)
+ */
+ @Override
+ public Object getAdapter(Class adapter) {
+ if (adapter == IPropertySheetPage.class) {
+ return new TabbedPropertySheetPage(this);
+ }
+ // We pass on the adapt request to the currently active page
+ Object adapterInstance = getActivePageInstance() != null ? getActivePageInstance().getAdapter(adapter) : null;
+ if (adapterInstance == null) {
+ // If failed to adapt via the currently active page, pass on to the super implementation
+ adapterInstance = super.getAdapter(adapter);
+ }
+ return adapterInstance;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.views.properties.tabbed.ITabbedPropertySheetPageContributor#getContributorId()
+ */
+ @Override
+ public String getContributorId() {
+ return IUIConstants.TABBED_PROPERTIES_CONTRIBUTOR_ID;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/editor/EditorEventListener.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/editor/EditorEventListener.java
new file mode 100644
index 000000000..15e9e2d19
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/editor/EditorEventListener.java
@@ -0,0 +1,106 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.views.editor;
+
+import java.util.EventObject;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.tcf.te.runtime.events.ChangeEvent;
+import org.eclipse.tcf.te.runtime.events.EventManager;
+import org.eclipse.tcf.te.runtime.interfaces.IDisposable;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.ui.events.AbstractEventListener;
+import org.eclipse.tcf.te.ui.views.activator.UIPlugin;
+import org.eclipse.tcf.te.ui.views.interfaces.tracing.ITraceIds;
+import org.eclipse.ui.forms.editor.IFormPage;
+
+/**
+ * Editor event listener implementation.
+ * <p>
+ * The event listener is registered by an editor instance for a given editor input
+ * and is supposed to receive events for the editor input only.
+ */
+public final class EditorEventListener extends AbstractEventListener implements IDisposable {
+ // Reference to the parent editor
+ private final Editor editor;
+
+ /**
+ * Constructor.
+ *
+ * @param editor The parent editor. Must not be <code>null</code>.
+ */
+ public EditorEventListener(Editor editor) {
+ super();
+
+ Assert.isNotNull(editor);
+ this.editor = editor;
+
+ // Register the event listener if the editor input is a properties container
+ Object node = editor.getEditorInput() != null ? editor.getEditorInput().getAdapter(Object.class) : null;
+ if (node instanceof IPropertiesContainer) EventManager.getInstance().addEventListener(this, ChangeEvent.class, node);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.interfaces.IDisposable#dispose()
+ */
+ @Override
+ public void dispose() {
+ EventManager.getInstance().removeEventListener(this);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.interfaces.events.IEventListener#eventFired(java.util.EventObject)
+ */
+ @Override
+ public void eventFired(EventObject event) {
+ // Ignore everything not being a change event
+ if (!(event instanceof ChangeEvent)) return;
+
+ ChangeEvent changeEvent = (ChangeEvent)event;
+
+ if (UIPlugin.getTraceHandler().isSlotEnabled(0, ITraceIds.TRACE_EDITOR_EVENT_LISTENER)) {
+ UIPlugin.getTraceHandler().trace("Entered eventFired(...). eventId='" + changeEvent.getEventId() + "'" //$NON-NLS-1$ //$NON-NLS-2$
+ + ", oldValue='" + changeEvent.getOldValue() + "'" //$NON-NLS-1$ //$NON-NLS-2$
+ + ", newValue='" + changeEvent.getNewValue() + "'", //$NON-NLS-1$ //$NON-NLS-2$
+ 0, ITraceIds.TRACE_EDITOR_EVENT_LISTENER,
+ IStatus.INFO, this);
+ }
+
+ // Get the event source
+ Object source = event.getSource();
+ // Double check with the parent editors input object
+ Object node = editor.getEditorInput() != null ? editor.getEditorInput().getAdapter(Object.class) : null;
+ // If the editor input cannot be determined or it does not match the event source
+ // --> return immediately
+ if (node == null || !node.equals(source)) {
+ if (UIPlugin.getTraceHandler().isSlotEnabled(0, ITraceIds.TRACE_EDITOR_EVENT_LISTENER)) {
+ UIPlugin.getTraceHandler().trace("Dropping out of eventFired(...). Event source does not match editor input.", //$NON-NLS-1$
+ 0, ITraceIds.TRACE_EDITOR_EVENT_LISTENER,
+ IStatus.WARNING, this);
+ }
+
+ return;
+ }
+
+ if ("editor.refreshTab".equals(changeEvent.getEventId())) { //$NON-NLS-1$
+ editor.updatePageList();
+ } else {
+ // Update the active page content by calling IFormPage#setActive(boolean)
+ Object page = editor.getSelectedPage();
+ if (page instanceof IFormPage) {
+ ((IFormPage)page).setActive(((IFormPage)page).isActive());
+ }
+
+ // Update the editor part name
+ editor.updatePartName();
+ }
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/internal/editor/EditorInput.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/editor/EditorInput.java
index 66be04aec..08b2e762e 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/internal/editor/EditorInput.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/editor/EditorInput.java
@@ -7,15 +7,15 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.views.internal.editor;
+package org.eclipse.tcf.te.ui.views.editor;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.Platform;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.tm.te.ui.views.activator.UIPlugin;
-import org.eclipse.tm.te.ui.views.interfaces.IUIConstants;
-import org.eclipse.tm.te.ui.views.interfaces.ImageConsts;
+import org.eclipse.tcf.te.ui.views.activator.UIPlugin;
+import org.eclipse.tcf.te.ui.views.interfaces.IUIConstants;
+import org.eclipse.tcf.te.ui.views.interfaces.ImageConsts;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IMemento;
import org.eclipse.ui.IPersistableElement;
@@ -27,13 +27,13 @@ import org.eclipse.ui.navigator.CommonViewer;
/**
- * Details editor input implementation.
+ * Editor input implementation.
*/
-public class EditorInput implements IEditorInput, IPersistableElement {
+public final class EditorInput implements IEditorInput, IPersistableElement {
// The parent editor id
private final String id;
// The editor input name, once determined
- private String name;
+ /* default */ String name;
// The node (selection) the editor is showing
private final Object node;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/editor/pages/AbstractCustomFormToolkitEditorPage.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/editor/pages/AbstractCustomFormToolkitEditorPage.java
new file mode 100644
index 000000000..8a0ba6509
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/editor/pages/AbstractCustomFormToolkitEditorPage.java
@@ -0,0 +1,163 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.views.editor.pages;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.action.IToolBarManager;
+import org.eclipse.jface.action.Separator;
+import org.eclipse.jface.action.ToolBarManager;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.tcf.te.ui.forms.CustomFormToolkit;
+import org.eclipse.tcf.te.ui.forms.FormLayoutFactory;
+import org.eclipse.ui.IWorkbenchActionConstants;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.forms.IManagedForm;
+import org.eclipse.ui.menus.IMenuService;
+
+/**
+ * Abstract details editor page implementation managing
+ * an custom form toolkit instance.
+ */
+public abstract class AbstractCustomFormToolkitEditorPage extends AbstractEditorPage {
+ // Reference to the form toolkit instance
+ private CustomFormToolkit toolkit = null;
+
+ /**
+ * Returns the custom form toolkit instance.
+ *
+ * @return The custom form toolkit instance or <code>null</code>.
+ */
+ protected final CustomFormToolkit getFormToolkit() {
+ return toolkit;
+ }
+
+ /**
+ * Sets the custom form toolkit instance.
+ *
+ * @param toolkit The custom form toolkit instance or <code>null</code>.
+ */
+ protected final void setFormToolkit(CustomFormToolkit toolkit) {
+ this.toolkit = toolkit;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.forms.editor.FormPage#dispose()
+ */
+ @Override
+ public void dispose() {
+ if (toolkit != null) { toolkit.dispose(); toolkit = null; }
+ super.dispose();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.forms.editor.FormPage#createFormContent(org.eclipse.ui.forms.IManagedForm)
+ */
+ @Override
+ protected void createFormContent(IManagedForm managedForm) {
+ super.createFormContent(managedForm);
+
+ Assert.isNotNull(managedForm);
+
+ // Create the toolkit instance
+ toolkit = new CustomFormToolkit(managedForm.getToolkit());
+
+ // Configure the managed form
+ configureManagedForm(managedForm);
+
+ // Do create the content of the form now
+ doCreateFormContent(managedForm.getForm().getBody(), getFormToolkit());
+
+ // Re-arrange the controls
+ managedForm.reflow(true);
+ }
+
+ /**
+ * Configure the managed form to be ready for usage.
+ *
+ * @param managedForm The managed form. Must not be <code>null</code>.
+ */
+ protected void configureManagedForm(IManagedForm managedForm) {
+ Assert.isNotNull(managedForm);
+
+ // Configure main layout
+ Composite body = managedForm.getForm().getBody();
+ body.setLayout(FormLayoutFactory.createFormGridLayout(false, 1));
+
+ // Set context help id
+ if (getContextHelpId() != null) {
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(managedForm.getForm(), getContextHelpId());
+ }
+
+ // Decorate the form header
+ getFormToolkit().getFormToolkit().decorateFormHeading(managedForm.getForm().getForm());
+ // And set the header text and image
+ if (getFormTitle() != null) managedForm.getForm().getForm().setText(getFormTitle());
+ managedForm.getForm().getForm().setImage(getFormImage());
+
+ // Add the toolbar items which will appear in the form header
+ IToolBarManager manager = managedForm.getForm().getForm().getToolBarManager();
+ // Create fixed toolbar contribution items
+ createToolbarContributionItems(manager);
+ // Add the default "additions" separator
+ manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
+ // Get the menu service and populate contributed toolbar actions
+ IMenuService service = (IMenuService) getSite().getService(IMenuService.class);
+ if (service != null) {
+ service.populateContributionManager((ToolBarManager)manager, "toolbar:" + getId()); //$NON-NLS-1$
+ }
+ // Trigger an update of the toolbar widget
+ manager.update(true);
+ }
+
+ /**
+ * Returns the context help id to associate with the page form.
+ *
+ * @return The context help id.
+ */
+ protected String getContextHelpId() {
+ return null;
+ }
+
+ /**
+ * Returns the form title to set to the top form header.
+ *
+ * @return The form title.
+ */
+ protected String getFormTitle() {
+ return null;
+ }
+
+ /**
+ * Returns the image to be set to the top form header.
+ *
+ * @return The image or <code>null</code> to use no image.
+ */
+ protected Image getFormImage() {
+ return null;
+ }
+
+ /**
+ * Create the toolbar contribution items.
+ *
+ * @param manager The toolbar manager. Must not be <code>null</code>.
+ */
+ protected void createToolbarContributionItems(IToolBarManager manager) {
+ Assert.isNotNull(manager);
+ }
+
+ /**
+ * Do create the managed form content.
+ *
+ * @param parent The parent composite. Must not be <code>null</code>
+ * @param toolkit The {@link CustomFormToolkit} instance. Must not be <code>null</code>.
+ */
+ protected abstract void doCreateFormContent(Composite parent, CustomFormToolkit toolkit);
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/editor/AbstractEditorPage.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/editor/pages/AbstractEditorPage.java
index 36fc73092..ec1ed0ec3 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/editor/AbstractEditorPage.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/editor/pages/AbstractEditorPage.java
@@ -7,16 +7,16 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.views.editor;
+package org.eclipse.tcf.te.ui.views.editor.pages;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.osgi.util.NLS;
-import org.eclipse.tm.te.runtime.nls.Messages;
-import org.eclipse.tm.te.ui.views.activator.UIPlugin;
-import org.eclipse.tm.te.ui.views.interfaces.IEditorPage;
+import org.eclipse.tcf.te.ui.views.activator.UIPlugin;
+import org.eclipse.tcf.te.ui.views.interfaces.IEditorPage;
+import org.eclipse.tcf.te.runtime.nls.Messages;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.forms.IManagedForm;
import org.eclipse.ui.forms.editor.FormPage;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/src/org/eclipse/tm/te/tcf/processes/ui/internal/explorer/ProcessExplorerEditorPage.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/editor/pages/TreeViewerExplorerEditorPage.java
index db0065662..cf36542e4 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/src/org/eclipse/tm/te/tcf/processes/ui/internal/explorer/ProcessExplorerEditorPage.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/editor/pages/TreeViewerExplorerEditorPage.java
@@ -7,32 +7,27 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.tcf.processes.ui.internal.explorer;
+package org.eclipse.tcf.te.ui.views.editor.pages;
import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
-import org.eclipse.tm.te.tcf.processes.ui.controls.ProcessesTreeControl;
-import org.eclipse.tm.te.tcf.processes.ui.internal.help.IContextHelpIds;
-import org.eclipse.tm.te.tcf.processes.ui.nls.Messages;
-import org.eclipse.tm.te.ui.forms.CustomFormToolkit;
-import org.eclipse.tm.te.ui.views.editor.AbstractEditorPage;
-import org.eclipse.ui.PlatformUI;
+import org.eclipse.tcf.te.ui.forms.CustomFormToolkit;
+import org.eclipse.tcf.te.ui.trees.TreeControl;
import org.eclipse.ui.forms.IManagedForm;
import org.eclipse.ui.forms.widgets.ExpandableComposite;
import org.eclipse.ui.forms.widgets.Section;
import org.eclipse.ui.forms.widgets.TableWrapData;
/**
- * Processes editor page implementation.
+ * Tree viewer based editor page implementation.
*/
-public class ProcessExplorerEditorPage extends AbstractEditorPage {
+public class TreeViewerExplorerEditorPage extends AbstractCustomFormToolkitEditorPage {
// The references to the pages subcontrol's (needed for disposal)
- private ProcessesTreeControl treeControl;
-
- // Reference to the form toolkit instance
- private CustomFormToolkit toolkit = null;
+ private TreeControl treeControl;
+ private String viewerId;
/* (non-Javadoc)
* @see org.eclipse.ui.forms.editor.FormPage#dispose()
@@ -44,32 +39,19 @@ public class ProcessExplorerEditorPage extends AbstractEditorPage {
}
/* (non-Javadoc)
- * @see org.eclipse.ui.forms.editor.FormPage#createFormContent(org.eclipse.ui.forms.IManagedForm)
+ * @see org.eclipse.tcf.te.ui.views.editor.pages.AbstractEditorPage#setInitializationData(org.eclipse.core.runtime.IConfigurationElement, java.lang.String, java.lang.Object)
*/
@Override
- protected void createFormContent(IManagedForm managedForm) {
- // Configure the managed form
- configureManagedForm(managedForm);
-
- // Get the form body
- Composite body = managedForm.getForm().getBody();
-
- // Create the toolkit instance
- toolkit = new CustomFormToolkit(managedForm.getToolkit());
+ public void setInitializationData(IConfigurationElement config, String propertyName, Object data) {
+ super.setInitializationData(config, propertyName, data);
+ viewerId = data != null ? data.toString() : null;
+ }
- // Do create the content of the form now
- doCreateFormContent(body, toolkit);
-
- // Re-arrange the controls
- managedForm.reflow(true);
- }
-
- /**
- * Configure the managed form to be ready for usage.
- *
- * @param managedForm The managed form. Must be not <code>null</code>.
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.views.editor.pages.AbstractCustomFormToolkitEditorPage#configureManagedForm(org.eclipse.ui.forms.IManagedForm)
*/
- protected void configureManagedForm(IManagedForm managedForm) {
+ @Override
+ protected void configureManagedForm(IManagedForm managedForm) {
Assert.isNotNull(managedForm);
// Configure main layout
@@ -78,23 +60,18 @@ public class ProcessExplorerEditorPage extends AbstractEditorPage {
layout.marginHeight = 2; layout.marginWidth = 0;
body.setLayout(layout);
body.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB));
-
- // Set context help id
- PlatformUI.getWorkbench().getHelpSystem().setHelp(managedForm.getForm(), IContextHelpIds.PROCESS_EXPLORER_EDITOR_PAGE);
}
- /**
- * Do create the managed form content.
- *
- * @param parent The parent composite. Must be not <code>null</code>
- * @param toolkit The {@link CustomFormToolkit} instance. Must be not <code>null</code>.
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.views.editor.pages.AbstractCustomFormToolkitEditorPage#doCreateFormContent(org.eclipse.swt.widgets.Composite, org.eclipse.tcf.te.ui.forms.CustomFormToolkit)
*/
- protected void doCreateFormContent(Composite parent, CustomFormToolkit toolkit) {
+ @Override
+ protected void doCreateFormContent(Composite parent, CustomFormToolkit toolkit) {
Assert.isNotNull(parent);
Assert.isNotNull(toolkit);
Section section = toolkit.getFormToolkit().createSection(parent, ExpandableComposite.TITLE_BAR);
- String title = Messages.ProcessExplorerTreeControl_section_title;
+ String title = getTitle();
// Stretch to a length of 40 characters to make sure the title can be changed
// to hold and show text up to this length
while (title.length() < 40) {
@@ -102,7 +79,10 @@ public class ProcessExplorerEditorPage extends AbstractEditorPage {
}
// Set the title to the section
section.setText(title);
- section.setLayoutData(new GridData(GridData.FILL_BOTH));
+ GridData data = new GridData(GridData.FILL_BOTH);
+ data.widthHint = 0;
+ data.heightHint = 0;
+ section.setLayoutData(data);
// Create the client area
Composite client = toolkit.getFormToolkit().createComposite(section);
@@ -125,8 +105,8 @@ public class ProcessExplorerEditorPage extends AbstractEditorPage {
*
* @return The new tree control.
*/
- protected ProcessesTreeControl doCreateTreeControl() {
- return new ProcessesTreeControl(this);
+ protected TreeControl doCreateTreeControl() {
+ return new TreeControl(viewerId, this);
}
/**
@@ -134,7 +114,7 @@ public class ProcessExplorerEditorPage extends AbstractEditorPage {
*
* @return The associated tree control or <code>null</code>.
*/
- protected final ProcessesTreeControl getTreeControl() {
+ protected final TreeControl getTreeControl() {
return treeControl;
}
}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/events/AbstractEventListener.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/events/AbstractEventListener.java
index 778760b30..be7f8e1b3 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/events/AbstractEventListener.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/events/AbstractEventListener.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.views.events;
+package org.eclipse.tcf.te.ui.views.events;
import java.util.Iterator;
import java.util.Queue;
@@ -18,9 +18,9 @@ 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.tm.te.runtime.model.interfaces.IModelNode;
-import org.eclipse.tm.te.runtime.model.interfaces.IModelNodeProvider;
-import org.eclipse.tm.te.ui.views.interfaces.IUIConstants;
+import org.eclipse.tcf.te.runtime.model.interfaces.IModelNode;
+import org.eclipse.tcf.te.runtime.model.interfaces.IModelNodeProvider;
+import org.eclipse.tcf.te.ui.views.interfaces.IUIConstants;
import org.eclipse.ui.IViewPart;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPage;
@@ -32,7 +32,7 @@ import org.eclipse.ui.navigator.CommonViewer;
/**
* Abstract UI event listener updating the target explorer view.
*/
-public abstract class AbstractEventListener extends org.eclipse.tm.te.ui.events.AbstractEventListener {
+public abstract class AbstractEventListener extends org.eclipse.tcf.te.ui.events.AbstractEventListener {
// Reference to the target explorer viewer instance
private CommonViewer viewer = null;
// Reference to the refresh job
@@ -73,7 +73,7 @@ public abstract class AbstractEventListener extends org.eclipse.tm.te.ui.events.
*/
protected void refresh(Object node, boolean scheduled) {
CommonViewer viewer = getViewer();
- if (viewer == null) return;
+ if (viewer == null || (viewer.getControl() != null && viewer.getControl().isDisposed())) return;
if (scheduled) {
scheduleRefreshJob(node != null ? node : viewer, viewer);
@@ -99,7 +99,7 @@ public abstract class AbstractEventListener extends org.eclipse.tm.te.ui.events.
Assert.isNotNull(node);
CommonViewer viewer = getViewer();
- if (viewer == null) return;
+ if (viewer == null || (viewer.getControl() != null && viewer.getControl().isDisposed())) return;
if (scheduled) {
scheduleUpdateJob(node, viewer);
@@ -242,10 +242,12 @@ public abstract class AbstractEventListener extends org.eclipse.tm.te.ui.events.
return new Runnable() {
@Override
public void run() {
- if (node instanceof CommonViewer) {
- parentViewer.refresh();
- } else {
- parentViewer.refresh(node);
+ if (parentViewer != null && parentViewer.getControl() != null && !parentViewer.getControl().isDisposed()) {
+ if (node instanceof CommonViewer) {
+ parentViewer.refresh();
+ } else {
+ parentViewer.refresh(node);
+ }
}
}
};
@@ -275,10 +277,12 @@ public abstract class AbstractEventListener extends org.eclipse.tm.te.ui.events.
return new Runnable() {
@Override
public void run() {
- if (node instanceof CommonViewer) {
- parentViewer.refresh();
- } else {
- parentViewer.update(node, null);
+ if (parentViewer != null && parentViewer.getControl() != null && !parentViewer.getControl().isDisposed()) {
+ if (node instanceof CommonViewer) {
+ parentViewer.refresh();
+ } else {
+ parentViewer.update(node, null);
+ }
}
}
};
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/events/ViewerContentChangeEvent.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/events/ViewerContentChangeEvent.java
index f6c968273..7dabf37ab 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/events/ViewerContentChangeEvent.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/events/ViewerContentChangeEvent.java
@@ -7,12 +7,12 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.views.events;
+package org.eclipse.tcf.te.ui.views.events;
import java.util.EventObject;
-import org.eclipse.tm.te.runtime.activator.CoreBundleActivator;
-import org.eclipse.tm.te.runtime.interfaces.tracing.ITraceIds;
+import org.eclipse.tcf.te.runtime.activator.CoreBundleActivator;
+import org.eclipse.tcf.te.runtime.interfaces.tracing.ITraceIds;
/**
* Target Explorer view viewer change event implementation.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/expressions/EditorPropertyTester.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/expressions/EditorPropertyTester.java
index 7e2c426f6..818f0e0a2 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/expressions/EditorPropertyTester.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/expressions/EditorPropertyTester.java
@@ -7,11 +7,11 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.views.expressions;
+package org.eclipse.tcf.te.ui.views.expressions;
import org.eclipse.core.expressions.PropertyTester;
-import org.eclipse.tm.te.ui.views.extensions.EditorPageBindingExtensionPointManager;
-import org.eclipse.tm.te.ui.views.internal.editor.EditorInput;
+import org.eclipse.tcf.te.ui.views.editor.EditorInput;
+import org.eclipse.tcf.te.ui.views.extensions.EditorPageBindingExtensionPointManager;
import org.eclipse.ui.IEditorInput;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/extensions/EditorPageBinding.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/extensions/EditorPageBinding.java
index 9a5d6c0ca..11b51c6ea 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/extensions/EditorPageBinding.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/extensions/EditorPageBinding.java
@@ -7,13 +7,13 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.views.extensions;
+package org.eclipse.tcf.te.ui.views.extensions;
import org.eclipse.core.expressions.Expression;
import org.eclipse.core.expressions.ExpressionConverter;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.tm.te.runtime.extensions.ExecutableExtension;
+import org.eclipse.tcf.te.runtime.extensions.ExecutableExtension;
/**
* Details editor page binding implementation.
@@ -29,7 +29,7 @@ public class EditorPageBinding extends ExecutableExtension {
private Expression expression;
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.extensions.ExecutableExtension#doSetInitializationData(org.eclipse.core.runtime.IConfigurationElement, java.lang.String, java.lang.Object)
+ * @see org.eclipse.tcf.te.runtime.extensions.ExecutableExtension#doSetInitializationData(org.eclipse.core.runtime.IConfigurationElement, java.lang.String, java.lang.Object)
*/
@Override
public void doSetInitializationData(IConfigurationElement config, String propertyName, Object data) throws CoreException {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/extensions/EditorPageBindingExtensionPointManager.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/extensions/EditorPageBindingExtensionPointManager.java
index e132b881d..a294d4c00 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/extensions/EditorPageBindingExtensionPointManager.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/extensions/EditorPageBindingExtensionPointManager.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.views.extensions;
+package org.eclipse.tcf.te.ui.views.extensions;
import java.util.ArrayList;
import java.util.Collection;
@@ -20,9 +20,9 @@ import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
-import org.eclipse.tm.te.runtime.extensions.AbstractExtensionPointManager;
-import org.eclipse.tm.te.runtime.extensions.ExecutableExtensionProxy;
-import org.eclipse.tm.te.ui.views.activator.UIPlugin;
+import org.eclipse.tcf.te.ui.views.activator.UIPlugin;
+import org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager;
+import org.eclipse.tcf.te.runtime.extensions.ExecutableExtensionProxy;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.ISources;
@@ -54,15 +54,15 @@ public class EditorPageBindingExtensionPointManager extends AbstractExtensionPoi
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.extensions.AbstractExtensionPointManager#getExtensionPointId()
+ * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#getExtensionPointId()
*/
@Override
protected String getExtensionPointId() {
- return "org.eclipse.tm.te.ui.views.editorPageBindings"; //$NON-NLS-1$
+ return "org.eclipse.tcf.te.ui.views.editorPageBindings"; //$NON-NLS-1$
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.extensions.AbstractExtensionPointManager#getConfigurationElementName()
+ * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#getConfigurationElementName()
*/
@Override
protected String getConfigurationElementName() {
@@ -70,13 +70,13 @@ public class EditorPageBindingExtensionPointManager extends AbstractExtensionPoi
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.extensions.AbstractExtensionPointManager#doCreateExtensionProxy(org.eclipse.core.runtime.IConfigurationElement)
+ * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#doCreateExtensionProxy(org.eclipse.core.runtime.IConfigurationElement)
*/
@Override
protected ExecutableExtensionProxy<EditorPageBinding> doCreateExtensionProxy(IConfigurationElement element) throws CoreException {
return new ExecutableExtensionProxy<EditorPageBinding>(element) {
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.extensions.ExecutableExtensionProxy#newInstance()
+ * @see org.eclipse.tcf.te.runtime.extensions.ExecutableExtensionProxy#newInstance()
*/
@Override
public EditorPageBinding newInstance() {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/extensions/EditorPageExtensionPointManager.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/extensions/EditorPageExtensionPointManager.java
index efebb2cc2..b99362520 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/extensions/EditorPageExtensionPointManager.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/extensions/EditorPageExtensionPointManager.java
@@ -7,15 +7,15 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.views.extensions;
+package org.eclipse.tcf.te.ui.views.extensions;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
-import org.eclipse.tm.te.runtime.extensions.AbstractExtensionPointManager;
-import org.eclipse.tm.te.runtime.extensions.ExecutableExtensionProxy;
-import org.eclipse.tm.te.ui.views.interfaces.IEditorPage;
+import org.eclipse.tcf.te.ui.views.interfaces.IEditorPage;
+import org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager;
+import org.eclipse.tcf.te.runtime.extensions.ExecutableExtensionProxy;
/**
@@ -44,15 +44,15 @@ public class EditorPageExtensionPointManager extends AbstractExtensionPointManag
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.extensions.AbstractExtensionPointManager#getExtensionPointId()
+ * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#getExtensionPointId()
*/
@Override
protected String getExtensionPointId() {
- return "org.eclipse.tm.te.ui.views.editorPages"; //$NON-NLS-1$
+ return "org.eclipse.tcf.te.ui.views.editorPages"; //$NON-NLS-1$
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.extensions.AbstractExtensionPointManager#getConfigurationElementName()
+ * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#getConfigurationElementName()
*/
@Override
protected String getConfigurationElementName() {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/handler/OpenCommandHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/OpenCommandHandler.java
index 749d89b73..6e2d80777 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/handler/OpenCommandHandler.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/OpenCommandHandler.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.views.handler;
+package org.eclipse.tcf.te.ui.views.handler;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.Command;
@@ -19,7 +19,7 @@ import org.eclipse.core.runtime.Status;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.tm.te.ui.views.activator.UIPlugin;
+import org.eclipse.tcf.te.ui.views.activator.UIPlugin;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.actions.ActionFactory;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/handler/PropertiesCommandHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/PropertiesCommandHandler.java
index 722c58cfc..6828eee18 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/handler/PropertiesCommandHandler.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/PropertiesCommandHandler.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.views.handler;
+package org.eclipse.tcf.te.ui.views.handler;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
@@ -16,12 +16,11 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.tm.te.ui.views.activator.UIPlugin;
-import org.eclipse.tm.te.ui.views.interfaces.IUIConstants;
-import org.eclipse.tm.te.ui.views.internal.editor.EditorInput;
-import org.eclipse.tm.te.ui.views.nls.Messages;
+import org.eclipse.tcf.te.ui.views.activator.UIPlugin;
+import org.eclipse.tcf.te.ui.views.editor.EditorInput;
+import org.eclipse.tcf.te.ui.views.interfaces.IUIConstants;
+import org.eclipse.tcf.te.ui.views.nls.Messages;
import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorReference;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PartInitException;
@@ -52,17 +51,13 @@ public class PropertiesCommandHandler extends AbstractHandler {
IWorkbenchPage page = window.getActivePage();
// Create the editor input object
IEditorInput input = new EditorInput(element);
- // Check for the Target Explorer editor already opened
- IEditorReference[] references = page.findEditors(input, IUIConstants.ID_EDITOR, IWorkbenchPage.MATCH_INPUT);
- if (references.length == 0) {
- try {
- // Opens the Target Explorer properties editor
- page.openEditor(input, IUIConstants.ID_EDITOR);
- } catch (PartInitException e) {
- IStatus status = new Status(IStatus.ERROR, UIPlugin.getUniqueIdentifier(),
- Messages.PropertiesCommandHandler_error_initPartFailed, e);
- UIPlugin.getDefault().getLog().log(status);
- }
+ try {
+ // Opens the Target Explorer properties editor
+ page.openEditor(input, IUIConstants.ID_EDITOR);
+ } catch (PartInitException e) {
+ IStatus status = new Status(IStatus.ERROR, UIPlugin.getUniqueIdentifier(),
+ Messages.PropertiesCommandHandler_error_initPartFailed, e);
+ UIPlugin.getDefault().getLog().log(status);
}
}
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/ShowInPropertiesHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/ShowInPropertiesHandler.java
new file mode 100644
index 000000000..eb9dfb78e
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/ShowInPropertiesHandler.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.views.handler;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.SafeRunner;
+import org.eclipse.jface.util.SafeRunnable;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+/**
+ * The handler to show the selected object in Properties view.
+ */
+public class ShowInPropertiesHandler extends AbstractHandler {
+
+ // The id of Properties view.
+ private static final String PROP_VIEW_ID = "org.eclipse.ui.views.PropertySheet"; //$NON-NLS-1$
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+ */
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ IWorkbenchWindow workbench = HandlerUtil.getActiveWorkbenchWindowChecked(event);
+ final IWorkbenchPage activePage = workbench.getActivePage();
+ SafeRunner.run(new SafeRunnable(){
+ @Override
+ public void run() throws Exception {
+ activePage.showView(PROP_VIEW_ID);
+ }});
+ return null;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/interfaces/IEditorPage.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/IEditorPage.java
index 6ceedc1c1..2cd529cf3 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/interfaces/IEditorPage.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/IEditorPage.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.views.interfaces;
+package org.eclipse.tcf.te.ui.views.interfaces;
import org.eclipse.core.runtime.IExecutableExtension;
import org.eclipse.ui.forms.editor.IFormPage;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/interfaces/IRoot.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/IRoot.java
index 2d2c08117..2dcd90300 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/interfaces/IRoot.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/IRoot.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.views.interfaces;
+package org.eclipse.tcf.te.ui.views.interfaces;
import org.eclipse.core.runtime.IAdaptable;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/interfaces/IUIConstants.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/IUIConstants.java
index d014da888..97279c0a5 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/interfaces/IUIConstants.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/IUIConstants.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.views.interfaces;
+package org.eclipse.tcf.te.ui.views.interfaces;
/**
* Target Explorer UI constants.
@@ -17,12 +17,12 @@ public interface IUIConstants {
/**
* The target explorer view id.
*/
- public static final String ID_EXPLORER = "org.eclipse.tm.te.ui.views.TargetExplorer"; //$NON-NLS-1$
+ public static final String ID_EXPLORER = "org.eclipse.tcf.te.ui.views.TargetExplorer"; //$NON-NLS-1$
/**
* The target explorer editor id.
*/
- public static final String ID_EDITOR = "org.eclipse.tm.te.ui.view.Editor"; //$NON-NLS-1$
+ public static final String ID_EDITOR = "org.eclipse.tcf.te.ui.view.Editor"; //$NON-NLS-1$
// ***** Define the constants for the Target Explorer view root mode *****
@@ -35,4 +35,9 @@ public interface IUIConstants {
* Root nodes are whatever is contributed to the view.
*/
public static final int MODE_NORMAL = 1;
+
+ /**
+ * The tabbed properties contributor id for Target Explorer
+ */
+ public static final String TABBED_PROPERTIES_CONTRIBUTOR_ID = "org.eclipse.tcf.te.ui"; //$NON-NLS-1$
}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/interfaces/ImageConsts.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/ImageConsts.java
index 05aee0bcc..3ac69785a 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/interfaces/ImageConsts.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/ImageConsts.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.views.interfaces;
+package org.eclipse.tcf.te.ui.views.interfaces;
/**
* Image registry constants.
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/tracing/ITraceIds.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/tracing/ITraceIds.java
new file mode 100644
index 000000000..4d4de5b8a
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/tracing/ITraceIds.java
@@ -0,0 +1,21 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.views.interfaces.tracing;
+
+/**
+ * TCF core plug-in trace slot identifiers.
+ */
+public interface ITraceIds {
+
+ /**
+ * If activated, tracing information about the editor event listeners is printed out.
+ */
+ public static String TRACE_EDITOR_EVENT_LISTENER = "trace/editor/eventListener"; //$NON-NLS-1$
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/interfaces/workingsets/IWorkingSetIDs.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/workingsets/IWorkingSetIDs.java
index e61bc3b82..10833b765 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/interfaces/workingsets/IWorkingSetIDs.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/workingsets/IWorkingSetIDs.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.views.interfaces.workingsets;
+package org.eclipse.tcf.te.ui.views.interfaces.workingsets;
/**
* Target Explorer working set ID constants.
@@ -17,10 +17,10 @@ public interface IWorkingSetIDs {
/**
* Target Explorer working set id.
*/
- public final static String ID_WS_TARGET_EXPLORER = "org.eclipse.tm.te.ui.views.workingset"; //$NON-NLS-1$
+ public final static String ID_WS_TARGET_EXPLORER = "org.eclipse.tcf.te.ui.views.workingset"; //$NON-NLS-1$
/**
* Target Explorer "Others" working set id.
*/
- public final static String ID_WS_OTHERS = "org.eclipse.tm.te.ui.views.workingset.others"; //$NON-NLS-1$
+ public final static String ID_WS_OTHERS = "org.eclipse.tcf.te.ui.views.workingset.others"; //$NON-NLS-1$
}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/interfaces/workingsets/IWorkingSetNameIDs.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/workingsets/IWorkingSetNameIDs.java
index 598409bd4..677c693ce 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/interfaces/workingsets/IWorkingSetNameIDs.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/workingsets/IWorkingSetNameIDs.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.views.interfaces.workingsets;
+package org.eclipse.tcf.te.ui.views.interfaces.workingsets;
/**
* Name and IDs used by the working set implementation.
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/PropertyContributorLabelProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/PropertyContributorLabelProvider.java
new file mode 100644
index 000000000..f26edfb29
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/PropertyContributorLabelProvider.java
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.views.internal;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.swt.graphics.Image;
+
+/**
+ * The label provider used by propertyContributor to provide a title bar.
+ */
+public class PropertyContributorLabelProvider extends LabelProvider {
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.viewers.LabelProvider#getImage(java.lang.Object)
+ */
+ @Override
+ public Image getImage(Object element) {
+ if(element instanceof IStructuredSelection) {
+ IStructuredSelection selection = (IStructuredSelection) element;
+ Object object = selection.getFirstElement();
+ ILabelProvider labelProvider = adapt(object);
+ if(labelProvider != null) return labelProvider.getImage(object);
+ }
+ return super.getImage(element);
+ }
+
+ /**
+ * Adapt the object to a label provider if it is adaptable.
+ *
+ * @param object The object to be adapted.
+ * @return The label provider for it.
+ */
+ private ILabelProvider adapt(Object object) {
+ ILabelProvider labelProvider = null;
+ if(object instanceof ILabelProvider) {
+ labelProvider = (ILabelProvider) object;
+ } else if(object instanceof IAdaptable) {
+ labelProvider = (ILabelProvider) ((IAdaptable)object).getAdapter(ILabelProvider.class);
+ }
+ if(object != null && labelProvider == null) {
+ labelProvider = (ILabelProvider) Platform.getAdapterManager().getAdapter(object, ILabelProvider.class);
+ }
+ return labelProvider;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.viewers.LabelProvider#getText(java.lang.Object)
+ */
+ @Override
+ public String getText(Object element) {
+ if(element instanceof IStructuredSelection) {
+ IStructuredSelection selection = (IStructuredSelection) element;
+ Object object = selection.getFirstElement();
+ ILabelProvider labelProvider = adapt(object);
+ if(labelProvider != null) return labelProvider.getText(object);
+ }
+ return super.getText(element);
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/internal/View.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/View.java
index ee63bffc2..028381d5f 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/internal/View.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/View.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.views.internal;
+package org.eclipse.tcf.te.ui.views.internal;
import java.util.Collections;
@@ -21,17 +21,21 @@ import org.eclipse.core.runtime.Status;
import org.eclipse.jface.action.GroupMarker;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.jface.action.Separator;
+import org.eclipse.jface.viewers.ColumnViewerEditor;
+import org.eclipse.jface.viewers.ColumnViewerEditorActivationStrategy;
import org.eclipse.jface.viewers.DoubleClickEvent;
import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.TreeViewerEditor;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Composite;
-import org.eclipse.tm.te.ui.views.activator.UIPlugin;
-import org.eclipse.tm.te.ui.views.interfaces.IRoot;
-import org.eclipse.tm.te.ui.views.interfaces.IUIConstants;
-import org.eclipse.tm.te.ui.views.nls.Messages;
+import org.eclipse.tcf.te.ui.trees.TreeViewerEditorActivationStrategy;
+import org.eclipse.tcf.te.ui.views.activator.UIPlugin;
+import org.eclipse.tcf.te.ui.views.interfaces.IRoot;
+import org.eclipse.tcf.te.ui.views.interfaces.IUIConstants;
+import org.eclipse.tcf.te.ui.views.nls.Messages;
+import org.eclipse.tcf.te.ui.views.workingsets.WorkingSetViewStateManager;
import org.eclipse.ui.IAggregateWorkingSet;
-import org.eclipse.ui.ILocalWorkingSetManager;
import org.eclipse.ui.ISources;
import org.eclipse.ui.IWorkbenchActionConstants;
import org.eclipse.ui.IWorkingSet;
@@ -44,6 +48,9 @@ import org.eclipse.ui.model.IWorkbenchAdapter;
import org.eclipse.ui.navigator.CommonNavigator;
import org.eclipse.ui.navigator.CommonViewer;
import org.eclipse.ui.navigator.ICommonActionConstants;
+import org.eclipse.ui.views.properties.IPropertySheetPage;
+import org.eclipse.ui.views.properties.tabbed.ITabbedPropertySheetPageContributor;
+import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
/**
@@ -52,7 +59,7 @@ import org.eclipse.ui.navigator.ICommonActionConstants;
* The view is based on the Eclipse Common Navigator framework.
*/
@SuppressWarnings("restriction")
-public class View extends CommonNavigator {
+public class View extends CommonNavigator implements ITabbedPropertySheetPageContributor{
// The view root mode
private int rootMode = IUIConstants.MODE_NORMAL;
@@ -63,14 +70,16 @@ public class View extends CommonNavigator {
private String workingSetLabel;
/**
- * The local working set manager instance.
+ * The working set view state manager.
*/
- private final ILocalWorkingSetManager localWorkingSetManager = PlatformUI.getWorkbench().createLocalWorkingSetManager();
+ private final WorkingSetViewStateManager stateManager;
/**
* Constructor.
*/
public View() {
+ super();
+ stateManager = new WorkingSetViewStateManager(this);
}
/* (non-Javadoc)
@@ -124,12 +133,12 @@ public class View extends CommonNavigator {
}
/**
- * Returns the local working set manager instance.
+ * Returns the working set view state manager instance.
*
- * @return The local working set manager instance.
+ * @return The working set view state manager instance.
*/
- public final ILocalWorkingSetManager getLocalWorkingSetManager() {
- return localWorkingSetManager;
+ public final WorkingSetViewStateManager getStateManager() {
+ return stateManager;
}
/* (non-Javadoc)
@@ -137,7 +146,7 @@ public class View extends CommonNavigator {
*/
@Override
public void dispose() {
- localWorkingSetManager.dispose();
+ stateManager.dispose();
super.dispose();
}
@@ -146,7 +155,11 @@ public class View extends CommonNavigator {
*/
@Override
protected CommonViewer createCommonViewerObject(Composite parent) {
- return new ViewViewer(getViewSite().getId(), parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
+ ViewViewer viewer = new ViewViewer(getViewSite().getId(), parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
+ // Define an editor activation strategy for the common viewer so as to be invoked only programmatically.
+ ColumnViewerEditorActivationStrategy activationStrategy = new TreeViewerEditorActivationStrategy(getSite().getId(), viewer);
+ TreeViewerEditor.create(viewer, null, activationStrategy, ColumnViewerEditor.DEFAULT);
+ return viewer;
}
/* (non-Javadoc)
@@ -234,7 +247,7 @@ public class View extends CommonNavigator {
IWorkbenchAdapter adapter = (IWorkbenchAdapter) ((IAdaptable) input).getAdapter(IWorkbenchAdapter.class);
if (adapter != null) contentDescription = adapter.getLabel(input);
}
- else if (input instanceof IRoot) {
+ else if (input instanceof IRoot || input instanceof WorkingSetViewStateManager) {
// The root node does not have a content description
}
else if (input != null && !(input instanceof IAggregateWorkingSet)) {
@@ -296,4 +309,25 @@ public class View extends CommonNavigator {
return result;
}
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.navigator.CommonNavigator#getAdapter(java.lang.Class)
+ */
+ @Override
+ public Object getAdapter(Class adapter) {
+ if(adapter == IPropertySheetPage.class) {
+ return new TabbedPropertySheetPage(this);
+ }
+ return super.getAdapter(adapter);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.views.properties.tabbed.ITabbedPropertySheetPageContributor#getContributorId()
+ */
+ @Override
+ public String getContributorId() {
+ return IUIConstants.TABBED_PROPERTIES_CONTRIBUTOR_ID;
+ }
}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/internal/ViewRoot.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/ViewRoot.java
index f64218cd5..66944ac2e 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/internal/ViewRoot.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/ViewRoot.java
@@ -7,10 +7,10 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.views.internal;
+package org.eclipse.tcf.te.ui.views.internal;
import org.eclipse.core.runtime.PlatformObject;
-import org.eclipse.tm.te.ui.views.interfaces.IRoot;
+import org.eclipse.tcf.te.ui.views.interfaces.IRoot;
/**
* Target Explorer view root node implementation
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/internal/ViewViewer.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/ViewViewer.java
index 1c70b7552..18e00adbc 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/internal/ViewViewer.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/ViewViewer.java
@@ -7,12 +7,14 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.views.internal;
+package org.eclipse.tcf.te.ui.views.internal;
+
+import java.util.EventObject;
import org.eclipse.jface.viewers.ViewerSorter;
import org.eclipse.swt.widgets.Composite;
-import org.eclipse.tm.te.runtime.events.EventManager;
-import org.eclipse.tm.te.ui.views.events.ViewerContentChangeEvent;
+import org.eclipse.tcf.te.runtime.events.EventManager;
+import org.eclipse.tcf.te.ui.views.events.ViewerContentChangeEvent;
import org.eclipse.ui.navigator.CommonViewer;
import org.eclipse.ui.navigator.CommonViewerSorter;
@@ -20,10 +22,15 @@ import org.eclipse.ui.navigator.CommonViewerSorter;
* Target Explorer common viewer implementation.
*/
public class ViewViewer extends CommonViewer {
+ // Flag to mark the viewer silent. In silent mode, no
+ // ViewerContentChangeEvents are send.
+ private boolean silent = false;
/**
* Constructor.
*
+ * @param view
+ * The common navigator based parent view. Must not be <code>null</code>.
* @param viewerId
* An id tied to the extensions that is used to focus specific
* content to a particular instance of the Common Navigator
@@ -37,6 +44,29 @@ public class ViewViewer extends CommonViewer {
super(viewerId, parent, style);
}
+ /**
+ * Fire the given event if the viewer is not in silent mode.
+ *
+ * @param event The event or <code>null</code>.
+ */
+ private void fireEvent(EventObject event) {
+ if (!silent && event != null) {
+ EventManager.getInstance().fireEvent(event);
+ }
+ }
+
+ /**
+ * Sets the viewers event firing silent mode.
+ *
+ * @param silent <code>True</code> to stop firing change events, <code>false</code> otherwise.
+ * @return <code>True</code> if the silent mode changed.
+ */
+ public boolean setSilentMode(boolean silent) {
+ boolean changed = this.silent != silent;
+ this.silent = silent;
+ return changed;
+ }
+
/* (non-Javadoc)
* @see org.eclipse.ui.navigator.CommonViewer#add(java.lang.Object, java.lang.Object[])
*/
@@ -45,7 +75,7 @@ public class ViewViewer extends CommonViewer {
super.add(parentElement, childElements);
ViewerContentChangeEvent event = new ViewerContentChangeEvent(this, ViewerContentChangeEvent.ADD);
- EventManager.getInstance().fireEvent(event);
+ fireEvent(event);
}
/* (non-Javadoc)
@@ -56,7 +86,7 @@ public class ViewViewer extends CommonViewer {
super.remove(elements);
ViewerContentChangeEvent event = new ViewerContentChangeEvent(this, ViewerContentChangeEvent.REMOVE);
- EventManager.getInstance().fireEvent(event);
+ fireEvent(event);
}
/* (non-Javadoc)
@@ -67,18 +97,7 @@ public class ViewViewer extends CommonViewer {
super.remove(parent, elements);
ViewerContentChangeEvent event = new ViewerContentChangeEvent(this, ViewerContentChangeEvent.REMOVE);
- EventManager.getInstance().fireEvent(event);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.navigator.CommonViewer#refresh(java.lang.Object)
- */
- @Override
- public void refresh(Object element) {
- super.refresh(element);
-
- ViewerContentChangeEvent event = new ViewerContentChangeEvent(this, ViewerContentChangeEvent.REFRESH);
- EventManager.getInstance().fireEvent(event);
+ fireEvent(event);
}
/* (non-Javadoc)
@@ -89,7 +108,7 @@ public class ViewViewer extends CommonViewer {
super.refresh(element, updateLabels);
ViewerContentChangeEvent event = new ViewerContentChangeEvent(this, ViewerContentChangeEvent.REFRESH);
- EventManager.getInstance().fireEvent(event);
+ fireEvent(event);
}
/* (non-Javadoc)
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/internal/ViewViewerSorter.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/ViewViewerSorter.java
index 628e1f982..f505c9e62 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/internal/ViewViewerSorter.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/ViewViewerSorter.java
@@ -7,13 +7,14 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.views.internal;
+package org.eclipse.tcf.te.ui.views.internal;
import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.viewers.TreePath;
import org.eclipse.jface.viewers.TreePathViewerSorter;
import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.tm.te.ui.trees.TreeViewerSorter;
+import org.eclipse.tcf.te.ui.trees.TreeViewerSorter;
+import org.eclipse.ui.IWorkingSet;
import org.eclipse.ui.navigator.CommonViewerSorter;
import org.eclipse.ui.navigator.INavigatorContentService;
@@ -52,9 +53,11 @@ public final class ViewViewerSorter extends TreePathViewerSorter {
public int compare(Viewer viewer, TreePath parentPath, Object e1, Object e2) {
int result = sorter.compare(viewer, parentPath, e1, e2);
- if (result == category(e1) - category(e2)) {
- int defaultSorterResult = defaultSorter.compare(viewer, parentPath, e1, e2);
- if (defaultSorterResult != 0) result = defaultSorterResult;
+ if (!(e1 instanceof IWorkingSet) && !(e2 instanceof IWorkingSet)) {
+ if (result == category(e1) - category(e2)) {
+ int defaultSorterResult = defaultSorter.compare(viewer, parentPath, e1, e2);
+ if (defaultSorterResult != 0) result = defaultSorterResult;
+ }
}
return result;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/listeners/WorkbenchPartListener.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/listeners/WorkbenchPartListener.java
index 80bc9b1ff..1649f023e 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/listeners/WorkbenchPartListener.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/listeners/WorkbenchPartListener.java
@@ -7,12 +7,12 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.views.listeners;
+package org.eclipse.tcf.te.ui.views.listeners;
import java.util.HashMap;
import java.util.Map;
-import org.eclipse.tm.te.ui.views.interfaces.IUIConstants;
+import org.eclipse.tcf.te.ui.views.interfaces.IUIConstants;
import org.eclipse.ui.IPartListener2;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.IWorkbenchPartReference;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/listeners/WorkbenchWindowListener.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/listeners/WorkbenchWindowListener.java
index c3a6db834..491c43711 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/listeners/WorkbenchWindowListener.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/listeners/WorkbenchWindowListener.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.views.listeners;
+package org.eclipse.tcf.te.ui.views.listeners;
import org.eclipse.ui.IPartService;
import org.eclipse.ui.IWindowListener;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/nls/Messages.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/nls/Messages.java
index 8a89d50d0..7a7a45930 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/nls/Messages.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/nls/Messages.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.views.nls;
+package org.eclipse.tcf.te.ui.views.nls;
import org.eclipse.osgi.util.NLS;
@@ -17,7 +17,7 @@ import org.eclipse.osgi.util.NLS;
public class Messages extends NLS {
// The plug-in resource bundle name
- private static final String BUNDLE_NAME = "org.eclipse.tm.te.ui.views.nls.Messages"; //$NON-NLS-1$
+ private static final String BUNDLE_NAME = "org.eclipse.tcf.te.ui.views.nls.Messages"; //$NON-NLS-1$
/**
* Static constructor.
@@ -40,11 +40,14 @@ public class Messages extends NLS {
public static String WorkingSetActionProvider_multipleWorkingSets;
- public static String WorkingSetRootModeActionGroup_Top_Level_Element;
- public static String WorkingSetRootModeActionGroup_Target;
- public static String WorkingSetRootModeActionGroup_Working_Set;
+ public static String WorkingSetActionGroup_Top_Level_Element;
+ public static String WorkingSetActionGroup_Elements;
+ public static String WorkingSetActionGroup_Working_Set;
- public static String WorkingSetContentProvider_others_name;
+ public static String ViewStateManager_others_name;
+
+ public static String ConfigureWorkingSetAction_text;
+ public static String ConfigureWorkingSetAction_toolTip;
public static String PropertiesCommandHandler_error_initPartFailed;
@@ -61,4 +64,15 @@ public class Messages extends NLS {
public static String TargetWorkingSetPage_warning_resourceMustBeChecked;
public static String TargetWorkingSetPage_title;
public static String TargetWorkingSetPage_workingSet_description;
+
+ public static String WorkingSetConfigurationDialog_down_label;
+ public static String WorkingSetConfigurationDialog_up_label;
+ public static String WorkingSetConfigurationDialog_title;
+ public static String WorkingSetConfigurationDialog_selectAll_label;
+ public static String WorkingSetConfigurationDialog_edit_label;
+ public static String WorkingSetConfigurationDialog_message;
+ public static String WorkingSetConfigurationDialog_deselectAll_label;
+ public static String WorkingSetConfigurationDialog_new_label;
+ public static String WorkingSetConfigurationDialog_sort_working_sets;
+ public static String WorkingSetConfigurationDialog_remove_label;
}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/nls/Messages.properties b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/nls/Messages.properties
index 0fcf4b7b0..a79c015c1 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/nls/Messages.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/nls/Messages.properties
@@ -1,5 +1,5 @@
#
-# org.eclipse.tm.te.ui.views
+# org.eclipse.tcf.te.ui.views
# Externalized Strings.
#
@@ -14,15 +14,18 @@ View_workingSetModel=Working Sets
NewActionProvider_NewMenu_label=&New
NewActionProvider_NewWizardCommandAction_label=&Other...
-NewActionProvider_NewWizardCommandAction_tooltip=Open the New target wizard
+NewActionProvider_NewWizardCommandAction_tooltip=Open the New wizard
WorkingSetActionProvider_multipleWorkingSets=Multiple Working Sets
-WorkingSetRootModeActionGroup_Top_Level_Element=&Top Level Elements
-WorkingSetRootModeActionGroup_Target=Targets
-WorkingSetRootModeActionGroup_Working_Set=Working Sets
+WorkingSetActionGroup_Top_Level_Element=&Top Level Elements
+WorkingSetActionGroup_Elements=Elements
+WorkingSetActionGroup_Working_Set=Working Sets
-WorkingSetContentProvider_others_name=Other Targets
+ViewStateManager_others_name=Other
+
+ConfigureWorkingSetAction_text=Configure Working Sets...
+ConfigureWorkingSetAction_toolTip=Configure Working Sets...
# ***** Command Handler *****
@@ -43,3 +46,14 @@ TargetWorkingSetPage_warning_resourceMustBeChecked=No resources selected.
TargetWorkingSetPage_addAll_button=A&dd All ->
TargetWorkingSetPage_title=Target Working Set
TargetWorkingSetPage_warning_nameWhitespace=The name must not have leading or trailing whitespace.
+
+WorkingSetConfigurationDialog_down_label=&Down
+WorkingSetConfigurationDialog_up_label=&Up
+WorkingSetConfigurationDialog_title=Configure Working Sets
+WorkingSetConfigurationDialog_selectAll_label=Select &All
+WorkingSetConfigurationDialog_edit_label=&Edit...
+WorkingSetConfigurationDialog_message=Select and sort &working sets visible in Target Explorer\:
+WorkingSetConfigurationDialog_deselectAll_label=Dese&lect All
+WorkingSetConfigurationDialog_new_label=&New...
+WorkingSetConfigurationDialog_sort_working_sets=&Sort working sets
+WorkingSetConfigurationDialog_remove_label=&Remove
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/perspective/PerspectiveFactory.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/perspective/PerspectiveFactory.java
index 24f900f49..6f7ec4063 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/perspective/PerspectiveFactory.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/perspective/PerspectiveFactory.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.views.perspective;
+package org.eclipse.tcf.te.ui.views.perspective;
import org.eclipse.core.runtime.PlatformObject;
import org.eclipse.ui.IFolderLayout;
@@ -21,7 +21,7 @@ import org.eclipse.ui.PlatformUI;
*/
public class PerspectiveFactory extends PlatformObject implements IPerspectiveFactory {
private final static String[] VIEWS_FOR_LEFT_AREA = new String[] {
- "org.eclipse.tm.te.ui.views.TargetExplorer", //$NON-NLS-1$
+ "org.eclipse.tcf.te.ui.views.TargetExplorer", //$NON-NLS-1$
"org.eclipse.ui.navigator.ProjectExplorer" //$NON-NLS-1$
};
@@ -58,6 +58,8 @@ public class PerspectiveFactory extends PlatformObject implements IPerspectiveFa
lowerRight.addView("org.eclipse.pde.runtime.LogView"); //$NON-NLS-1$
if (PlatformUI.getWorkbench().getViewRegistry().find("org.eclipse.ui.views.TaskList") != null) //$NON-NLS-1$
lowerRight.addPlaceholder("org.eclipse.ui.views.TaskList"); //$NON-NLS-1$
+ if (PlatformUI.getWorkbench().getViewRegistry().find("org.eclipse.ui.views.PropertySheet") != null) //$NON-NLS-1$
+ lowerRight.addPlaceholder("org.eclipse.ui.views.PropertySheet"); //$NON-NLS-1$
// place details view port to the right of editor area
IPlaceholderFolderLayout right = layout.createPlaceholderFolder("right", IPageLayout.RIGHT, 0.75f, editorArea); //$NON-NLS-1$
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/tabbed/BaseTitledSection.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/tabbed/BaseTitledSection.java
new file mode 100644
index 000000000..97aadc541
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/tabbed/BaseTitledSection.java
@@ -0,0 +1,167 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.views.tabbed;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CLabel;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.FormLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.forms.widgets.ExpandableComposite;
+import org.eclipse.ui.forms.widgets.Section;
+import org.eclipse.ui.views.properties.tabbed.AbstractPropertySection;
+import org.eclipse.ui.views.properties.tabbed.ITabbedPropertyConstants;
+import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
+
+/**
+ * The base section that displays a title in a title bar.
+ */
+public abstract class BaseTitledSection extends AbstractPropertySection {
+
+ // The main composite used to create the section content.
+ protected Composite composite;
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#createControls(org.eclipse.swt.widgets.Composite, org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage)
+ */
+ @Override
+ public void createControls(Composite parent, TabbedPropertySheetPage aTabbedPropertySheetPage) {
+ super.createControls(parent, aTabbedPropertySheetPage);
+ parent.setLayout(new FormLayout());
+
+ Section section = getWidgetFactory().createSection(parent, ExpandableComposite.TITLE_BAR);
+ section.setText(getText());
+ FormData data = new FormData();
+ data.left = new FormAttachment(0, ITabbedPropertyConstants.HMARGIN);
+ data.right = new FormAttachment(100, -ITabbedPropertyConstants.HMARGIN);
+ data.top = new FormAttachment(0, 2 * ITabbedPropertyConstants.VMARGIN);
+ section.setLayoutData(data);
+
+ composite = getWidgetFactory().createComposite(parent);
+ FormLayout layout = new FormLayout();
+ layout.spacing = ITabbedPropertyConstants.HMARGIN;
+ composite.setLayout(layout);
+
+ data = new FormData();
+ data.left = new FormAttachment(0, 2 * ITabbedPropertyConstants.HMARGIN);
+ data.right = new FormAttachment(100, -2 * ITabbedPropertyConstants.HMARGIN);
+ data.top = new FormAttachment(section, ITabbedPropertyConstants.VSPACE);
+ data.bottom = new FormAttachment(100, 0);
+ composite.setLayoutData(data);
+ }
+
+ /**
+ * Create a label for the control using the specified text.
+ *
+ * @param control The control for which the label is created.
+ * @param text The label text.
+ */
+ protected void createLabel(Control control, String text) {
+ CLabel nameLabel = getWidgetFactory().createCLabel(composite, text);
+ FormData data = new FormData();
+ data.left = new FormAttachment(0, 0);
+ data.right = new FormAttachment(control, -ITabbedPropertyConstants.HSPACE);
+ data.top = new FormAttachment(control, 0, SWT.CENTER);
+ nameLabel.setLayoutData(data);
+ }
+
+ /**
+ * Create a text field and a label with the specified label
+ * relative to the specified control.
+ *
+ * @param control The control relative to.
+ * @param label The text of the label.
+ * @return The new text created.
+ */
+ protected Text createTextField(Control control, String label) {
+ Text text = createText(control);
+ createLabel(text, label);
+ return text;
+ }
+
+ /**
+ * Create a wrap text field and a label with the specified label
+ * relative to the specified control.
+ *
+ * @param control The control relative to.
+ * @param label The text of the label.
+ * @return The new wrap text created.
+ */
+ protected Text createWrapTextField(Control control, String label) {
+ Text text = createWrapText(control);
+ createLabel(text, label);
+ return text;
+ }
+
+ /**
+ * Create a text field relative to the specified control.
+ *
+ * @param control The control to layout the new text field.
+ * @return The new text field created.
+ */
+ private Text createText(Control control) {
+ Text text = getWidgetFactory().createText(composite, ""); //$NON-NLS-1$
+ FormData data = new FormData();
+ data.left = new FormAttachment(0, STANDARD_LABEL_WIDTH);
+ data.right = new FormAttachment(100, 0);
+ if (control == null) {
+ data.top = new FormAttachment(0, ITabbedPropertyConstants.VSPACE);
+ }
+ else {
+ data.top = new FormAttachment(control, ITabbedPropertyConstants.VSPACE);
+ }
+ text.setLayoutData(data);
+ text.setEditable(false);
+ return text;
+ }
+
+ /**
+ * Create a wrap text field relative to the specified control.
+ *
+ * @param control The control to layout the new wrap text field.
+ * @return The new wrap text field created.
+ */
+ private Text createWrapText(Control control) {
+ Text text = getWidgetFactory().createText(composite, "", SWT.WRAP); //$NON-NLS-1$
+ FormData data = new FormData();
+ data.left = new FormAttachment(0, STANDARD_LABEL_WIDTH);
+ data.right = new FormAttachment(100, 0);
+ if (control == null) {
+ data.top = new FormAttachment(0, ITabbedPropertyConstants.VSPACE);
+ }
+ else {
+ data.top = new FormAttachment(control, ITabbedPropertyConstants.VSPACE);
+ }
+ data.width = 200;
+ text.setLayoutData(data);
+ text.setEditable(false);
+ return text;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#refresh()
+ */
+ @Override
+ public void refresh() {
+ composite.layout();
+ }
+
+ /**
+ * Get the text which is used as the title in the title bar of the section.
+ *
+ * @return A text string representing the section.
+ */
+ protected abstract String getText();
+} \ No newline at end of file
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/workingsets/CustomizedOrderComparator.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/workingsets/CustomizedOrderComparator.java
new file mode 100644
index 000000000..13ed9becd
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/workingsets/CustomizedOrderComparator.java
@@ -0,0 +1,120 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.views.workingsets;
+
+import java.util.ArrayList;
+import java.util.Comparator;
+import java.util.List;
+import java.util.StringTokenizer;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.ui.IMemento;
+import org.eclipse.ui.IPersistableElement;
+import org.eclipse.ui.IWorkingSet;
+import org.eclipse.ui.navigator.IMementoAware;
+
+/**
+ * <p>
+ * The comparator to sort working sets in the order specified by end users.
+ * It reads a series of working set names and sort the given list in the order
+ * of the working set names.
+ * </p>
+ */
+public class CustomizedOrderComparator implements Comparator<IWorkingSet>, IMementoAware, IPersistableElement, IAdaptable {
+ // The separator delimiter to separate working set names store in the memento file.
+ private static final String WORKINGSET_SEPARATOR = "|"; //$NON-NLS-1$
+ // The sequence of the sorted working set.
+ private static final String ATTR_SEQUENCE = "sequence"; //$NON-NLS-1$
+
+ // Working set names which are used to sort working sets.
+ private List<String> workingSetNames;
+
+ /**
+ * Create a comparator instance.
+ */
+ public CustomizedOrderComparator() {
+ }
+
+ /**
+ * Create a comparator instance using the same order of the
+ * specified working set array.
+ *
+ * @param workingSets The working set array
+ */
+ public CustomizedOrderComparator(IWorkingSet[] workingSets) {
+ workingSetNames = new ArrayList<String>();
+ for (IWorkingSet workingSet : workingSets) {
+ workingSetNames.add(workingSet.getName());
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.navigator.IMementoAware#saveState(org.eclipse.ui.IMemento)
+ */
+ @Override
+ public void saveState(IMemento memento) {
+ StringBuilder buf = new StringBuilder();
+ for (String name : workingSetNames) {
+ buf.append(name + WORKINGSET_SEPARATOR);
+ }
+ if (buf.length() > 0) buf.deleteCharAt(buf.length() - 1);
+ memento.putString(ATTR_SEQUENCE, buf.toString());
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.navigator.IMementoAware#restoreState(org.eclipse.ui.IMemento)
+ */
+ @Override
+ public void restoreState(IMemento aMemento) {
+ String wsNames = aMemento.getString(ATTR_SEQUENCE);
+ StringTokenizer st = new StringTokenizer(wsNames, WORKINGSET_SEPARATOR);
+ workingSetNames = new ArrayList<String>();
+ while (st.hasMoreTokens()) {
+ workingSetNames.add(st.nextToken());
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.IPersistableElement#getFactoryId()
+ */
+ @Override
+ public String getFactoryId() {
+ return CustomizedOrderComparatorFactory.FACTORY_ID;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
+ */
+ @Override
+ public Object getAdapter(Class adapter) {
+ if (adapter == IPersistableElement.class) {
+ return this;
+ }
+ return null;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
+ */
+ @Override
+ public int compare(IWorkingSet o1, IWorkingSet o2) {
+ String id1 = o1.getName();
+ String id2 = o2.getName();
+ int index1 = workingSetNames.indexOf(id1);
+ int index2 = workingSetNames.indexOf(id2);
+ if (index1 != -1 && index2 != -1) return index1 > index2 ? 1 : (index1 < index2 ? -1 : 0);
+ return 0;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/workingsets/CustomizedOrderComparatorFactory.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/workingsets/CustomizedOrderComparatorFactory.java
new file mode 100644
index 000000000..44ebd62fc
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/workingsets/CustomizedOrderComparatorFactory.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.views.workingsets;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.ui.IElementFactory;
+import org.eclipse.ui.IMemento;
+/**
+ * The element factory to create a CustomizedOrderComparator from a
+ * memento.
+ */
+public class CustomizedOrderComparatorFactory implements IElementFactory {
+ public static final String FACTORY_ID = "org.eclipse.tcf.te.ui.views.workingsets.CustomizedOrderComparatorFactory"; //$NON-NLS-1$
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IElementFactory#createElement(org.eclipse.ui.IMemento)
+ */
+ @Override
+ public IAdaptable createElement(IMemento memento) {
+ CustomizedOrderComparator comparator = new CustomizedOrderComparator();
+ comparator.restoreState(memento);
+ return comparator;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/workingsets/OthersWorkingSetElementUpdater.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/workingsets/OthersWorkingSetElementUpdater.java
new file mode 100644
index 000000000..319d8d178
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/workingsets/OthersWorkingSetElementUpdater.java
@@ -0,0 +1,176 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.views.workingsets;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.tcf.te.runtime.interfaces.workingsets.IWorkingSetElement;
+import org.eclipse.tcf.te.ui.views.internal.View;
+import org.eclipse.tcf.te.ui.views.internal.ViewRoot;
+import org.eclipse.tcf.te.ui.views.internal.ViewViewer;
+import org.eclipse.ui.IWorkingSet;
+import org.eclipse.ui.navigator.CommonViewer;
+
+/**
+ * "Others" working set element updater.
+ */
+public class OthersWorkingSetElementUpdater extends WorkingSetElementUpdater {
+ // The reference to the "Others" working set
+ private IWorkingSet othersWorkingSet;
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.views.workingsets.WorkingSetElementUpdater#add(org.eclipse.ui.IWorkingSet)
+ */
+ @Override
+ public void add(IWorkingSet workingSet) {
+ Assert.isTrue(othersWorkingSet == null);
+ othersWorkingSet = workingSet;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.views.workingsets.WorkingSetElementUpdater#remove(org.eclipse.ui.IWorkingSet)
+ */
+ @Override
+ public boolean remove(IWorkingSet workingSet) {
+ Assert.isTrue(othersWorkingSet == workingSet);
+ othersWorkingSet = null;
+ return true;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.views.workingsets.WorkingSetElementUpdater#contains(org.eclipse.ui.IWorkingSet)
+ */
+ @Override
+ public boolean contains(IWorkingSet workingSet) {
+ return othersWorkingSet == workingSet;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.views.workingsets.WorkingSetElementUpdater#onUpdateWorkingSets(org.eclipse.ui.navigator.CommonViewer, org.eclipse.ui.IWorkingSet[])
+ */
+ @Override
+ protected void onUpdateWorkingSets(CommonViewer viewer, IWorkingSet[] workingsets) {
+ Assert.isNotNull(viewer);
+ Assert.isNotNull(workingsets);
+
+ // The list of elements not be contained by any other working set
+ List<WorkingSetElementHolder> otherElements = new ArrayList<WorkingSetElementHolder>();
+
+ // Get all (root) elements from the common viewer
+ Object[] elements = viewer.getNavigatorContentService().createCommonContentProvider().getElements(ViewRoot.getInstance());
+
+ // Get all working sets
+ WorkingSetViewStateManager manager = viewer.getCommonNavigator() instanceof View ? ((View)viewer.getCommonNavigator()).getStateManager() : null;
+ IWorkingSet[] allWorkingSets = manager != null ? manager.getAllWorkingSets() : new IWorkingSet[0];
+
+ // Loop the elements and check if they are contained in a working set
+ for (Object element : elements) {
+ if (!(element instanceof IWorkingSetElement)) continue;
+
+ boolean isContained = isContained((IWorkingSetElement)element, allWorkingSets);
+ if (!isContained) {
+ WorkingSetElementHolder holder = null;
+
+ IAdaptable[] wsElements = othersWorkingSet.getElements();
+ for (IAdaptable wsElement : wsElements) {
+ if (!(wsElement instanceof WorkingSetElementHolder)) continue;
+
+ IWorkingSetElement candidate = ((WorkingSetElementHolder)wsElement).getElement();
+ String candidateId = ((WorkingSetElementHolder)wsElement).getElementId();
+
+ if (element.equals(candidate)) {
+ holder = (WorkingSetElementHolder)wsElement;
+ break;
+ } else if (candidate == null && (((IWorkingSetElement)element).getElementId().equals(candidateId))) {
+ holder = (WorkingSetElementHolder)wsElement;
+ ((WorkingSetElementHolder)wsElement).setElement((IWorkingSetElement)element);
+ break;
+ }
+ }
+
+ if (holder == null) {
+ holder = new WorkingSetElementHolder(othersWorkingSet.getName(), ((IWorkingSetElement)element).getElementId());
+ holder.setElement((IWorkingSetElement)element);
+ }
+ otherElements.add(holder);
+ }
+ }
+
+ othersWorkingSet.setElements(otherElements.toArray(new IAdaptable[otherElements.size()]));
+
+ // Trigger a view update, but without triggering ourselves again.
+ if (viewer instanceof ViewViewer) {
+ boolean changed = ((ViewViewer)viewer).setSilentMode(true);
+ viewer.refresh();
+ if (changed) ((ViewViewer)viewer).setSilentMode(false);
+ }
+ }
+
+ /**
+ * Walks over the given working set list and checks if the element is contained in
+ * one of them.
+ *
+ * @param element The element. Must not be <code>null</code>.
+ * @param allWorkingSets The list of working sets. Must not be <code>null</code>.
+ *
+ * @return <code>True</code> if the element is contained in at least one of the given working sets, <code>false</code> otherwise.
+ */
+ protected boolean isContained(IWorkingSetElement element, IWorkingSet[] allWorkingSets) {
+ Assert.isNotNull(element);
+ Assert.isNotNull(allWorkingSets);
+
+ boolean contained = false;
+
+ for (IWorkingSet workingSet : allWorkingSets) {
+ if (workingSet.equals(othersWorkingSet)) continue;
+ contained = isContained(element, workingSet);
+ if (contained) break;
+ }
+
+ return contained;
+ }
+
+ /**
+ * Checks if the element is contained in the given working set.
+ *
+ * @param element The element. Must not be <code>null</code>.
+ * @param workingSet The working set. Must not be <code>null</code>.
+ *
+ * @return <code>True</code> if the element is contained in the given working set, <code>false</code> otherwise.
+ */
+ protected boolean isContained(IWorkingSetElement element, IWorkingSet workingSet) {
+ Assert.isNotNull(element);
+ Assert.isNotNull(workingSet);
+
+ boolean contained = false;
+
+ IAdaptable[] wsElements = workingSet.getElements();
+ for (IAdaptable wsElement : wsElements) {
+ if (!(wsElement instanceof WorkingSetElementHolder)) continue;
+
+ IWorkingSetElement candidate = ((WorkingSetElementHolder)wsElement).getElement();
+ String candidateId = ((WorkingSetElementHolder)wsElement).getElementId();
+
+ if (element.equals(candidate)) {
+ contained = true;
+ break;
+ } else if (candidate == null && element.getElementId().equals(candidateId)) {
+ contained = true;
+ ((WorkingSetElementHolder)wsElement).setElement(element);
+ break;
+ }
+ }
+
+ return contained;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/workingsets/WorkingSetElementAdapter.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/workingsets/WorkingSetElementAdapter.java
index 798684513..aa47e8c03 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/workingsets/WorkingSetElementAdapter.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/workingsets/WorkingSetElementAdapter.java
@@ -7,13 +7,13 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.views.workingsets;
+package org.eclipse.tcf.te.ui.views.workingsets;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.tm.te.runtime.interfaces.workingsets.IWorkingSetElement;
+import org.eclipse.tcf.te.runtime.interfaces.workingsets.IWorkingSetElement;
import org.eclipse.ui.IWorkingSet;
import org.eclipse.ui.IWorkingSetElementAdapter;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/workingsets/WorkingSetElementHolder.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/workingsets/WorkingSetElementHolder.java
index 3d4154356..e4ed9c94f 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/workingsets/WorkingSetElementHolder.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/workingsets/WorkingSetElementHolder.java
@@ -7,11 +7,11 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.views.workingsets;
+package org.eclipse.tcf.te.ui.views.workingsets;
import org.eclipse.core.runtime.PlatformObject;
-import org.eclipse.tm.te.runtime.interfaces.workingsets.IWorkingSetElement;
-import org.eclipse.tm.te.ui.views.interfaces.workingsets.IWorkingSetNameIDs;
+import org.eclipse.tcf.te.runtime.interfaces.workingsets.IWorkingSetElement;
+import org.eclipse.tcf.te.ui.views.interfaces.workingsets.IWorkingSetNameIDs;
import org.eclipse.ui.IMemento;
import org.eclipse.ui.IPersistableElement;
@@ -108,7 +108,7 @@ public final class WorkingSetElementHolder extends PlatformObject implements IPe
*/
@Override
public String getFactoryId() {
- return "org.eclipse.tm.te.ui.views.workingsets.WorkingSetElementHolderFactory"; //$NON-NLS-1$
+ return "org.eclipse.tcf.te.ui.views.workingsets.WorkingSetElementHolderFactory"; //$NON-NLS-1$
}
/* (non-Javadoc)
@@ -134,4 +134,46 @@ public final class WorkingSetElementHolder extends PlatformObject implements IPe
}
return super.getAdapter(adapter);
}
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode() {
+ if (elementId != null) {
+ int hash = elementId.hashCode();
+ if (wsName != null) {
+ hash = hash << 16;
+ hash += wsName.hashCode();
+ }
+ return hash;
+ }
+ else if (wsName != null) {
+ return wsName.hashCode();
+ }
+
+ return super.hashCode();
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj) {
+ // Working set element holder are identical if the element id
+ // and working set name matches
+ if (obj instanceof WorkingSetElementHolder) {
+ boolean equal = true;
+
+ if (elementId == null) equal &= ((WorkingSetElementHolder)obj).elementId == null;
+ else equal &= elementId.equals(((WorkingSetElementHolder)obj).elementId);
+
+ if (wsName == null) equal &= ((WorkingSetElementHolder)obj).wsName == null;
+ else equal &= wsName.equals(((WorkingSetElementHolder)obj).wsName);
+
+ return equal;
+ }
+
+ return super.equals(obj);
+ }
}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/workingsets/WorkingSetElementHolderAdapterFactory.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/workingsets/WorkingSetElementHolderAdapterFactory.java
index fe4104829..ff21620d7 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/workingsets/WorkingSetElementHolderAdapterFactory.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/workingsets/WorkingSetElementHolderAdapterFactory.java
@@ -7,10 +7,10 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.views.workingsets;
+package org.eclipse.tcf.te.ui.views.workingsets;
import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.tm.te.runtime.interfaces.workingsets.IWorkingSetElement;
+import org.eclipse.tcf.te.runtime.interfaces.workingsets.IWorkingSetElement;
/**
* The adapter factory to adapt a working set element holder to a working set element.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/workingsets/WorkingSetElementHolderFactory.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/workingsets/WorkingSetElementHolderFactory.java
index a48657c4f..049ac8f7e 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/workingsets/WorkingSetElementHolderFactory.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/workingsets/WorkingSetElementHolderFactory.java
@@ -7,10 +7,10 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.views.workingsets;
+package org.eclipse.tcf.te.ui.views.workingsets;
import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.tm.te.ui.views.interfaces.workingsets.IWorkingSetNameIDs;
+import org.eclipse.tcf.te.ui.views.interfaces.workingsets.IWorkingSetNameIDs;
import org.eclipse.ui.IElementFactory;
import org.eclipse.ui.IMemento;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/workingsets/WorkingSetElementUpdater.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/workingsets/WorkingSetElementUpdater.java
index 7847a44ba..b3a0269ff 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/workingsets/WorkingSetElementUpdater.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/workingsets/WorkingSetElementUpdater.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.views.workingsets;
+package org.eclipse.tcf.te.ui.views.workingsets;
import java.util.ArrayList;
import java.util.EventObject;
@@ -17,9 +17,9 @@ import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExecutableExtension;
-import org.eclipse.tm.te.runtime.events.EventManager;
-import org.eclipse.tm.te.ui.events.AbstractEventListener;
-import org.eclipse.tm.te.ui.views.events.ViewerContentChangeEvent;
+import org.eclipse.tcf.te.ui.views.events.ViewerContentChangeEvent;
+import org.eclipse.tcf.te.runtime.events.EventManager;
+import org.eclipse.tcf.te.ui.events.AbstractEventListener;
import org.eclipse.ui.IWorkingSet;
import org.eclipse.ui.IWorkingSetUpdater;
import org.eclipse.ui.navigator.CommonViewer;
@@ -84,7 +84,7 @@ public class WorkingSetElementUpdater extends AbstractEventListener implements I
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.events.IEventListener#eventFired(java.util.EventObject)
+ * @see org.eclipse.tcf.te.runtime.interfaces.events.IEventListener#eventFired(java.util.EventObject)
*/
@Override
public void eventFired(EventObject event) {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/workingsets/WorkingSetFilter.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/workingsets/WorkingSetFilter.java
index f122d0acc..9d1f6796f 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/workingsets/WorkingSetFilter.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/workingsets/WorkingSetFilter.java
@@ -7,18 +7,17 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.views.workingsets;
+package org.eclipse.tcf.te.ui.views.workingsets;
import java.util.Arrays;
import java.util.List;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.jface.viewers.TreePath;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.tm.te.runtime.interfaces.workingsets.IWorkingSetElement;
-import org.eclipse.tm.te.ui.views.interfaces.workingsets.IWorkingSetIDs;
-import org.eclipse.ui.IAggregateWorkingSet;
+import org.eclipse.tcf.te.runtime.interfaces.workingsets.IWorkingSetElement;
import org.eclipse.ui.IContainmentAdapter;
import org.eclipse.ui.IWorkingSet;
@@ -45,19 +44,24 @@ public class WorkingSetFilter extends ViewerFilter {
*/
@Override
public boolean select(Viewer viewer, Object parentElement, Object element) {
- if (active && parentElement instanceof IWorkingSet) {
+ // If the filter is not active, all elements pass
+ if (!active) return true;
+
+ // If the parent element is a tree path, assume the last element as parent element
+ if (parentElement instanceof TreePath) {
+ parentElement = ((TreePath)parentElement).getLastSegment();
+ }
+
+ if (parentElement instanceof IWorkingSet) {
if (((IWorkingSet)parentElement).isEmpty()) {
return true;
}
- if (parentElement instanceof IAggregateWorkingSet) {
- List<IWorkingSet> workingSets = Arrays.asList(((IAggregateWorkingSet)parentElement).getComponents());
- if (workingSets.contains(element) || IWorkingSetIDs.ID_WS_OTHERS.equals(((IWorkingSet)element).getId())) {
- return true;
- }
- }
if (element != null) {
return isEnclosed((IWorkingSet)parentElement, element);
}
+ } else if (parentElement instanceof WorkingSetViewStateManager && element instanceof IWorkingSet) {
+ List<IWorkingSet> workingSets = Arrays.asList(((WorkingSetViewStateManager)parentElement).getAllWorkingSets());
+ return workingSets.contains(element);
}
return true;
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/workingsets/WorkingSetViewStateManager.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/workingsets/WorkingSetViewStateManager.java
new file mode 100644
index 000000000..17e7a5c31
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/workingsets/WorkingSetViewStateManager.java
@@ -0,0 +1,430 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.views.workingsets;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.OutputStreamWriter;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.tcf.te.ui.views.activator.UIPlugin;
+import org.eclipse.tcf.te.ui.views.interfaces.workingsets.IWorkingSetIDs;
+import org.eclipse.tcf.te.ui.views.interfaces.workingsets.IWorkingSetNameIDs;
+import org.eclipse.tcf.te.ui.views.internal.View;
+import org.eclipse.tcf.te.ui.views.nls.Messages;
+import org.eclipse.ui.IElementFactory;
+import org.eclipse.ui.ILocalWorkingSetManager;
+import org.eclipse.ui.IMemento;
+import org.eclipse.ui.IPersistableElement;
+import org.eclipse.ui.IWorkingSet;
+import org.eclipse.ui.IWorkingSetManager;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.XMLMemento;
+import org.eclipse.ui.navigator.IMementoAware;
+
+/**
+ * The WorkingSetViewStateManager is a state manager used to load and save persisted
+ * states from external storage and provide runtime access and modification
+ * methods.
+ */
+public final class WorkingSetViewStateManager implements IMementoAware {
+ // The file used to persist the states used in this plugin.
+ private static final String STATES_XML = "states.xml"; //$NON-NLS-1$
+
+ // The memento element name id's.
+
+ /** The root element of working set manager.*/
+ private static final String WORKING_SET_MANAGER = "workingSetManager"; //$NON-NLS-1$
+ /** The property name used to save the sorting flag of the working sets.*/
+ private static final String SORTED_WORKINGSET = "sortedWorkingSet"; //$NON-NLS-1$
+ /** The element used to save the order of the working sets specified by end users.*/
+ private static final String WORKINGSET_ORDER = "order"; //$NON-NLS-1$
+ /** The root element of visible working sets.*/
+ private static final String WORKINGSET_VISIBLE = "visibleWorkingSets"; //$NON-NLS-1$
+ /** The working set element. */
+ private static final String ELEMENT_WORKINGSET = "workingset"; //$NON-NLS-1$
+ /** The attribute to store name. */
+ private static final String ATTR_NAME = "name"; //$NON-NLS-1$
+ /** The attribute to store the option that if the default working set should be sorted on top. */
+ private static final String ATTR_DEFAULT_WORKINGSET_ONTOP = "defaultWorkingSetOnTop"; //$NON-NLS-1$
+
+ // The parent view instance.
+ /* default */ View view;
+ // The working set manager used.
+ /* default */ ILocalWorkingSetManager localWorkingSetManager;
+ // If the working set is sorted
+ private boolean sortedWorkingSet;
+ // If the default fixed working sets, including My Targets and Local Subnet, should be on top when sorting.
+ private boolean defaultWorkingSetOnTop = true;
+ // The working set comparator used to sort the working set in the order specified by end users.
+ private CustomizedOrderComparator workingSetComparator;
+ // The list of active (checked) working sets
+ private List<IWorkingSet> visibleWorkingSets;
+
+ // Workbench wide working set manager property change listener
+ private IPropertyChangeListener workingSetManagerListener;
+
+ /**
+ * Constructor.
+ *
+ * @param view The parent view instance. Must not be <code>null</code>.
+ */
+ public WorkingSetViewStateManager(View view) {
+ Assert.isNotNull(view);
+ this.view = view;
+
+ IMemento memento = readWorkingSetMemento();
+ restoreState(memento);
+
+ initializeListener();
+ }
+
+ /**
+ * Returns the parent view instance.
+ *
+ * @return The parent view instance.
+ */
+ public View getParentView() {
+ return view;
+ }
+
+ /**
+ * If the default working sets are on top when sorting.
+ * @return true if it is or else false.
+ */
+ public boolean isDefaultWorkingSetOnTop() {
+ return defaultWorkingSetOnTop;
+ }
+
+ /**
+ * Get the current local working set manager used.
+ *
+ * @return The current local working set manager.
+ */
+ public ILocalWorkingSetManager getLocalWorkingSetManager() {
+ return localWorkingSetManager;
+ }
+
+ /**
+ * Returns the list of all working sets.
+ *
+ * @return The list of all working sets or an empty list.
+ */
+ public IWorkingSet[] getAllWorkingSets() {
+ List<IWorkingSet> workingSets = new ArrayList<IWorkingSet>();
+
+ // Add the workbench wide working sets (target explorer type only)
+ IWorkingSetManager manager = PlatformUI.getWorkbench().getWorkingSetManager();
+ IWorkingSet[] candidates = manager.getAllWorkingSets();
+ for (IWorkingSet candidate : candidates) {
+ if (!candidate.isAggregateWorkingSet() && IWorkingSetIDs.ID_WS_TARGET_EXPLORER.equals(candidate.getId())) {
+ if (!workingSets.contains(candidate)) {
+ workingSets.add(candidate);
+ }
+ }
+ }
+ // Add all local working sets
+ candidates = localWorkingSetManager.getAllWorkingSets();
+ for (IWorkingSet candidate : candidates) {
+ if (!workingSets.contains(candidate)) {
+ workingSets.add(candidate);
+ }
+ }
+
+ return workingSets.toArray(new IWorkingSet[workingSets.size()]);
+ }
+
+ /**
+ * Get the visible working sets displayed in the working set viewer.
+ * @return The visible working sets in a list.
+ */
+ public List<IWorkingSet> getVisibleWorkingSets() {
+ return visibleWorkingSets;
+ }
+
+ /**
+ * Set the visible working sets with a new working set list.
+ * @param visibleWorkingSets The new working set list.
+ */
+ public void setVisibleWorkingSets(List<IWorkingSet> visibleWorkingSets) {
+ this.visibleWorkingSets = visibleWorkingSets;
+ }
+
+ /**
+ * If the current working sets are sorted.
+ * @return true if they are sorted.
+ */
+ public boolean isSortedWorkingSet() {
+ return sortedWorkingSet;
+ }
+
+ /**
+ * Set the flag if the current working sets are sorted.
+ * @param sortedWorkingSet The new value.
+ */
+ public void setSortedWorkingSet(boolean sortedWorkingSet) {
+ this.sortedWorkingSet = sortedWorkingSet;
+ }
+
+ /**
+ * Get the customized ordered comparator. This comparator is
+ * used to sort the working sets when users define the order of the working sets.
+ * @return The comparator.
+ */
+ public CustomizedOrderComparator getWorkingSetComparator() {
+ return workingSetComparator;
+ }
+
+ /**
+ * Set the new customized ordered working set comparator.
+ *
+ * @param workingSetComparator The new comparator.
+ */
+ public void setWorkingSetComparator(CustomizedOrderComparator workingSetComparator) {
+ this.workingSetComparator = workingSetComparator;
+ }
+
+ /**
+ * Dispose the working set view state manager.
+ */
+ public void dispose() {
+ XMLMemento memento = XMLMemento.createWriteRoot(WORKING_SET_MANAGER);
+ saveState(memento);
+ try {
+ writeWorkingSetMemento(memento);
+ }
+ catch (IOException e) {
+ if (Platform.inDebugMode()) e.printStackTrace();
+ }
+ localWorkingSetManager.dispose();
+ if (workingSetManagerListener != null) {
+ PlatformUI.getWorkbench().getWorkingSetManager().removePropertyChangeListener(workingSetManagerListener);
+ workingSetManagerListener = null;
+ }
+ }
+
+ /**
+ * Initialize the working set view state manager listeners.
+ */
+ private void initializeListener() {
+ // Listen to changes to the workbench wide working set manager
+ // and trigger view updates on changes.
+ workingSetManagerListener = new IPropertyChangeListener() {
+ @Override
+ public void propertyChange(PropertyChangeEvent event) {
+ if (IWorkingSetManager.CHANGE_WORKING_SET_ADD.equals(event.getProperty())) {
+ // A new working set got added to the manager. Newly added
+ // working sets are active (checked) by default.
+ IWorkingSet workingSet = (IWorkingSet)event.getNewValue();
+ if (workingSet != null) {
+ List<IWorkingSet> visible = getVisibleWorkingSets();
+ if (!visible.contains(workingSet)) {
+ visible.add(workingSet);
+ }
+ }
+ }
+ else if (IWorkingSetManager.CHANGE_WORKING_SET_REMOVE.equals(event.getProperty())) {
+ // A working set got removed. Remove from the list
+ // of visible working sets
+ IWorkingSet workingSet = (IWorkingSet)event.getOldValue();
+ if (workingSet != null) {
+ List<IWorkingSet> visible = getVisibleWorkingSets();
+ if (visible.contains(workingSet)) {
+ visible.remove(workingSet);
+ }
+ }
+ }
+
+ if (view != null && view.getCommonViewer() != null) {
+ view.getCommonViewer().refresh();
+ }
+ }
+ };
+ PlatformUI.getWorkbench().getWorkingSetManager().addPropertyChangeListener(workingSetManagerListener);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.navigator.IMementoAware#restoreState(org.eclipse.ui.IMemento)
+ */
+ @Override
+ public void restoreState(IMemento memento) {
+ Boolean bool = memento.getBoolean(SORTED_WORKINGSET);
+ sortedWorkingSet = bool != null && bool.booleanValue();
+ if (!sortedWorkingSet) {
+ restoreWorkingSetOrder(memento);
+ }
+ bool = memento.getBoolean(ATTR_DEFAULT_WORKINGSET_ONTOP);
+ if (bool != null) {
+ defaultWorkingSetOnTop = bool.booleanValue();
+ }
+
+ // The local working set manager contains only automatic generated
+ // working sets. Do not restore anything from the memento
+ localWorkingSetManager = PlatformUI.getWorkbench().createLocalWorkingSetManager();
+ // Restore the local automatic working sets
+ restoreLocalWorkingSets();
+
+ // Restore the active (checked) working sets
+ restoreVisibleWorkingSet(memento);
+ }
+
+ /**
+ * Restore the local automatic working sets.
+ */
+ private void restoreLocalWorkingSets() {
+ Assert.isNotNull(localWorkingSetManager);
+ // Create the "Others" working set if not restored from the memento
+ IWorkingSet others = localWorkingSetManager.getWorkingSet(Messages.ViewStateManager_others_name);
+ if (others == null) {
+ others = localWorkingSetManager.createWorkingSet(Messages.ViewStateManager_others_name, new IAdaptable[0]);
+ others.setId(IWorkingSetIDs.ID_WS_OTHERS);
+ localWorkingSetManager.addWorkingSet(others);
+ } else {
+ others.setId(IWorkingSetIDs.ID_WS_OTHERS);
+ }
+ }
+
+ /**
+ * Restore the visible working sets from the specified memento element.
+ * @param memento The element.
+ */
+ private void restoreVisibleWorkingSet(IMemento memento) {
+ IMemento vwsMemento = memento.getChild(WORKINGSET_VISIBLE);
+ visibleWorkingSets = new ArrayList<IWorkingSet>();
+ if (vwsMemento != null) {
+ IMemento[] children = vwsMemento.getChildren(ELEMENT_WORKINGSET);
+ if (children != null && children.length > 0) {
+ IWorkingSet[] allWorkingSets = getAllWorkingSets();
+ for (IMemento child : children) {
+ String wsName = child.getString(ATTR_NAME);
+ for (IWorkingSet workingSet : allWorkingSets) {
+ if (wsName.equals(workingSet.getName())) {
+ visibleWorkingSets.add(workingSet);
+ }
+ }
+ }
+ }
+ } else {
+ IWorkingSet[] workingSets = getAllWorkingSets();
+ for (IWorkingSet workingSet : workingSets) {
+ visibleWorkingSets.add(workingSet);
+ }
+ }
+ }
+
+ /**
+ * Restore the order of working sets specified in the memento element.
+ * @param memento The element.
+ */
+ private void restoreWorkingSetOrder(IMemento memento) {
+ IMemento child = memento.getChild(WORKINGSET_ORDER);
+ if (child != null) {
+ String factoryId = child.getString(IWorkingSetNameIDs.FACTORY_ID);
+ IElementFactory factory = PlatformUI.getWorkbench().getElementFactory(factoryId);
+ IAdaptable adaptable = factory.createElement(child);
+ IPersistableElement element = (IPersistableElement) adaptable.getAdapter(IPersistableElement.class);
+ if (element instanceof CustomizedOrderComparator) {
+ workingSetComparator = (CustomizedOrderComparator) element;
+ }
+ }
+ }
+
+ /**
+ * Save the states to the specified memento element.
+ */
+ @Override
+ public void saveState(IMemento memento) {
+ memento.putBoolean(SORTED_WORKINGSET, sortedWorkingSet);
+ if (!sortedWorkingSet) {
+ if (workingSetComparator != null) {
+ IMemento child = memento.createChild(WORKINGSET_ORDER);
+ child.putString(IWorkingSetNameIDs.FACTORY_ID, workingSetComparator.getFactoryId());
+ workingSetComparator.saveState(child);
+ }
+ }
+ memento.putBoolean(ATTR_DEFAULT_WORKINGSET_ONTOP, defaultWorkingSetOnTop);
+ IMemento vwsMemento = memento.createChild(WORKINGSET_VISIBLE);
+ for (IWorkingSet workingSet : visibleWorkingSets) {
+ IMemento child = vwsMemento.createChild(ELEMENT_WORKINGSET);
+ child.putString(ATTR_NAME, workingSet.getName());
+ }
+ }
+
+ /**
+ * Returns the file used as the persistence store, or <code>null</code> if
+ * there is no available file.
+ *
+ * @return the file used as the persistence store, or <code>null</code>
+ */
+ private File getStateFile() {
+ try {
+ IPath path = UIPlugin.getDefault().getStateLocation();
+ path = path.append(STATES_XML);
+ return path.toFile();
+ }catch (IllegalStateException e) {
+ // An RCP workspace-less environment (-data @none)
+ File root = new File(System.getProperty("user.home"), ".tcf"); //$NON-NLS-1$ //$NON-NLS-2$
+ File ws = new File(root, "ws"); //$NON-NLS-1$
+ return new File(ws, STATES_XML);
+ }
+ }
+
+ /**
+ * Read the working set memento element from the state file.
+ * @return The working set memento.
+ */
+ private IMemento readWorkingSetMemento() {
+ File stateFile = getStateFile();
+ if (stateFile != null && stateFile.exists()) {
+ BufferedReader reader = null;
+ try {
+ FileInputStream input = new FileInputStream(stateFile);
+ reader = new BufferedReader(new InputStreamReader(input, "utf-8")); //$NON-NLS-1$
+ IMemento memento = XMLMemento.createReadRoot(reader);
+ return memento;
+ } catch (Exception e) {
+ e.printStackTrace();
+ } finally {
+ if (reader != null) {
+ try {
+ reader.close();
+ } catch (Exception e) {
+ }
+ }
+ }
+ }
+ return XMLMemento.createWriteRoot(WORKING_SET_MANAGER);
+ }
+
+ /**
+ * Write working set memento to the state file.
+ * @param memento The working set memento.
+ * @throws IOException thrown when writing fails.
+ */
+ private void writeWorkingSetMemento(XMLMemento memento) throws IOException {
+ File stateFile = getStateFile();
+ FileOutputStream stream = new FileOutputStream(stateFile);
+ OutputStreamWriter writer = new OutputStreamWriter(stream, "utf-8"); //$NON-NLS-1$
+ memento.save(writer);
+ writer.close();
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/workingsets/WorkingSetViewerSorter.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/workingsets/WorkingSetViewerSorter.java
new file mode 100644
index 000000000..fd9d998be
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/workingsets/WorkingSetViewerSorter.java
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.views.workingsets;
+
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.tcf.te.ui.trees.TreeViewerSorter;
+import org.eclipse.tcf.te.ui.views.internal.View;
+import org.eclipse.ui.IWorkingSet;
+import org.eclipse.ui.internal.WorkingSetComparator;
+import org.eclipse.ui.navigator.CommonViewer;
+
+/**
+ * Working set viewer sorter implementation.
+ */
+@SuppressWarnings("restriction")
+public class WorkingSetViewerSorter extends TreeViewerSorter {
+ private final WorkingSetComparator wsComparator = new WorkingSetComparator();
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.trees.TreeViewerSorter#doCompare(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object, java.lang.String, int, int)
+ */
+ @Override
+ protected int doCompare(Viewer viewer, Object node1, Object node2, String sortColumn, int index, int inverter) {
+ if (node1 instanceof IWorkingSet && node2 instanceof IWorkingSet) {
+ WorkingSetViewStateManager manager = null;
+ if (viewer instanceof CommonViewer && ((CommonViewer)viewer).getCommonNavigator() instanceof View) {
+ manager = ((View)((CommonViewer)viewer).getCommonNavigator()).getStateManager();
+ }
+ if (manager != null) {
+ if (manager.isSortedWorkingSet()) return wsComparator.compare(node1, node2);
+ CustomizedOrderComparator comparator = manager.getWorkingSetComparator();
+ if (comparator != null) return comparator.compare((IWorkingSet)node1, (IWorkingSet)node2);
+ }
+
+ }
+ return super.doCompare(viewer, node1, node2, sortColumn, index, inverter);
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/workingsets/WorkingSetsContentProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/workingsets/WorkingSetsContentProvider.java
index 2fdf7437e..4015d9991 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/workingsets/WorkingSetsContentProvider.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/workingsets/WorkingSetsContentProvider.java
@@ -7,39 +7,43 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.views.workingsets;
+package org.eclipse.tcf.te.ui.views.workingsets;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
-import java.util.Map;
-import java.util.WeakHashMap;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.tm.te.runtime.events.EventManager;
-import org.eclipse.tm.te.runtime.interfaces.workingsets.IWorkingSetElement;
-import org.eclipse.tm.te.ui.views.events.ViewerContentChangeEvent;
-import org.eclipse.tm.te.ui.views.interfaces.IUIConstants;
-import org.eclipse.tm.te.ui.views.interfaces.workingsets.IWorkingSetIDs;
-import org.eclipse.tm.te.ui.views.internal.View;
-import org.eclipse.tm.te.ui.views.internal.ViewRoot;
-import org.eclipse.tm.te.ui.views.nls.Messages;
-import org.eclipse.ui.IAggregateWorkingSet;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.tcf.te.runtime.events.EventManager;
+import org.eclipse.tcf.te.runtime.interfaces.workingsets.IWorkingSetElement;
+import org.eclipse.tcf.te.ui.views.activator.UIPlugin;
+import org.eclipse.tcf.te.ui.views.events.ViewerContentChangeEvent;
+import org.eclipse.tcf.te.ui.views.interfaces.IUIConstants;
+import org.eclipse.tcf.te.ui.views.interfaces.workingsets.IWorkingSetIDs;
+import org.eclipse.tcf.te.ui.views.internal.View;
+import org.eclipse.tcf.te.ui.views.internal.ViewRoot;
+import org.eclipse.tcf.te.ui.views.nls.Messages;
import org.eclipse.ui.ILocalWorkingSetManager;
import org.eclipse.ui.IMemento;
+import org.eclipse.ui.IWorkbenchPreferenceConstants;
import org.eclipse.ui.IWorkingSet;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.internal.navigator.NavigatorContentService;
+import org.eclipse.ui.internal.navigator.NavigatorFilterService;
import org.eclipse.ui.navigator.CommonNavigator;
import org.eclipse.ui.navigator.CommonViewer;
import org.eclipse.ui.navigator.ICommonContentExtensionSite;
import org.eclipse.ui.navigator.ICommonContentProvider;
import org.eclipse.ui.navigator.IExtensionStateModel;
+import org.eclipse.ui.navigator.INavigatorFilterService;
/**
* Provides children and parents for IWorkingSets.
@@ -52,24 +56,37 @@ public class WorkingSetsContentProvider implements ICommonContentProvider {
/**
* The extension id for the WorkingSet extension.
*/
- public static final String EXTENSION_ID = "org.eclipse.tm.te.ui.views.navigator.content.workingSets"; //$NON-NLS-1$
+ public static final String EXTENSION_ID = "org.eclipse.tcf.te.ui.views.navigator.content.workingSets"; //$NON-NLS-1$
/**
* A key used by the Extension State Model to keep track of whether top level Working Sets or
- * Projects should be shown in the viewer.
+ * Elements should be shown in the viewer.
*/
public static final String SHOW_TOP_LEVEL_WORKING_SETS = EXTENSION_ID + ".showTopLevelWorkingSets"; //$NON-NLS-1$
+ /**
+ * Working set filter extension id.
+ */
+ private static final String WORKING_SET_FILTER_ID = "org.eclipse.tcf.te.ui.views.navigator.filters.workingSet"; //$NON-NLS-1$
+
+ /**
+ * Child elements returned by this content provider in case there
+ * are no children.
+ */
private static final Object[] NO_CHILDREN = new Object[0];
- private WorkingSetHelper helper;
- /* default */ IAggregateWorkingSet workingSetRoot;
+ // The common navigator working set content extension state model.
private IExtensionStateModel extensionStateModel;
- private CommonNavigator targetExplorer;
+ // The parent viewer object
private CommonViewer viewer;
+ // The working set filter instance
+ private WorkingSetFilter filter;
- private ILocalWorkingSetManager localWorkingSetManager;
-
+ /**
+ * The root mode listener listens to property changes of the working set content
+ * extension state model to update the viewer root mode if the user changes the
+ * top level element type.
+ */
private IPropertyChangeListener rootModeListener = new IPropertyChangeListener() {
/* (non-Javadoc)
@@ -82,7 +99,6 @@ public class WorkingSetsContentProvider implements ICommonContentProvider {
updateRootMode();
}
}
-
};
/* (non-Javadoc)
@@ -92,9 +108,30 @@ public class WorkingSetsContentProvider implements ICommonContentProvider {
public void init(ICommonContentExtensionSite config) {
NavigatorContentService cs = (NavigatorContentService) config.getService();
viewer = (CommonViewer) cs.getViewer();
- targetExplorer = viewer.getCommonNavigator();
- localWorkingSetManager = targetExplorer instanceof View ? ((View)targetExplorer).getLocalWorkingSetManager() : PlatformUI.getWorkbench().createLocalWorkingSetManager();
+ // Get the filter service to activate the working set viewer filter
+ INavigatorFilterService filterService = cs.getFilterService();
+ // The working set filter should be among the visible filters
+ ViewerFilter[] filters = filterService.getVisibleFilters(false);
+ for (ViewerFilter candidate : filters) {
+ if (candidate instanceof WorkingSetFilter) {
+ filter = (WorkingSetFilter)candidate;
+ }
+ }
+
+ if (filter != null && !filterService.isActive(WORKING_SET_FILTER_ID)) {
+ if (filterService instanceof NavigatorFilterService) {
+ NavigatorFilterService navFilterService = (NavigatorFilterService)filterService;
+ navFilterService.addActiveFilterIds(new String[] { WORKING_SET_FILTER_ID });
+ navFilterService.updateViewer();
+ }
+ }
+ else if (filter == null) {
+ IStatus status = new Status(IStatus.ERROR, UIPlugin.getUniqueIdentifier(),
+ "Required filter " + WORKING_SET_FILTER_ID //$NON-NLS-1$
+ + " is not present. Working set support will not function correctly."); //$NON-NLS-1$
+ UIPlugin.getDefault().getLog().log(status);
+ }
extensionStateModel = config.getExtensionStateModel();
extensionStateModel.addPropertyChangeListener(rootModeListener);
@@ -107,20 +144,20 @@ public class WorkingSetsContentProvider implements ICommonContentProvider {
*/
@Override
public void restoreState(IMemento memento) {
- // We can call the local working set manager restoreState(memento) method
- // only as long the working set manager is empty
- if (memento != null && localWorkingSetManager.getWorkingSets().length == 0) {
- localWorkingSetManager.restoreState(memento);
-
- IWorkingSet old = localWorkingSetManager.getWorkingSet("Others"); //$NON-NLS-1$
- if (old != null) localWorkingSetManager.removeWorkingSet(old);
+ // Determine the target explorer view local working set manager instance
+ ILocalWorkingSetManager manager = null;
+ if (viewer.getCommonNavigator() instanceof View) {
+ manager = ((View)viewer.getCommonNavigator()).getStateManager().getLocalWorkingSetManager();
+ }
+ // Recreate the local automatic working sets
+ if (manager != null) {
// Create the "Others" working set if not restored from the memento
- IWorkingSet others = localWorkingSetManager.getWorkingSet(Messages.WorkingSetContentProvider_others_name);
+ IWorkingSet others = manager.getWorkingSet(Messages.ViewStateManager_others_name);
if (others == null) {
- others = localWorkingSetManager.createWorkingSet(Messages.WorkingSetContentProvider_others_name, new IAdaptable[0]);
+ others = manager.createWorkingSet(Messages.ViewStateManager_others_name, new IAdaptable[0]);
others.setId(IWorkingSetIDs.ID_WS_OTHERS);
- localWorkingSetManager.addWorkingSet(others);
+ manager.addWorkingSet(others);
} else {
others.setId(IWorkingSetIDs.ID_WS_OTHERS);
}
@@ -136,7 +173,6 @@ public class WorkingSetsContentProvider implements ICommonContentProvider {
*/
@Override
public void saveState(IMemento memento) {
- if (memento != null) localWorkingSetManager.saveState(memento);
}
/* (non-Javadoc)
@@ -145,21 +181,16 @@ public class WorkingSetsContentProvider implements ICommonContentProvider {
@Override
public Object[] getChildren(Object parentElement) {
if (parentElement instanceof IWorkingSet) {
- IWorkingSet workingSet = (IWorkingSet) parentElement;
- if (workingSet.isAggregateWorkingSet() && targetExplorer != null) {
- switch (targetExplorer.getRootMode()) {
- case IUIConstants.MODE_WORKING_SETS:
- List<IWorkingSet> allWorkingSets = new ArrayList<IWorkingSet>();
- allWorkingSets.addAll(Arrays.asList(((IAggregateWorkingSet) workingSet).getComponents()));
- allWorkingSets.addAll(Arrays.asList(localWorkingSetManager.getWorkingSets()));
- return allWorkingSets.toArray(new IWorkingSet[allWorkingSets.size()]);
- case IUIConstants.MODE_NORMAL:
- return getWorkingSetElements(workingSet);
- }
+ // Return the working set elements
+ return getWorkingSetElements((IWorkingSet)parentElement);
+ }
+ else if (parentElement instanceof WorkingSetViewStateManager) {
+ List<IWorkingSet> workingSets = ((WorkingSetViewStateManager)parentElement).getVisibleWorkingSets();
+ if (workingSets != null && !workingSets.isEmpty()) {
+ return workingSets.toArray();
}
-
- return getWorkingSetElements(workingSet);
}
+
return NO_CHILDREN;
}
@@ -194,7 +225,27 @@ public class WorkingSetsContentProvider implements ICommonContentProvider {
*/
@Override
public Object getParent(Object element) {
- if (helper != null) return helper.getParent(element);
+ if (element instanceof IWorkingSet) {
+ CommonNavigator navigator = viewer.getCommonNavigator();
+ if (navigator instanceof View) {
+ WorkingSetViewStateManager manager = ((View)navigator).getStateManager();
+ List<IWorkingSet> allWorkingSets = Arrays.asList(manager.getAllWorkingSets());
+ if (allWorkingSets.contains(element)) {
+ return manager;
+ }
+ }
+ }
+ else if (element instanceof WorkingSetElementHolder) {
+ String wsName = ((WorkingSetElementHolder)element).getWorkingSetName();
+ if (wsName != null) {
+ IWorkingSet ws = PlatformUI.getWorkbench().getWorkingSetManager().getWorkingSet(wsName);
+ if (ws == null && viewer.getCommonNavigator() instanceof View) {
+ ws = ((View)viewer.getCommonNavigator()).getStateManager().getLocalWorkingSetManager().getWorkingSet(wsName);
+ }
+ return ws;
+ }
+ }
+
return null;
}
@@ -203,6 +254,9 @@ public class WorkingSetsContentProvider implements ICommonContentProvider {
*/
@Override
public boolean hasChildren(Object element) {
+ if (element instanceof IWorkingSet) {
+ return ((IWorkingSet)element).getElements().length > 0;
+ }
return true;
}
@@ -219,10 +273,7 @@ public class WorkingSetsContentProvider implements ICommonContentProvider {
*/
@Override
public void dispose() {
- helper = null;
extensionStateModel.removePropertyChangeListener(rootModeListener);
- // If we have create the local working set manager, we have to dispose it
- if (!(targetExplorer instanceof View)) localWorkingSetManager.dispose();
}
/* (non-Javadoc)
@@ -230,69 +281,45 @@ public class WorkingSetsContentProvider implements ICommonContentProvider {
*/
@Override
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- if (newInput instanceof IWorkingSet) {
- IWorkingSet rootSet = (IWorkingSet) newInput;
- helper = new WorkingSetHelper(rootSet);
- }
}
+ /**
+ * Update the common navigator root mode.
+ */
private void updateRootMode() {
- if (targetExplorer == null) {
- return;
- }
+ CommonNavigator navigator = viewer.getCommonNavigator();
+ if (navigator == null) return;
+
+ Object newInput;
+ boolean filterActive;
if (extensionStateModel.getBooleanProperty(SHOW_TOP_LEVEL_WORKING_SETS)) {
- targetExplorer.setRootMode(IUIConstants.MODE_WORKING_SETS);
+ navigator.setRootMode(IUIConstants.MODE_WORKING_SETS);
+ newInput = ((View)navigator).getStateManager();
+ filterActive = true;
}
else {
- targetExplorer.setRootMode(IUIConstants.MODE_NORMAL);
- }
- }
-
- protected class WorkingSetHelper {
-
- private final IWorkingSet workingSet;
- private final Map<Object, Object> parents = new WeakHashMap<Object, Object>();
-
- /**
- * Create a Helper class for the given working set
- *
- * @param set The set to use to build the item to parent map.
- */
- public WorkingSetHelper(IWorkingSet set) {
- workingSet = set;
-
- if (workingSet.isAggregateWorkingSet()) {
- IAggregateWorkingSet aggregateSet = (IAggregateWorkingSet) workingSet;
- if (workingSetRoot == null) workingSetRoot = aggregateSet;
+ navigator.setRootMode(IUIConstants.MODE_NORMAL);
- IWorkingSet[] components = aggregateSet.getComponents();
-
- for (int componentIndex = 0; componentIndex < components.length; componentIndex++) {
- IAdaptable[] elements = getWorkingSetElements(components[componentIndex]);
- for (int elementsIndex = 0; elementsIndex < elements.length; elementsIndex++) {
- parents.put(elements[elementsIndex], components[componentIndex]);
- }
- parents.put(components[componentIndex], aggregateSet);
-
- }
- }
- else {
- IAdaptable[] elements = getWorkingSetElements(workingSet);
- for (int elementsIndex = 0; elementsIndex < elements.length; elementsIndex++) {
- parents.put(elements[elementsIndex], workingSet);
- }
+ // Determine if to use the windows working set by default
+ IWorkingSet windowWorkingSet = null;
+ if (PlatformUI.getPreferenceStore().getBoolean(IWorkbenchPreferenceConstants.USE_WINDOW_WORKING_SET_BY_DEFAULT)) {
+ windowWorkingSet = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getAggregateWorkingSet();
}
+
+ newInput = windowWorkingSet != null ? windowWorkingSet : ViewRoot.getInstance();
+ filterActive = windowWorkingSet != null;
}
- /**
- *
- * @param element An element from the viewer
- * @return The parent associated with the element, if any.
- */
- public Object getParent(Object element) {
- if (element instanceof IWorkingSet && element != workingSetRoot) return workingSetRoot;
- return parents.get(element);
+ if (!newInput.equals(viewer.getInput())) {
+ viewer.setInput(newInput);
}
+ setFilterActive(filterActive);
}
+ /**
+ * Update the working set viewer filter active state.
+ */
+ private void setFilterActive(boolean active) {
+ if (filter != null) filter.setActive(active);
+ }
}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/workingsets/WorkingSetsLabelProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/workingsets/WorkingSetsLabelProvider.java
index 7c8d5932a..de1b75a74 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/workingsets/WorkingSetsLabelProvider.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/workingsets/WorkingSetsLabelProvider.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.views.workingsets;
+package org.eclipse.tcf.te.ui.views.workingsets;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.swt.graphics.Image;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/workingsets/actions/ConfigureWorkingSetAction.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/workingsets/actions/ConfigureWorkingSetAction.java
new file mode 100644
index 000000000..14156eae5
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/workingsets/actions/ConfigureWorkingSetAction.java
@@ -0,0 +1,181 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.views.workingsets.actions;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.viewers.StructuredViewer;
+import org.eclipse.tcf.te.ui.views.interfaces.workingsets.IWorkingSetIDs;
+import org.eclipse.tcf.te.ui.views.internal.View;
+import org.eclipse.tcf.te.ui.views.nls.Messages;
+import org.eclipse.tcf.te.ui.views.workingsets.CustomizedOrderComparator;
+import org.eclipse.tcf.te.ui.views.workingsets.WorkingSetViewStateManager;
+import org.eclipse.tcf.te.ui.views.workingsets.dialogs.WorkingSetConfigurationDialog;
+import org.eclipse.ui.IWorkingSet;
+import org.eclipse.ui.IWorkingSetManager;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.navigator.CommonViewer;
+
+/**
+ * Configure working sets action implementation.
+ */
+public class ConfigureWorkingSetAction extends Action {
+ // The parent viewer instance.
+ private StructuredViewer viewer;
+
+ /**
+ * Constructor.
+ *
+ * @param view The parent viewer instance. Must not be <code>null</code>.
+ */
+ public ConfigureWorkingSetAction(StructuredViewer viewer) {
+ super(Messages.ConfigureWorkingSetAction_text);
+ setToolTipText(Messages.ConfigureWorkingSetAction_toolTip);
+
+ Assert.isNotNull(viewer);
+ this.viewer = viewer;
+ }
+
+ /**
+ * Duplicate the specified working sets and return a working set list for editing.
+ *
+ * @param workingSets The working sets
+ * @return A duplication list of the working sets.
+ */
+ private List<IWorkingSet> duplicate(IWorkingSet[] workingSets) {
+ IWorkingSetManager workingSetManager = PlatformUI.getWorkbench().getWorkingSetManager();
+ List<IWorkingSet> result = new ArrayList<IWorkingSet>();
+ for (IWorkingSet workingSet : workingSets) {
+ // Local automatic working sets are not editable
+ // -> no need to create a duplicate
+ if (isLocalWorkingSet(workingSet)) {
+ result.add(workingSet);
+ } else {
+ IWorkingSet newWorkingSet = workingSetManager.createWorkingSet(workingSet.getName(), workingSet.getElements());
+ newWorkingSet.setId(workingSet.getId());
+ result.add(newWorkingSet);
+ }
+ }
+ return result;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.action.Action#run()
+ */
+ @Override
+ public void run() {
+ // Get the view working set state manager
+ WorkingSetViewStateManager manager = ((View)((CommonViewer)viewer).getCommonNavigator()).getStateManager();
+ // Get the workbench wide working set manager
+ IWorkingSetManager workingSetManager = PlatformUI.getWorkbench().getWorkingSetManager();
+
+ // Get all working sets (both local and workbench wide, target explorer type only)
+ IWorkingSet[] allWorkingSets = manager.getAllWorkingSets();
+ // Create working copies of the (sorted) working sets
+ List<IWorkingSet> workingSets = duplicate(allWorkingSets);
+
+ // Determine the active (checked) working sets
+ List<IWorkingSet> visibleWorkingSets = manager.getVisibleWorkingSets();
+ IWorkingSet[] activeWorkingSets = visibleWorkingSets.toArray(new IWorkingSet[visibleWorkingSets.size()]);
+
+ // Sort the working sets if necessary
+ boolean sortedWorkingSets = manager.isSortedWorkingSet();
+ if (!sortedWorkingSets) {
+ Comparator<IWorkingSet> workingSetComparator = manager.getWorkingSetComparator();
+ if (workingSetComparator != null) Collections.sort(workingSets, workingSetComparator);
+ }
+
+ // Create the working set configuration dialog
+ WorkingSetConfigurationDialog dialog = new WorkingSetConfigurationDialog(workingSetManager,
+ viewer.getControl().getShell(),
+ workingSets.toArray(new IWorkingSet[workingSets.size()]),
+ sortedWorkingSets);
+ // Set the active working sets
+ dialog.setSelection(activeWorkingSets);
+ // And open the dialog
+ if (dialog.open() == IDialogConstants.OK_ID) {
+ // Remember the current list of recently used working sets
+ IWorkingSet[] mruWorkingSets = workingSetManager.getRecentWorkingSets();
+ // Remove the old working set instances (non-local only)
+ for (IWorkingSet workingSet : allWorkingSets) {
+ if (!isLocalWorkingSet(workingSet)) {
+ workingSetManager.removeWorkingSet(workingSet);
+ }
+ }
+ // Get the new working set list from the dialog
+ allWorkingSets = dialog.getAllWorkingSets();
+ // And add the working sets back to the manager (non-local only)
+ for (IWorkingSet workingSet : allWorkingSets) {
+ if (!isLocalWorkingSet(workingSet)) {
+ workingSetManager.addWorkingSet(workingSet);
+ }
+ // If the working set existed in the recently used working set list,
+ // restore it
+ if (exists(workingSet.getName(), mruWorkingSets)) {
+ workingSetManager.addRecentWorkingSet(workingSet);
+ }
+ }
+
+ // Update the sorted state
+ sortedWorkingSets = dialog.isSortingEnabled();
+ manager.setSortedWorkingSet(sortedWorkingSets);
+ if (!sortedWorkingSets) {
+ CustomizedOrderComparator comparator = new CustomizedOrderComparator(allWorkingSets);
+ manager.setWorkingSetComparator(comparator);
+ }
+
+ // Update the active (checked) working set list
+ IWorkingSet[] selection = dialog.getSelection();
+ List<IWorkingSet> list = new ArrayList<IWorkingSet>(Arrays.asList(selection));
+ manager.setVisibleWorkingSets(list);
+
+ // Trigger a viewer refresh to reflect the changes
+ viewer.refresh();
+ }
+ }
+
+ /**
+ * Determine if the given working set is a local working set and therefore
+ * managed by the local working set manager.
+ *
+ * @param workingSet The working set. Must not be <code>null</code>.
+ * @return <code>True</code> if the working set is a local working set, <code>false</code> otherwise.
+ */
+ private boolean isLocalWorkingSet(IWorkingSet workingSet) {
+ Assert.isNotNull(workingSet);
+
+ boolean isLocal = IWorkingSetIDs.ID_WS_OTHERS.equals(workingSet.getId());
+
+ return isLocal;
+ }
+
+ /**
+ * Judge if the working set with the specified name exists in the working set array.
+ *
+ * @param wsname The name of the working set.
+ * @param workingSets The working set array to be searched.
+ * @return true if a working set with the specified name exists.
+ */
+ private boolean exists(String wsname, IWorkingSet[] workingSets) {
+ for (IWorkingSet workingSet : workingSets) {
+ if (wsname.equals(workingSet)) {
+ return true;
+ }
+ }
+ return false;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/actions/WorkingSetRootModeActionGroup.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/workingsets/actions/WorkingSetActionGroup.java
index fe3b0c5f0..fa560fd26 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/actions/WorkingSetRootModeActionGroup.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/workingsets/actions/WorkingSetActionGroup.java
@@ -7,10 +7,11 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.views.actions;
+package org.eclipse.tcf.te.ui.views.workingsets.actions;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.ContributionItem;
+import org.eclipse.jface.action.GroupMarker;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.MenuManager;
@@ -21,13 +22,14 @@ import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.MenuItem;
-import org.eclipse.tm.te.ui.views.activator.UIPlugin;
-import org.eclipse.tm.te.ui.views.interfaces.ImageConsts;
-import org.eclipse.tm.te.ui.views.nls.Messages;
-import org.eclipse.tm.te.ui.views.workingsets.WorkingSetsContentProvider;
+import org.eclipse.tcf.te.ui.views.activator.UIPlugin;
+import org.eclipse.tcf.te.ui.views.interfaces.ImageConsts;
+import org.eclipse.tcf.te.ui.views.nls.Messages;
+import org.eclipse.tcf.te.ui.views.workingsets.WorkingSetsContentProvider;
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.IWorkbenchActionConstants;
import org.eclipse.ui.actions.ActionGroup;
+import org.eclipse.ui.navigator.CommonViewer;
import org.eclipse.ui.navigator.IExtensionStateModel;
/**
@@ -41,44 +43,59 @@ import org.eclipse.ui.navigator.IExtensionStateModel;
* <p>
* Copied and adapted from <code>org.eclipse.ui.internal.navigator.resources.actions.WorkingSetRootModeActionGroup</code>.
*/
-public class WorkingSetRootModeActionGroup extends ActionGroup {
+public class WorkingSetActionGroup extends ActionGroup {
+ private static final String WS_GROUP = "group.ws"; //$NON-NLS-1$
/* default */ IExtensionStateModel stateModel;
/* default */ StructuredViewer viewer;
private boolean hasContributedToViewMenu = false;
private IAction workingSetsAction = null;
- private IAction targetsAction = null;
+ private IAction elementsAction = null;
/* default */ IAction[] actions;
/* default */ int currentSelection;
/* default */ MenuItem[] items;
+ /**
+ * Toggle action switching the top elements between working sets and elements.
+ */
private class TopLevelContentAction extends Action {
-
- private final boolean groupWorkingSets;
+ // If true, the action does enable working set top elements.
+ private final boolean showWorkingSets;
/**
- * Construct an Action that represents a toggle-able state between Showing top level Working
- * Sets and Projects.
+ * Constructor
*
- * @param toGroupWorkingSets
+ * @param showWorkingSets If <code>true</code>, the action does enable working sets as top level elements,
+ * <code>false</code> to disable working sets as top level elements.
*/
public TopLevelContentAction(boolean toGroupWorkingSets) {
super("", AS_RADIO_BUTTON); //$NON-NLS-1$
- groupWorkingSets = toGroupWorkingSets;
+ showWorkingSets = toGroupWorkingSets;
}
/* (non-Javadoc)
* @see org.eclipse.jface.action.Action#run()
*/
- @Override
+ @SuppressWarnings("restriction")
+ @Override
public void run() {
- if (stateModel.getBooleanProperty(WorkingSetsContentProvider.SHOW_TOP_LEVEL_WORKING_SETS) != groupWorkingSets) {
- stateModel.setBooleanProperty(WorkingSetsContentProvider.SHOW_TOP_LEVEL_WORKING_SETS, groupWorkingSets);
-
+ boolean isShowTopLevelWorkingSets = stateModel.getBooleanProperty(WorkingSetsContentProvider.SHOW_TOP_LEVEL_WORKING_SETS);
+ if (isShowTopLevelWorkingSets != showWorkingSets) {
+ // Toggle the "show working set top level elements" property.
+ //
+ // This will trigger the WorkingSetsContentProvider property change listener
+ // to update the target explorer view root mode.
+ stateModel.setBooleanProperty(WorkingSetsContentProvider.SHOW_TOP_LEVEL_WORKING_SETS, showWorkingSets);
+
+ // Disable the viewer redraw, refresh the viewer, reset
+ // the frame list and enable redraw finally.
viewer.getControl().setRedraw(false);
try {
viewer.refresh();
+ if (viewer instanceof CommonViewer) {
+ ((CommonViewer)viewer).getFrameList().reset();
+ }
}
finally {
viewer.getControl().setRedraw(true);
@@ -94,7 +111,7 @@ public class WorkingSetRootModeActionGroup extends ActionGroup {
* @param viewer
* @param stateModel
*/
- public WorkingSetRootModeActionGroup(StructuredViewer viewer, IExtensionStateModel stateModel) {
+ public WorkingSetActionGroup(StructuredViewer viewer, IExtensionStateModel stateModel) {
super();
this.viewer = viewer;
this.stateModel = stateModel;
@@ -106,9 +123,14 @@ public class WorkingSetRootModeActionGroup extends ActionGroup {
@Override
public void fillActionBars(IActionBars actionBars) {
if (hasContributedToViewMenu) return;
- IMenuManager topLevelSubMenu = new MenuManager(Messages.WorkingSetRootModeActionGroup_Top_Level_Element);
+ IMenuManager topLevelSubMenu = new MenuManager(Messages.WorkingSetActionGroup_Top_Level_Element);
addActions(topLevelSubMenu);
- actionBars.getMenuManager().insertBefore(IWorkbenchActionConstants.MB_ADDITIONS, topLevelSubMenu);
+
+ IMenuManager manager = actionBars.getMenuManager();
+ manager.insertBefore(IWorkbenchActionConstants.MB_ADDITIONS, new GroupMarker(WS_GROUP));
+ manager.appendToGroup(WS_GROUP, topLevelSubMenu);
+ manager.appendToGroup(WS_GROUP, new Separator());
+ manager.appendToGroup(WS_GROUP, new ConfigureWorkingSetAction(viewer));
hasContributedToViewMenu = true;
}
@@ -166,15 +188,15 @@ public class WorkingSetRootModeActionGroup extends ActionGroup {
private IAction[] createActions() {
- targetsAction = new TopLevelContentAction(false);
- targetsAction.setText(Messages.WorkingSetRootModeActionGroup_Target);
- targetsAction.setImageDescriptor(UIPlugin.getImageDescriptor(ImageConsts.VIEW));
+ elementsAction = new TopLevelContentAction(false);
+ elementsAction.setText(Messages.WorkingSetActionGroup_Elements);
+ elementsAction.setImageDescriptor(UIPlugin.getImageDescriptor(ImageConsts.VIEW));
workingSetsAction = new TopLevelContentAction(true);
- workingSetsAction.setText(Messages.WorkingSetRootModeActionGroup_Working_Set);
+ workingSetsAction.setText(Messages.WorkingSetActionGroup_Working_Set);
workingSetsAction.setImageDescriptor(UIPlugin.getImageDescriptor(ImageConsts.WORKING_SETS));
- return new IAction[] { targetsAction, workingSetsAction };
+ return new IAction[] { elementsAction, workingSetsAction };
}
/**
@@ -188,12 +210,13 @@ public class WorkingSetRootModeActionGroup extends ActionGroup {
currentSelection = showTopLevelWorkingSets ? 1 : 0;
workingSetsAction.setChecked(showTopLevelWorkingSets);
- targetsAction.setChecked(!showTopLevelWorkingSets);
+ elementsAction.setChecked(!showTopLevelWorkingSets);
if (items != null) {
for (int i = 0; i < items.length; i++) {
- if (items[i] != null && actions[i] != null) items[i].setSelection(actions[i]
- .isChecked());
+ if (items[i] != null && actions[i] != null) {
+ items[i].setSelection(actions[i].isChecked());
+ }
}
}
if (stateModel != null) {
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/workingsets/actions/WorkingSetActionProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/workingsets/actions/WorkingSetActionProvider.java
new file mode 100644
index 000000000..f67d12ad1
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/workingsets/actions/WorkingSetActionProvider.java
@@ -0,0 +1,126 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.views.workingsets.actions;
+
+import org.eclipse.tcf.te.ui.views.workingsets.WorkingSetsContentProvider;
+import org.eclipse.ui.IActionBars;
+import org.eclipse.ui.IMemento;
+import org.eclipse.ui.navigator.CommonActionProvider;
+import org.eclipse.ui.navigator.CommonViewer;
+import org.eclipse.ui.navigator.ICommonActionExtensionSite;
+import org.eclipse.ui.navigator.IExtensionActivationListener;
+import org.eclipse.ui.navigator.IExtensionStateModel;
+import org.eclipse.ui.navigator.INavigatorContentService;
+
+/**
+ * Working set action provider implementation.
+ */
+public class WorkingSetActionProvider extends CommonActionProvider {
+ // Mark if the contribution items have been added to the menu
+ private boolean contributedToViewMenu = false;
+
+ /* default */ CommonViewer viewer;
+ /* default */ INavigatorContentService contentService;
+ /* default */ WorkingSetActionGroup workingSetActionGroup;
+ /* default */ IExtensionStateModel extensionStateModel;
+
+ private IExtensionActivationListener activationListener = new IExtensionActivationListener() {
+
+ @Override
+ public void onExtensionActivation(String viewerId, String[] extensionIds, boolean isActive) {
+
+ for (int i = 0; i < extensionIds.length; i++) {
+ if (WorkingSetsContentProvider.EXTENSION_ID.equals(extensionIds[i])) {
+ if (isActive) {
+ extensionStateModel = contentService.findStateModel(WorkingSetsContentProvider.EXTENSION_ID);
+ workingSetActionGroup.setStateModel(extensionStateModel);
+ } else {
+ workingSetActionGroup.setShowTopLevelWorkingSets(false);
+ }
+ }
+ }
+ }
+
+ };
+
+ @Override
+ public void init(ICommonActionExtensionSite site) {
+ viewer = (CommonViewer) site.getStructuredViewer();
+ contentService = site.getContentService();
+
+ extensionStateModel = contentService.findStateModel(WorkingSetsContentProvider.EXTENSION_ID);
+
+ workingSetActionGroup = new WorkingSetActionGroup(viewer, extensionStateModel);
+
+ contentService.getActivationService().addExtensionActivationListener(activationListener);
+ }
+
+ @Override
+ public void restoreState(final IMemento memento) {
+ super.restoreState(memento);
+
+ // Need to run this asynchronous to avoid being reentered when processing a selection change
+ viewer.getControl().getShell().getDisplay().asyncExec(new Runnable() {
+ @Override
+ public void run() {
+ boolean showWorkingSets = true;
+ if (memento != null) {
+ Integer showWorkingSetsInt = memento.getInteger(WorkingSetsContentProvider.SHOW_TOP_LEVEL_WORKING_SETS);
+ showWorkingSets = showWorkingSetsInt == null || showWorkingSetsInt.intValue() == 1;
+ extensionStateModel.setBooleanProperty(WorkingSetsContentProvider.SHOW_TOP_LEVEL_WORKING_SETS, showWorkingSets);
+ workingSetActionGroup.setShowTopLevelWorkingSets(showWorkingSets);
+ } else {
+ showWorkingSets = false;
+
+ extensionStateModel.setBooleanProperty(WorkingSetsContentProvider.SHOW_TOP_LEVEL_WORKING_SETS, showWorkingSets);
+ workingSetActionGroup.setShowTopLevelWorkingSets(showWorkingSets);
+ }
+ }
+ });
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.navigator.CommonActionProvider#saveState(org.eclipse.ui.IMemento)
+ */
+ @Override
+ public void saveState(IMemento memento) {
+ super.saveState(memento);
+
+ if (memento != null) {
+ int showWorkingSets = extensionStateModel.getBooleanProperty(WorkingSetsContentProvider.SHOW_TOP_LEVEL_WORKING_SETS) ? 1 : 0;
+ memento.putInteger(WorkingSetsContentProvider.SHOW_TOP_LEVEL_WORKING_SETS, showWorkingSets);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.actions.ActionGroup#fillActionBars(org.eclipse.ui.IActionBars)
+ */
+ @Override
+ public void fillActionBars(IActionBars actionBars) {
+ if (!contributedToViewMenu) {
+ try {
+ super.fillActionBars(actionBars);
+ workingSetActionGroup.fillActionBars(actionBars);
+ } finally {
+ contributedToViewMenu = true;
+ }
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.actions.ActionGroup#dispose()
+ */
+ @Override
+ public void dispose() {
+ super.dispose();
+ workingSetActionGroup.dispose();
+ contentService.getActivationService().removeExtensionActivationListener(activationListener);
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/workingsets/dialogs/WorkingSetConfigurationDialog.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/workingsets/dialogs/WorkingSetConfigurationDialog.java
new file mode 100644
index 000000000..ad0dfb119
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/workingsets/dialogs/WorkingSetConfigurationDialog.java
@@ -0,0 +1,598 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.views.workingsets.dialogs;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.ArrayContentProvider;
+import org.eclipse.jface.viewers.CheckStateChangedEvent;
+import org.eclipse.jface.viewers.CheckboxTableViewer;
+import org.eclipse.jface.viewers.DoubleClickEvent;
+import org.eclipse.jface.viewers.ICheckStateListener;
+import org.eclipse.jface.viewers.IDoubleClickListener;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerComparator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.jface.wizard.WizardDialog;
+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.Shell;
+import org.eclipse.tcf.te.ui.views.interfaces.workingsets.IWorkingSetIDs;
+import org.eclipse.tcf.te.ui.views.nls.Messages;
+import org.eclipse.ui.IWorkingSet;
+import org.eclipse.ui.IWorkingSetManager;
+import org.eclipse.ui.dialogs.IWorkingSetEditWizard;
+import org.eclipse.ui.dialogs.IWorkingSetNewWizard;
+import org.eclipse.ui.dialogs.SelectionDialog;
+import org.eclipse.ui.internal.WorkingSetComparator;
+
+/**
+ * The working set configuration dialog used to edit the working set content and order.
+ *
+ * <p>
+ * Copied and adapted from <code>org.eclipse.cdt.internal.ui.WorkingSetConfigurationDialog</code>.
+ */
+@SuppressWarnings("restriction")
+public class WorkingSetConfigurationDialog extends SelectionDialog {
+
+ private static class WorkingSetLabelProvider extends LabelProvider {
+ private Map<ImageDescriptor, Image> fIcons;
+
+ public WorkingSetLabelProvider() {
+ fIcons = new Hashtable<ImageDescriptor, Image>();
+ }
+
+ @Override
+ public void dispose() {
+ Iterator<Image> iterator = fIcons.values().iterator();
+ while (iterator.hasNext()) {
+ Image icon = iterator.next();
+ icon.dispose();
+ }
+ super.dispose();
+ }
+
+ @Override
+ public Image getImage(Object object) {
+ Assert.isTrue(object instanceof IWorkingSet);
+ IWorkingSet workingSet = (IWorkingSet) object;
+ ImageDescriptor imageDescriptor = workingSet.getImageDescriptor();
+ if (imageDescriptor == null) return null;
+ Image icon = fIcons.get(imageDescriptor);
+ if (icon == null) {
+ icon = imageDescriptor.createImage();
+ fIcons.put(imageDescriptor, icon);
+ }
+ return icon;
+ }
+
+ @Override
+ public String getText(Object object) {
+ Assert.isTrue(object instanceof IWorkingSet);
+ IWorkingSet workingSet = (IWorkingSet) object;
+ return workingSet.getName();
+ }
+ }
+
+ List<IWorkingSet> fAllWorkingSets;
+ CheckboxTableViewer fTableViewer;
+
+ Button fNewButton;
+ Button fEditButton;
+ Button fRemoveButton;
+ Button fUpButton;
+ Button fDownButton;
+ Button fSelectAll;
+ Button fDeselectAll;
+ IWorkingSetManager workingSetManager;
+ /**
+ * Sort working sets button.
+ *
+ * @since 3.5
+ */
+ Button fSortWorkingSet;
+
+ IWorkingSet[] fResult;
+
+ int nextButtonId = IDialogConstants.CLIENT_ID + 1;
+
+ /**
+ * Value of sorted state of working sets.
+ *
+ * @since 3.5
+ */
+ boolean fIsSortingEnabled;
+
+ /**
+ * The working set comparator.
+ *
+ * @since 3.5
+ */
+ WorkingSetComparator fComparator;
+
+ public WorkingSetConfigurationDialog(IWorkingSetManager workingSetManager, Shell parentShell, IWorkingSet[] allWorkingSets, boolean isSortingEnabled) {
+ super(parentShell);
+ this.workingSetManager = workingSetManager;
+ setTitle(Messages.WorkingSetConfigurationDialog_title);
+ setMessage(Messages.WorkingSetConfigurationDialog_message);
+ fAllWorkingSets = new ArrayList<IWorkingSet>(allWorkingSets.length);
+ for (int i = 0; i < allWorkingSets.length; i++) {
+ fAllWorkingSets.add(allWorkingSets[i]);
+ }
+ fIsSortingEnabled = isSortingEnabled;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void configureShell(Shell shell) {
+ super.configureShell(shell);
+ }
+
+ /**
+ * Returns the selected working sets
+ *
+ * @return the selected working sets
+ */
+ public IWorkingSet[] getSelection() {
+ return fResult;
+ }
+
+ /**
+ * Sets the initial selection
+ *
+ * @param workingSets the initial selection
+ */
+ public void setSelection(IWorkingSet[] workingSets) {
+ fResult = workingSets;
+ setInitialSelections(workingSets);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Control createContents(Composite parent) {
+ Control control = super.createContents(parent);
+ setInitialSelection();
+ updateButtonAvailability();
+ return control;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Control createDialogArea(Composite parent) {
+ Composite composite = (Composite) super.createDialogArea(parent);
+
+ createMessageArea(composite);
+ Composite inner = new Composite(composite, SWT.NONE);
+ inner.setLayoutData(new GridData(GridData.FILL_BOTH));
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 2;
+ layout.marginHeight = 0;
+ layout.marginWidth = 0;
+ inner.setLayout(layout);
+ createTableViewer(inner);
+ createOrderButtons(inner);
+ createModifyButtons(composite);
+ if (fIsSortingEnabled) {
+ fTableViewer.setComparator(new ViewerComparator(getComparator()) {
+ /*
+ * @see ViewerComparator#compare(Viewer, Object, Object)
+ * @since 3.5
+ */
+ @Override
+ public int compare(Viewer viewer, Object e1, Object e2) {
+ return getComparator().compare(e1, e2);
+ }
+ });
+ }
+ fTableViewer.setInput(fAllWorkingSets);
+ applyDialogFont(composite);
+
+ return composite;
+ }
+
+ private void createTableViewer(Composite parent) {
+ fTableViewer = CheckboxTableViewer.newCheckList(parent, SWT.BORDER | SWT.MULTI);
+ fTableViewer.addCheckStateListener(new ICheckStateListener() {
+ @Override
+ public void checkStateChanged(CheckStateChangedEvent event) {
+ updateButtonAvailability();
+ }
+ });
+ GridData data = new GridData(GridData.FILL_BOTH);
+ data.heightHint = convertHeightInCharsToPixels(20);
+ data.widthHint = convertWidthInCharsToPixels(50);
+ fTableViewer.getTable().setLayoutData(data);
+
+ fTableViewer.setLabelProvider(new WorkingSetLabelProvider());
+ fTableViewer.setContentProvider(new ArrayContentProvider());
+ fTableViewer.addSelectionChangedListener(new ISelectionChangedListener() {
+ @Override
+ public void selectionChanged(SelectionChangedEvent event) {
+ handleSelectionChanged();
+ }
+ });
+ fTableViewer.addDoubleClickListener(new IDoubleClickListener() {
+ @Override
+ public void doubleClick(DoubleClickEvent event) {
+ if (fEditButton.isEnabled()) editSelectedWorkingSet();
+ }
+ });
+ }
+
+ private void createModifyButtons(Composite composite) {
+ Composite buttonComposite = new Composite(composite, SWT.RIGHT);
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 2;
+ buttonComposite.setLayout(layout);
+ GridData data = new GridData(GridData.HORIZONTAL_ALIGN_END | GridData.GRAB_HORIZONTAL);
+ data.grabExcessHorizontalSpace = true;
+ composite.setData(data);
+
+ fNewButton = createButton(buttonComposite, nextButtonId++, Messages.WorkingSetConfigurationDialog_new_label, false);
+ fNewButton.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ createWorkingSet();
+ }
+ });
+
+ fEditButton = createButton(buttonComposite, nextButtonId++, Messages.WorkingSetConfigurationDialog_edit_label, false);
+ fEditButton.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ editSelectedWorkingSet();
+ }
+ });
+
+ fRemoveButton = createButton(buttonComposite, nextButtonId++, Messages.WorkingSetConfigurationDialog_remove_label, false);
+ fRemoveButton.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ removeSelectedWorkingSets();
+ }
+ });
+ }
+
+ private void createOrderButtons(Composite parent) {
+ Composite buttons = new Composite(parent, SWT.NONE);
+ buttons.setLayoutData(new GridData(GridData.FILL_VERTICAL));
+ GridLayout layout = new GridLayout();
+ layout.marginHeight = 0;
+ layout.marginWidth = 0;
+ buttons.setLayout(layout);
+
+ fUpButton = new Button(buttons, SWT.PUSH);
+ fUpButton.setText(Messages.WorkingSetConfigurationDialog_up_label);
+ setButtonLayoutData(fUpButton);
+ fUpButton.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ moveUp(((IStructuredSelection) fTableViewer.getSelection()).toList());
+ }
+ });
+
+ fDownButton = new Button(buttons, SWT.PUSH);
+ fDownButton.setText(Messages.WorkingSetConfigurationDialog_down_label);
+ setButtonLayoutData(fDownButton);
+ fDownButton.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ moveDown(((IStructuredSelection) fTableViewer.getSelection()).toList());
+ }
+ });
+
+ fSelectAll = new Button(buttons, SWT.PUSH);
+ fSelectAll.setText(Messages.WorkingSetConfigurationDialog_selectAll_label);
+ setButtonLayoutData(fSelectAll);
+ fSelectAll.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ selectAll();
+ }
+ });
+
+ fDeselectAll = new Button(buttons, SWT.PUSH);
+ fDeselectAll.setText(Messages.WorkingSetConfigurationDialog_deselectAll_label);
+ setButtonLayoutData(fDeselectAll);
+ fDeselectAll.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ deselectAll();
+ }
+ });
+ /**
+ * A check box that has persistence to sort the working sets alphabetically in the
+ * WorkingSetConfigurationDialog. It restores the unsorted order of the working sets when
+ * unchecked.
+ *
+ * @since 3.5
+ */
+ fSortWorkingSet = new Button(parent, SWT.CHECK);
+ fSortWorkingSet.setText(Messages.WorkingSetConfigurationDialog_sort_working_sets);
+ fSortWorkingSet.setLayoutData(new GridData(SWT.LEAD, SWT.CENTER, true, false));
+ fSortWorkingSet.setSelection(fIsSortingEnabled);
+ fSortWorkingSet.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ fIsSortingEnabled = fSortWorkingSet.getSelection();
+ if (fIsSortingEnabled) {
+ fTableViewer.setComparator(new ViewerComparator(getComparator()) {
+ /*
+ * @see ViewerComparator#compare(Viewer, Object, Object)
+ * @since 3.5
+ */
+ @Override
+ public int compare(Viewer viewer, Object e1, Object e2) {
+ return getComparator().compare(e1, e2);
+ }
+ });
+ }
+ else {
+ fTableViewer.setComparator(null);
+ }
+ updateButtonAvailability();
+ }
+ });
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ protected void okPressed() {
+ List<IWorkingSet> newResult = getResultWorkingSets();
+ fResult = newResult.toArray(new IWorkingSet[newResult.size()]);
+ if (fIsSortingEnabled) {
+ Collections.sort(fAllWorkingSets, getComparator());
+ }
+ setResult(newResult);
+ super.okPressed();
+ }
+
+ @SuppressWarnings({ "unchecked", "rawtypes" })
+ private List<IWorkingSet> getResultWorkingSets() {
+ Object[] checked = fTableViewer.getCheckedElements();
+ return new ArrayList(Arrays.asList(checked));
+ }
+
+ private void setInitialSelection() {
+ List<Object[]> selections = getInitialElementSelections();
+ if (!selections.isEmpty()) {
+ fTableViewer.setCheckedElements(selections.toArray());
+ }
+ }
+
+ void createWorkingSet() {
+ IWorkingSetNewWizard wizard = workingSetManager.createWorkingSetNewWizard(new String[] { IWorkingSetIDs.ID_WS_TARGET_EXPLORER });
+ // the wizard can't be null since we have at least the Java working set.
+ WizardDialog dialog = new WizardDialog(getShell(), wizard);
+ dialog.create();
+ if (dialog.open() == Window.OK) {
+ IWorkingSet workingSet = wizard.getSelection();
+ fAllWorkingSets.add(workingSet);
+ fTableViewer.add(workingSet);
+ fTableViewer.setSelection(new StructuredSelection(workingSet), true);
+ fTableViewer.setChecked(workingSet, true);
+ }
+ }
+
+ void editSelectedWorkingSet() {
+ IWorkingSet editWorkingSet = (IWorkingSet) ((IStructuredSelection) fTableViewer
+ .getSelection()).getFirstElement();
+ IWorkingSetEditWizard wizard = workingSetManager.createWorkingSetEditWizard(editWorkingSet);
+ WizardDialog dialog = new WizardDialog(getShell(), wizard);
+ dialog.create();
+ if (dialog.open() == Window.OK) {
+ editWorkingSet = wizard.getSelection();
+ if (fIsSortingEnabled) fTableViewer.refresh();
+ else fTableViewer.update(editWorkingSet, null);
+
+ // make sure ok button is enabled when the selected working set
+ // is edited. Fixes bug 33386.
+ updateButtonAvailability();
+ }
+ }
+
+ /**
+ * Called when the selection has changed.
+ */
+ void handleSelectionChanged() {
+ updateButtonAvailability();
+ }
+
+ /**
+ * Removes the selected working sets from the workbench.
+ */
+ void removeSelectedWorkingSets() {
+ ISelection selection = fTableViewer.getSelection();
+ if (selection instanceof IStructuredSelection) {
+ Iterator<?> iter = ((IStructuredSelection) selection).iterator();
+ while (iter.hasNext()) {
+ IWorkingSet workingSet = (IWorkingSet) iter.next();
+ fAllWorkingSets.remove(workingSet);
+ }
+ fTableViewer.remove(((IStructuredSelection) selection).toArray());
+ }
+ }
+
+ /**
+ * Updates the modify buttons' enabled state based on the current seleciton.
+ */
+ void updateButtonAvailability() {
+ IStructuredSelection selection = (IStructuredSelection) fTableViewer.getSelection();
+ boolean hasSelection = !selection.isEmpty();
+ boolean hasSingleSelection = selection.size() == 1;
+
+ fRemoveButton.setEnabled(hasSelection && areAllEditable(selection));
+ fEditButton.setEnabled(hasSingleSelection && ((IWorkingSet) selection.getFirstElement())
+ .isEditable());
+ if (fUpButton != null) {
+ fUpButton.setEnabled(canMoveUp());
+ }
+ if (fDownButton != null) {
+ fDownButton.setEnabled(canMoveDown());
+ }
+ }
+
+ private boolean areAllEditable(IStructuredSelection selection) {
+ for (Iterator<?> iter = selection.iterator(); iter.hasNext();) {
+ IWorkingSet workingSet = (IWorkingSet) iter.next();
+ if (!workingSet.isEditable()) return false;
+ }
+ return true;
+ }
+
+ void moveUp(List<IWorkingSet> toMoveUp) {
+ if (toMoveUp.size() > 0) {
+ setElements(moveUp(fAllWorkingSets, toMoveUp));
+ fTableViewer.reveal(toMoveUp.get(0));
+ }
+ }
+
+ void moveDown(List<IWorkingSet> toMoveDown) {
+ if (toMoveDown.size() > 0) {
+ setElements(reverse(moveUp(reverse(fAllWorkingSets), toMoveDown)));
+ fTableViewer.reveal(toMoveDown.get(toMoveDown.size() - 1));
+ }
+ }
+
+ private void setElements(List<IWorkingSet> elements) {
+ fAllWorkingSets = elements;
+ fTableViewer.setInput(fAllWorkingSets);
+ updateButtonAvailability();
+ }
+
+ private List<IWorkingSet> moveUp(List<IWorkingSet> elements, List<IWorkingSet> move) {
+ int nElements = elements.size();
+ List<IWorkingSet> res = new ArrayList<IWorkingSet>(nElements);
+ IWorkingSet floating = null;
+ for (int i = 0; i < nElements; i++) {
+ IWorkingSet curr = elements.get(i);
+ if (move.contains(curr)) {
+ res.add(curr);
+ }
+ else {
+ if (floating != null) {
+ res.add(floating);
+ }
+ floating = curr;
+ }
+ }
+ if (floating != null) {
+ res.add(floating);
+ }
+ return res;
+ }
+
+ private List<IWorkingSet> reverse(List<IWorkingSet> p) {
+ List<IWorkingSet> reverse = new ArrayList<IWorkingSet>(p.size());
+ for (int i = p.size() - 1; i >= 0; i--) {
+ reverse.add(p.get(i));
+ }
+ return reverse;
+ }
+
+ private boolean canMoveUp() {
+ if (!fIsSortingEnabled) {
+ int[] indc = fTableViewer.getTable().getSelectionIndices();
+ for (int i = 0; i < indc.length; i++) {
+ if (indc[i] != i) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ private boolean canMoveDown() {
+ if (!fIsSortingEnabled) {
+ int[] indc = fTableViewer.getTable().getSelectionIndices();
+ int k = fAllWorkingSets.size() - 1;
+ for (int i = indc.length - 1; i >= 0; i--, k--) {
+ if (indc[i] != k) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ // ---- select / deselect --------------------------------------------------
+
+ void selectAll() {
+ fTableViewer.setAllChecked(true);
+ }
+
+ void deselectAll() {
+ fTableViewer.setAllChecked(false);
+ }
+
+ /**
+ * Returns whether sorting is enabled for working sets.
+ *
+ * @return <code>true</code> if sorting is enabled, <code>false</code> otherwise
+ * @since 3.5
+ */
+ public boolean isSortingEnabled() {
+ return fIsSortingEnabled;
+ }
+
+ /**
+ * Returns the working set comparator.
+ *
+ * @return the working set comparator
+ * @since 3.5
+ */
+ WorkingSetComparator getComparator() {
+ if (fComparator == null) {
+ fComparator = new WorkingSetComparator();
+ }
+ return fComparator;
+ }
+
+ /**
+ * Returns all the working sets.
+ *
+ * @return all the working sets
+ * @since 3.7
+ */
+ public IWorkingSet[] getAllWorkingSets() {
+ return fAllWorkingSets.toArray(new IWorkingSet[fAllWorkingSets.size()]);
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/workingsets/pages/AbstractWorkingSetWizardPage.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/workingsets/pages/AbstractWorkingSetWizardPage.java
index 64957c7c8..d10fb1e6b 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/workingsets/pages/AbstractWorkingSetWizardPage.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/workingsets/pages/AbstractWorkingSetWizardPage.java
@@ -9,7 +9,7 @@
* IBM Corporation - initial API and implementation
* William Chen (Wind River) [354578] Add support for working sets
*******************************************************************************/
-package org.eclipse.tm.te.ui.views.workingsets.pages;
+package org.eclipse.tcf.te.ui.views.workingsets.pages;
import java.util.ArrayList;
import java.util.Arrays;
@@ -44,9 +44,9 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
import org.eclipse.swt.widgets.TreeItem;
-import org.eclipse.tm.te.runtime.interfaces.workingsets.IWorkingSetElement;
-import org.eclipse.tm.te.ui.views.nls.Messages;
-import org.eclipse.tm.te.ui.views.workingsets.WorkingSetElementHolder;
+import org.eclipse.tcf.te.ui.views.nls.Messages;
+import org.eclipse.tcf.te.ui.views.workingsets.WorkingSetElementHolder;
+import org.eclipse.tcf.te.runtime.interfaces.workingsets.IWorkingSetElement;
import org.eclipse.ui.IWorkingSet;
import org.eclipse.ui.IWorkingSetManager;
import org.eclipse.ui.PlatformUI;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/workingsets/pages/TargetWorkingSetPage.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/workingsets/pages/TargetWorkingSetPage.java
index 66ddc6e15..416a6383c 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/workingsets/pages/TargetWorkingSetPage.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/workingsets/pages/TargetWorkingSetPage.java
@@ -7,7 +7,7 @@
* Contributors:
* William Chen (Wind River) [354578] Add support for working sets
*******************************************************************************/
-package org.eclipse.tm.te.ui.views.workingsets.pages;
+package org.eclipse.tcf.te.ui.views.workingsets.pages;
import java.util.ArrayList;
import java.util.List;
@@ -20,15 +20,15 @@ import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.tm.te.runtime.interfaces.workingsets.IWorkingSetElement;
-import org.eclipse.tm.te.ui.trees.TreeArrayContentProvider;
-import org.eclipse.tm.te.ui.views.ViewsUtil;
-import org.eclipse.tm.te.ui.views.activator.UIPlugin;
-import org.eclipse.tm.te.ui.views.interfaces.IUIConstants;
-import org.eclipse.tm.te.ui.views.interfaces.ImageConsts;
-import org.eclipse.tm.te.ui.views.internal.ViewRoot;
-import org.eclipse.tm.te.ui.views.nls.Messages;
-import org.eclipse.tm.te.ui.views.workingsets.WorkingSetElementHolder;
+import org.eclipse.tcf.te.ui.views.ViewsUtil;
+import org.eclipse.tcf.te.ui.views.activator.UIPlugin;
+import org.eclipse.tcf.te.ui.views.interfaces.IUIConstants;
+import org.eclipse.tcf.te.ui.views.interfaces.ImageConsts;
+import org.eclipse.tcf.te.ui.views.internal.ViewRoot;
+import org.eclipse.tcf.te.ui.views.nls.Messages;
+import org.eclipse.tcf.te.ui.views.workingsets.WorkingSetElementHolder;
+import org.eclipse.tcf.te.runtime.interfaces.workingsets.IWorkingSetElement;
+import org.eclipse.tcf.te.ui.trees.TreeArrayContentProvider;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.IWorkingSet;
import org.eclipse.ui.navigator.CommonNavigator;
@@ -62,15 +62,15 @@ public class TargetWorkingSetPage extends AbstractWorkingSetWizardPage {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.ui.internal.workingsets.AbstractWorkingSetWizardPage#getPageId()
+ * @see org.eclipse.tcf.te.tcf.ui.internal.workingsets.AbstractWorkingSetWizardPage#getPageId()
*/
@Override
protected String getPageId() {
- return "org.eclipse.tm.te.tcf.ui.TargetWorkingSetPage"; //$NON-NLS-1$
+ return "org.eclipse.tcf.te.tcf.ui.TargetWorkingSetPage"; //$NON-NLS-1$
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.ui.internal.workingsets.AbstractWorkingSetWizardPage#configureTree(org.eclipse.jface.viewers.TreeViewer)
+ * @see org.eclipse.tcf.te.tcf.ui.internal.workingsets.AbstractWorkingSetWizardPage#configureTree(org.eclipse.jface.viewers.TreeViewer)
*/
@Override
protected void configureTree(TreeViewer tree) {
@@ -96,7 +96,7 @@ public class TargetWorkingSetPage extends AbstractWorkingSetWizardPage {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.ui.internal.workingsets.AbstractWorkingSetWizardPage#configureTable(org.eclipse.jface.viewers.TableViewer)
+ * @see org.eclipse.tcf.te.tcf.ui.internal.workingsets.AbstractWorkingSetWizardPage#configureTable(org.eclipse.jface.viewers.TableViewer)
*/
@Override
protected void configureTable(TableViewer table) {
@@ -104,7 +104,7 @@ public class TargetWorkingSetPage extends AbstractWorkingSetWizardPage {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.ui.internal.workingsets.AbstractWorkingSetWizardPage#getInitialWorkingSetElements(org.eclipse.ui.IWorkingSet)
+ * @see org.eclipse.tcf.te.tcf.ui.internal.workingsets.AbstractWorkingSetWizardPage#getInitialWorkingSetElements(org.eclipse.ui.IWorkingSet)
*/
@Override
protected Object[] getInitialWorkingSetElements(IWorkingSet workingSet) {
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/.classpath b/target_explorer/plugins/org.eclipse.tcf.te.ui/.classpath
new file mode 100644
index 000000000..8a8f1668c
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui/.project b/target_explorer/plugins/org.eclipse.tcf.te.ui/.project
index 609275432..d4938fc6c 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui/.project
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/.project
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.eclipse.tm.te.ui</name>
+ <name>org.eclipse.tcf.te.ui</name>
<comment></comment>
<projects>
</projects>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui/.settings/org.eclipse.jdt.core.prefs b/target_explorer/plugins/org.eclipse.tcf.te.ui/.settings/org.eclipse.jdt.core.prefs
index 4a8e8509e..4a8e8509e 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui/.settings/org.eclipse.jdt.core.prefs
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/.settings/org.eclipse.jdt.core.prefs
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui/.settings/org.eclipse.jdt.ui.prefs b/target_explorer/plugins/org.eclipse.tcf.te.ui/.settings/org.eclipse.jdt.ui.prefs
index 4cda17440..4cda17440 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui/.settings/org.eclipse.jdt.ui.prefs
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/.settings/org.eclipse.jdt.ui.prefs
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.ui/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..0fba53546
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/META-INF/MANIFEST.MF
@@ -0,0 +1,40 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.tcf.te.ui;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipse.tcf.te.ui.activator.UIPlugin
+Bundle-Vendor: %providerName
+Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
+ org.eclipse.core.expressions;bundle-version="3.4.300",
+ org.eclipse.ui;bundle-version="3.7.0",
+ org.eclipse.ui.forms;bundle-version="3.5.100",
+ org.eclipse.help;bundle-version="3.5.100",
+ org.eclipse.tcf.te.runtime;bundle-version="1.0.0",
+ org.eclipse.tcf.te.runtime.concurrent;bundle-version="1.0.0",
+ org.eclipse.tcf.te.runtime.model;bundle-version="1.0.0",
+ org.eclipse.tcf.te.runtime.statushandler;bundle-version="1.0.0",
+ org.eclipse.tcf.te.core;bundle-version="1.0.0",
+ org.eclipse.tcf.te.ui.swt;bundle-version="1.0.0",
+ org.eclipse.tcf.te.ui.forms;bundle-version="1.0.0"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
+Bundle-Localization: plugin
+Export-Package: org.eclipse.tcf.te.ui,
+ org.eclipse.tcf.te.ui.activator,
+ org.eclipse.tcf.te.ui.dialogs,
+ org.eclipse.tcf.te.ui.events,
+ org.eclipse.tcf.te.ui.interfaces,
+ org.eclipse.tcf.te.ui.interfaces.data,
+ org.eclipse.tcf.te.ui.internal.executors;x-internal:=true,
+ org.eclipse.tcf.te.ui.nls,
+ org.eclipse.tcf.te.ui.preferences,
+ org.eclipse.tcf.te.ui.statushandler,
+ org.eclipse.tcf.te.ui.tables,
+ org.eclipse.tcf.te.ui.tables.properties,
+ org.eclipse.tcf.te.ui.trees,
+ org.eclipse.tcf.te.ui.utils,
+ org.eclipse.tcf.te.ui.wizards,
+ org.eclipse.tcf.te.ui.wizards.interfaces,
+ org.eclipse.tcf.te.ui.wizards.newWizard,
+ org.eclipse.tcf.te.ui.wizards.pages
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui/build.properties b/target_explorer/plugins/org.eclipse.tcf.te.ui/build.properties
index 2b24d2258..2b24d2258 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui/build.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/build.properties
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/icons/dlcl16/filter_ps.gif b/target_explorer/plugins/org.eclipse.tcf.te.ui/icons/dlcl16/filter_ps.gif
new file mode 100644
index 000000000..6c54da9ad
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/icons/dlcl16/filter_ps.gif
Binary files differ
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui/icons/dlcl16/newtarget_wiz.gif b/target_explorer/plugins/org.eclipse.tcf.te.ui/icons/dlcl16/newtarget_wiz.gif
index 5d9eae9e5..5d9eae9e5 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui/icons/dlcl16/newtarget_wiz.gif
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/icons/dlcl16/newtarget_wiz.gif
Binary files differ
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/icons/elcl16/filter_ps.gif b/target_explorer/plugins/org.eclipse.tcf.te.ui/icons/elcl16/filter_ps.gif
new file mode 100644
index 000000000..a4c9e60e2
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/icons/elcl16/filter_ps.gif
Binary files differ
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/icons/elcl16/help.gif b/target_explorer/plugins/org.eclipse.tcf.te.ui/icons/elcl16/help.gif
new file mode 100644
index 000000000..9d70301da
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/icons/elcl16/help.gif
Binary files differ
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui/icons/elcl16/newtarget_wiz.gif b/target_explorer/plugins/org.eclipse.tcf.te.ui/icons/elcl16/newtarget_wiz.gif
index 9f2b4acc7..9f2b4acc7 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui/icons/elcl16/newtarget_wiz.gif
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/icons/elcl16/newtarget_wiz.gif
Binary files differ
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui/icons/ovr16/busy.gif b/target_explorer/plugins/org.eclipse.tcf.te.ui/icons/ovr16/busy.gif
index b53591825..b53591825 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui/icons/ovr16/busy.gif
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/icons/ovr16/busy.gif
Binary files differ
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui/icons/ovr16/gold_ovr.gif b/target_explorer/plugins/org.eclipse.tcf.te.ui/icons/ovr16/gold_ovr.gif
index a05073c2f..a05073c2f 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui/icons/ovr16/gold_ovr.gif
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/icons/ovr16/gold_ovr.gif
Binary files differ
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui/icons/ovr16/green_ovr.gif b/target_explorer/plugins/org.eclipse.tcf.te.ui/icons/ovr16/green_ovr.gif
index 35ed218ad..35ed218ad 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui/icons/ovr16/green_ovr.gif
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/icons/ovr16/green_ovr.gif
Binary files differ
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui/icons/ovr16/grey_ovr.gif b/target_explorer/plugins/org.eclipse.tcf.te.ui/icons/ovr16/grey_ovr.gif
index 3f5fb9f6f..3f5fb9f6f 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui/icons/ovr16/grey_ovr.gif
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/icons/ovr16/grey_ovr.gif
Binary files differ
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui/icons/ovr16/redX_ovr.gif b/target_explorer/plugins/org.eclipse.tcf.te.ui/icons/ovr16/redX_ovr.gif
index 8fa687bb2..8fa687bb2 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui/icons/ovr16/redX_ovr.gif
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/icons/ovr16/redX_ovr.gif
Binary files differ
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui/icons/ovr16/red_ovr.gif b/target_explorer/plugins/org.eclipse.tcf.te.ui/icons/ovr16/red_ovr.gif
index ea5aaa545..ea5aaa545 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui/icons/ovr16/red_ovr.gif
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/icons/ovr16/red_ovr.gif
Binary files differ
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui/icons/wizban/newtarget_wiz.gif b/target_explorer/plugins/org.eclipse.tcf.te.ui/icons/wizban/newtarget_wiz.gif
index 6a4a5ef6b..6a4a5ef6b 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui/icons/wizban/newtarget_wiz.gif
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/icons/wizban/newtarget_wiz.gif
Binary files differ
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.ui/plugin.properties
index 0d7e06546..5227c4252 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui/plugin.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/plugin.properties
@@ -11,6 +11,12 @@
pluginName = Target Explorer, Common UI and Helper
providerName = Eclipse.org
+# ***** Extension Points *****
+
+extension-point.newWizards.name = New Wizards
+extension-point.wizardProviders.name=New Wizard Providers
+extension-point.viewers.name = Tree Viewer Extension
+
# ***** Wizards *****
NewWizards.category.name=General
@@ -33,3 +39,8 @@ DefaultStatusHandler.label=Default Status Handler
# ***** Executors / Executor Utility Delegates *****
SWTDisplayExecutorUtilDelegate.label=SWT Display Executor Utility Delegate
+
+# ***** Preference Pages *****
+
+preference.page.name=Target Explorer
+ExtensionPoint.cellEditors.name = Common Viewer Cell Editors \ No newline at end of file
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/plugin.xml b/target_explorer/plugins/org.eclipse.tcf.te.ui/plugin.xml
new file mode 100644
index 000000000..6df902d2f
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/plugin.xml
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension-point id="newWizards" name="%extension-point.newWizards.name" schema="schema/newWizards.exsd"/>
+ <extension-point id="wizardProviders" name="%extension-point.wizardProviders.name" schema="schema/wizardProviders.exsd"/>
+ <extension-point id="viewers" name="%extension-point.viewers.name" schema="schema/viewers.exsd"/>
+ <extension-point id="cellEditors" name="%ExtensionPoint.cellEditors.name" schema="schema/cellEditors.exsd"/>
+
+<!-- New target wizard contributions -->
+
+ <extension point="org.eclipse.tcf.te.ui.newWizards">
+ <category
+ id="org.eclipse.tcf.te.ui.newWizards.category.general"
+ name="%NewWizards.category.name">
+ </category>
+ </extension>
+
+<!-- Command contributions -->
+ <extension point="org.eclipse.ui.commands">
+ <category
+ id="org.eclipse.tcf.te.ui.commands.category"
+ name="%Command.category.name">
+ </category>
+
+ <command
+ categoryId="org.eclipse.tcf.te.ui.commands.category"
+ defaultHandler="org.eclipse.tcf.te.ui.wizards.newWizard.NewWizardCommandHandler"
+ description="%Command.newWizards.description"
+ helpContextId="org.eclipse.tcf.te.ui.command_NewWizards"
+ id="org.eclipse.tcf.te.ui.command.newWizards"
+ name="%Command.newWizards.name">
+ </command>
+ </extension>
+
+<!-- Command image contributions -->
+ <extension point="org.eclipse.ui.commandImages">
+ <image
+ commandId="org.eclipse.tcf.te.ui.command.newWizards"
+ disabledIcon="icons/dlcl16/newtarget_wiz.gif"
+ icon="icons/elcl16/newtarget_wiz.gif">
+ </image>
+ </extension>
+
+<!-- Context and binding contributions -->
+ <extension point="org.eclipse.ui.contexts">
+ <context
+ description="%context.targetexplorer.description"
+ id="org.eclipse.tcf.te.ui.views.TargetExplorer"
+ name="%context.targetexplorer.name"
+ parentId="org.eclipse.ui.contexts.window">
+ </context>
+ </extension>
+
+ <extension point="org.eclipse.ui.bindings">
+ <key
+ commandId="org.eclipse.tcf.te.ui.command.newWizards"
+ contextId="org.eclipse.tcf.te.ui.views.TargetExplorer"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="M1+N">
+ </key>
+ </extension>
+
+<!-- Status handler contributions -->
+ <extension point="org.eclipse.tcf.te.runtime.statushandler.handlers">
+ <handler
+ class="org.eclipse.tcf.te.ui.statushandler.DefaultStatusHandler"
+ id="org.eclipse.tcf.te.statushandler.default"
+ label="%DefaultStatusHandler.label">
+ </handler>
+ </extension>
+
+<!-- Executor service contributions -->
+ <extension point="org.eclipse.tcf.te.runtime.concurrent.executorServices">
+ <executorService
+ id="org.eclipse.tcf.te.ui.executors.SWTDisplay"
+ label="Eclipse Platform Display Executor"
+ class="org.eclipse.tcf.te.ui.internal.executors.SWTDisplayExecutor">
+ </executorService>
+ </extension>
+
+<!-- Executor utility delegate contributions -->
+ <extension point="org.eclipse.tcf.te.runtime.concurrent.executorUtilDelegates">
+ <executorUtilDelegate
+ class="org.eclipse.tcf.te.ui.internal.executors.SWTDisplayExecutorUtilDelegate"
+ id="org.eclipse.tcf.te.ui.executors.delegate.SWTDisplay"
+ label="%SWTDisplayExecutorUtilDelegate.label">
+ </executorUtilDelegate>
+ </extension>
+
+<!-- Preference page contributions -->
+ <extension point="org.eclipse.ui.preferencePages">
+ <page
+ class="org.eclipse.tcf.te.ui.preferences.PreferencePage"
+ id="org.eclipse.tcf.te.ui.preferences.general"
+ name="%preference.page.name">
+ </page>
+ </extension>
+
+</plugin>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui/pom.xml b/target_explorer/plugins/org.eclipse.tcf.te.ui/pom.xml
index f032064ce..bb00f6d66 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui/pom.xml
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/pom.xml
@@ -7,11 +7,11 @@
<parent>
<groupId>org.eclipse.tcf</groupId>
<artifactId>tcf-parent</artifactId>
- <version>0.5.0-SNAPSHOT</version>
+ <version>1.0.0-SNAPSHOT</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<version>1.0.0.qualifier</version>
- <artifactId>org.eclipse.tm.te.ui</artifactId>
+ <artifactId>org.eclipse.tcf.te.ui</artifactId>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/schema/cellEditors.exsd b/target_explorer/plugins/org.eclipse.tcf.te.ui/schema/cellEditors.exsd
new file mode 100644
index 000000000..64abd0989
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/schema/cellEditors.exsd
@@ -0,0 +1,201 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.tcf.te.ui" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appinfo>
+ <meta.schema plugin="org.eclipse.tcf.te.ui" id="cellEditors" name="Tree Viewer Cell Editors"/>
+ </appinfo>
+ <documentation>
+ This extension point is used to declare the cell editor factories in Target Explorer tree viewers.
+ </documentation>
+ </annotation>
+
+ <include schemaLocation="schema://org.eclipse.core.expressions/schema/expressionLanguage.exsd"/>
+
+ <element name="extension">
+ <annotation>
+ <appinfo>
+ <meta.element />
+ </appinfo>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element ref="cellEditor" minOccurs="1" maxOccurs="unbounded"/>
+ </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="cellEditor">
+ <annotation>
+ <documentation>
+ Declares a cell editor factory for Target Explorer view.
+ </documentation>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element ref="activation"/>
+ <element ref="contributeTo" minOccurs="1" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="editorFactory" type="string" use="required">
+ <annotation>
+ <documentation>
+ The class that implements &lt;code&gt;org.eclipse.tcf.te.ui.interfaces.IViewerCellEditorFactory&lt;/code&gt;.
+&lt;p&gt;
+The cell editor factory implementation class must be specified either by the &quot;editorFactory&quot; attribute!
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn=":org.eclipse.tcf.te.ui.interfaces.IViewerCellEditorFactory"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="activation">
+ <annotation>
+ <documentation>
+ The &lt;b&gt;activation&lt;/b&gt; expression defines the event that triggers the cell editing and the elements selected when the cell editor is about to be activated.
+ </documentation>
+ </annotation>
+ <complexType>
+ <choice>
+ <element ref="not"/>
+ <element ref="and"/>
+ <element ref="or"/>
+ <element ref="instanceof"/>
+ <element ref="test"/>
+ <element ref="systemTest"/>
+ <element ref="equals"/>
+ <element ref="count"/>
+ <element ref="with"/>
+ <element ref="resolve"/>
+ <element ref="adapt"/>
+ <element ref="iterate"/>
+ <element ref="reference"/>
+ </choice>
+ </complexType>
+ </element>
+
+ <element name="contributeTo">
+ <annotation>
+ <documentation>
+ The cell editor&apos;s contribution to a tree viewer.It could be the common viewer of a common navigator. It could be an instance of AbstractTreeControl. If the viewer is in a common navigator then the viewerId must match the navigator&apos;s id defined in its &lt;b&gt;org.eclipse.ui.views&lt;/b&gt; extension.If the viewer is an instance of AbstractTreeControl, then the viewerId must match the viewerId defined in its &lt;b&gt;org.eclipse.tcf.te.ui.viewers&lt;/b&gt; extension.
+ </documentation>
+ </annotation>
+ <complexType>
+ <attribute name="viewerId" type="string" use="required">
+ <annotation>
+ <documentation>
+ The viewer id of the tree that this cell editor factory contributes to. If the viewer is in a common navigator then the viewerId must match the navigator&apos;s id defined in its &lt;b&gt;org.eclipse.ui.views&lt;/b&gt; extension.If the viewer is an instance of AbstractTreeControl, then the viewerId must match the viewerId defined in its &lt;b&gt;org.eclipse.tcf.te.ui.viewers&lt;/b&gt; extension.
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="since"/>
+ </appinfo>
+ <documentation>
+ Target Explorer 1.0.0
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="examples"/>
+ </appinfo>
+ <documentation>
+ &lt;pre&gt;
+ &lt;extension point=&quot;org.eclipse.tcf.te.ui.cellEditors&quot;&gt;
+ &lt;cellEditor
+ editorFactory=&quot;org.eclipse.tcf.te.tcf.filesystem.internal.celleditor.FSViewerCellEditorFactory&quot;&gt;
+ &lt;activation&gt;
+ &lt;and&gt;
+ &lt;with
+ variable=&quot;selection&quot;&gt;
+ &lt;count
+ value=&quot;1&quot;&gt;
+ &lt;/count&gt;
+ &lt;iterate&gt;
+ &lt;instanceof
+ value=&quot;org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode&quot;&gt;
+ &lt;/instanceof&gt;
+ &lt;/iterate&gt;
+ &lt;/with&gt;
+ &lt;with
+ variable=&quot;event&quot;&gt;
+ &lt;test
+ property=&quot;org.eclipse.tcf.te.tcf.filesystem.propertytester.event.isEditorActivation&quot;&gt;
+ &lt;/test&gt;
+ &lt;/with&gt;
+ &lt;/and&gt;
+ &lt;/activation&gt;
+ &lt;contributeTo
+ viewerId=&quot;org.eclipse.tcf.te.ui.views.TargetExplorer&quot;&gt;
+ &lt;/contributeTo&gt;
+ &lt;contributeTo
+ viewerId=&quot;org.eclipse.tcf.te.ui.controls.viewer.fs&quot;&gt;
+ &lt;/contributeTo&gt;
+ &lt;/cellEditor&gt;
+ &lt;/extension&gt;
+&lt;/pre&gt;
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="apiinfo"/>
+ </appinfo>
+ <documentation>
+ Plug-ins that want to extend this extension point, the referenced class must implement &lt;samp&gt;org.eclipse.tcf.te.ui.interfaces.IViewerCellEditorFactory&lt;/samp&gt; interface.
+&lt;p&gt;
+In the &quot;activation&quot; element, the evaluation context has two variables: &quot;selection&quot; and &quot;event&quot;.
+&quot;selection&quot; stores the currently selected elements in the viewer. &quot;event&quot; is the event that
+triggers cell editing, an instance of &lt;code&gt;org.eclipse.jface.viewers.ColumnViewerEditorActivationEvent&lt;/code&gt;.
+See &lt;code&gt;org.eclipse.jface.viewers.ColumnViewerEditorActivationStrategy&lt;/code&gt; for more information.
+ </documentation>
+ </annotation>
+
+
+ <annotation>
+ <appinfo>
+ <meta.section type="copyright"/>
+ </appinfo>
+ <documentation>
+ Copyright (c) 2011 Wind River Systems, Inc. and others.
+
+All rights reserved.
+
+This program and the accompanying materials are made available under the terms
+of the Eclipse Public License v1.0 which accompanies this distribution, and is
+available at http://www.eclipse.org/legal/epl-v10.html.
+ </documentation>
+ </annotation>
+
+</schema>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui/schema/newWizards.exsd b/target_explorer/plugins/org.eclipse.tcf.te.ui/schema/newWizards.exsd
index f064da2a6..ea02f9c37 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui/schema/newWizards.exsd
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/schema/newWizards.exsd
@@ -1,17 +1,19 @@
<?xml version='1.0' encoding='UTF-8'?>
<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.tm.te.ui" xmlns="http://www.w3.org/2001/XMLSchema">
+<schema targetNamespace="org.eclipse.tcf.te.ui" xmlns="http://www.w3.org/2001/XMLSchema">
<annotation>
<appinfo>
- <meta.schema plugin="org.eclipse.tm.te.ui" id="newWizards" name="New Target Wizards"/>
+ <meta.schema plugin="org.eclipse.tcf.te.ui" id="newWizards" name="New Wizards"/>
</appinfo>
<documentation>
- This extension point is used to register target creation wizard extensions. Target creation wizards appear as choices within the &quot;New Target&quot; dialog, and are used to create target definitions. Target creation wizards can be organized in categories. Uncategorized wizards or wizards with invalid category paths will be sorted in as non-categorized root element.
+ This extension point is used to register element creation wizard extensions. Element creation wizards appear as choices within the &quot;New&quot; dialog. The new element creation wizards can be organized in categories. Uncategorized wizards or wizards with invalid category paths will be sorted in as non-categorized root element.
&lt;p&gt;
-Target creation wizards may optionally specify a description subelement whose body should contain short text about the wizard.
+New element creation wizards may optionally specify a description subelement whose body should contain short text about the wizard.
</documentation>
</annotation>
+ <include schemaLocation="schema://org.eclipse.core.expressions/schema/expressionLanguage.exsd"/>
+
<element name="extension">
<annotation>
<appinfo>
@@ -75,7 +77,7 @@ Target creation wizards may optionally specify a description subelement whose bo
a path to another category if this category should be added as a child
</documentation>
<appinfo>
- <meta.attribute kind="identifier" basedOn="org.eclipse.tm.te.ui.newWizards/category/@id"/>
+ <meta.attribute kind="identifier" basedOn="org.eclipse.tcf.te.ui.newWizards/category/@id"/>
</appinfo>
</annotation>
</attribute>
@@ -86,6 +88,7 @@ Target creation wizards may optionally specify a description subelement whose bo
<complexType>
<sequence>
<element ref="description" minOccurs="0" maxOccurs="1"/>
+ <element ref="enablement" minOccurs="0" maxOccurs="1"/>
</sequence>
<attribute name="id" type="string" use="required">
<annotation>
@@ -177,13 +180,13 @@ Target creation wizards may optionally specify a description subelement whose bo
&lt;p&gt;
&lt;pre&gt;
- &lt;extension point=&quot;org.eclipse.tm.te.ui.newWizards&quot;&gt;
- &lt;category id=&quot;org.eclipse.tm.te.ui.newWizards.category&quot;
+ &lt;extension point=&quot;org.eclipse.tcf.te.ui.newWizards&quot;&gt;
+ &lt;category id=&quot;org.eclipse.tcf.te.ui.newWizards.category&quot;
name=&quot;General&quot;/&gt;
&lt;wizard
- categoryId=&quot;org.eclipse.tm.te.ui.newWizards.category&quot;
- class=&quot;org.eclipse.tm.te.tcf.ui.internal.wizards.NewTargetWizard&quot;
- id=&quot;org.eclipse.tm.te.tcf.ui.wizards.NewTargetWizard&quot;
+ categoryId=&quot;org.eclipse.tcf.te.ui.newWizards.category&quot;
+ class=&quot;org.eclipse.tcf.te.tcf.ui.internal.wizards.NewTargetWizard&quot;
+ id=&quot;org.eclipse.tcf.te.tcf.ui.wizards.NewTargetWizard&quot;
name=&quot;TCF Target&quot;&gt;
&lt;/wizard&gt;
&lt;/extension&gt;
@@ -197,7 +200,7 @@ Target creation wizards may optionally specify a description subelement whose bo
<meta.section type="apiinfo"/>
</appinfo>
<documentation>
- The provider of a new target creation wizard must implement &lt;samp&gt;org.eclipse.ui.IWorkbenchWizard&lt;/samp&gt;.
+ The provider of a new element creation wizard must implement &lt;samp&gt;org.eclipse.ui.IWorkbenchWizard&lt;/samp&gt;.
</documentation>
</annotation>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/schema/viewers.exsd b/target_explorer/plugins/org.eclipse.tcf.te.ui/schema/viewers.exsd
new file mode 100644
index 000000000..91eab42d7
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/schema/viewers.exsd
@@ -0,0 +1,739 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.tcf.te.ui" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appinfo>
+ <meta.schema plugin="org.eclipse.tcf.te.ui" id="viewers" name="Tree Viewer Extension"/>
+ </appinfo>
+ <documentation>
+ This extension point is used to declare the columns and the filters for a specified tree viewer.
+ </documentation>
+ </annotation>
+
+ <include schemaLocation="schema://org.eclipse.core.expressions/schema/expressionLanguage.exsd"/>
+
+ <element name="extension">
+ <annotation>
+ <appinfo>
+ <meta.element />
+ </appinfo>
+ </annotation>
+ <complexType>
+ <choice minOccurs="1" maxOccurs="unbounded">
+ <element ref="viewer"/>
+ <element ref="columnContribution"/>
+ <element ref="filterContribution"/>
+ </choice>
+ <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="viewer">
+ <annotation>
+ <documentation>
+ Declares a viewer with a viewerId to columns or filters. Definitions of this element with the same viewerId can occur multiple time to contribute columns and filters to a same viewer.
+ </documentation>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element ref="creation" minOccurs="0" maxOccurs="1"/>
+ <element ref="dragSupport" minOccurs="0" maxOccurs="1"/>
+ <element ref="dropSupport" minOccurs="0" maxOccurs="1"/>
+ </sequence>
+ <attribute name="id" type="string" use="required">
+ <annotation>
+ <documentation>
+ The viewer&apos;s id which uniquely defines a single tree viewer.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="contentProvider" type="string" use="required">
+ <annotation>
+ <documentation>
+ The content provider of the tree viewer.
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn=":org.eclipse.jface.viewers.ITreeContentProvider"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="persistent" type="boolean">
+ <annotation>
+ <documentation>
+ If the state of the tree viewer is persistent. The state includes its columns selected, filters selected, etc.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="autoExpandLevel" type="string">
+ <annotation>
+ <documentation>
+ The auto expand level of the tree viewer when it is first displayed.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="menuId" type="string">
+ <annotation>
+ <documentation>
+ The context menu id of the tree viewer.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="doubleClickCommand" type="string">
+ <annotation>
+ <documentation>
+ The command invoked when double clicked.
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="identifier" basedOn="org.eclipse.ui.commands/command/@id"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="helpId" type="string">
+ <annotation>
+ <documentation>
+ The help id of the tree viewer.
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="columnContribution">
+ <annotation>
+ <documentation>
+ The root of the column contributions.
+ </documentation>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element ref="column" minOccurs="1" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="viewerId" type="string" use="required">
+ <annotation>
+ <documentation>
+ The id of the tree viewer which the columns declared contribute to.
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="identifier" basedOn="org.eclipse.tcf.te.ui.viewers/viewer/@id"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="filterContribution">
+ <annotation>
+ <documentation>
+ The root of the filter contributions.
+ </documentation>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element ref="filter" minOccurs="1" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="viewerId" type="string" use="required">
+ <annotation>
+ <documentation>
+ The id of the tree viewer which the filters declared contribute to.
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="identifier" basedOn="org.eclipse.tcf.te.ui.viewers/viewer/@id"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="column">
+ <annotation>
+ <documentation>
+ Declares a tree viewer column with the specified attributes.
+ </documentation>
+ </annotation>
+ <complexType>
+ <sequence minOccurs="0" maxOccurs="1">
+ <element ref="activation"/>
+ </sequence>
+ <attribute name="id" type="string" use="required">
+ <annotation>
+ <documentation>
+ The id of the column which must be unique in the same viewer.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string" use="required">
+ <annotation>
+ <documentation>
+ The name of the tree viewer column. It is used as the column&apos;s label.
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="description" type="string">
+ <annotation>
+ <documentation>
+ The description of the column used as the tooltip text of the column.
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="moveable" type="boolean">
+ <annotation>
+ <documentation>
+ Declares if the column is moveable. The default value is false.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="resizable" type="boolean">
+ <annotation>
+ <documentation>
+ Declares if the column is resizable. The default value is true.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="visible" type="boolean">
+ <annotation>
+ <documentation>
+ Declares if the column is visible. The default value is true.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="style">
+ <annotation>
+ <documentation>
+ The style of the column when it is created, SWT.LEFT by default.
+ </documentation>
+ </annotation>
+ <simpleType>
+ <restriction base="string">
+ <enumeration value="SWT.LEFT">
+ </enumeration>
+ <enumeration value="SWT.RIGHT">
+ </enumeration>
+ <enumeration value="SWT.CENTER">
+ </enumeration>
+ </restriction>
+ </simpleType>
+ </attribute>
+ <attribute name="alignment">
+ <annotation>
+ <documentation>
+ The alignment of the column&apos;s header text, SWT.LEFT by default.
+ </documentation>
+ </annotation>
+ <simpleType>
+ <restriction base="string">
+ <enumeration value="SWT.LEFT">
+ </enumeration>
+ <enumeration value="SWT.RIGHT">
+ </enumeration>
+ <enumeration value="SWT.CENTER">
+ </enumeration>
+ </restriction>
+ </simpleType>
+ </attribute>
+ <attribute name="width" type="string">
+ <annotation>
+ <documentation>
+ The column&apos;s initial width when it is created, 150 by default.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="image" type="string">
+ <annotation>
+ <documentation>
+ The column&apos;s header image. No image by default.
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="resource"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="labelProvider" type="string" use="required">
+ <annotation>
+ <documentation>
+ The label provider of the column.
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn=":org.eclipse.jface.viewers.ILabelProvider"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="comparator" type="string">
+ <annotation>
+ <documentation>
+ The comparator of the column, used to sort the viewer. If it is not set, then this column is not sortable.
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn=":java.util.Comparator"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="filter">
+ <complexType>
+ <sequence minOccurs="0" maxOccurs="1">
+ <element ref="activation" minOccurs="0" maxOccurs="1"/>
+ </sequence>
+ <attribute name="id" type="string" use="required">
+ <annotation>
+ <documentation>
+ The id of the filter which must be unique in this viewer.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string" use="required">
+ <annotation>
+ <documentation>
+ The name of the filter used to display in the viewer&apos;s filter configuration dialog.
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="description" type="string">
+ <annotation>
+ <documentation>
+ The description of the filter.
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="image" type="string">
+ <annotation>
+ <documentation>
+ The filter&apos;s displaying image. No image by default.
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="resource"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="enabled" type="boolean">
+ <annotation>
+ <documentation>
+ If this filter is enabled. Disabled by default.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="class" type="string" use="required">
+ <annotation>
+ <documentation>
+ The viewer filter that extends &lt;samp&gt;org.eclipse.jface.viewers.ViewerFilter&lt;/samp&gt;.
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn="org.eclipse.jface.viewers.ViewerFilter:"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="activation">
+ <annotation>
+ <documentation>
+ The &lt;b&gt;activation&lt;/b&gt; expression defines a condition under which the column/filter should be activated.
+ </documentation>
+ </annotation>
+ <complexType>
+ <choice>
+ <element ref="not"/>
+ <element ref="and"/>
+ <element ref="or"/>
+ <element ref="instanceof"/>
+ <element ref="test"/>
+ <element ref="systemTest"/>
+ <element ref="equals"/>
+ <element ref="count"/>
+ <element ref="with"/>
+ <element ref="resolve"/>
+ <element ref="adapt"/>
+ <element ref="iterate"/>
+ <element ref="reference"/>
+ </choice>
+ </complexType>
+ </element>
+
+ <element name="creation">
+ <annotation>
+ <documentation>
+ The creation flag of the tree viewer.
+ </documentation>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element ref="style" minOccurs="1" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="dragSupport">
+ <annotation>
+ <documentation>
+ The drag support added to the tree viewer.
+ </documentation>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element ref="operations"/>
+ <element ref="transferTypes"/>
+ </sequence>
+ <attribute name="class" type="string" use="required">
+ <annotation>
+ <documentation>
+ A drag source listener that implements &lt;samp&gt;org.eclipse.swt.dndDragSourceListener&lt;/samp&gt;. This listener should have a one-parameter constructor. The only parameter is the tree viewer that the drag source listener is added to.
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn=":org.eclipse.swt.dnd.DragSourceListener"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="dropSupport">
+ <annotation>
+ <documentation>
+ The drop support added to the tree viewer.
+ </documentation>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element ref="operations"/>
+ <element ref="transferTypes"/>
+ </sequence>
+ <attribute name="class" type="string" use="required">
+ <annotation>
+ <documentation>
+ A drop target listener that implements &lt;samp&gt;org.eclipse.swt.dnd.DropTargetListener&lt;/samp&gt;. This listener should have a one-parameter constructor. The only parameter is the tree viewer that the drop target listener is added to.
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn=":org.eclipse.swt.dnd.DropTargetListener"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="operations">
+ <annotation>
+ <documentation>
+ The DND operations supported.
+ </documentation>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element ref="operation" minOccurs="1" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="transferTypes">
+ <annotation>
+ <documentation>
+ The DND transfer types supported.
+ </documentation>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element ref="transferType" minOccurs="1" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="style">
+ <annotation>
+ <documentation>
+ A creation style declaration.
+ </documentation>
+ </annotation>
+ <complexType>
+ <attribute name="name" use="required">
+ <annotation>
+ <documentation>
+ The name of the style including SWT.NONE, SWT.SINGLE, SWT&gt;MULTI, SWT.CHECK, SWT.FULL_SELECTION, SWT.VIRTUAL, SWT.NO_SCROLL.
+ </documentation>
+ </annotation>
+ <simpleType>
+ <restriction base="string">
+ <enumeration value="SWT.NONE">
+ </enumeration>
+ <enumeration value="SWT.SINGLE">
+ </enumeration>
+ <enumeration value="SWT.MULTI">
+ </enumeration>
+ <enumeration value="SWT.CHECK">
+ </enumeration>
+ <enumeration value="SWT.FULL_SELECTION">
+ </enumeration>
+ <enumeration value="SWT.VIRTUAL">
+ </enumeration>
+ <enumeration value="SWT.NO_SCROLL">
+ </enumeration>
+ </restriction>
+ </simpleType>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="operation">
+ <annotation>
+ <documentation>
+ A DND operation declaration.
+ </documentation>
+ </annotation>
+ <complexType>
+ <attribute name="name" use="required">
+ <annotation>
+ <documentation>
+ The name of the operation including DND.DROP_COPY, DND.DROP_MOVE,DND.DROP_LINK.
+ </documentation>
+ </annotation>
+ <simpleType>
+ <restriction base="string">
+ <enumeration value="DND.DROP_COPY">
+ </enumeration>
+ <enumeration value="DND.DROP_MOVE">
+ </enumeration>
+ <enumeration value="DND.DROP_LINK">
+ </enumeration>
+ </restriction>
+ </simpleType>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="transferType">
+ <annotation>
+ <documentation>
+ A transfer type declaration.
+ </documentation>
+ </annotation>
+ <complexType>
+ <attribute name="name">
+ <annotation>
+ <documentation>
+ The name of the transfer type including TextInstance, ImageTransfer, FileTransfer and LocalSelectionTransfer.
+ </documentation>
+ </annotation>
+ <simpleType>
+ <restriction base="string">
+ <enumeration value="TextTransfer">
+ </enumeration>
+ <enumeration value="ImageTransfer">
+ </enumeration>
+ <enumeration value="FileTransfer">
+ </enumeration>
+ <enumeration value="LocalSelectionTransfer">
+ </enumeration>
+ </restriction>
+ </simpleType>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="since"/>
+ </appinfo>
+ <documentation>
+ Target Explorer 1.0.0
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="examples"/>
+ </appinfo>
+ <documentation>
+ &lt;pre&gt;
+ &lt;extension point=&quot;org.eclipse.tcf.te.ui.viewers&quot;&gt;
+ &lt;viewer
+ autoExpandLevel=&quot;0&quot;
+ contentProvider=&quot;org.eclipse.tcf.te.tcf.filesystem.controls.FSTreeContentProvider&quot;
+ doubleClickCommand=&quot;org.eclipse.ui.navigator.Open&quot;
+ helpId=&quot;org.eclipse.tcf.te.tcf.filesystem.FSExplorerEditorPage&quot;
+ id=&quot;org.eclipse.tcf.te.ui.controls.viewer.fs&quot;
+ menuId=&quot;org.eclipse.tcf.te.ui.controls.menu.fs&quot;
+ persistent=&quot;true&quot;&gt;
+ &lt;creation&gt;
+ &lt;style name=&quot;SWT.FULL_SELECTION&quot; /&gt;
+ &lt;style name=&quot;SWT.MULTI&quot; /&gt;
+ &lt;/creation&gt;
+ &lt;dragSupport
+ class=&quot;org.eclipse.tcf.te.tcf.filesystem.internal.dnd.FSDragSourceListener&quot;&gt;
+ &lt;operations&gt;
+ &lt;operation name=&quot;DND.DROP_COPY&quot; /&gt;
+ &lt;operation name=&quot;DND.DROP_MOVE&quot; /&gt;
+ &lt;operation name=&quot;DND.DROP_LINK&quot; /&gt;
+ &lt;/operations&gt;
+ &lt;transferTypes&gt;
+ &lt;transferType name =&quot;LocalSelectionTransfer&quot; /&gt;
+ &lt;/transferTypes&gt;
+ &lt;/dragSupport&gt;
+ &lt;dropSupport
+ class=&quot;org.eclipse.tcf.te.tcf.filesystem.internal.dnd.FSDropTargetListener&quot;&gt;
+ &lt;operations&gt;
+ &lt;operation name=&quot;DND.DROP_COPY&quot; /&gt;
+ &lt;operation name=&quot;DND.DROP_MOVE&quot; /&gt;
+ &lt;operation name=&quot;DND.DROP_LINK&quot; /&gt;
+ &lt;/operations&gt;
+ &lt;transferTypes&gt;
+ &lt;transferType name =&quot;LocalSelectionTransfer&quot; /&gt;
+ &lt;/transferTypes&gt;
+ &lt;/dropSupport&gt;
+ &lt;/viewer&gt;
+ &lt;columnContribution viewerId=&quot;org.eclipse.tcf.te.ui.controls.viewer.fs&quot;&gt;
+ &lt;column
+ alignment=&quot;SWT.LEFT&quot;
+ comparator=&quot;org.eclipse.tcf.te.tcf.filesystem.internal.columns.FSTreeElementComparator&quot;
+ id=&quot;name&quot;
+ labelProvider=&quot;org.eclipse.tcf.te.tcf.filesystem.internal.columns.FSTreeElementLabelProvider&quot;
+ moveable=&quot;true&quot;
+ name=&quot;%column.name.name&quot;
+ resizable=&quot;true&quot;
+ style=&quot;SWT.LEFT&quot;
+ visible=&quot;true&quot;
+ width=&quot;300&quot;&gt;
+ &lt;/column&gt;
+ &lt;column
+ alignment=&quot;SWT.RIGHT&quot;
+ comparator=&quot;org.eclipse.tcf.te.tcf.filesystem.internal.columns.SizeComparator&quot;
+ id=&quot;size&quot;
+ labelProvider=&quot;org.eclipse.tcf.te.tcf.filesystem.internal.columns.SizeLabelProvider&quot;
+ moveable=&quot;true&quot;
+ name=&quot;%column.name.size&quot;
+ resizable=&quot;true&quot;
+ style=&quot;SWT.RIGHT&quot;
+ visible=&quot;true&quot;
+ width=&quot;100&quot;&gt;
+ &lt;/column&gt;
+ &lt;column
+ alignment=&quot;SWT.LEFT&quot;
+ comparator=&quot;org.eclipse.tcf.te.tcf.filesystem.internal.columns.FileTypeComparator&quot;
+ id=&quot;type&quot;
+ labelProvider=&quot;org.eclipse.tcf.te.tcf.filesystem.internal.columns.FileTypeLabelProvider&quot;
+ moveable=&quot;true&quot;
+ name=&quot;%column.name.type&quot;
+ resizable=&quot;true&quot;
+ style=&quot;SWT.LEFT&quot;
+ visible=&quot;false&quot;
+ width=&quot;100&quot;&gt;
+ &lt;/column&gt;
+ &lt;column
+ alignment=&quot;SWT.RIGHT&quot;
+ comparator=&quot;org.eclipse.tcf.te.tcf.filesystem.internal.columns.ModificationTimeComparator&quot;
+ id=&quot;modified&quot;
+ labelProvider=&quot;org.eclipse.tcf.te.tcf.filesystem.internal.columns.ModificationTimeLabelProvider&quot;
+ moveable=&quot;true&quot;
+ name=&quot;%column.name.modified&quot;
+ resizable=&quot;true&quot;
+ style=&quot;SWT.RIGHT&quot;
+ visible=&quot;true&quot;
+ width=&quot;120&quot;&gt;
+ &lt;/column&gt;
+ &lt;column
+ alignment=&quot;SWT.RIGHT&quot;
+ comparator=&quot;org.eclipse.tcf.te.tcf.filesystem.internal.columns.AccessTimeComparator&quot;
+ id=&quot;accessed&quot;
+ labelProvider=&quot;org.eclipse.tcf.te.tcf.filesystem.internal.columns.AccessTimeLabelProvider&quot;
+ moveable=&quot;true&quot;
+ name=&quot;%column.name.accessed&quot;
+ resizable=&quot;true&quot;
+ style=&quot;SWT.RIGHT&quot;
+ visible=&quot;false&quot;
+ width=&quot;120&quot;&gt;
+ &lt;/column&gt;
+ &lt;/columnContribution&gt;
+
+ &lt;filterContribution viewerId=&quot;org.eclipse.tcf.te.ui.controls.viewer.fs&quot;&gt;
+ &lt;filter
+ class=&quot;org.eclipse.tcf.te.tcf.filesystem.filters.HiddenFilesViewerFilter&quot;
+ description=&quot;%filter.description.hidden&quot;
+ enabled=&quot;true&quot;
+ id=&quot;org.eclipse.tcf.te.tcf.filesystem.filters.hiddenFiles&quot;
+ image=&quot;icons/obj16/hidden_file_filter.png&quot;
+ name=&quot;%filter.name.hidden&quot;&gt;
+ &lt;/filter&gt;
+ &lt;filter
+ class=&quot;org.eclipse.tcf.te.tcf.filesystem.filters.SystemFilesViewerFilter&quot;
+ description=&quot;%filter.description.system&quot;
+ enabled=&quot;true&quot;
+ id=&quot;org.eclipse.tcf.te.tcf.filesystem.filters.systemFiles&quot;
+ image=&quot;icons/obj16/system_file_filter.png&quot;
+ name=&quot;%filter.name.system&quot;&gt;
+ &lt;activation&gt;
+ &lt;with variable=&quot;input&quot;&gt;
+ &lt;test property=&quot;org.eclipse.tcf.te.tcf.filesystem.propertytester.peer.isWindows&quot;/&gt;
+ &lt;/with&gt;
+ &lt;/activation&gt;
+ &lt;/filter&gt;
+ &lt;/filterContribution&gt;
+ &lt;/extension&gt;
+&lt;/pre&gt;
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="apiinfo"/>
+ </appinfo>
+ <documentation>
+ &lt;p&gt;
+In the &quot;column&quot; element, the class referenced by the attribute &quot;labelProvider&quot; must implement &lt;samp&gt;org.eclipse.jface.viewers.ILabelProvider&lt;/samp&gt;. The class referenced by the attribute &quot;comparator&quot; must implement &lt;samp&gt;java.util.Comparator&lt;/samp&gt; that compares the elements of the tree viewer.
+&lt;p&gt;
+In the &quot;filter&quot; element, the class referenced by the attribute &quot;class&quot; must extend &lt;samp&gt;org.eclipse.jface.viewers.ViewerFilter&lt;/samp&gt;.
+&lt;p&gt;
+In the &quot;activation&quot; element, the evaluation context has only one variable &quot;input&quot;, which stores the current input object of the viewer.
+ </documentation>
+ </annotation>
+
+
+ <annotation>
+ <appinfo>
+ <meta.section type="copyright"/>
+ </appinfo>
+ <documentation>
+ Copyright (c) 2011 Wind River Systems, Inc. and others.
+
+All rights reserved.
+
+This program and the accompanying materials are made available under the terms
+of the Eclipse Public License v1.0 which accompanies this distribution, and is
+available at http://www.eclipse.org/legal/epl-v10.html.
+ </documentation>
+ </annotation>
+
+</schema>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/schema/wizardProviders.exsd b/target_explorer/plugins/org.eclipse.tcf.te.ui/schema/wizardProviders.exsd
new file mode 100644
index 000000000..c65cf8778
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/schema/wizardProviders.exsd
@@ -0,0 +1,109 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.tcf.te.ui" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appinfo>
+ <meta.schema plugin="org.eclipse.tcf.te.ui" id="wizardProvider" name="New Wizard Providers"/>
+ </appinfo>
+ <documentation>
+ This extension point is used to contribute new wizard providers. New wizard providers allow a more dynamic contribution than via the &quot;org.eclipse.tcf.te.ui.newWizards&quot; extension point.
+ </documentation>
+ </annotation>
+
+ <include schemaLocation="schema://org.eclipse.core.expressions/schema/expressionLanguage.exsd"/>
+
+ <element name="extension">
+ <annotation>
+ <appinfo>
+ <meta.element />
+ </appinfo>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element ref="wizardProvider" minOccurs="1" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+ a fully qualified identifier of the target extension point
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+ an optional identifier of the extension instance
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+ an optional name of the extension instance
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="wizardProvider">
+ <complexType>
+ <attribute name="class" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn=":org.eclipse.tcf.te.ui.wizards.interfaces.INewWizardProvider"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="since"/>
+ </appinfo>
+ <documentation>
+ Target Explorer 1.0.0
+ </documentation>
+ </annotation>
+
+
+ <annotation>
+ <appinfo>
+ <meta.section type="apiinfo"/>
+ </appinfo>
+ <documentation>
+ The provider of a new wizard provider must implement &lt;samp&gt;org.eclipse.tcf.te.ui.wizards.interfaces.INewWizardProvider&lt;/samp&gt;.
+ </documentation>
+ </annotation>
+
+
+ <annotation>
+ <appinfo>
+ <meta.section type="copyright"/>
+ </appinfo>
+ <documentation>
+ Copyright (c) 2012 Wind River Systems, Inc. and others.
+
+All rights reserved.
+
+This program and the accompanying materials are made available under the terms
+of the Eclipse Public License v1.0 which accompanies this distribution, and is
+available at http://www.eclipse.org/legal/epl-v10.html.
+ </documentation>
+ </annotation>
+
+</schema>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/AbstractViewerComparator.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/AbstractViewerComparator.java
index 0bb267de5..d15212989 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/AbstractViewerComparator.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/AbstractViewerComparator.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui;
+package org.eclipse.tcf.te.ui;
import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.viewers.Viewer;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/WorkbenchPartControl.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/WorkbenchPartControl.java
index d8ac276d1..a205cc449 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/WorkbenchPartControl.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/WorkbenchPartControl.java
@@ -7,13 +7,13 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui;
+package org.eclipse.tcf.te.ui;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.PlatformObject;
import org.eclipse.swt.widgets.Composite;
-import org.eclipse.tm.te.ui.activator.UIPlugin;
-import org.eclipse.tm.te.ui.forms.CustomFormToolkit;
+import org.eclipse.tcf.te.ui.activator.UIPlugin;
+import org.eclipse.tcf.te.ui.forms.CustomFormToolkit;
import org.eclipse.ui.ISelectionService;
import org.eclipse.ui.IWorkbenchPart;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/activator/UIPlugin.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/activator/UIPlugin.java
index 6678ede6e..4971e7e5e 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/activator/UIPlugin.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/activator/UIPlugin.java
@@ -7,15 +7,16 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.activator;
+package org.eclipse.tcf.te.ui.activator;
import java.net.URL;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.swt.graphics.Image;
-import org.eclipse.tm.te.runtime.tracing.TraceHandler;
-import org.eclipse.tm.te.ui.interfaces.ImageConsts;
+import org.eclipse.tcf.te.runtime.tracing.TraceHandler;
+import org.eclipse.tcf.te.ui.interfaces.ImageConsts;
+import org.eclipse.tcf.te.ui.trees.ViewerStateManager;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
@@ -72,6 +73,8 @@ public class UIPlugin extends AbstractUIPlugin {
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
+ // Load the tree viewer's state.
+ ViewerStateManager.getInstance().loadViewerStates();
}
/* (non-Javadoc)
@@ -79,6 +82,8 @@ public class UIPlugin extends AbstractUIPlugin {
*/
@Override
public void stop(BundleContext context) throws Exception {
+ // Save the tree viewer's state.
+ ViewerStateManager.getInstance().storeViewerStates();
plugin = null;
super.stop(context);
}
@@ -95,6 +100,12 @@ public class UIPlugin extends AbstractUIPlugin {
registry.put(ImageConsts.NEW_TARGET_WIZARD_DISABLED, ImageDescriptor.createFromURL(url));
url = UIPlugin.getDefault().getBundle().getEntry(ImageConsts.IMAGE_DIR_ROOT + ImageConsts.IMAGE_DIR_ELCL + "newtarget_wiz.gif"); //$NON-NLS-1$
registry.put(ImageConsts.NEW_TARGET_WIZARD_ENABLED, ImageDescriptor.createFromURL(url));
+ url = UIPlugin.getDefault().getBundle().getEntry(ImageConsts.IMAGE_DIR_ROOT + ImageConsts.IMAGE_DIR_DLCL + "filter_ps.gif"); //$NON-NLS-1$
+ registry.put(ImageConsts.VIEWER_FILTER_CONFIG_DISABLED, ImageDescriptor.createFromURL(url));
+ url = UIPlugin.getDefault().getBundle().getEntry(ImageConsts.IMAGE_DIR_ROOT + ImageConsts.IMAGE_DIR_ELCL + "filter_ps.gif"); //$NON-NLS-1$
+ registry.put(ImageConsts.VIEWER_FILTER_CONFIG_ENABLED, ImageDescriptor.createFromURL(url));
+ url = UIPlugin.getDefault().getBundle().getEntry(ImageConsts.IMAGE_DIR_ROOT + ImageConsts.IMAGE_DIR_ELCL + "help.gif"); //$NON-NLS-1$
+ registry.put(ImageConsts.VIEWER_HELP, ImageDescriptor.createFromURL(url));
url = UIPlugin.getDefault().getBundle().getEntry(ImageConsts.IMAGE_DIR_ROOT + ImageConsts.IMAGE_DIR_OVR + "gold_ovr.gif"); //$NON-NLS-1$
registry.put(ImageConsts.GOLD_OVR, ImageDescriptor.createFromURL(url));
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/dialogs/NameValuePairDialog.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/dialogs/NameValuePairDialog.java
index 4ce423367..8620c26ed 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/dialogs/NameValuePairDialog.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/dialogs/NameValuePairDialog.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.dialogs;
+package org.eclipse.tcf.te.ui.dialogs;
import java.util.Set;
@@ -25,10 +25,10 @@ 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.tm.te.ui.interfaces.IContextHelpIds;
-import org.eclipse.tm.te.ui.jface.dialogs.CustomTitleAreaDialog;
-import org.eclipse.tm.te.ui.nls.Messages;
-import org.eclipse.tm.te.ui.swt.SWTControlUtil;
+import org.eclipse.tcf.te.ui.interfaces.IContextHelpIds;
+import org.eclipse.tcf.te.ui.nls.Messages;
+import org.eclipse.tcf.te.ui.jface.dialogs.CustomTitleAreaDialog;
+import org.eclipse.tcf.te.ui.swt.SWTControlUtil;
/**
* Dialog implementation allowing to enter the data for name/value pairs.
@@ -78,7 +78,7 @@ public class NameValuePairDialog extends CustomTitleAreaDialog {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.jface.dialogs.CustomTitleAreaDialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+ * @see org.eclipse.tcf.te.ui.jface.dialogs.CustomTitleAreaDialog#createDialogArea(org.eclipse.swt.widgets.Composite)
*/
@Override
protected Control createDialogArea(Composite parent) {
@@ -136,7 +136,7 @@ public class NameValuePairDialog extends CustomTitleAreaDialog {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.jface.dialogs.CustomTitleAreaDialog#create()
+ * @see org.eclipse.tcf.te.ui.jface.dialogs.CustomTitleAreaDialog#create()
*/
@Override
public void create() {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/dialogs/RenameDialog.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/dialogs/RenameDialog.java
index 55787f940..5690fee4a 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/dialogs/RenameDialog.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/dialogs/RenameDialog.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.dialogs;
+package org.eclipse.tcf.te.ui.dialogs;
import java.util.ArrayList;
import java.util.Arrays;
@@ -24,7 +24,7 @@ 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.tm.te.ui.jface.dialogs.CustomTitleAreaDialog;
+import org.eclipse.tcf.te.ui.jface.dialogs.CustomTitleAreaDialog;
/**
* Rename dialog implementation.
@@ -73,7 +73,7 @@ public class RenameDialog extends CustomTitleAreaDialog {
}
/*(non-Javadoc)
- * @see org.eclipse.tm.te.ui.dialogs.CustomTitleAreaDialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+ * @see org.eclipse.tcf.te.ui.dialogs.CustomTitleAreaDialog#createDialogArea(org.eclipse.swt.widgets.Composite)
*/
@Override
protected Control createDialogArea(Composite parent) {
@@ -125,7 +125,7 @@ public class RenameDialog extends CustomTitleAreaDialog {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.dialogs.CustomTitleAreaDialog#okPressed()
+ * @see org.eclipse.tcf.te.ui.dialogs.CustomTitleAreaDialog#okPressed()
*/
@Override
protected void okPressed() {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/events/AbstractEventListener.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/events/AbstractEventListener.java
index a50e03bee..8a98c9af3 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/events/AbstractEventListener.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/events/AbstractEventListener.java
@@ -7,12 +7,12 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.events;
+package org.eclipse.tcf.te.ui.events;
import org.eclipse.swt.widgets.Display;
-import org.eclipse.tm.te.runtime.interfaces.events.IEventFireDelegate;
-import org.eclipse.tm.te.runtime.interfaces.events.IEventListener;
-import org.eclipse.tm.te.ui.swt.DisplayUtil;
+import org.eclipse.tcf.te.runtime.interfaces.events.IEventFireDelegate;
+import org.eclipse.tcf.te.runtime.interfaces.events.IEventListener;
+import org.eclipse.tcf.te.ui.swt.DisplayUtil;
import org.eclipse.ui.PlatformUI;
/**
@@ -22,7 +22,7 @@ import org.eclipse.ui.PlatformUI;
public abstract class AbstractEventListener implements IEventListener, IEventFireDelegate {
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.events.IEventFireDelegate#fire(java.lang.Runnable)
+ * @see org.eclipse.tcf.te.runtime.interfaces.events.IEventFireDelegate#fire(java.lang.Runnable)
*/
@Override
public void fire(Runnable runnable) {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/interfaces/IContextHelpIds.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/interfaces/IContextHelpIds.java
index cffe666bd..33eb7e6fc 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/interfaces/IContextHelpIds.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/interfaces/IContextHelpIds.java
@@ -7,9 +7,9 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.interfaces;
+package org.eclipse.tcf.te.ui.interfaces;
-import org.eclipse.tm.te.ui.activator.UIPlugin;
+import org.eclipse.tcf.te.ui.activator.UIPlugin;
/**
* Context help id definitions.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/interfaces/IUIConstants.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/interfaces/IUIConstants.java
index 13cd8e7ba..a089d4fe9 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/interfaces/IUIConstants.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/interfaces/IUIConstants.java
@@ -7,9 +7,9 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.interfaces;
+package org.eclipse.tcf.te.ui.interfaces;
-import org.eclipse.tm.te.ui.activator.UIPlugin;
+import org.eclipse.tcf.te.ui.activator.UIPlugin;
/**
* Common UI constants.
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/interfaces/IViewerCellEditorFactory.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/interfaces/IViewerCellEditorFactory.java
new file mode 100644
index 000000000..5ba3c2c32
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/interfaces/IViewerCellEditorFactory.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.interfaces;
+
+import org.eclipse.jface.viewers.CellEditor;
+import org.eclipse.jface.viewers.ICellModifier;
+import org.eclipse.jface.viewers.TreeViewer;
+
+/**
+ * An interface to provide the cell editing support for Target Explorer in an abstract way.
+ * <p>
+ * This interface should be implemented by classes that wish to add cell editing support to Target
+ * Explorer when it is created.
+ */
+public interface IViewerCellEditorFactory {
+ /**
+ * Initialize this cell editor factory with the tree viewer that is used as the common viewer in
+ * Target Explorer.
+ *
+ * @param viewer The tree viewer in Target Explorer.
+ */
+ void init(TreeViewer viewer);
+
+ /**
+ * Returns the column properties of the viewer. The properties must correspond with the columns
+ * of the table control. They are used to identify the column in a cell modifier.
+ *
+ * @return the list of column properties
+ * @see org.eclipse.jface.viewers.ColumnViewer#getColumnProperties
+ * @see org.eclipse.jface.viewers.ColumnViewer#setColumnProperties
+ */
+ String[] getColumnProperties();
+
+ /**
+ * Return the CellEditors for the viewer, or <code>null</code> if no cell editors are set.
+ *
+ * @return CellEditor[]
+ * @see org.eclipse.jface.viewers.ColumnViewer#getCellEditors
+ * @see org.eclipse.jface.viewers.ColumnViewer#setCellEditors
+ */
+ CellEditor[] getCellEditors();
+
+ /**
+ * Returns the cell modifier of this viewer, or <code>null</code> if none has been set.
+ *
+ * @return the cell modifier, or <code>null</code>
+ * @see org.eclipse.jface.viewers.ColumnViewer#getCellModifier
+ * @see org.eclipse.jface.viewers.ColumnViewer#setCellModifier
+ */
+ ICellModifier getCellModifier();
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/interfaces/IViewerInput.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/interfaces/IViewerInput.java
new file mode 100644
index 000000000..30af22d9f
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/interfaces/IViewerInput.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.interfaces;
+
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.util.PropertyChangeEvent;
+
+/**
+ * A viewer input is an input of the AbstractTreeControl.
+ * It triggers a property change event when one of its properties
+ * has changed. It has two methods,
+ * addPropertyChangeListener and removePropertyChangeListener to add
+ * and remove property change listeners which are interested in the property
+ * change.
+ * <p>
+ * If the input of AbstractTreeControl is an instance of or adapted to IPropertyChangeProvider,
+ * AbstractTreeControl adds a property change listener to the input and update
+ * its UI including the tree viewer and the tool bar when the properties of the input
+ * have changed.
+ *
+ * @see AbstractTreeControl
+ */
+public interface IViewerInput {
+
+ /**
+ * Get the id of the input used to persist the state of the tree viewer
+ * as the persistence id.
+ */
+ String getInputId();
+ /**
+ * Add a property change listener to the provider. When this listener
+ * is already added, then it will not be added again.
+ *
+ * @param listener The property change listener
+ */
+ void addPropertyChangeListener(IPropertyChangeListener listener);
+
+ /**
+ * Remove a property change listener from the provider if it is already
+ * added to provider.
+ *
+ * @param listener The property change listener
+ */
+ void removePropertyChangeListener(IPropertyChangeListener listener);
+
+ /**
+ * Fire the property change event to the property change listeners
+ * of the provider.
+ *
+ * @param event the property change event.
+ */
+ void firePropertyChange(PropertyChangeEvent event);
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/interfaces/ImageConsts.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/interfaces/ImageConsts.java
index eb20e9a1d..c67be1449 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/interfaces/ImageConsts.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/interfaces/ImageConsts.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.interfaces;
+package org.eclipse.tcf.te.ui.interfaces;
/**
* Image registry constants.
@@ -64,6 +64,21 @@ public interface ImageConsts {
public static final String NEW_TARGET_WIZARD_DISABLED = "NewTargetWizard_disabled"; //$NON-NLS-1$
/**
+ * The key to access the viewer filter configuration image (enabled).
+ */
+ public static final String VIEWER_FILTER_CONFIG_ENABLED = "ViewerFilterConfig_enabled"; //$NON-NLS-1$
+
+ /**
+ * The key to access the viewer filter configuration image (disabled).
+ */
+ public static final String VIEWER_FILTER_CONFIG_DISABLED = "ViewerFilterConfig_disabled"; //$NON-NLS-1$
+
+ /**
+ * The key to access the viewer help image.
+ */
+ public static final String VIEWER_HELP = "ViewerHelp"; //$NON-NLS-1$
+
+ /**
* The key to access the target object gold overlay image.
*/
public static final String GOLD_OVR = "GoldOverlay"; //$NON-NLS-1$
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/interfaces/data/IDataExchangeNode.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/interfaces/data/IDataExchangeNode.java
new file mode 100644
index 000000000..c02fdb58b
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/interfaces/data/IDataExchangeNode.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.interfaces.data;
+
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+
+/**
+ * Public interface for wizard or dialog pages, panel, controls or other UI elements
+ * exchanging data via a shared data object.
+ */
+public interface IDataExchangeNode {
+
+ /**
+ * Initialize the widgets based of the data from the given properties container.
+ * <p>
+ * This method may called multiple times during the lifetime of the node and the given
+ * properties container might be even <code>null</code>.
+ *
+ * @param data The properties container or <code>null</code>.
+ */
+ public void setupData(IPropertiesContainer data);
+
+ /**
+ * Extract the data from the widgets and write it back to the given properties container.
+ * <p>
+ * This method may called multiple times during the lifetime of the node and the given
+ * properties container might be even <code>null</code>.
+ *
+ * @param data The properties container or <code>null</code>.
+ */
+ public void extractData(IPropertiesContainer data);
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/interfaces/data/IDataExchangeNode2.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/interfaces/data/IDataExchangeNode2.java
new file mode 100644
index 000000000..74b59ec5a
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/interfaces/data/IDataExchangeNode2.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.interfaces.data;
+
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+
+/**
+ * Public interface for wizard or dialog pages, panel, controls or other UI elements
+ * exchanging data via a shared data object.
+ */
+public interface IDataExchangeNode2 extends IDataExchangeNode {
+
+ /**
+ * Initialize the given properties container with default values for the data this node is
+ * managing.
+ * <p>
+ * This method is called once for each handler. The widgets are typically not yet created as
+ * this method can be called before the node is set visible.
+ *
+ * @param data The properties container or <code>null</code>.
+ */
+ public void initializeData(IPropertiesContainer data);
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/interfaces/data/IDataExchangeNode3.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/interfaces/data/IDataExchangeNode3.java
new file mode 100644
index 000000000..ab776e023
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/interfaces/data/IDataExchangeNode3.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.interfaces.data;
+
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+
+/**
+ * Public interface for wizard or dialog pages, panel, controls or other UI elements
+ * exchanging data via a shared data object.
+ */
+public interface IDataExchangeNode3 extends IDataExchangeNode2 {
+
+ /**
+ * Remove the data the node is managing from the given properties container.
+ * <p>
+ * This method may called multiple times during the lifetime of the node and the given
+ * properties container might be even <code>null</code>.
+ *
+ * @param data The properties container or <code>null</code>.
+ */
+ public void removeData(IPropertiesContainer data);
+
+ /**
+ * Copy the data the node is managing from the given source properties container
+ * to the given destination properties container.
+ *
+ * @param src The source properties container. Must not be <code>null</code>.
+ * @param dst The destination properties. Must not be <code>null/code>.
+ */
+ public void copyData(IPropertiesContainer src, IPropertiesContainer dst);
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/internal/executors/SWTDisplayExecutor.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/internal/executors/SWTDisplayExecutor.java
index 120421a4c..e92f86380 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/internal/executors/SWTDisplayExecutor.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/internal/executors/SWTDisplayExecutor.java
@@ -7,14 +7,14 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.internal.executors;
+package org.eclipse.tcf.te.ui.internal.executors;
import org.eclipse.swt.widgets.Display;
-import org.eclipse.tm.te.runtime.concurrent.interfaces.IExecutor;
-import org.eclipse.tm.te.runtime.concurrent.interfaces.INestableExecutor;
-import org.eclipse.tm.te.runtime.concurrent.interfaces.ISingleThreadedExecutor;
-import org.eclipse.tm.te.runtime.extensions.ExecutableExtension;
-import org.eclipse.tm.te.ui.activator.UIPlugin;
+import org.eclipse.tcf.te.ui.activator.UIPlugin;
+import org.eclipse.tcf.te.runtime.concurrent.interfaces.IExecutor;
+import org.eclipse.tcf.te.runtime.concurrent.interfaces.INestableExecutor;
+import org.eclipse.tcf.te.runtime.concurrent.interfaces.ISingleThreadedExecutor;
+import org.eclipse.tcf.te.runtime.extensions.ExecutableExtension;
import org.eclipse.ui.PlatformUI;
/**
@@ -48,7 +48,7 @@ public class SWTDisplayExecutor extends ExecutableExtension implements IExecutor
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.concurrent.interfaces.ISingleThreadedExecutor#isExecutorThread()
+ * @see org.eclipse.tcf.te.runtime.concurrent.interfaces.ISingleThreadedExecutor#isExecutorThread()
*/
@Override
public boolean isExecutorThread() {
@@ -56,7 +56,7 @@ public class SWTDisplayExecutor extends ExecutableExtension implements IExecutor
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.concurrent.interfaces.ISingleThreadedExecutor#isExecutorThread(java.lang.Thread)
+ * @see org.eclipse.tcf.te.runtime.concurrent.interfaces.ISingleThreadedExecutor#isExecutorThread(java.lang.Thread)
*/
@Override
public boolean isExecutorThread(Thread thread) {
@@ -78,7 +78,7 @@ public class SWTDisplayExecutor extends ExecutableExtension implements IExecutor
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.concurrent.interfaces.INestableExecutor#getMaxDepth()
+ * @see org.eclipse.tcf.te.runtime.concurrent.interfaces.INestableExecutor#getMaxDepth()
*/
@Override
public int getMaxDepth() {
@@ -86,7 +86,7 @@ public class SWTDisplayExecutor extends ExecutableExtension implements IExecutor
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.concurrent.interfaces.INestableExecutor#readAndExecute()
+ * @see org.eclipse.tcf.te.runtime.concurrent.interfaces.INestableExecutor#readAndExecute()
*/
@Override
public boolean readAndExecute() {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/internal/executors/SWTDisplayExecutorUtilDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/internal/executors/SWTDisplayExecutorUtilDelegate.java
index d456aa42c..1fe8bdd61 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/internal/executors/SWTDisplayExecutorUtilDelegate.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/internal/executors/SWTDisplayExecutorUtilDelegate.java
@@ -7,11 +7,11 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.internal.executors;
+package org.eclipse.tcf.te.ui.internal.executors;
import org.eclipse.swt.widgets.Display;
-import org.eclipse.tm.te.runtime.concurrent.interfaces.IExecutorUtilDelegate;
-import org.eclipse.tm.te.runtime.extensions.ExecutableExtension;
+import org.eclipse.tcf.te.runtime.concurrent.interfaces.IExecutorUtilDelegate;
+import org.eclipse.tcf.te.runtime.extensions.ExecutableExtension;
/**
* SWT display executor utility delegate implementation.
@@ -19,7 +19,7 @@ import org.eclipse.tm.te.runtime.extensions.ExecutableExtension;
public class SWTDisplayExecutorUtilDelegate extends ExecutableExtension implements IExecutorUtilDelegate {
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.concurrent.interfaces.IExecutorUtilDelegate#isHandledExecutorThread()
+ * @see org.eclipse.tcf.te.runtime.concurrent.interfaces.IExecutorUtilDelegate#isHandledExecutorThread()
*/
@Override
public boolean isHandledExecutorThread() {
@@ -27,7 +27,7 @@ public class SWTDisplayExecutorUtilDelegate extends ExecutableExtension implemen
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.concurrent.interfaces.IExecutorUtilDelegate#readAndDispatch()
+ * @see org.eclipse.tcf.te.runtime.concurrent.interfaces.IExecutorUtilDelegate#readAndDispatch()
*/
@Override
public boolean readAndDispatch() {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/nls/Messages.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/nls/Messages.java
index 4c9e03699..5bbc41364 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/nls/Messages.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/nls/Messages.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.nls;
+package org.eclipse.tcf.te.ui.nls;
import org.eclipse.osgi.util.NLS;
@@ -17,7 +17,7 @@ import org.eclipse.osgi.util.NLS;
public class Messages extends NLS {
// The plug-in resource bundle name
- private static final String BUNDLE_NAME = "org.eclipse.tm.te.ui.nls.Messages"; //$NON-NLS-1$
+ private static final String BUNDLE_NAME = "org.eclipse.tcf.te.ui.nls.Messages"; //$NON-NLS-1$
/**
* Static constructor.
@@ -29,6 +29,14 @@ public class Messages extends NLS {
// **** Declare externalized string id's down here *****
+ public static String AbstractTreeControl_HelpTooltip;
+
+ public static String ConfigFilterAction_PromptMessage;
+
+ public static String ConfigFilterAction_Title;
+
+ public static String ConfigFilterAction_TooltipText;
+
public static String NewWizard_dialog_title;
public static String NewWizardSelectionPage_title;
@@ -36,6 +44,8 @@ public class Messages extends NLS {
public static String NewWizardSelectionPage_wizards;
public static String NewWizardSelectionPage_createWizardFailed;
+ public static String NewWizardViewerFilter_error_evaluationFailed;
+
public static String NodePropertiesTableControl_section_title;
public static String NodePropertiesTableControl_section_title_noSelection;
public static String NodePropertiesTableControl_column_name_label;
@@ -54,4 +64,6 @@ public class Messages extends NLS {
public static String NameValuePairDialog_missingName_error;
public static String NameValuePairDialog_missingValue_error;
public static String NameValuePairDialog_usedOrIllegalName_error;
+
+ public static String PreferencePage_label;
}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/nls/Messages.properties b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/nls/Messages.properties
index 5ddd069a3..e537e0780 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/nls/Messages.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/nls/Messages.properties
@@ -1,17 +1,23 @@
+AbstractTreeControl_HelpTooltip=Help
+ConfigFilterAction_Title=Configure Viewer Filters
+ConfigFilterAction_TooltipText=Configure Viewer Filters
#
-# org.eclipse.tm.te.ui
+# org.eclipse.tcf.te.ui
# Externalized Strings.
#
# ***** Wizards *****
-NewWizard_dialog_title=New Target
+ConfigFilterAction_PromptMessage=Select the filters to apply (matching items will be hidden):
+NewWizard_dialog_title=New
-NewWizardSelectionPage_title=Select a target wizard
-NewWizardSelectionPage_description=Please select the target creation wizard matching the target to connect to.
+NewWizardSelectionPage_title=Select a wizard
+NewWizardSelectionPage_description=Please select the wizard which will create the desired object.
NewWizardSelectionPage_wizards=Wizards:
NewWizardSelectionPage_createWizardFailed=The selected wizard could not be started.
+NewWizardViewerFilter_error_evaluationFailed=New wizard enablement expression evaluation failed. Possible cause: {0}
+
# ***** Controls *****
NodePropertiesTableControl_section_title={0} Information
@@ -34,3 +40,7 @@ DefaultStatusHandler_toggleMessage_doNotShowAgain=Do not show this dialog again.
NameValuePairDialog_missingName_error=Please enter a name.
NameValuePairDialog_missingValue_error=Please enter a value for ''{0}''.
NameValuePairDialog_usedOrIllegalName_error=The name ''{0}'' is reserved or already in use.
+
+# ***** Preference Pages *****
+
+PreferencePage_label=General settings for Target Explorer:
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/preferences/PreferencePage.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/preferences/PreferencePage.java
new file mode 100644
index 000000000..705157487
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/preferences/PreferencePage.java
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.preferences;
+
+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.tcf.te.ui.nls.Messages;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+
+/**
+ * Target Explorer top preference page implementation.
+ */
+public class PreferencePage extends org.eclipse.jface.preference.PreferencePage implements IWorkbenchPreferencePage {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
+ */
+ @Override
+ public void init(IWorkbench workbench) {
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite)
+ */
+ @Override
+ protected Control createContents(Composite parent) {
+ Composite panel = new Composite(parent, SWT.NONE);
+ panel.setLayout(new GridLayout());
+ panel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+
+ Label label = new Label(panel, SWT.HORIZONTAL);
+ label.setText(Messages.PreferencePage_label);
+ label.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+
+ return panel;
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/statushandler/DefaultStatusHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/statushandler/DefaultStatusHandler.java
index c87c62037..176d92535 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/statushandler/DefaultStatusHandler.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/statushandler/DefaultStatusHandler.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.statushandler;
+package org.eclipse.tcf.te.ui.statushandler;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IStatus;
@@ -15,14 +15,14 @@ import org.eclipse.core.runtime.Status;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer;
-import org.eclipse.tm.te.runtime.properties.PropertiesContainer;
-import org.eclipse.tm.te.runtime.statushandler.AbstractStatusHandler;
-import org.eclipse.tm.te.runtime.statushandler.interfaces.IStatusHandlerConstants;
-import org.eclipse.tm.te.runtime.utils.Host;
-import org.eclipse.tm.te.ui.activator.UIPlugin;
-import org.eclipse.tm.te.ui.jface.dialogs.OptionalMessageDialog;
-import org.eclipse.tm.te.ui.nls.Messages;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.runtime.properties.PropertiesContainer;
+import org.eclipse.tcf.te.runtime.statushandler.AbstractStatusHandler;
+import org.eclipse.tcf.te.runtime.statushandler.interfaces.IStatusHandlerConstants;
+import org.eclipse.tcf.te.runtime.utils.Host;
+import org.eclipse.tcf.te.ui.activator.UIPlugin;
+import org.eclipse.tcf.te.ui.jface.dialogs.OptionalMessageDialog;
+import org.eclipse.tcf.te.ui.nls.Messages;
import org.eclipse.ui.PlatformUI;
/**
@@ -39,7 +39,7 @@ public class DefaultStatusHandler extends AbstractStatusHandler {
protected final static String INFORMATION_TITLE = Messages.DefaultStatusHandler_information_title;
/* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.statushandler.interfaces.IStatusHandler#handleStatus(org.eclipse.core.runtime.IStatus, org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer, org.eclipse.tm.te.runtime.statushandler.interfaces.IStatusHandler.DoneHandleStatus)
+ * @see org.eclipse.tcf.te.runtime.statushandler.interfaces.IStatusHandler#handleStatus(org.eclipse.core.runtime.IStatus, org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer, org.eclipse.tcf.te.runtime.statushandler.interfaces.IStatusHandler.DoneHandleStatus)
*/
@Override
public void handleStatus(final IStatus status, final IPropertiesContainer data, final DoneHandleStatus done) {
@@ -79,11 +79,10 @@ public class DefaultStatusHandler extends AbstractStatusHandler {
*
* @param status The status. Must not be <code>null</code>.
* @param data The custom status data object, or <code>null</code> if none.
- * @param done The callback. Must not be <code>null</code>.
+ * @param done The callback, or <code>null</code>.
*/
protected void doHandleStatus(IStatus status, IPropertiesContainer data, DoneHandleStatus done) {
Assert.isNotNull(status);
- Assert.isNotNull(done);
Assert.isTrue(Thread.currentThread().equals(PlatformUI.getWorkbench().getDisplay().getThread()));
Object result = null;
@@ -180,7 +179,7 @@ public class DefaultStatusHandler extends AbstractStatusHandler {
error = e;
} finally {
// Invoke the callback
- done.doneHandleStatus(error, data);
+ if (done != null) done.doneHandleStatus(error, data);
}
return;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/tables/TableViewerComparator.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/tables/TableViewerComparator.java
index e3b3f5264..cb5bebcbf 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/tables/TableViewerComparator.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/tables/TableViewerComparator.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.tables;
+package org.eclipse.tcf.te.ui.tables;
import java.util.Arrays;
@@ -18,7 +18,7 @@ import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Table;
-import org.eclipse.tm.te.ui.AbstractViewerComparator;
+import org.eclipse.tcf.te.ui.AbstractViewerComparator;
/**
@@ -40,7 +40,7 @@ public class TableViewerComparator extends AbstractViewerComparator {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.AbstractViewerComparator#doDetermineInverter(org.eclipse.jface.viewers.Viewer)
+ * @see org.eclipse.tcf.te.ui.controls.AbstractViewerComparator#doDetermineInverter(org.eclipse.jface.viewers.Viewer)
*/
@Override
protected int doDetermineInverter(Viewer viewer) {
@@ -56,7 +56,7 @@ public class TableViewerComparator extends AbstractViewerComparator {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.AbstractViewerComparator#doGetText(java.lang.Object, int)
+ * @see org.eclipse.tcf.te.ui.controls.AbstractViewerComparator#doGetText(java.lang.Object, int)
*/
@Override
protected String doGetText(Object node, int index) {
@@ -67,7 +67,7 @@ public class TableViewerComparator extends AbstractViewerComparator {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.AbstractViewerComparator#doGetSortColumnLabel(org.eclipse.jface.viewers.Viewer)
+ * @see org.eclipse.tcf.te.ui.controls.AbstractViewerComparator#doGetSortColumnLabel(org.eclipse.jface.viewers.Viewer)
*/
@Override
protected String doGetSortColumnLabel(Viewer viewer) {
@@ -80,7 +80,7 @@ public class TableViewerComparator extends AbstractViewerComparator {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.AbstractViewerComparator#doGetSortColumnIndex(org.eclipse.jface.viewers.Viewer)
+ * @see org.eclipse.tcf.te.ui.controls.AbstractViewerComparator#doGetSortColumnIndex(org.eclipse.jface.viewers.Viewer)
*/
@Override
protected int doGetSortColumnIndex(Viewer viewer) {
@@ -93,7 +93,7 @@ public class TableViewerComparator extends AbstractViewerComparator {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.AbstractViewerComparator#doCompare(java.lang.Object, java.lang.Object, java.lang.String, int, int)
+ * @see org.eclipse.tcf.te.ui.controls.AbstractViewerComparator#doCompare(java.lang.Object, java.lang.Object, java.lang.String, int, int)
*/
@Override
protected int doCompare(Object node1, Object node2, String sortColumn, int index, int inverter) {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/tables/properties/NodePropertiesTableControl.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/tables/properties/NodePropertiesTableControl.java
index 0c69b77b7..1de64c627 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/tables/properties/NodePropertiesTableControl.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/tables/properties/NodePropertiesTableControl.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.tables.properties;
+package org.eclipse.tcf.te.ui.tables.properties;
import java.util.LinkedHashMap;
import java.util.Map;
@@ -38,10 +38,10 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.swt.widgets.ToolBar;
-import org.eclipse.tm.te.ui.WorkbenchPartControl;
-import org.eclipse.tm.te.ui.forms.CustomFormToolkit;
-import org.eclipse.tm.te.ui.interfaces.IUIConstants;
-import org.eclipse.tm.te.ui.nls.Messages;
+import org.eclipse.tcf.te.ui.WorkbenchPartControl;
+import org.eclipse.tcf.te.ui.interfaces.IUIConstants;
+import org.eclipse.tcf.te.ui.nls.Messages;
+import org.eclipse.tcf.te.ui.forms.CustomFormToolkit;
import org.eclipse.ui.ISelectionListener;
import org.eclipse.ui.IWorkbenchActionConstants;
import org.eclipse.ui.IWorkbenchPart;
@@ -90,7 +90,7 @@ public abstract class NodePropertiesTableControl extends WorkbenchPartControl {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.WorkbenchPartControl#dispose()
+ * @see org.eclipse.tcf.te.ui.WorkbenchPartControl#dispose()
*/
@Override
public void dispose() {
@@ -107,7 +107,7 @@ public abstract class NodePropertiesTableControl extends WorkbenchPartControl {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.WorkbenchPartControl#setupFormPanel(org.eclipse.swt.widgets.Composite, org.eclipse.tm.te.ui.forms.CustomFormToolkit)
+ * @see org.eclipse.tcf.te.ui.WorkbenchPartControl#setupFormPanel(org.eclipse.swt.widgets.Composite, org.eclipse.tcf.te.ui.forms.CustomFormToolkit)
*/
@Override
public void setupFormPanel(Composite parent, CustomFormToolkit toolkit) {
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/tables/properties/NodePropertiesTableTableNode.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/tables/properties/NodePropertiesTableTableNode.java
index e99564383..f5e3ba1bc 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/tables/properties/NodePropertiesTableTableNode.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/tables/properties/NodePropertiesTableTableNode.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.tables.properties;
+package org.eclipse.tcf.te.ui.tables.properties;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.PlatformObject;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/AbstractTreeControl.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/AbstractTreeControl.java
new file mode 100644
index 000000000..9960b4678
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/AbstractTreeControl.java
@@ -0,0 +1,946 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.trees;
+
+
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Method;
+import java.lang.reflect.Proxy;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+
+import org.eclipse.core.commands.Command;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.expressions.EvaluationContext;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.SafeRunner;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.IContributionItem;
+import org.eclipse.jface.action.IMenuListener;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.action.Separator;
+import org.eclipse.jface.action.ToolBarManager;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.jface.util.SafeRunnable;
+import org.eclipse.jface.viewers.ColumnViewerEditor;
+import org.eclipse.jface.viewers.ColumnViewerEditorActivationStrategy;
+import org.eclipse.jface.viewers.DoubleClickEvent;
+import org.eclipse.jface.viewers.IDoubleClickListener;
+import org.eclipse.jface.viewers.ILabelDecorator;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.TreeViewerEditor;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerComparator;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.SWTException;
+import org.eclipse.swt.events.ControlAdapter;
+import org.eclipse.swt.events.ControlEvent;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.FocusListener;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Cursor;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.ToolBar;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.swt.widgets.TreeColumn;
+import org.eclipse.tcf.te.runtime.utils.Host;
+import org.eclipse.tcf.te.ui.WorkbenchPartControl;
+import org.eclipse.tcf.te.ui.activator.UIPlugin;
+import org.eclipse.tcf.te.ui.forms.CustomFormToolkit;
+import org.eclipse.tcf.te.ui.interfaces.IViewerInput;
+import org.eclipse.tcf.te.ui.interfaces.ImageConsts;
+import org.eclipse.tcf.te.ui.nls.Messages;
+import org.eclipse.ui.IDecoratorManager;
+import org.eclipse.ui.ISources;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchActionConstants;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchPartSite;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.commands.ICommandService;
+import org.eclipse.ui.forms.widgets.Section;
+import org.eclipse.ui.menus.IMenuService;
+import org.eclipse.ui.part.MultiPageSelectionProvider;
+
+
+/**
+ * Abstract tree control implementation.
+ */
+public abstract class AbstractTreeControl extends WorkbenchPartControl implements SelectionListener,
+ IDoubleClickListener, IPropertyChangeListener, ISelectionChangedListener, FocusListener {
+ // Reference to the tree viewer instance
+ private TreeViewer viewer;
+ // Reference to the selection changed listener
+ private ISelectionChangedListener selectionChangedListener;
+ // The descriptors of the viewer filters configured for this viewer.
+ private FilterDescriptor[] filterDescriptors;
+ // The tree viewer columns of this viewer.
+ private ColumnDescriptor[] columns;
+ // The state of the tree viewer used to restore and save the the tree viewer's state.
+ private TreeViewerState viewerState;
+ // The action to configure the filters.
+ private ConfigFilterAction configFilterAction;
+ // The tool bar manager
+ private ToolBarManager toolbarManager;
+
+ /**
+ * Constructor.
+ */
+ public AbstractTreeControl() {
+ super();
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param parentPart The parent workbench part this control is embedded in or <code>null</code>.
+ */
+ public AbstractTreeControl(IWorkbenchPart parentPart) {
+ super(parentPart);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.WorkbenchPartControl#dispose()
+ */
+ @Override
+ public void dispose() {
+ saveViewerState();
+ // Unregister the selection changed listener
+ if (selectionChangedListener != null) {
+ if (getViewer() != null) {
+ getViewer().removeSelectionChangedListener(selectionChangedListener);
+ }
+ selectionChangedListener = null;
+ }
+
+ // Dispose the columns' resources.
+ if (columns != null) {
+ for (ColumnDescriptor column : columns) {
+ if (column.getImage() != null) {
+ column.getImage().dispose();
+ }
+ if (column.getLabelProvider() != null) {
+ column.getLabelProvider().dispose();
+ }
+ }
+ }
+ if(filterDescriptors != null) {
+ for(FilterDescriptor filterDescriptor : filterDescriptors) {
+ if(filterDescriptor.getImage() != null) {
+ filterDescriptor.getImage().dispose();
+ }
+ }
+ }
+ super.dispose();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.WorkbenchPartControl#setupFormPanel(org.eclipse.swt.widgets.Composite, org.eclipse.tcf.te.ui.forms.CustomFormToolkit)
+ */
+ @Override
+ public void setupFormPanel(Composite parent, CustomFormToolkit toolkit) {
+ super.setupFormPanel(parent, toolkit);
+
+ // Create the tree viewer
+ viewer = doCreateTreeViewer(parent);
+ // And configure the tree viewer
+ configureTreeViewer(viewer);
+
+ // Prepare popup menu and toolbar
+ createContributionItems(viewer);
+ }
+
+ /**
+ * Creates the tree viewer instance.
+ *
+ * @param parent The parent composite. Must not be <code>null</code>.
+ * @return The tree viewer.
+ */
+ protected TreeViewer doCreateTreeViewer(Composite parent) {
+ Assert.isNotNull(parent);
+ return new TreeViewer(parent, SWT.FULL_SELECTION | SWT.SINGLE);
+ }
+
+ /**
+ * Configure the tree viewer.
+ *
+ * @param viewer The tree viewer. Must not be <code>null</code>.
+ */
+ protected void configureTreeViewer(TreeViewer viewer) {
+ Assert.isNotNull(viewer);
+
+ viewer.setAutoExpandLevel(getAutoExpandLevel());
+
+ viewer.setLabelProvider(doCreateTreeViewerLabelProvider(viewer));
+
+ final ITreeContentProvider contentProvider = doCreateTreeViewerContentProvider(viewer);
+ InvocationHandler handler = new InvocationHandler() {
+ @Override
+ public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
+ if (method.getName().equals("inputChanged")) { //$NON-NLS-1$
+ onInputChanged(args[1], args[2]);
+ } else if(method.getName().equals("dispose")) { //$NON-NLS-1$
+ onContentProviderDisposed();
+ }
+ return method.invoke(contentProvider, args);
+ }
+ };
+ ClassLoader classLoader = getClass().getClassLoader();
+ Class<?>[] interfaces = new Class[] { ITreeContentProvider.class };
+ ITreeContentProvider proxy = (ITreeContentProvider) Proxy.newProxyInstance(classLoader, interfaces, handler);
+ viewer.setContentProvider(proxy);
+
+ viewer.setComparator(doCreateTreeViewerComparator(viewer));
+
+ viewer.getTree().setLayoutData(doCreateTreeViewerLayoutData(viewer));
+
+ // Attach the selection changed listener
+ viewer.addSelectionChangedListener(this);
+ selectionChangedListener = doCreateTreeViewerSelectionChangedListener(viewer);
+ if (selectionChangedListener != null) {
+ viewer.addSelectionChangedListener(selectionChangedListener);
+ }
+
+ viewer.addDoubleClickListener(this);
+
+ // Set the help context.
+ String helpContextId = getHelpId();
+ if (helpContextId != null) {
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(viewer.getTree(), helpContextId);
+ }
+ Tree tree = viewer.getTree();
+ tree.addFocusListener(this);
+ // Define an editor activation strategy for the common viewer so as to be invoked only programmatically.
+ ColumnViewerEditorActivationStrategy activationStrategy = new TreeViewerEditorActivationStrategy(getViewerId(), viewer);
+ TreeViewerEditor.create(viewer, null, activationStrategy, ColumnViewerEditor.DEFAULT);
+ }
+
+ /**
+ * Handle the event when the new input is set. Get the viewer's state
+ * and update the state of the viewer's columns and filters.
+ *
+ * @param oldInput the old input.
+ * @param newInput The new input.
+ */
+ void onInputChanged(Object oldInput, Object newInput) {
+ if(oldInput != null) {
+ uninstallPropertyChangeListener(oldInput);
+ }
+ columns = doCreateViewerColumns(newInput);
+ filterDescriptors = doCreateFilterDescriptors(newInput);
+ if (isStatePersistent()) {
+ updateViewerState(newInput);
+ }
+ createTreeColumns(viewer);
+ viewer.getTree().setHeaderVisible(true);
+ updateFilters();
+ new TreeViewerHeaderMenu(this).create();
+ configFilterAction.setEnabled(filterDescriptors != null && filterDescriptors.length > 0);
+ if(newInput != null) {
+ installPropertyChangeListener(newInput);
+ }
+ }
+
+ /**
+ * Handle the event when the content provider is disposed.
+ * Un-install the property change listener that has been added
+ * to the input.
+ *
+ * @param oldInput the old input.
+ * @param newInput The new input.
+ */
+ void onContentProviderDisposed() {
+ Object input = viewer.getInput();
+ if(input != null) {
+ uninstallPropertyChangeListener(input);
+ }
+ }
+
+ /**
+ * Uninstall the property change listener from the specified input.
+ *
+ * @param input The input of the tree viewer.
+ */
+ private void uninstallPropertyChangeListener(Object input) {
+ IViewerInput viewerInput = ViewerStateManager.getViewerInput(input);
+ if(viewerInput != null) {
+ viewerInput.removePropertyChangeListener(this);
+ }
+ }
+
+ /**
+ * Install the property change listener to the input of the tree viewer.
+ *
+ * @param input The input of the tree viewer.
+ */
+ private void installPropertyChangeListener(Object input) {
+ IViewerInput viewerInput = ViewerStateManager.getViewerInput(input);
+ if(viewerInput != null) {
+ viewerInput.addPropertyChangeListener(this);
+ }
+ }
+
+ /**
+ * Update the viewer state using the states from the viewerState which
+ * is retrieved or created based on the input.
+ *
+ * @param newInput The new input of the viewer.
+ */
+ private void updateViewerState(Object newInput) {
+ IViewerInput viewerInput = ViewerStateManager.getViewerInput(newInput);
+ if (viewerInput != null) {
+ String inputId = viewerInput.getInputId();
+ if (inputId != null) {
+ inputId = getViewerId() + "." + inputId; //$NON-NLS-1$
+ viewerState = ViewerStateManager.getInstance().getViewerState(inputId);
+ if (viewerState == null) {
+ viewerState = ViewerStateManager.createViewerState(columns, filterDescriptors);
+ ViewerStateManager.getInstance().putViewerState(inputId, viewerState);
+ }
+ else {
+ viewerState.updateColumnDescriptor(columns);
+ viewerState.updateFilterDescriptor(filterDescriptors);
+ }
+ }
+ }
+ }
+
+ /**
+ * Save the viewer's state.
+ */
+ private void saveViewerState() {
+ if (isStatePersistent() && viewerState != null) {
+ viewerState.updateColumnState(columns);
+ viewerState.updateFilterState(filterDescriptors);
+ }
+ }
+
+ /**
+ * Update the filter's state using the latest filter descriptors.
+ */
+ void updateFilterState() {
+ if (isStatePersistent() && viewerState != null) {
+ viewerState.updateFilterState(filterDescriptors);
+ }
+ }
+
+ /**
+ * Show or hide the specified column. Return true if the visible
+ * state has changed.
+ *
+ * @param column The column to be changed.
+ * @param visible The new visible value.
+ * @return true if the state has changed.
+ */
+ boolean setColumnVisible(ColumnDescriptor column, boolean visible) {
+ if (column.isVisible() && !visible) {
+ TreeColumn treeColumn = column.getTreeColumn();
+ treeColumn.dispose();
+ column.setTreeColumn(null);
+ column.setVisible(visible);
+ return true;
+ }
+ else if (!column.isVisible() && visible) {
+ TreeColumn treeColumn = createTreeColumn(column, false);
+ column.setTreeColumn(treeColumn);
+ column.setVisible(visible);
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Return if this tree viewer's state is persistent. If it is persistent,
+ * then its viewer state will be persisted during different session.
+ *
+ * @return true if the viewer's state is persistent.
+ */
+ protected boolean isStatePersistent() {
+ return true;
+ }
+
+ /**
+ * Get the help context id of this viewer.
+ *
+ * @return The help context id or null if no help available.
+ */
+ protected String getHelpId() {
+ return null;
+ }
+
+ /**
+ * Create the tree viewer columns from the viewers extension.
+ * Subclass may override it to provide its customized viewer columns.
+ *
+ * @param newInput the input when the columns are created.
+ * @return The tree viewer columns.
+ */
+ protected ColumnDescriptor[] doCreateViewerColumns(Object newInput) {
+ if(columns == null) {
+ TreeViewerExtension viewerExtension = new TreeViewerExtension(getViewerId());
+ columns = viewerExtension.parseColumns(newInput);
+ }
+ return columns;
+ }
+
+ /**
+ * Create the viewer filters from the viewers extension. Subclass may
+ * override it to provide its customized viewer filters.
+ *
+ * @param newInput the input when the filters are initialized.
+ * @return The filter descriptors for the viewer.
+ */
+ protected FilterDescriptor[] doCreateFilterDescriptors(Object newInput) {
+ if(filterDescriptors == null) {
+ TreeViewerExtension viewerExtension = new TreeViewerExtension(getViewerId());
+ filterDescriptors = viewerExtension.parseFilters(newInput);
+ }
+ return filterDescriptors;
+ }
+
+ /**
+ * Update the tree viewer's filters using the current filter descriptors.
+ */
+ public void updateFilters() {
+ if (filterDescriptors != null) {
+ List<ViewerFilter> newFilters = new ArrayList<ViewerFilter>();
+ for (FilterDescriptor descriptor : filterDescriptors) {
+ if (descriptor.getFilter() != null) {
+ if (descriptor.isEnabled()) {
+ newFilters.add(descriptor.getFilter());
+ }
+ }
+ }
+ viewer.setFilters(newFilters.toArray(new ViewerFilter[newFilters.size()]));
+ }
+ }
+
+ /**
+ * Create the tree columns for the viewer from the tree viewer columns.
+ * Subclass may override to create its customized the creation.
+ *
+ * @param viewer The tree viewer.
+ */
+ protected void createTreeColumns(TreeViewer viewer) {
+ Assert.isTrue(columns != null && columns.length > 0);
+ List<ColumnDescriptor> visibleColumns = new ArrayList<ColumnDescriptor>();
+ for (ColumnDescriptor column : columns) {
+ if (column.isVisible()) visibleColumns.add(column);
+ }
+ Collections.sort(visibleColumns, new Comparator<ColumnDescriptor>(){
+ @Override
+ public int compare(ColumnDescriptor o1, ColumnDescriptor o2) {
+ return o1.getOrder() < o2.getOrder() ? -1 : (o1.getOrder() > o2.getOrder() ? 1 : 0);
+ }});
+ for(ColumnDescriptor visibleColumn : visibleColumns) {
+ createTreeColumn(visibleColumn, true);
+ }
+ if(!Host.isWindowsHost()) {
+ Tree tree = viewer.getTree();
+ TreeColumn column = new TreeColumn(tree, SWT.LEFT);
+ column.setWidth(1);
+ }
+ // Set the default sort column to the first column (the tree column).
+ Assert.isTrue(viewer.getTree().getColumnCount() > 0);
+ TreeColumn treeColumn = viewer.getTree().getColumn(0);
+ ColumnDescriptor column = (ColumnDescriptor) treeColumn.getData();
+ if (column != null) {
+ viewer.getTree().setSortColumn(treeColumn);
+ viewer.getTree().setSortDirection(column.isAscending() ? SWT.UP : SWT.DOWN);
+ }
+ }
+
+ /**
+ * Create the tree column described by the specified colum descriptor.
+ *
+ * @param column The column descriptor.
+ * @param append If the new column should be appended.
+ * @return The tree column created.
+ */
+ TreeColumn createTreeColumn(final ColumnDescriptor column, boolean append) {
+ Tree tree = viewer.getTree();
+ final TreeColumn treeColumn = append ? new TreeColumn(tree, column.getStyle()) :
+ new TreeColumn(tree, column.getStyle(), getColumnIndex(column));
+ treeColumn.setData(column);
+ treeColumn.setText(column.getName());
+ treeColumn.setToolTipText(column.getDescription());
+ treeColumn.setAlignment(column.getAlignment());
+ treeColumn.setImage(column.getImage());
+ treeColumn.setMoveable(column.isMoveable());
+ treeColumn.setResizable(column.isResizable());
+ treeColumn.setWidth(column.getWidth());
+ treeColumn.addSelectionListener(this);
+ treeColumn.addControlListener(new ControlAdapter(){
+
+ @Override
+ public void controlMoved(ControlEvent e) {
+ columnMoved();
+ }
+
+ @Override
+ public void controlResized(ControlEvent e) {
+ column.setWidth(treeColumn.getWidth());
+ }});
+ column.setTreeColumn(treeColumn);
+ return treeColumn;
+ }
+
+ /**
+ * Called when a column is moved. Store the column's order.
+ */
+ void columnMoved() {
+ Tree tree = viewer.getTree();
+ TreeColumn[] treeColumns = tree.getColumns();
+ if(treeColumns != null && treeColumns.length > 0) {
+ int[] orders = tree.getColumnOrder();
+ for(int i=0;i<orders.length;i++) {
+ TreeColumn treeColumn = treeColumns[orders[i]];
+ ColumnDescriptor column = (ColumnDescriptor) treeColumn.getData();
+ if (column != null) {
+ column.setOrder(i);
+ }
+ }
+ }
+ }
+
+ /**
+ * Get the column index of the specified column. The column index
+ * equals to the count of the visible columns before this column.
+ *
+ * @param column The column descriptor.
+ * @return The column index.
+ */
+ private int getColumnIndex(ColumnDescriptor column) {
+ Assert.isTrue(columns != null);
+ int visibleCount = 0;
+ for(int i=0;i<columns.length;i++) {
+ if(columns[i] == column)
+ break;
+ if(columns[i].isVisible()) {
+ visibleCount++;
+ }
+ }
+ return visibleCount;
+ }
+
+ /**
+ * Get the tree viewer's id. This viewer id is used by
+ * viewer extension to define columns and filters.
+ *
+ * @return This viewer's id or null.
+ */
+ protected abstract String getViewerId();
+
+ /**
+ * Returns the number of levels to auto expand.
+ * If the method returns <code>0</code>, no auto expansion will happen
+ *
+ * @return The number of levels to auto expand or <code>0</code>.
+ */
+ protected int getAutoExpandLevel() {
+ return 2;
+ }
+
+ /**
+ * Creates the tree viewer layout data instance.
+ *
+ * @param viewer The tree viewer. Must not be <code>null</code>.
+ * @return The tree viewer layout data instance.
+ */
+ protected Object doCreateTreeViewerLayoutData(TreeViewer viewer) {
+ GridData data = new GridData(GridData.FILL_BOTH);
+ data.widthHint = 0;
+ data.heightHint = 0;
+ return data;
+ }
+
+ /**
+ * Creates the tree viewer label provider instance.
+ *
+ * @param viewer The tree viewer. Must not be <code>null</code>.
+ * @return The tree viewer label provider instance.
+ */
+ protected ILabelProvider doCreateTreeViewerLabelProvider(TreeViewer viewer) {
+ TreeViewerLabelProvider labelProvider = new TreeViewerLabelProvider(viewer);
+ IWorkbench workbench = PlatformUI.getWorkbench();
+ IDecoratorManager manager = workbench.getDecoratorManager();
+ ILabelDecorator decorator = manager.getLabelDecorator();
+ return new TreeViewerDecoratingLabelProvider(labelProvider,decorator);
+ }
+
+ /**
+ * Creates the tree viewer content provider instance.
+ *
+ * @param viewer The tree viewer. Must not be <code>null</code>.
+ * @return The tree viewer content provider instance.
+ */
+ protected abstract ITreeContentProvider doCreateTreeViewerContentProvider(TreeViewer viewer);
+
+ /**
+ * Creates the tree viewer comparator instance.
+ *
+ * @param viewer The tree viewer. Must not be <code>null</code>.
+ * @return The tree viewer comparator instance or <code>null</code> to turn of sorting.
+ */
+ protected ViewerComparator doCreateTreeViewerComparator(TreeViewer viewer) {
+ return new TreeViewerComparator();
+ }
+
+ /**
+ * Creates a new selection changed listener instance.
+ *
+ * @param viewer The tree viewer. Must not be <code>null</code>.
+ * @return The selection changed listener instance.
+ */
+ protected abstract ISelectionChangedListener doCreateTreeViewerSelectionChangedListener(TreeViewer viewer);
+
+ /**
+ * Create the context menu and toolbar groups.
+ *
+ * @param viewer The tree viewer instance. Must not be <code>null</code>.
+ */
+ protected void createContributionItems(TreeViewer viewer) {
+ Assert.isNotNull(viewer);
+
+ // Create the menu manager
+ MenuManager manager = new MenuManager("#PopupMenu"); //$NON-NLS-1$
+ // Attach the menu listener
+ manager.addMenuListener(new IMenuListener() {
+ @Override
+ public void menuAboutToShow(IMenuManager manager) {
+ manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
+ }
+ });
+ // All items are removed when menu is closing
+ manager.setRemoveAllWhenShown(true);
+ // Associated with the tree
+ viewer.getTree().setMenu(manager.createContextMenu(viewer.getTree()));
+
+ // Register the context menu at the parent workbench part site.
+ if (getParentPart() != null && getParentPart().getSite() != null && getContextMenuId() != null) {
+ getParentPart().getSite().registerContextMenu(getContextMenuId(), manager, viewer);
+ }
+
+ // The toolbar is a bit more complicated as we want to have the
+ // toolbar placed within the section title.
+ createToolbarContributionItem(viewer);
+ }
+
+ /**
+ * Returns the context menu id.
+ *
+ * @return The context menu id.
+ */
+ protected abstract String getContextMenuId();
+
+ /**
+ * Creates the toolbar within the section parent of the given tree viewer.
+ *
+ * @param viewer The tree viewer instance. Must not be <code>null</code>.
+ */
+ protected void createToolbarContributionItem(TreeViewer viewer) {
+ Assert.isNotNull(viewer);
+
+ // Determine the section parent from the tree viewer
+ Composite parent = viewer.getTree().getParent();
+ while (parent != null && !(parent instanceof Section)) {
+ parent = parent.getParent();
+ }
+
+ // We are done here if we cannot find a section parent or the parent is disposed
+ if (parent == null || parent.isDisposed()) {
+ return;
+ }
+
+ toolbarManager = new ToolBarManager(SWT.FLAT | SWT.HORIZONTAL | SWT.RIGHT);
+ // create the toolbar items
+ createToolBarItems(toolbarManager);
+ if (getParentPart() != null && getParentPart().getSite() != null && getContextMenuId() != null) {
+ IMenuService service = (IMenuService) getParentPart().getSite().getService(IMenuService.class);
+ if (service != null) {
+ service.populateContributionManager(toolbarManager, "toolbar:" + this.getContextMenuId()); //$NON-NLS-1$
+ }
+ }
+ ToolBar toolbar = toolbarManager.createControl(parent);
+
+ // The cursor within the toolbar shall change to an hand
+ final Cursor handCursor = new Cursor(parent.getDisplay(), SWT.CURSOR_HAND);
+ toolbar.setCursor(handCursor);
+ // Cursor needs to be explicitly disposed
+ toolbar.addDisposeListener(new DisposeListener() {
+ @Override
+ public void widgetDisposed(DisposeEvent e) {
+ if (handCursor.isDisposed() == false) {
+ handCursor.dispose();
+ }
+ }
+ });
+
+ // If the parent composite is a forms section, set the toolbar
+ // as text client to the section header
+ if (parent instanceof Section) {
+ Section section = (Section)parent;
+ // Set the toolbar as text client
+ section.setTextClient(toolbar);
+ }
+ }
+
+ /**
+ * Create the toolbar items to be added to the toolbar. Override
+ * to add the wanted toolbar items.
+ * <p>
+ * <b>Note:</b> The toolbar items are added from left to right.
+ *
+ * @param toolbarManager The toolbar to add the toolbar items too. Must not be <code>null</code>.
+ */
+ protected void createToolBarItems(ToolBarManager toolbarManager) {
+ Assert.isNotNull(toolbarManager);
+ toolbarManager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
+ toolbarManager.add(configFilterAction = new ConfigFilterAction(this));
+ Action action = new Action(null, IAction.AS_PUSH_BUTTON){
+ @Override
+ public void run() {
+ PlatformUI.getWorkbench().getHelpSystem().displayDynamicHelp();
+ }
+ };
+ action.setToolTipText(Messages.AbstractTreeControl_HelpTooltip);
+ ImageDescriptor image = UIPlugin.getImageDescriptor(ImageConsts.VIEWER_HELP);
+ action.setImageDescriptor(image);
+ toolbarManager.add(action);
+ }
+
+ /**
+ * Get the current filter descriptors of this viewer.
+ *
+ * @return The filter descriptors of this viewer.
+ */
+ public FilterDescriptor[] getFilterDescriptors() {
+ return filterDescriptors;
+ }
+
+ /**
+ * Get the current viewer columns of this viewer.
+ *
+ * @return The current viewer columns.
+ */
+ public ColumnDescriptor[] getViewerColumns() {
+ return columns;
+ }
+
+ /**
+ * Returns the viewer instance.
+ *
+ * @return The viewer instance or <code>null</code>.
+ */
+ public Viewer getViewer() {
+ return viewer;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
+ */
+ @Override
+ public Object getAdapter(Class adapter) {
+ if (Viewer.class.isAssignableFrom(adapter)) {
+ // We have to double check if our real viewer is assignable to
+ // the requested Viewer class.
+ Viewer viewer = getViewer();
+ if (!adapter.isAssignableFrom(viewer.getClass())) {
+ viewer = null;
+ }
+ return viewer;
+ }
+
+ return super.getAdapter(adapter);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+ */
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ Assert.isTrue(e.getSource() instanceof TreeColumn);
+ TreeColumn treeColumn = (TreeColumn) e.getSource();
+ ColumnDescriptor column = (ColumnDescriptor) treeColumn.getData();
+ if (column != null) {
+ viewer.getTree().setSortColumn(treeColumn);
+ column.setAscending(!column.isAscending());
+ viewer.getTree().setSortDirection(column.isAscending() ? SWT.UP : SWT.DOWN);
+ Object[] expandedElements = viewer.getExpandedElements();
+ viewer.refresh();
+ viewer.setExpandedElements(expandedElements);
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
+ */
+ @Override
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+
+ /**
+ * Listens to the double-click event of the tree and expand or collapse
+ * the tree by default. Subclass may override this method to invoke certain
+ * command.
+ *
+ * @param event the double click event
+ * @see org.eclipse.jface.viewers.IDoubleClickListener#doubleClick(DoubleClickEvent)
+ */
+ @Override
+ public void doubleClick(final DoubleClickEvent event) {
+ // If an handled and enabled command is registered for the ICommonActionConstants.OPEN
+ // retargetable action id, redirect the double click handling to the command handler.
+ //
+ // Note: The default tree node expansion must be re-implemented in the active handler!
+ String commandId = getDoubleClickCommandId();
+ Command cmd = null;
+ if(commandId != null) {
+ ICommandService service = (ICommandService)PlatformUI.getWorkbench().getService(ICommandService.class);
+ cmd = service != null ? service.getCommand(commandId) : null;
+ }
+ if (cmd != null && cmd.isDefined() && cmd.isEnabled()) {
+ final Command command = cmd;
+ SafeRunner.run(new SafeRunnable(){
+ @Override
+ public void run() throws Exception {
+ ISelection selection = event.getSelection();
+ EvaluationContext ctx = new EvaluationContext(null, selection);
+ ctx.addVariable(ISources.ACTIVE_CURRENT_SELECTION_NAME, selection);
+ ctx.addVariable(ISources.ACTIVE_MENU_SELECTION_NAME, selection);
+ ctx.addVariable(ISources.ACTIVE_WORKBENCH_WINDOW_NAME, PlatformUI.getWorkbench().getActiveWorkbenchWindow());
+ IWorkbenchPart part = getParentPart();
+ if (part != null) {
+ IWorkbenchPartSite site = part.getSite();
+ ctx.addVariable(ISources.ACTIVE_PART_ID_NAME, site.getId());
+ ctx.addVariable(ISources.ACTIVE_PART_NAME, part);
+ ctx.addVariable(ISources.ACTIVE_SITE_NAME, site);
+ ctx.addVariable(ISources.ACTIVE_SHELL_NAME, site.getShell());
+ }
+ ExecutionEvent executionEvent = new ExecutionEvent(command, Collections.EMPTY_MAP, part, ctx);
+ command.executeWithChecks(executionEvent);
+ }});
+ } else {
+ IStructuredSelection selection = (IStructuredSelection) event.getSelection();
+ Object element = selection.getFirstElement();
+ TreeViewer viewer = (TreeViewer) getViewer();
+ if (viewer.isExpandable(element)) {
+ viewer.setExpandedState(element, !viewer.getExpandedState(element));
+ }
+ }
+ }
+
+ /**
+ * Get the id of the command invoked when the tree is double-clicked.
+ * If the id is null, then no command is invoked.
+ *
+ * @return The double-click command id.
+ */
+ protected String getDoubleClickCommandId() {
+ return null;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
+ */
+ @Override
+ public void propertyChange(final PropertyChangeEvent event) {
+ ToolBar toolbar = toolbarManager.getControl();
+ if (!toolbar.isDisposed()) {
+ Display display = toolbar.getDisplay();
+ if (display.getThread() == Thread.currentThread()) {
+ IContributionItem[] items = toolbarManager.getItems();
+ for (IContributionItem item : items) {
+ item.update();
+ }
+ }
+ else {
+ display.asyncExec(new Runnable() {
+ @Override
+ public void run() {
+ propertyChange(event);
+ }
+ });
+ }
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.swt.events.FocusListener#focusGained(org.eclipse.swt.events.FocusEvent)
+ */
+ @Override
+ public void focusGained(FocusEvent e) {
+ propagateSelection();
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.swt.events.FocusListener#focusLost(org.eclipse.swt.events.FocusEvent)
+ */
+ @Override
+ public void focusLost(FocusEvent e) {
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
+ */
+ @Override
+ public void selectionChanged(SelectionChangedEvent event) {
+ propagateSelection();
+ }
+
+ /**
+ * Propagate the current selection to the editor's selection provider.
+ */
+ private void propagateSelection() {
+ IWorkbenchPart parent = getParentPart();
+ if (parent != null) {
+ IWorkbenchPartSite site = parent.getSite();
+ if (site != null) {
+ ISelection selection = getViewer().getSelection();
+ ISelectionProvider selectionProvider = site.getSelectionProvider();
+ // If the parent control is already disposed, we have no real chance of
+ // testing for it. Catch the SWT exception here just in case.
+ try {
+ selectionProvider.setSelection(selection);
+ if (selectionProvider instanceof MultiPageSelectionProvider) {
+ SelectionChangedEvent changedEvent = new SelectionChangedEvent(selectionProvider, selection);
+ ((MultiPageSelectionProvider) selectionProvider).firePostSelectionChanged(changedEvent);
+ }
+ } catch (SWTException e) {
+ /* ignored on purpose */
+ }
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/ColumnDescriptor.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/ColumnDescriptor.java
new file mode 100644
index 000000000..884dcd0fe
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/ColumnDescriptor.java
@@ -0,0 +1,364 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.trees;
+
+import java.util.Comparator;
+
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.TreeColumn;
+
+/**
+ * <p>
+ * The data descriptor to describe tree columns of a tree viewer.
+ * </p>
+ * <p>
+ * A ColumnDescriptor encapsulates the following information about the tree
+ * column:
+ * <ol>
+ * <li><code>name</code>, the column's name used as the column's label.</li>
+ * <li><code>description</code>, the column's description used as the tooltip
+ * text of the column.</li>
+ * <li><code>moveable</code>, if the column is moveable.</li>
+ * <li><code>resizable</code>, if the column is resizable.</li>
+ * <li><code>visible</code>, if the column is visible.</li>
+ * <li><code>style</code>, the column's style when it is created.</li>
+ * <li><code>alignment</code>, the alignment of the column's header text.</li>
+ * <li><code>width</code>, the column's initial width when it is created.</li>
+ * <li><code>image</code>, the column's image displayed in the header.</li>
+ * <li><code>labelProvider</code>, the label provider of the column.</li>
+ * <li><code>comparator</code>, the comparator of the column.</li>
+ * </ol>
+ * </p>
+ * <p>
+ * This class is not intended to be subclassed.
+ * </p>
+ */
+public class ColumnDescriptor {
+ private String id;
+ //The name of the column, used as the column's label.
+ private String name;
+ //The description of the column, used as the column's tooltip text.
+ private String description;
+
+ //If the column is moveable.
+ private boolean mveable;
+ //If the column is resizable, true by default.
+ private boolean resizable = true;
+ //If the column is visible, true by default.
+ private boolean visible = true;
+
+ //The style of the column when it is created, SWT.LEFT by default.
+ private int style = SWT.LEFT;
+ //The alignment of the column's header text, SWT.LEFT by default.
+ private int alignment = SWT.LEFT;
+ //The column's initial width when it is created, 150 by default.
+ private int width = 150;
+
+ //The column's header image.
+ private Image image;
+
+ //The label provider of the column.
+ private ILabelProvider labelProvider;
+
+ //The comparator of the column, used to sort the viewer.
+ @SuppressWarnings("rawtypes")
+ private Comparator comparator;
+
+ //The corresponding tree column. Not intended to be changed by other callers.
+ private TreeColumn treeColumn;
+ //If the column's sorting order is ascending. Defaults to true. Not intended to be changed by other callers.
+ private boolean ascending = true;
+ //The column's order. Not intended to be changed by other callers.
+ private int order;
+
+ /**
+ * Create a column descriptor with specified column id.
+ *
+ * @param id
+ * The column id;
+ */
+ public ColumnDescriptor(String id) {
+ this.id = id;
+ }
+
+ /**
+ * Get the column's id.
+ *
+ * @return the column's id.
+ */
+ public String getId() {
+ return id;
+ }
+
+ /**
+ * Set the column's id.
+ *
+ * @param id
+ */
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ /**
+ * Get the column's sorting orientation.
+ *
+ * @return The sorting orientation.
+ */
+ public boolean isAscending() {
+ return ascending;
+ }
+
+ /**
+ * Set the column's sorting orientation.
+ *
+ * @param a The new orientation.
+ */
+ public void setAscending(boolean a) {
+ this.ascending = a;
+ }
+
+ /**
+ * Set the column's sorting comparator.
+ *
+ * @param comparator The new comparator.
+ */
+ @SuppressWarnings("rawtypes")
+ public void setComparator(Comparator comparator) {
+ this.comparator = comparator;
+ }
+
+ /**
+ * Get the column's sorting comparator.
+ *
+ * @return The new comparator.
+ */
+ @SuppressWarnings("rawtypes")
+ public Comparator getComparator() {
+ return comparator;
+ }
+
+ /**
+ * Set the tree column.
+ *
+ * @param column The tree column.
+ */
+ public void setTreeColumn(TreeColumn column) {
+ this.treeColumn = column;
+ }
+
+ /**
+ * Get the tree column.
+ *
+ * @return The tree column.
+ */
+ public TreeColumn getTreeColumn() {
+ return treeColumn;
+ }
+
+ /**
+ * Set the visibility of this tree column.
+ *
+ * @param v the new visibility
+ */
+ public void setVisible(boolean v) {
+ visible = v;
+ }
+
+ /**
+ * Get the visibility of the tree column.
+ *
+ * @return This column's visibility.
+ */
+ public boolean isVisible() {
+ return visible;
+ }
+
+ /**
+ * Set the name of the column.
+ *
+ * @param name The new name.
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ * Get the name of the column.
+ *
+ * @return The column's name.
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * Set the description of the column.
+ *
+ * @param desc The column's description.
+ */
+ public void setDescription(String desc) {
+ description = desc;
+ }
+
+ /**
+ * Get the description of the column.
+ *
+ * @return The column's description.
+ */
+ public String getDescription() {
+ return description;
+ }
+
+ /**
+ * Set if the column is moveable.
+ *
+ * @param m The new value.
+ */
+ public void setMoveable(boolean m) {
+ mveable = m;
+ }
+
+ /**
+ * Get if the column is moveable.
+ *
+ * @return If the column is moveable.
+ */
+ public boolean isMoveable() {
+ return mveable;
+ }
+
+ /**
+ * Set the column's creation style.
+ *
+ * @param style The column's creation style.
+ */
+ public void setStyle(int style) {
+ this.style = style;
+ }
+
+ /**
+ * Get the column's creation style.
+ *
+ * @return The column's creation style.
+ */
+ public int getStyle() {
+ return style;
+ }
+
+ /**
+ * Set the column's alignment.
+ *
+ * @param alignment The column's alignment.
+ */
+ public void setAlignment(int alignment) {
+ this.alignment = alignment;
+ }
+
+ /**
+ * Get the column's alignment.
+ *
+ * @return The column's alignment.
+ */
+ public int getAlignment() {
+ return alignment;
+ }
+
+ /**
+ * Set the column's image.
+ *
+ * @param img The new image.
+ */
+ public void setImage(Image img) {
+ this.image = img;
+ }
+
+ /**
+ * Get the column's image.
+ *
+ * @return The column's image.
+ */
+ public Image getImage() {
+ return image;
+ }
+
+ /**
+ * Set if the column is resizable.
+ *
+ * @param r The new value.
+ */
+ public void setResizable(boolean r) {
+ resizable = r;
+ }
+
+ /**
+ * Get if the column is resizable.
+ *
+ * @return If the column is resizable.
+ */
+ public boolean isResizable() {
+ return resizable;
+ }
+
+ /**
+ * Set the column's initial width.
+ *
+ * @param width The new column width.
+ */
+ public void setWidth(int width) {
+ this.width = width;
+ }
+
+ /**
+ * Get the column's initial width.
+ *
+ * @return the column's initial width.
+ */
+ public int getWidth() {
+ return width;
+ }
+
+ /**
+ * Set the column's label provider.
+ *
+ * @param p The new column label provider.
+ */
+ public void setLabelProvider(ILabelProvider p) {
+ labelProvider = p;
+ }
+
+ /**
+ * Get the column's label provider.
+ *
+ * @return The column's label provider.
+ */
+ public ILabelProvider getLabelProvider() {
+ return labelProvider;
+ }
+
+ /**
+ * Get the column's order number.
+ *
+ * @return The column's order.
+ */
+ public int getOrder() {
+ return order;
+ }
+
+ /**
+ * Set the column's order.
+ *
+ * @param order The new order.
+ */
+ public void setOrder(int order) {
+ this.order = order;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/ColumnState.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/ColumnState.java
new file mode 100644
index 000000000..5782598cb
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/ColumnState.java
@@ -0,0 +1,97 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.trees;
+
+/**
+ * The persistable column state used by TreeViewerState to save and restore the tree viewer's column
+ * state.
+ */
+class ColumnState {
+ // The column's id.
+ private String columnId;
+ // If the column is visible.
+ private boolean visible;
+ // The column's width.
+ private int width;
+ // The column's order in the tree header.
+ private int order;
+
+ /**
+ * Get the column's id.
+ *
+ * @return The column's id.
+ */
+ public String getColumnId() {
+ return columnId;
+ }
+
+ /**
+ * Set the column's id.
+ *
+ * @param columnId The new column Id.
+ */
+ public void setColumnId(String columnId) {
+ this.columnId = columnId;
+ }
+
+ /**
+ * Return if the column is visible.
+ *
+ * @return true if the column is visible
+ */
+ public boolean isVisible() {
+ return visible;
+ }
+
+ /**
+ * Set the column's visible state.
+ *
+ * @param visible The new visible state.
+ */
+ public void setVisible(boolean visible) {
+ this.visible = visible;
+ }
+
+ /**
+ * Get the column's width.
+ *
+ * @return The column's width.
+ */
+ public int getWidth() {
+ return width;
+ }
+
+ /**
+ * Set the column's width.
+ *
+ * @param width The column's width.
+ */
+ public void setWidth(int width) {
+ this.width = width;
+ }
+
+ /**
+ * Get the column's order.
+ *
+ * @return the column's order.
+ */
+ public int getOrder() {
+ return order;
+ }
+
+ /**
+ * Set the column's order.
+ *
+ * @param order The column's order.
+ */
+ public void setOrder(int order) {
+ this.order = order;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/CommonViewerListener.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/CommonViewerListener.java
new file mode 100644
index 000000000..969b676f1
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/CommonViewerListener.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.trees;
+
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Tree;
+
+/**
+ * CommonViewerListener listens to the property change event from Target Explorer's
+ * tree and update the viewer accordingly.
+ */
+public class CommonViewerListener implements IPropertyChangeListener {
+ // The common viewer of Target Explorer view.
+ private TreeViewer viewer;
+
+ /***
+ * Create an instance for the specified common viewer.
+ *
+ * @param viewer The common viewer from Target Explorer view.
+ */
+ public CommonViewerListener(TreeViewer viewer) {
+ this.viewer = viewer;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
+ */
+ @Override
+ public void propertyChange(final PropertyChangeEvent event) {
+ Tree tree = viewer.getTree();
+ if (!tree.isDisposed()) {
+ Display display = tree.getDisplay();
+ if (display.getThread() == Thread.currentThread()) {
+ Object object = event.getSource();
+ if (object != null) {
+ viewer.refresh(object);
+ }
+ else {
+ viewer.refresh();
+ }
+ }
+ else {
+ display.asyncExec(new Runnable() {
+ @Override
+ public void run() {
+ propertyChange(event);
+ }
+ });
+ }
+ }
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/ConfigFilterAction.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/ConfigFilterAction.java
new file mode 100644
index 000000000..865c23176
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/ConfigFilterAction.java
@@ -0,0 +1,113 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.trees;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.ArrayContentProvider;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.window.Window;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.tcf.te.ui.activator.UIPlugin;
+import org.eclipse.tcf.te.ui.interfaces.ImageConsts;
+import org.eclipse.tcf.te.ui.nls.Messages;
+import org.eclipse.ui.dialogs.ListSelectionDialog;
+
+/**
+ * The action to configure the filters of a tree viewer.
+ *
+ */
+public class ConfigFilterAction extends Action {
+ // The tree control whose filters are to be configured.
+ private AbstractTreeControl treeControl;
+
+ /**
+ * Create an instance for the specified tree control.
+ *
+ * @param treeControl The tree control to be configured.
+ */
+ public ConfigFilterAction(AbstractTreeControl treeControl) {
+ super(null, AS_PUSH_BUTTON);
+ this.treeControl = treeControl;
+ this.setToolTipText(Messages.ConfigFilterAction_TooltipText);
+ ImageDescriptor image = UIPlugin.getImageDescriptor(ImageConsts.VIEWER_FILTER_CONFIG_ENABLED);
+ setImageDescriptor(image);
+ image = UIPlugin.getImageDescriptor(ImageConsts.VIEWER_FILTER_CONFIG_DISABLED);
+ setDisabledImageDescriptor(image);
+ FilterDescriptor[] filterDescriptors = treeControl.getFilterDescriptors();
+ setEnabled(filterDescriptors != null && filterDescriptors.length > 0);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.action.Action#run()
+ */
+ @Override
+ public void run() {
+ FilterDescriptor[] filterDescriptors = treeControl.getFilterDescriptors();
+ if (filterDescriptors == null) return;
+
+ ILabelProvider filterLabelProvider = createFilterLabelProvider();
+ Shell parent = treeControl.getViewer().getControl().getShell();
+ String message = Messages.ConfigFilterAction_PromptMessage;
+ ListSelectionDialog dialog = new ListSelectionDialog(parent, filterDescriptors, ArrayContentProvider.getInstance(), filterLabelProvider, message);
+ dialog.setTitle(Messages.ConfigFilterAction_Title);
+ List<FilterDescriptor> initialSelection = new ArrayList<FilterDescriptor>();
+ for (FilterDescriptor descriptor : filterDescriptors) {
+ if (descriptor.isEnabled()) {
+ initialSelection.add(descriptor);
+ }
+ }
+ dialog.setInitialElementSelections(initialSelection);
+ if (dialog.open() == Window.OK) {
+ Object[] elements = dialog.getResult();
+ for (FilterDescriptor descriptor : filterDescriptors) {
+ descriptor.setEnabled(false);
+ }
+ for (Object element : elements) {
+ if (element instanceof FilterDescriptor) {
+ FilterDescriptor descriptor = (FilterDescriptor) element;
+ descriptor.setEnabled(true);
+ }
+ }
+ treeControl.updateFilters();
+ treeControl.updateFilterState();
+ }
+ }
+
+ /**
+ * Create a label provider for the configure dialog's tree.
+ *
+ * @return The label provider.
+ */
+ private ILabelProvider createFilterLabelProvider() {
+ return new LabelProvider() {
+ @Override
+ public String getText(Object element) {
+ if (element instanceof FilterDescriptor) {
+ return ((FilterDescriptor) element).getName();
+ }
+ return super.getText(element);
+ }
+ @Override
+ public Image getImage(Object element) {
+ if (element instanceof FilterDescriptor) {
+ return ((FilterDescriptor) element).getImage();
+ }
+ return super.getImage(element);
+ }
+ };
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/FilterDescriptor.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/FilterDescriptor.java
new file mode 100644
index 000000000..e3eb38473
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/FilterDescriptor.java
@@ -0,0 +1,141 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.trees;
+
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.swt.graphics.Image;
+
+/**
+ * A data structure to describe a viewer filter including its id, name, description, enablement and
+ * the filter itself.
+ */
+public class FilterDescriptor {
+ // The filter's id, which is unique in a tree viewer.
+ private String id;
+ // The filter's name used in the filter configuration dialog as the name.
+ private String name;
+ // The filter's description.
+ private String description;
+ // If the filter is enabled.
+ private boolean enabled;
+ // The image of this filter.
+ private Image image;
+
+ // The viewer filter.
+ private ViewerFilter filter;
+
+ /**
+ * Get the filter's id.
+ *
+ * @return The filter's id.
+ */
+ public String getId() {
+ return id;
+ }
+
+ /**
+ * Set the filter's id.
+ *
+ * @param id The new id.
+ */
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ /**
+ * Get the filter's name.
+ *
+ * @return The filter's name.
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * Set the filter's name.
+ *
+ * @param name The new name.
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ * Get the filter's description.
+ *
+ * @return The filter's description.
+ */
+ public String getDescription() {
+ return description;
+ }
+
+ /**
+ * Set the filter's description.
+ *
+ * @param description The new description.
+ */
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ /**
+ * Get if the filter is enabled.
+ *
+ * @return true if it is enabled.
+ */
+ public boolean isEnabled() {
+ return enabled;
+ }
+
+ /**
+ * Set if the filter is enabled.
+ *
+ * @param enabled The new value.
+ */
+ public void setEnabled(boolean enabled) {
+ this.enabled = enabled;
+ }
+
+ /**
+ * Get the viewer filter.
+ *
+ * @return The viewer filter.
+ */
+ public ViewerFilter getFilter() {
+ return filter;
+ }
+
+ /**
+ * Set the viewer filter.
+ *
+ * @param filter The new filter.
+ */
+ public void setFilter(ViewerFilter filter) {
+ this.filter = filter;
+ }
+
+ /**
+ * Get the filter's display image.
+ *
+ * @return The filter's image.
+ */
+ public Image getImage() {
+ return image;
+ }
+
+ /**
+ * Set the filter's display image.
+ *
+ * @param image The filter's new image.
+ */
+ public void setImage(Image image) {
+ this.image = image;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/FilterState.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/FilterState.java
new file mode 100644
index 000000000..9f989ffd6
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/FilterState.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.trees;
+
+/**
+ * The persistable filter state used by TreeViewerState to save and restore the tree viewer's filter
+ * state.
+ */
+class FilterState {
+ // The filter's id.
+ private String filterId;
+ // If the filter is enabled.
+ private boolean enabled;
+
+ /**
+ * Get the filter's id.
+ *
+ * @return The filter's id.
+ */
+ public String getFilterId() {
+ return filterId;
+ }
+
+ /**
+ * Set the filter's id.
+ *
+ * @param filterId The new filter id.
+ */
+ public void setFilterId(String filterId) {
+ this.filterId = filterId;
+ }
+
+ /**
+ * Return if the filter is enabled.
+ *
+ * @return If the filter is enabled.
+ */
+ public boolean isEnabled() {
+ return enabled;
+ }
+
+ /**
+ * Set the filer's enabled state.
+ *
+ * @param enabled true if the filter is enabled.
+ */
+ public void setEnabled(boolean enabled) {
+ this.enabled = enabled;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/trees/TreeArrayContentProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeArrayContentProvider.java
index 3361ceaab..dda8267dc 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/trees/TreeArrayContentProvider.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeArrayContentProvider.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.trees;
+package org.eclipse.tcf.te.ui.trees;
import org.eclipse.jface.viewers.ArrayContentProvider;
import org.eclipse.jface.viewers.ITreeContentProvider;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeContentProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeContentProvider.java
new file mode 100644
index 000000000..85421e712
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeContentProvider.java
@@ -0,0 +1,114 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.trees;
+
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.tcf.te.ui.interfaces.IViewerInput;
+
+/**
+ * The base tree content provider that defines several default methods.
+ */
+public abstract class TreeContentProvider implements ITreeContentProvider {
+
+ /**
+ * Static reference to the return value representing no elements.
+ */
+ protected final static Object[] NO_ELEMENTS = new Object[0];
+
+ // The listener to refresh the common viewer when properties change.
+ private IPropertyChangeListener commonViewerListener;
+ // The viewer inputs that have been added a property change listener.
+ private Set<IViewerInput> viewerInputs;
+ // The viewer
+ private TreeViewer viewer;
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.viewers.IContentProvider#dispose()
+ */
+ @Override
+ public void dispose() {
+ for(IViewerInput viewerInput : viewerInputs) {
+ viewerInput.removePropertyChangeListener(commonViewerListener);
+ }
+ }
+
+ /**
+ * Get the filtered children of the parent using the
+ * filters registered in the viewer.
+ *
+ * @param parent The parent element.
+ * @return The children after filtering.
+ */
+ private Object[] getFilteredChildren(Object parent) {
+ Object[] result = getChildren(parent);
+ ViewerFilter[] filters = viewer.getFilters();
+ if (filters != null) {
+ for (ViewerFilter filter : filters) {
+ Object[] filteredResult = filter.filter(viewer, parent, result);
+ result = filteredResult;
+ }
+ }
+ return result;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
+ */
+ @Override
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ Assert.isTrue(viewer instanceof TreeViewer);
+ this.viewer = (TreeViewer) viewer;
+ commonViewerListener = new CommonViewerListener(this.viewer);
+ viewerInputs = Collections.synchronizedSet(new HashSet<IViewerInput>());
+ }
+
+ /**
+ * Install a property change listener to the specified element.
+ *
+ * @param element The element node.
+ */
+ protected void installPropertyChangeListener(Object element) {
+ IViewerInput viewerInput = ViewerStateManager.getViewerInput(element);
+ if(viewerInput != null && !viewerInputs.contains(viewerInput)) {
+ viewerInput.addPropertyChangeListener(commonViewerListener);
+ viewerInputs.add(viewerInput);
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object)
+ */
+ @Override
+ public boolean hasChildren(Object element) {
+ Object[] children = getFilteredChildren(element);
+ return children != null && children.length > 0;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ITreeContentProvider#getElements(java.lang.Object)
+ */
+ @Override
+ public Object[] getElements(Object inputElement) {
+ return getChildren(inputElement);
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeControl.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeControl.java
new file mode 100644
index 000000000..f00636c98
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeControl.java
@@ -0,0 +1,176 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.trees;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.swt.dnd.DragSourceListener;
+import org.eclipse.swt.dnd.DropTargetListener;
+import org.eclipse.swt.dnd.Transfer;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.IWorkbenchPart;
+
+/**
+ * A declarative tree control implementation that extends AbstractTreeControl.
+ */
+public class TreeControl extends AbstractTreeControl {
+ // The tree viewer's id.
+ private String viewerId;
+ // The extension parser that parse the viewer extension.
+ private TreeViewerExtension viewerExtension;
+ // The viewer descriptor parsed from the viewer extensions
+ private ViewerDescriptor viewerDescriptor;
+
+ /**
+ * Create an instance of TreeControl with a viewerId.
+ *
+ * @param viewerId The viewer id.
+ */
+ public TreeControl(String viewerId) {
+ super();
+ this.viewerId = viewerId;
+ initialize();
+ }
+
+ /**
+ * Create an instance of TreeControl with a viewerId in a workbench part.
+ *
+ * @param viewerId The viewer id.
+ * @param parentPart the workbench part in which the tree control is created.
+ */
+ public TreeControl(String viewerId, IWorkbenchPart parentPart) {
+ super(parentPart);
+ this.viewerId = viewerId;
+ initialize();
+ }
+
+ /**
+ * Parse and initialze the tree control.
+ */
+ private void initialize() {
+ viewerExtension = new TreeViewerExtension(viewerId);
+ viewerDescriptor = viewerExtension.parseViewer();
+ Assert.isNotNull(viewerExtension);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.trees.AbstractTreeControl#doCreateTreeViewer(org.eclipse.swt.widgets.Composite)
+ */
+ @Override
+ protected TreeViewer doCreateTreeViewer(Composite parent) {
+ Assert.isNotNull(parent);
+ IConfigurationElement configuration = viewerDescriptor.getStyleConfig();
+ if(configuration != null) {
+ int style = viewerExtension.parseStyle(configuration);
+ if(style != -1)
+ return new TreeViewer(parent, style);
+ }
+ return super.doCreateTreeViewer(parent);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.trees.AbstractTreeControl#configureTreeViewer(org.eclipse.jface.viewers.TreeViewer)
+ */
+ @Override
+ protected void configureTreeViewer(TreeViewer viewer) {
+ super.configureTreeViewer(viewer);
+ IConfigurationElement configuration = viewerDescriptor.getDragConfig();
+ if(configuration != null) {
+ int operations = viewerExtension.parseDnd(configuration);
+ Transfer[] transferTypes = viewerExtension.parseTransferTypes(configuration);
+ DragSourceListener listener = viewerExtension.parseDragSourceListener(viewer, configuration);
+ viewer.addDragSupport(operations, transferTypes, listener);
+ }
+ configuration = viewerDescriptor.getDropConfig();
+ if(configuration != null) {
+ int operations = viewerExtension.parseDnd(configuration);
+ Transfer[] transferTypes = viewerExtension.parseTransferTypes(configuration);
+ DropTargetListener adapter = viewerExtension.parseDropTargetListener(viewer, configuration);
+ viewer.addDropSupport(operations, transferTypes, adapter);
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.trees.AbstractTreeControl#getViewerId()
+ */
+ @Override
+ protected String getViewerId() {
+ return viewerId;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.trees.AbstractTreeControl#doCreateTreeViewerContentProvider(org.eclipse.jface.viewers.TreeViewer)
+ */
+ @Override
+ protected ITreeContentProvider doCreateTreeViewerContentProvider(TreeViewer viewer) {
+ return viewerDescriptor.getContentProvider();
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.trees.AbstractTreeControl#doCreateTreeViewerSelectionChangedListener(org.eclipse.jface.viewers.TreeViewer)
+ */
+ @Override
+ protected ISelectionChangedListener doCreateTreeViewerSelectionChangedListener(TreeViewer viewer) {
+ return null;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.trees.AbstractTreeControl#isStatePersistent()
+ */
+ @Override
+ protected boolean isStatePersistent() {
+ return viewerDescriptor.isPersistent();
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.trees.AbstractTreeControl#getHelpId()
+ */
+ @Override
+ protected String getHelpId() {
+ return viewerDescriptor.getHelpId();
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.trees.AbstractTreeControl#getAutoExpandLevel()
+ */
+ @Override
+ protected int getAutoExpandLevel() {
+ return viewerDescriptor.getAutoExpandLevel();
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.trees.AbstractTreeControl#getDoubleClickCommandId()
+ */
+ @Override
+ protected String getDoubleClickCommandId() {
+ return viewerDescriptor.getDoubleClickCommand();
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.trees.AbstractTreeControl#getContextMenuId()
+ */
+ @Override
+ protected String getContextMenuId() {
+ return viewerDescriptor.getContextMenuId();
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeViewerComparator.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeViewerComparator.java
new file mode 100644
index 000000000..a6c5d23d5
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeViewerComparator.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.trees;
+
+import java.util.Comparator;
+
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerComparator;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.swt.widgets.TreeColumn;
+
+
+/**
+ * The tree control viewer comparator implementation.
+ */
+public class TreeViewerComparator extends ViewerComparator {
+
+ /**
+ * Constructor.
+ *
+ * @param viewer The parent viewer. Must not be <code>null</code>.
+ * @param labelProvider The label provider. Must not be <code>null</code>.
+ */
+ public TreeViewerComparator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ViewerComparator#compare(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
+ */
+ @SuppressWarnings({ "rawtypes", "unchecked" })
+ @Override
+ public int compare(Viewer viewer, Object e1, Object e2) {
+ Tree tree = ((TreeViewer) viewer).getTree();
+ int inverter = tree.getSortDirection() == SWT.DOWN ? -1 : 1;
+ TreeColumn treeColumn = tree.getSortColumn();
+ if(treeColumn == null) {
+ // If the sort column is not set, then use the first column.
+ treeColumn = tree.getColumn(0);
+ }
+ if (treeColumn != null && !treeColumn.isDisposed()) {
+ ColumnDescriptor column = (ColumnDescriptor) treeColumn.getData();
+ if (column != null) {
+ Comparator comparator = column.getComparator();
+ if (comparator != null) {
+ return inverter * comparator.compare(e1, e2);
+ }
+ }
+ }
+ return inverter * super.compare(viewer, e1, e2);
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/controls/FSTreeDecoratingLabelProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeViewerDecoratingLabelProvider.java
index 0b07e5f02..1f660d782 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/controls/FSTreeDecoratingLabelProvider.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeViewerDecoratingLabelProvider.java
@@ -6,9 +6,8 @@
*
* Contributors:
* Wind River Systems - initial API and implementation
- * William Chen (Wind River)- [345552] Edit the remote files with a proper editor
*******************************************************************************/
-package org.eclipse.tm.te.tcf.filesystem.controls;
+package org.eclipse.tcf.te.ui.trees;
import org.eclipse.jface.viewers.DecoratingLabelProvider;
import org.eclipse.jface.viewers.ILabelDecorator;
@@ -23,10 +22,10 @@ import org.eclipse.swt.graphics.Image;
* provided by the nested label provider.
*
*/
-public class FSTreeDecoratingLabelProvider extends DecoratingLabelProvider implements ITableLabelProvider {
+public class TreeViewerDecoratingLabelProvider extends DecoratingLabelProvider implements ITableLabelProvider {
//The label provider for the execution context viewer.
- private FSTreeLabelProvider fProvider;
+ private TreeViewerLabelProvider fProvider;
//The label decorator decorating the above label provider.
private ILabelDecorator fDecorator;
@@ -36,7 +35,7 @@ public class FSTreeDecoratingLabelProvider extends DecoratingLabelProvider imple
* @param provider The label provider to be decorated.
* @param decorator The label decorator.
*/
- public FSTreeDecoratingLabelProvider(FSTreeLabelProvider provider, ILabelDecorator decorator) {
+ public TreeViewerDecoratingLabelProvider(TreeViewerLabelProvider provider, ILabelDecorator decorator) {
super(provider, decorator);
fProvider = provider;
fDecorator = decorator;
@@ -87,5 +86,4 @@ public class FSTreeDecoratingLabelProvider extends DecoratingLabelProvider imple
}
return text;
}
-
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeViewerEditorActivationStrategy.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeViewerEditorActivationStrategy.java
new file mode 100644
index 000000000..a5daf676e
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeViewerEditorActivationStrategy.java
@@ -0,0 +1,171 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.trees;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.expressions.EvaluationContext;
+import org.eclipse.core.expressions.EvaluationResult;
+import org.eclipse.core.expressions.Expression;
+import org.eclipse.core.expressions.ExpressionConverter;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtensionPoint;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.SafeRunner;
+import org.eclipse.jface.util.SafeRunnable;
+import org.eclipse.jface.viewers.ColumnViewerEditorActivationEvent;
+import org.eclipse.jface.viewers.ColumnViewerEditorActivationStrategy;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.tcf.te.ui.interfaces.IViewerCellEditorFactory;
+
+/**
+ * <code>TreeViewerEditorActivationStrategy</code> is a subclass of
+ * <code>ColumnViewerEditorActivationStrategy</code> that parses the extensions of
+ * "org.eclipse.tcf.te.ui.cellEditors" for Target Explorer, creating a map of
+ * <code>IViewerCellEditorFactory</code> with the activation expressions. When requested to judge if
+ * a <code>ColumnViewerEditorActivationEvent</code> triggers the cell editing in method
+ * <code>isEditorActivationEvent</code>, it traverses the map and finds an appropriate cell editor
+ * factory by evaluating its activation expression. If such a factory is found, add the cell editing
+ * support to Target Explorer viewer with it and return true to activate the cell editing. If no
+ * such a factory is found, then return false to deactivate the cell editing.
+ */
+public class TreeViewerEditorActivationStrategy extends ColumnViewerEditorActivationStrategy {
+ // The extension point id.
+ private static final String EXTENSION_POINT_ID = "org.eclipse.tcf.te.ui.cellEditors"; //$NON-NLS-1$
+ // The common viewer's id.
+ String viewerId;
+ // The common viewer to add editing support.
+ TreeViewer viewer;
+ // The registered cell editor factories map.
+ Map<Expression, IViewerCellEditorFactory> factories;
+
+ /**
+ * Create an instance with the specified viewer id and the common viewer.
+ *
+ * @param viewerId
+ * @param viewer
+ */
+ public TreeViewerEditorActivationStrategy(String viewerId, TreeViewer viewer) {
+ super(viewer);
+ Assert.isNotNull(viewerId);
+ this.viewerId = viewerId;
+ this.viewer = viewer;
+ loadFactories();
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ColumnViewerEditorActivationStrategy#isEditorActivationEvent(org.eclipse.jface.viewers.ColumnViewerEditorActivationEvent)
+ */
+ @Override
+ protected boolean isEditorActivationEvent(ColumnViewerEditorActivationEvent event) {
+ IViewerCellEditorFactory factory = getFactory(event);
+ if (factory != null) {
+ // If an appropriate factory is found, initialize the cell editors.
+ viewer.setColumnProperties(factory.getColumnProperties());
+ viewer.setCellEditors(factory.getCellEditors());
+ viewer.setCellModifier(factory.getCellModifier());
+ }
+ return factory != null;
+ }
+
+ /**
+ * Get an appropriate cell editor factory based on the event and the current
+ * selection in the viewer.
+ *
+ * @param event the event triggering the action
+ * @return The cell editor factory is appropriate.
+ */
+ private IViewerCellEditorFactory getFactory(ColumnViewerEditorActivationEvent event) {
+ // Prepare the evaluation context.
+ ISelection selection = viewer.getSelection();
+ final EvaluationContext context = new EvaluationContext(null, selection);
+ context.addVariable("selection", selection); //$NON-NLS-1$
+ context.addVariable("event", event); //$NON-NLS-1$
+ final IViewerCellEditorFactory[] result = new IViewerCellEditorFactory[1];
+ for (Expression expression : factories.keySet()) {
+ final Expression exp = expression;
+ SafeRunner.run(new SafeRunnable() {
+ @Override
+ public void run() throws Exception {
+ EvaluationResult evaluate = exp.evaluate(context);
+ if (evaluate == EvaluationResult.TRUE) {
+ result[0] = factories.get(exp);
+ }
+ }
+ });
+ if (result[0] != null) return result[0];
+ }
+ return null;
+ }
+
+ /**
+ * Load the currently registered cell editor factories.
+ */
+ private void loadFactories() {
+ factories = Collections.synchronizedMap(new HashMap<Expression, IViewerCellEditorFactory>());
+ IExtensionRegistry registry = Platform.getExtensionRegistry();
+ IExtensionPoint extensionPoint = registry.getExtensionPoint(EXTENSION_POINT_ID);
+ IConfigurationElement[] configurations = extensionPoint.getConfigurationElements();
+ for (IConfigurationElement configuration : configurations) {
+ String name = configuration.getName();
+ if ("cellEditor".equals(name)) { //$NON-NLS-1$
+ if (isApplicable(configuration)) {
+ addFactory(configuration);
+ }
+ }
+ }
+ }
+
+ /**
+ * If the configuration has a contribution viewer that has the same id with the specified viewerId.
+ *
+ * @param configuration The cellEditor element.
+ * @return true if it has a specified viewer element.
+ */
+ private boolean isApplicable(IConfigurationElement configuration) {
+ IConfigurationElement[] children = configuration.getChildren("contributeTo"); //$NON-NLS-1$
+ for(IConfigurationElement child : children) {
+ String viewerId = child.getAttribute("viewerId"); //$NON-NLS-1$
+ if(this.viewerId.equals(viewerId))
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Create and add the cell editor factory that is defined in the configuration element
+ * into the map.
+ * @param configuration The configuration element that defines the cell editor factory.
+ */
+ private void addFactory(final IConfigurationElement configuration) {
+ IConfigurationElement[] children = configuration.getChildren("activation"); //$NON-NLS-1$
+ Assert.isTrue(children != null && children.length == 1);
+ children = children[0].getChildren();
+ Assert.isTrue(children != null && children.length == 1);
+ final IConfigurationElement config = children[0];
+ SafeRunner.run(new SafeRunnable() {
+ @Override
+ public void run() throws Exception {
+ Expression expression = ExpressionConverter.getDefault().perform(config);
+ IViewerCellEditorFactory factory = (IViewerCellEditorFactory) configuration.createExecutableExtension("editorFactory"); //$NON-NLS-1$
+ if (expression != null && factory != null) {
+ factory.init(viewer);
+ factories.put(expression, factory);
+ }
+ }
+ });
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeViewerExtension.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeViewerExtension.java
new file mode 100644
index 000000000..bcd57c670
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeViewerExtension.java
@@ -0,0 +1,592 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.trees;
+
+import java.lang.reflect.Constructor;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+import java.util.concurrent.atomic.AtomicReference;
+
+import org.eclipse.core.expressions.EvaluationContext;
+import org.eclipse.core.expressions.EvaluationResult;
+import org.eclipse.core.expressions.Expression;
+import org.eclipse.core.expressions.ExpressionConverter;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtensionPoint;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.SafeRunner;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.util.LocalSelectionTransfer;
+import org.eclipse.jface.util.SafeRunnable;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.dnd.DND;
+import org.eclipse.swt.dnd.DragSourceListener;
+import org.eclipse.swt.dnd.DropTargetListener;
+import org.eclipse.swt.dnd.FileTransfer;
+import org.eclipse.swt.dnd.ImageTransfer;
+import org.eclipse.swt.dnd.TextTransfer;
+import org.eclipse.swt.dnd.Transfer;
+import org.eclipse.swt.graphics.Image;
+import org.osgi.framework.Bundle;
+
+/**
+ * The implementation of the tree viewer extension which is used to parse
+ * the columns and the filters declared in this extension for a specified tree viewer.
+ */
+public class TreeViewerExtension {
+ // The extension point id constant.
+ private static final String EXTENSION_POINT_ID = "org.eclipse.tcf.te.ui.viewers"; //$NON-NLS-1$
+ // The id of the tree viewer for which the extension is parsed.
+ private String viewerId;
+
+ /**
+ * Create an instance and parse all tree viewer extensions to get the
+ * column descriptors and filter descriptors for the specified viewer.
+ *
+ * @param viewerId The tree viewer's id.
+ * @param viewer The tree viewer to parse the extension for.
+ */
+ public TreeViewerExtension(String viewerId) {
+ this.viewerId = viewerId;
+ }
+
+ /**
+ * Parse the viewer extensions and return the descriptor of the tree viewer.
+ *
+ * @return The viewer descriptor.
+ */
+ public ViewerDescriptor parseViewer() {
+ Assert.isNotNull(viewerId);
+ IExtensionRegistry registry = Platform.getExtensionRegistry();
+ IExtensionPoint extensionPoint = registry.getExtensionPoint(EXTENSION_POINT_ID);
+ IConfigurationElement[] configurations = extensionPoint.getConfigurationElements();
+ for (IConfigurationElement configuration : configurations) {
+ String name = configuration.getName();
+ if ("viewer".equals(name)) { //$NON-NLS-1$
+ String id = configuration.getAttribute("id"); //$NON-NLS-1$
+ if (viewerId.equals(id)) {
+ return createViewerDescriptor(configuration);
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Create a viewer descriptor from the given configuration element.
+ *
+ * @param configuration The configuration element that defines the viewer.
+ * @return The viewer descriptor.
+ */
+ private ViewerDescriptor createViewerDescriptor(final IConfigurationElement configuration) {
+ final ViewerDescriptor descriptor = new ViewerDescriptor();
+ IConfigurationElement[] children = configuration.getChildren("creation"); //$NON-NLS-1$
+ if (children != null && children.length > 0) {
+ Assert.isTrue(children.length == 1);
+ descriptor.setStyleConfig(children[0]);
+ }
+ children = configuration.getChildren("dragSupport"); //$NON-NLS-1$
+ if (children != null && children.length > 0) {
+ Assert.isTrue(children.length == 1);
+ descriptor.setDragConfig(children[0]);
+ }
+ children = configuration.getChildren("dropSupport"); //$NON-NLS-1$
+ if (children != null && children.length > 0) {
+ Assert.isTrue(children.length == 1);
+ descriptor.setDropConfig(children[0]);
+ }
+ SafeRunner.run(new SafeRunnable() {
+ @Override
+ public void run() throws Exception {
+ ITreeContentProvider contentProvider = (ITreeContentProvider) configuration.createExecutableExtension("contentProvider"); //$NON-NLS-1$
+ descriptor.setContentProvider(contentProvider);
+ }
+ });
+ String value = configuration.getAttribute("persistent"); //$NON-NLS-1$
+ if (value != null) {
+ descriptor.setPersistent(Boolean.valueOf(value).booleanValue());
+ }
+ value = configuration.getAttribute("autoExpandLevel"); //$NON-NLS-1$
+ if (value != null) {
+ try {
+ int level = Integer.parseInt(value);
+ descriptor.setAutoExpandLevel(level);
+ }
+ catch (NumberFormatException nfe) {
+ }
+ }
+ value = configuration.getAttribute("menuId"); //$NON-NLS-1$
+ if (value != null) {
+ descriptor.setContextMenuId(value);
+ }
+ value = configuration.getAttribute("doubleClickCommand"); //$NON-NLS-1$
+ if (value != null) {
+ descriptor.setDoubleClickCommand(value);
+ }
+ value = configuration.getAttribute("helpId"); //$NON-NLS-1$
+ if (value != null) {
+ descriptor.setHelpId(value);
+ }
+ return descriptor;
+ }
+
+ /**
+ * Parse the column declarations of this extension point and return the
+ * column descriptors.
+ *
+ * @param input The input used to initialize the columns.
+ * @return The column descriptors from this extension point.
+ */
+ public ColumnDescriptor[] parseColumns(Object input) {
+ Assert.isNotNull(viewerId);
+ List<ColumnDescriptor> columns = Collections.synchronizedList(new ArrayList<ColumnDescriptor>());
+ IExtensionRegistry registry = Platform.getExtensionRegistry();
+ IExtensionPoint extensionPoint = registry.getExtensionPoint(EXTENSION_POINT_ID);
+ IConfigurationElement[] configurations = extensionPoint.getConfigurationElements();
+ for (IConfigurationElement configuration : configurations) {
+ String name = configuration.getName();
+ if ("columnContribution".equals(name)) { //$NON-NLS-1$
+ String aViewerId = configuration.getAttribute("viewerId"); //$NON-NLS-1$
+ if (viewerId.equals(aViewerId)) {
+ IConfigurationElement[] children = configuration.getChildren("column"); //$NON-NLS-1$
+ if (children != null && children.length > 0) {
+ for (IConfigurationElement child : children) {
+ createColumnDescriptor(input, columns, child);
+ }
+ }
+ }
+ }
+ }
+ return columns.toArray(new ColumnDescriptor[columns.size()]);
+ }
+
+ /**
+ * Parse the viewer filter declarations of this extension point and return the
+ * filter descriptors.
+ *
+ * @param input the new input
+ * @return The column descriptors from this extension point.
+ */
+ public FilterDescriptor[] parseFilters(Object input) {
+ Assert.isNotNull(viewerId);
+ List<FilterDescriptor> descriptors = Collections.synchronizedList(new ArrayList<FilterDescriptor>());
+ IExtensionRegistry registry = Platform.getExtensionRegistry();
+ IExtensionPoint extensionPoint = registry.getExtensionPoint(EXTENSION_POINT_ID);
+ IConfigurationElement[] configurations = extensionPoint.getConfigurationElements();
+ for (IConfigurationElement configuration : configurations) {
+ String name = configuration.getName();
+ if ("filterContribution".equals(name)) { //$NON-NLS-1$
+ String aViewerId = configuration.getAttribute("viewerId"); //$NON-NLS-1$
+ if (viewerId.equals(aViewerId)) {
+ IConfigurationElement[] children = configuration.getChildren("filter"); //$NON-NLS-1$
+ if (children != null && children.length > 0) {
+ for (IConfigurationElement child : children) {
+ createFilterDescriptor(input, descriptors, child);
+ }
+ }
+ }
+ }
+ }
+ return descriptors.toArray(new FilterDescriptor[descriptors.size()]);
+ }
+
+ /**
+ * Create an filter descriptor from the specified configuration element and
+ * add it to the filter list.
+ *
+ * @param input the input of the viewer to initialize the descriptors.
+ * @param descriptors The filter list to add the created descriptor to.
+ * @param configuration The extension configuration element to create the descriptor from.
+ */
+ private void createFilterDescriptor(Object input, List<FilterDescriptor> descriptors, final IConfigurationElement configuration) {
+ if (isElementActivated(input, configuration)) {
+ String id = configuration.getAttribute("id"); //$NON-NLS-1$
+ Assert.isNotNull(id);
+ final FilterDescriptor descriptor = new FilterDescriptor();
+ descriptor.setId(id);
+ descriptors.add(descriptor);
+ SafeRunner.run(new SafeRunnable() {
+ @Override
+ public void run() throws Exception {
+ initFilter(descriptor, configuration);
+ }
+ });
+ }
+ }
+
+ /**
+ * Initialize the filter descriptor from the specified configuration element.
+ *
+ * @param descriptor The new descriptor to be initialized.
+ * @param configuration The configuration element to initialize the filter.
+ * @throws CoreException Thrown during parsing.
+ */
+ void initFilter(FilterDescriptor descriptor, IConfigurationElement configuration) throws CoreException {
+ String attribute = configuration.getAttribute("name"); //$NON-NLS-1$
+ Assert.isNotNull(attribute);
+ descriptor.setName(attribute);
+ attribute = configuration.getAttribute("description"); //$NON-NLS-1$
+ if (attribute != null) {
+ descriptor.setDescription(attribute);
+ }
+ attribute = configuration.getAttribute("image"); //$NON-NLS-1$
+ if (attribute != null) {
+ String symbolicName = configuration.getContributor().getName();
+ URL resource = Platform.getBundle(symbolicName).getResource(attribute);
+ Image image = ImageDescriptor.createFromURL(resource).createImage();
+ descriptor.setImage(image);
+ }
+ attribute = configuration.getAttribute("enabled"); //$NON-NLS-1$
+ if (attribute != null) {
+ descriptor.setEnabled(Boolean.valueOf(attribute).booleanValue());
+ }
+ attribute = configuration.getAttribute("class"); //$NON-NLS-1$
+ Assert.isNotNull(attribute);
+ ViewerFilter filter = (ViewerFilter) configuration.createExecutableExtension("class"); //$NON-NLS-1$
+ Assert.isNotNull(filter);
+ descriptor.setFilter(filter);
+ }
+
+ /**
+ * Create a column descriptor from the specified configuration element and add it to
+ * the column descriptor list.
+ *
+ * @param input the new input.
+ * @param columns The column descriptor.
+ * @param configuration The configuration element to read the descriptor from.
+ */
+ private void createColumnDescriptor(Object input, final List<ColumnDescriptor> columns, final IConfigurationElement configuration) {
+ if (isElementActivated(input, configuration)) {
+ String id = configuration.getAttribute("id"); //$NON-NLS-1$
+ Assert.isNotNull(id);
+ final ColumnDescriptor column = new ColumnDescriptor(id);
+ columns.add(column);
+ SafeRunner.run(new SafeRunnable() {
+ @Override
+ public void run() throws Exception {
+ initColumn(column, configuration);
+ column.setOrder(columns.size());
+ }
+ });
+ }
+ }
+
+ /**
+ * If the specified configuration element is activated under the current input.
+ *
+ * @param input The input object.
+ * @param configuration The configuration element that defines the activation element.
+ * @return true if it is activated.
+ */
+ private boolean isElementActivated(Object input, final IConfigurationElement configuration) {
+ IConfigurationElement[] children = configuration.getChildren("activation"); //$NON-NLS-1$
+ if(children == null || children.length == 0)
+ return true;
+ children = children[0].getChildren();
+ if(children == null || children.length == 0)
+ return true;
+ final IConfigurationElement config = children[0];
+ final EvaluationContext context = new EvaluationContext(null, input);
+ context.addVariable("input", input); //$NON-NLS-1$
+ final boolean[] result = new boolean[1];
+ SafeRunner.run(new SafeRunnable() {
+ @Override
+ public void run() throws Exception {
+ Expression expression = ExpressionConverter.getDefault().perform(config);
+ EvaluationResult evaluate = expression.evaluate(context);
+ if (evaluate == EvaluationResult.TRUE) {
+ result[0] = true;
+ }
+ }
+ });
+ return result[0];
+ }
+
+ /**
+ * Initialize the column descriptor by reading the attributes from the configuration element.
+ *
+ * @param column The column descriptor to be initialized.
+ * @param configuration The configuration element.
+ * @throws CoreException Thrown during parsing.
+ */
+ @SuppressWarnings("rawtypes")
+ void initColumn(ColumnDescriptor column, IConfigurationElement configuration) throws CoreException {
+ String name = configuration.getAttribute("name"); //$NON-NLS-1$
+ Assert.isNotNull(name);
+ column.setName(name);
+ column.setDescription(configuration.getAttribute("description")); //$NON-NLS-1$
+ String attribute = configuration.getAttribute("moveable"); //$NON-NLS-1$
+ if (attribute != null) {
+ column.setMoveable(Boolean.valueOf(attribute).booleanValue());
+ }
+ attribute = configuration.getAttribute("resizable"); //$NON-NLS-1$
+ if (attribute != null) {
+ column.setResizable(Boolean.valueOf(attribute).booleanValue());
+ }
+ attribute = configuration.getAttribute("visible"); //$NON-NLS-1$
+ if (attribute != null) {
+ column.setVisible(Boolean.valueOf(attribute).booleanValue());
+ }
+ attribute = configuration.getAttribute("style"); //$NON-NLS-1$
+ if (attribute != null) {
+ column.setStyle(parseAlignment(attribute));
+ }
+ attribute = configuration.getAttribute("alignment"); //$NON-NLS-1$
+ if (attribute != null) {
+ column.setAlignment(parseAlignment(attribute));
+ }
+ attribute = configuration.getAttribute("width"); //$NON-NLS-1$
+ if (attribute != null) {
+ try {
+ column.setWidth(Integer.parseInt(attribute));
+ }
+ catch (NumberFormatException e) {
+ }
+ }
+ attribute = configuration.getAttribute("image"); //$NON-NLS-1$
+ if (attribute != null) {
+ String symbolicName = configuration.getContributor().getName();
+ URL resource = Platform.getBundle(symbolicName).getResource(attribute);
+ Image image = ImageDescriptor.createFromURL(resource).createImage();
+ column.setImage(image);
+ }
+ attribute = configuration.getAttribute("labelProvider"); //$NON-NLS-1$
+ if (attribute != null) {
+ ILabelProvider labelProvider = (ILabelProvider) configuration.createExecutableExtension("labelProvider"); //$NON-NLS-1$
+ if (labelProvider != null) {
+ column.setLabelProvider(labelProvider);
+ }
+ }
+ attribute = configuration.getAttribute("comparator"); //$NON-NLS-1$
+ if (attribute != null) {
+ Comparator comparator = (Comparator) configuration.createExecutableExtension("comparator"); //$NON-NLS-1$
+ if (comparator != null) {
+ column.setComparator(comparator);
+ }
+ }
+ }
+
+ /**
+ * Parse the alignment attribute from a string to integer value.
+ *
+ * @param attribute The attribute value.
+ * @return The alignment/style value.
+ */
+ private int parseAlignment(String attribute) {
+ if ("SWT.LEFT".equals(attribute)) { //$NON-NLS-1$
+ return SWT.LEFT;
+ }
+ else if ("SWT.RIGHT".equals(attribute)) { //$NON-NLS-1$
+ return SWT.RIGHT;
+ }
+ else if ("SWT.CENTER".equals(attribute)) { //$NON-NLS-1$
+ return SWT.CENTER;
+ }
+ return SWT.NONE;
+ }
+
+ /**
+ * Parse the style name from a string to integer value.
+ *
+ * @param attribute The attribute value.
+ * @return The alignment/style value.
+ */
+ private int parseStyleName(String name) {
+ if ("SWT.NONE".equals(name)) { //$NON-NLS-1$
+ return SWT.NONE;
+ }
+ else if ("SWT.SINGLE".equals(name)) { //$NON-NLS-1$
+ return SWT.SINGLE;
+ }
+ else if ("SWT.MULTI".equals(name)) { //$NON-NLS-1$
+ return SWT.MULTI;
+ }
+ else if ("SWT.CHECK".equals(name)) { //$NON-NLS-1$
+ return SWT.CHECK;
+ }
+ else if ("SWT.FULL_SELECTION".equals(name)) { //$NON-NLS-1$
+ return SWT.FULL_SELECTION;
+ }
+ else if ("SWT.VIRTUAL".equals(name)) { //$NON-NLS-1$
+ return SWT.VIRTUAL;
+ }
+ else if ("SWT.NO_SCROLL".equals(name)) { //$NON-NLS-1$
+ return SWT.NO_SCROLL;
+ }
+ return SWT.NONE;
+ }
+
+ /**
+ * Parse the DND operation style and return a operation.
+ *
+ * @param name The name of the DND operation.
+ * @return an integer that represents the operation.
+ */
+ private int parseDndOp(String name) {
+ if("DND.DROP_COPY".equals(name)) { //$NON-NLS-1$
+ return DND.DROP_COPY;
+ }
+ else if("DND.DROP_MOVE".equals(name)) { //$NON-NLS-1$
+ return DND.DROP_MOVE;
+ }
+ else if("DND.DROP_LINK".equals(name)) { //$NON-NLS-1$
+ return DND.DROP_LINK;
+ }
+ return 0;
+ }
+
+ /**
+ * Parse and calculate the style from the give configuration element.
+ *
+ * @param configuration The configuration element that defines the styles.
+ * @return An integer that represents the defined styles.
+ */
+ public int parseStyle(IConfigurationElement configuration) {
+ IConfigurationElement[] children = configuration.getChildren();
+ int style = SWT.NONE;
+ for(IConfigurationElement child : children) {
+ String name = child.getAttribute("name"); //$NON-NLS-1$
+ style |= parseStyleName(name);
+ }
+ return style;
+ }
+
+ /**
+ * Parse the DND operation including DROP_COPY,
+ * DROP_MOVE, DROP_LINK
+ *
+ * @param configuration The configuration element in which the DND operation is defined.
+ * @return The operations.
+ */
+ public int parseDnd(IConfigurationElement configuration) {
+ IConfigurationElement[] children = configuration.getChildren("operations"); //$NON-NLS-1$
+ Assert.isTrue(children != null && children.length == 1);
+ children = children[0].getChildren();
+ int operations = 0;
+ for(IConfigurationElement child : children) {
+ String name = child.getAttribute("name"); //$NON-NLS-1$
+ operations |= parseDndOp(name);
+ }
+ return operations;
+ }
+
+ /**
+ * Parse the transfer type from the give configuration element.
+ *
+ * @param configuration The configuration element.
+ * @return An array of transfer object that represents the transfer types.
+ */
+ public Transfer[] parseTransferTypes(IConfigurationElement configuration) {
+ List<Transfer> transferTypes = new ArrayList<Transfer>();
+ IConfigurationElement[] children = configuration.getChildren("transferTypes"); //$NON-NLS-1$
+ Assert.isTrue(children != null && children.length == 1);
+ children = children[0].getChildren();
+ for(IConfigurationElement child : children) {
+ String name = child.getAttribute("name"); //$NON-NLS-1$
+ Transfer transfer = parseTransferType(name);
+ if (transfer != null) transferTypes.add(transfer);
+ }
+ return transferTypes.toArray(new Transfer[transferTypes.size()]);
+ }
+
+ /**
+ * Translate the transfer type from this element.
+ *
+ * @param name The attribute name.
+ * @return The transfer instance.
+ */
+ private Transfer parseTransferType(String name) {
+ if("TextTransfer".equals(name)) { //$NON-NLS-1$
+ return TextTransfer.getInstance();
+ }
+ if("ImageTransfer".equals(name)) { //$NON-NLS-1$
+ return ImageTransfer.getInstance();
+ }
+ if("FileTransfer".equals(name)) { //$NON-NLS-1$
+ return FileTransfer.getInstance();
+ }
+ if("LocalSelectionTransfer".equals(name)) { //$NON-NLS-1$
+ return LocalSelectionTransfer.getTransfer();
+ }
+ return null;
+ }
+
+ /**
+ * Parse a DragSourceListener and return its instance.
+ *
+ * @param viewer The tree viewer to create an element.
+ * @param configuration The configuration that wraps the instance.
+ * @return The drag source listener created.
+ */
+ public DragSourceListener parseDragSourceListener(final TreeViewer viewer, final IConfigurationElement configuration) {
+ final AtomicReference<DragSourceListener> reference = new AtomicReference<DragSourceListener>();
+ SafeRunner.run(new SafeRunnable(){
+ @Override
+ public void run() throws Exception {
+ reference.set((DragSourceListener) createExecutableExtension(DragSourceListener.class, viewer, configuration));
+ }});
+ return reference.get();
+ }
+
+ /**
+ * Create an executable instance from the given configuration element, with the tree viewer
+ * as the constructor parameter.
+ *
+ * @param aInterface The interface of the element should implement.
+ * @param viewer The tree viewer to be passed
+ * @param configuration The configuration element.
+ * @return The object created.
+ * @throws Exception
+ */
+ Object createExecutableExtension(Class<?> aInterface, TreeViewer viewer, IConfigurationElement configuration) throws Exception{
+ String classname = configuration.getAttribute("class"); //$NON-NLS-1$
+ Assert.isNotNull(classname);
+ String contributorId = configuration.getContributor().getName();
+ Bundle bundle = Platform.getBundle(contributorId);
+ Assert.isNotNull(bundle);
+ Class<?> clazz = bundle.loadClass(classname);
+ Assert.isTrue(aInterface.isAssignableFrom(clazz));
+ try {
+ Constructor<?> constructor = clazz.getConstructor(TreeViewer.class);
+ return constructor.newInstance(viewer);
+ }
+ catch (NoSuchMethodException e) {
+ Constructor<?> constructor = clazz.getConstructor();
+ return constructor.newInstance();
+ }
+ }
+
+ /**
+ * Parse a DropTargetListener and return its instance.
+ *
+ * @param viewer The tree viewer to create an element.
+ * @param configuration The configuration that wraps the instance.
+ * @return The drop target listener created.
+ */
+ public DropTargetListener parseDropTargetListener(final TreeViewer viewer, final IConfigurationElement configuration) {
+ final AtomicReference<DropTargetListener> reference = new AtomicReference<DropTargetListener>();
+ SafeRunner.run(new SafeRunnable(){
+ @Override
+ public void run() throws Exception {
+ reference.set((DropTargetListener) createExecutableExtension(DropTargetListener.class, viewer, configuration));
+ }});
+ return reference.get();
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeViewerHeaderMenu.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeViewerHeaderMenu.java
new file mode 100644
index 000000000..7027451db
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeViewerHeaderMenu.java
@@ -0,0 +1,133 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.trees;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.MenuItem;
+import org.eclipse.swt.widgets.Tree;
+
+/**
+ * The header context menu for the execution context viewer. This context menu
+ * provides the list of columns that users can configure them by simply checking
+ * or unchecking them.
+ */
+public class TreeViewerHeaderMenu extends Menu implements SelectionListener, Listener, DisposeListener {
+ //The menu control used to configure the columns.
+ private Menu treeMenu;
+ //The tree to be configured.
+ private AbstractTreeControl treeControl;
+
+
+ /**
+ * Create a header menu for the execution context viewer.
+ *
+ * @param tree The execution context tree.
+ */
+ public TreeViewerHeaderMenu(AbstractTreeControl treeControl) {
+ super(treeControl.getViewer().getControl());
+ this.treeControl = treeControl;
+ Tree tree = (Tree) treeControl.getViewer().getControl();
+ tree.addListener(SWT.MenuDetect, this);
+ tree.addDisposeListener(this);
+ treeMenu = tree.getMenu();
+ }
+
+ /**
+ * Create the menu.
+ */
+ public void create() {
+ ColumnDescriptor[] columns = treeControl.getViewerColumns();
+ for (int i = 0; i < columns.length; i++) {
+ ColumnDescriptor column = columns[i];
+ MenuItem menuItem = new MenuItem(this, SWT.CHECK);
+ menuItem.setText(column.getName());
+ menuItem.setSelection(column.isVisible());
+ menuItem.addSelectionListener(this);
+ menuItem.setData(column);
+ menuItem.setEnabled(i != 0);
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+ */
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ MenuItem item = (MenuItem) e.getSource();
+ ColumnDescriptor column = (ColumnDescriptor) item.getData();
+ boolean visible = item.getSelection();
+ if (treeControl.setColumnVisible(column, visible)){
+ treeControl.columnMoved();
+ treeControl.getViewer().refresh();
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
+ */
+ @Override
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.swt.widgets.Listener#handleEvent(org.eclipse.swt.widgets.Event)
+ */
+ @Override
+ public void handleEvent(Event event) {
+ Tree t = (Tree) event.widget;
+ Point pt = t.getDisplay().map(null, t, event.x, event.y);
+ Rectangle clientArea = t.getClientArea();
+ boolean isHeader = ((pt.y - clientArea.y) <= t.getHeaderHeight());
+ t.setMenu(isHeader ? this : treeMenu);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.swt.events.DisposeListener#widgetDisposed(org.eclipse.swt.events.DisposeEvent)
+ */
+ @Override
+ public void widgetDisposed(DisposeEvent e) {
+ if (treeMenu != null && !treeMenu.isDisposed())
+ treeMenu.dispose();
+ if (!isDisposed())
+ dispose();
+ }
+
+ /**
+ * Override the super method to allow the subclassing.
+ */
+ @Override
+ protected void checkSubclass() {
+ }
+
+ /**
+ * Update the menu item's check state according to the new column's visibility.
+ */
+ public void updateSelection() {
+ ColumnDescriptor[] columns = treeControl.getViewerColumns();
+ for (int i = 0; i < columns.length; i++) {
+ MenuItem item = this.getItem(i);
+ ColumnDescriptor column = columns[i];
+ item.setSelection(column.isVisible());
+ }
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeViewerLabelProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeViewerLabelProvider.java
new file mode 100644
index 000000000..ad8601cea
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeViewerLabelProvider.java
@@ -0,0 +1,97 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.trees;
+
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.swt.widgets.TreeColumn;
+
+/**
+ * File system tree control label provider implementation.
+ */
+public class TreeViewerLabelProvider extends LabelProvider implements ITableLabelProvider {
+ // Reference to the parent tree viewer
+ private TreeViewer viewer;
+
+ /**
+ * Constructor.
+ *
+ * @param viewer The tree viewer or <code>null</code>.
+ */
+ public TreeViewerLabelProvider(TreeViewer viewer) {
+ super();
+ this.viewer = viewer;
+ }
+
+ /**
+ * Get the specific column's ColumnDescriptor object.
+ * <b>NOTE:</b> <em>The returned descriptor might be null, if the column is the
+ * padding column on linux host.</em>
+ *
+ * @param columnIndex the column index.
+ * @return The ColumnDescriptor object describing the column.
+ */
+ private ColumnDescriptor getColumn(int columnIndex) {
+ Tree tree = viewer.getTree();
+ TreeColumn column = tree.getColumn(columnIndex);
+ ColumnDescriptor descriptor = (ColumnDescriptor) column.getData();
+ return descriptor;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.LabelProvider#getText(java.lang.Object)
+ */
+ @Override
+ public String getText(Object element) {
+ return getColumnText(element, 0);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.LabelProvider#getImage(java.lang.Object)
+ */
+ @Override
+ public Image getImage(Object element) {
+ return getColumnImage(element, 0);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnImage(java.lang.Object, int)
+ */
+ @Override
+ public Image getColumnImage(Object element, int columnIndex) {
+ ColumnDescriptor column = getColumn(columnIndex);
+ if (column != null) {
+ ILabelProvider labelProvider = column.getLabelProvider();
+ if (labelProvider != null) {
+ return labelProvider.getImage(element);
+ }
+ }
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnText(java.lang.Object, int)
+ */
+ @Override
+ public String getColumnText(Object element, int columnIndex) {
+ ColumnDescriptor column = getColumn(columnIndex);
+ if (column != null) {
+ ILabelProvider labelProvider = column.getLabelProvider();
+ if (labelProvider != null) {
+ return labelProvider.getText(element);
+ }
+ }
+ return ""; //$NON-NLS-1$
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/trees/TreeViewerSorter.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeViewerSorter.java
index 9fad1ced0..b10acdc37 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/trees/TreeViewerSorter.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeViewerSorter.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.trees;
+package org.eclipse.tcf.te.ui.trees;
import java.util.Arrays;
import java.util.regex.Matcher;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeViewerState.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeViewerState.java
new file mode 100644
index 000000000..779aefe92
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeViewerState.java
@@ -0,0 +1,204 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.trees;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.ui.IMemento;
+
+/**
+ * The class to describe the tree viewer's state including the visiblity of the
+ * tree columns and the enablement of the viewer filters.
+ */
+class TreeViewerState {
+ // The state of the column's visibility.
+ private List<ColumnState> columns;
+ // The state of the filter's enablement.
+ private List<FilterState> filters;
+
+ /**
+ * Create an instance.
+ */
+ public TreeViewerState() {
+ columns = Collections.synchronizedList(new ArrayList<ColumnState>());
+ filters = Collections.synchronizedList(new ArrayList<FilterState>());
+ }
+
+ /**
+ * Restore the viewer's state using the specified memento.
+ *
+ * @param aMemento The memento to restore the viewer's state.
+ */
+ public void restoreState(IMemento aMemento) {
+ IMemento[] mColumns = aMemento.getChildren("column"); //$NON-NLS-1$
+ if (mColumns != null && mColumns.length > 0) {
+ for (IMemento mColumn : mColumns) {
+ String columnId = mColumn.getString("id"); //$NON-NLS-1$
+ Assert.isNotNull(columnId);
+ Boolean value = mColumn.getBoolean("visible"); //$NON-NLS-1$
+ boolean visible = value != null && value.booleanValue();
+ Integer integer = mColumn.getInteger("width"); //$NON-NLS-1$
+ int width = integer.intValue();
+ integer = mColumn.getInteger("order"); //$NON-NLS-1$
+ int order = integer.intValue();
+ ColumnState column = new ColumnState();
+ column.setColumnId(columnId);
+ column.setVisible(visible);
+ column.setWidth(width);
+ column.setOrder(order);
+ columns.add(column);
+ }
+ }
+ IMemento[] mFilters = aMemento.getChildren("filter"); //$NON-NLS-1$
+ if (mFilters != null && mFilters.length > 0) {
+ for (IMemento mFilter : mFilters) {
+ String filterId = mFilter.getString("id"); //$NON-NLS-1$
+ Assert.isNotNull(filterId);
+ Boolean value = mFilter.getBoolean("enabled"); //$NON-NLS-1$
+ boolean enabled = value != null && value.booleanValue();
+ FilterState filter = new FilterState();
+ filter.setFilterId(filterId);
+ filter.setEnabled(enabled);
+ filters.add(filter);
+ }
+ }
+ }
+
+ /**
+ * Save the viewer's state to the specified memento.
+ *
+ * @param aMemento The memento to save the viewer's state to.
+ */
+ public void saveState(IMemento aMemento) {
+ if (columns != null) {
+ for (ColumnState column : columns) {
+ String columnId = column.getColumnId();
+ IMemento mColumn = aMemento.createChild("column"); //$NON-NLS-1$
+ mColumn.putString("id", columnId); //$NON-NLS-1$
+ boolean visible = column.isVisible();
+ mColumn.putBoolean("visible", visible); //$NON-NLS-1$
+ int width = column.getWidth();
+ mColumn.putInteger("width", width); //$NON-NLS-1$
+ int order = column.getOrder();
+ mColumn.putInteger("order", order); //$NON-NLS-1$
+ }
+ }
+ if (filters != null) {
+ for (FilterState filter : filters) {
+ IMemento mFilter = aMemento.createChild("filter"); //$NON-NLS-1$
+ mFilter.putString("id", filter.getFilterId()); //$NON-NLS-1$
+ boolean enabled = filter.isEnabled();
+ mFilter.putBoolean("enabled", enabled); //$NON-NLS-1$
+ }
+ }
+ }
+
+ /**
+ * Add a column state based on the specified column descriptor.
+ *
+ * @param column The column's descriptor.
+ */
+ public void addColumn(ColumnDescriptor column) {
+ ColumnState state = new ColumnState();
+ state.setColumnId(column.getId());
+ state.setVisible(column.isVisible());
+ state.setWidth(column.getWidth());
+ state.setOrder(column.getOrder());
+ columns.add(state);
+ }
+
+ /**
+ * Add a filter state based on the specified filter descriptor.
+ *
+ * @param filter The filter's state.
+ */
+ public void addFilter(FilterDescriptor filter) {
+ FilterState state = new FilterState();
+ state.setFilterId(filter.getId());
+ state.setEnabled(filter.isEnabled());
+ filters.add(state);
+ }
+
+ /**
+ * Get the column's state in a list.
+ *
+ * @return The column's state list.
+ */
+ public List<ColumnState> getColumnStates() {
+ return columns;
+ }
+
+ /**
+ * Update the column descriptors using the current column states.
+ *
+ * @param columnDescriptors The column descriptors to be updated.
+ */
+ public void updateColumnDescriptor(ColumnDescriptor[] columnDescriptors) {
+ if (columnDescriptors != null) {
+ for(int i=0;i<columns.size();i++) {
+ ColumnDescriptor columnDescriptor = columnDescriptors[i];
+ ColumnState columnState = columns.get(i);
+ columnDescriptor.setVisible(columnState.isVisible());
+ columnDescriptor.setWidth(columnState.getWidth());
+ columnDescriptor.setOrder(columnState.getOrder());
+ }
+ }
+ }
+
+ /**
+ * Update the filter descriptors using the current filter states.
+ *
+ * @param filterDescriptors The filter descriptors to be updated.
+ */
+ public void updateFilterDescriptor(FilterDescriptor[] filterDescriptors) {
+ if (filterDescriptors != null) {
+ for (int i=0;i<filters.size();i++) {
+ FilterDescriptor filterDescriptor = filterDescriptors[i];
+ FilterState filterState = filters.get(i);
+ filterDescriptor.setEnabled(filterState.isEnabled());
+ }
+ }
+ }
+
+ /**
+ * Update the current column states using the specified column descriptors.
+ *
+ * @param columnDescriptors The column descriptors which are used to update the column states.
+ */
+ public void updateColumnState(ColumnDescriptor[] columnDescriptors) {
+ if(columnDescriptors != null) {
+ for(int i=0;i<columns.size();i++) {
+ ColumnDescriptor columnDescriptor = columnDescriptors[i];
+ ColumnState columnState = columns.get(i);
+ columnState.setVisible(columnDescriptor.isVisible());
+ columnState.setWidth(columnDescriptor.getWidth());
+ columnState.setOrder(columnDescriptor.getOrder());
+ }
+ }
+ }
+
+ /**
+ * Update the current filter states using the specified filter descriptors.
+ *
+ * @param filterDescriptors The filter descriptors which are used to update the filter states.
+ */
+ public void updateFilterState(FilterDescriptor[] filterDescriptors) {
+ if (filterDescriptors != null) {
+ for(int i=0;i<filters.size();i++) {
+ FilterDescriptor filterDescriptor = filterDescriptors[i];
+ FilterState filterState = filters.get(i);
+ filterState.setEnabled(filterDescriptor.isEnabled());
+ }
+ }
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/ViewerDescriptor.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/ViewerDescriptor.java
new file mode 100644
index 000000000..692df2567
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/ViewerDescriptor.java
@@ -0,0 +1,109 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.trees;
+
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+
+/**
+ * A data structure to describe a viewer.
+ */
+public class ViewerDescriptor {
+ // The style configuration element.
+ private IConfigurationElement styleConfig;
+ // The drag support configuration.
+ private IConfigurationElement dragConfig;
+ // The drop support configuration.
+ private IConfigurationElement dropConfig;
+ // The content provider for the tree viewer.
+ private ITreeContentProvider contentProvider;
+ // If the state of the tree viewer is persistent.
+ private boolean persistent = false;
+ // The auto expand level.
+ private int autoExpandLevel = 2;
+ // The context menu id.
+ private String menuId;
+ // The command invoked when double clicked.
+ private String doubleClickCommand;
+ // The help id of the tree viewer.
+ private String helpId;
+
+ public IConfigurationElement getStyleConfig() {
+ return styleConfig;
+ }
+
+ public void setStyleConfig(IConfigurationElement styleConfig) {
+ this.styleConfig = styleConfig;
+ }
+
+ public IConfigurationElement getDragConfig() {
+ return dragConfig;
+ }
+
+ public void setDragConfig(IConfigurationElement dragConfig) {
+ this.dragConfig = dragConfig;
+ }
+
+ public IConfigurationElement getDropConfig() {
+ return dropConfig;
+ }
+
+ public void setDropConfig(IConfigurationElement dropConfig) {
+ this.dropConfig = dropConfig;
+ }
+
+ public ITreeContentProvider getContentProvider() {
+ return contentProvider;
+ }
+
+ public void setContentProvider(ITreeContentProvider contentProvider) {
+ this.contentProvider = contentProvider;
+ }
+
+ public boolean isPersistent() {
+ return persistent;
+ }
+
+ public void setPersistent(boolean persistent) {
+ this.persistent = persistent;
+ }
+
+ public int getAutoExpandLevel() {
+ return autoExpandLevel;
+ }
+
+ public void setAutoExpandLevel(int autoExpandLevel) {
+ this.autoExpandLevel = autoExpandLevel;
+ }
+
+ public String getContextMenuId() {
+ return menuId;
+ }
+
+ public void setContextMenuId(String menuId) {
+ this.menuId = menuId;
+ }
+
+ public String getDoubleClickCommand() {
+ return doubleClickCommand;
+ }
+
+ public void setDoubleClickCommand(String doubleClickCommand) {
+ this.doubleClickCommand = doubleClickCommand;
+ }
+
+ public String getHelpId() {
+ return helpId;
+ }
+
+ public void setHelpId(String helpId) {
+ this.helpId = helpId;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/ViewerStateManager.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/ViewerStateManager.java
new file mode 100644
index 000000000..686731667
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/ViewerStateManager.java
@@ -0,0 +1,274 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.trees;
+
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.SafeRunner;
+import org.eclipse.jface.util.SafeRunnable;
+import org.eclipse.tcf.te.ui.activator.UIPlugin;
+import org.eclipse.tcf.te.ui.interfaces.IViewerInput;
+import org.eclipse.ui.IMemento;
+import org.eclipse.ui.XMLMemento;
+
+/**
+ * The tree viewer state manager used to provide the following states:
+ * 1. The viewers' state persistence.
+ * 2. Access the viewers' state.
+ */
+public class ViewerStateManager {
+ // The single instance to provide the management.
+ private static ViewerStateManager instance;
+
+ /**
+ * Get the single instance of the manager.
+ *
+ * @return The single instance of the viewer state manager.
+ */
+ public static ViewerStateManager getInstance() {
+ if (instance == null) {
+ instance = new ViewerStateManager();
+ }
+ return instance;
+ }
+
+ // The map to store the viewers' states.
+ private Map<String, TreeViewerState> viewerStates;
+
+ /**
+ * Get the viewer state for the specified input id.
+ *
+ * @param inputId
+ * @return
+ */
+ public TreeViewerState getViewerState(String inputId) {
+ return viewerStates.get(inputId);
+ }
+
+ /**
+ * Get the filter descriptor for the specified viewer and input.
+ *
+ * @param viewerId The viewer's id.
+ * @param input The input.
+ * @return The enabled filter descriptors.
+ */
+ public FilterDescriptor[] getFilterDescriptors(String viewerId, Object input) {
+ if (input != null) {
+ TreeViewerExtension viewerExtension = new TreeViewerExtension(viewerId);
+ FilterDescriptor[] filterDescriptors = viewerExtension.parseFilters(input);
+ if (filterDescriptors != null) {
+ IViewerInput viewerInput = getViewerInput(input);
+ if(viewerInput != null) {
+ String inputId =viewerInput.getInputId();
+ inputId = viewerId + "." + inputId; //$NON-NLS-1$
+ TreeViewerState viewerState = getViewerState(inputId);
+ if (viewerState != null) {
+ viewerState.updateFilterDescriptor(filterDescriptors);
+ }
+ }
+ return filterDescriptors;
+ }
+ }
+ return null;
+ }
+
+ /***
+ * Get the viewer input from the input of the tree viewer.
+ * If the input is an instance of IViewerInput, then return
+ * the input. If the input can be adapted to a IViewerInput,
+ * then return the adapted object.
+ *
+ * @param input The input of the tree viewer.
+ * @return A viewer input or null.
+ */
+ static IViewerInput getViewerInput(Object input) {
+ IViewerInput viewerInput = null;
+ if (input != null) {
+ if (input instanceof IViewerInput) {
+ viewerInput = (IViewerInput) input;
+ }
+ else {
+ if (input instanceof IAdaptable) {
+ viewerInput = (IViewerInput) ((IAdaptable) input).getAdapter(IViewerInput.class);
+ }
+ if (viewerInput == null) {
+ viewerInput = (IViewerInput) Platform.getAdapterManager().getAdapter(input, IViewerInput.class);
+ }
+ }
+ }
+ return viewerInput;
+ }
+
+ /**
+ * Put the viewer state with its input id into the map.
+ *
+ * @param inputId The id of the input.
+ * @param viewerState The viewer's state.
+ */
+ public void putViewerState(String inputId, TreeViewerState viewerState) {
+ viewerStates.put(inputId, viewerState);
+ }
+
+ /**
+ * Load all the viewer states from an external storage. Called by the plugin's
+ * activator before they are used to configure the tree viewers.
+ */
+ public void loadViewerStates() {
+ viewerStates = Collections.synchronizedMap(new HashMap<String, TreeViewerState>());
+ final File stateFile = getViewerStateFile();
+ if (stateFile.exists()) {
+ SafeRunner.run(new SafeRunnable() {
+ @Override
+ public void run() throws Exception {
+ BufferedReader reader = null;
+ try {
+ reader = new BufferedReader(new FileReader(stateFile));
+ XMLMemento root = XMLMemento.createReadRoot(reader);
+ loadViewerState(root);
+ }
+ finally {
+ if (reader != null) {
+ try {
+ reader.close();
+ }
+ catch (IOException e) {
+ }
+ }
+ }
+ }
+ });
+ }
+ }
+
+ /**
+ * Load the viewer states from the memento root.
+ *
+ * @param root The memento's root.
+ */
+ void loadViewerState(IMemento root) {
+ IMemento[] children = root.getChildren("viewerState"); //$NON-NLS-1$
+ if (children != null && children.length > 0) {
+ for (IMemento child : children) {
+ createViewerState(child);
+ }
+ }
+ }
+
+ /**
+ * Create a viewer state instance using the specified memento element.
+ *
+ * @param mViewerState The memento element.
+ */
+ void createViewerState(IMemento mViewerState) {
+ String id = mViewerState.getString("id"); //$NON-NLS-1$
+ Assert.isNotNull(id);
+ TreeViewerState viewerState = new TreeViewerState();
+ viewerState.restoreState(mViewerState);
+ viewerStates.put(id, viewerState);
+ }
+
+ /**
+ * Get the viewer state files. The default location is a file named "viewerstates.xml"
+ * under the plugin's state cache. If it is not available, default it to the ".tcf"
+ * directory under the user's home.
+ *
+ * @return The viewer state file.
+ */
+ private File getViewerStateFile() {
+ File location;
+ try {
+ location = UIPlugin.getDefault().getStateLocation().toFile();
+ }
+ catch (IllegalStateException e) {
+ // An RCP workspace-less environment (-data @none)
+ location = new File(System.getProperty("user.home"), ".tcf"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ // Create the location if it not exist
+ if (!location.exists()) location.mkdir();
+ location = new File(location, "viewerstates.xml"); //$NON-NLS-1$
+ return location;
+ }
+
+ /**
+ * Store the the viewer states. Called by the plugin's activator to
+ * save the state data.
+ */
+ public void storeViewerStates() {
+ final File stateFile = getViewerStateFile();
+ final XMLMemento root = XMLMemento.createWriteRoot("viewerStates"); //$NON-NLS-1$
+ storeViewerStates(root);
+ SafeRunner.run(new SafeRunnable() {
+ @Override
+ public void run() throws Exception {
+ BufferedWriter writer = null;
+ try {
+ writer = new BufferedWriter(new FileWriter(stateFile));
+ root.save(writer);
+ }
+ finally {
+ if (writer != null) {
+ try {
+ writer.close();
+ }
+ catch (IOException e) {
+ }
+ }
+ }
+ }
+ });
+ }
+
+ /**
+ * Store the viewer's state to a memento element.
+ *
+ * @param root The memento element.
+ */
+ void storeViewerStates(IMemento root) {
+ for (String id : viewerStates.keySet()) {
+ IMemento mViewerState = root.createChild("viewerState"); //$NON-NLS-1$
+ mViewerState.putString("id", id); //$NON-NLS-1$
+ TreeViewerState viewerState = viewerStates.get(id);
+ viewerState.saveState(mViewerState);
+ }
+ }
+
+ /**
+ * Create a viewer state instance using the column descriptors and the filter descriptors specified.
+ *
+ * @param columns The column descriptors.
+ * @param filters The filter descriptors.
+ * @return The tree viewer state instance.
+ */
+ public static TreeViewerState createViewerState(ColumnDescriptor[] columns, FilterDescriptor[] filters) {
+ TreeViewerState viewerState = new TreeViewerState();
+ if (columns != null) {
+ for (ColumnDescriptor column : columns) {
+ viewerState.addColumn(column);
+ }
+ }
+ if (filters != null) {
+ for(FilterDescriptor filter : filters) {
+ viewerState.addFilter(filter);
+ }
+ }
+ return viewerState;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/DialogSettingsUtil.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/utils/DialogSettingsUtil.java
index 901f04114..67958fb8e 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/src/org/eclipse/tm/te/ui/controls/DialogSettingsUtil.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/utils/DialogSettingsUtil.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.controls;
+package org.eclipse.tcf.te.ui.utils;
import java.util.ArrayList;
import java.util.Arrays;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/wizards/AbstractWizard.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/AbstractWizard.java
index 703c329f5..ca3e30879 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/wizards/AbstractWizard.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/AbstractWizard.java
@@ -7,11 +7,11 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.wizards;
+package org.eclipse.tcf.te.ui.wizards;
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.tm.te.ui.activator.UIPlugin;
+import org.eclipse.tcf.te.ui.activator.UIPlugin;
/**
* An abstract wizard implementation.
@@ -46,7 +46,7 @@ public abstract class AbstractWizard extends Wizard {
* <p>
* Typically, this are the dialog settings of the parent bundle. The
* default implementation returns the dialog settings of the bundle
- * &quot;<code>org.eclipse.tm.te.ui</code>&quot;. Overwrite to return
+ * &quot;<code>org.eclipse.tcf.te.ui</code>&quot;. Overwrite to return
* different root dialog settings.
*
* @return The root dialog settings.
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/wizards/AbstractWizardCommandHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/AbstractWizardCommandHandler.java
index 78ead41de..7c0175535 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/wizards/AbstractWizardCommandHandler.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/AbstractWizardCommandHandler.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.wizards;
+package org.eclipse.tcf.te.ui.wizards;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/wizards/interfaces/INewTargetWizard.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/interfaces/INewTargetWizard.java
index 50479bd16..b5235670e 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/wizards/interfaces/INewTargetWizard.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/interfaces/INewTargetWizard.java
@@ -7,9 +7,9 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.wizards.interfaces;
+package org.eclipse.tcf.te.ui.wizards.interfaces;
-import org.eclipse.tm.te.ui.wizards.newWizard.NewWizardSelectionPage;
+import org.eclipse.tcf.te.ui.wizards.newWizard.NewWizardSelectionPage;
import org.eclipse.ui.wizards.IWizardDescriptor;
/**
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/interfaces/INewWizardProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/interfaces/INewWizardProvider.java
new file mode 100644
index 000000000..a29fb55a9
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/interfaces/INewWizardProvider.java
@@ -0,0 +1,32 @@
+/*
+ * INewWizardProvider.java
+ * Created on 14.12.2011
+ *
+ * Copyright 2011 Wind River Systems Inc. All rights reserved.
+ */
+package org.eclipse.tcf.te.ui.wizards.interfaces;
+
+import org.eclipse.core.runtime.IExecutableExtension;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.ui.wizards.IWizardCategory;
+import org.eclipse.ui.wizards.IWizardDescriptor;
+
+/**
+ * INewWizardProvider
+ * @author tobias.schwarz@windriver.com
+ */
+public interface INewWizardProvider extends IExecutableExtension {
+
+ /**
+ * Get the dynamic list of new wizard categories including the wizards.
+ * @return The list of new wizard categories.
+ */
+ public IWizardCategory[] getCategories();
+
+ /**
+ * Get the list if common wizards for the given selection.
+ * @param selection The current selection.
+ * @return A list of wizards or <code>null</code>.
+ */
+ public IWizardDescriptor[] getCommonWizards(ISelection selection);
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/wizards/newWizard/NewWizard.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/newWizard/NewWizard.java
index dd7fecef3..474b7444c 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/wizards/newWizard/NewWizard.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/newWizard/NewWizard.java
@@ -7,16 +7,16 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.wizards.newWizard;
+package org.eclipse.tcf.te.ui.wizards.newWizard;
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.wizard.IWizard;
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.swt.graphics.Image;
-import org.eclipse.tm.te.ui.activator.UIPlugin;
-import org.eclipse.tm.te.ui.interfaces.ImageConsts;
-import org.eclipse.tm.te.ui.nls.Messages;
+import org.eclipse.tcf.te.ui.activator.UIPlugin;
+import org.eclipse.tcf.te.ui.interfaces.ImageConsts;
+import org.eclipse.tcf.te.ui.nls.Messages;
import org.eclipse.ui.INewWizard;
import org.eclipse.ui.IWorkbench;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/newWizard/NewWizardCategory.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/newWizard/NewWizardCategory.java
new file mode 100644
index 000000000..a3974f6e1
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/newWizard/NewWizardCategory.java
@@ -0,0 +1,259 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.wizards.newWizard;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.internal.WorkbenchImages;
+import org.eclipse.ui.internal.dialogs.WizardCollectionElement;
+import org.eclipse.ui.model.IWorkbenchAdapter;
+import org.eclipse.ui.wizards.IWizardCategory;
+import org.eclipse.ui.wizards.IWizardDescriptor;
+
+/**
+ * New wizard category node implementation.
+ */
+@SuppressWarnings("restriction")
+public class NewWizardCategory implements IWizardCategory, IWorkbenchAdapter {
+
+ private String id;
+ private String label;
+ private IWizardCategory parent;
+
+ private List<IWizardCategory> categories = new ArrayList<IWizardCategory>();
+ private List<IWizardDescriptor> wizards = new ArrayList<IWizardDescriptor>();
+
+ /**
+ * Constructor.
+ */
+ public NewWizardCategory(String id, String label) {
+ this.id = id;
+ this.label = label;
+ }
+
+ /**
+ * Constructor.
+ */
+ public NewWizardCategory(IWizardCategory baseCategory) {
+ id = baseCategory.getId();
+ label = baseCategory.getLabel();
+ parent = baseCategory.getParent();
+
+ IWizardCategory[] baseCategories = baseCategory.getCategories();
+ if (baseCategories != null && baseCategories.length > 0) {
+ categories = new ArrayList<IWizardCategory>(Arrays.asList(baseCategories));
+ }
+
+ IWizardDescriptor[] baseWizards = baseCategory.getWizards();
+ if (baseWizards != null && baseWizards.length > 0) {
+ wizards = new ArrayList<IWizardDescriptor>(Arrays.asList(baseWizards));
+ }
+ }
+
+ /**
+ * Clear the list of wizards and sub categories.
+ */
+ public void clear() {
+ categories.clear();
+ wizards.clear();
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode() {
+ return id.hashCode();
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object other) {
+ if (other instanceof IWizardCategory) {
+ ((IWizardCategory)other).getId().equals(getId());
+ }
+ return super.equals(other);
+ }
+
+ /**
+ * Set the parent wizard category.
+ *
+ * @param parent The parent wizard category or <code>null</code>.
+ */
+ public void setParent(IWizardCategory parent) {
+ this.parent = parent;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.wizards.IWizardCategory#findCategory(org.eclipse.core.runtime.IPath)
+ */
+ @Override
+ public IWizardCategory findCategory(IPath path) {
+ String searchString = path.segment(0);
+ for (IWizardCategory category : getCategories()) {
+ if (category.getId().equals(searchString)) {
+ if (path.segmentCount() == 1) {
+ return category;
+ }
+
+ return category.findCategory(path.removeFirstSegments(1));
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * Find a category with the given id.
+ *
+ * @param id The category id.
+ * @return The category or <code>null</code>.
+ */
+ public IWizardCategory findCategory(String id) {
+ for (IWizardCategory category : getCategories()) {
+ if (id.equals(category.getId())) {
+ return category;
+ }
+ }
+ for (IWizardCategory category : getCategories()) {
+ IWizardCategory found = null;
+ if (category instanceof NewWizardCategory) {
+ found = ((NewWizardCategory)category).findCategory(id);
+ }
+ if (category instanceof WizardCollectionElement) {
+ found = ((WizardCollectionElement)category).findCategory(id);
+ }
+ if (found != null) {
+ return found;
+ }
+ }
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.wizards.IWizardCategory#findWizard(java.lang.String)
+ */
+ @Override
+ public IWizardDescriptor findWizard(String id) {
+ for (IWizardDescriptor wizard : getWizards()) {
+ if (wizard.getId().equals(id)) {
+ return wizard;
+ }
+ }
+ for (IWizardCategory category : getCategories()) {
+ IWizardDescriptor wizard = category.findWizard(id);
+ if (wizard != null) {
+ return wizard;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Add a sub category.
+ * @param category The category.
+ */
+ public void addCategory(IWizardCategory category) {
+ categories.add(category);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.wizards.IWizardCategory#getCategories()
+ */
+ @Override
+ public IWizardCategory[] getCategories() {
+ return categories.toArray(new IWizardCategory[categories.size()]);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.wizards.IWizardCategory#getId()
+ */
+ @Override
+ public String getId() {
+ return id;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.wizards.IWizardCategory#getLabel()
+ */
+ @Override
+ public String getLabel() {
+ return label;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.wizards.IWizardCategory#getParent()
+ */
+ @Override
+ public IWizardCategory getParent() {
+ return parent;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.wizards.IWizardCategory#getPath()
+ */
+ @Override
+ public IPath getPath() {
+ return getParent() != null ? getParent().getPath().append(getId()) : new Path(getId());
+ }
+
+ /**
+ * Add a wizard.
+ * @param wizard The wizard.
+ */
+ public void addWizard(IWizardDescriptor wizard) {
+ wizards.add(wizard);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.wizards.IWizardCategory#getWizards()
+ */
+ @Override
+ public IWizardDescriptor[] getWizards() {
+ return wizards.toArray(new IWizardDescriptor[wizards.size()]);
+ }
+
+ @Override
+ public Object[] getChildren(Object o) {
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.model.IWorkbenchAdapter#getImageDescriptor(java.lang.Object)
+ */
+ @Override
+ public ImageDescriptor getImageDescriptor(Object object) {
+ return WorkbenchImages.getImageDescriptor(ISharedImages.IMG_OBJ_FOLDER);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.model.IWorkbenchAdapter#getLabel(java.lang.Object)
+ */
+ @Override
+ public String getLabel(Object o) {
+ return getLabel();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.model.IWorkbenchAdapter#getParent(java.lang.Object)
+ */
+ @Override
+ public Object getParent(Object o) {
+ return getParent();
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/wizards/newWizard/NewWizardCommandHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/newWizard/NewWizardCommandHandler.java
index 875e46af7..7e20aebce 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/wizards/newWizard/NewWizardCommandHandler.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/newWizard/NewWizardCommandHandler.java
@@ -7,19 +7,19 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.wizards.newWizard;
+package org.eclipse.tcf.te.ui.wizards.newWizard;
import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.tm.te.ui.interfaces.IContextHelpIds;
-import org.eclipse.tm.te.ui.wizards.AbstractWizardCommandHandler;
+import org.eclipse.tcf.te.ui.interfaces.IContextHelpIds;
+import org.eclipse.tcf.te.ui.wizards.AbstractWizardCommandHandler;
/**
- * &quot;org.eclipse.tm.te.ui.command.newWizards" default command handler implementation.
+ * &quot;org.eclipse.tcf.te.ui.command.newWizards" default command handler implementation.
*/
public class NewWizardCommandHandler extends AbstractWizardCommandHandler {
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.wizards.AbstractWizardCommandHandler#createWizard()
+ * @see org.eclipse.tcf.te.ui.wizards.AbstractWizardCommandHandler#createWizard()
*/
@Override
protected IWizard createWizard() {
@@ -27,7 +27,7 @@ public class NewWizardCommandHandler extends AbstractWizardCommandHandler {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.wizards.AbstractWizardCommandHandler#getHelpId()
+ * @see org.eclipse.tcf.te.ui.wizards.AbstractWizardCommandHandler#getHelpId()
*/
@Override
protected String getHelpId() {
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/newWizard/NewWizardContentProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/newWizard/NewWizardContentProvider.java
new file mode 100644
index 000000000..96ec94a44
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/newWizard/NewWizardContentProvider.java
@@ -0,0 +1,107 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.wizards.newWizard;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.ui.wizards.IWizardCategory;
+import org.eclipse.ui.wizards.IWizardDescriptor;
+import org.eclipse.ui.wizards.IWizardRegistry;
+
+/**
+ * New wizard content provider implementation.
+ */
+public class NewWizardContentProvider implements ITreeContentProvider {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.IContentProvider#dispose()
+ */
+ @Override
+ public void dispose() {
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
+ */
+ @Override
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ITreeContentProvider#getElements(java.lang.Object)
+ */
+ @Override
+ public Object[] getElements(Object inputElement) {
+ List<Object> children = new ArrayList<Object>();
+ if (inputElement instanceof IWizardRegistry) {
+ IWizardRegistry registry = (IWizardRegistry)inputElement;
+ IWizardDescriptor[] primary = registry.getPrimaryWizards();
+ if (primary != null && primary.length > 0) {
+ children.addAll(Arrays.asList(primary));
+ }
+ children.addAll(Arrays.asList(getChildren(registry.getRootCategory())));
+
+ if (children.size() == 1 && children.get(0) instanceof IWizardCategory) {
+ IWizardCategory category = (IWizardCategory)children.get(0);
+ children.clear();
+ children.addAll(Arrays.asList(getChildren(category)));
+ }
+ }
+
+ return children.toArray();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object)
+ */
+ @Override
+ public Object[] getChildren(Object parentElement) {
+ List<Object> children = new ArrayList<Object>();
+ if (parentElement instanceof IWizardCategory) {
+ for (IWizardCategory category : ((IWizardCategory)parentElement).getCategories()) {
+ if ((category.getCategories() != null && category.getCategories().length > 0) ||
+ (category.getWizards() != null && category.getWizards().length > 0)) {
+ children.add(category);
+ }
+ }
+ children.addAll(Arrays.asList(((IWizardCategory)parentElement).getWizards()));
+
+ return children.toArray();
+ }
+ return new Object[0];
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object)
+ */
+ @Override
+ public Object getParent(Object element) {
+ if (element instanceof IWizardCategory) {
+ return ((IWizardCategory)element).getParent();
+ }
+ else if (element instanceof IWizardDescriptor) {
+ return ((IWizardDescriptor)element).getCategory();
+ }
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object)
+ */
+ @Override
+ public boolean hasChildren(Object element) {
+ return getChildren(element).length > 0;
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/newWizard/NewWizardDescriptor.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/newWizard/NewWizardDescriptor.java
new file mode 100644
index 000000000..25a573c86
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/newWizard/NewWizardDescriptor.java
@@ -0,0 +1,235 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.wizards.newWizard;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.IWorkbenchWizard;
+import org.eclipse.ui.model.IWorkbenchAdapter;
+import org.eclipse.ui.wizards.IWizardCategory;
+import org.eclipse.ui.wizards.IWizardDescriptor;
+
+/**
+ * New wizard descriptor implementation.
+ */
+public class NewWizardDescriptor implements IWizardDescriptor, IWorkbenchAdapter {
+
+ private String id;
+ private String label;
+ private String description;
+ private String helpRef;
+ private ImageDescriptor imageDescriptor;
+ private IWizardCategory category;
+ private IWorkbenchWizard wizard;
+ private String[] tags;
+ private boolean canFinishEarly = false;
+ private boolean hasPages = true;
+
+ /**
+ * Constructor.
+ */
+ public NewWizardDescriptor(IWizardCategory category, String id, String label, String description, String helpRef, ImageDescriptor imageDescriptor) {
+ this.category = category;
+ this.id = id;
+ this.label = label;
+ this.description = description;
+ this.helpRef = helpRef;
+ this.imageDescriptor = imageDescriptor;
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode() {
+ return id.hashCode();
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object other) {
+ if (other instanceof IWizardDescriptor) {
+ ((IWizardDescriptor)other).getId().equals(getId());
+ }
+ return super.equals(other);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IWorkbenchPartDescriptor#getId()
+ */
+ @Override
+ public String getId() {
+ return id;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IWorkbenchPartDescriptor#getImageDescriptor()
+ */
+ @Override
+ public ImageDescriptor getImageDescriptor() {
+ return imageDescriptor;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IWorkbenchPartDescriptor#getLabel()
+ */
+ @Override
+ public String getLabel() {
+ return label;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
+ */
+ @Override
+ public Object getAdapter(Class adapter) {
+ return Platform.getAdapterManager().getAdapter(this, adapter);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.wizards.IWizardDescriptor#adaptedSelection(org.eclipse.jface.viewers.IStructuredSelection)
+ */
+ @Override
+ public IStructuredSelection adaptedSelection(IStructuredSelection selection) {
+ return selection;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.wizards.IWizardDescriptor#getDescription()
+ */
+ @Override
+ public String getDescription() {
+ return description;
+ }
+
+ /**
+ * Set tags for this wizard.
+ * @param tags The tags.
+ */
+ public void setTags(String[] tags) {
+ this.tags = tags;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.wizards.IWizardDescriptor#getTags()
+ */
+ @Override
+ public String[] getTags() {
+ return tags;
+ }
+
+ /**
+ * Set the wizard.
+ * @param wizard The wizard.
+ */
+ public void setWizard(IWorkbenchWizard wizard) {
+ this.wizard = wizard;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.wizards.IWizardDescriptor#createWizard()
+ */
+ @Override
+ public IWorkbenchWizard createWizard() throws CoreException {
+ return wizard;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.wizards.IWizardDescriptor#getDescriptionImage()
+ */
+ @Override
+ public ImageDescriptor getDescriptionImage() {
+ return imageDescriptor;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.wizards.IWizardDescriptor#getHelpHref()
+ */
+ @Override
+ public String getHelpHref() {
+ return helpRef;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.wizards.IWizardDescriptor#getCategory()
+ */
+ @Override
+ public IWizardCategory getCategory() {
+ return category;
+ }
+
+ /**
+ * Set the canFinishEarly flag.
+ * @param canFinishEarly
+ */
+ public void setCanFinishEarly(boolean canFinishEarly) {
+ this.canFinishEarly = canFinishEarly;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.wizards.IWizardDescriptor#canFinishEarly()
+ */
+ @Override
+ public boolean canFinishEarly() {
+ return canFinishEarly;
+ }
+
+ /**
+ * Set the hasPages flag.
+ * @param hasPages
+ */
+ public void setHasPages(boolean hasPages) {
+ this.hasPages = hasPages;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.wizards.IWizardDescriptor#hasPages()
+ */
+ @Override
+ public boolean hasPages() {
+ return hasPages;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.model.IWorkbenchAdapter#getChildren(java.lang.Object)
+ */
+ @Override
+ public Object[] getChildren(Object o) {
+ return new Object[0];
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.model.IWorkbenchAdapter#getImageDescriptor(java.lang.Object)
+ */
+ @Override
+ public ImageDescriptor getImageDescriptor(Object object) {
+ return getImageDescriptor();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.model.IWorkbenchAdapter#getLabel(java.lang.Object)
+ */
+ @Override
+ public String getLabel(Object o) {
+ return getLabel();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.model.IWorkbenchAdapter#getParent(java.lang.Object)
+ */
+ @Override
+ public Object getParent(Object o) {
+ return getCategory();
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/wizards/newWizard/NewWizardNode.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/newWizard/NewWizardNode.java
index 1714b964f..716e51527 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/wizards/newWizard/NewWizardNode.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/newWizard/NewWizardNode.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.wizards.newWizard;
+package org.eclipse.tcf.te.ui.wizards.newWizard;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.CoreException;
@@ -17,9 +17,9 @@ import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.wizard.IWizard;
import org.eclipse.jface.wizard.IWizardNode;
import org.eclipse.swt.graphics.Point;
-import org.eclipse.tm.te.ui.activator.UIPlugin;
-import org.eclipse.tm.te.ui.nls.Messages;
-import org.eclipse.tm.te.ui.wizards.interfaces.INewTargetWizard;
+import org.eclipse.tcf.te.ui.activator.UIPlugin;
+import org.eclipse.tcf.te.ui.nls.Messages;
+import org.eclipse.tcf.te.ui.wizards.interfaces.INewTargetWizard;
import org.eclipse.ui.IPluginContribution;
import org.eclipse.ui.IWorkbenchWizard;
import org.eclipse.ui.internal.util.Util;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/newWizard/NewWizardRegistry.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/newWizard/NewWizardRegistry.java
new file mode 100644
index 000000000..fd2e56fea
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/newWizard/NewWizardRegistry.java
@@ -0,0 +1,165 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ * Tobias Schwarz (Wind River) - [368243] [UI] Allow dynamic new wizard contributions
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.wizards.newWizard;
+
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtensionPoint;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.tcf.te.ui.activator.UIPlugin;
+import org.eclipse.tcf.te.ui.wizards.interfaces.INewWizardProvider;
+import org.eclipse.ui.internal.registry.IWorkbenchRegistryConstants;
+import org.eclipse.ui.internal.wizards.AbstractExtensionWizardRegistry;
+import org.eclipse.ui.wizards.IWizardCategory;
+import org.eclipse.ui.wizards.IWizardDescriptor;
+
+/**
+ * New wizard registry.
+ *
+ * @see org.eclipse.ui.internal.wizards.NewWizardRegistry
+ */
+@SuppressWarnings("restriction")
+public final class NewWizardRegistry extends AbstractExtensionWizardRegistry {
+
+ private List<INewWizardProvider> newWizardProvider = new ArrayList<INewWizardProvider>();
+
+ /*
+ * Thread save singleton instance creation.
+ */
+ private static class LazyInstance {
+ public static NewWizardRegistry instance = new NewWizardRegistry();
+ }
+
+ /**
+ * Constructor.
+ */
+ /* default */ NewWizardRegistry() {
+ super();
+ }
+
+ /**
+ * Returns the singleton instance of the wizard registry.
+ */
+ public static NewWizardRegistry getInstance() {
+ return LazyInstance.instance;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.internal.wizards.AbstractExtensionWizardRegistry#doInitialize()
+ */
+ @Override
+ protected void doInitialize() {
+ super.doInitialize();
+ IExtensionPoint point = Platform.getExtensionRegistry().getExtensionPoint(getPlugin(), "wizardProviders"); //$NON-NLS-1$
+ for (IConfigurationElement element : point.getConfigurationElements()) {
+ if (element.getName().equals("wizardProvider")) { //$NON-NLS-1$
+ try {
+ INewWizardProvider provider = (INewWizardProvider)element.createExecutableExtension("class"); //$NON-NLS-1$
+ newWizardProvider.add(provider);
+ }
+ catch (CoreException e) {
+ }
+ }
+ }
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.internal.wizards.AbstractExtensionWizardRegistry#getExtensionPoint()
+ */
+ @Override
+ protected String getExtensionPoint() {
+ return IWorkbenchRegistryConstants.PL_NEW;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.internal.wizards.AbstractExtensionWizardRegistry#getPlugin()
+ */
+ @Override
+ protected String getPlugin() {
+ return UIPlugin.getUniqueIdentifier();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.internal.wizards.AbstractWizardRegistry#findWizard(java.lang.String)
+ */
+ @Override
+ public IWizardDescriptor findWizard(String id) {
+ return getRootCategory().findWizard(id);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.internal.wizards.AbstractWizardRegistry#getPrimaryWizards()
+ */
+ @Override
+ public IWizardDescriptor [] getPrimaryWizards() {
+ return super.getPrimaryWizards();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.internal.wizards.AbstractWizardRegistry#findCategory(java.lang.String)
+ */
+ @Override
+ public IWizardCategory findCategory(String id) {
+ IWizardCategory root = getRootCategory();
+ if (root instanceof NewWizardCategory) {
+ ((NewWizardCategory)root).findCategory(id);
+ }
+ return super.findCategory(id);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.internal.wizards.AbstractWizardRegistry#getRootCategory()
+ */
+ @Override
+ public IWizardCategory getRootCategory() {
+ initialize();
+ if (!newWizardProvider.isEmpty()) {
+ NewWizardCategory root = new NewWizardCategory(super.getRootCategory());
+
+ for (INewWizardProvider provider : newWizardProvider) {
+ for (IWizardCategory category : provider.getCategories()) {
+ root.addCategory(category);
+ }
+ }
+
+ return root;
+ }
+
+ return super.getRootCategory();
+ }
+
+ /**
+ * Get the list of common wizards for the given selection.
+ *
+ * @param selection The current selection.
+ * @return The list of common wizards.
+ */
+ public IWizardDescriptor[] getCommonWizards(ISelection selection) {
+ initialize();
+ List<IWizardDescriptor> allWizards = new ArrayList<IWizardDescriptor>();
+
+ for (INewWizardProvider provider : newWizardProvider) {
+ IWizardDescriptor[] wizards = provider.getCommonWizards(selection);
+ if (wizards != null && wizards.length > 0) {
+ allWizards.addAll(Arrays.asList(wizards));
+ }
+ }
+
+ return allWizards.toArray(new IWizardDescriptor[allWizards.size()]);
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/wizards/newWizard/NewWizardSelectionPage.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/newWizard/NewWizardSelectionPage.java
index 84fa9b8c9..402b4f263 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/wizards/newWizard/NewWizardSelectionPage.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/newWizard/NewWizardSelectionPage.java
@@ -1,44 +1,59 @@
/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved.
* This program and the accompanying materials are made available under the terms
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Wind River Systems - initial API and implementation
+ * Tobias Schwarz (Wind River) - [368243] [UI] Allow dynamic new wizard contributions
*******************************************************************************/
-package org.eclipse.tm.te.ui.wizards.newWizard;
+package org.eclipse.tcf.te.ui.wizards.newWizard;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import org.eclipse.core.expressions.EvaluationContext;
+import org.eclipse.core.expressions.EvaluationResult;
+import org.eclipse.core.expressions.Expression;
+import org.eclipse.core.expressions.ExpressionConverter;
import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jface.viewers.DoubleClickEvent;
import org.eclipse.jface.viewers.IBasicPropertyConstants;
import org.eclipse.jface.viewers.IDoubleClickListener;
+import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerComparator;
+import org.eclipse.jface.viewers.ViewerFilter;
import org.eclipse.jface.wizard.IWizard;
import org.eclipse.jface.wizard.IWizardContainer;
import org.eclipse.jface.wizard.IWizardNode;
import org.eclipse.jface.wizard.IWizardPage;
import org.eclipse.jface.wizard.WizardPage;
+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.Label;
-import org.eclipse.tm.te.ui.activator.UIPlugin;
-import org.eclipse.tm.te.ui.interfaces.IUIConstants;
-import org.eclipse.tm.te.ui.nls.Messages;
+import org.eclipse.tcf.te.ui.activator.UIPlugin;
+import org.eclipse.tcf.te.ui.interfaces.IUIConstants;
+import org.eclipse.tcf.te.ui.nls.Messages;
+import org.eclipse.ui.ISources;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.activities.ITriggerPoint;
@@ -46,8 +61,8 @@ import org.eclipse.ui.activities.WorkbenchActivityHelper;
import org.eclipse.ui.dialogs.FilteredTree;
import org.eclipse.ui.dialogs.PatternFilter;
import org.eclipse.ui.internal.activities.ws.WorkbenchTriggerPoints;
-import org.eclipse.ui.internal.dialogs.WizardContentProvider;
import org.eclipse.ui.internal.dialogs.WizardPatternFilter;
+import org.eclipse.ui.internal.dialogs.WorkbenchWizardElement;
import org.eclipse.ui.model.WorkbenchLabelProvider;
import org.eclipse.ui.wizards.IWizardCategory;
import org.eclipse.ui.wizards.IWizardDescriptor;
@@ -64,7 +79,7 @@ public class NewWizardSelectionPage extends WizardPage {
private static final String SELECTED_WIZARD_DESCRIPTOR_SETTINGS_ID = "filteredTree.selectedWizardDescriptorId"; //$NON-NLS-1$
// The default expanded category id's
- private static final String[] DEFAULT_EXPANDED_CATEGORY_IDS = new String[] { "org.eclipse.tm.te.ui.newWizards.category.general" }; //$NON-NLS-1$
+ private static final String[] DEFAULT_EXPANDED_CATEGORY_IDS = new String[] { "org.eclipse.tcf.te.ui.newWizards.category.general" }; //$NON-NLS-1$
// The new target wizard registry
private NewWizardRegistry wizardRegistry;
@@ -101,6 +116,47 @@ public class NewWizardSelectionPage extends WizardPage {
}
}
+ /**
+ * Internal class. The wizard viewer filter is responsible for filtering
+ * wizard contributions based on their enablement expression.
+ */
+ /* default */ static class NewWizardViewerFilter extends ViewerFilter {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
+ */
+ @Override
+ public boolean select(Viewer viewer, Object parentElement, Object element) {
+ if (element instanceof WorkbenchWizardElement) {
+ IConfigurationElement configElement = ((WorkbenchWizardElement)element).getConfigurationElement();
+ IConfigurationElement[] children = configElement.getChildren("enablement"); //$NON-NLS-1$
+ // Either 0 or 1 enablement child elements are allowed
+ if (children != null && children.length > 0) {
+ try {
+ Expression expression = ExpressionConverter.getDefault().perform(children[0]);
+ if (expression != null) {
+ ISelection selection = new StructuredSelection(element);
+ EvaluationContext evalContext = new EvaluationContext(null, selection);
+ evalContext.addVariable(ISources.ACTIVE_CURRENT_SELECTION_NAME, selection);
+ if (!expression.evaluate(evalContext).equals(EvaluationResult.TRUE)) {
+ return false;
+ }
+ }
+ } catch (CoreException e) {
+ if (Platform.inDebugMode()) {
+ IStatus status = new Status(IStatus.ERROR, UIPlugin.getUniqueIdentifier(),
+ NLS.bind(Messages.NewWizardViewerFilter_error_evaluationFailed, e.getLocalizedMessage()),
+ e);
+ UIPlugin.getDefault().getLog().log(status);
+ }
+ }
+ }
+
+ }
+ return true;
+ }
+ }
+
/**
* Constructor.
*
@@ -156,10 +212,12 @@ public class NewWizardSelectionPage extends WizardPage {
filteredTree.setLayoutData(layoutData);
final TreeViewer treeViewer = filteredTree.getViewer();
- treeViewer.setContentProvider(new WizardContentProvider());
- treeViewer.setLabelProvider(new WorkbenchLabelProvider());
+ treeViewer.setContentProvider(new NewWizardContentProvider());
+ treeViewer.setLabelProvider(WorkbenchLabelProvider.getDecoratingWorkbenchLabelProvider());
treeViewer.setComparator(new NewWizardViewerComparator());
+ treeViewer.addFilter(new NewWizardViewerFilter());
+
treeViewer.addSelectionChangedListener(new ISelectionChangedListener() {
@Override
public void selectionChanged(SelectionChangedEvent event) {
@@ -176,7 +234,9 @@ public class NewWizardSelectionPage extends WizardPage {
Object element = selection.getFirstElement();
if (element instanceof IWizardDescriptor) {
// Double-click on a connection type is triggering the sub wizard
- if (canFlipToNextPage()) getWizard().getContainer().showPage(getNextPage());
+ if (canFlipToNextPage()) {
+ getWizard().getContainer().showPage(getNextPage());
+ }
} else if (event.getViewer() instanceof TreeViewer) {
TreeViewer viewer = (TreeViewer)event.getViewer();
if (viewer.isExpandable(element)) {
@@ -187,7 +247,7 @@ public class NewWizardSelectionPage extends WizardPage {
}
});
- treeViewer.setInput(wizardRegistry.getRootCategory());
+ treeViewer.setInput(wizardRegistry);
// apply the standard dialog font
Dialog.applyDialogFont(composite);
@@ -245,7 +305,9 @@ public class NewWizardSelectionPage extends WizardPage {
if (selectedWizardDescriptor.getDescription() != null && !"".equals(selectedWizardDescriptor.getDescription())) { //$NON-NLS-1$
setDescription(selectedWizardDescriptor.getDescription());
} else {
- if (!getDefaultDescription().equals(getDescription())) setDescription(getDefaultDescription());
+ if (!getDefaultDescription().equals(getDescription())) {
+ setDescription(getDefaultDescription());
+ }
}
} else {
selectedWizardDescriptor = null;
@@ -283,7 +345,9 @@ public class NewWizardSelectionPage extends WizardPage {
if (wizard != null) {
// If the wizard got created by the call to getWizard(),
// then allow the wizard to create its pages
- if (!isCreated) wizard.addPages();
+ if (!isCreated) {
+ wizard.addPages();
+ }
// Return the starting page of the wizard
return wizard.getStartingPage();
}
@@ -335,9 +399,13 @@ public class NewWizardSelectionPage extends WizardPage {
IDialogSettings settings = super.getDialogSettings();
// If the dialog settings could not set from the wizard, fallback to the plugin's
// dialog settings store.
- if (settings == null) settings = UIPlugin.getDefault().getDialogSettings();
+ if (settings == null) {
+ settings = UIPlugin.getDefault().getDialogSettings();
+ }
String sectionName = this.getClass().getName();
- if (settings.getSection(sectionName) == null) settings.addNewSection(sectionName);
+ if (settings.getSection(sectionName) == null) {
+ settings.addNewSection(sectionName);
+ }
settings = settings.getSection(sectionName);
return settings;
@@ -351,11 +419,13 @@ public class NewWizardSelectionPage extends WizardPage {
if (settings != null) {
String[] expandedCategories = settings.getArray(EXPANDED_CATEGORIES_SETTINGS_ID);
// by default we expand always the "General" category.
- if (expandedCategories == null) expandedCategories = DEFAULT_EXPANDED_CATEGORY_IDS;
+ if (expandedCategories == null) {
+ expandedCategories = DEFAULT_EXPANDED_CATEGORY_IDS;
+ }
if (expandedCategories != null) {
List<IWizardCategory> expanded = new ArrayList<IWizardCategory>();
- for (int i = 0; i < expandedCategories.length; i++) {
- String categoryId = expandedCategories[i];
+ for (String expandedCategorie : expandedCategories) {
+ String categoryId = expandedCategorie;
if (categoryId != null && !"".equals(categoryId.trim())) { //$NON-NLS-1$
IWizardCategory category = wizardRegistry.findCategory(categoryId);
if (category != null && !expanded.contains(category)) {
@@ -364,7 +434,9 @@ public class NewWizardSelectionPage extends WizardPage {
}
}
- if (expanded.size() > 0) filteredTree.getViewer().setExpandedElements(expanded.toArray());
+ if (expanded.size() > 0) {
+ filteredTree.getViewer().setExpandedElements(expanded.toArray());
+ }
}
String selectedWizardDescriptorId = settings.get(SELECTED_WIZARD_DESCRIPTOR_SETTINGS_ID);
@@ -385,9 +457,9 @@ public class NewWizardSelectionPage extends WizardPage {
if (settings != null) {
List<String> expandedCategories = new ArrayList<String>();
Object[] expanded = filteredTree.getViewer().getVisibleExpandedElements();
- for (int i = 0; i < expanded.length; i++) {
- if (expanded[i] instanceof IWizardCategory) {
- expandedCategories.add(((IWizardCategory)expanded[i]).getId());
+ for (Object element : expanded) {
+ if (element instanceof IWizardCategory) {
+ expandedCategories.add(((IWizardCategory)element).getId());
}
}
settings.put(EXPANDED_CATEGORIES_SETTINGS_ID, expandedCategories.toArray(new String[expandedCategories.size()]));
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/wizards/pages/AbstractFormsWizardPage.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/pages/AbstractFormsWizardPage.java
index c04552627..27f4dbeca 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/wizards/pages/AbstractFormsWizardPage.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/pages/AbstractFormsWizardPage.java
@@ -7,13 +7,13 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.wizards.pages;
+package org.eclipse.tcf.te.ui.wizards.pages;
import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
-import org.eclipse.tm.te.ui.forms.CustomFormToolkit;
+import org.eclipse.tcf.te.ui.forms.CustomFormToolkit;
import org.eclipse.ui.forms.widgets.FormToolkit;
/**
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/wizards/pages/AbstractSharedDataWizardPage.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/pages/AbstractSharedDataWizardPage.java
index 34030b444..b1e4cd87e 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/wizards/pages/AbstractSharedDataWizardPage.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/pages/AbstractSharedDataWizardPage.java
@@ -7,16 +7,16 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.wizards.pages;
+package org.eclipse.tcf.te.ui.wizards.pages;
import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer;
-import org.eclipse.tm.te.ui.wizards.interfaces.ISharedDataWizardPage;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.ui.interfaces.data.IDataExchangeNode3;
/**
* An abstract shared data wizard page implementation.
*/
-public abstract class AbstractSharedDataWizardPage extends AbstractValidatableWizardPage implements ISharedDataWizardPage {
+public abstract class AbstractSharedDataWizardPage extends AbstractValidatingWizardPage implements IDataExchangeNode3 {
/**
* Constructor.
@@ -39,30 +39,37 @@ public abstract class AbstractSharedDataWizardPage extends AbstractValidatableWi
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.wizards.interfaces.ISharedDataWizardPage#setupData(org.eclipse.tm.te.runtime.interfaces.nodes.IPropertiesContainer)
+ * @see org.eclipse.tcf.te.ui.wizards.interfaces.ISharedDataExchangeNode#setupData(org.eclipse.tcf.te.runtime.interfaces.nodes.IPropertiesContainer)
*/
@Override
public void setupData(IPropertiesContainer data) {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.wizards.interfaces.ISharedDataWizardPage#extractData(org.eclipse.tm.te.runtime.interfaces.nodes.IPropertiesContainer)
+ * @see org.eclipse.tcf.te.ui.wizards.interfaces.ISharedDataExchangeNode#extractData(org.eclipse.tcf.te.runtime.interfaces.nodes.IPropertiesContainer)
*/
@Override
public void extractData(IPropertiesContainer data) {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.wizards.interfaces.ISharedDataWizardPage#initializeData(org.eclipse.tm.te.runtime.interfaces.nodes.IPropertiesContainer)
+ * @see org.eclipse.tcf.te.ui.interfaces.data.IDataExchangeNode2#initializeData(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer)
*/
@Override
public void initializeData(IPropertiesContainer data) {
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.wizards.interfaces.ISharedDataWizardPage#removeData(org.eclipse.tm.te.runtime.interfaces.nodes.IPropertiesContainer)
+ * @see org.eclipse.tcf.te.ui.interfaces.data.IDataExchangeNode3#removeData(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer)
*/
@Override
public void removeData(IPropertiesContainer data) {
}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.interfaces.data.IDataExchangeNode3#copyData(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer, org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer)
+ */
+ @Override
+ public void copyData(IPropertiesContainer src, IPropertiesContainer dst) {
+ }
}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/wizards/pages/AbstractValidatableWizardPage.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/pages/AbstractValidatingWizardPage.java
index f68edaec6..89b99a8de 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/wizards/pages/AbstractValidatableWizardPage.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/pages/AbstractValidatingWizardPage.java
@@ -7,18 +7,17 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.wizards.pages;
+package org.eclipse.tcf.te.ui.wizards.pages;
import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.tm.te.ui.wizards.interfaces.IValidatableWizardPage;
+import org.eclipse.tcf.te.ui.jface.interfaces.IValidatingContainer;
/**
- * An abstract validatable wizard page implementation.
+ * An abstract validating wizard page implementation.
* <p>
- * This wizard page implementation is adding utility methods
- * for handling page validation.
+ * This wizard page implementation is adding utility methods for handling page validation.
*/
-public abstract class AbstractValidatableWizardPage extends AbstractWizardPage implements IValidatableWizardPage {
+public abstract class AbstractValidatingWizardPage extends AbstractWizardPage implements IValidatingContainer {
// A used to detect if a validation process is already running.
// If set to true, validatePage() should return immediately.
private boolean validationInProgress = false;
@@ -28,7 +27,7 @@ public abstract class AbstractValidatableWizardPage extends AbstractWizardPage i
*
* @param pageName The page name. Must not be <code>null</code>.
*/
- public AbstractValidatableWizardPage(String pageName) {
+ public AbstractValidatingWizardPage(String pageName) {
super(pageName);
}
@@ -39,7 +38,7 @@ public abstract class AbstractValidatableWizardPage extends AbstractWizardPage i
* @param title The wizard page title or <code>null</code>.
* @param titleImage The wizard page title image or <code>null</code>.
*/
- public AbstractValidatableWizardPage(String pageName, String title, ImageDescriptor titleImage) {
+ public AbstractValidatingWizardPage(String pageName, String title, ImageDescriptor titleImage) {
super(pageName, title, titleImage);
}
@@ -82,10 +81,10 @@ public abstract class AbstractValidatableWizardPage extends AbstractWizardPage i
}
/* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.interfaces.IValidatableDialogPage#validatePage()
+ * @see org.eclipse.tcf.te.ui.jface.interfaces.IValidatingContainer#validate()
*/
@Override
- public void validatePage() {
+ public void validate() {
if (isValidationInProgress()) return;
setValidationInProgress(true);
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/wizards/pages/AbstractWizardPage.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/pages/AbstractWizardPage.java
index 1d2e9a053..9d3c2f4b6 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/wizards/pages/AbstractWizardPage.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/pages/AbstractWizardPage.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tm.te.ui.wizards.pages;
+package org.eclipse.tcf.te.ui.wizards.pages;
import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.resource.ImageDescriptor;
@@ -16,7 +16,7 @@ import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
-import org.eclipse.tm.te.ui.swt.SWTControlUtil;
+import org.eclipse.tcf.te.ui.swt.SWTControlUtil;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.forms.widgets.FormToolkit;
diff --git a/target_explorer/plugins/org.eclipse.tm.te.core/.options b/target_explorer/plugins/org.eclipse.tm.te.core/.options
deleted file mode 100644
index 252182123..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.core/.options
+++ /dev/null
@@ -1 +0,0 @@
-org.eclipse.tm.te.core/debugmode = 0
diff --git a/target_explorer/plugins/org.eclipse.tm.te.core/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tm.te.core/META-INF/MANIFEST.MF
deleted file mode 100644
index a9dd00f75..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.core/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,27 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.tm.te.core;singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Bundle-Activator: org.eclipse.tm.te.core.activator.CoreBundleActivator
-Bundle-Vendor: %providerName
-Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
- org.eclipse.tm.te.runtime;bundle-version="1.0.0",
- org.eclipse.tm.te.runtime.stepper;bundle-version="1.0.0",
- org.eclipse.tm.te.runtime.services;bundle-version="1.0.0",
- org.eclipse.tm.te.runtime.persistence;bundle-version="1.0.0",
- org.eclipse.tm.te.runtime.model;bundle-version="1.0.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Bundle-ActivationPolicy: lazy
-Bundle-Localization: plugin
-Export-Package: org.eclipse.tm.te.core.activator;x-internal:=true,
- org.eclipse.tm.te.core.adapters,
- org.eclipse.tm.te.core.async,
- org.eclipse.tm.te.core.async.interfaces,
- org.eclipse.tm.te.core.connection,
- org.eclipse.tm.te.core.connection.interfaces,
- org.eclipse.tm.te.core.connection.managers,
- org.eclipse.tm.te.core.connection.strategy,
- org.eclipse.tm.te.core.model.interfaces,
- org.eclipse.tm.te.core.nls;x-internal:=true,
- org.eclipse.tm.te.core.utils.text
diff --git a/target_explorer/plugins/org.eclipse.tm.te.core/plugin.xml b/target_explorer/plugins/org.eclipse.tm.te.core/plugin.xml
deleted file mode 100644
index dcb4e51e9..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.core/plugin.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
-
-<!-- Extension point contributions -->
- <extension-point id="connectionTypes" name="Connection Type Contributions" schema="schema/connectionTypes.exsd"/>
- <extension-point id="connectionTypeBindings" name="Connection Type Bindings Contributions" schema="schema/connectionTypeBindings.exsd"/>
-
-<!-- Adapter factory contributions -->
- <extension point="org.eclipse.core.runtime.adapters">
- <factory
- adaptableType="org.eclipse.tm.te.runtime.model.interfaces.IModelNode"
- class="org.eclipse.tm.te.core.adapters.AdapterFactory">
- <adapter type="org.eclipse.tm.te.runtime.persistence.interfaces.IPersistable"/>
- </factory>
- </extension>
-
-<!-- Reusable core expression fragments -->
- <extension point="org.eclipse.core.expressions.definitions">
-
- <!-- Expression to test if the selection contains only one element which
- is an connectable model node -->
- <definition id="te.core.expression.isConnectable">
- <with variable="selection">
- <count value="1"/>
- <iterate operator="and" ifEmpty="false">
- <instanceof value="org.eclipse.tm.te.core.model.interfaces.IConnectable"/>
- </iterate>
- </with>
- </definition>
- </extension>
-
-</plugin>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.core/schema/connectStrategies.exsd b/target_explorer/plugins/org.eclipse.tm.te.core/schema/connectStrategies.exsd
deleted file mode 100644
index 0af351f1a..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.core/schema/connectStrategies.exsd
+++ /dev/null
@@ -1,283 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.tm.te.core" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
- <appinfo>
- <meta.schema plugin="org.eclipse.tm.te.core" id="connectStrategies" name="Connect Strategies"/>
- </appinfo>
- <documentation>
- This extension point is used to contribute connect strategies.
- </documentation>
- </annotation>
-
- <element name="extension">
- <annotation>
- <appinfo>
- <meta.element />
- </appinfo>
- </annotation>
- <complexType>
- <sequence>
- <element ref="connectStrategy" minOccurs="1" maxOccurs="unbounded"/>
- </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>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="connectStrategy">
- <annotation>
- <documentation>
- Declares a Target Explorer connect strategy contribution.
- </documentation>
- </annotation>
- <complexType>
- <sequence>
- <element ref="class" minOccurs="0" maxOccurs="1"/>
- <element ref="description" minOccurs="0" maxOccurs="1"/>
- <element ref="stepGroups" minOccurs="0" maxOccurs="1"/>
- </sequence>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- The unique id of the connect strategy.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="label" type="string" use="required">
- <annotation>
- <documentation>
- The label representing the connect strategy within the UI.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="class" type="string">
- <annotation>
- <documentation>
- The connect strategy class that implements &lt;code&gt;org.eclipse.tm.te.core.connection.interfaces.IConnectStrategy&lt;/code&gt; or extends &lt;code&gt;org.eclipse.tm.te.core.connection.AbstractConnectStrategy&lt;/code&gt;.
-&lt;p&gt;
-The connect strategy implementation class must be specified either by the class attribute or the class child element!
- </documentation>
- <appinfo>
- <meta.attribute kind="java" basedOn="org.eclipse.tm.te.core.connection.AbstractConnectStrategy:org.eclipse.tm.te.core.connection.interfaces.IConnectStrategy"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="description" type="string">
- <annotation>
- <documentation>
- A short description of the connect strategy to be presented in the UI.
- </documentation>
- </annotation>
- </element>
-
- <element name="class">
- <annotation>
- <documentation>
- &lt;p&gt;Used when creating an &lt;code&gt;IExecutableExtension&lt;/code&gt; with a named parameter, or more than one.&lt;/p&gt;
- </documentation>
- </annotation>
- <complexType>
- <sequence>
- <element ref="parameter" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="class" type="string">
- <annotation>
- <documentation>
- The connect strategy class that implements &lt;code&gt;org.eclipse.tm.te.core.connection.interfaces.IConnectStrategy&lt;/code&gt; or extends &lt;code&gt;org.eclipse.tm.te.core.connection.AbstractConnectStrategy&lt;/code&gt;.
-&lt;p&gt;
-The connect strategy implementation class must be specified either by the class attribute or the class child element!
- </documentation>
- <appinfo>
- <meta.attribute kind="java" basedOn="org.eclipse.tm.te.core.connection.AbstractConnectStrategy:org.eclipse.tm.te.core.connection.interfaces.IConnectStrategy"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="parameter">
- <annotation>
- <documentation>
- &lt;p&gt;A parameter for an &lt;code&gt;IExecutableExtension&lt;/code&gt;.&lt;/p&gt;
- </documentation>
- </annotation>
- <complexType>
- <attribute name="name" type="string" use="required">
- <annotation>
- <documentation>
- &lt;p&gt;The parameter name.&lt;/p&gt;
- </documentation>
- </annotation>
- </attribute>
- <attribute name="value" type="string" use="required">
- <annotation>
- <documentation>
- &lt;p&gt;The parameter value.&lt;/p&gt;
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="stepGroups">
- <annotation>
- <documentation>
- The container the step groups are declared in.
- </documentation>
- </annotation>
- <complexType>
- <sequence>
- <element ref="stepGroup" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
- </element>
-
- <element name="stepGroup">
- <annotation>
- <documentation>
- A connect strategy step group.
- </documentation>
- </annotation>
- <complexType>
- <sequence>
- <element ref="step" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="id" use="required">
- <annotation>
- <documentation>
- The unique id of the connect strategy step group.
- </documentation>
- <appinfo>
- <meta.attribute kind="identifier"/>
- </appinfo>
- </annotation>
- <simpleType>
- <restriction base="string">
- <enumeration value="org.eclipse.tm.te.core.steps.connect">
- </enumeration>
- <enumeration value="org.eclipse.tm.te.core.steps.disconnect">
- </enumeration>
- </restriction>
- </simpleType>
- </attribute>
- <attribute name="label" type="string">
- <annotation>
- <documentation>
- The label representing the step group in the UI.
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="step">
- <annotation>
- <documentation>
- A connect strategy step.
- </documentation>
- </annotation>
- <complexType>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- The unique id of the connect strategy step.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="label" type="string" use="required">
- <annotation>
- <documentation>
- The label representing the connect strategy step in the UI.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
- The class implementing the connect strategy step.
- </documentation>
- <appinfo>
- <meta.attribute kind="java" basedOn=":org.eclipse.tm.te.core.stepper.interfaces.IContextStep"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appinfo>
- <meta.section type="since"/>
- </appinfo>
- <documentation>
- Target Explorer 1.0.0
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="examples"/>
- </appinfo>
- <documentation>
- This is an example of the extension point usage:
-&lt;p&gt;
-&lt;pre&gt;&lt;code&gt;
- &lt;extension point=&quot;org.eclipse.tm.te.core.connectStrategies&quot;&gt;
- &lt;connectStrategy
- id=&quot;org.eclipse.tm.te.core.strategies.SshConnectStrategy&quot;
- class=&quot;org.eclipse.tm.te.core.connection.strategies.SshConnectStrategy&quot;
- label=&quot;Ssh Connect Strategy&quot;&gt;
- &lt;/connectStrategy&gt;
- &lt;/extension&gt;
-&lt;/code&gt;&lt;/pre&gt;
- </documentation>
- </annotation>
-
-
- <annotation>
- <appinfo>
- <meta.section type="copyright"/>
- </appinfo>
- <documentation>
- Copyright (c) 2011 Wind River Systems, Inc. and others.
-
-All rights reserved.
-
-This program and the accompanying materials are made available under the terms
-of the Eclipse Public License v1.0 which accompanies this distribution, and is
-available at http://www.eclipse.org/legal/epl-v10.html.
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="apiInfo"/>
- </appinfo>
- <documentation>
- The provider of a connect strategy must implement &lt;samp&gt;org.eclipse.tm.te.core.interfaces.IConnectStrategy&lt;/samp&gt;.
- </documentation>
- </annotation>
-
-</schema>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/adapters/ModelNodePersistableAdapter.java b/target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/adapters/ModelNodePersistableAdapter.java
deleted file mode 100644
index 2493fd2a7..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/adapters/ModelNodePersistableAdapter.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.te.core.adapters;
-
-import java.io.IOException;
-import java.net.URI;
-import java.util.Map;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.tm.te.core.activator.CoreBundleActivator;
-import org.eclipse.tm.te.runtime.model.interfaces.IModelNode;
-import org.eclipse.tm.te.runtime.persistence.interfaces.IPersistable;
-
-/**
- * Model node persistable adapter implementation.
- */
-public class ModelNodePersistableAdapter implements IPersistable {
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.persistence.interfaces.IPersistable#getStorageID()
- */
- @Override
- public String getStorageID() {
- return "org.eclipse.tm.te.runtime.persistence.properties"; //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.persistence.interfaces.IPersistable#getURI(java.lang.Object)
- */
- @Override
- public URI getURI(Object data) {
- Assert.isNotNull(data);
-
- URI uri = null;
-
- // Only model nodes are supported
- if (data instanceof IModelNode) {
- IModelNode node = (IModelNode) data;
- if (node.getName() != null && !"".equals(node.getName().trim())) { //$NON-NLS-1$
- // Get the node name and make it a valid file system name (no spaces etc).
- IPath path = getRoot().append(makeValidFileSystemName(((IModelNode) data).getName().trim()));
- if (!"ini".equals(path.getFileExtension())) path = path.addFileExtension("ini"); //$NON-NLS-1$ //$NON-NLS-2$
- uri = path.toFile().toURI();
- }
- // If the name is not set, check for "Path"
- else if (node.getStringProperty("Path") != null && !"".equals(node.getStringProperty("Path").trim())) { //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- IPath path = new Path(node.getStringProperty("Path")); //$NON-NLS-1$
- uri = path.toFile().toURI();
- }
- }
-
- return uri;
- }
-
- /**
- * Make a valid file system name from the given name.
- *
- * @param name The original name. Must not be <code>null</code>.
- * @return The valid file system name.
- */
- private String makeValidFileSystemName(String name) {
- Assert.isNotNull(name);
- return name.replaceAll("\\W", "_"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * Returns the root location.
- *
- * @return The root location or <code>null</code> if it cannot be determined.
- */
- public IPath getRoot() {
- IPath location = null;
-
- // Try the bundles state location first (not available if launched with -data @none).
- try {
- IPath path = Platform.getStateLocation(CoreBundleActivator.getContext().getBundle()).append(".store"); //$NON-NLS-1$
- if (!path.toFile().exists()) path.toFile().mkdirs();
- if (path.toFile().canRead() && path.toFile().isDirectory()) {
- location = path;
- }
- } catch (IllegalStateException e) {
- // Workspace less environments (-data @none)
- // The users local target definition persistence directory is $HOME/.tcf/.store.
- IPath path = new Path(System.getProperty("user.home")).append(".tcf/.store"); //$NON-NLS-1$ //$NON-NLS-2$
- if (!path.toFile().exists()) path.toFile().mkdirs();
- if (path.toFile().canRead() && path.toFile().isDirectory()) {
- location = path;
- }
- }
-
- return location;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.persistence.interfaces.IPersistable#exportFrom(java.lang.Object)
- */
- @Override
- public Map<String, Object> exportFrom(Object data) throws IOException {
- Assert.isNotNull(data);
-
- Map<String, Object> result = null;
-
- // Only model nodes are supported
- if (data instanceof IModelNode) {
- result = ((IModelNode)data).getProperties();
- }
-
- return result;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.persistence.interfaces.IPersistable#importTo(java.lang.Object, java.util.Map)
- */
- @Override
- public void importTo(Object data, Map<String, Object> external) throws IOException {
- Assert.isNotNull(data);
- Assert.isNotNull(external);
-
- // Only model nodes are supported
- if (data instanceof IModelNode) {
- IModelNode node = (IModelNode) data;
- for (String key : external.keySet()) {
- node.setProperty(key, external.get(key));
- }
- }
- }
-
-}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/connection/ConnectionType.java b/target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/connection/ConnectionType.java
deleted file mode 100644
index 71ead5bb8..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/connection/ConnectionType.java
+++ /dev/null
@@ -1,227 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.te.core.connection;
-
-import java.util.Map;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.tm.te.core.activator.CoreBundleActivator;
-import org.eclipse.tm.te.core.connection.interfaces.IConnectionType;
-import org.eclipse.tm.te.core.connection.interfaces.IConnectionTypeConstants;
-import org.eclipse.tm.te.core.utils.text.StringUtil;
-import org.eclipse.tm.te.runtime.nls.Messages;
-import org.eclipse.tm.te.runtime.properties.PropertiesContainer;
-
-/**
- * Connection type implementation.
- */
-public class ConnectionType extends PropertiesContainer implements IConnectionType {
-
- /**
- * Initialize the default connection type properties.
- * <p>
- * <b>Note:</b> This method is called from {@link #setInitializationData(IConfigurationElement, String, Object)}.
- */
- protected void initDefaultProperties() {
- setProperty(IConnectionTypeConstants.PROPERTY_DEFINING_BUNDLE, null);
- setProperty(IConnectionTypeConstants.PROPERTY_ID, null);
- setProperty(IConnectionTypeConstants.PROPERTY_LABEL, ""); //$NON-NLS-1$
- setProperty(IConnectionTypeConstants.PROPERTY_SHORTNAME, ""); //$NON-NLS-1$
- setProperty(IConnectionTypeConstants.PROPERTY_DESCRIPTION, ""); //$NON-NLS-1$
- setProperty(IConnectionTypeConstants.PROPERTY_CATEGORY_ID, null);
- setProperty(IConnectionTypeConstants.PROPERTY_SUPPORTS_EARLY_FINISH, false);
- setProperty(IConnectionTypeConstants.PROPERTY_ENABLED, true);
- setProperty(IConnectionTypeConstants.PROPERTY_LAST_INVALID_CAUSE, null);
- setProperty(IConnectionTypeConstants.PROPERTY_CONNECT_IMMEDIATELY, true);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IExecutableExtension#setInitializationData(org.eclipse.core.runtime.IConfigurationElement, java.lang.String, java.lang.Object)
- */
- @Override
- @SuppressWarnings("unchecked")
- public void setInitializationData(IConfigurationElement config, String propertyName, Object data) throws CoreException {
- // Initialize the default properties first
- initDefaultProperties();
-
- // read the connection type attributes from the configuration element and apply
- if (config != null && config.getName().equals("connectionType")) { //$NON-NLS-1$
-
- // Set the id if an id attribute is specified and the id had been not
- // yet set by the connection type implementation class.
- // Throws an exception if the id is empty or null.
- String id = config.getAttribute("id"); //$NON-NLS-1$
- if (getId() == null && id != null && id.length() > 0) {
- setProperty(IConnectionTypeConstants.PROPERTY_ID, id);
- } else {
- throw createMissingMandatoryAttributeException("id", config.getContributor().getName()); //$NON-NLS-1$
- }
-
- // Initialize the label field by reading the <label> extension attribute if present.
- String label = config.getAttribute("label"); //$NON-NLS-1$
- if (label != null && label.length() > 0) {
- setProperty(IConnectionTypeConstants.PROPERTY_LABEL, label);
- } else {
- throw createMissingMandatoryAttributeException("label", config.getContributor().getName()); //$NON-NLS-1$
- }
-
- // Initialize the description field by reading the "<description>" extension child element if present.
- IConfigurationElement[] children = config.getChildren("description"); //$NON-NLS-1$
- // Only one description element is allow. All other will be ignored
- if (children.length > 0) {
- IConfigurationElement description = children[0];
- String value = description.getValue();
- setProperty(IConnectionTypeConstants.PROPERTY_DESCRIPTION, value != null ? value.trim() : ""); //$NON-NLS-1$
- }
-
- // Get the enabled attribute
- String isEnabled = config.getAttribute("isEnabled"); //$NON-NLS-1$
-
- // We allow to overwrite the enabled attribute from the plugin.xml
- // via a .options file property:
- //
- // The options file key is: <contribution plugin>/connectionType/<id>/enabled = true
- StringBuilder debugKey = new StringBuilder(config.getContributor().getName());
- debugKey.append("/connectionType/"); //$NON-NLS-1$
- debugKey.append(id.replaceAll("\\s", "_")); //$NON-NLS-1$ //$NON-NLS-2$
- debugKey.append("/enabled"); //$NON-NLS-1$
-
- if (Boolean.parseBoolean(Platform.getDebugOption(debugKey.toString()))) {
- isEnabled = "true"; //$NON-NLS-1$
- }
-
- // Apply the enabled attribute
- if (isEnabled != null && isEnabled.length() > 0 && (isEnabled.equalsIgnoreCase("true") || isEnabled.equalsIgnoreCase("false"))) { //$NON-NLS-1$ //$NON-NLS-2$
- setProperty(IConnectionTypeConstants.PROPERTY_ENABLED, Boolean.valueOf(isEnabled).booleanValue());
- }
-
- // Get the short name attribute
- String shortName = config.getAttribute("shortName"); //$NON-NLS-1$
- if (shortName != null && shortName.length() > 0) {
- setProperty(IConnectionTypeConstants.PROPERTY_SHORTNAME, shortName);
- }
-
- // Get the new connection wizard category id
- String categoryId = config.getAttribute("categoryId"); //$NON-NLS-1$
- if (categoryId != null && categoryId.length() > 0) {
- setProperty(IConnectionTypeConstants.PROPERTY_CATEGORY_ID, categoryId);
- }
- }
-
- // Check the initialization data object. Can be either a string or a hash table.
- if (data instanceof String) {
- // Tokenize the string and take the pairs as properties
- String[] params = StringUtil.tokenize((String)data, 0, false);
- for (int i = 0; i < params.length - 1; i++) {
- // Parameter key is the first parameter
- String paramKey = params[i];
- // Parameter value is the second parameter
- String paramValue = (i + 1) < params.length ? params[++i] : null;
- // Don't apply a property with the same name if already set (protects
- // explicit attributes like "shortName", "isEnabled" or "categoryId").
- if (paramKey != null && getProperty(paramKey) != null) continue;
- // Store it
- if (paramKey != null) setProperty(paramKey, paramValue);
- }
- }
- else if (data instanceof Map<?,?>) {
- // Just copy the map content to the properties
- Map<String, String> params = (Map<String, String>)data;
- for (String paramKey : params.keySet()) {
- // If the short name is already set, don't overwrite it
- if (IConnectionTypeConstants.PROPERTY_SHORTNAME.equals(paramKey) && getProperty(paramKey) != null) continue;
- // Store it
- if (paramKey != null) setProperty(paramKey, params.get(paramKey));
- }
- }
- }
-
- /**
- * Creates a new {@link CoreException} to be thrown if a mandatory extension attribute
- * is missing.
- *
- * @param attributeName The attribute name. Must be not <code>null</code>.
- * @param extensionId The extension id. Must be not <code>null</code>.
- *
- * @return The {@link CoreException} instance.
- */
- protected CoreException createMissingMandatoryAttributeException(String attributeName, String extensionId) {
- Assert.isNotNull(attributeName);
- Assert.isNotNull(extensionId);
-
- return new CoreException(new Status(IStatus.ERROR,
- CoreBundleActivator.getUniqueIdentifier(),
- 0,
- NLS.bind(Messages.Extension_error_missingRequiredAttribute, attributeName, extensionId),
- null));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.extensions.IExecutableExtension#getId()
- */
- @Override
- public final String getId() {
- return getStringProperty(IConnectionTypeConstants.PROPERTY_ID);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.extensions.IExecutableExtension#getLabel()
- */
- @Override
- public final String getLabel() {
- return getStringProperty(IConnectionTypeConstants.PROPERTY_LABEL);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.extensions.IExecutableExtension#getDescription()
- */
- @Override
- public final String getDescription() {
- return getStringProperty(IConnectionTypeConstants.PROPERTY_DESCRIPTION);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.core.connection.interfaces.IConnectionType#isEnabled()
- */
- @Override
- public boolean isEnabled() {
- return getBooleanProperty(IConnectionTypeConstants.PROPERTY_ENABLED) /*&& ConnectionTypeBindingsManager.getInstance().isConnectionTypeEnabled(getId())*/;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.core.connection.interfaces.IConnectionType#isValid()
- */
- @Override
- public boolean isValid() {
- setProperty(IConnectionTypeConstants.PROPERTY_LAST_INVALID_CAUSE, null);
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.PlatformObject#getAdapter(java.lang.Class)
- */
- @Override
- public Object getAdapter(Class adapter) {
- // If the requested adapter is a connection service type,
- // forward to the connection type service manager
-// if (IConnectionTypeService.class.isAssignableFrom(adapter)) {
-// IConnectionTypeService service = ConnectionTypeServiceManager.getInstance().getService(getId(), adapter);
-// if (service != null) return service;
-// }
- return super.getAdapter(adapter);
- }
-
-}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/connection/interfaces/IConnectStrategy.java b/target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/connection/interfaces/IConnectStrategy.java
deleted file mode 100644
index 0433ff7aa..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/connection/interfaces/IConnectStrategy.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.te.core.connection.interfaces;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.tm.te.core.model.interfaces.IConnectable;
-import org.eclipse.tm.te.runtime.interfaces.callback.ICallback;
-import org.eclipse.tm.te.runtime.interfaces.extensions.IExecutableExtension;
-
-/**
- * A connect strategy.
- * <p>
- * The connect strategy describes the step to perform to connect or disconnect
- * to or from a given context.
- */
-public interface IConnectStrategy extends IExecutableExtension {
-
- /**
- * Check if the given connectable is valid for this connect strategy.
- *
- * @param connectable The connectable context. Must not be <code>null</code>.
- * @return An error message if the connectable context is invalid, </code>null</code> if it is valid.
- */
- public String validate(IConnectable connectable);
-
- /**
- * Check if prerequisites for connecting are valid.
- * <p>
- * Don't run any time-consuming checks.
- *
- * @param connectable The connectable context. Must not be <code>null</code>.
- * @return <code>True</code> if the connectable can be connected, <code>false</code> otherwise.
- */
- public boolean canConnect(IConnectable connectable);
-
- /**
- * Check if prerequisites for disconnecting are valid.
- * <p>
- * Don't run any time-consuming checks.
- *
- * @param connectable The connectable context. Must not be <code>null</code>.
- * @return <code>True</code> if the connectable can be disconnected, <code>false</code> otherwise.
- */
- public boolean canDisconnect(IConnectable connectable);
-
- /**
- * Connect the context.
- * <p>
- * The connect will be performed by the eclipse job model when no external progress monitor is given.
- * If the connect sequence finished or failed or got canceled, the given callback is called if not <code>null</code>.
- *
- * @param connectable The connectable context. Must not be <code>null</code>.
- * @param progress An possible external progress monitor or <code>null</code>.
- * @param ticksToUse The ticks to use.
- * @param cb The callback to call when completed.
- * @param autoAttach <code>false</code> to avoid auto attaching.
- */
- public void connect(IConnectable connectable, IProgressMonitor progress, int ticksToUse, ICallback cb, boolean autoAttach);
-
- /**
- * Disconnect the context.
- * <p>
- * The connect will be performed by the eclipse job model when no external progress monitor is given.
- * If the connect sequence finished or failed , the given callback is called if not <code>null</code>.
- *
- * @param connectable The connectable context. Must not be <code>null</code>.
- * @param progress An possible external progress monitor or <code>null</code>.
- * @param cb The callback to call when completed.
- * @param useJob <code>true</code> if the disconnect should run in a job.
- * @param quitting <code>true</code> if disconnect is called during workbench shutdown.
- */
- public void disconnect(IConnectable connectable, IProgressMonitor progress, int ticksToUse, ICallback cb, boolean quitting);
-
- /**
- * Returns if or if not this connect strategy describes a connection type
- * of the given family.
- *
- * @param connectable The connectable context or <code>null</code>.
- * @param typeFamily The connection type family id.
- *
- * @return <code>True</code> if this connect strategy describes a connection type of the given family.
- */
- public boolean isConnectionTypeFamily(IConnectable connectable, long typeFamily);
-}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/connection/interfaces/IConnectionType.java b/target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/connection/interfaces/IConnectionType.java
deleted file mode 100644
index a368b59e8..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/connection/interfaces/IConnectionType.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.te.core.connection.interfaces;
-
-import org.eclipse.tm.te.runtime.interfaces.extensions.IExecutableExtension;
-import org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer;
-
-/**
- * A connection type.
- * <p>
- * Each node on each level of the Target Explorer tree can be bound to a connection type. Child
- * nodes does inherit the connection type of the parent nodes automatically if not bound to another
- * connection type explicitly.
- * <p>
- * A node can be bound to a single connection type only. The first connection type with an
- * enablement matching a node is chosen if multiple connection types would match.
- * <p>
- * Connection types not bound to any enablement are considered invalid. Enablements are
- * contributed through the connection type bindings extension point. Multiple enablements
- * from different plug-ins are allowed. The ordering of multiple enablements is undefined and
- * given by the order the extension points are provided to the extension point manager by
- * the Eclipse platform.
- * <p>
- * Connection types can bind connection type specific services through the connection type
- * bindings extension point.
- */
-public interface IConnectionType extends IPropertiesContainer, IExecutableExtension {
-
- /**
- * Returns if or if not this connection type has been explicitly disabled by the
- * connection type contributor.
- * <p>
- * Even if this method returns <code>true</code>, connection types might be still
- * disabled by other conditions like disabled capabilities.
- *
- * @return <code>True</code> if the connection type is enabled, <code>false</code> otherwise.
- */
- public boolean isEnabled();
-
- /**
- * Returns if or if not this connection types is valid.
- * <p>
- * A connection type is considered valid if all prerequisites like installed plug-ins or
- * products, runtime platforms or licensing conditions are fulfilled.
- *
- * @return <code>True</code> if the connection type is valid, <code>false</code> otherwise.
- */
- public boolean isValid();
-}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/connection/interfaces/IConnectionTypeConstants.java b/target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/connection/interfaces/IConnectionTypeConstants.java
deleted file mode 100644
index 0c9696e93..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/connection/interfaces/IConnectionTypeConstants.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.te.core.connection.interfaces;
-
-import org.osgi.framework.Bundle;
-
-/**
- * Connection type property constant definitions.
- */
-public interface IConnectionTypeConstants {
-
- /**
- * The bundle which is contributing the connection type definition.
- * <p>
- * Type: {@link Bundle}
- */
- public static final String PROPERTY_DEFINING_BUNDLE = "definingBundle"; //$NON-NLS-1$
-
- /**
- * The connection type unique id.
- * <p>
- * Type: {@link String}
- */
- public static final String PROPERTY_ID = "id"; //$NON-NLS-1$
-
- /**
- * The connection type label for representing the connection type within the UI.
- * <p>
- * Type: {@link String}
- */
- public static final String PROPERTY_LABEL = "label"; //$NON-NLS-1$
-
- /**
- * The connection type description.
- * <p>
- * The description is presented to the user within the new connection wizard to give the user a
- * hint what the connection type can be used for.
- * <p>
- * Type: {@link String}
- */
- public static final String PROPERTY_DESCRIPTION = "description"; //$NON-NLS-1$
-
- /**
- * The connection type short name.
- * <p>
- * The short name is used to construct a default connection name for new connections of this
- * type.
- * <p>
- * Type: {@link String}
- */
- public static final String PROPERTY_SHORTNAME = "shortname"; //$NON-NLS-1$
-
- /**
- * The connection type category id.
- * <p>
- * The id of the category the connection type is associated with. The categories are visualized
- * to the user by grouping connection types of the same category within the new connection
- * wizard.
- * <p>
- * Type: {@link String}
- */
- public static final String PROPERTY_CATEGORY_ID = "categoryId"; //$NON-NLS-1$
-
- /**
- * Supports early finish.
- * <p>
- * The user can finish the new connection wizard early. The user is not required to walk through
- * all available new connection wizard pages, associated with this connection type.
- * <p>
- * Type: {@link Boolean}
- */
- public static final String PROPERTY_SUPPORTS_EARLY_FINISH = "supportsEarlyFinish"; //$NON-NLS-1$
-
- /**
- * The connection types explicit enabled state.
- * <p>
- * Type: {@link Boolean}
- */
- public static final String PROPERTY_ENABLED = "enabled"; //$NON-NLS-1$
-
- /**
- * Instances of this target connection type can be created by the user via the
- * "New Connection" wizard UI. The default value is <code>true</code>.
- * <p>
- * Type: {@link Boolean}
- */
- public static final String PROPERTY_IS_USER_CREATABLE = "isUserCreatable"; //$NON-NLS-1$
-
- /**
- * The connection type last invalidation cause.
- * <p>
- * User readable string presented within the UI (error log) to inform the user why this
- * connection type had been set invalid.
- * <p>
- * Type: {@link String}
- */
- public static final String PROPERTY_LAST_INVALID_CAUSE = "lastInvalidCause"; //$NON-NLS-1$
-
- /**
- * Property to control if newly created connections of this connection type will be connected
- * immediately. This property is effective as long the user did not modified the setting via the
- * new connection wizard. The users last choice for this connection type is remembered by the
- * new connection wizard via the wizards dialog settings history (per workspace).
- * <p>
- * Type: {@link Boolean}
- */
- public static final String PROPERTY_CONNECT_IMMEDIATELY = "connectImmediately"; //$NON-NLS-1$
-}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/connection/managers/ConnectStrategyExtensionPointManager.java b/target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/connection/managers/ConnectStrategyExtensionPointManager.java
deleted file mode 100644
index 868917d3d..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/connection/managers/ConnectStrategyExtensionPointManager.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.te.core.connection.managers;
-
-import java.util.LinkedHashMap;
-import java.util.Map;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.tm.te.core.connection.interfaces.IConnectStrategy;
-import org.eclipse.tm.te.core.connection.strategy.ConnectStrategyStepGroup;
-import org.eclipse.tm.te.runtime.extensions.AbstractExtensionPointManager;
-import org.eclipse.tm.te.runtime.extensions.ExecutableExtensionProxy;
-import org.eclipse.tm.te.runtime.stepper.interfaces.IContextStepGroup;
-
-/**
- * Connect strategy extension point manager implementation.
- * <p>
- * The class is not intended to be subclassed by clients.
- */
-public class ConnectStrategyExtensionPointManager extends AbstractExtensionPointManager<IConnectStrategy> {
-
- protected class ConnectStrategyExtensionPointProxy extends ExecutableExtensionProxy<IConnectStrategy> {
- private final Map<String, IContextStepGroup> stepGroups = new LinkedHashMap<String, IContextStepGroup>();
-
- public ConnectStrategyExtensionPointProxy(IConfigurationElement element) throws CoreException {
- super(element);
- loadGroups(element);
- }
-
- private void loadGroups(IConfigurationElement element) {
- for (IConfigurationElement stepGroupsElement : element.getChildren("stepGroups")) { //$NON-NLS-1$
- for (IConfigurationElement stepGroupElement : stepGroupsElement.getChildren("stepGroup")) { //$NON-NLS-1$
- IContextStepGroup stepGroup = new ConnectStrategyStepGroup();
- try {
- stepGroup.setInitializationData(stepGroupElement, stepGroupElement.getName(), null);
- stepGroups.put(stepGroup.getId(), stepGroup);
- }
- catch (CoreException e) {
- }
- }
- }
- }
-
- public IContextStepGroup getStepGroup(String stepGroupId) {
- return stepGroups.get(stepGroupId);
- }
- }
-
- /*
- * Thread save singleton instance creation.
- */
- private static class LazyConnectStrategyExtensionPointManager {
- public static ConnectStrategyExtensionPointManager instance = new ConnectStrategyExtensionPointManager();
- }
-
- /**
- * Returns the singleton instance for the connection type bindings manager.
- */
- public static ConnectStrategyExtensionPointManager getInstance() {
- return LazyConnectStrategyExtensionPointManager.instance;
- }
-
- /**
- * Constructor.
- */
- /* default */ ConnectStrategyExtensionPointManager() {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.extensions.AbstractExtensionPointManager#getExtensionPointId()
- */
- @Override
- protected String getExtensionPointId() {
- return "org.eclipse.tm.te.core.connectStrategies"; //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.extensions.AbstractExtensionPointManager#getConfigurationElementName()
- */
- @Override
- protected String getConfigurationElementName() {
- return "connectStrategy"; //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.extensions.AbstractExtensionPointManager#doCreateExtensionProxy(org.eclipse.core.runtime.IConfigurationElement)
- */
- @Override
- protected ExecutableExtensionProxy<IConnectStrategy> doCreateExtensionProxy(IConfigurationElement element) throws CoreException {
- return new ConnectStrategyExtensionPointProxy(element);
- }
-
- /**
- * Returns the connect strategy instance for the given id.
- *
- * @param id The connect strategy id or <code>null</code>.
- * @return Returns the connect strategy instance or <code>null</code>.
- */
- public IConnectStrategy getConnectStrategy(String connectStrategyId) {
- if (connectStrategyId == null) {
- return null;
- }
-
- IConnectStrategy connectStrategy = null;
- if (getExtensions().containsKey(connectStrategyId)) {
- ExecutableExtensionProxy<IConnectStrategy> proxy = getExtensions().get(connectStrategyId);
- // Get the extension instance
- connectStrategy = proxy.getInstance();
- }
-
- return connectStrategy;
- }
-
- public IContextStepGroup getStepGroup(String connectStrategyId, String stepGroupId) {
- if (connectStrategyId == null || stepGroupId == null) {
- return null;
- }
-
- if (getExtensions().containsKey(connectStrategyId)) {
- ConnectStrategyExtensionPointProxy proxy = (ConnectStrategyExtensionPointProxy)getExtensions().get(connectStrategyId);
- return proxy.getStepGroup(stepGroupId);
- }
- return null;
- }
-}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/connection/managers/ConnectionTypeBindingsManager.java b/target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/connection/managers/ConnectionTypeBindingsManager.java
deleted file mode 100644
index f55251d9f..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/connection/managers/ConnectionTypeBindingsManager.java
+++ /dev/null
@@ -1,257 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.te.core.connection.managers;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtension;
-import org.eclipse.core.runtime.IExtensionPoint;
-import org.eclipse.core.runtime.IExtensionRegistry;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.tm.te.core.connection.interfaces.IConnectStrategy;
-import org.eclipse.tm.te.core.connection.interfaces.IConnectionType;
-
-/**
- * Connection type bindings extension point manager implementation.
- */
-public class ConnectionTypeBindingsManager {
-
- /**
- * Immutable class describing a connect strategy binding.
- */
- private final static class ConnectStrategyBinding {
- public final String id;
- public final String overwrite;
-
- public ConnectStrategyBinding(String id, String overwrite) {
- this.id = id;
- this.overwrite = overwrite;
- }
- }
-
- // Flag to remember if the extension point got already read and processed.
- private boolean initialized;
-
- // The map between connection type id's and their associated connect strategies.
- private final Map<String, List<ConnectStrategyBinding>> typeIdToStrategyId = new LinkedHashMap<String, List<ConnectStrategyBinding>>();
-
- // The sub extension point manager instances
- private final ConnectionTypeExtensionPointManager connectionTypeManger = new ConnectionTypeExtensionPointManager();
-
- /*
- * Thread save singleton instance creation.
- */
- private static class LazyConnectionTypeBindingsManager {
- public static ConnectionTypeBindingsManager instance = new ConnectionTypeBindingsManager();
- }
-
- /**
- * Returns the singleton instance for the connection type bindings manager.
- */
- public static ConnectionTypeBindingsManager getInstance() {
- return LazyConnectionTypeBindingsManager.instance;
- }
-
- /**
- * Constructor.
- */
- ConnectionTypeBindingsManager() {
- initialized = false;
- initialize();
- }
-
- /**
- * Initialize the connection type bindings manager and triggers to load and read the managed
- * extension points.
- */
- public void initialize() {
- if (initialized) {
- return;
- }
- // load and register the connection type bindings
- loadConnectionTypeBindings();
- initialized = true;
- }
-
- // ***** BEGIN: Section extension point management *****
-
- /**
- * Load and register all connection type id shortcuts.
- */
- private void loadConnectionTypeBindings() {
- // load all target connection type bindings and register them
- IExtensionRegistry registry = Platform.getExtensionRegistry();
- IExtensionPoint point = registry.getExtensionPoint("org.eclipse.tm.te.core.connectionTypeBindings"); //$NON-NLS-1$
- if (point != null) {
- // load target connection type bindings
- IExtension[] typeBindings = point.getExtensions();
- for (IExtension typeBinding : typeBindings) {
- // load configuration elements
- IConfigurationElement[] configElements = typeBinding.getConfigurationElements();
- for (IConfigurationElement configElement : configElements) {
- // handle connection type binding
- if ("connectionTypeBinding".equals(configElement.getName())) { //$NON-NLS-1$
- String connectionTypeId = configElement.getAttribute("connectionTypeId"); //$NON-NLS-1$
- // load connect strategy binding
- IConfigurationElement[] connectStrategy = configElement.getChildren("connectStrategy"); //$NON-NLS-1$
- for (IConfigurationElement element : connectStrategy) {
- String connectStrategyId = element.getAttribute("id"); //$NON-NLS-1$
- String connectStrategyOverwrite = element.getAttribute("overwrite"); //$NON-NLS-1$
- if (connectStrategyId != null && connectStrategyId.length() > 0) {
- registerConnectStrategyBinding(connectionTypeId.trim(), connectStrategyId.trim(), connectStrategyOverwrite != null ? connectStrategyOverwrite.trim() : null);
- }
- }
- }
- }
- }
- }
- }
-
- // ***** END: Section extension point management *****
-
- // ***** BEGIN: Section connect strategy management *****
-
- /**
- * Register a binding between a connection type id and a connect strategy id. Bindings
- * registered for the same connection type will be overwritten using the overwrite attribute. If
- * the connect strategy id is <code>null</code>, possibly registered bindings are removed.
- *
- * @param typeId The connection type id. Must not be <code>null</code> and not empty.
- * @param strategyId The connect strategy id or <code>null</code>.
- * @param overwrite The connect strategy id that should be overwritten by this id.
- */
- public void registerConnectStrategyBinding(String typeId, String strategyId, String overwrite) {
- Assert.isNotNull(typeId);
- Assert.isTrue(typeId.trim().length() > 0);
-
- if (strategyId != null && strategyId.trim().length() > 0) {
- List<ConnectStrategyBinding> bindings = typeIdToStrategyId.get(typeId.trim());
- if (bindings == null) {
- bindings = new ArrayList<ConnectStrategyBinding>();
- typeIdToStrategyId.put(typeId.trim(), bindings);
- }
- ConnectStrategyBinding binding = new ConnectStrategyBinding(strategyId.trim(), overwrite != null ? overwrite.trim() : null);
- bindings.add(binding);
- Collections.sort(bindings, new Comparator<ConnectStrategyBinding>() {
- @Override
- public int compare(ConnectStrategyBinding o1, ConnectStrategyBinding o2) {
- // handle multiple id's without overwrite (alphabetical order)
- if (o1.overwrite == null && o2.overwrite == null) {
- return o1.id.compareTo(o2.id);
- }
- // handle overwrite the same id twice (alphabetical order)
- if (o1.overwrite != null && o2.overwrite != null && o1.overwrite.equals(o2.overwrite)) {
- return o1.id.compareTo(o2.id);
- }
- // handle recursive overwrite (alphabetical order)
- if (o1.overwrite != null && o1.overwrite.equals(o2.id) && o2.overwrite != null && o2.overwrite.equals(o1.id)) {
- return o1.id.compareTo(o2.id);
- }
- // o1 overwrites o2
- if (o1.overwrite != null && o1.overwrite.equals(o2.id)) {
- return -1;
- }
- // o2 overwrites o1
- if (o2.overwrite != null && o2.overwrite.equals(o1.id)) {
- return 1;
- }
- // fallback alphabetical order
- return o1.id.compareTo(o2.id);
- }
- });
-
- } else if (strategyId == null) {
- typeIdToStrategyId.remove(typeId.trim());
- }
- }
-
- /**
- * Returns the corresponding connect strategy id for the given connection type id.
- *
- * @param typeId The connection type id. Must not be <code>null</code> and not empty!
- * @return The connect strategy id if registered or <code>null</code>.
- */
- public String getConnectStrategyId(String typeId) {
- if (typeId != null && typeId.trim().length() > 0) {
- List<ConnectStrategyBinding> bindings = typeIdToStrategyId.get(typeId.trim());
- return bindings != null && !bindings.isEmpty() ? bindings.get(0).id : null;
- }
- return null;
- }
-
- /**
- * Returns the corresponding <code>IConnectStrategy</code> for the given connection type id.
- *
- * @param typeId The connection type id. Must not be <code>null</code>.
- * @return The corresponding connect strategy object or <code>null</code>.
- */
- public IConnectStrategy getConnectStrategy(String typeId) {
- Assert.isNotNull(typeId);
- String connectStrategyId = getConnectStrategyId(typeId);
- return ConnectStrategyExtensionPointManager.getInstance().getConnectStrategy(connectStrategyId);
- }
-
- // ***** END: Section connect strategy management *****
-
- // ***** BEGIN: Section connection type management *****
-
- /**
- * Returns the list of all contributed connection types.
- *
- * @return The list of contributed connection types, or an empty array.
- */
- public IConnectionType[] getConnectionTypes() {
- return connectionTypeManger.getConnectionTypes();
- }
-
- /**
- * Returns the corresponding <code>IConnectionType</code> for the given connection type id.
- *
- * @param typeId The connection type id. Must not be <code>null</code>.
- * @return The corresponding connection type object or <code>null</code>.
- */
- public IConnectionType getConnectionType(String typeId) {
- Assert.isNotNull(typeId);
- return connectionTypeManger.getConnectionType(typeId);
- }
-
- /**
- * Returns the corresponding <code>IConnectionType</code> for the given connectable context object.
- *
- * @param context The connectable context object. Must not be <code>null</code>
- * @return The corresponding target connection type object or <code>null</code>.
- */
- public IConnectionType getConnectionType(Object context) {
- Assert.isNotNull(context);
- return null;
- }
-
- /**
- * Checks if the connection type, specified by the given type id, is enabled.
- * <p>
- * A connection type is enabled when at least one enablement evaluates to <code>true</code>.
- *
- * @param typeId The connection type id. Must not be <code>null</code>.
- * @return <code>True</code> if the connection type is enabled, <code>false</code> otherwise.
- */
- public boolean isConnectionTypeEnabled(String typeId) {
- Assert.isNotNull(typeId);
- return true;
- }
-
- // ***** END: Section connection type management *****
-}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/connection/managers/ConnectionTypeExtensionPointManager.java b/target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/connection/managers/ConnectionTypeExtensionPointManager.java
deleted file mode 100644
index 3b16eeb0b..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/connection/managers/ConnectionTypeExtensionPointManager.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.te.core.connection.managers;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.tm.te.core.connection.interfaces.IConnectionType;
-import org.eclipse.tm.te.runtime.extensions.AbstractExtensionPointManager;
-import org.eclipse.tm.te.runtime.extensions.ExecutableExtensionProxy;
-
-/**
- * Connection type extension point manager implementation.
- * <p>
- * The class is not intended to be subclassed by clients.
- */
-public final class ConnectionTypeExtensionPointManager extends AbstractExtensionPointManager<IConnectionType> {
-
- /**
- * Constructor.
- */
- /* default */ ConnectionTypeExtensionPointManager() {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.extensions.AbstractExtensionPointManager#getExtensionPointId()
- */
- @Override
- protected String getExtensionPointId() {
- return "org.eclipse.tm.te.core.connectionTypes"; //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.extensions.AbstractExtensionPointManager#getConfigurationElementName()
- */
- @Override
- protected String getConfigurationElementName() {
- return "connectionType"; //$NON-NLS-1$
- }
-
- /**
- * Returns the list of all contributed connection types.
- *
- * @return The list of contributed connection types, or an empty array.
- */
- public IConnectionType[] getConnectionTypes() {
- List<IConnectionType> types = new ArrayList<IConnectionType>();
- Collection<ExecutableExtensionProxy<IConnectionType>> proxies = getExtensions().values();
- for (ExecutableExtensionProxy<IConnectionType> proxy : proxies)
- if (proxy.getInstance() != null && !types.contains(proxy.getInstance()))
- types.add(proxy.getInstance());
-
- return types.toArray(new IConnectionType[types.size()]);
- }
-
- /**
- * Returns the connection type identified by its unique id. If no connection
- * type with the specified id is registered, <code>null</code> is returned.
- *
- * @param id The unique id of the connection type. Must not be <code>null</code>
- * @return The connection type or <code>null</code>.
- */
- public IConnectionType getConnectionType(String id) {
- Assert.isNotNull(id);
-
- IConnectionType connectionType = null;
- if (getExtensions().containsKey(id)) {
- ExecutableExtensionProxy<IConnectionType> proxy = getExtensions().get(id);
- connectionType = proxy.getInstance();
- }
-
- return connectionType;
- }
-
-}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/connection/strategy/ConnectStrategyStepExecutor.java b/target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/connection/strategy/ConnectStrategyStepExecutor.java
deleted file mode 100644
index c087cfc20..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/connection/strategy/ConnectStrategyStepExecutor.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.te.core.connection.strategy;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.tm.te.core.activator.CoreBundleActivator;
-import org.eclipse.tm.te.core.nls.Messages;
-import org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer;
-import org.eclipse.tm.te.runtime.stepper.extensions.AbstractContextStepExecutor;
-import org.eclipse.tm.te.runtime.stepper.interfaces.IContext;
-import org.eclipse.tm.te.runtime.stepper.interfaces.IContextStep;
-import org.eclipse.tm.te.runtime.stepper.interfaces.IFullQualifiedId;
-
-/**
- * Connect strategy step executor implementation.
- */
-public class ConnectStrategyStepExecutor extends AbstractContextStepExecutor {
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.stepper.extensions.AbstractContextStepExecutor#formatMessage(java.lang.String, int, org.eclipse.tm.te.runtime.stepper.interfaces.IContextStep, org.eclipse.tm.te.runtime.stepper.interfaces.IFullQualifiedId, org.eclipse.tm.te.runtime.stepper.interfaces.IContext, org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer)
- */
- @Override
- protected String formatMessage(String message, int severity, IContextStep step, IFullQualifiedId id, IContext context, IPropertiesContainer data) {
- String template = null;
-
- switch (severity) {
- case IStatus.INFO:
- template = Messages.ConnectStrategyStepExecutor_info_stepFailed;
- break;
- case IStatus.WARNING:
- template = Messages.ConnectStrategyStepExecutor_warning_stepFailed;
- break;
- case IStatus.ERROR:
- template = Messages.ConnectStrategyStepExecutor_error_stepFailed;
- break;
- }
-
- // If we cannot determine the formatted message template, just return the message as is
- if (template == null) {
- return message;
- }
-
- // Split the message. The first sentence is shown more prominent on the top,
- // the rest as additional information below the step information.
- String[] splittedMsg = message != null ? message.split("[\t\n\r\f]+", 2) : new String[] { null, null }; //$NON-NLS-1$
-
- // Format the core message
- String formattedMessage = NLS.bind(template, new String[] { splittedMsg[0],
- context.getContextName(),
- ConnectStrategyStepper.getConnectStrategy(data).getLabel(),
- step.getLabel()
- });
-
- // Get the context information
- String contextInfo = formatContextInfo(context);
- if (contextInfo != null) {
- formattedMessage += "\n\n" + contextInfo; //$NON-NLS-1$
- }
-
- // If we have more information available, append them
- if (splittedMsg.length > 1 && splittedMsg[1] != null && !"".equals(splittedMsg[1])) { //$NON-NLS-1$
- formattedMessage += "\n\n" + splittedMsg[1]; //$NON-NLS-1$
- }
-
- // In debug mode, there is even more information to add
- if (CoreBundleActivator.getTraceHandler().isSlotEnabled(1, null)) {
- formattedMessage += "\n\n" + NLS.bind(Messages.ConnectStrategyStepExecutor_stepFailed_debugInfo, id.toString()); //$NON-NLS-1$
- }
-
- return formattedMessage;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.stepper.AbstractContextStepExecutor#isExceptionMessageFormatted(java.lang.String)
- */
- @Override
- protected boolean isExceptionMessageFormatted(String message) {
- Assert.isNotNull(message);
- return message.startsWith(Messages.ConnectStrategyStepExecutor_checkPoint_normalizationNeeded);
- }
-
- /**
- * Determines additional context information to show in the failure message.
- *
- * @param context The context. Must not be <code>null</code>.
- * @return The additional context information string or <code>null</code>.
- */
- protected String formatContextInfo(IContext context) {
- Assert.isNotNull(context);
- return context.getContextInfo();
- }
-}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/connection/strategy/ConnectStrategyStepGroup.java b/target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/connection/strategy/ConnectStrategyStepGroup.java
deleted file mode 100644
index 010fa0314..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/connection/strategy/ConnectStrategyStepGroup.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.te.core.connection.strategy;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.tm.te.runtime.extensions.ExecutableExtensionProxy;
-import org.eclipse.tm.te.runtime.stepper.extensions.AbstractContextStepGroup;
-import org.eclipse.tm.te.runtime.stepper.extensions.ContextStepGroupable;
-import org.eclipse.tm.te.runtime.stepper.interfaces.IContextStep;
-import org.eclipse.tm.te.runtime.stepper.interfaces.IContextStepGroupable;
-
-/**
- * Connect strategy step group implementation.
- */
-public class ConnectStrategyStepGroup extends AbstractContextStepGroup {
-
- private final List<ExecutableExtensionProxy<IContextStep>> steps = new ArrayList<ExecutableExtensionProxy<IContextStep>>();
-
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.stepper.extensions.AbstractContextStepGroup#doSetInitializationData(org.eclipse.core.runtime.IConfigurationElement, java.lang.String, java.lang.Object)
- */
- @Override
- public void doSetInitializationData(IConfigurationElement config, String propertyName, Object data) throws CoreException {
- super.doSetInitializationData(config, propertyName, data);
-
- for (IConfigurationElement stepElement : config.getChildren("step")) { //$NON-NLS-1$
- ExecutableExtensionProxy<IContextStep> step = new ExecutableExtensionProxy<IContextStep>(stepElement);
- steps.add(step);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.stepper.interfaces.IContextStepGroup#getSteps(java.lang.String, java.lang.String)
- */
- @Override
- public IContextStepGroupable[] getSteps(String type, String subType) throws CoreException {
- List<IContextStepGroupable> steps = new ArrayList<IContextStepGroupable>();
- for (ExecutableExtensionProxy<IContextStep> stepProxy : this.steps) {
- IContextStep step = stepProxy.newInstance();
- if (step != null) {
- IContextStepGroupable groupable = new ContextStepGroupable(step);
- steps.add(groupable);
- }
- }
- return !steps.isEmpty() ? steps.toArray(new IContextStepGroupable[steps.size()]) : NO_STEPS;
- }
-}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/connection/strategy/ConnectStrategyStepper.java b/target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/connection/strategy/ConnectStrategyStepper.java
deleted file mode 100644
index 791588e8f..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/connection/strategy/ConnectStrategyStepper.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.te.core.connection.strategy;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.tm.te.core.connection.interfaces.IConnectStrategy;
-import org.eclipse.tm.te.core.connection.managers.ConnectStrategyExtensionPointManager;
-import org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer;
-import org.eclipse.tm.te.runtime.stepper.activator.CoreBundleActivator;
-import org.eclipse.tm.te.runtime.stepper.extensions.AbstractContextStepper;
-import org.eclipse.tm.te.runtime.stepper.interfaces.IContext;
-import org.eclipse.tm.te.runtime.stepper.interfaces.IContextStep;
-import org.eclipse.tm.te.runtime.stepper.interfaces.IContextStepExecutor;
-import org.eclipse.tm.te.runtime.stepper.interfaces.IContextStepGroup;
-import org.eclipse.tm.te.runtime.stepper.interfaces.IFullQualifiedId;
-import org.eclipse.tm.te.runtime.stepper.interfaces.IVariantDelegate;
-import org.eclipse.tm.te.runtime.stepper.interfaces.tracing.ITraceIds;
-
-/**
- * A connect strategy stepper.
- */
-@SuppressWarnings("restriction")
-public class ConnectStrategyStepper extends AbstractContextStepper {
-
- public static final String PROPERTY_CONNECT_STRATEGY = "connectStrategy"; //$NON-NLS-1$
-
- private final IContext context;
- private final String stepGroupId;
-
- /**
- * Constructor.
- */
- public ConnectStrategyStepper(IContext context, String stepGroupId, boolean cancelable) {
- super();
- this.context = context;
- this.stepGroupId = stepGroupId;
- setCancelable(cancelable);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.stepper.extensions.AbstractContextStepper#initialize(org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer, org.eclipse.tm.te.runtime.stepper.interfaces.IFullQualifiedId, org.eclipse.core.runtime.IProgressMonitor)
- */
- @Override
- public void initialize(IPropertiesContainer data, IFullQualifiedId fullQualifiedId, IProgressMonitor monitor) throws IllegalStateException {
- Assert.isNotNull(getConnectStrategy(data));
- super.initialize(data, fullQualifiedId, monitor);
- }
-
- /**
- * Get the connect strategy.
- *
- * @param data The data object.
- * @return The connect strategy.
- */
- public static final IConnectStrategy getConnectStrategy(IPropertiesContainer data) {
- Assert.isNotNull(data);
- Assert.isTrue(data.getProperty(PROPERTY_CONNECT_STRATEGY) instanceof IConnectStrategy);
- return (IConnectStrategy)data.getProperty(PROPERTY_CONNECT_STRATEGY);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.extensions.ExecutableExtension#getId()
- */
- @Override
- public String getId() {
- String id = super.getId();
- return id != null ? id : "org.eclipse.tm.te.core.stepper.ConnectStrategyStepper"; //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.stepper.AbstractContextStepper#getType()
- */
- @Override
- protected String getType() {
- return getData() != null ? getConnectStrategy(getData()).getId() : null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.stepper.AbstractContextStepper#getSubType()
- */
- @Override
- protected String getSubType() {
- return stepGroupId;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.stepper.AbstractContextStepper#getName()
- */
- @Override
- protected String getName() {
- return context.getContextName();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.stepper.AbstractContextStepper#getVariantDelegate()
- */
- @Override
- protected IVariantDelegate getVariantDelegate() throws CoreException {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.stepper.extensions.AbstractContextStepper#doCreateStepExecutor(org.eclipse.tm.te.runtime.stepper.interfaces.IContextStep, java.lang.String, org.eclipse.tm.te.runtime.stepper.interfaces.IFullQualifiedId)
- */
- @Override
- protected IContextStepExecutor doCreateStepExecutor(IContextStep step, String secondaryId, IFullQualifiedId fullQualifiedStepId) {
- return new ConnectStrategyStepExecutor();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.stepper.AbstractContextStepper#getStepGroup(java.lang.String, java.lang.String, java.lang.String)
- */
- @Override
- public IContextStepGroup getStepGroup(String connectStrategyId, String stepGroupId, String variant) {
- CoreBundleActivator.getTraceHandler().trace("ConnectStrategyStepper#getStepGroup:" //$NON-NLS-1$
- + " connectStrategyId = '" + connectStrategyId + "'" //$NON-NLS-1$ //$NON-NLS-2$
- + ", stepGroupId = '" + stepGroupId + "'" //$NON-NLS-1$ //$NON-NLS-2$
- + (variant != null && variant.length() > 0 ? ", variant = '" + variant + "'" : ""), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- 0, ITraceIds.TRACE_STEPPING, IStatus.WARNING, this);
-
- return ConnectStrategyExtensionPointManager.getInstance().getStepGroup(connectStrategyId, stepGroupId);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.stepper.AbstractContextStepper#getContexts()
- */
- @Override
- protected IContext[] getContexts() {
- return new IContext[] { context };
- }
-}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/model/interfaces/IConnectable.java b/target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/model/interfaces/IConnectable.java
deleted file mode 100644
index 9dad80ce5..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.core/src/org/eclipse/tm/te/core/model/interfaces/IConnectable.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.te.core.model.interfaces;
-
-
-/**
- * Interface to be implemented by model nodes which can be connected.
- */
-public interface IConnectable {
-
- /**
- * Property: Connect state.
- */
- public static final String PROPERTY_CONNECT_STATE = "connectstate.transient"; //$NON-NLS-1$
-
- /**
- * Property: Connect sub state.
- */
- public static final String PROPERTY_CONNECT_SUB_STATE = "connectSubState.transient"; //$NON-NLS-1$
-
- public static final int STATE_UNREACHABLE = -1;
- public static final int STATE_UNCONNECTED = 0;
- public static final int STATE_DISCONNECTING = 1;
- public static final int STATE_CONNECTING = 2;
- public static final int STATE_CONNECTED = 3;
-
- public static final int SUB_STATE_NORMAL = 0;
- public static final int SUB_STATE_CONNECT_SEND = 1;
- public static final int SUB_STATE_DISCONNECT_SEND = 2;
- public static final int SUB_STATE_REBOOT_MANUAL = 3;
-
- public static final int USER_SUB_STATE_BASE = 10;
-
- /**
- * Returns whether or not this context is connectable.
- *
- * @return <code>true</code> if this context is connectable.
- */
- public boolean isConnectable();
-
- /**
- * Returns the connect state of this context.
- *
- * @return The connect state.
- */
- public int getConnectState();
-
- /**
- * Set the connect state of for this context.
- *
- * @param connectState The new connect state.
- * @return <code>true</code> if the state has changed.
- */
- public boolean setConnectState(int connectState);
-
- /**
- * Check the current state.
- *
- * @param connectState The connect state to check.
- * @return <code>true</code> if the current connect state equals the given one.
- */
- public boolean isConnectState(int connectState);
-
- /**
- * Returns the connect sub state of this context.
- *
- * @return The connect sub state.
- */
- public int getConnectSubState();
-
- /**
- * Set the connect sub state of for this context.
- *
- * @param connectSubState The connect sub state to check.
- * @return <code>true</code> if the state has changed.
- */
- public boolean setConnectSubState(int connectSubState);
-
- /**
- * Check the current sub state.
- *
- * @param connectSubState The connect sub state to check.
- * @return <code>true</code> if the current connect sub state equals the given one.
- */
- public boolean isConnectSubState(int connectSubState);
-}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/.options b/target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/.options
deleted file mode 100644
index 763cd5580..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/.options
+++ /dev/null
@@ -1 +0,0 @@
-org.eclipse.tm.te.runtime.concurrent/debugmode = 0
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/META-INF/MANIFEST.MF
deleted file mode 100644
index 46c4f0bc2..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.concurrent/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,20 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.tm.te.runtime.concurrent;singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Bundle-Activator: org.eclipse.tm.te.runtime.concurrent.activator.CoreBundleActivator
-Bundle-Vendor: %providerName
-Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
- org.eclipse.tm.te.runtime;bundle-version="1.0.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Bundle-ActivationPolicy: lazy
-Bundle-Localization: plugin
-Export-Package: org.eclipse.tm.te.runtime.concurrent,
- org.eclipse.tm.te.runtime.concurrent.activator;x-internal:=true,
- org.eclipse.tm.te.runtime.concurrent.event,
- org.eclipse.tm.te.runtime.concurrent.executors,
- org.eclipse.tm.te.runtime.concurrent.factories,
- org.eclipse.tm.te.runtime.concurrent.interfaces,
- org.eclipse.tm.te.runtime.concurrent.nls;x-internal:=true,
- org.eclipse.tm.te.runtime.concurrent.util
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.model/.options b/target_explorer/plugins/org.eclipse.tm.te.runtime.model/.options
deleted file mode 100644
index 93f91f555..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.model/.options
+++ /dev/null
@@ -1 +0,0 @@
-org.eclipse.tm.te.runtime.model/debugmode = 0
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.model/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tm.te.runtime.model/META-INF/MANIFEST.MF
deleted file mode 100644
index 62eccd344..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.model/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.te.runtime.model;singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Bundle-Activator: org.eclipse.tm.te.runtime.model.activator.CoreBundleActivator
-Bundle-Vendor: %providerName
-Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
- org.eclipse.tm.te.runtime;bundle-version="1.0.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Bundle-ActivationPolicy: lazy
-Bundle-Localization: plugin
-Export-Package: org.eclipse.tm.te.runtime.model,
- org.eclipse.tm.te.runtime.model.activator;x-internal:=true,
- org.eclipse.tm.te.runtime.model.interfaces,
- org.eclipse.tm.te.runtime.model.nls;x-internal:=true
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.model/src/org/eclipse/tm/te/runtime/model/nls/Messages.properties b/target_explorer/plugins/org.eclipse.tm.te.runtime.model/src/org/eclipse/tm/te/runtime/model/nls/Messages.properties
deleted file mode 100644
index 78a70ddeb..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.model/src/org/eclipse/tm/te/runtime/model/nls/Messages.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-#
-# org.eclipse.tm.te.runtime.model
-# Externalized Strings.
-#
-
-PendingOperationModelNode_label=Pending...
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.persistence/.project b/target_explorer/plugins/org.eclipse.tm.te.runtime.persistence/.project
deleted file mode 100644
index c11c85f41..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.persistence/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.tm.te.runtime.persistence</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/target_explorer/plugins/org.eclipse.tm.te.runtime.persistence/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tm.te.runtime.persistence/META-INF/MANIFEST.MF
deleted file mode 100644
index c9958210c..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.persistence/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.te.runtime.persistence;singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Bundle-Activator: org.eclipse.tm.te.runtime.persistence.activator.CoreBundleActivator
-Bundle-Vendor: %providerName
-Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
- org.eclipse.tm.te.runtime;bundle-version="1.0.0",
- org.eclipse.tm.te.runtime.services;bundle-version="1.0.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Bundle-ActivationPolicy: lazy
-Bundle-Localization: plugin
-Export-Package: org.eclipse.tm.te.runtime.persistence,
- org.eclipse.tm.te.runtime.persistence.activator;x-internal:=true,
- org.eclipse.tm.te.runtime.persistence.interfaces,
- org.eclipse.tm.te.runtime.persistence.properties
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.persistence/plugin.xml b/target_explorer/plugins/org.eclipse.tm.te.runtime.persistence/plugin.xml
deleted file mode 100644
index 2e813d929..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.persistence/plugin.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
-
-<!-- Extension points -->
- <extension-point id="delegates" name="%ExtensionPoint.delegates.name" schema="schema/delegates.exsd"/>
-
-<!-- Persistence delegate contributions -->
- <extension point="org.eclipse.tm.te.runtime.persistence.delegates">
- <delegate
- class="org.eclipse.tm.te.runtime.persistence.properties.PropertiesFilePersistenceDelegate"
- id="org.eclipse.tm.te.runtime.persistence.properties"
- label="%PropertiesFilePersistenceDelegate.label">
- </delegate>
- </extension>
-
-<!-- Service contributions -->
- <extension point="org.eclipse.tm.te.runtime.services.services">
- <genericServices>
- <service class="org.eclipse.tm.te.runtime.persistence.services.PersistenceService">
- <serviceType class="org.eclipse.tm.te.runtime.persistence.interfaces.IPersistenceService"/>
- </service>
- </genericServices>
- </extension>
-
-</plugin>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.services/.options b/target_explorer/plugins/org.eclipse.tm.te.runtime.services/.options
deleted file mode 100644
index 63d1d057b..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.services/.options
+++ /dev/null
@@ -1 +0,0 @@
-org.eclipse.tm.te.runtime.services/debugmode = 0
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.services/.project b/target_explorer/plugins/org.eclipse.tm.te.runtime.services/.project
deleted file mode 100644
index 700aac3d4..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.services/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.tm.te.runtime.services</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/target_explorer/plugins/org.eclipse.tm.te.runtime.services/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tm.te.runtime.services/META-INF/MANIFEST.MF
deleted file mode 100644
index 0fd2b9589..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.services/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.te.runtime.services;singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Bundle-Activator: org.eclipse.tm.te.runtime.services.activator.CoreBundleActivator
-Bundle-Vendor: %providerName
-Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
- org.eclipse.tm.te.runtime;bundle-version="1.0.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Bundle-ActivationPolicy: lazy
-Bundle-Localization: plugin
-Export-Package: org.eclipse.tm.te.runtime.services,
- org.eclipse.tm.te.runtime.services.activator;x-internal:=true,
- org.eclipse.tm.te.runtime.services.interfaces,
- org.eclipse.tm.te.runtime.services.interfaces.constants,
- org.eclipse.tm.te.runtime.services.nls;x-internal:=true
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.services/plugin.xml b/target_explorer/plugins/org.eclipse.tm.te.runtime.services/plugin.xml
deleted file mode 100644
index 4d69027fc..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.services/plugin.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
-
-<!-- Extension points -->
- <extension-point id="services" name="Service Contributions" schema="schema/services.exsd"/>
-
-</plugin>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.services/pom.xml b/target_explorer/plugins/org.eclipse.tm.te.runtime.services/pom.xml
deleted file mode 100644
index f1a096fc8..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.services/pom.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
- xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.eclipse.tcf</groupId>
- <artifactId>tcf-parent</artifactId>
- <version>0.5.0-SNAPSHOT</version>
- <relativePath>../../../pom.xml</relativePath>
- </parent>
-
- <version>1.0.0.qualifier</version>
- <artifactId>org.eclipse.tm.te.runtime.services</artifactId>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.services/src/org/eclipse/tm/te/runtime/services/AbstractServiceManager.java b/target_explorer/plugins/org.eclipse.tm.te.runtime.services/src/org/eclipse/tm/te/runtime/services/AbstractServiceManager.java
deleted file mode 100644
index 0215778c5..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.services/src/org/eclipse/tm/te/runtime/services/AbstractServiceManager.java
+++ /dev/null
@@ -1,282 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.te.runtime.services;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.tm.te.runtime.activator.CoreBundleActivator;
-import org.eclipse.tm.te.runtime.services.interfaces.IService;
-
-/**
- * Abstract service manager implementation.
- */
-public abstract class AbstractServiceManager<V extends IService> {
-
- // map for all services per id
- private Map<String, List<ServiceProxy>> services = new HashMap<String, List<ServiceProxy>>();
-
- /**
- * Proxy to provide lazy loading of contributing plug-ins.
- */
- protected class ServiceProxy {
-
- private IConfigurationElement configElement = null;
- public String clazz;
- private V service = null;
- private List<Class<? extends V>> serviceTypes = new ArrayList<Class<? extends V>>();
-
- /**
- * Constructor.
- */
- protected ServiceProxy(IConfigurationElement configElement) {
- Assert.isNotNull(configElement);
- this.configElement = configElement;
-
- // Read the class attribute. If null, check for the class sub element
- clazz = configElement.getAttribute("class"); //$NON-NLS-1$
- if (clazz == null) {
- IConfigurationElement[] children = configElement.getChildren("class"); //$NON-NLS-1$
- // Single element definition assumed (see extension point schema)
- if (children.length > 0) {
- clazz = children[0].getAttribute("class"); //$NON-NLS-1$
- }
- }
- }
-
- /**
- * Add a type to the proxy. Types are used unless the proxy is instantiated to provide lazy
- * loading of services. After instantiated, a service will be identified only by its type
- * and implementing or extending interfaces or super-types.
- *
- * @param serviceType The type to add.
- */
- public void addType(Class<? extends V> serviceType) {
- Assert.isNotNull(serviceType);
- if (service == null && serviceTypes != null && !serviceTypes.contains(serviceType)) {
- serviceTypes.add(serviceType);
- }
- }
-
- /**
- * Return the real service instance for this proxy.
- */
- @SuppressWarnings("unchecked")
- protected V getService(boolean unique) {
- if ((service == null || unique) && configElement != null) {
- try {
- // Create the service class instance via the configuration element
- Object service = configElement.createExecutableExtension("class"); //$NON-NLS-1$
- if (service instanceof IService) {
- if (unique) {
- return (V) service;
- }
- else if (service instanceof IService) {
- this.service = (V)service;
- }
- else {
- IStatus status = new Status(IStatus.ERROR, CoreBundleActivator.getUniqueIdentifier(), "Service '" + service.getClass().getName() + "' not of type IService."); //$NON-NLS-1$ //$NON-NLS-2$
- Platform.getLog(CoreBundleActivator.getContext().getBundle())
- .log(status);
- }
- }
- }
- catch (CoreException e) {
- IStatus status = new Status(IStatus.ERROR, CoreBundleActivator.getUniqueIdentifier(), "Cannot create service '" + clazz + "'.", e); //$NON-NLS-1$ //$NON-NLS-2$
- Platform.getLog(CoreBundleActivator.getContext().getBundle()).log(status);
- }
- if (serviceTypes != null) {
- serviceTypes.clear();
- }
- serviceTypes = null;
- }
- return service;
- }
-
- /**
- * Check whether this proxy holds a service that is suitable for the given type.
- *
- * @param serviceType The service type
- * @return
- */
- protected boolean isMatching(Class<? extends V> serviceType) {
- if (service != null) {
- return serviceType.isInstance(service);
- }
- else if (configElement != null) {
- if (serviceType.getClass().getName().equals(clazz)) {
- return true;
- }
- for (Class<? extends V> type : serviceTypes) {
- if (type.equals(serviceType)) {
- return true;
- }
- }
- }
- return false;
- }
-
- public boolean equals(V service) {
- return clazz.equals(service.getClass());
- }
-
- public boolean equals(ServiceProxy proxy) {
- return clazz.equals(proxy.clazz);
- }
- }
-
- /**
- * Constructor.
- */
- protected AbstractServiceManager() {
- loadServices();
- }
-
- /**
- * @param element
- * @return
- */
- protected ServiceProxy getServiceProxy(IConfigurationElement element) {
- return new ServiceProxy(element);
- }
-
- /**
- * Returns all id's of the registered services.
- *
- * @return The list of id's of the registered services.
- */
- public String[] getIds() {
- return services.keySet().toArray(new String[services.keySet().size()]);
- }
-
- /**
- * Get a service for the id that implements at least the needed service type. If an interface
- * type is given, the service with the highest implementation is returned. This may result in a
- * random selection depending on the extension registration order, especially when a service
- * interface is implemented two times in different hierarchy paths. If a class type is given, if
- * available, the service of exactly that class is returned. Otherwise the highest
- * implementation is returned.
- *
- * @param id The id for which a service is needed.
- * @param serviceType The service type the service should at least implement or extend.
- * @return The service or <code>null</code>.
- */
- public V getService(String id, Class<? extends V> serviceType) {
- return getService(id, serviceType, false);
- }
-
- /**
- * Get a service for the id that implements at least the needed service type. If an interface
- * type is given, the service with the highest implementation is returned. This may result in a
- * random selection depending on the extension registration order, especially when a service
- * interface is implemented two times in different hierarchy paths. If a class type is given, if
- * available, the service of exactly that class is returned. Otherwise the highest
- * implementation is returned.
- *
- * @param id The id for which a service is needed.
- * @param serviceType The service type the service should at least implement or extend.
- * @param unique <code>true</code> if a new instance of the service is needed.
- *
- * @return The service or <code>null</code>.
- */
- public V getService(String id, Class<? extends V> serviceType, boolean unique) {
- Assert.isNotNull(serviceType);
- if (id == null) {
- id = ""; //$NON-NLS-1$
- }
- List<ServiceProxy> proxies = services.get(id);
- if (proxies != null && !proxies.isEmpty()) {
- List<ServiceProxy> candidates = new ArrayList<ServiceProxy>();
- boolean isInterface = serviceType.isInterface();
- for (ServiceProxy proxy : proxies) {
- if (proxy.isMatching(serviceType)) {
- if (!isInterface && proxy.equals(serviceType)) {
- V service = proxy.getService(unique);
- service.setId(id);
- return service;
- }
- candidates.add(proxy);
- }
- }
- V service = null;
- if (!candidates.isEmpty()) {
- service = candidates.get(0).getService(unique);
- service.setId(id);
- }
-
- return service;
- }
- return null;
- }
-
- /**
- * Get a service list for the id that implements at least the needed service type.
- *
- * @param id The id for which a service is needed.
- * @param serviceType The service type the service should at least implement or extend.
- * @param unique <code>true</code> if a new instance of the service is needed.
- * @return The service list or empty list.
- */
- public IService[] getServices(String id, Class<? extends V> serviceType, boolean unique) {
- Assert.isNotNull(serviceType);
- if (id == null) {
- id = ""; //$NON-NLS-1$
- }
- List<ServiceProxy> proxies = services.get(id);
- List<IService> services = new ArrayList<IService>();
- if (proxies != null && !proxies.isEmpty()) {
- List<ServiceProxy> candidates = new ArrayList<ServiceProxy>();
- for (ServiceProxy proxy : proxies) {
- if (proxy.isMatching(serviceType)) {
- candidates.add(proxy);
- }
- }
- for (ServiceProxy serviceProxy : candidates) {
- IService service = serviceProxy.getService(unique);
- service.setId(id);
- services.add(service);
- }
- }
- return services.toArray(new IService[services.size()]);
- }
-
- /*
- * Add a service proxy to the list of available services.
- */
- protected boolean addService(String id, ServiceProxy proxy) {
- Assert.isNotNull(services);
- Assert.isNotNull(id);
- Assert.isNotNull(proxy);
-
- List<ServiceProxy> proxies = services.get(id);
- if (proxies == null) {
- proxies = new ArrayList<ServiceProxy>();
- services.put(id, proxies);
- }
- Assert.isNotNull(proxies);
- if (proxies.isEmpty() || !proxies.contains(proxy)) {
- return proxies.add(proxy);
- }
- return false;
- }
-
- /**
- * Loads the contributed services into proxies (lazy loading!!) and adds them to this manager;
- */
- protected abstract void loadServices();
-}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.statushandler/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tm.te.runtime.statushandler/META-INF/MANIFEST.MF
deleted file mode 100644
index ae2eaa9cb..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.statushandler/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.te.runtime.statushandler;singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Bundle-Activator: org.eclipse.tm.te.runtime.statushandler.activator.CoreBundleActivator
-Bundle-Vendor: %providerName
-Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
- org.eclipse.core.expressions;bundle-version="3.4.300",
- org.eclipse.tm.te.runtime;bundle-version="1.0.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Bundle-ActivationPolicy: lazy
-Bundle-Localization: plugin
-Export-Package: org.eclipse.tm.te.runtime.statushandler,
- org.eclipse.tm.te.runtime.statushandler.activator;x-internal:=true,
- org.eclipse.tm.te.runtime.statushandler.interfaces,
- org.eclipse.tm.te.runtime.statushandler.internal;x-internal:=true,
- org.eclipse.tm.te.runtime.statushandler.nls
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.statushandler/src/org/eclipse/tm/te/runtime/statushandler/nls/Messages.properties b/target_explorer/plugins/org.eclipse.tm.te.runtime.statushandler/src/org/eclipse/tm/te/runtime/statushandler/nls/Messages.properties
deleted file mode 100644
index 14785571f..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.statushandler/src/org/eclipse/tm/te/runtime/statushandler/nls/Messages.properties
+++ /dev/null
@@ -1,4 +0,0 @@
-#
-# org.eclipse.tm.te.runtime.statushandler
-# Externalized Strings.
-#
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/.options b/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/.options
deleted file mode 100644
index 65b16c62a..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/.options
+++ /dev/null
@@ -1,3 +0,0 @@
-org.eclipse.tm.te.runtime.stepper/debugmode = 0
-org.eclipse.tm.te.runtime.stepper/trace/stepping = false
-org.eclipse.tm.te.runtime.stepper/profile/stepping= false
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/.project b/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/.project
deleted file mode 100644
index 178e78f55..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.tm.te.runtime.stepper</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/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/META-INF/MANIFEST.MF
deleted file mode 100644
index 73e52ac11..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,20 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.tm.te.runtime.stepper;singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Bundle-Activator: org.eclipse.tm.te.runtime.stepper.activator.CoreBundleActivator
-Bundle-Vendor: %providerName
-Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
- org.eclipse.tm.te.runtime;bundle-version="1.0.0",
- org.eclipse.tm.te.runtime.concurrent;bundle-version="1.0.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Bundle-ActivationPolicy: lazy
-Bundle-Localization: plugin
-Export-Package: org.eclipse.tm.te.runtime.stepper,
- org.eclipse.tm.te.runtime.stepper.activator;x-internal:=true,
- org.eclipse.tm.te.runtime.stepper.extensions,
- org.eclipse.tm.te.runtime.stepper.interfaces,
- org.eclipse.tm.te.runtime.stepper.interfaces.tracing,
- org.eclipse.tm.te.runtime.stepper.internal.extensions;x-internal:=true,
- org.eclipse.tm.te.runtime.stepper.nls;x-internal:=true
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/plugin.xml b/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/plugin.xml
deleted file mode 100644
index b84db06ce..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/plugin.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
-
- <extension-point id="steppers" name="Steppers" schema="schema/steppers.exsd"/>
- <extension-point id="steps" name="Steps" schema="schema/steps.exsd"/>
- <extension-point id="stepGroups" name="Step Groups" schema="schema/stepGroups.exsd"/>
-
-</plugin>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/pom.xml b/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/pom.xml
deleted file mode 100644
index 9d0144165..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime.stepper/pom.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
- xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.eclipse.tcf</groupId>
- <artifactId>tcf-parent</artifactId>
- <version>0.5.0-SNAPSHOT</version>
- <relativePath>../../../pom.xml</relativePath>
- </parent>
-
- <version>1.0.0.qualifier</version>
- <artifactId>org.eclipse.tm.te.runtime.stepper</artifactId>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime/.options b/target_explorer/plugins/org.eclipse.tm.te.runtime/.options
deleted file mode 100644
index 5c97ca861..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime/.options
+++ /dev/null
@@ -1,3 +0,0 @@
-org.eclipse.tm.te.runtime/debugmode = 0
-org.eclipse.tm.te.runtime/trace/events = false
-org.eclipse.tm.te.runtime/trace/callbacks = false \ No newline at end of file
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tm.te.runtime/META-INF/MANIFEST.MF
deleted file mode 100644
index c777d7cef..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,29 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.tm.te.runtime;singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Bundle-Activator: org.eclipse.tm.te.runtime.activator.CoreBundleActivator
-Bundle-Vendor: %providerName
-Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
- org.eclipse.core.expressions;bundle-version="3.4.300"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Bundle-ActivationPolicy: lazy
-Bundle-Localization: plugin
-Export-Package: org.eclipse.tm.te.runtime.activator,
- org.eclipse.tm.te.runtime.callback,
- org.eclipse.tm.te.runtime.events,
- org.eclipse.tm.te.runtime.extensions,
- org.eclipse.tm.te.runtime.interfaces,
- org.eclipse.tm.te.runtime.interfaces.callback,
- org.eclipse.tm.te.runtime.interfaces.events,
- org.eclipse.tm.te.runtime.interfaces.extensions,
- org.eclipse.tm.te.runtime.interfaces.properties,
- org.eclipse.tm.te.runtime.interfaces.tracing,
- org.eclipse.tm.te.runtime.interfaces.workingsets,
- org.eclipse.tm.te.runtime.internal;x-internal:=true,
- org.eclipse.tm.te.runtime.nls,
- org.eclipse.tm.te.runtime.preferences,
- org.eclipse.tm.te.runtime.properties,
- org.eclipse.tm.te.runtime.tracing,
- org.eclipse.tm.te.runtime.utils
diff --git a/target_explorer/plugins/org.eclipse.tm.te.runtime/plugin.xml b/target_explorer/plugins/org.eclipse.tm.te.runtime/plugin.xml
deleted file mode 100644
index 4608bc294..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.runtime/plugin.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
-
-<!-- Extension points -->
- <extension-point id="eventListeners" name="Event Listener Contributions" schema="schema/eventListeners.exsd"/>
-
-<!-- Eclipse core expressions property tester -->
- <extension point="org.eclipse.core.expressions.propertyTesters">
- <propertyTester
- class="org.eclipse.tm.te.runtime.internal.PreferencesPropertyTester"
- id="org.eclipse.tm.te.runtime.PreferencesPropertyTester"
- namespace="org.eclipse.tm.te.runtime"
- properties="preference"
- type="java.lang.Object">
- </propertyTester>
-
- <propertyTester
- class="org.eclipse.tm.te.runtime.internal.PropertiesContainerPropertyTester"
- id="org.eclipse.tm.te.runtime.PropertiesContainerPropertyTester"
- namespace="org.eclipse.tm.te.runtime"
- properties="isProperty"
- type="org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer">
- </propertyTester>
- </extension>
-
-<!-- Event listener contributions -->
- <extension point="org.eclipse.tm.te.runtime.eventListeners">
- <eventListener class="org.eclipse.tm.te.runtime.internal.DebugEventListener"/>
- </extension>
-
-</plugin>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.core/.options b/target_explorer/plugins/org.eclipse.tm.te.tcf.core/.options
deleted file mode 100644
index 70df03d93..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.core/.options
+++ /dev/null
@@ -1 +0,0 @@
-org.eclipse.tm.te.tcf.core/debug/channels = false
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.core/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tm.te.tcf.core/META-INF/MANIFEST.MF
deleted file mode 100644
index 5336c5f63..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.core/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,23 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.tm.te.tcf.core;singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Bundle-Activator: org.eclipse.tm.te.tcf.core.activator.CoreBundleActivator
-Bundle-Vendor: %providerName
-Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
- org.eclipse.tm.tcf.core;bundle-version="0.5.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Bundle-ActivationPolicy: lazy
-Bundle-Localization: plugin
-Export-Package: org.eclipse.tm.te.tcf.core,
- org.eclipse.tm.te.tcf.core.activator;x-internal:=true,
- org.eclipse.tm.te.tcf.core.interfaces,
- org.eclipse.tm.te.tcf.core.interfaces.listeners,
- org.eclipse.tm.te.tcf.core.internal;x-internal:=true,
- org.eclipse.tm.te.tcf.core.internal.interfaces;x-internal:=true,
- org.eclipse.tm.te.tcf.core.internal.listener;x-internal:=true,
- org.eclipse.tm.te.tcf.core.internal.nls;x-internal:=true,
- org.eclipse.tm.te.tcf.core.internal.utils;x-internal:=true,
- org.eclipse.tm.te.tcf.core.streams,
- org.eclipse.tm.te.tcf.core.utils
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.core/src/org/eclipse/tm/te/tcf/core/activator/CoreBundleActivator.java b/target_explorer/plugins/org.eclipse.tm.te.tcf.core/src/org/eclipse/tm/te/tcf/core/activator/CoreBundleActivator.java
deleted file mode 100644
index eb00a7ff3..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.core/src/org/eclipse/tm/te/tcf/core/activator/CoreBundleActivator.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.te.tcf.core.activator;
-
-import org.eclipse.tm.te.tcf.core.internal.Startup;
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class CoreBundleActivator implements BundleActivator {
- // The bundle context
- private static BundleContext context;
-
- /**
- * Returns the bundle context
- *
- * @return the bundle context
- */
- public static BundleContext getContext() {
- return context;
- }
-
- /**
- * Convenience method which returns the unique identifier of this plugin.
- */
- public static String getUniqueIdentifier() {
- if (getContext() != null && getContext().getBundle() != null) {
- return getContext().getBundle().getSymbolicName();
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
- */
- @Override
- public void start(BundleContext bundleContext) throws Exception {
- CoreBundleActivator.context = bundleContext;
- }
-
- /* (non-Javadoc)
- * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
- */
- @Override
- public void stop(BundleContext bundleContext) throws Exception {
- CoreBundleActivator.context = null;
-
- // Mark the core framework as not started anymore
- Startup.setStarted(false);
- }
-
-}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.core/src/org/eclipse/tm/te/tcf/core/interfaces/IChannelManager.java b/target_explorer/plugins/org.eclipse.tm.te.tcf.core/src/org/eclipse/tm/te/tcf/core/interfaces/IChannelManager.java
deleted file mode 100644
index 835e98cf9..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.core/src/org/eclipse/tm/te/tcf/core/interfaces/IChannelManager.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.te.tcf.core.interfaces;
-
-import java.util.Map;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IPeer;
-
-/**
- * TCF channel manager public API declaration.
- */
-public interface IChannelManager extends IAdaptable {
-
- /**
- * Client call back interface for openChannel(...).
- */
- interface DoneOpenChannel {
- /**
- * Called when the channel fully opened or failed to open.
- *
- * @param error The error description if operation failed, <code>null</code> if succeeded.
- * @param channel The channel object or <code>null</code>.
- */
- void doneOpenChannel(Throwable error, IChannel channel);
- }
-
- /**
- * Opens a new channel to communicate with the given peer.
- * <p>
- * The method can be called from any thread context.
- *
- * @param peer The peer. Must not be <code>null</code>.
- * @param done The client callback. Must not be <code>null</code>.
- */
- public void openChannel(IPeer peer, DoneOpenChannel done);
-
- /**
- * Opens a new channel to communicate with the peer described by the
- * given peer attributes.
- * <p>
- * The method can be called from any thread context.
- *
- * @param peerAttributes The peer attributes. Must not be <code>null</code>.
- * @param done The client callback. Must not be <code>null</code>.
- */
- public void openChannel(Map<String, String> peerAttributes, DoneOpenChannel done);
-}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.core/src/org/eclipse/tm/te/tcf/core/internal/ChannelManager.java b/target_explorer/plugins/org.eclipse.tm.te.tcf.core/src/org/eclipse/tm/te/tcf/core/internal/ChannelManager.java
deleted file mode 100644
index 80fb53861..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.core/src/org/eclipse/tm/te/tcf/core/internal/ChannelManager.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.te.tcf.core.internal;
-
-import java.util.Map;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.PlatformObject;
-import org.eclipse.tm.tcf.core.AbstractPeer;
-import org.eclipse.tm.tcf.core.TransientPeer;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IPeer;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.te.tcf.core.interfaces.IChannelManager;
-
-
-/**
- * TCF channel manager implementation.
- */
-public final class ChannelManager extends PlatformObject implements IChannelManager {
-
- /**
- * Constructor.
- */
- public ChannelManager() {
- super();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.core.interfaces.IChannelManager#openChannel(org.eclipse.tm.tcf.protocol.IPeer, org.eclipse.tm.te.tcf.core.interfaces.IChannelManager.DoneOpenChannel)
- */
- @Override
- public void openChannel(final IPeer peer, final DoneOpenChannel done) {
- if (Protocol.isDispatchThread()) {
- internalOpenChannel(peer, done);
- } else {
- Protocol.invokeLater(new Runnable() {
- @Override
- public void run() {
- internalOpenChannel(peer, done);
- }
- });
- }
- }
-
- /**
- * Internal implementation of {@link #openChannel(IPeer, org.eclipse.tm.te.tcf.core.interfaces.IChannelManager.DoneOpenChannel)}.
- * <p>
- * Method must be called within the TCF dispatch thread.
- *
- * @param peer The peer. Must not be <code>null</code>.
- * @param done The client callback. Must not be <code>null</code>.
- */
- /* default */ void internalOpenChannel(final IPeer peer, final DoneOpenChannel done) {
- Assert.isNotNull(peer);
- Assert.isNotNull(done);
- Assert.isTrue(Protocol.isDispatchThread());
-
- // Open the channel
- final IChannel channel = peer.openChannel();
- // Register the channel listener
- if (channel != null) {
- channel.addChannelListener(new IChannel.IChannelListener() {
-
- @Override
- public void onChannelOpened() {
- // Remove ourself as listener from the channel
- channel.removeChannelListener(this);
- // Channel opening succeeded
- done.doneOpenChannel(null, channel);
- }
-
- @Override
- public void onChannelClosed(Throwable error) {
- // Remove ourself as listener from the channel
- channel.removeChannelListener(this);
- // Channel opening failed
- done.doneOpenChannel(error, channel);
- }
-
- @Override
- public void congestionLevel(int level) {
- // ignored
- }
- });
- } else {
- // Channel is null? Something went terrible wrong.
- done.doneOpenChannel(new Exception("Unexpected null return value from IPeer#openChannel()!"), null); //$NON-NLS-1$
- }
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.core.interfaces.IChannelManager#openChannel(java.util.Map, org.eclipse.tm.te.tcf.core.interfaces.IChannelManager.DoneOpenChannel)
- */
- @Override
- public void openChannel(final Map<String, String> peerAttributes, final DoneOpenChannel done) {
- if (Protocol.isDispatchThread()) {
- internalOpenChannel(peerAttributes, done);
- } else {
- Protocol.invokeLater(new Runnable() {
- @Override
- public void run() {
- internalOpenChannel(peerAttributes, done);
- }
- });
- }
- }
-
- /**
- * Internal implementation of {@link #openChannel(Map, org.eclipse.tm.te.tcf.core.interfaces.IChannelManager.DoneOpenChannel)}.
- * <p>
- * Method must be called within the TCF dispatch thread.
- *
- * @param peerAttributes The peer attributes. Must not be <code>null</code>.
- * @param done The client callback. Must not be <code>null</code>.
- */
- /* default */ void internalOpenChannel(final Map<String, String> peerAttributes, final DoneOpenChannel done) {
- Assert.isNotNull(peerAttributes);
- Assert.isNotNull(done);
- Assert.isTrue(Protocol.isDispatchThread());
- internalOpenChannel(getOrCreatePeerInstance(peerAttributes), done);
- }
-
- /**
- * Tries to find an existing peer instance or create an new {@link IPeer}
- * instance if not found.
- * <p>
- * <b>Note:</b> This method must be invoked at the TCF dispatch thread.
- *
- * @param peerAttributes The peer attributes. Must not be <code>null</code>.
- * @return The peer instance.
- */
- private IPeer getOrCreatePeerInstance(final Map<String, String> peerAttributes) {
- Assert.isNotNull(peerAttributes);
- Assert.isTrue(Protocol.isDispatchThread());
-
- // Get the peer id from the properties
- String peerId = peerAttributes.get(IPeer.ATTR_ID);
- Assert.isNotNull(peerId);
-
- // Check if we shall open the peer transient
- boolean isTransient = peerAttributes.containsKey("transient") ? Boolean.parseBoolean(peerAttributes.remove("transient")) : false; //$NON-NLS-1$ //$NON-NLS-2$
-
- // Look the peer via the Locator Service.
- IPeer peer = Protocol.getLocator().getPeers().get(peerId);
- // If not peer could be found, create a new one
- if (peer == null) {
- peer = isTransient ? new TransientPeer(peerAttributes) : new AbstractPeer(peerAttributes);
- }
-
- // Return the peer instance
- return peer;
- }
-}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.core/src/org/eclipse/tm/te/tcf/core/internal/nls/Messages.properties b/target_explorer/plugins/org.eclipse.tm.te.tcf.core/src/org/eclipse/tm/te/tcf/core/internal/nls/Messages.properties
deleted file mode 100644
index 5c3039f1a..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.core/src/org/eclipse/tm/te/tcf/core/internal/nls/Messages.properties
+++ /dev/null
@@ -1,9 +0,0 @@
-#
-# org.eclipse.tm.te.tcf.core
-# Externalized Strings.
-#
-
-InternalChannelOpenListener_onChannelOpen_message=Channel opened.
-
-InternalChannelListener_onChannelClosed_message=Channel closed. {0}
-InternalChannelListener_onChannelClosed_cause=; Possibly caused by: {0}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/META-INF/MANIFEST.MF
deleted file mode 100644
index 2fa079782..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,43 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.tm.te.tcf.filesystem;singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Bundle-Activator: org.eclipse.tm.te.tcf.filesystem.activator.UIPlugin
-Bundle-Vendor: %providerName
-Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
- org.eclipse.ui;bundle-version="3.7.0",
- org.eclipse.ui.forms;bundle-version="3.5.100",
- org.eclipse.ui.navigator;bundle-version="3.5.100",
- org.eclipse.tm.tcf.core;bundle-version="0.5.0",
- org.eclipse.tm.te.runtime;bundle-version="1.0.0",
- org.eclipse.tm.te.tcf.core;bundle-version="1.0.0",
- org.eclipse.tm.te.ui;bundle-version="1.0.0",
- org.eclipse.tm.te.ui.forms;bundle-version="1.0.0",
- org.eclipse.tm.te.ui.swt;bundle-version="1.0.0",
- org.eclipse.tm.te.ui.views;bundle-version="1.0.0",
- org.eclipse.tm.te.tcf.locator;bundle-version="1.0.0",
- org.eclipse.core.filesystem;bundle-version="1.3.100",
- org.eclipse.ui.ide;bundle-version="3.7.0",
- org.eclipse.compare;bundle-version="3.5.200",
- org.eclipse.text;bundle-version="3.5.100",
- org.eclipse.ui.workbench.texteditor;bundle-version="3.7.0",
- org.eclipse.core.expressions;bundle-version="3.4.300"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Bundle-ActivationPolicy: lazy
-Bundle-Localization: plugin
-Export-Package: org.eclipse.tm.te.tcf.filesystem.activator;x-internal:=true,
- org.eclipse.tm.te.tcf.filesystem.controls,
- org.eclipse.tm.te.tcf.filesystem.dialogs,
- org.eclipse.tm.te.tcf.filesystem.filters,
- org.eclipse.tm.te.tcf.filesystem.interfaces,
- org.eclipse.tm.te.tcf.filesystem.interfaces.preferences,
- org.eclipse.tm.te.tcf.filesystem.internal;x-internal:=true,
- org.eclipse.tm.te.tcf.filesystem.internal.explorer;x-internal:=true,
- org.eclipse.tm.te.tcf.filesystem.internal.handlers;x-internal:=true,
- org.eclipse.tm.te.tcf.filesystem.internal.help;x-internal:=true,
- org.eclipse.tm.te.tcf.filesystem.internal.nls;x-internal:=true,
- org.eclipse.tm.te.tcf.filesystem.internal.preferences;x-internal:=true,
- org.eclipse.tm.te.tcf.filesystem.internal.properties;x-internal:=true,
- org.eclipse.tm.te.tcf.filesystem.internal.url;x-internal:=true,
- org.eclipse.tm.te.tcf.filesystem.model
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/plugin.properties b/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/plugin.properties
deleted file mode 100644
index 4a95e9626..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/plugin.properties
+++ /dev/null
@@ -1,54 +0,0 @@
-##################################################################################
-# Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
-# This program and the accompanying materials are made available under the terms
-# of the Eclipse Public License v1.0 which accompanies this distribution, and is
-# available at http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Wind River Systems - initial API and implementation
-##################################################################################
-
-pluginName = Target Explorer, TCF File System Extensions
-providerName = Eclipse.org
-
-# ***** Editor Pages *****
-
-FSExplorerEditorPage.name=File System
-
-# ***** Preference Pages *****
-
-GeneralInformationPage.name=General
-
-# ***** Filter *****
-
-FSTreeViewerFilter.hiddenFiles=Hidden files and folders (File System (TCF))
-FSTreeViewerFilter.systemFiles=Protected operating system files (File System (TCF))
-
-# ***** Actions/Commands *****
-
-PropertiesAction.label=P&roperties
-PropertiesAction.tooltip=Show Properties of Selection
-
-navigatorContent.name = Target File System (TCF)
-fsmenu.open.label = Open
-fsmenu.refresh.label = Refresh
-fsmenu.update.label = Update
-fsmenu.commit.label = Commit
-fsmenu.merge.label = Merge
-fsmenu.revert.label = Revert
-temenu.open.label = Open
-temenu.refresh.label = Refresh
-temenu.update.label = Update
-temenu.commit.label = Commit
-temenu.merge.label = Merge
-temenu.revert.label = Revert
-command.refresh.name = Refresh File
-command.update.name = Update File
-command.commit.name = Commit File
-command.merge.name = Merge File
-command.revert.name = Revert File
-decorator.modified.label = Modified Cache
-decorator.outdated.label = Outdated Cache
-decorator.conflict.label = Conflicting Cache
-preference.page.name = Target Explorer
-menu.label.openwith = Open With \ No newline at end of file
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/plugin.xml b/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/plugin.xml
deleted file mode 100644
index 15b9442f2..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/plugin.xml
+++ /dev/null
@@ -1,827 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
-
-<!-- Preference contributions -->
- <extension point="org.eclipse.core.runtime.preferences">
- <initializer class="org.eclipse.tm.te.tcf.filesystem.internal.preferences.PreferencesInitializer"/>
- </extension>
-
-<!-- Common navigator contributions -->
- <extension point="org.eclipse.ui.navigator.viewer">
- <viewerContentBinding viewerId="org.eclipse.tm.te.ui.views.TargetExplorer">
- <includes>
- <contentExtension
- isRoot="false"
- pattern="org.eclipse.tm.te.tcf.filesystem.navigator.*"/>
- </includes>
- </viewerContentBinding>
- </extension>
-
- <extension point="org.eclipse.ui.navigator.navigatorContent">
- <navigatorContent
- activeByDefault="false"
- contentProvider="org.eclipse.tm.te.tcf.filesystem.controls.FSTreeContentProvider"
- icon="icons/obj16/rootdrive.gif"
- id="org.eclipse.tm.te.tcf.filesystem.navigator.content"
- labelProvider="org.eclipse.tm.te.tcf.filesystem.controls.FSTreeLabelProvider"
- name="%navigatorContent.name"
- priority="normal">
- <triggerPoints>
- <adapt
- type="org.eclipse.tm.te.tcf.locator.interfaces.nodes.IPeerModel">
- <test
- property="org.eclipse.tm.te.tcf.locator.hasRemoteService"
- value="FileSystem">
- </test>
- </adapt>
- </triggerPoints>
- <possibleChildren>
- <instanceof value="org.eclipse.tm.te.tcf.filesystem.model.FSTreeNode"/>
- </possibleChildren>
- <commonSorter
- class="org.eclipse.tm.te.tcf.filesystem.controls.FSTreeViewerSorter"
- id="org.eclipse.tm.te.tcf.filesystem.navigator.sorter">
- </commonSorter>
- </navigatorContent>
- <commonFilter
- activeByDefault="true"
- class="org.eclipse.tm.te.tcf.filesystem.filters.HiddenFilesViewerFilter"
- id="org.eclipse.tm.te.tcf.filesystem.navigator.filter.hiddenFiles"
- name="%FSTreeViewerFilter.hiddenFiles"
- visibleInUI="true">
- </commonFilter>
- <commonFilter
- activeByDefault="true"
- class="org.eclipse.tm.te.tcf.filesystem.filters.SystemFilesViewerFilter"
- id="org.eclipse.tm.te.tcf.filesystem.navigator.filter.systemFiles"
- name="%FSTreeViewerFilter.systemFiles"
- visibleInUI="true">
- </commonFilter>
- </extension>
-
-<!-- Target Explorer Details Editor page contributions -->
- <extension point="org.eclipse.tm.te.ui.views.editorPages">
- <editorPage
- class="org.eclipse.tm.te.tcf.filesystem.internal.explorer.FSExplorerEditorPage"
- name="%FSExplorerEditorPage.name"
- id="org.eclipse.tm.te.tcf.filesystem.FSExplorerEditorPage">
- </editorPage>
- </extension>
-
-<!-- Target Explorer Details Editor page binding contributions -->
- <extension point="org.eclipse.tm.te.ui.views.editorPageBindings">
- <editorPageBinding
- id="org.eclipse.tm.te.tcf.filesystem.binding.FSExplorerEditorPage"
- pageId="org.eclipse.tm.te.tcf.filesystem.FSExplorerEditorPage">
- <enablement>
- <with variable="activeEditorInput">
- <and>
- <adapt type="org.eclipse.tm.te.tcf.locator.interfaces.nodes.IPeerModel">
- <test property="org.eclipse.tm.te.tcf.locator.hasRemoteService" value="FileSystem"/>
- </adapt>
- <test
- property="org.eclipse.tm.te.runtime.preference"
- args="bundleId=org.eclipse.tm.te.tcf.filesystem,key=tcf.filesystem.core.feature.editor.content.enable"
- value="true">
- </test>
- </and>
- </with>
- </enablement>
- </editorPageBinding>
- </extension>
-
-<!-- Target Explorer context menu contributions -->
- <extension point="org.eclipse.ui.menus">
- <menuContribution locationURI="popup:org.eclipse.tm.te.ui.controls.menu.fs?after=additions">
- <separator name="group.open" visible="true"/>
- <command
- commandId="org.eclipse.ui.navigator.Open"
- helpContextId="org.eclipse.tm.te.tcf.filesystem.command_Open"
- id="open"
- label="%fsmenu.open.label"
- style="push">
- <visibleWhen checkEnabled="false">
- <with variable="selection">
- <count value="1"/>
- <iterate>
- <instanceof value="org.eclipse.tm.te.tcf.filesystem.model.FSTreeNode"/>
- <test property="org.eclipse.tm.te.tcf.filesystem.propertytester.treenode.isFile"/>
- <test
- property="org.eclipse.tm.te.tcf.filesystem.propertytester.treenode.isReadable">
- </test>
- <not>
- <test property="org.eclipse.tm.te.tcf.filesystem.propertytester.treenode.isBinaryFile"/>
- </not>
- </iterate>
- </with>
- </visibleWhen>
- </command>
- <menu
- label="%menu.label.openwith">
- <visibleWhen
- checkEnabled="false">
- <with
- variable="selection">
- <count
- value="1">
- </count>
- <iterate>
- <instanceof
- value="org.eclipse.tm.te.tcf.filesystem.model.FSTreeNode">
- </instanceof>
- <test
- property="org.eclipse.tm.te.tcf.filesystem.propertytester.treenode.isFile">
- </test>
- <test
- property="org.eclipse.tm.te.tcf.filesystem.propertytester.treenode.isReadable">
- </test>
- <not>
- <test
- property="org.eclipse.tm.te.tcf.filesystem.propertytester.treenode.isBinaryFile">
- </test>
- </not>
- </iterate>
- </with>
- </visibleWhen>
- <dynamic
- class="org.eclipse.tm.te.tcf.filesystem.internal.handlers.OpenWithContribution"
- id="openWithMenu">
- </dynamic>
- </menu>
- <separator
- name="group.state"
- visible="true">
- </separator>
- <command
- commandId="org.eclipse.ui.file.refresh"
- helpContextId="org.eclipse.tm.te.tcf.filesystem.command_Refresh"
- icon="platform:/plugin/org.eclipse.ui/icons/full/elcl16/refresh_nav.gif"
- id="refresh"
- label="%fsmenu.refresh.label"
- style="push">
- <visibleWhen
- checkEnabled="false">
- <and>
- <with
- variable="selection">
- <count
- value="1">
- </count>
- <iterate>
- <instanceof
- value="org.eclipse.tm.te.tcf.filesystem.model.FSTreeNode">
- </instanceof>
- <test
- property="org.eclipse.tm.te.tcf.filesystem.propertytester.treenode.isFile">
- </test>
- </iterate>
- </with>
- <not>
- <test
- property="org.eclipse.tm.te.tcf.filesystem.propertytester.cache.isAutoSavingOn">
- </test>
- </not>
- </and>
- </visibleWhen>
- </command>
- <command
- commandId="org.eclipse.tm.te.tcf.filesystem.commands.update"
- helpContextId="org.eclipse.tm.te.tcf.filesystem.command_Update"
- id="update"
- label="%fsmenu.update.label"
- style="push">
- <visibleWhen
- checkEnabled="false">
- <and>
- <with
- variable="selection">
- <count
- value="1">
- </count>
- <iterate>
- <instanceof
- value="org.eclipse.tm.te.tcf.filesystem.model.FSTreeNode">
- </instanceof>
- <test
- property="org.eclipse.tm.te.tcf.filesystem.propertytester.treenode.isFile">
- </test>
- </iterate>
- </with>
- <not>
- <test
- property="org.eclipse.tm.te.tcf.filesystem.propertytester.cache.isAutoSavingOn">
- </test>
- </not>
- </and>
- </visibleWhen>
- </command>
- <command
- commandId="org.eclipse.tm.te.tcf.filesystem.commands.commit"
- helpContextId="org.eclipse.tm.te.tcf.filesystem.command_Commit"
- id="commit"
- label="%fsmenu.commit.label"
- style="push">
- <visibleWhen
- checkEnabled="false">
- <and>
- <with
- variable="selection">
- <count
- value="1">
- </count>
- <iterate>
- <instanceof
- value="org.eclipse.tm.te.tcf.filesystem.model.FSTreeNode">
- </instanceof>
- <test
- property="org.eclipse.tm.te.tcf.filesystem.propertytester.treenode.isFile">
- </test>
- </iterate>
- </with>
- <not>
- <test
- property="org.eclipse.tm.te.tcf.filesystem.propertytester.cache.isAutoSavingOn">
- </test>
- </not>
- </and>
- </visibleWhen>
- </command>
- <command
- commandId="org.eclipse.tm.te.tcf.filesystem.commands.merge"
- helpContextId="org.eclipse.tm.te.tcf.filesystem.command_Merge"
- id="merge"
- label="%fsmenu.merge.label"
- style="push">
- <visibleWhen
- checkEnabled="false">
- <and>
- <with
- variable="selection">
- <count
- value="1">
- </count>
- <iterate>
- <instanceof
- value="org.eclipse.tm.te.tcf.filesystem.model.FSTreeNode">
- </instanceof>
- <test
- property="org.eclipse.tm.te.tcf.filesystem.propertytester.treenode.isFile">
- </test>
- </iterate>
- </with>
- <not>
- <test
- property="org.eclipse.tm.te.tcf.filesystem.propertytester.cache.isAutoSavingOn">
- </test>
- </not>
- </and>
- </visibleWhen>
- </command>
- <command
- commandId="org.eclipse.tm.te.tcf.filesystem.commands.revert"
- helpContextId="org.eclipse.tm.te.tcf.filesystem.command_Revert"
- id="revert"
- label="%fsmenu.revert.label"
- style="push">
- <visibleWhen
- checkEnabled="false">
- <and>
- <with
- variable="selection">
- <count
- value="1">
- </count>
- <iterate>
- <instanceof
- value="org.eclipse.tm.te.tcf.filesystem.model.FSTreeNode">
- </instanceof>
- <test
- property="org.eclipse.tm.te.tcf.filesystem.propertytester.treenode.isFile">
- </test>
- </iterate>
- </with>
- <not>
- <test
- property="org.eclipse.tm.te.tcf.filesystem.propertytester.cache.isAutoSavingOn">
- </test>
- </not>
- </and>
- </visibleWhen>
- </command>
- <separator name="group.properties" visible="true"/>
- <command
- commandId="org.eclipse.ui.file.properties"
- helpContextId="org.eclipse.tm.te.tcf.filesystem.command_Properties"
- id="properties"
- label="%PropertiesAction.label"
- tooltip="%PropertiesAction.tooltip">
- <visibleWhen>
- <with variable="selection">
- <count value="1"/>
- <iterate operator="and" ifEmpty="false">
- <instanceof
- value="org.eclipse.tm.te.tcf.filesystem.model.FSTreeNode">
- </instanceof>
- </iterate>
- </with>
- </visibleWhen>
- </command>
- </menuContribution>
- <menuContribution locationURI="popup:org.eclipse.tm.te.ui.views.TargetExplorer#Popup?after=group.properties">
- <command
- commandId="org.eclipse.ui.file.properties"
- helpContextId="org.eclipse.tm.te.tcf.filesystem.command_Properties"
- id="properties"
- label="%PropertiesAction.label"
- tooltip="%PropertiesAction.tooltip">
- <visibleWhen>
- <with variable="selection">
- <count value="1"/>
- <iterate operator="and" ifEmpty="false">
- <instanceof
- value="org.eclipse.tm.te.tcf.filesystem.model.FSTreeNode">
- </instanceof>
- </iterate>
- </with>
- </visibleWhen>
- </command>
- </menuContribution>
- <menuContribution locationURI="popup:org.eclipse.tm.te.ui.views.TargetExplorer#Popup?after=group.open">
- <command
- commandId="org.eclipse.ui.navigator.Open"
- helpContextId="org.eclipse.tm.te.tcf.filesystem.command_Open"
- id="open"
- label="%temenu.open.label"
- style="push">
- <visibleWhen checkEnabled="false">
- <with variable="selection">
- <count value="1"/>
- <iterate>
- <instanceof value="org.eclipse.tm.te.tcf.filesystem.model.FSTreeNode"/>
- <test property="org.eclipse.tm.te.tcf.filesystem.propertytester.treenode.isFile"/>
- <test
- property="org.eclipse.tm.te.tcf.filesystem.propertytester.treenode.isReadable">
- </test>
- <not>
- <test property="org.eclipse.tm.te.tcf.filesystem.propertytester.treenode.isBinaryFile"/>
- </not>
- </iterate>
- </with>
- </visibleWhen>
- </command>
- <menu
- label="%menu.label.openwith">
- <visibleWhen
- checkEnabled="false">
- <with
- variable="selection">
- <count
- value="1">
- </count>
- <iterate>
- <instanceof
- value="org.eclipse.tm.te.tcf.filesystem.model.FSTreeNode">
- </instanceof>
- <test
- property="org.eclipse.tm.te.tcf.filesystem.propertytester.treenode.isFile">
- </test>
- <test
- property="org.eclipse.tm.te.tcf.filesystem.propertytester.treenode.isReadable">
- </test>
- <not>
- <test
- property="org.eclipse.tm.te.tcf.filesystem.propertytester.treenode.isBinaryFile">
- </test>
- </not>
- </iterate>
- </with>
- </visibleWhen>
- <dynamic
- class="org.eclipse.tm.te.tcf.filesystem.internal.handlers.OpenWithContribution"
- id="openWithMenu">
- </dynamic>
- </menu>
- <separator
- name="group.state"
- visible="true">
- </separator>
- <command
- commandId="org.eclipse.ui.file.refresh"
- helpContextId="org.eclipse.tm.te.tcf.filesystem.command_Refresh"
- icon="platform:/plugin/org.eclipse.ui/icons/full/elcl16/refresh_nav.gif"
- id="refresh"
- label="%temenu.refresh.label"
- style="push">
- <visibleWhen
- checkEnabled="false">
- <and>
- <with
- variable="selection">
- <count
- value="1">
- </count>
- <iterate>
- <instanceof
- value="org.eclipse.tm.te.tcf.filesystem.model.FSTreeNode">
- </instanceof>
- <test
- property="org.eclipse.tm.te.tcf.filesystem.propertytester.treenode.isFile">
- </test>
- </iterate>
- </with>
- <not>
- <test
- property="org.eclipse.tm.te.tcf.filesystem.propertytester.cache.isAutoSavingOn">
- </test>
- </not>
- </and>
- </visibleWhen>
- </command>
- <command
- commandId="org.eclipse.tm.te.tcf.filesystem.commands.update"
- helpContextId="org.eclipse.tm.te.tcf.filesystem.command_Update"
- id="update"
- label="%temenu.update.label"
- style="push">
- <visibleWhen
- checkEnabled="false">
- <and>
- <with
- variable="selection">
- <count
- value="1">
- </count>
- <iterate>
- <instanceof
- value="org.eclipse.tm.te.tcf.filesystem.model.FSTreeNode">
- </instanceof>
- <test
- property="org.eclipse.tm.te.tcf.filesystem.propertytester.treenode.isFile">
- </test>
- </iterate>
- </with>
- <not>
- <test
- property="org.eclipse.tm.te.tcf.filesystem.propertytester.cache.isAutoSavingOn">
- </test>
- </not>
- </and>
- </visibleWhen>
- </command>
- <command
- commandId="org.eclipse.tm.te.tcf.filesystem.commands.commit"
- helpContextId="org.eclipse.tm.te.tcf.filesystem.command_Commit"
- id="commit"
- label="%temenu.commit.label"
- style="push">
- <visibleWhen
- checkEnabled="false">
- <and>
- <with
- variable="selection">
- <count
- value="1">
- </count>
- <iterate>
- <instanceof
- value="org.eclipse.tm.te.tcf.filesystem.model.FSTreeNode">
- </instanceof>
- <test
- property="org.eclipse.tm.te.tcf.filesystem.propertytester.treenode.isFile">
- </test>
- </iterate>
- </with>
- <not>
- <test
- property="org.eclipse.tm.te.tcf.filesystem.propertytester.cache.isAutoSavingOn">
- </test>
- </not>
- </and>
- </visibleWhen>
- </command>
- <command
- commandId="org.eclipse.tm.te.tcf.filesystem.commands.merge"
- helpContextId="org.eclipse.tm.te.tcf.filesystem.command_Merge"
- id="merge"
- label="%temenu.merge.label"
- style="push">
- <visibleWhen
- checkEnabled="false">
- <and>
- <with
- variable="selection">
- <count
- value="1">
- </count>
- <iterate>
- <instanceof
- value="org.eclipse.tm.te.tcf.filesystem.model.FSTreeNode">
- </instanceof>
- <test
- property="org.eclipse.tm.te.tcf.filesystem.propertytester.treenode.isFile">
- </test>
- </iterate>
- </with>
- <not>
- <test
- property="org.eclipse.tm.te.tcf.filesystem.propertytester.cache.isAutoSavingOn">
- </test>
- </not>
- </and>
- </visibleWhen>
- </command>
- <command
- commandId="org.eclipse.tm.te.tcf.filesystem.commands.revert"
- helpContextId="org.eclipse.tm.te.tcf.filesystem.command_Revert"
- id="revert"
- label="%temenu.revert.label"
- style="push">
- <visibleWhen
- checkEnabled="false">
- <and>
- <with
- variable="selection">
- <count
- value="1">
- </count>
- <iterate>
- <instanceof
- value="org.eclipse.tm.te.tcf.filesystem.model.FSTreeNode">
- </instanceof>
- <test
- property="org.eclipse.tm.te.tcf.filesystem.propertytester.treenode.isFile">
- </test>
- </iterate>
- </with>
- <not>
- <test
- property="org.eclipse.tm.te.tcf.filesystem.propertytester.cache.isAutoSavingOn">
- </test>
- </not>
- </and>
- </visibleWhen>
- </command>
- </menuContribution>
- </extension>
-
-<!-- Target Explorer property page contributions -->
- <extension point="org.eclipse.ui.propertyPages">
- <page
- class="org.eclipse.tm.te.tcf.filesystem.internal.properties.GeneralInformationPage"
- id="org.eclipse.tm.te.tcf.filesystem.pages.basic"
- name="%GeneralInformationPage.name">
- <enabledWhen>
- <instanceof value="org.eclipse.tm.te.tcf.filesystem.model.FSTreeNode"/>
- </enabledWhen>
- </page>
- </extension>
-
-<!-- Target Explorer property tester contributions -->
- <extension point="org.eclipse.core.expressions.propertyTesters">
- <propertyTester
- class="org.eclipse.tm.te.tcf.filesystem.internal.handlers.FSTreeNodePropertyTester"
- id="org.eclipse.tm.te.tcf.filesystem.propertytester.treenode"
- namespace="org.eclipse.tm.te.tcf.filesystem.propertytester.treenode"
- properties="isFile,isDirectory,isBinaryFile,isReadable,isWritable,isExecutable,getCacheState"
- type="org.eclipse.tm.te.tcf.filesystem.model.FSTreeNode">
- </propertyTester>
- <propertyTester
- class="org.eclipse.tm.te.tcf.filesystem.internal.handlers.CachePropertyTester"
- id="org.eclipse.tm.te.tcf.filesystem.propertytester.cache"
- namespace="org.eclipse.tm.te.tcf.filesystem.propertytester.cache"
- properties="isAutoSavingOn"
- type="java.lang.Object">
- </propertyTester>
- </extension>
-
-<!-- Target Explorer command contributions -->
- <extension point="org.eclipse.ui.commands">
- <command
- id="org.eclipse.tm.te.tcf.filesystem.commands.update"
- name="%command.update.name">
- </command>
- <command
- id="org.eclipse.tm.te.tcf.filesystem.commands.commit"
- name="%command.commit.name">
- </command>
- <command
- id="org.eclipse.tm.te.tcf.filesystem.commands.merge"
- name="%command.merge.name">
- </command>
- <command
- id="org.eclipse.tm.te.tcf.filesystem.commands.revert"
- name="%command.revert.name">
- </command>
- </extension>
-
-<!-- Target Explorer command handler contributions -->
- <extension point="org.eclipse.ui.handlers">
-
- <!-- This handler contribution is for the double click behaviour in the
- Target Explore tree view -->
- <handler
- class="org.eclipse.tm.te.tcf.filesystem.internal.handlers.OpenFileHandler"
- commandId="org.eclipse.ui.navigator.Open">
- <activeWhen>
- <and>
- <with
- variable="selection">
- <count
- value="1">
- </count>
- <iterate>
- <instanceof
- value="org.eclipse.tm.te.tcf.filesystem.model.FSTreeNode">
- </instanceof>
- <test
- forcePluginActivation="true"
- property="org.eclipse.tm.te.tcf.filesystem.propertytester.treenode.isFile">
- </test>
- <test
- forcePluginActivation="true"
- property="org.eclipse.tm.te.tcf.filesystem.propertytester.treenode.isReadable">
- </test>
- <not>
- <test
- forcePluginActivation="true"
- property="org.eclipse.tm.te.tcf.filesystem.propertytester.treenode.isBinaryFile">
- </test>
- </not>
- </iterate>
- </with>
- <with
- variable="activePartId">
- <or>
- <equals
- value="org.eclipse.tm.te.ui.views.TargetExplorer">
- </equals>
- <equals
- value="org.eclipse.tm.te.ui.view.Editor">
- </equals>
- </or>
- </with>
- </and>
- </activeWhen>
- </handler>
- <handler
- class="org.eclipse.tm.te.tcf.filesystem.internal.handlers.RefreshHandler"
- commandId="org.eclipse.ui.file.refresh">
- <activeWhen>
- <with
- variable="activePartId">
- <or>
- <equals
- value="org.eclipse.tm.te.ui.views.TargetExplorer">
- </equals>
- <equals
- value="org.eclipse.tm.te.ui.view.Editor">
- </equals>
- </or>
- </with>
- </activeWhen>
- </handler>
- <handler
- class="org.eclipse.tm.te.tcf.filesystem.internal.handlers.UpdateHandler"
- commandId="org.eclipse.tm.te.tcf.filesystem.commands.update">
- <enabledWhen>
- <with
- variable="selection">
- <count
- value="1">
- </count>
- <iterate>
- <test
- property="org.eclipse.tm.te.tcf.filesystem.propertytester.treenode.getCacheState"
- value="outdated">
- </test>
- </iterate>
- </with>
- </enabledWhen>
- </handler>
- <handler
- class="org.eclipse.tm.te.tcf.filesystem.internal.handlers.CommitHandler"
- commandId="org.eclipse.tm.te.tcf.filesystem.commands.commit">
- <enabledWhen>
- <with
- variable="selection">
- <count
- value="1">
- </count>
- <iterate>
- <test
- property="org.eclipse.tm.te.tcf.filesystem.propertytester.treenode.getCacheState"
- value="modified">
- </test>
- </iterate>
- </with>
- </enabledWhen>
- </handler>
- <handler
- class="org.eclipse.tm.te.tcf.filesystem.internal.handlers.MergeHandler"
- commandId="org.eclipse.tm.te.tcf.filesystem.commands.merge">
- <enabledWhen>
- <with
- variable="selection">
- <count
- value="1">
- </count>
- <iterate>
- <test
- property="org.eclipse.tm.te.tcf.filesystem.propertytester.treenode.getCacheState"
- value="conflict">
- </test>
- </iterate>
- </with>
- </enabledWhen>
- </handler>
- <handler
- class="org.eclipse.tm.te.tcf.filesystem.internal.handlers.RevertHandler"
- commandId="org.eclipse.tm.te.tcf.filesystem.commands.revert">
- <enabledWhen>
- <with
- variable="selection">
- <count
- value="1">
- </count>
- <iterate>
- <or>
- <test
- property="org.eclipse.tm.te.tcf.filesystem.propertytester.treenode.getCacheState"
- value="modified">
- </test>
- <test
- property="org.eclipse.tm.te.tcf.filesystem.propertytester.treenode.getCacheState"
- value="conflict">
- </test>
- </or>
- </iterate>
- </with>
- </enabledWhen>
- </handler>
- </extension>
-
- <extension point="org.eclipse.ui.decorators">
- <decorator
- icon="icons/ovr/ovr_modified.png"
- id="org.eclipse.tm.te.tcf.filesystem.decorators.modified"
- label="%decorator.modified.label"
- lightweight="true"
- location="TOP_RIGHT"
- state="true">
- <enablement>
- <objectState
- name="cache.state"
- value="modified">
- </objectState>
- </enablement>
- </decorator>
- <decorator
- icon="icons/ovr/ovr_outdated.png"
- id="org.eclipse.tm.te.tcf.filesystem.decorators.outdated"
- label="%decorator.outdated.label"
- lightweight="true"
- location="TOP_RIGHT"
- state="true">
- <enablement>
- <objectState
- name="cache.state"
- value="outdated">
- </objectState>
- </enablement>
- </decorator>
- <decorator
- icon="icons/ovr/ovr_conflict.png"
- id="org.eclipse.tm.te.tcf.filesystem.decorators.conflict"
- label="%decorator.conflict.label"
- lightweight="true"
- location="TOP_RIGHT"
- state="true">
- <enablement>
- <objectState
- name="cache.state"
- value="conflict">
- </objectState>
- </enablement>
- </decorator>
- </extension>
-
- <extension point="org.eclipse.ui.preferencePages">
- <page
- class="org.eclipse.tm.te.tcf.filesystem.internal.preferences.TargetExplorerPreferencePage"
- id="org.eclipse.tm.te.tcf.filesystem.preferencePage"
- name="%preference.page.name">
- </page>
- </extension>
-
- <extension point="org.eclipse.core.runtime.adapters">
- <factory
- adaptableType="org.eclipse.tm.te.tcf.filesystem.model.FSTreeNode"
- class="org.eclipse.tm.te.tcf.filesystem.internal.adapters.NodeStateFilterFactory">
- <adapter
- type="org.eclipse.ui.IActionFilter">
- </adapter>
- </factory>
- </extension>
-
-</plugin>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/pom.xml b/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/pom.xml
deleted file mode 100644
index 7f7bb3719..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/pom.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
- xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.eclipse.tcf</groupId>
- <artifactId>tcf-parent</artifactId>
- <version>0.5.0-SNAPSHOT</version>
- <relativePath>../../../pom.xml</relativePath>
- </parent>
-
- <version>1.0.0.qualifier</version>
- <artifactId>org.eclipse.tm.te.tcf.filesystem</artifactId>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/controls/FSTreeContentProvider.java b/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/controls/FSTreeContentProvider.java
deleted file mode 100644
index 3d78421d1..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/controls/FSTreeContentProvider.java
+++ /dev/null
@@ -1,607 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.te.tcf.filesystem.controls;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IPeer;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.tcf.services.IFileSystem;
-import org.eclipse.tm.tcf.services.IFileSystem.DirEntry;
-import org.eclipse.tm.tcf.services.IFileSystem.FileSystemException;
-import org.eclipse.tm.tcf.services.IFileSystem.IFileHandle;
-import org.eclipse.tm.te.tcf.core.Tcf;
-import org.eclipse.tm.te.tcf.core.interfaces.IChannelManager;
-import org.eclipse.tm.te.tcf.filesystem.internal.events.INodeStateListener;
-import org.eclipse.tm.te.tcf.filesystem.model.FSModel;
-import org.eclipse.tm.te.tcf.filesystem.model.FSTreeNode;
-import org.eclipse.tm.te.tcf.locator.interfaces.nodes.IPeerModel;
-import org.eclipse.tm.te.tcf.locator.interfaces.nodes.IPeerModelProperties;
-import org.eclipse.tm.te.ui.nls.Messages;
-import org.eclipse.ui.PlatformUI;
-
-
-/**
- * File system tree content provider implementation.
- */
-public class FSTreeContentProvider implements ITreeContentProvider, INodeStateListener {
- /**
- * Static reference to the return value representing no elements.
- */
- protected final static Object[] NO_ELEMENTS = new Object[0];
-
- /**
- * The file system model instance associated with this file system
- * tree content provider instance.
- */
- /* package */ final static FSModel model = FSModel.getInstance();
-
- /* package */ TreeViewer viewer = null;
-
- public FSTreeContentProvider(){
- model.addNodeStateListener(this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
- */
- @Override
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- this.viewer = (TreeViewer) viewer;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IContentProvider#dispose()
- */
- @Override
- public void dispose() {
- model.removeNodeStateListener(this);
- }
-
- /**
- * Close the open communication channel.
- */
- protected void closeOpenChannel(final IChannel channel) {
- if (channel != null) {
- if (Protocol.isDispatchThread()) {
- channel.close();
- } else {
- Protocol.invokeAndWait(new Runnable() {
- @Override
- public void run() {
- channel.close();
- }
- });
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ITreeContentProvider#getElements(java.lang.Object)
- */
- @Override
- public Object[] getElements(Object inputElement) {
- return getChildren(inputElement);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object)
- */
- @Override
- public Object getParent(Object element) {
- if (element instanceof FSTreeNode) {
- FSTreeNode parent = ((FSTreeNode)element).parent;
- // If the parent is a root node, return the associated peer node
- if (parent != null && parent.type != null && parent.type.endsWith("RootNode")) { //$NON-NLS-1$
- return parent.peerNode;
- }
- return parent;
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object)
- */
- @Override
- public Object[] getChildren(Object parentElement) {
- Assert.isNotNull(parentElement);
-
- Object[] children = NO_ELEMENTS;
-
- // For the file system, we need the peer node
- if (parentElement instanceof IPeerModel) {
- final IPeerModel peerNode = (IPeerModel)parentElement;
- final String peerId = peerNode.getPeer().getID();
-
- // Get the file system model root node, if already stored
- final FSTreeNode[] root = new FSTreeNode[1];
- if (Protocol.isDispatchThread()) {
- root[0] = model.getRoot(peerId);
- } else {
- Protocol.invokeAndWait(new Runnable() {
- @Override
- public void run() {
- root[0] = model.getRoot(peerId);
- }
- });
- }
-
- // If the file system model root node hasn't been created, create
- // and initialize the root node now.
- if (root[0] == null) {
- IPeer peer = peerNode.getPeer();
- final int[] state = new int[1];
- Protocol.invokeAndWait(new Runnable() {
- @Override
- public void run() {
- state[0] = peerNode.getIntProperty(IPeerModelProperties.PROP_STATE);
- }
- });
- if (peer != null && IPeerModelProperties.STATE_ERROR != state[0] && IPeerModelProperties.STATE_NOT_REACHABLE != state[0]) {
- final List<FSTreeNode> candidates = new ArrayList<FSTreeNode>();
- // Create the root node and the initial pending node.
- // This must happen in the TCF dispatch thread.
- Protocol.invokeAndWait(new Runnable() {
- @Override
- public void run() {
- // The root node
- FSTreeNode rootNode = new FSTreeNode();
- rootNode.type = "FSRootNode"; //$NON-NLS-1$
- rootNode.peerNode = peerNode;
- rootNode.childrenQueried = false;
- rootNode.childrenQueryRunning = true;
- model.putRoot(peerId, rootNode);
-
- // Add a special "Pending..." node
- FSTreeNode pendingNode = new FSTreeNode();
- pendingNode.name = Messages.PendingOperation_label;
- pendingNode.type ="FSPendingNode"; //$NON-NLS-1$
- pendingNode.parent = rootNode;
- pendingNode.peerNode = rootNode.peerNode;
- rootNode.getChildren().add(pendingNode);
-
- candidates.addAll(rootNode.getChildren());
- }
- });
-
- children = candidates.toArray();
-
- Tcf.getChannelManager().openChannel(peer, new IChannelManager.DoneOpenChannel() {
- @Override
- public void doneOpenChannel(final Throwable error, final IChannel channel) {
- Assert.isTrue(Protocol.isDispatchThread());
-
- if (channel != null) {
- final IFileSystem service = channel.getRemoteService(IFileSystem.class);
- if (service != null) {
-
- Protocol.invokeLater(new Runnable() {
- @Override
- public void run() {
- service.roots(new IFileSystem.DoneRoots() {
- @Override
- public void doneRoots(IToken token, FileSystemException error, DirEntry[] entries) {
- // Close the channel, not needed anymore
- closeOpenChannel(channel);
-
- FSTreeNode rootNode = model.getRoot(peerId);
- if (rootNode != null && error == null) {
-
- for (DirEntry entry : entries) {
- FSTreeNode node = createNodeFromDirEntry(entry, true);
- if (node != null) {
- node.parent = rootNode;
- node.peerNode = rootNode.peerNode;
- rootNode.getChildren().add(node);
- model.addNode(node);
- }
- }
-
- // Find the pending node and remove it from the child list
- Iterator<FSTreeNode> iterator = rootNode.getChildren().iterator();
- while (iterator.hasNext()) {
- FSTreeNode candidate = iterator.next();
- if (Messages.PendingOperation_label.equals(candidate.name)) {
- iterator.remove();
- break;
- }
- }
-
- // Reset the children query markers
- rootNode.childrenQueryRunning = false;
- rootNode.childrenQueried = true;
- }
-
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- @Override
- public void run() {
- if (viewer != null) viewer.refresh();
- }
- });
- }
- });
- }
- });
-
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- @Override
- public void run() {
- if (viewer != null) viewer.refresh();
- }
- });
- } else {
- // The file system service is not available for this peer.
- // --> Close the just opened channel
- closeOpenChannel(channel);
- }
- }
- }
- });
- }
- } else {
- // Get possible children
- // This must happen in the TCF dispatch thread.
- final List<FSTreeNode> candidates = new ArrayList<FSTreeNode>();
- Protocol.invokeAndWait(new Runnable() {
- @Override
- public void run() {
- candidates.addAll(root[0].getChildren());
- }
- });
- children = candidates.toArray();
- }
- } else if (parentElement instanceof FSTreeNode) {
- final FSTreeNode node = (FSTreeNode)parentElement;
-
- // Get possible children
- // This must happen in the TCF dispatch thread.
- final List<FSTreeNode> candidates = new ArrayList<FSTreeNode>();
- Protocol.invokeAndWait(new Runnable() {
- @Override
- public void run() {
- candidates.addAll(node.getChildren());
- }
- });
- children = candidates.toArray();
- // No children -> check for "childrenQueried" property. If false, trigger the query.
- if (children.length == 0 && !node.childrenQueried && node.type.endsWith("DirNode")) { //$NON-NLS-1$
- candidates.clear();
- // Add a special "Pending..." node
- // This must happen in the TCF dispatch thread.
- Protocol.invokeAndWait(new Runnable() {
- @Override
- public void run() {
- FSTreeNode pendingNode = new FSTreeNode();
- pendingNode.name = Messages.PendingOperation_label;
- pendingNode.type ="FSPendingNode"; //$NON-NLS-1$
- pendingNode.parent = node;
- pendingNode.peerNode = node.peerNode;
- node.getChildren().add(pendingNode);
-
- candidates.addAll(node.getChildren());
- }
- });
- children = candidates.toArray();
-
- if (!node.childrenQueryRunning && node.peerNode != null) {
- node.childrenQueryRunning = true;
- final String absName = getEntryAbsoluteName(node);
-
- if (absName != null) {
- // Open a channel to the peer and query the children
- Tcf.getChannelManager().openChannel(node.peerNode.getPeer(), new IChannelManager.DoneOpenChannel() {
- @Override
- public void doneOpenChannel(final Throwable error, final IChannel channel) {
- Assert.isTrue(Protocol.isDispatchThread());
-
- if (channel != null && channel.getState() == IChannel.STATE_OPEN) {
- final IFileSystem service = channel.getRemoteService(IFileSystem.class);
- if (service != null) {
-
- Protocol.invokeLater(new Runnable() {
- @Override
- public void run() {
- service.opendir(absName, new IFileSystem.DoneOpen() {
- @Override
- public void doneOpen(IToken token, FileSystemException error, final IFileHandle handle) {
- if (error == null) {
- // Read the directory content until finished
- readdir(channel, service, handle, node);
- } else {
- // In case of an error, we are done here
- node.childrenQueryRunning = false;
- node.childrenQueried = true;
- }
- }
- });
- }
- });
- } else {
- // No file system service available
- node.childrenQueryRunning = false;
- node.childrenQueried = true;
- }
- } else {
- // Channel failed to open
- node.childrenQueryRunning = false;
- node.childrenQueried = true;
- }
- }
- });
- } else {
- // No absolute name
- node.childrenQueryRunning = false;
- node.childrenQueried = true;
- }
- }
- }
- }
- else {
- // If the node can be adapted to an IPeerModel object.
- Object adapted = adaptPeerModel(parentElement);
- if (adapted != null) {
- children = getChildren(adapted);
- }
- }
-
- return children;
- }
-
- /**
- * Adapt the specified element to a IPeerModel.
- *
- * @param element The element to be adapted.
- * @return The IPeerModel adapted.
- */
- private Object adaptPeerModel(Object element) {
- Object adapted;
- if (element instanceof IAdaptable) {
- adapted = ((IAdaptable) element).getAdapter(IPeerModel.class);
- }
- else {
- adapted = Platform.getAdapterManager().getAdapter(element, IPeerModel.class);
- }
- return adapted;
- }
-
- /**
- * Reads the content of a directory until the file system service signals EOF.
- *
- * @param channel The open channel. Must not be <code>null</code>.
- * @param service The file system service. Must not be <code>null</code>.
- * @param handle The directory handle. Must not be <code>null</code>.
- * @param parentNode The parent node receiving the entries. Must not be <code>null</code>.
- * @param mode The notification mode to set to the parent node once done.
- */
- protected void readdir(final IChannel channel, final IFileSystem service, final IFileHandle handle, final FSTreeNode parentNode) {
- Assert.isNotNull(channel);
- Assert.isNotNull(service);
- Assert.isNotNull(handle);
- Assert.isNotNull(parentNode);
-
- Protocol.invokeLater(new Runnable() {
- @Override
- public void run() {
- service.readdir(handle, new IFileSystem.DoneReadDir() {
-
- @Override
- public void doneReadDir(IToken token, FileSystemException error, DirEntry[] entries, boolean eof) {
- // Close the handle and channel if EOF is signaled or an error occurred.
- if (eof) {
- service.close(handle, new IFileSystem.DoneClose() {
- @Override
- public void doneClose(IToken token, FileSystemException error) {
- closeOpenChannel(channel);
- }
- });
- }
-
- // Process the returned data
- if (error == null && entries != null && entries.length > 0) {
- for (DirEntry entry : entries) {
- FSTreeNode node = createNodeFromDirEntry(entry, false);
- if (node != null) {
- node.parent = parentNode;
- node.peerNode = parentNode.peerNode;
- parentNode.getChildren().add(node);
- model.addNode(node);
- }
- }
- }
-
- if (eof) {
- // Find the pending node and remove it from the child list
- Iterator<FSTreeNode> iterator = parentNode.getChildren().iterator();
- while (iterator.hasNext()) {
- FSTreeNode candidate = iterator.next();
- if (Messages.PendingOperation_label.equals(candidate.name)) {
- iterator.remove();
- break;
- }
- }
-
- // Reset the children query markers
- parentNode.childrenQueryRunning = false;
- parentNode.childrenQueried = true;
- } else {
- // And invoke ourself again
- readdir(channel, service, handle, parentNode);
- }
-
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- @Override
- public void run() {
- viewer.refresh(parentNode);
- }
- });
- }
- });
- }
- });
- }
-
-
- /**
- * Creates a tree node from the given directory entry.
- *
- * @param entry The directory entry. Must not be <code>null</code>.
- *
- * @return The tree node.
- */
- protected FSTreeNode createNodeFromDirEntry(DirEntry entry, boolean entryIsRootNode) {
- Assert.isNotNull(entry);
-
- FSTreeNode node = null;
-
- IFileSystem.FileAttrs attrs = entry.attrs;
-
- if (attrs == null || attrs.isDirectory()) {
- node = new FSTreeNode();
- node.childrenQueried = false;
- node.childrenQueryRunning = false;
- node.attr = attrs;
- node.name = entry.filename;
- node.type = entryIsRootNode ? "FSRootDirNode" : "FSDirNode"; //$NON-NLS-1$ //$NON-NLS-2$
- } else if (attrs.isFile()) {
- node = new FSTreeNode();
- node.childrenQueried = false;
- node.childrenQueryRunning = false;
- node.attr = attrs;
- node.name = entry.filename;
- node.type = "FSFileNode"; //$NON-NLS-1$
- }
-
- return node;
- }
-
- /**
- * Returns the absolute name for the given node.
- *
- * @param node The node. Must not be <code>null</code>.
- * @return The absolute name.
- */
- public static String getEntryAbsoluteName(FSTreeNode node) {
- Assert.isNotNull(node);
-
- StringBuilder path = new StringBuilder();
-
- // We have to walk upwards the hierarchy until the root node is found
- FSTreeNode parent = node.parent;
- while (parent != null && parent.type != null && parent.type.startsWith("FS")) { //$NON-NLS-1$
- if ("FSRootNode".equals(parent.type)) { //$NON-NLS-1$
- // We are done if reaching the root node
- break;
- }
-
- if (path.length() == 0) path.append(parent.name.replaceAll("\\\\", "/")); //$NON-NLS-1$ //$NON-NLS-2$
- else {
- String name = parent.name.replaceAll("\\\\", "/"); //$NON-NLS-1$ //$NON-NLS-2$
- if (!name.endsWith("/")) name = name + "/"; //$NON-NLS-1$ //$NON-NLS-2$
- path.insert(0, name);
- }
-
- parent = parent.parent;
- }
-
- if (path.length() > 0 && path.charAt(path.length() - 1) != '/') {
- path.append("/"); //$NON-NLS-1$
- }
- path.append(node.name);
-
- return path.toString();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object)
- */
- @Override
- public boolean hasChildren(final Object element) {
- Assert.isNotNull(element);
-
- boolean hasChildren = false;
-
- if (element instanceof FSTreeNode) {
- final FSTreeNode node = (FSTreeNode)element;
- if (node.type != null && (node.type.endsWith("DirNode") || node.type.endsWith("RootNode"))) { //$NON-NLS-1$ //$NON-NLS-2$
- if (!node.childrenQueried || node.childrenQueryRunning) {
- hasChildren = true;
- } else if (node.childrenQueried) {
- final boolean[] result = new boolean[1];
- Protocol.invokeAndWait(new Runnable() {
- @Override
- public void run() {
- result[0] = node.getChildren().size() > 0;
- }
- });
- hasChildren = result[0];
- }
- }
- }
- else if (element instanceof IPeerModel) {
- final String[] peerId = new String[1];
- if (Protocol.isDispatchThread()) {
- peerId[0] = ((IPeerModel)element).getPeer().getID();
- } else {
- Protocol.invokeAndWait(new Runnable() {
- @Override
- public void run() {
- peerId[0] = ((IPeerModel)element).getPeer().getID();
- }
- });
- }
-
- // Get the root node for this peer model object.
- // If null, true is returned as it means that the file system
- // model hasn't been created yet and have to treat is as children
- // not queried yet.
- FSTreeNode root = peerId[0] != null ? model.getRoot(peerId[0]): null;
- hasChildren = root != null ? hasChildren(root) : true;
- }
- else {
- Object adapted = adaptPeerModel(element);
- if(adapted!=null){
- return hasChildren(adapted);
- }
- }
-
- return hasChildren;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.filesystem.internal.events.INodeStateListener#stateChanged(org.eclipse.tm.te.tcf.filesystem.model.FSTreeNode)
- */
- @Override
- public void stateChanged(final FSTreeNode node) {
- // Make sure that this node is inside of this viewer.
- Display display = PlatformUI.getWorkbench().getDisplay();
- if (display.getThread() == Thread.currentThread()) {
- viewer.refresh(node);
- } else {
- display.asyncExec(new Runnable() {
- @Override
- public void run() {
- viewer.refresh(node);
- }
- });
- }
- }
-}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/controls/FSTreeControl.java b/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/controls/FSTreeControl.java
deleted file mode 100644
index a15cfc037..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/controls/FSTreeControl.java
+++ /dev/null
@@ -1,205 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- * William Chen (Wind River) - [345384] Provide property pages for remote file system nodes
- *******************************************************************************/
-package org.eclipse.tm.te.tcf.filesystem.controls;
-
-import java.util.Collections;
-
-import org.eclipse.core.commands.Command;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.expressions.EvaluationContext;
-import org.eclipse.jface.viewers.DoubleClickEvent;
-import org.eclipse.jface.viewers.IDoubleClickListener;
-import org.eclipse.jface.viewers.ILabelDecorator;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.ViewerComparator;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.swt.widgets.TreeColumn;
-import org.eclipse.tm.te.tcf.filesystem.internal.nls.Messages;
-import org.eclipse.tm.te.ui.interfaces.IUIConstants;
-import org.eclipse.tm.te.ui.trees.AbstractTreeControl;
-import org.eclipse.ui.IDecoratorManager;
-import org.eclipse.ui.ISources;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.IWorkbenchPartSite;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.commands.ICommandService;
-import org.eclipse.ui.navigator.ICommonActionConstants;
-import org.eclipse.ui.part.MultiPageSelectionProvider;
-
-
-/**
- * File system browser control.
- */
-public class FSTreeControl extends AbstractTreeControl implements ISelectionChangedListener, IDoubleClickListener {
-
- /**
- * Constructor.
- */
- public FSTreeControl() {
- super();
- }
-
- /**
- * Constructor.
- *
- * @param parentPart The parent workbench part this control is embedded in or <code>null</code>.
- */
- public FSTreeControl(IWorkbenchPart parentPart) {
- super(parentPart);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.vtl.ui.datasource.controls.trees.AbstractTreeControl#configureTreeViewer(org.eclipse.jface.viewers.TreeViewer)
- */
- @Override
- protected void configureTreeViewer(TreeViewer viewer) {
- super.configureTreeViewer(viewer);
-
- Tree tree = viewer.getTree();
- if (hasColumns()) {
- TreeColumn column = new TreeColumn(tree, SWT.LEFT);
- column.setText(Messages.FSTreeControl_column_name_label);
- column.setWidth(300);
-
- column = new TreeColumn(tree, SWT.RIGHT);
- column.setText(Messages.FSTreeControl_column_size_label);
- column.setWidth(100);
-
- column = new TreeColumn(tree, SWT.RIGHT);
- column.setText(Messages.FSTreeControl_column_modified_label);
- column.setWidth(200);
- }
- tree.setHeaderVisible(hasColumns());
- viewer.addDoubleClickListener(this);
- }
-
- /**
- * Returns if or if not to show the tree columns.
- *
- * @return <code>True</code> to show the tree columns, <code>false</code> otherwise.
- */
- protected boolean hasColumns() {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.vtl.ui.datasource.controls.trees.AbstractTreeControl#doCreateTreeViewerContentProvider(org.eclipse.jface.viewers.TreeViewer)
- */
- @Override
- protected ITreeContentProvider doCreateTreeViewerContentProvider(TreeViewer viewer) {
- return new FSTreeContentProvider();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.vtl.ui.datasource.controls.trees.AbstractTreeControl#doCreateTreeViewerLabelProvider(org.eclipse.jface.viewers.TreeViewer)
- */
- @Override
- protected ILabelProvider doCreateTreeViewerLabelProvider(TreeViewer viewer) {
- FSTreeLabelProvider labelProvider = new FSTreeLabelProvider(viewer);
- IWorkbench workbench = PlatformUI.getWorkbench();
- IDecoratorManager manager = workbench.getDecoratorManager();
- ILabelDecorator decorator = manager.getLabelDecorator();
- return new FSTreeDecoratingLabelProvider(labelProvider,decorator);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.vtl.ui.datasource.controls.trees.AbstractTreeControl#doCreateTreeViewerSelectionChangedListener(org.eclipse.jface.viewers.TreeViewer)
- */
- @Override
- protected ISelectionChangedListener doCreateTreeViewerSelectionChangedListener(TreeViewer viewer) {
- return this;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.vtl.ui.datasource.controls.trees.AbstractTreeControl#doCreateTreeViewerComparator(org.eclipse.jface.viewers.TreeViewer)
- */
- @Override
- protected ViewerComparator doCreateTreeViewerComparator(TreeViewer viewer) {
- return new FSTreeViewerComparator(viewer, (ILabelProvider)viewer.getLabelProvider());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.vtl.ui.datasource.controls.trees.AbstractTreeControl#getAutoExpandLevel()
- */
- @Override
- protected int getAutoExpandLevel() {
- return 0;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.vtl.ui.datasource.controls.trees.AbstractTreeControl#getContextMenuId()
- */
- @Override
- protected String getContextMenuId() {
- return IUIConstants.ID_CONTROL_MENUS_BASE + ".menu.fs"; //$NON-NLS-1$;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
- */
- @Override
- public void selectionChanged(SelectionChangedEvent event) {
- IWorkbenchPart parent = getParentPart();
- if (parent != null) {
- IWorkbenchPartSite site = parent.getSite();
- if (site != null) {
- ISelectionProvider selectionProvider = site.getSelectionProvider();
- if (selectionProvider instanceof MultiPageSelectionProvider) {
- // Propagate the selection event to update the selection context.
- ((MultiPageSelectionProvider) selectionProvider).fireSelectionChanged(event);
- }
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IDoubleClickListener#doubleClick(org.eclipse.jface.viewers.DoubleClickEvent)
- */
- @Override
- public void doubleClick(DoubleClickEvent event) {
- // If an handled and enabled command is registered for the ICommonActionConstants.OPEN
- // retargetable action id, redirect the double click handling to the command handler.
- //
- // Note: The default tree node expansion must be re-implemented in the active handler!
- ICommandService service = (ICommandService)PlatformUI.getWorkbench().getService(ICommandService.class);
- Command command = service != null ? service.getCommand(ICommonActionConstants.OPEN) : null;
- if (command != null && command.isDefined() && command.isEnabled()) {
- try {
- ISelection selection = event.getSelection();
- EvaluationContext ctx = new EvaluationContext(null, selection);
- ctx.addVariable(ISources.ACTIVE_CURRENT_SELECTION_NAME, selection);
- ctx.addVariable(ISources.ACTIVE_MENU_SELECTION_NAME, selection);
- ctx.addVariable(ISources.ACTIVE_WORKBENCH_WINDOW_NAME, PlatformUI.getWorkbench().getActiveWorkbenchWindow());
- IWorkbenchPart part = getParentPart();
- if (part != null) {
- IWorkbenchPartSite site = part.getSite();
- ctx.addVariable(ISources.ACTIVE_PART_ID_NAME, site.getId());
- ctx.addVariable(ISources.ACTIVE_PART_NAME, part);
- ctx.addVariable(ISources.ACTIVE_SITE_NAME, site);
- ctx.addVariable(ISources.ACTIVE_SHELL_NAME, site.getShell());
- }
- ExecutionEvent executionEvent = new ExecutionEvent(command, Collections.EMPTY_MAP, part, ctx);
- command.executeWithChecks(executionEvent);
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- }
-
-}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/controls/FSTreeLabelProvider.java b/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/controls/FSTreeLabelProvider.java
deleted file mode 100644
index 6bd75bde5..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/controls/FSTreeLabelProvider.java
+++ /dev/null
@@ -1,181 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.te.tcf.filesystem.controls;
-
-import java.text.DecimalFormat;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.tm.te.tcf.filesystem.activator.UIPlugin;
-import org.eclipse.tm.te.tcf.filesystem.internal.ImageConsts;
-import org.eclipse.tm.te.tcf.filesystem.model.FSTreeNode;
-import org.eclipse.tm.te.ui.views.interfaces.IUIConstants;
-import org.eclipse.ui.IEditorRegistry;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.navigator.CommonNavigator;
-
-
-/**
- * File system tree control label provider implementation.
- */
-public class FSTreeLabelProvider extends LabelProvider implements ITableLabelProvider {
- private IEditorRegistry editorRegistry = null;
-
- private static final SimpleDateFormat DATE_MODIFIED_FORMAT = new SimpleDateFormat("dd.MM.yyyy HH:mm"); //$NON-NLS-1$
- private static final DecimalFormat SIZE_FORMAT = new DecimalFormat();
-
- // Reference to the parent tree viewer
- private TreeViewer parentViewer;
-
- /**
- * Constructor.
- */
- public FSTreeLabelProvider() {
- this(null);
- }
-
- /**
- * Constructor.
- *
- * @param viewer The tree viewer or <code>null</code>.
- */
- public FSTreeLabelProvider(TreeViewer viewer) {
- super();
- parentViewer = viewer;
- }
-
- /**
- * Returns the parent tree viewer instance.
- *
- * @return The parent tree viewer or <code>null</code>.
- */
- public final TreeViewer getParentViewer() {
- if (parentViewer == null) {
- if (PlatformUI.getWorkbench() != null && PlatformUI.getWorkbench().getActiveWorkbenchWindow() != null
- && PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage() != null) {
- IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
- IViewPart part = page.findView(IUIConstants.ID_EXPLORER);
- if (part instanceof CommonNavigator) {
- parentViewer = ((CommonNavigator)part).getCommonViewer();
- }
- }
- }
- return parentViewer;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.LabelProvider#getText(java.lang.Object)
- */
- @Override
- public String getText(Object element) {
- if (element instanceof FSTreeNode) {
- return ((FSTreeNode)element).name;
- }
- return super.getText(element);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.LabelProvider#getImage(java.lang.Object)
- */
- @Override
- public Image getImage(Object element) {
- if (element != null) {
- boolean isExpanded = getParentViewer().getExpandedState(element);
-
- if (element instanceof FSTreeNode) {
- FSTreeNode node = (FSTreeNode)element;
- if ("FSRootDirNode".equals(node.type)) {//$NON-NLS-1$
- return isExpanded ? UIPlugin.getImage(ImageConsts.ROOT_DRIVE_OPEN) : UIPlugin.getImage(ImageConsts.ROOT_DRIVE);
- } else if ("FSDirNode".equals(node.type)) { //$NON-NLS-1$
- return isExpanded ? PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_FOLDER) : UIPlugin.getImage(ImageConsts.FOLDER);
- } else if ("FSFileNode".equals(node.type)) { //$NON-NLS-1$
- String key = node.name;
- Image image = UIPlugin.getImage(key);
- if (image == null) {
-
- ImageDescriptor descriptor = getEditorRegistry().getImageDescriptor(key);
- if (descriptor == null) descriptor = getEditorRegistry().getSystemExternalEditorImageDescriptor(key);
- if (descriptor != null) UIPlugin.getDefault().getImageRegistry().put(key, descriptor);
- image = UIPlugin.getImage(key);
- }
- return image;
- }
- }
- }
-
- return super.getImage(element);
- }
-
- /**
- * Returns the workbench's editor registry.
- */
- private IEditorRegistry getEditorRegistry() {
- if (editorRegistry == null) {
- IWorkbench workbench = PlatformUI.getWorkbench();
- if (workbench != null) editorRegistry = workbench.getEditorRegistry();
- }
- return editorRegistry;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnImage(java.lang.Object, int)
- */
- @Override
- public Image getColumnImage(Object element, int columnIndex) {
- if (columnIndex == 0) return getImage(element);
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnText(java.lang.Object, int)
- */
- @Override
- public String getColumnText(Object element, int columnIndex) {
- if (columnIndex == 0) return getText(element);
-
- if (element instanceof FSTreeNode) {
- FSTreeNode node = (FSTreeNode)element;
- if (node.type != null && node.type.startsWith("FS")) { //$NON-NLS-1$
- // Pending nodes does not have column texts at all
- if (node.type.endsWith("PendingNode")) return ""; //$NON-NLS-1$ //$NON-NLS-2$
-
- boolean isDirNode = node.type.endsWith("DirNode"); //$NON-NLS-1$
- switch (columnIndex) {
- case 1:
- // Directory nodes does not have a size
- if (!isDirNode) {
- if (node.attr != null) {
- return SIZE_FORMAT.format(node.attr.size / 1024) + " KB"; //$NON-NLS-1$
- }
- }
- break;
- case 2:
- if (node.attr != null) {
- return DATE_MODIFIED_FORMAT.format(new Date(node.attr.mtime));
- }
- break;
- }
-
- }
- }
-
- return ""; //$NON-NLS-1$
- }
-
-}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/controls/FSTreeViewerComparator.java b/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/controls/FSTreeViewerComparator.java
deleted file mode 100644
index f65885c51..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/controls/FSTreeViewerComparator.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.te.tcf.filesystem.controls;
-
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.tm.te.tcf.filesystem.model.FSTreeNode;
-import org.eclipse.tm.te.ui.trees.TreeViewerComparator;
-
-
-/**
- * File system tree control viewer comparator implementation.
- */
-public class FSTreeViewerComparator extends TreeViewerComparator {
-
- /**
- * Constructor.
- *
- * @param viewer The parent viewer. Must not be <code>null</code>.
- * @param labelProvider The label provider. Must not be <code>null</code>.
- */
- public FSTreeViewerComparator(Viewer viewer, ILabelProvider labelProvider) {
- super(viewer, labelProvider);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.vtl.ui.trees.TreeViewerComparator#doCompare(java.lang.Object, java.lang.Object, java.lang.String, int, int)
- */
- @Override
- protected int doCompare(Object node1, Object node2, String sortColumn, int index, int inverter) {
- if (node1 instanceof FSTreeNode && node2 instanceof FSTreeNode) {
- // Get the type labels
- String t1 = ((FSTreeNode)node1).type;
- String t2 = ((FSTreeNode)node2).type;
-
- // Group directories and files always together before sorting by name
- if (("FSRootDirNode".equals(t1) || "FSDirNode".equals(t1)) //$NON-NLS-1$ //$NON-NLS-2$
- && !("FSRootDirNode".equals(t2) || "FSDirNode".equals(t2))) { //$NON-NLS-1$ //$NON-NLS-2$
- return -1 * inverter;
- }
-
- if (("FSRootDirNode".equals(t2) || "FSDirNode".equals(t2)) //$NON-NLS-1$ //$NON-NLS-2$
- && !("FSRootDirNode".equals(t1) || "FSDirNode".equals(t1))) { //$NON-NLS-1$ //$NON-NLS-2$
- return 1 * inverter;
- }
-
- // If the nodes are of the same type and one entry starts
- // with a '.', it comes before the one without a '.'
- if (t1 != null && t2 != null && t1.equals(t2)) {
- String n1 = doGetText(node1, index);
- String n2 = doGetText(node2, index);
- if (n1 != null && n2 != null) {
- if (n1.startsWith(".") && !n2.startsWith(".")) return -1 * inverter; //$NON-NLS-1$ //$NON-NLS-2$
- if (!n1.startsWith(".") && n2.startsWith(".")) return 1 * inverter; //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- }
-
- return super.doCompare(node1, node2, sortColumn, index, inverter);
- }
-}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/dialogs/FSOpenFileDialog.java b/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/dialogs/FSOpenFileDialog.java
deleted file mode 100644
index ba7840a3f..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/dialogs/FSOpenFileDialog.java
+++ /dev/null
@@ -1,199 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.te.tcf.filesystem.dialogs;
-
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.swt.SWT;
-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.Shell;
-import org.eclipse.tm.te.tcf.filesystem.controls.FSTreeControl;
-import org.eclipse.tm.te.tcf.filesystem.internal.nls.Messages;
-import org.eclipse.tm.te.ui.forms.CustomFormToolkit;
-import org.eclipse.tm.te.ui.jface.dialogs.CustomTrayDialog;
-import org.eclipse.ui.forms.editor.FormPage;
-import org.eclipse.ui.forms.editor.IFormPage;
-import org.eclipse.ui.forms.widgets.FormToolkit;
-
-
-/**
- * File system open file dialog.
- */
-public class FSOpenFileDialog extends CustomTrayDialog {
- // Reference to the sub control
- private final FSTreeControl control;
- // Reference to the current selection within the file system tree
- private ISelection selection;
-
- protected class FSOpenFileTreeControl extends FSTreeControl {
-
- /**
- * Constructor.
- */
- public FSOpenFileTreeControl() {
- super();
- }
-
- /**
- * Constructor.
- *
- * @param parentPage The parent form page this control is embedded in or
- * <code>null</code> if the control is not embedded within
- * a form page.
- */
- public FSOpenFileTreeControl(FormPage parentPage) {
- super(parentPage);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.vtl.tcf.ui.internal.controls.trees.fs.FSTreeControl#hasColumns()
- */
- @Override
- protected boolean hasColumns() {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.vtl.tcf.ui.internal.controls.trees.fs.FSTreeControl#doCreateTreeViewerSelectionChangedListener(org.eclipse.jface.viewers.TreeViewer)
- */
- @Override
- protected ISelectionChangedListener doCreateTreeViewerSelectionChangedListener(TreeViewer viewer) {
- return new FSOpenFileTreeControlSelectionChangedListener();
- }
- }
-
- protected class FSOpenFileTreeControlSelectionChangedListener implements ISelectionChangedListener{
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
- */
- @Override
- @SuppressWarnings("synthetic-access")
- public void selectionChanged(SelectionChangedEvent event) {
- selection = event.getSelection();
- updateButtons();
- }
- }
-
- /**
- * Constructor.
- *
- * @param shell The parent shell or <code>null</code>.
- */
- public FSOpenFileDialog(Shell shell) {
- this(shell, null);
- }
-
- /**
- * Constructor.
- *
- * @param shell The parent shell or <code>null</code>.
- * @param contextHelpId The dialog context help id or <code>null</code>.
- */
- public FSOpenFileDialog(Shell shell, String contextHelpId) {
- this(null, shell, contextHelpId);
- }
-
- /**
- * Constructor.
- *
- * @param parentPage The parent form page this control is embedded in or
- * <code>null</code> if the control is not embedded within
- * a form page.
- * @param shell The parent shell or <code>null</code>.
- * @param contextHelpId The dialog context help id or <code>null</code>.
- */
- public FSOpenFileDialog(FormPage parentPage, Shell shell, String contextHelpId) {
- super(shell, contextHelpId);
-
- control = new FSOpenFileTreeControl(parentPage);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#isResizable()
- */
- @Override
- protected boolean isResizable() {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.ide.common.ui.dialogs.WRUnifiedTrayDialog#createDialogArea(org.eclipse.swt.widgets.Composite)
- */
- @Override
- protected Control createDialogArea(Composite parent) {
- Composite composite = (Composite)super.createDialogArea(parent);
-
- setDialogTitle(Messages.FSOpenFileDialog_title);
-
- Composite panel = new Composite(composite, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.marginWidth = 0; layout.marginHeight = 0;
- panel.setLayout(layout);
- GridData layoutData = new GridData(SWT.FILL, SWT.FILL, true, true);
- layoutData.heightHint = convertHeightInCharsToPixels(25);
- layoutData.widthHint = convertWidthInCharsToPixels(50);
- panel.setLayoutData(layoutData);
-
- CustomFormToolkit toolkit = null;
- if (control.getParentPart() instanceof IFormPage && ((IFormPage)control.getParentPart()).getManagedForm() != null) {
- toolkit = new CustomFormToolkit(((IFormPage)control.getParentPart()).getManagedForm().getToolkit());
- }
- if (toolkit == null) toolkit = new CustomFormToolkit(new FormToolkit(getShell().getDisplay()));
-
- control.setupFormPanel(panel, toolkit);
-
- return composite;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.ide.common.ui.dialogs.WRUnifiedTrayDialog#close()
- */
- @Override
- public boolean close() {
- if (control != null) {
- control.dispose();
- }
-
- return super.close();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.TrayDialog#createButtonBar(org.eclipse.swt.widgets.Composite)
- */
- @Override
- protected Control createButtonBar(Composite parent) {
- Control control = super.createButtonBar(parent);
- updateButtons();
- return control;
- }
-
- /**
- * Update the button enablement.
- */
- protected void updateButtons() {
- Button okButton = getButton(IDialogConstants.OK_ID);
- if (okButton != null) okButton.setEnabled(selection != null && !selection.isEmpty());
- }
-
- /**
- * Returns the current file system control selection.
- * @return
- */
- public ISelection getSelection() {
- return selection;
- }
-}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/autosave/SaveAllListener.java b/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/autosave/SaveAllListener.java
deleted file mode 100644
index a295d52b4..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/autosave/SaveAllListener.java
+++ /dev/null
@@ -1,194 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * William Chen (Wind River) - [345552] Edit the remote files with a proper editor
- *******************************************************************************/
-package org.eclipse.tm.te.tcf.filesystem.internal.autosave;
-
-import java.io.File;
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.compare.CompareUI;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.IExecutionListener;
-import org.eclipse.core.commands.NotHandledException;
-import org.eclipse.core.filesystem.EFS;
-import org.eclipse.core.filesystem.IFileStore;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.tm.te.tcf.filesystem.internal.compare.LocalTypedElement;
-import org.eclipse.tm.te.tcf.filesystem.internal.compare.MergeEditorInput;
-import org.eclipse.tm.te.tcf.filesystem.internal.compare.RemoteTypedElement;
-import org.eclipse.tm.te.tcf.filesystem.internal.exceptions.TCFException;
-import org.eclipse.tm.te.tcf.filesystem.internal.handlers.CacheManager;
-import org.eclipse.tm.te.tcf.filesystem.internal.handlers.PersistenceManager;
-import org.eclipse.tm.te.tcf.filesystem.internal.handlers.StateManager;
-import org.eclipse.tm.te.tcf.filesystem.internal.nls.Messages;
-import org.eclipse.tm.te.tcf.filesystem.model.CacheState;
-import org.eclipse.tm.te.tcf.filesystem.model.FSModel;
-import org.eclipse.tm.te.tcf.filesystem.model.FSTreeNode;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IURIEditorInput;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.handlers.HandlerUtil;
-
-/**
- * The execution listener of command "SAVE ALL", which synchronizes the local
- * file with the one on the target server after it is saved.
- */
-public class SaveAllListener implements IExecutionListener {
- // Dirty nodes that should be saved and synchronized.
- private List<FSTreeNode> fDirtyNodes;
- // The file system fModel storing the existing FSTreeNodes.
- private FSModel fModel;
- /**
- * Create the listener listening to command "SAVE ALL".
- */
- public SaveAllListener() {
- this.fModel = FSModel.getInstance();
- this.fDirtyNodes = new ArrayList<FSTreeNode>();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.commands.IExecutionListener#postExecuteSuccess(java.lang.String, java.lang.Object)
- */
- @Override
- public void postExecuteSuccess(String commandId, Object returnValue) {
- if (!fDirtyNodes.isEmpty()) {
- try {
- List<FSTreeNode> modified = new ArrayList<FSTreeNode>();
- List<FSTreeNode> conflicts = new ArrayList<FSTreeNode>();
- for (FSTreeNode node : fDirtyNodes) {
- // Refresh the dirty nodes and get their latest states.
- StateManager.getInstance().refreshState(node);
- CacheState state = StateManager.getInstance().getCacheState(node);
- switch (state) {
- case consistent:
- break;
- case outdated:
- break;
- case modified:
- // Reclassifying
- modified.add(node);
- break;
- case conflict:
- // Reclassifying
- conflicts.add(node);
- break;
- }
- }
-
- if (PersistenceManager.getInstance().isAutoSaving()) {
- // If auto saving is on.
- if (!modified.isEmpty()) {
- // Upload the modified nodes.
- CacheManager.getInstance().upload(modified.toArray(new FSTreeNode[modified.size()]));
- }
- if (!conflicts.isEmpty()) {
- // Merge the conflicting ones.
- mergeConflicts(conflicts);
- }
- }
- } catch (TCFException tcfe) {
- Shell parent = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- MessageDialog.openError(parent, Messages.StateManager_RefreshFailureTitle, tcfe.getLocalizedMessage());
- }
- }
- }
-
- /**
- * Merge those conflicting nodes.
- *
- * @param conflicts The conflicting nodes.
- */
- private void mergeConflicts(List<FSTreeNode> conflicts) {
- for (FSTreeNode node : conflicts) {
- String title = Messages.SaveAllListener_StateChangedDialogTitle;
- String message = NLS.bind(Messages.SaveAllListener_SingularMessage, node.name);
- IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- IWorkbenchPage page = window.getActivePage();
- Shell parent = window.getShell();
- MessageDialog msgDialog = new MessageDialog(parent, title, null, message,
- MessageDialog.QUESTION, new String[] { Messages.SaveAllListener_Merge,
- Messages.SaveAllListener_SaveAnyway, Messages.SaveAllListener_Cancel }, 0);
- int index = msgDialog.open();
- if (index == 0) { // Merge
- LocalTypedElement local = new LocalTypedElement(node);
- RemoteTypedElement remote = new RemoteTypedElement(node);
- MergeEditorInput mergeInput = new MergeEditorInput(local, remote, page);
- CompareUI.openCompareDialog(mergeInput);
- } else if (index == 1) { // Save anyway
- CacheManager.getInstance().upload(conflicts.toArray(new FSTreeNode[conflicts.size()]));
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.commands.IExecutionListener#preExecute(java.lang.String, org.eclipse.core.commands.ExecutionEvent)
- */
- @Override
- public void preExecute(String commandId, ExecutionEvent event) {
- fDirtyNodes.clear();
- IWorkbenchPage page = HandlerUtil.getActiveWorkbenchWindow(event).getActivePage();
- IEditorPart[] editors = page.getDirtyEditors();
- for (IEditorPart editor : editors) {
- IEditorInput input = editor.getEditorInput();
- FSTreeNode node = getEditedNode(input);
- if (node != null) {
- // If it is a modified node, add it to the dirty node list.
- fDirtyNodes.add(node);
- }
- }
- }
-
- /**
- * Get the corresponding FSTreeNode from the input.
- * If the input has no corresponding FSTreeNode, return null;
- * @param input The editor input.
- * @return The corresponding FSTreeNode or null if it has not.
- */
- private FSTreeNode getEditedNode(IEditorInput input){
- if (input instanceof IURIEditorInput) {
- //Get the file that is being edited.
- IURIEditorInput fileInput = (IURIEditorInput) input;
- URI uri = fileInput.getURI();
- try {
- IFileStore store = EFS.getStore(uri);
- File localFile = store.toLocalFile(0, new NullProgressMonitor());
- if (localFile != null) {
- // Get the file's mapped FSTreeNode.
- FSTreeNode node = fModel.getTreeNode(localFile.toString());
- return node;
- }
- }catch(CoreException e){}
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.commands.IExecutionListener#notHandled(java.lang.String, org.eclipse.core.commands.NotHandledException)
- */
- @Override
- public void notHandled(String commandId, NotHandledException exception) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.commands.IExecutionListener#postExecuteFailure(java.lang.String, org.eclipse.core.commands.ExecutionException)
- */
- @Override
- public void postExecuteFailure(String commandId, ExecutionException exception) {
- }
-}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/autosave/SaveListener.java b/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/autosave/SaveListener.java
deleted file mode 100644
index 0a50c9b6b..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/autosave/SaveListener.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * William Chen (Wind River) - [345552] Edit the remote files with a proper editor
- *******************************************************************************/
-package org.eclipse.tm.te.tcf.filesystem.internal.autosave;
-
-import java.io.File;
-import java.net.URI;
-
-import org.eclipse.compare.CompareUI;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.IExecutionListener;
-import org.eclipse.core.commands.NotHandledException;
-import org.eclipse.core.filesystem.EFS;
-import org.eclipse.core.filesystem.IFileStore;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.tm.te.tcf.filesystem.internal.compare.LocalTypedElement;
-import org.eclipse.tm.te.tcf.filesystem.internal.compare.MergeEditorInput;
-import org.eclipse.tm.te.tcf.filesystem.internal.compare.RemoteTypedElement;
-import org.eclipse.tm.te.tcf.filesystem.internal.exceptions.TCFException;
-import org.eclipse.tm.te.tcf.filesystem.internal.handlers.CacheManager;
-import org.eclipse.tm.te.tcf.filesystem.internal.handlers.PersistenceManager;
-import org.eclipse.tm.te.tcf.filesystem.internal.handlers.StateManager;
-import org.eclipse.tm.te.tcf.filesystem.internal.nls.Messages;
-import org.eclipse.tm.te.tcf.filesystem.model.CacheState;
-import org.eclipse.tm.te.tcf.filesystem.model.FSModel;
-import org.eclipse.tm.te.tcf.filesystem.model.FSTreeNode;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IURIEditorInput;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.handlers.HandlerUtil;
-
-/**
- * The execution listener of command "SAVE", which synchronizes the local file
- * with the one on the target server after it is saved.
- */
-public class SaveListener implements IExecutionListener {
- // Dirty node that should be committed or merged.
- private FSTreeNode dirtyNode;
- // The file system fModel.
- private FSModel model;
-
- /**
- * Create a SaveListener listening to command "SAVE".
- */
- public SaveListener() {
- this.model = FSModel.getInstance();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.commands.IExecutionListener#postExecuteSuccess(java.lang.String, java.lang.Object)
- */
- @Override
- public void postExecuteSuccess(String commandId, Object returnValue) {
- if (dirtyNode != null) {
- try{
- // Refresh the fDirtyNode's state.
- StateManager.getInstance().refreshState(dirtyNode);
- if (PersistenceManager.getInstance().isAutoSaving()) {
- CacheState state = StateManager.getInstance().getCacheState(dirtyNode);
- switch (state) {
- case conflict:
- String title = Messages.SaveListener_StateChangedDialogTitle;
- String message = NLS.bind(Messages.SaveListener_StateChangedMessage, dirtyNode.name);
- IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- IWorkbenchPage page = window.getActivePage();
- Shell parent = window.getShell();
- MessageDialog msgDialog = new MessageDialog(parent, title, null, message, MessageDialog.QUESTION,
- new String[] { Messages.SaveListener_Merge, Messages.SaveListener_SaveAnyway, Messages.SaveListener_Cancel }, 0);
- int index = msgDialog.open();
- if (index == 0) {// Merge
- LocalTypedElement local = new LocalTypedElement(dirtyNode);
- RemoteTypedElement remote = new RemoteTypedElement(dirtyNode);
- MergeEditorInput mergeInput = new MergeEditorInput(local, remote, page);
- CompareUI.openCompareDialog(mergeInput);
- } else if (index == 1) {// Save anyway.
- CacheManager.getInstance().upload(dirtyNode);
- }
- break;
- case modified:
- // Save anyway
- CacheManager.getInstance().upload(dirtyNode);
- break;
- case consistent:
- break;
- case outdated:
- break;
- }
- }
- }catch(TCFException tcfe){
- Shell parent = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- MessageDialog.openError(parent, Messages.StateManager_RefreshFailureTitle, tcfe.getLocalizedMessage());
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.commands.IExecutionListener#preExecute(java.lang.String, org.eclipse.core.commands.ExecutionEvent)
- */
- @Override
- public void preExecute(String commandId, ExecutionEvent event) {
- dirtyNode = null;
- IEditorInput input = HandlerUtil.getActiveEditorInput(event);
- if (input instanceof IURIEditorInput) {
- IURIEditorInput fileInput = (IURIEditorInput) input;
- URI uri = fileInput.getURI();
- try {
- IFileStore store = EFS.getStore(uri);
- File localFile = store.toLocalFile(0, new NullProgressMonitor());
- if (localFile != null) {
- dirtyNode = model.getTreeNode(localFile.toString());
- }
- }catch(CoreException e){
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.commands.IExecutionListener#notHandled(java.lang.String, org.eclipse.core.commands.NotHandledException)
- */
- @Override
- public void notHandled(String commandId, NotHandledException exception) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.commands.IExecutionListener#postExecuteFailure(java.lang.String, org.eclipse.core.commands.ExecutionException)
- */
- @Override
- public void postExecuteFailure(String commandId, ExecutionException exception) {
- }
-}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/events/INodeStateListener.java b/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/events/INodeStateListener.java
deleted file mode 100644
index 9790e841d..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/events/INodeStateListener.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- * William Chen (Wind River)- [345552] Edit the remote files with a proper editor
- *******************************************************************************/
-package org.eclipse.tm.te.tcf.filesystem.internal.events;
-
-import org.eclipse.tm.te.tcf.filesystem.model.FSTreeNode;
-/**
- * An INodeStateListener is a listener interface. Classes that implement this
- * interface serve as a listener processing the event that a node state has changed.
- *
- */
-public interface INodeStateListener {
- /**
- * Fired when the state of the specified FSTreeNode has changed.
- *
- * @param node The FSTreeNode whose state has changed.
- */
- void stateChanged(FSTreeNode node);
-}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/explorer/FSExplorerEditorPage.java b/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/explorer/FSExplorerEditorPage.java
deleted file mode 100644
index 95125470d..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/explorer/FSExplorerEditorPage.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.te.tcf.filesystem.internal.explorer;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.tm.te.tcf.filesystem.controls.FSTreeControl;
-import org.eclipse.tm.te.tcf.filesystem.internal.help.IContextHelpIds;
-import org.eclipse.tm.te.tcf.filesystem.internal.nls.Messages;
-import org.eclipse.tm.te.ui.forms.CustomFormToolkit;
-import org.eclipse.tm.te.ui.views.editor.AbstractCustomFormToolkitEditorPage;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.forms.IManagedForm;
-import org.eclipse.ui.forms.widgets.ExpandableComposite;
-import org.eclipse.ui.forms.widgets.Section;
-import org.eclipse.ui.forms.widgets.TableWrapData;
-
-
-/**
- * File system editor page implementation.
- */
-public class FSExplorerEditorPage extends AbstractCustomFormToolkitEditorPage {
- // The references to the pages subcontrol's (needed for disposal)
- private FSTreeControl fileSystemControl;
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.forms.editor.FormPage#dispose()
- */
- @Override
- public void dispose() {
- if (fileSystemControl != null) { fileSystemControl.dispose(); fileSystemControl = null; }
- super.dispose();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.forms.editor.FormPage#createFormContent(org.eclipse.ui.forms.IManagedForm)
- */
- @Override
- protected void createFormContent(IManagedForm managedForm) {
- super.createFormContent(managedForm);
-
- // Configure the managed form
- configureManagedForm(managedForm);
-
- // Do create the content of the form now
- doCreateFormContent(managedForm.getForm().getBody(), getFormToolkit());
-
- // Re-arrange the controls
- managedForm.reflow(true);
- }
-
- /**
- * Configure the managed form to be ready for usage.
- *
- * @param managedForm The managed form. Must not be <code>null</code>.
- */
- protected void configureManagedForm(IManagedForm managedForm) {
- Assert.isNotNull(managedForm);
-
- // Configure main layout
- Composite body = managedForm.getForm().getBody();
- GridLayout layout = new GridLayout();
- layout.marginHeight = 2; layout.marginWidth = 0;
- body.setLayout(layout);
- body.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB));
-
- // Set context help id
- PlatformUI.getWorkbench().getHelpSystem().setHelp(managedForm.getForm(), IContextHelpIds.FS_EXPLORER_EDITOR_PAGE);
- }
-
- /**
- * Do create the managed form content.
- *
- * @param parent The parent composite. Must not be <code>null</code>
- * @param toolkit The {@link CustomFormToolkit} instance. Must not be <code>null</code>.
- */
- protected void doCreateFormContent(Composite parent, CustomFormToolkit toolkit) {
- Assert.isNotNull(parent);
- Assert.isNotNull(toolkit);
-
- Section section = toolkit.getFormToolkit().createSection(parent, ExpandableComposite.TITLE_BAR);
- String title = Messages.FSExplorerTreeControl_section_title;
- // Stretch to a length of 40 characters to make sure the title can be changed
- // to hold and show text up to this length
- while (title.length() < 40) {
- title += " "; //$NON-NLS-1$
- }
- // Set the title to the section
- section.setText(title);
- section.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- // Create the client area
- Composite client = toolkit.getFormToolkit().createComposite(section);
- GridLayout layout = new GridLayout();
- layout.marginWidth = 0; layout.marginHeight = 0;
- client.setLayout(layout);
- section.setClient(client);
-
- // Setup the file system tree control
- fileSystemControl = doCreateFileSystemTreeControl();
- Assert.isNotNull(fileSystemControl);
- fileSystemControl.setupFormPanel((Composite)section.getClient(), toolkit);
-
- // Set the initial input
- fileSystemControl.getViewer().setInput(getEditorInputNode());
- }
-
- /**
- * Creates and returns a file system tree control.
- *
- * @return The new file system tree control.
- */
- protected FSTreeControl doCreateFileSystemTreeControl() {
- return new FSTreeControl(this);
- }
-
- /**
- * Returns the associated file system tree control.
- *
- * @return The associated file system tree control or <code>null</code>.
- */
- protected final FSTreeControl getFileSystemTreeControl() {
- return fileSystemControl;
- }
-}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/handlers/CommitHandler.java b/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/handlers/CommitHandler.java
deleted file mode 100644
index 6ece7624c..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/handlers/CommitHandler.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- * William Chen (Wind River)- [345552] Edit the remote files with a proper editor
- *******************************************************************************/
-package org.eclipse.tm.te.tcf.filesystem.internal.handlers;
-
-import java.io.File;
-
-import org.eclipse.compare.CompareUI;
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.tm.te.tcf.filesystem.internal.compare.LocalTypedElement;
-import org.eclipse.tm.te.tcf.filesystem.internal.compare.MergeEditorInput;
-import org.eclipse.tm.te.tcf.filesystem.internal.compare.RemoteTypedElement;
-import org.eclipse.tm.te.tcf.filesystem.internal.exceptions.TCFException;
-import org.eclipse.tm.te.tcf.filesystem.internal.nls.Messages;
-import org.eclipse.tm.te.tcf.filesystem.model.CacheState;
-import org.eclipse.tm.te.tcf.filesystem.model.FSTreeNode;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.handlers.HandlerUtil;
-
-/**
- * The handler that commits the content of a modified file to the target file system.
- */
-public class CommitHandler extends AbstractHandler {
-
- /* (non-Javadoc)
- * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
- */
- @Override
- public Object execute(ExecutionEvent event) throws ExecutionException {
- IStructuredSelection selection = (IStructuredSelection) HandlerUtil.getCurrentSelectionChecked(event);
- FSTreeNode node = (FSTreeNode) selection.getFirstElement();
- try {
- // Refresh the node to get the latest state.
- StateManager.getInstance().refreshState(node);
- Shell parent = HandlerUtil.getActiveShell(event);
- File file = CacheManager.getInstance().getCacheFile(node);
- if (file.exists()) {
- CacheState state = StateManager.getInstance().getCacheState(node);
- switch (state) {
- case conflict:
- String title = Messages.CmmitHandler_StateChangedDialogTitle;
- String message = NLS.bind(Messages.CmmitHandler_StateChangedMessage, node.name);
- MessageDialog msgDialog = new MessageDialog(parent, title, null, message, MessageDialog.QUESTION, new String[] { Messages.CmmitHandler_Merge, Messages.CmmitHandler_CommitAnyway,
- Messages.CmmitHandler_Cancel }, 0);
- int index = msgDialog.open();
- if (index == 0) {// Merge
- LocalTypedElement local = new LocalTypedElement(node);
- RemoteTypedElement remote = new RemoteTypedElement(node);
- IWorkbenchPage page = HandlerUtil.getActiveSite(event).getPage();
- MergeEditorInput input = new MergeEditorInput(local, remote, page);
- CompareUI.openCompareDialog(input);
- } else if (index == 1) { // Commit anyway
- CacheManager.getInstance().upload(node);
- }
- break;
- case modified:
- // Commit it normally.
- CacheManager.getInstance().upload(node);
- break;
- case consistent:
- break;
- case outdated:
- break;
- }
- } else {
- String message = NLS.bind(Messages.CmmitHandler_FileDeleted, file.getName());
- MessageDialog.openError(parent, Messages.CmmitHandler_ErrorTitle, message);
- }
- } catch (TCFException e) {
- Shell parent = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- MessageDialog.openError(parent, Messages.StateManager_RefreshFailureTitle, e.getLocalizedMessage());
- }
- return null;
- }
-
-}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/handlers/FSTreeNodePropertyTester.java b/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/handlers/FSTreeNodePropertyTester.java
deleted file mode 100644
index 389fba2c7..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/handlers/FSTreeNodePropertyTester.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- * William Chen (Wind River) - [345387]Open the remote files with a proper editor
- * William Chen (Wind River) - [352302]Opening a file in an editor depending on
- * the client's permissions.
- *******************************************************************************/
-package org.eclipse.tm.te.tcf.filesystem.internal.handlers;
-
-import java.io.File;
-
-import org.eclipse.core.expressions.PropertyTester;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.tm.te.tcf.filesystem.model.CacheState;
-import org.eclipse.tm.te.tcf.filesystem.model.FSTreeNode;
-
-/**
- * The property tester of an FSTreeNode. The properties include "isFile"
- * if it is a file node, "isDirectory" if it is a directory, "isBinaryFile"
- * if it is a binary file, "isReadable" if it is readable, "isWritable" if
- * it is writable, "isExecutable" if it is executable and "getCacheState" to
- * get a node's state.
- */
-public class FSTreeNodePropertyTester extends PropertyTester {
-
- /* (non-Javadoc)
- * @see org.eclipse.core.expressions.IPropertyTester#test(java.lang.Object, java.lang.String, java.lang.Object[], java.lang.Object)
- */
- @Override
- public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
- Assert.isTrue(receiver instanceof FSTreeNode);
- FSTreeNode node = (FSTreeNode) receiver;
- if (property.equals("isFile")) { //$NON-NLS-1$
- return node.isFile();
- } else if (property.equals("isDirectory")) { //$NON-NLS-1$
- return node.isDirectory();
- } else if (property.equals("isBinaryFile")) { //$NON-NLS-1$
- return ContentTypeHelper.getInstance().isBinaryFile(node);
- } else if (property.equals("isReadable")){ //$NON-NLS-1$
- return node.isReadable();
- } else if (property.equals("isWritable")){ //$NON-NLS-1$
- return node.isWritable();
- } else if (property.equals("isExecutable")){ //$NON-NLS-1$
- return node.isExecutable();
- } else if (property.equals("getCacheState")){ //$NON-NLS-1$
- File file = CacheManager.getInstance().getCacheFile(node);
- if(!file.exists())
- return false;
- CacheState state = StateManager.getInstance().getCacheState(node);
- return state.name().equals(expectedValue);
- }
- return false;
- }
-}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/handlers/StateManager.java b/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/handlers/StateManager.java
deleted file mode 100644
index 779609e06..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/handlers/StateManager.java
+++ /dev/null
@@ -1,300 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- * William Chen (Wind River)- [345552] Edit the remote files with a proper editor
- *******************************************************************************/
-package org.eclipse.tm.te.tcf.filesystem.internal.handlers;
-
-import java.io.File;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IPeer;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.services.IFileSystem;
-import org.eclipse.tm.tcf.services.IFileSystem.DoneSetStat;
-import org.eclipse.tm.tcf.services.IFileSystem.DoneStat;
-import org.eclipse.tm.tcf.services.IFileSystem.FileAttrs;
-import org.eclipse.tm.tcf.services.IFileSystem.FileSystemException;
-import org.eclipse.tm.te.tcf.core.Tcf;
-import org.eclipse.tm.te.tcf.core.interfaces.IChannelManager.DoneOpenChannel;
-import org.eclipse.tm.te.tcf.filesystem.internal.exceptions.TCFChannelException;
-import org.eclipse.tm.te.tcf.filesystem.internal.exceptions.TCFException;
-import org.eclipse.tm.te.tcf.filesystem.internal.exceptions.TCFFileSystemException;
-import org.eclipse.tm.te.tcf.filesystem.internal.nls.Messages;
-import org.eclipse.tm.te.tcf.filesystem.internal.url.Rendezvous;
-import org.eclipse.tm.te.tcf.filesystem.model.CacheState;
-import org.eclipse.tm.te.tcf.filesystem.model.FSModel;
-import org.eclipse.tm.te.tcf.filesystem.model.FSTreeNode;
-
-/**
- * This class provides several utility methods to get, update, commit
- * or refresh a file node's state.
- *
- */
-public class StateManager {
-
- // The singleton instance.
- private static StateManager instance;
-
- /**
- * Get the singleton user manager.
- *
- * @return The singleton cache manager.
- */
- public static StateManager getInstance() {
- if (instance == null) {
- instance = new StateManager();
- }
- return instance;
- }
-
- /**
- * Create a StateManager fInstance.
- */
- private StateManager() {
- }
-
- /**
- * Update the state of the specified node.
- *
- * @param node The tree node whose state is going to be updated.
- * @throws TCFException
- */
- public void updateState(FSTreeNode node) throws TCFException {
- updateFileStat(node, true);
- }
-
- /**
- * Refresh the state of the specified node.
- *
- * @param node The tree node whose state is going to be refreshed.
- * @throws TCFException
- */
- public void refreshState(FSTreeNode node) throws TCFException {
- updateFileStat(node, false);
- }
-
- /**
- * Update the file's state of the specified tree node. Synchronize the time stamp of
- * the file with the base time stamp and that of the remote file if sync is true.
- *
- * @param node The tree node whose file state is going to be updated.
- * @param sync If its base time stamp and its remote file's time stamp should be synchronized.
- */
- private void updateFileStat(final FSTreeNode node, final boolean sync) throws TCFException {
- IChannel channel = null;
- try {
- channel = openChannel(node.peerNode.getPeer());
- if (channel != null) {
- IFileSystem service = channel.getRemoteService(IFileSystem.class);
- if (service != null) {
- final TCFFileSystemException[] errors = new TCFFileSystemException[1];
- final Rendezvous rendezvous = new Rendezvous();
- String path = node.getLocation(true);
- service.stat(path, new DoneStat() {
- @Override
- public void doneStat(IToken token, FileSystemException error, FileAttrs attrs) {
- if (error == null) {
- updateNodeAttr(node, attrs, sync);
- } else {
- String message = NLS.bind(Messages.StateManager_CannotGetFileStatMessage, new Object[]{node.name, error});
- errors[0] = new TCFFileSystemException(message, error);
- }
- rendezvous.arrive();
- }
- });
- try {
- rendezvous.waiting(5000L);
- } catch (InterruptedException e) {
- String message = NLS.bind(Messages.StateManager_CannotGetFileStateMessage2, new Object[]{node.name, e});
- errors[0] = new TCFFileSystemException(message, e);
- }
- if (errors[0] != null) {
- throw errors[0];
- }
- }else{
- String message = NLS.bind(Messages.StateManager_TCFNotProvideFSMessage, node.peerNode.getPeer().getID());
- throw new TCFFileSystemException(message);
- }
- }
- } finally {
- if (channel != null)
- channel.close();
- }
- }
-
- /**
- * Update the file attribute of the specified tree node with the specified value
- * and synchronize its base timestamp and its remote file's timestamp if "sync" is true.
- *
- * @param node The tree node whose file attribute is to updated.
- * @param attr The new file attribute.
- * @param sync If the timestamps should be synchronized.
- */
- void updateNodeAttr(FSTreeNode node, FileAttrs attr, boolean sync){
- node.attr = attr;
- if (sync) {
- File file = CacheManager.getInstance().getCacheFile(node);
- Assert.isTrue(file.exists());
- file.setLastModified(attr.mtime);
- PersistenceManager.getInstance().setBaseTimestamp(node.getLocationURL(), attr.mtime);
- }
- FSModel.getInstance().fireNodeStateChanged(node);
- }
-
- /**
- * Commit the content of the local file to the target.
- *
- * @param node The tree node whose local file is going to committed.
- * @throws TCFException
- */
- public void commitState(final FSTreeNode node) throws TCFException {
- File file = CacheManager.getInstance().getCacheFile(node);
- Assert.isTrue(file.exists());
- long mtime = file.lastModified();
- // Create the new file attribute based on the file's last modified time.
- IFileSystem.FileAttrs attrs = new IFileSystem.FileAttrs(node.attr.flags, node.attr.size, node.attr.uid, node.attr.gid, node.attr.permissions, node.attr.atime, mtime,
- node.attr.attributes);
- setFileAttrs(node, attrs);
- }
-
- /**
- * Set the file's attributes using the new attributes.
- *
- * @param node The file's node.
- * @param attrs The new file attributes.
- * @throws TCFException
- */
- public void setFileAttrs(final FSTreeNode node, final IFileSystem.FileAttrs attrs) throws TCFException {
- IChannel channel = null;
- try {
- channel = openChannel(node.peerNode.getPeer());
- if (channel != null) {
- IFileSystem service = channel.getRemoteService(IFileSystem.class);
- if (service != null) {
- final TCFFileSystemException[] errors = new TCFFileSystemException[1];
- final Rendezvous rendezvous = new Rendezvous();
- String path = node.getLocation(true);
- service.setstat(path, attrs, new DoneSetStat() {
- @Override
- public void doneSetStat(IToken token, FileSystemException error) {
- if (error == null) {
- commitNodeAttr(node, attrs);
- } else {
- String message = NLS.bind(Messages.StateManager_CannotSetFileStateMessage, new Object[] { node.name, error });
- errors[0] = new TCFFileSystemException(message, error);
- }
- rendezvous.arrive();
- }
- });
- try {
- rendezvous.waiting(5000L);
- } catch (InterruptedException e) {
- String message = NLS.bind(Messages.StateManager_CannotSetFileStateMessage2, new Object[] { node.name, e });
- errors[0] = new TCFFileSystemException(message, e);
- }
- if (errors[0] != null) {
- throw errors[0];
- }
- } else {
- String message = NLS.bind(Messages.StateManager_TCFNotProvideFSMessage2, node.peerNode.getPeer().getID());
- throw new TCFFileSystemException(message);
- }
- }
- } finally {
- if (channel != null)
- channel.close();
- }
- }
-
- /**
- * Open a channel connected to the target represented by the peer.
- *
- * @return The channel or null if the operation fails.
- */
- private IChannel openChannel(final IPeer peer) throws TCFChannelException {
- final Rendezvous rendezvous = new Rendezvous();
- final TCFChannelException[] errors = new TCFChannelException[1];
- final IChannel[] channels = new IChannel[1];
- Tcf.getChannelManager().openChannel(peer, new DoneOpenChannel(){
- @Override
- public void doneOpenChannel(Throwable error, IChannel channel) {
- if(error!=null){
- String message = NLS.bind(Messages.TCFUtilities_OpeningFailureMessage,
- new Object[]{peer.getID(), error.getLocalizedMessage()});
- errors[0] = new TCFChannelException(message, error);
- }else{
- channels[0] = channel;
- }
- rendezvous.arrive();
- }});
- try {
- rendezvous.waiting(5000L);
- } catch (InterruptedException e) {
- String message = NLS.bind(Messages.TCFUtilities_OpeningFailureMessage,
- new Object[]{peer.getID(), e.getLocalizedMessage()});
- errors[0] = new TCFChannelException(message, e);
- }
- if(errors[0] != null){
- throw errors[0];
- }
- return channels[0];
- }
-
- /**
- * Commit the file attribute of the specified tree node with the specified value.
- *
- * @param node The tree node whose file attribute is to committed.
- * @param attr The new file attribute.
- */
- void commitNodeAttr(FSTreeNode node, FileAttrs attr){
- node.attr = attr;
- PersistenceManager.getInstance().setBaseTimestamp(node.getLocationURL(), attr.mtime);
- FSModel.getInstance().fireNodeStateChanged(node);
- }
-
- /**
- * Get the local file's state of the specified tree node. The local file must exist
- * before calling this method to get its state.
- *
- * @param node The tree node whose local file state is going to retrieved.
- * @return The tree node's latest cache state.
- */
- public CacheState getCacheState(FSTreeNode node) {
- File file = CacheManager.getInstance().getCacheFile(node);
- if(!file.exists())
- return CacheState.consistent;
- long ltime = file.lastModified();
- long btime = PersistenceManager.getInstance().getBaseTimestamp(node.getLocationURL());
- long mtime = 0;
- if(node.attr!=null)
- mtime = node.attr.mtime;
- if(btime == ltime){
- if(isUnchanged(mtime, btime))
- return CacheState.consistent;
- return CacheState.outdated;
- }
- if(isUnchanged(mtime, btime))
- return CacheState.modified;
- return CacheState.conflict;
- }
-
- /**
- * Compare the modified time of the remote file and the base timestamp
- * and see if they are equal to each other.
- *
- * @param mtime The modified time of the remote file.
- * @param btime The base timestamp cached.
- * @return true if they are equal in second precision.
- */
- private boolean isUnchanged(long mtime, long btime){
- return Math.abs(mtime-btime)/1000 == 0;
- }
-}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/handlers/UpdateHandler.java b/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/handlers/UpdateHandler.java
deleted file mode 100644
index 56f367a19..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/internal/handlers/UpdateHandler.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- * William Chen (Wind River)- [345552] Edit the remote files with a proper editor
- *******************************************************************************/
-package org.eclipse.tm.te.tcf.filesystem.internal.handlers;
-
-import java.io.File;
-
-import org.eclipse.compare.CompareUI;
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.tm.te.tcf.filesystem.internal.compare.LocalTypedElement;
-import org.eclipse.tm.te.tcf.filesystem.internal.compare.MergeEditorInput;
-import org.eclipse.tm.te.tcf.filesystem.internal.compare.RemoteTypedElement;
-import org.eclipse.tm.te.tcf.filesystem.internal.exceptions.TCFException;
-import org.eclipse.tm.te.tcf.filesystem.internal.nls.Messages;
-import org.eclipse.tm.te.tcf.filesystem.model.CacheState;
-import org.eclipse.tm.te.tcf.filesystem.model.FSTreeNode;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.handlers.HandlerUtil;
-
-/**
- * The handler to update the local file's content with the latest of its remote file.
- *
- */
-public class UpdateHandler extends AbstractHandler {
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
- */
- @Override
- public Object execute(ExecutionEvent event) throws ExecutionException {
- IStructuredSelection selection = (IStructuredSelection) HandlerUtil.getCurrentSelectionChecked(event);
- FSTreeNode node = (FSTreeNode) selection.getFirstElement();
- try {
- StateManager.getInstance().refreshState(node);
- } catch (TCFException e) {
- Shell parent = HandlerUtil.getActiveShell(event);
- MessageDialog.openError(parent, Messages.StateManager_RefreshFailureTitle, e.getLocalizedMessage());
- return null;
- }
- Shell parent = HandlerUtil.getActiveShell(event);
- File file = CacheManager.getInstance().getCacheFile(node);
- if(file.exists()){
- CacheState state = StateManager.getInstance().getCacheState(node);
- switch (state) {
- case conflict:
- String title = Messages.UpdateHandler_StateChangedDialogTitle;
- String message = NLS.bind(Messages.UpdateHandler_StateChangedMessage, node.name);
- MessageDialog msgDialog = new MessageDialog(parent, title, null, message,
- MessageDialog.QUESTION, new String[]{Messages.UpdateHandler_Merge,
- Messages.UpdateHandler_UpdateAnyway, Messages.UpdateHandler_Cancel}, 0);
- int index = msgDialog.open();
- if (index == 0) {
- LocalTypedElement local = new LocalTypedElement(node);
- RemoteTypedElement remote = new RemoteTypedElement(node);
- IWorkbenchPage page = HandlerUtil.getActiveSite(event).getPage();
- MergeEditorInput input = new MergeEditorInput(local, remote, page);
- CompareUI.openCompareDialog(input);
- }else if(index == 1){
- CacheManager.getInstance().download(node);
- }
- break;
- case modified:
- break;
- case consistent:
- break;
- case outdated:
- CacheManager.getInstance().download(node);
- break;
- }
- }else{
- CacheManager.getInstance().download(node);
- }
- return null;
- }
-}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/model/FSModel.java b/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/model/FSModel.java
deleted file mode 100644
index b0c977f26..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.filesystem/src/org/eclipse/tm/te/tcf/filesystem/model/FSModel.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.te.tcf.filesystem.model;
-
-import java.io.File;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.PlatformObject;
-import org.eclipse.tm.te.tcf.filesystem.internal.events.INodeStateListener;
-import org.eclipse.tm.te.tcf.filesystem.internal.handlers.CacheManager;
-
-/**
- * The file system model implementation.
- * <p>
- * The file system model provides access to the file system
- * model root node per peer id.
- */
-public final class FSModel extends PlatformObject {
- // Shared instance
- private static final FSModel instance = new FSModel();
- /**
- * Get the shared instance of File System model.
- * @return The File System Model.
- */
- public static FSModel getInstance(){
- return instance;
- }
- /**
- * The file system model root node cache. The keys
- * are the peer id's.
- */
- private final Map<String, FSTreeNode> roots;
- // The table mapping the local file to the fileNodes.
- private Map<String, FSTreeNode> fileNodes;
- // The table mapping the URL to the fileNodes.
- private Map<URL, FSTreeNode> urlNodes;
- // Node state listeners.
- private List<INodeStateListener> listeners;
-
- /**
- * Create a File System Model.
- */
- private FSModel() {
- roots = Collections.synchronizedMap(new HashMap<String, FSTreeNode>());
- fileNodes = Collections.synchronizedMap(new HashMap<String, FSTreeNode>());
- urlNodes = Collections.synchronizedMap(new HashMap<URL, FSTreeNode>());
- listeners = Collections.synchronizedList(new ArrayList<INodeStateListener>());
- }
- /**
- * Returns the file system model root node for the peer identified
- * by the given peer id.
- *
- * @param peerId The peer id. Must not be <code>null</code>.
- * @return The file system model root node or <code>null</code> if not found.
- */
- public FSTreeNode getRoot(String peerId) {
- Assert.isNotNull(peerId);
- return roots.get(peerId);
- }
-
- /**
- * Stores the given file system model root node for the peer identified
- * by the given peer id. If the node is <code>null</code>, a previously
- * stored file system model root node is removed.
- *
- * @param peerId The peer id. Must not be <code>null</code>.
- * @param node The file system model root node or <code>null</code>.
- */
- public void putRoot(String peerId, FSTreeNode node) {
- Assert.isNotNull(peerId);
- if (node != null) roots.put(peerId, node);
- else roots.remove(peerId);
- }
-
- /**
- * Dispose the file system model instance.
- */
- public void dispose() {
- roots.clear();
- fileNodes.clear();
- urlNodes.clear();
- }
-
- /**
- * Called to add an FSTreeNode to the two maps, i.e., the location-node map and
- * the cache-location map.
- * @param node The FSTreeNode to be added.
- */
- public void addNode(FSTreeNode node){
- File cacheFile = CacheManager.getInstance().getCacheFile(node);
- fileNodes.put(cacheFile.getAbsolutePath(), node);
- urlNodes.put(node.getLocationURL(), node);
- }
-
- /**
- * Get the FSTreeNode given its local file's path.
- *
- * @param path The local file's path.
- * @return The FSTreeNode
- */
- public FSTreeNode getTreeNode(String path) {
- return fileNodes.get(path);
- }
-
- /**
- * Get the FSTreeNode given its URL location
- * @param location the FSTreeNode's location
- * @return the FSTreeNode
- */
- public FSTreeNode getTreeNode(URL location){
- return urlNodes.get(location);
- }
-
- /**
- * Add an INodeStateListener to the File System model if it is not
- * in the listener list yet.
- *
- * @param listener The INodeStateListener to be added.
- */
- public void addNodeStateListener(INodeStateListener listener){
- if(!listeners.contains(listener)){
- listeners.add(listener);
- }
- }
-
- /**
- * Remove the INodeStateListener from the File System model if it
- * exists in the listener list.
- *
- * @param listener The INodeStateListener to be removed.
- */
- public void removeNodeStateListener(INodeStateListener listener){
- if(listeners.contains(listener)){
- listeners.remove(listener);
- }
- }
-
- /**
- * Fire a node state changed event with the specified node.
- *
- * @param node The node whose state has changed.
- */
- public void fireNodeStateChanged(FSTreeNode node){
- synchronized(listeners){
- for(INodeStateListener listener:listeners){
- listener.stateChanged(node);
- }
- }
- }
-}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/.options b/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/.options
deleted file mode 100644
index e6d34af0a..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/.options
+++ /dev/null
@@ -1,5 +0,0 @@
-org.eclipse.tm.te.tcf.locator/debugmode = 0
-
-org.eclipse.tm.te.tcf.locator/trace/locatorModel = false
-org.eclipse.tm.te.tcf.locator/trace/locatorListener = false
-org.eclipse.tm.te.tcf.locator/trace/channelStateChangeListener = false
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/META-INF/MANIFEST.MF
deleted file mode 100644
index 75f408d10..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,30 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.tm.te.tcf.locator; singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Bundle-Activator: org.eclipse.tm.te.tcf.locator.activator.CoreBundleActivator
-Bundle-Vendor: %providerName
-Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
- org.eclipse.core.expressions;bundle-version="3.4.300",
- org.eclipse.tm.tcf.core;bundle-version="0.5.0",
- org.eclipse.tm.te.tcf.core;bundle-version="1.0.0",
- org.eclipse.tm.te.runtime;bundle-version="1.0.0",
- org.eclipse.tm.te.runtime.persistence;bundle-version="1.0.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Bundle-ActivationPolicy: lazy
-Bundle-Localization: plugin
-Export-Package: org.eclipse.tm.te.tcf.locator,
- org.eclipse.tm.te.tcf.locator.activator;x-internal:=true,
- org.eclipse.tm.te.tcf.locator.interfaces,
- org.eclipse.tm.te.tcf.locator.interfaces.nodes,
- org.eclipse.tm.te.tcf.locator.interfaces.preferences,
- org.eclipse.tm.te.tcf.locator.interfaces.services,
- org.eclipse.tm.te.tcf.locator.internal;x-internal:=true,
- org.eclipse.tm.te.tcf.locator.internal.adapters;x-internal:=true,
- org.eclipse.tm.te.tcf.locator.internal.nls;x-internal:=true,
- org.eclipse.tm.te.tcf.locator.internal.preferences;x-internal:=true,
- org.eclipse.tm.te.tcf.locator.listener,
- org.eclipse.tm.te.tcf.locator.nodes,
- org.eclipse.tm.te.tcf.locator.services,
- org.eclipse.tm.te.tcf.locator.utils
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/plugin.xml b/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/plugin.xml
deleted file mode 100644
index 37c22a942..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/plugin.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
-
-<!-- Preference contributions -->
- <extension point="org.eclipse.core.runtime.preferences">
- <initializer
- class="org.eclipse.tm.te.tcf.locator.internal.preferences.PreferencesInitializer"/>
- </extension>
-
-<!-- Eclipse core expressions property tester -->
- <extension point="org.eclipse.core.expressions.propertyTesters">
- <propertyTester
- class="org.eclipse.tm.te.tcf.locator.internal.MyPropertyTester"
- id="org.eclipse.tm.te.tcf.locator.LocatorModelPropertyTester"
- namespace="org.eclipse.tm.te.tcf.locator"
- properties="name,hasLocalService,hasRemoteService,isStaticPeer"
- type="org.eclipse.tm.te.tcf.locator.interfaces.nodes.IPeerModel">
- </propertyTester>
- </extension>
-
-<!-- Persistence delegate contributions -->
- <extension point="org.eclipse.tm.te.runtime.persistence.delegates">
- <delegate
- id="org.eclipse.tm.te.tcf.locator.persistence"
- class="org.eclipse.tm.te.tcf.locator.internal.PeersPersistenceDelegate">
- </delegate>
- </extension>
-
-<!-- Adapter factory contributions -->
- <extension point="org.eclipse.core.runtime.adapters">
- <factory
- adaptableType="java.util.Map"
- class="org.eclipse.tm.te.tcf.locator.internal.adapters.AdapterFactory">
- <adapter type="org.eclipse.tm.te.runtime.persistence.interfaces.IPersistable"/>
- </factory>
-
- <factory
- adaptableType="org.eclipse.tm.te.tcf.locator.interfaces.nodes.IPeerModel"
- class="org.eclipse.tm.te.tcf.locator.internal.adapters.AdapterFactory">
- <adapter type="org.eclipse.tm.te.runtime.persistence.interfaces.IPersistable"/>
- </factory>
- </extension>
-</plugin>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/pom.xml b/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/pom.xml
deleted file mode 100644
index da501b499..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/pom.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
- xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.eclipse.tcf</groupId>
- <artifactId>tcf-parent</artifactId>
- <version>0.5.0-SNAPSHOT</version>
- <relativePath>../../../pom.xml</relativePath>
- </parent>
-
- <version>1.0.0.qualifier</version>
- <artifactId>org.eclipse.tm.te.tcf.locator</artifactId>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/ScannerRunnable.java b/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/ScannerRunnable.java
deleted file mode 100644
index f9dea0b6e..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/ScannerRunnable.java
+++ /dev/null
@@ -1,186 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.te.tcf.locator;
-
-import java.net.SocketTimeoutException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Map;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.tm.tcf.core.ChannelTCP;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IPeer;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.tcf.services.ILocator;
-import org.eclipse.tm.te.tcf.locator.interfaces.IScanner;
-import org.eclipse.tm.te.tcf.locator.interfaces.nodes.ILocatorModel;
-import org.eclipse.tm.te.tcf.locator.interfaces.nodes.IPeerModel;
-import org.eclipse.tm.te.tcf.locator.interfaces.nodes.IPeerModelProperties;
-import org.eclipse.tm.te.tcf.locator.interfaces.services.ILocatorModelLookupService;
-import org.eclipse.tm.te.tcf.locator.interfaces.services.ILocatorModelUpdateService;
-import org.eclipse.tm.te.tcf.locator.nodes.PeerModel;
-
-
-/**
- * Scanner runnable to be executed for each peer to probe within the
- * TCF event dispatch thread.
- */
-public class ScannerRunnable implements Runnable, IChannel.IChannelListener {
- /**
- * The default socket connect timeout in milliseconds.
- */
- private static final int DEFAULT_SOCKET_CONNECT_TIMEOUT = 10000;
-
- // Reference to the parent model scanner
- private final IScanner parentScanner;
- // Reference to the peer model node to update
- private final IPeerModel peerNode;
- // Reference to the channel
- private IChannel channel = null;
-
- /**
- * Constructor.
- *
- * @param scanner The parent model scanner or <code>null</code> if the runnable is constructed from outside a scanner.
- * @param peerNode The peer model instance. Must not be <code>null</code>.
- */
- public ScannerRunnable(IScanner scanner, IPeerModel peerNode) {
- super();
-
- parentScanner = scanner;
-
- Assert.isNotNull(peerNode);
- this.peerNode = peerNode;
- }
-
- /**
- * Returns the parent scanner instance.
- *
- * @return The parent scanner instance or <code>null</code>.
- */
- protected final IScanner getParentScanner() {
- return parentScanner;
- }
-
- /* (non-Javadoc)
- * @see java.lang.Runnable#run()
- */
- @Override
- public void run() {
- if (peerNode != null && peerNode.getPeer() != null) {
- // Open the channel
- channel = peerNode.getPeer().openChannel();
- // Configure the connect timeout
- if (channel instanceof ChannelTCP) {
- int timeout = peerNode.getIntProperty(IPeerModelProperties.PROP_CONNECT_TIMEOUT);
- if (timeout == -1) timeout = DEFAULT_SOCKET_CONNECT_TIMEOUT;
- ((ChannelTCP)channel).setConnectTimeout(timeout);
- }
- // Add ourself as channel listener
- channel.addChannelListener(this);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.tcf.protocol.IChannel.IChannelListener#onChannelOpened()
- */
- @Override
- public void onChannelOpened() {
- // Peer is reachable
- if (channel != null) {
- // Remove ourself as channel listener
- channel.removeChannelListener(this);
- }
-
- // Set the peer state property
- if (peerNode != null) {
- int counter = peerNode.getIntProperty(IPeerModelProperties.PROP_CHANNEL_REF_COUNTER);
- peerNode.setProperty(IPeerModelProperties.PROP_STATE, counter > 0 ? IPeerModelProperties.STATE_CONNECTED : IPeerModelProperties.STATE_REACHABLE);
- peerNode.setProperty(IPeerModelProperties.PROP_LAST_SCANNER_ERROR, null);
- }
-
- if (channel != null && channel.getState() == IChannel.STATE_OPEN) {
- // Get the parent model from the model mode
- final ILocatorModel model = (ILocatorModel)peerNode.getAdapter(ILocatorModel.class);
- if (model != null) {
- // Get the local service
- Collection<String> localServices = new ArrayList<String>(channel.getLocalServices());
- // Get the remote services
- Collection<String> remoteServices = new ArrayList<String>(channel.getRemoteServices());
-
- // Get the update service
- ILocatorModelUpdateService updateService = model.getService(ILocatorModelUpdateService.class);
- if (updateService != null) {
- // Update the services nodes
- updateService.updatePeerServices(peerNode, localServices, remoteServices);
- }
-
- // Use the open channel to ask the remote peer what other
- // peers it knows
- ILocator locator = channel.getRemoteService(ILocator.class);
- if (locator != null) {
- final Map<String, IPeer> peers = locator.getPeers();
- if (peers != null && !peers.isEmpty()) {
- // Execute asynchronously within the TCF dispatch thread
- Protocol.invokeLater(new Runnable() {
- @Override
- public void run() {
- for (String peerId : peers.keySet()) {
- // Try to find an existing peer node first
- IPeerModel peerNode = model.getService(ILocatorModelLookupService.class).lkupPeerModelById(peerId);
- if (peerNode == null) peerNode = new PeerModel(model, peers.get(peerId));
- // Add the peer node to model
- model.getService(ILocatorModelUpdateService.class).add(peerNode);
- // And schedule for immediate status update
- Runnable runnable = new ScannerRunnable(getParentScanner(), peerNode);
- Protocol.invokeLater(runnable);
- }
- }
- });
- }
- }
- }
-
- // And close the channel
- channel.close();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.tcf.protocol.IChannel.IChannelListener#onChannelClosed(java.lang.Throwable)
- */
- @Override
- public void onChannelClosed(Throwable error) {
- // Peer is not reachable
-
- if (channel != null) {
- // Remove ourself as channel listener
- channel.removeChannelListener(this);
- }
-
- // Set the peer state property, if the scanner the runnable
- // has been scheduled from is still active.
- if (peerNode != null && (parentScanner == null || parentScanner != null && !parentScanner.isTerminated())) {
- peerNode.setProperty(IPeerModelProperties.PROP_CHANNEL_REF_COUNTER, null);
- peerNode.setProperty(IPeerModelProperties.PROP_STATE,
- error instanceof SocketTimeoutException ? IPeerModelProperties.STATE_NOT_REACHABLE : IPeerModelProperties.STATE_ERROR);
- peerNode.setProperty(IPeerModelProperties.PROP_LAST_SCANNER_ERROR, error instanceof SocketTimeoutException ? null : error);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.tcf.protocol.IChannel.IChannelListener#congestionLevel(int)
- */
- @Override
- public void congestionLevel(int level) {
- }
-
-}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/interfaces/nodes/IPeerModel.java b/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/interfaces/nodes/IPeerModel.java
deleted file mode 100644
index a4f75412b..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/interfaces/nodes/IPeerModel.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.te.tcf.locator.interfaces.nodes;
-
-import org.eclipse.tm.tcf.protocol.IPeer;
-import org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer;
-
-/**
- * The peer model is an extension to the TCF target/host representation, implementing the
- * {@link IPeer} interface. The peer model provides an offline cache for a peers known list of local
- * and remote services and is the merge point of peer attributes from custom data storages.
- * <p>
- * <b>Note:</b> The {@link #getProperty(String)} method provides access both the native peer
- * attributes and to the custom attributes. Alternatively, the native peer attributes can be access
- * via <i><code>getPeer().getAttributes()</code></i>.
- * <p>
- * <b>Note:</b> Read and write access to the peer model must happen within the TCF dispatch thread.
- */
-public interface IPeerModel extends IPropertiesContainer {
-
- /**
- * Returns the parent locator model instance.
- *
- * @return The parent locator model instance.
- */
- public ILocatorModel getModel();
-
- /**
- * Returns the native {@link IPeer} object.
- *
- * @return The native {@link IPeer} instance.
- */
- public IPeer getPeer();
-}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/internal/adapters/PeerModelPersistableAdapter.java b/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/internal/adapters/PeerModelPersistableAdapter.java
deleted file mode 100644
index e00aba0ad..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/internal/adapters/PeerModelPersistableAdapter.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.te.tcf.locator.internal.adapters;
-
-import java.io.IOException;
-import java.net.URI;
-import java.util.Map;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.te.runtime.persistence.interfaces.IPersistable;
-import org.eclipse.tm.te.tcf.locator.interfaces.nodes.IPeerModel;
-
-/**
- * Persistable implementation handling peer attributes.
- */
-public class PeerModelPersistableAdapter implements IPersistable {
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.persistence.interfaces.IPersistable#getStorageID()
- */
- @Override
- public String getStorageID() {
- return "org.eclipse.tm.te.tcf.locator.persistence"; //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.persistence.interfaces.IPersistable#getURI(java.lang.Object)
- */
- @Override
- public URI getURI(final Object data) {
- Assert.isNotNull(data);
-
- URI uri = null;
-
- // Only peer model objects are supported
- if (data instanceof IPeerModel) {
- // Get the file path the peer model has been created from
- final String[] path = new String[1];
- if (Protocol.isDispatchThread()) {
- path[0] = ((IPeerModel)data).getPeer().getAttributes().get("Path"); //$NON-NLS-1$
- } else {
- Protocol.invokeAndWait(new Runnable() {
- @Override
- public void run() {
- path[0] = ((IPeerModel)data).getPeer().getAttributes().get("Path"); //$NON-NLS-1$
- }
- });
- }
-
- if (path[0] != null && !"".equals(path[0].trim())) { //$NON-NLS-1$
- uri = new Path(path[0].trim()).toFile().toURI();
- }
- }
-
- return uri;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.persistence.interfaces.IPersistable#exportFrom(java.lang.Object)
- */
- @Override
- public Map<String, Object> exportFrom(Object data) throws IOException {
- Assert.isNotNull(data);
-
- Map<String, Object> result = null;
-
- // Only peer model objects are supported
- if (data instanceof IPeerModel) {
- }
-
- return result;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.persistence.interfaces.IPersistable#importTo(java.lang.Object, java.util.Map)
- */
- @Override
- public void importTo(Object data, Map<String, Object> external) throws IOException {
- Assert.isNotNull(data);
- Assert.isNotNull(external);
-
- // Only peer model objects are supported
- if (data instanceof IPeerModel) {
- }
- }
-
-}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/listener/ChannelStateChangeListener.java b/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/listener/ChannelStateChangeListener.java
deleted file mode 100644
index f67bd5c2f..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/listener/ChannelStateChangeListener.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.te.tcf.locator.listener;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IPeer;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.te.tcf.core.interfaces.listeners.IChannelStateChangeListener;
-import org.eclipse.tm.te.tcf.locator.activator.CoreBundleActivator;
-import org.eclipse.tm.te.tcf.locator.interfaces.ITracing;
-import org.eclipse.tm.te.tcf.locator.interfaces.nodes.ILocatorModel;
-import org.eclipse.tm.te.tcf.locator.interfaces.nodes.IPeerModel;
-import org.eclipse.tm.te.tcf.locator.interfaces.nodes.IPeerModelProperties;
-import org.eclipse.tm.te.tcf.locator.interfaces.services.ILocatorModelLookupService;
-
-
-/**
- * Channel state change listener implementation.
- */
-public class ChannelStateChangeListener implements IChannelStateChangeListener {
- // Reference to the parent model
- private final ILocatorModel model;
-
- /**
- * Constructor.
- *
- * @param model The parent locator model. Must not be <code>null</code>.
- */
- public ChannelStateChangeListener(ILocatorModel model) {
- Assert.isNotNull(model);
- this.model = model;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.tcf.core.interfaces.listeners.IChannelStateChangeListener#stateChanged(org.eclipse.tm.tcf.protocol.IChannel, int)
- */
- @Override
- public void stateChanged(IChannel channel, int state) {
- Assert.isNotNull(channel);
- Assert.isTrue(Protocol.isDispatchThread());
-
- if (CoreBundleActivator.getTraceHandler().isSlotEnabled(0, ITracing.ID_TRACE_CHANNEL_STATE_CHANGE_LISTENER)) {
- CoreBundleActivator.getTraceHandler().trace("ChannelStateChangeListener.stateChanged( " + channel + ", " + (state == IChannel.STATE_OPEN ? "OPEN" : "CLOSED") + " )", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
- ITracing.ID_TRACE_CHANNEL_STATE_CHANGE_LISTENER, this);
- }
-
- switch (state) {
- case IChannel.STATE_OPEN:
- IPeer peer = channel.getRemotePeer();
- // Find the corresponding model node
- IPeerModel node = model.getService(ILocatorModelLookupService.class).lkupPeerModelById(peer.getID());
- if (node != null) {
- // Increase the channel reference counter by 1
- int counter = node.getIntProperty(IPeerModelProperties.PROP_CHANNEL_REF_COUNTER);
- if (counter < 0) counter = 0;
- counter++;
- node.setProperty(IPeerModelProperties.PROP_CHANNEL_REF_COUNTER, counter);
- if (counter > 0) node.setProperty(IPeerModelProperties.PROP_STATE, IPeerModelProperties.STATE_CONNECTED);
- }
- break;
- case IChannel.STATE_CLOSED:
- peer = channel.getRemotePeer();
- // Find the corresponding model node
- node = model.getService(ILocatorModelLookupService.class).lkupPeerModelById(peer.getID());
- if (node != null) {
- // Decrease the channel reference counter by 1
- int counter = node.getIntProperty(IPeerModelProperties.PROP_CHANNEL_REF_COUNTER);
- counter--;
- if (counter < 0) counter = 0;
- node.setProperty(IPeerModelProperties.PROP_CHANNEL_REF_COUNTER, counter);
- if (counter == 0) node.setProperty(IPeerModelProperties.PROP_STATE, IPeerModelProperties.STATE_REACHABLE);
- }
- break;
- }
- }
-}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/listener/ModelAdapter.java b/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/listener/ModelAdapter.java
deleted file mode 100644
index 79ed8c3d8..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/listener/ModelAdapter.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.te.tcf.locator.listener;
-
-import org.eclipse.tm.te.tcf.locator.interfaces.IModelListener;
-import org.eclipse.tm.te.tcf.locator.interfaces.nodes.ILocatorModel;
-import org.eclipse.tm.te.tcf.locator.interfaces.nodes.IPeerModel;
-
-/**
- * Default model listener implementation.
- */
-public class ModelAdapter implements IModelListener {
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.locator.core.interfaces.IModelListener#locatorModelChanged(org.eclipse.tm.te.tcf.locator.core.interfaces.nodes.ILocatorModel)
- */
- @Override
- public void locatorModelChanged(ILocatorModel model) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.locator.core.interfaces.IModelListener#locatorModelDisposed(org.eclipse.tm.te.tcf.locator.core.interfaces.nodes.ILocatorModel)
- */
- @Override
- public void locatorModelDisposed(ILocatorModel model) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.locator.core.interfaces.IModelListener#peerModelChanged(org.eclipse.tm.te.tcf.locator.core.interfaces.nodes.ILocatorModel, org.eclipse.tm.te.tcf.locator.core.interfaces.nodes.IPeerModel)
- */
- @Override
- public void peerModelChanged(ILocatorModel model, IPeerModel peer) {
- }
-
-}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/nodes/PeerModel.java b/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/nodes/PeerModel.java
deleted file mode 100644
index 57d67b54a..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/nodes/PeerModel.java
+++ /dev/null
@@ -1,275 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.te.tcf.locator.nodes;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.tm.tcf.protocol.IPeer;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.te.runtime.interfaces.workingsets.IWorkingSetElement;
-import org.eclipse.tm.te.runtime.properties.PropertiesContainer;
-import org.eclipse.tm.te.tcf.locator.interfaces.IModelListener;
-import org.eclipse.tm.te.tcf.locator.interfaces.nodes.ILocatorModel;
-import org.eclipse.tm.te.tcf.locator.interfaces.nodes.IPeerModel;
-import org.eclipse.tm.te.tcf.locator.interfaces.nodes.IPeerModelProperties;
-
-
-/**
- * Default peer model implementation.
- */
-public class PeerModel extends PropertiesContainer implements IPeerModel, IWorkingSetElement {
- // Reference to the parent locator model
- private final ILocatorModel parentModel;
- // Reference to the element id (cached for performance optimization)
- private String elementId;
-
- /**
- * Constructor.
- *
- * @param parent The parent locator model. Must not be <code>null</code>.
- */
- public PeerModel(ILocatorModel parent) {
- this(parent, null);
- }
-
- /**
- * Constructor.
- *
- * @param parent The parent locator model. Must not be <code>null</code>.
- * @param peer The peer or <code>null</code>.
- */
- public PeerModel(ILocatorModel parent, IPeer peer) {
- super();
-
- Assert.isNotNull(parent);
- parentModel = parent;
-
- // Set the default properties before enabling the change events.
- // The properties changed listeners should not be called from the
- // constructor.
- setProperty(IPeerModelProperties.PROP_INSTANCE, peer);
-
- // Initialize the element id
- elementId = peer.getID();
- Assert.isNotNull(elementId);
-
- // Enable change events
- setChangeEventsEnabled(true);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.properties.PropertiesContainer#checkThreadAccess()
- */
- @Override
- protected final boolean checkThreadAccess() {
- return Protocol.isDispatchThread();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.locator.interfaces.nodes.IPeerModel#getModel()
- */
- @Override
- public ILocatorModel getModel() {
- return (ILocatorModel)getAdapter(ILocatorModel.class);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.locator.interfaces.nodes.IPeerModel#getPeer()
- */
- @Override
- public IPeer getPeer() {
- return (IPeer)getAdapter(IPeer.class);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.interfaces.workingsets.IWorkingSetElement#getElementId()
- */
- @Override
- public String getElementId() {
- return elementId;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.PlatformObject#getAdapter(java.lang.Class)
- */
- @Override
- public Object getAdapter(final Class adapter) {
- // NOTE: The getAdapter(...) method can be invoked from many place and
- // many threads where we cannot control the calls. Therefore, this
- // method is allowed be called from any thread.
- final Object[] object = new Object[1];
- if (Protocol.isDispatchThread()) {
- object[0] = doGetAdapter(adapter);
- } else {
- Protocol.invokeAndWait(new Runnable() {
- @Override
- public void run() {
- object[0] = doGetAdapter(adapter);
- }
- });
- }
- return object[0] != null ? object[0] : super.getAdapter(adapter);
- }
-
- /**
- * Returns an object which is an instance of the given class associated with this object.
- * Returns <code>null</code> if no such object can be found.
- * <p>
- * This method must be called within the TCF dispatch thread!
- *
- * @param adapter The adapter class to look up.
- * @return The adapter or <code>null</code>.
- */
- protected Object doGetAdapter(Class<?> adapter) {
- Assert.isTrue(checkThreadAccess(), "Illegal Thread Access"); //$NON-NLS-1$
-
- if (adapter.isAssignableFrom(ILocatorModel.class)) {
- return parentModel;
- }
-
- Object peer = getProperty(IPeerModelProperties.PROP_INSTANCE);
- if (peer != null && adapter.isAssignableFrom(peer.getClass())) {
- return peer;
- }
-
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.properties.PropertiesContainer#toString()
- */
- @Override
- public String toString() {
- final StringBuilder buffer = new StringBuilder(getClass().getSimpleName());
-
- if (Protocol.isDispatchThread()) {
- IPeer peer = getPeer();
- buffer.append(": id=" + peer.getID()); //$NON-NLS-1$
- buffer.append(", name=" + peer.getName()); //$NON-NLS-1$
- } else {
- Protocol.invokeAndWait(new Runnable() {
- @Override
- public void run() {
- IPeer peer = getPeer();
- buffer.append(": id=" + peer.getID()); //$NON-NLS-1$
- buffer.append(", name=" + peer.getName()); //$NON-NLS-1$
- }
- });
- }
- buffer.append(", " + super.toString()); //$NON-NLS-1$
- return buffer.toString();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.properties.PropertiesContainer#equals(java.lang.Object)
- */
- @Override
- public boolean equals(Object obj) {
- if (obj instanceof PeerModel) {
- return getElementId().equals(((PeerModel)obj).getElementId());
- }
- return super.equals(obj);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.properties.PropertiesContainer#hashCode()
- */
- @Override
- public int hashCode() {
- return getElementId().hashCode();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.properties.PropertiesContainer#getProperties()
- */
- @Override
- public Map<String, Object> getProperties() {
- Map<String, Object> properties = new HashMap<String, Object>(super.getProperties());
- if (getPeer() != null) properties.putAll(getPeer().getAttributes());
- return Collections.unmodifiableMap(new HashMap<String, Object>(properties));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.properties.PropertiesContainer#getProperty(java.lang.String)
- */
- @Override
- public Object getProperty(String key) {
- Object property = super.getProperty(key);
- if (property == null && getPeer() != null && getPeer().getAttributes().containsKey(key)) {
- property = getPeer().getAttributes().get(key);
- }
- return property;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.properties.PropertiesContainer#postSetProperties(java.util.Map)
- */
- @Override
- protected void postSetProperties(Map<String, Object> properties) {
- Assert.isTrue(checkThreadAccess(), "Illegal Thread Access"); //$NON-NLS-1$
- Assert.isNotNull(properties);
- Assert.isNotNull(getPeer());
-
- // New properties applied. Update the element id
- elementId = getPeer().getID();
- Assert.isNotNull(elementId);
-
- if (changeEventsEnabled()) {
- final IModelListener[] listeners = parentModel.getListener();
- if (listeners.length > 0) {
- Protocol.invokeLater(new Runnable() {
- @Override
- @SuppressWarnings("synthetic-access")
- public void run() {
- for (IModelListener listener : listeners) {
- listener.peerModelChanged(parentModel, PeerModel.this);
- }
- }
- });
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.runtime.properties.PropertiesContainer#postSetProperty(java.lang.String, java.lang.Object, java.lang.Object)
- */
- @Override
- public void postSetProperty(String key, Object value, Object oldValue) {
- Assert.isTrue(checkThreadAccess(), "Illegal Thread Access"); //$NON-NLS-1$
- Assert.isNotNull(key);
- Assert.isNotNull(getPeer());
-
- // If the peer instance changed, update the element id
- if (IPeerModelProperties.PROP_INSTANCE.equals(key)) {
- elementId = getPeer().getID();
- Assert.isNotNull(elementId);
- }
-
- // Notify registered listeners that the peer changed. Property
- // changes for property slots ending with ".silent" are suppressed.
- if (changeEventsEnabled() && !key.endsWith(".silent")) { //$NON-NLS-1$
- final IModelListener[] listeners = parentModel.getListener();
- if (listeners.length > 0) {
- Protocol.invokeLater(new Runnable() {
- @Override
- @SuppressWarnings("synthetic-access")
- public void run() {
- for (IModelListener listener : listeners) {
- listener.peerModelChanged(parentModel, PeerModel.this);
- }
- }
- });
- }
- }
- }
-}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/services/LocatorModelUpdateService.java b/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/services/LocatorModelUpdateService.java
deleted file mode 100644
index 7a4158859..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.locator/src/org/eclipse/tm/te/tcf/locator/services/LocatorModelUpdateService.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.te.tcf.locator.services;
-
-import java.util.Collection;
-import java.util.Map;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.te.tcf.locator.interfaces.IModelListener;
-import org.eclipse.tm.te.tcf.locator.interfaces.nodes.ILocatorModel;
-import org.eclipse.tm.te.tcf.locator.interfaces.nodes.IPeerModel;
-import org.eclipse.tm.te.tcf.locator.interfaces.nodes.IPeerModelProperties;
-import org.eclipse.tm.te.tcf.locator.interfaces.services.ILocatorModelUpdateService;
-
-
-/**
- * Default locator model update service implementation.
- */
-public class LocatorModelUpdateService extends AbstractLocatorModelService implements ILocatorModelUpdateService {
-
- /**
- * Constructor.
- *
- * @param parentModel The parent locator model instance. Must not be <code>null</code>.
- */
- public LocatorModelUpdateService(ILocatorModel parentModel) {
- super(parentModel);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.locator.core.interfaces.services.ILocatorModelUpdateService#add(org.eclipse.tm.te.tcf.locator.core.interfaces.nodes.IPeerModel)
- */
- @Override
- public void add(IPeerModel peer) {
- Assert.isNotNull(peer);
- Assert.isTrue(Protocol.isDispatchThread());
-
- Map<String, IPeerModel> peers = (Map<String, IPeerModel>)getLocatorModel().getAdapter(Map.class);
- Assert.isNotNull(peers);
- peers.put(peer.getPeer().getID(), peer);
-
- final IModelListener[] listeners = getLocatorModel().getListener();
- if (listeners.length > 0) {
- Protocol.invokeLater(new Runnable() {
- @Override
- public void run() {
- for (IModelListener listener : listeners) {
- listener.locatorModelChanged(getLocatorModel());
- }
- }
- });
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.locator.core.interfaces.services.ILocatorModelUpdateService#remove(org.eclipse.tm.te.tcf.locator.core.interfaces.nodes.IPeerModel)
- */
- @Override
- public void remove(IPeerModel peer) {
- Assert.isNotNull(peer);
- Assert.isTrue(Protocol.isDispatchThread());
-
- Map<String, IPeerModel> peers = (Map<String, IPeerModel>)getLocatorModel().getAdapter(Map.class);
- Assert.isNotNull(peers);
- peers.remove(peer.getPeer().getID());
-
- final IModelListener[] listeners = getLocatorModel().getListener();
- if (listeners.length > 0) {
- Protocol.invokeLater(new Runnable() {
- @Override
- public void run() {
- for (IModelListener listener : listeners) {
- listener.locatorModelChanged(getLocatorModel());
- }
- }
- });
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.locator.core.interfaces.services.ILocatorModelUpdateService#updatePeerServices(org.eclipse.tm.te.tcf.locator.core.interfaces.nodes.IPeerModel, java.util.Collection, java.util.Collection)
- */
- @Override
- public void updatePeerServices(IPeerModel peerNode, Collection<String> localServices, Collection<String> remoteServices) {
- Assert.isNotNull(peerNode);
- Assert.isTrue(Protocol.isDispatchThread());
-
- peerNode.setProperty(IPeerModelProperties.PROP_LOCAL_SERVICES, localServices != null ? makeString(localServices) : null);
- peerNode.setProperty(IPeerModelProperties.PROP_REMOTE_SERVICES, remoteServices != null ? makeString(remoteServices) : null);
- }
-
- /**
- * Transform the given collection into a plain string.
- *
- * @param collection The collection. Must not be <code>null</code>.
- * @return The plain string.
- */
- protected String makeString(Collection<String> collection) {
- Assert.isNotNull(collection);
-
- String buffer = collection.toString();
- buffer = buffer.replaceAll("\\[", "").replaceAll("\\]", ""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-
- return buffer.trim();
- }
-}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.log.core/.options b/target_explorer/plugins/org.eclipse.tm.te.tcf.log.core/.options
deleted file mode 100644
index 8f2cc251b..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.log.core/.options
+++ /dev/null
@@ -1,3 +0,0 @@
-org.eclipse.tm.te.tcf.log.core/debugmode = 0
-
-org.eclipse.tm.te.tcf.log.core/trace/channelTraceListener = false
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.log.core/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tm.te.tcf.log.core/META-INF/MANIFEST.MF
deleted file mode 100644
index 19527f4cc..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.log.core/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,19 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.tm.te.tcf.log.core;singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Bundle-Activator: org.eclipse.tm.te.tcf.log.core.activator.CoreBundleActivator
-Bundle-Vendor: %providerName
-Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
- org.eclipse.tm.te.runtime;bundle-version="1.0.0",
- org.eclipse.tm.tcf.core;bundle-version="0.5.0",
- org.eclipse.tm.te.tcf.core;bundle-version="1.0.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Bundle-ActivationPolicy: lazy
-Bundle-Localization: plugin
-Export-Package: org.eclipse.tm.te.tcf.log.core.activator;x-internal:=true,
- org.eclipse.tm.te.tcf.log.core.interfaces,
- org.eclipse.tm.te.tcf.log.core.internal;x-internal:=true,
- org.eclipse.tm.te.tcf.log.core.internal.listener;x-internal:=true,
- org.eclipse.tm.te.tcf.log.core.internal.nls;x-internal:=true
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.log.core/pom.xml b/target_explorer/plugins/org.eclipse.tm.te.tcf.log.core/pom.xml
deleted file mode 100644
index 388cff6f8..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.log.core/pom.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
- xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.eclipse.tcf</groupId>
- <artifactId>tcf-parent</artifactId>
- <version>0.5.0-SNAPSHOT</version>
- <relativePath>../../../pom.xml</relativePath>
- </parent>
-
- <version>1.0.0.qualifier</version>
- <artifactId>org.eclipse.tm.te.tcf.log.core</artifactId>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.log.core/src/org/eclipse/tm/te/tcf/log/core/internal/PreferencesInitializer.java b/target_explorer/plugins/org.eclipse.tm.te.tcf.log.core/src/org/eclipse/tm/te/tcf/log/core/internal/PreferencesInitializer.java
deleted file mode 100644
index 694445bcf..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.log.core/src/org/eclipse/tm/te/tcf/log/core/internal/PreferencesInitializer.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.te.tcf.log.core.internal;
-
-import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
-import org.eclipse.core.runtime.preferences.DefaultScope;
-import org.eclipse.core.runtime.preferences.IEclipsePreferences;
-import org.eclipse.tm.te.tcf.log.core.activator.CoreBundleActivator;
-import org.eclipse.tm.te.tcf.log.core.interfaces.IPreferenceKeys;
-
-
-/**
- * TCF logging bundle preference initializer.
- */
-public class PreferencesInitializer extends AbstractPreferenceInitializer {
-
- /**
- * Constructor.
- */
- public PreferencesInitializer() {
- super();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
- */
- @Override
- public void initializeDefaultPreferences() {
- // Get the bundles preferences manager
- IEclipsePreferences prefs = DefaultScope.INSTANCE.getNode(CoreBundleActivator.getUniqueIdentifier());
- if (prefs != null) {
- // [Hidden] Enable back-end communication logging: default on
- prefs.putBoolean(IPreferenceKeys.PREF_LOGGING_ENABLED, true);
- // [Hidden] Heat beat events: default off
- prefs.putBoolean(IPreferenceKeys.PREF_SHOW_HEARTBEATS, false);
- // [Hidden] Maximum log file size in bytes: default 5M
- prefs.put(IPreferenceKeys.PREF_MAX_FILE_SIZE, "5M"); //$NON-NLS-1$
- // [Hidden] Maximum number of log files in cycle: default 5
- prefs.putInt(IPreferenceKeys.PREF_MAX_FILES_IN_CYCLE, 5);
- }
- }
-}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.core/.options b/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.core/.options
deleted file mode 100644
index f5eafb71d..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.core/.options
+++ /dev/null
@@ -1,4 +0,0 @@
-org.eclipse.tm.te.tcf.processes.core/debugmode = 0
-org.eclipse.tm.te.tcf.processes.core/trace/processLauncher = false
-org.eclipse.tm.te.tcf.processes.core/trace/processesListener = false
-org.eclipse.tm.te.tcf.processes.core/trace/streamsListener = false
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.core/.project b/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.core/.project
deleted file mode 100644
index 731d6b9d6..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.core/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.tm.te.tcf.processes.core</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/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.core/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.core/META-INF/MANIFEST.MF
deleted file mode 100644
index 8268dfbbc..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.core/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,21 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.tm.te.tcf.processes.core
-Bundle-Version: 1.0.0.qualifier
-Bundle-Activator: org.eclipse.tm.te.tcf.processes.core.activator.CoreBundleActivator
-Bundle-Vendor: %providerName
-Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
- org.eclipse.tm.te.runtime;bundle-version="1.0.0",
- org.eclipse.tm.te.runtime.services;bundle-version="1.0.0",
- org.eclipse.tm.te.core;bundle-version="1.0.0",
- org.eclipse.tm.tcf.core;bundle-version="0.5.0",
- org.eclipse.tm.te.tcf.core;bundle-version="1.0.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Bundle-ActivationPolicy: lazy
-Bundle-Localization: plugin
-Export-Package: org.eclipse.tm.te.tcf.processes.core.activator;x-internal:=true,
- org.eclipse.tm.te.tcf.processes.core.interfaces.launcher,
- org.eclipse.tm.te.tcf.processes.core.internal.tracing;x-internal:=true,
- org.eclipse.tm.te.tcf.processes.core.launcher,
- org.eclipse.tm.te.tcf.processes.core.nls
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.core/pom.xml b/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.core/pom.xml
deleted file mode 100644
index 396c5ca5d..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.core/pom.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
- xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.eclipse.tcf</groupId>
- <artifactId>tcf-parent</artifactId>
- <version>0.5.0-SNAPSHOT</version>
- <relativePath>../../../pom.xml</relativePath>
- </parent>
-
- <version>1.0.0.qualifier</version>
- <artifactId>org.eclipse.tm.te.tcf.processes.core</artifactId>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/.options b/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/.options
deleted file mode 100644
index ec788c055..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/.options
+++ /dev/null
@@ -1 +0,0 @@
-org.eclipse.tm.te.tcf.processes.ui/debugmode = 0
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/.project b/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/.project
deleted file mode 100644
index 0a1e054f4..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.tm.te.tcf.processes.ui</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/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/META-INF/MANIFEST.MF
deleted file mode 100644
index ced5e6f39..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,27 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.tm.te.tcf.processes.ui;singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Bundle-Activator: org.eclipse.tm.te.tcf.processes.ui.activator.UIPlugin
-Bundle-Vendor: %providerName
-Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
- org.eclipse.ui;bundle-version="3.7.0",
- org.eclipse.ui.forms;bundle-version="3.5.100",
- org.eclipse.tm.tcf.core;bundle-version="0.5.0",
- org.eclipse.tm.te.runtime;bundle-version="1.0.0",
- org.eclipse.tm.te.runtime.statushandler;bundle-version="1.0.0",
- org.eclipse.tm.te.runtime.services;bundle-version="1.0.0",
- org.eclipse.tm.te.core;bundle-version="1.0.0",
- org.eclipse.tm.te.ui.forms;bundle-version="1.0.0",
- org.eclipse.tm.te.ui;bundle-version="1.0.0",
- org.eclipse.tm.te.ui.swt;bundle-version="1.0.0",
- org.eclipse.tm.te.ui.views;bundle-version="1.0.0",
- org.eclipse.tm.te.tcf.core;bundle-version="1.0.0",
- org.eclipse.tm.te.tcf.locator;bundle-version="1.0.0",
- org.eclipse.tm.te.tcf.filesystem;bundle-version="1.0.0",
- org.eclipse.tm.te.tcf.processes.core;bundle-version="1.0.0",
- org.eclipse.tm.te.tcf.ui;bundle-version="1.0.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Bundle-ActivationPolicy: lazy
-Bundle-Localization: plugin
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/plugin.xml b/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/plugin.xml
deleted file mode 100644
index 74d603eed..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/plugin.xml
+++ /dev/null
@@ -1,79 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
-
-<!-- Target Explorer Details Editor page contributions -->
- <extension point="org.eclipse.tm.te.ui.views.editorPages">
- <editorPage
- class="org.eclipse.tm.te.tcf.processes.ui.internal.explorer.ProcessExplorerEditorPage"
- name="%ProcessExplorerEditorPage.name"
- id="org.eclipse.tm.te.tcf.processes.ui.ProcessExplorerEditorPage">
- </editorPage>
- </extension>
-
-<!-- Target Explorer Details Editor page binding contributions -->
- <extension point="org.eclipse.tm.te.ui.views.editorPageBindings">
- <editorPageBinding
- id="org.eclipse.tm.te.tcf.processes.ui.binding.ProcessExplorerEditorPage"
- pageId="org.eclipse.tm.te.tcf.processes.ui.ProcessExplorerEditorPage">
- <enablement>
- <with variable="activeEditorInput">
- <and>
- <adapt type="org.eclipse.tm.te.tcf.locator.interfaces.nodes.IPeerModel">
- <test property="org.eclipse.tm.te.tcf.locator.hasRemoteService" value="Processes"/>
- </adapt>
- </and>
- </with>
- </enablement>
- </editorPageBinding>
- </extension>
-
-<!-- Processes menu contributions -->
- <extension point="org.eclipse.ui.menus">
- <menuContribution locationURI="popup:org.eclipse.tm.te.ui.views.TargetExplorer#Popup?after=group.launch">
- <command
- commandId="org.eclipse.tm.te.tcf.processes.ui.command.launch"
- helpContextId="org.eclipse.tm.te.tcf.processes.ui.command_Launch"
- icon="platform:/plugin/org.eclipse.debug.ui/icons/full/obj16/lrun_obj.gif"
- id="org.eclipse.tm.te.tcf.processes.ui.commands.launch"
- label="%Processes.command.launch.label"
- style="push"
- tooltip="%Processes.command.launch.tooltip">
- <visibleWhen checkEnabled="false">
- <and>
- <with variable="selection">
- <count value="1"/>
- <iterate operator="and" ifEmpty="false">
- <adapt type="org.eclipse.tm.te.tcf.locator.interfaces.nodes.IPeerModel">
- <test
- property="org.eclipse.tm.te.tcf.locator.hasRemoteService"
- value="Processes">
- </test>
- </adapt>
- </iterate>
- </with>
- </and>
- </visibleWhen>
- </command>
- </menuContribution>
- </extension>
-
-<!-- Processes command contributions -->
- <extension point="org.eclipse.ui.commands">
- <command
- categoryId="org.eclipse.tm.te.tcf.ui.commands.category"
- helpContextId="org.eclipse.tm.te.tcf.processes.ui.command_Launch"
- id="org.eclipse.tm.te.tcf.processes.ui.command.launch"
- name="%Processes.command.launch.name">
- </command>
- </extension>
-
-<!-- Processes handler contributions -->
- <extension point="org.eclipse.ui.handlers">
- <handler
- class="org.eclipse.tm.te.tcf.processes.ui.internal.handler.LaunchProcessesCommandHandler"
- commandId="org.eclipse.tm.te.tcf.processes.ui.command.launch">
- </handler>
- </extension>
-
-</plugin>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/pom.xml b/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/pom.xml
deleted file mode 100644
index 324ea586f..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/pom.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
- xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.eclipse.tcf</groupId>
- <artifactId>tcf-parent</artifactId>
- <version>0.5.0-SNAPSHOT</version>
- <relativePath>../../../pom.xml</relativePath>
- </parent>
-
- <version>1.0.0.qualifier</version>
- <artifactId>org.eclipse.tm.te.tcf.processes.ui</artifactId>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/src/org/eclipse/tm/te/tcf/processes/ui/controls/ProcessesTreeContentProvider.java b/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/src/org/eclipse/tm/te/tcf/processes/ui/controls/ProcessesTreeContentProvider.java
deleted file mode 100644
index 27b8ecaca..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/src/org/eclipse/tm/te/tcf/processes/ui/controls/ProcessesTreeContentProvider.java
+++ /dev/null
@@ -1,371 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.te.tcf.processes.ui.controls;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.StructuredViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.tm.tcf.protocol.IChannel;
-import org.eclipse.tm.tcf.protocol.IPeer;
-import org.eclipse.tm.tcf.protocol.IToken;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.tcf.services.ISysMonitor;
-import org.eclipse.tm.te.tcf.core.Tcf;
-import org.eclipse.tm.te.tcf.core.interfaces.IChannelManager;
-import org.eclipse.tm.te.tcf.locator.interfaces.nodes.IPeerModel;
-import org.eclipse.tm.te.tcf.locator.interfaces.nodes.IPeerModelProperties;
-import org.eclipse.tm.te.ui.nls.Messages;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Processes tree control content provider implementation.
- */
-public class ProcessesTreeContentProvider implements ITreeContentProvider {
- /**
- * Static reference to the return value representing no elements.
- */
- protected final static Object[] NO_ELEMENTS = new Object[0];
-
- /* default */ IPeerModel peerNode = null;
- private ProcessesTreeNode rootNode = null;
-
- private IChannel channel = null;
- private ISysMonitor service = null;
-
- /* default */ Viewer viewer = null;
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
- */
- @Override
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- this.viewer = viewer;
- if (oldInput != null && newInput == null) {
- closeOpenChannel();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IContentProvider#dispose()
- */
- @Override
- public void dispose() {
- closeOpenChannel();
- }
-
- /**
- * Close the open communication channel and set back the node references.
- */
- protected void closeOpenChannel() {
- if (channel != null) {
- final IChannel finChannel = channel;
- if (Protocol.isDispatchThread()) {
- finChannel.close();
- } else {
- Protocol.invokeAndWait(new Runnable() {
- @Override
- public void run() {
- finChannel.close();
- }
- });
- }
- channel = null;
- service = null;
- }
-
- peerNode = null;
- rootNode = null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ITreeContentProvider#getElements(java.lang.Object)
- */
- @Override
- public Object[] getElements(Object inputElement) {
- return getChildren(inputElement);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object)
- */
- @Override
- public Object getParent(Object element) {
- if (element instanceof ProcessesTreeNode) {
- return ((ProcessesTreeNode)element).parent;
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object)
- */
- @Override
- public Object[] getChildren(Object parentElement) {
- Assert.isNotNull(parentElement);
-
- Object[] children = NO_ELEMENTS;
-
- // For the file system, we need the peer node
- if (parentElement instanceof IPeerModel) {
- // Is it the same peer node we have seen before?
- if (peerNode == null || peerNode != null && !peerNode.equals(parentElement)) {
- // Remember the peer node
- peerNode = (IPeerModel)parentElement;
-
- // If we still have a channel open, for now, we just close the old channel
- if (channel != null) {
- final IChannel finChannel = channel;
- if (Protocol.isDispatchThread()) {
- finChannel.close();
- } else {
- Protocol.invokeAndWait(new Runnable() {
- @Override
- public void run() {
- finChannel.close();
- }
- });
- }
- channel = null;
- }
-
- IPeer peer = peerNode.getPeer();
- final int[] state = new int[1];
- Protocol.invokeAndWait(new Runnable() {
- @Override
- public void run() {
- state[0] = peerNode.getIntProperty(IPeerModelProperties.PROP_STATE);
- }
- });
- if (peer != null && IPeerModelProperties.STATE_ERROR != state[0] && IPeerModelProperties.STATE_NOT_REACHABLE != state[0]) {
- ProcessesTreeNode pendingNode = new ProcessesTreeNode();
- pendingNode.name = Messages.PendingOperation_label;
- pendingNode.type ="ProcPendingNode"; //$NON-NLS-1$
-
- children = new Object[] { pendingNode };
-
- Tcf.getChannelManager().openChannel(peer, new IChannelManager.DoneOpenChannel() {
- @Override
- @SuppressWarnings("synthetic-access")
- public void doneOpenChannel(Throwable error, IChannel channel) {
- Assert.isTrue(Protocol.isDispatchThread());
-
- if (channel != null) {
- ProcessesTreeContentProvider.this.channel = channel;
-
- service = channel.getRemoteService(ISysMonitor.class);
- if (service != null) {
- rootNode = new ProcessesTreeNode();
- rootNode.type = "ProcRootNode"; //$NON-NLS-1$
- rootNode.childrenQueried = false;
- rootNode.childrenQueryRunning = true;
-
- Protocol.invokeLater(new Runnable() {
- @Override
- public void run() {
- service.getChildren(null, new ISysMonitor.DoneGetChildren() {
- /* (non-Javadoc)
- * @see org.eclipse.tm.tcf.services.ISysMonitor.DoneGetChildren#doneGetChildren(org.eclipse.tm.tcf.protocol.IToken, java.lang.Exception, java.lang.String[])
- */
- @Override
- public void doneGetChildren(IToken token, Exception error, String[] context_ids) {
- if (rootNode != null) {
- if (error == null && context_ids != null && context_ids.length > 0) {
- for (String contextId : context_ids) {
- service.getContext(contextId, new ISysMonitor.DoneGetContext() {
- /* (non-Javadoc)
- * @see org.eclipse.tm.tcf.services.ISysMonitor.DoneGetContext#doneGetContext(org.eclipse.tm.tcf.protocol.IToken, java.lang.Exception, org.eclipse.tm.tcf.services.ISysMonitor.SysMonitorContext)
- */
- @Override
- public void doneGetContext(IToken token, Exception error, ISysMonitor.SysMonitorContext context) {
- if (error == null && context != null) {
- ProcessesTreeNode node = createNodeFromSysMonitorContext(context);
- if (node != null) {
- node.parent = rootNode;
- rootNode.children.add(node);
- }
- }
- }
- });
- }
- }
-
- Protocol.invokeLater(new Runnable() {
- @Override
- public void run() {
- // Reset the children query marker
- rootNode.childrenQueryRunning = false;
- rootNode.childrenQueried = true;
-
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- @Override
- public void run() {
- if (viewer != null) viewer.refresh();
- }
- });
- }
- });
- }
- }
- });
- }
- });
- } else {
- // TCF file system service is not available, close the just opened channel
- closeOpenChannel();
- }
- }
- }
- });
- } else {
- dispose();
- }
- } else if (rootNode != null && rootNode.childrenQueried) {
- children = rootNode.children.toArray();
- }
- } else if (parentElement instanceof ProcessesTreeNode) {
- ProcessesTreeNode node = (ProcessesTreeNode)parentElement;
- // Get possible children
- children = node.children.toArray();
- // No children -> check for "childrenQueried" property. If false, trigger the query.
- if (children.length == 0 && !node.childrenQueried) {
- ProcessesTreeNode pendingNode = new ProcessesTreeNode();
- pendingNode.name = Messages.PendingOperation_label;
- pendingNode.type ="ProcPendingNode"; //$NON-NLS-1$
-
- children = new Object[] { pendingNode };
- doGetChildrenForProcessContext(node);
- }
- }
-
- return children;
- }
-
- /**
- * Query the children of the given process context.
- *
- * @param node The process context node. Must be not <code>null</code>.
- */
- protected void doGetChildrenForProcessContext(ProcessesTreeNode node) {
- Assert.isNotNull(node);
-
- if (!node.childrenQueryRunning) {
- final ProcessesTreeNode parentNode = node;
-
- final String parentId = node.id;
- if (parentId != null && service != null) {
- parentNode.childrenQueryRunning = true;
-
- Protocol.invokeLater(new Runnable() {
- @Override
- @SuppressWarnings("synthetic-access")
- public void run() {
- service.getChildren(parentId, new ISysMonitor.DoneGetChildren() {
- /* (non-Javadoc)
- * @see org.eclipse.tm.tcf.services.IProcesses.DoneGetChildren#doneGetChildren(org.eclipse.tm.tcf.protocol.IToken, java.lang.Exception, java.lang.String[])
- */
- @Override
- public void doneGetChildren(IToken token, Exception error, String[] context_ids) {
- if (error == null && context_ids != null && context_ids.length > 0) {
- for (String contextId : context_ids) {
- service.getContext(contextId, new ISysMonitor.DoneGetContext() {
- /* (non-Javadoc)
- * @see org.eclipse.tm.tcf.services.ISysMonitor.DoneGetContext#doneGetContext(org.eclipse.tm.tcf.protocol.IToken, java.lang.Exception, org.eclipse.tm.tcf.services.ISysMonitor.SysMonitorContext)
- */
- @Override
- public void doneGetContext(IToken token, Exception error, ISysMonitor.SysMonitorContext context) {
- if (error == null && context != null) {
- ProcessesTreeNode node = createNodeFromSysMonitorContext(context);
- if (node != null) {
- node.parent = parentNode;
- parentNode.children.add(node);
- }
- }
- }
- });
- }
- }
-
- Protocol.invokeLater(new Runnable() {
- @Override
- public void run() {
- // Reset the children query marker
- parentNode.childrenQueryRunning = false;
- parentNode.childrenQueried = true;
-
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- @Override
- public void run() {
- if (viewer instanceof StructuredViewer) ((StructuredViewer)viewer).refresh(parentNode);
- }
- });
- }
- });
- }
- });
- }
- });
- }
- }
-
- }
-
- /**
- * Creates a node from the given system monitor context.
- *
- * @param context The system monitor context. Must be not <code>null</code>.
- *
- * @return The node.
- */
- protected ProcessesTreeNode createNodeFromSysMonitorContext(ISysMonitor.SysMonitorContext context) {
- Assert.isTrue(Protocol.isDispatchThread());
- Assert.isNotNull(context);
-
- ProcessesTreeNode node = new ProcessesTreeNode();
-
- node.childrenQueried = false;
- node.childrenQueryRunning = false;
- node.context = context;
- node.name = context.getFile();
- node.type = "ProcNode"; //$NON-NLS-1$
- node.id = context.getID();
- node.pid = context.getPID();
- node.ppid = context.getPPID();
- node.parentId = context.getParentID();
- node.state = context.getState();
- node.username = context.getUserName();
-
- doGetChildrenForProcessContext(node);
-
- return node;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object)
- */
- @Override
- public boolean hasChildren(Object element) {
- Assert.isNotNull(element);
-
- boolean hasChildren = false;
-
- // No children yet and the element is a process node
- if (element instanceof ProcessesTreeNode) {
- ProcessesTreeNode node = (ProcessesTreeNode)element;
- if (!node.childrenQueried || node.childrenQueryRunning) {
- hasChildren = true;
- } else if (node.childrenQueried) {
- hasChildren = node.children.size() > 0;
- }
- }
-
- return hasChildren;
- }
-}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/src/org/eclipse/tm/te/tcf/processes/ui/controls/ProcessesTreeControl.java b/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/src/org/eclipse/tm/te/tcf/processes/ui/controls/ProcessesTreeControl.java
deleted file mode 100644
index cbb5be607..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/src/org/eclipse/tm/te/tcf/processes/ui/controls/ProcessesTreeControl.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.te.tcf.processes.ui.controls;
-
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.ViewerComparator;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.swt.widgets.TreeColumn;
-import org.eclipse.tm.te.tcf.processes.ui.nls.Messages;
-import org.eclipse.tm.te.ui.interfaces.IUIConstants;
-import org.eclipse.tm.te.ui.trees.AbstractTreeControl;
-import org.eclipse.tm.te.ui.trees.TreeViewerComparator;
-import org.eclipse.ui.IWorkbenchPart;
-
-/**
- * Processes tree control.
- */
-public class ProcessesTreeControl extends AbstractTreeControl {
-
- /**
- * Constructor.
- */
- public ProcessesTreeControl() {
- super();
- }
-
- /**
- * Constructor.
- *
- * @param parentPart The parent workbench part this control is embedded in or <code>null</code>.
- */
- public ProcessesTreeControl(IWorkbenchPart parentPart) {
- super(parentPart);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.trees.AbstractTreeControl#configureTreeViewer(org.eclipse.jface.viewers.TreeViewer)
- */
- @Override
- protected void configureTreeViewer(TreeViewer viewer) {
- super.configureTreeViewer(viewer);
-
- Tree tree = viewer.getTree();
- if (hasColumns()) {
- TreeColumn column = new TreeColumn(tree, SWT.LEFT);
- column.setText(Messages.ProcessesTreeControl_column_name_label);
- column.setWidth(250);
-
- column = new TreeColumn(tree, SWT.RIGHT);
- column.setText(Messages.ProcessesTreeControl_column_pid_label);
- column.setWidth(50);
-
- column = new TreeColumn(tree, SWT.RIGHT);
- column.setText(Messages.ProcessesTreeControl_column_ppid_label);
- column.setWidth(50);
-
- column = new TreeColumn(tree, SWT.RIGHT);
- column.setText(Messages.ProcessesTreeControl_column_state_label);
- column.setWidth(50);
-
- column = new TreeColumn(tree, SWT.RIGHT);
- column.setText(Messages.ProcessesTreeControl_column_user_label);
- column.setWidth(100);
- }
- tree.setHeaderVisible(hasColumns());
- }
-
- /**
- * Returns if or if not to show the tree columns.
- *
- * @return <code>True</code> to show the tree columns, <code>false</code> otherwise.
- */
- protected boolean hasColumns() {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.trees.AbstractTreeControl#doCreateTreeViewerContentProvider(org.eclipse.jface.viewers.TreeViewer)
- */
- @Override
- protected ITreeContentProvider doCreateTreeViewerContentProvider(TreeViewer viewer) {
- return new ProcessesTreeContentProvider();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.trees.AbstractTreeControl#doCreateTreeViewerLabelProvider(org.eclipse.jface.viewers.TreeViewer)
- */
- @Override
- protected ILabelProvider doCreateTreeViewerLabelProvider(TreeViewer viewer) {
- return new ProcessesTreeLabelProvider();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.trees.AbstractTreeControl#doCreateTreeViewerSelectionChangedListener(org.eclipse.jface.viewers.TreeViewer)
- */
- @Override
- protected ISelectionChangedListener doCreateTreeViewerSelectionChangedListener(TreeViewer viewer) {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.trees.AbstractTreeControl#doCreateTreeViewerComparator(org.eclipse.jface.viewers.TreeViewer)
- */
- @Override
- protected ViewerComparator doCreateTreeViewerComparator(TreeViewer viewer) {
- return new TreeViewerComparator(viewer, (ILabelProvider) viewer.getLabelProvider());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.trees.AbstractTreeControl#getAutoExpandLevel()
- */
- @Override
- protected int getAutoExpandLevel() {
- return 0;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.trees.AbstractTreeControl#getContextMenuId()
- */
- @Override
- protected String getContextMenuId() {
- return IUIConstants.ID_CONTROL_MENUS_BASE + ".menu.processes"; //$NON-NLS-1$;
- }
-
-}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/src/org/eclipse/tm/te/tcf/processes/ui/controls/ProcessesTreeLabelProvider.java b/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/src/org/eclipse/tm/te/tcf/processes/ui/controls/ProcessesTreeLabelProvider.java
deleted file mode 100644
index a14be8438..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/src/org/eclipse/tm/te/tcf/processes/ui/controls/ProcessesTreeLabelProvider.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.te.tcf.processes.ui.controls;
-
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.tm.te.tcf.processes.ui.activator.UIPlugin;
-import org.eclipse.tm.te.tcf.processes.ui.interfaces.ImageConsts;
-
-/**
- * Processes tree control label provider implementation.
- */
-public class ProcessesTreeLabelProvider extends LabelProvider implements ITableLabelProvider {
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.LabelProvider#getText(java.lang.Object)
- */
- @Override
- public String getText(Object element) {
- if (element instanceof ProcessesTreeNode) {
- return ((ProcessesTreeNode) element).name;
- }
- return super.getText(element);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.LabelProvider#getImage(java.lang.Object)
- */
- @Override
- public Image getImage(Object element) {
- if (element instanceof ProcessesTreeNode) {
- return UIPlugin.getImage(ImageConsts.OBJ_Process);
- }
-
- return super.getImage(element);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnImage(java.lang.Object, int)
- */
- @Override
- public Image getColumnImage(Object element, int columnIndex) {
- if (columnIndex == 0) return getImage(element);
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnText(java.lang.Object, int)
- */
- @Override
- public String getColumnText(Object element, int columnIndex) {
- if (columnIndex == 0) return getText(element);
-
- if (element instanceof ProcessesTreeNode) {
- ProcessesTreeNode node = (ProcessesTreeNode) element;
-
- // Pending nodes does not have column texts at all
- if (node.type.endsWith("PendingNode")) return ""; //$NON-NLS-1$ //$NON-NLS-2$
-
- switch (columnIndex) {
- case 1:
- String id = Long.toString(node.pid);
- if (id == null) id = node.id;
- if (id != null) return id.startsWith("P") ? id.substring(1) : id; //$NON-NLS-1$
- break;
- case 2:
- String ppid = Long.toString(node.ppid);
- if (ppid != null) return ppid;
- break;
- case 3:
- String state = node.state;
- if (state != null) return state;
- break;
- case 4:
- String username = node.username;
- if (username != null) return username;
- break;
- }
- }
-
- return ""; //$NON-NLS-1$
- }
-
-}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/src/org/eclipse/tm/te/tcf/processes/ui/dialogs/ProcessSelectionDialog.java b/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/src/org/eclipse/tm/te/tcf/processes/ui/dialogs/ProcessSelectionDialog.java
deleted file mode 100644
index 15d7bcff4..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/src/org/eclipse/tm/te/tcf/processes/ui/dialogs/ProcessSelectionDialog.java
+++ /dev/null
@@ -1,201 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.te.tcf.processes.ui.dialogs;
-
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.swt.SWT;
-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.Shell;
-import org.eclipse.tm.te.tcf.processes.ui.controls.ProcessesTreeControl;
-import org.eclipse.tm.te.tcf.processes.ui.nls.Messages;
-import org.eclipse.tm.te.ui.forms.CustomFormToolkit;
-import org.eclipse.tm.te.ui.jface.dialogs.CustomTrayDialog;
-import org.eclipse.ui.forms.editor.FormPage;
-import org.eclipse.ui.forms.editor.IFormPage;
-import org.eclipse.ui.forms.widgets.FormToolkit;
-
-/**
- * Process selection dialog.
- */
-public class ProcessSelectionDialog extends CustomTrayDialog {
- // Reference to the subcontrol
- private final ProcessesTreeControl control;
- // Reference to the current selection within the file system tree
- private ISelection selection;
-
- protected class ProcessSelectionTreeControl extends ProcessesTreeControl {
-
- /**
- * Constructor.
- */
- public ProcessSelectionTreeControl() {
- super();
- }
-
- /**
- * Constructor.
- *
- * @param parentPage The parent form page this control is embedded in or <code>null</code>
- * if the control is not embedded within a form page.
- */
- public ProcessSelectionTreeControl(FormPage parentPage) {
- super(parentPage);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.processes.ui.controls.ProcessesTreeControl#hasColumns()
- */
- @Override
- protected boolean hasColumns() {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.processes.ui.controls.ProcessesTreeControl#doCreateTreeViewerSelectionChangedListener(org.eclipse.jface.viewers.TreeViewer)
- */
- @Override
- protected ISelectionChangedListener doCreateTreeViewerSelectionChangedListener(TreeViewer viewer) {
- return new ProcessSelectionTreeControlSelectionChangedListener();
- }
- }
-
- protected class ProcessSelectionTreeControlSelectionChangedListener implements ISelectionChangedListener {
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
- */
- @Override
- @SuppressWarnings("synthetic-access")
- public void selectionChanged(SelectionChangedEvent event) {
- selection = event.getSelection();
- updateButtons();
- }
- }
-
- /**
- * Constructor.
- *
- * @param shell The parent shell or <code>null</code>.
- */
- public ProcessSelectionDialog(Shell shell) {
- this(shell, null);
- }
-
- /**
- * Constructor.
- *
- * @param shell The parent shell or <code>null</code>.
- * @param contextHelpId The dialog context help id or <code>null</code>.
- */
- public ProcessSelectionDialog(Shell shell, String contextHelpId) {
- this(null, shell, contextHelpId);
- }
-
- /**
- * Constructor.
- *
- * @param parentPage The parent form page this control is embedded in or <code>null</code> if
- * the control is not embedded within a form page.
- * @param shell The parent shell or <code>null</code>.
- * @param contextHelpId The dialog context help id or <code>null</code>.
- */
- public ProcessSelectionDialog(FormPage parentPage, Shell shell, String contextHelpId) {
- super(shell, contextHelpId);
-
- control = new ProcessSelectionTreeControl(parentPage);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#isResizable()
- */
- @Override
- protected boolean isResizable() {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.jface.dialogs.CustomTrayDialog#createDialogArea(org.eclipse.swt.widgets.Composite)
- */
- @Override
- protected Control createDialogArea(Composite parent) {
- Composite composite = (Composite) super.createDialogArea(parent);
-
- setDialogTitle(Messages.ProcessSelectionDialog_title);
-
- Composite panel = new Composite(composite, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.marginWidth = 0;
- layout.marginHeight = 0;
- panel.setLayout(layout);
- GridData layoutData = new GridData(SWT.FILL, SWT.FILL, true, true);
- layoutData.heightHint = convertHeightInCharsToPixels(25);
- layoutData.widthHint = convertWidthInCharsToPixels(50);
- panel.setLayoutData(layoutData);
-
- CustomFormToolkit toolkit = null;
- if (control.getParentPart() instanceof IFormPage && ((IFormPage) control.getParentPart()).getManagedForm() != null) {
- toolkit = new CustomFormToolkit(((IFormPage) control.getParentPart()).getManagedForm().getToolkit());
- }
- if (toolkit == null) toolkit = new CustomFormToolkit(new FormToolkit(getShell().getDisplay()));
-
- control.setupFormPanel(panel, toolkit);
-
- return composite;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.tm.te.ui.jface.dialogs.CustomTrayDialog#close()
- */
- @Override
- public boolean close() {
- if (control != null) {
- control.dispose();
- }
-
- return super.close();
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.dialogs.TrayDialog#createButtonBar(org.eclipse.swt.widgets.Composite)
- */
- @Override
- protected Control createButtonBar(Composite parent) {
- Control control = super.createButtonBar(parent);
- updateButtons();
- return control;
- }
-
- /**
- * Update the button enablement.
- */
- protected void updateButtons() {
- Button okButton = getButton(IDialogConstants.OK_ID);
- if (okButton != null) okButton.setEnabled(selection != null && !selection.isEmpty());
- }
-
- /**
- * Returns the current file system control selection.
- *
- * @return
- */
- public ISelection getSelection() {
- return selection;
- }
-}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/src/org/eclipse/tm/te/tcf/processes/ui/nls/Messages.java b/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/src/org/eclipse/tm/te/tcf/processes/ui/nls/Messages.java
deleted file mode 100644
index 596bcd5f2..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/src/org/eclipse/tm/te/tcf/processes/ui/nls/Messages.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.te.tcf.processes.ui.nls;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Target Explorer TCF processes extensions UI plug-in externalized strings management.
- */
-public class Messages extends NLS {
-
- // The plug-in resource bundle name
- private static final String BUNDLE_NAME = "org.eclipse.tm.te.tcf.processes.ui.nls.Messages"; //$NON-NLS-1$
-
- /**
- * Static constructor.
- */
- static {
- // Load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- // **** Declare externalized string id's down here *****
-
- public static String ProcessExplorerTreeControl_section_title;
-
- public static String ProcessesTreeControl_column_name_label;
- public static String ProcessesTreeControl_column_pid_label;
- public static String ProcessesTreeControl_column_ppid_label;
- public static String ProcessesTreeControl_column_state_label;
- public static String ProcessesTreeControl_column_user_label;
-
- public static String ProcessSelectionDialog_title;
-
- public static String LaunchObjectDialog_title;
- public static String LaunchObjectDialog_image_label;
- public static String LaunchObjectDialog_arguments_label;
- public static String LaunchObjectDialog_group_label;
- public static String LaunchObjectDialog_lineseparator_label;
- public static String LaunchObjectDialog_lineseparator_default;
- public static String LaunchObjectDialog_lineseparator_lf;
- public static String LaunchObjectDialog_lineseparator_crlf;
- public static String LaunchObjectDialog_lineseparator_cr;
-
- public static String LaunchProcessesCommandHandler_error_title;
-
- public static String AbstractChannelCommandHandler_statusDialog_title;
-}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/src/org/eclipse/tm/te/tcf/processes/ui/nls/Messages.properties b/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/src/org/eclipse/tm/te/tcf/processes/ui/nls/Messages.properties
deleted file mode 100644
index 0560729ee..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.processes.ui/src/org/eclipse/tm/te/tcf/processes/ui/nls/Messages.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# org.eclipse.tm.te.tcf.processes.ui
-# Externalized Strings.
-#
-
-ProcessExplorerTreeControl_section_title=Exploring Processes
-
-ProcessesTreeControl_column_name_label=Name
-ProcessesTreeControl_column_pid_label=PID
-ProcessesTreeControl_column_ppid_label=PPID
-ProcessesTreeControl_column_state_label=State
-ProcessesTreeControl_column_user_label=User
-
-ProcessSelectionDialog_title=Select Process to Attach
-
-LaunchObjectDialog_title=Launch Process
-LaunchObjectDialog_image_label=Process Image:
-LaunchObjectDialog_arguments_label=Process Arguments:
-LaunchObjectDialog_group_label=Process Line Separator Settings
-LaunchObjectDialog_lineseparator_label=Please specify the line separator used by the launched process.
-LaunchObjectDialog_lineseparator_default=Default
-LaunchObjectDialog_lineseparator_lf=LF
-LaunchObjectDialog_lineseparator_crlf=CRLF
-LaunchObjectDialog_lineseparator_cr=CR
-
-AbstractChannelCommandHandler_statusDialog_title=Error
-
-LaunchProcessesCommandHandler_error_title=Process Launch Failed
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.core/.options b/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.core/.options
deleted file mode 100644
index 4ea2c76ae..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.core/.options
+++ /dev/null
@@ -1,4 +0,0 @@
-org.eclipse.tm.te.tcf.terminals.core/debugmode = 0
-org.eclipse.tm.te.tcf.terminals.core/trace/terminalsLauncher = false
-org.eclipse.tm.te.tcf.terminals.core/trace/terminalsListener = false
-org.eclipse.tm.te.tcf.processes.core/trace/streamsListener = false
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.core/.project b/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.core/.project
deleted file mode 100644
index 9ab4d9dcd..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.core/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.tm.te.tcf.terminals.core</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/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.core/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.core/META-INF/MANIFEST.MF
deleted file mode 100644
index 473afb70d..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.core/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,21 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.tm.te.tcf.terminals.core;singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Bundle-Activator: org.eclipse.tm.te.tcf.terminals.core.activator.CoreBundleActivator
-Bundle-Vendor: %providerName
-Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
- org.eclipse.tm.te.runtime;bundle-version="1.0.0",
- org.eclipse.tm.te.runtime.services;bundle-version="1.0.0",
- org.eclipse.tm.te.core;bundle-version="1.0.0",
- org.eclipse.tm.tcf.core;bundle-version="0.5.0",
- org.eclipse.tm.te.tcf.core;bundle-version="1.0.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Bundle-ActivationPolicy: lazy
-Bundle-Localization: plugin
-Export-Package: org.eclipse.tm.te.tcf.terminals.core.activator;x-internal:=true,
- org.eclipse.tm.te.tcf.terminals.core.interfaces.launcher,
- org.eclipse.tm.te.tcf.terminals.core.internal.tracing;x-internal:=true,
- org.eclipse.tm.te.tcf.terminals.core.launcher,
- org.eclipse.tm.te.tcf.terminals.core.nls;x-internal:=true
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.core/pom.xml b/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.core/pom.xml
deleted file mode 100644
index bb3e51459..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.core/pom.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
- xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.eclipse.tcf</groupId>
- <artifactId>tcf-parent</artifactId>
- <version>0.5.0-SNAPSHOT</version>
- <relativePath>../../../pom.xml</relativePath>
- </parent>
-
- <version>1.0.0.qualifier</version>
- <artifactId>org.eclipse.tm.te.tcf.terminals.core</artifactId>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.core/src/org/eclipse/tm/te/tcf/terminals/core/activator/CoreBundleActivator.java b/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.core/src/org/eclipse/tm/te/tcf/terminals/core/activator/CoreBundleActivator.java
deleted file mode 100644
index fd9d3c849..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.core/src/org/eclipse/tm/te/tcf/terminals/core/activator/CoreBundleActivator.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.te.tcf.terminals.core.activator;
-
-import org.eclipse.tm.te.runtime.tracing.TraceHandler;
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class CoreBundleActivator implements BundleActivator {
- // The bundle context
- private static BundleContext context;
- // The trace handler instance
- private static TraceHandler traceHandler;
-
- /**
- * Returns the bundle context
- *
- * @return the bundle context
- */
- public static BundleContext getContext() {
- return context;
- }
-
- /**
- * Convenience method which returns the unique identifier of this plugin.
- */
- public static String getUniqueIdentifier() {
- if (getContext() != null && getContext().getBundle() != null) {
- return getContext().getBundle().getSymbolicName();
- }
- return null;
- }
-
- /**
- * Returns the bundles trace handler.
- *
- * @return The bundles trace handler.
- */
- public static TraceHandler getTraceHandler() {
- if (traceHandler == null) {
- traceHandler = new TraceHandler(getUniqueIdentifier());
- }
- return traceHandler;
- }
-
- /* (non-Javadoc)
- * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
- */
- @Override
- public void start(BundleContext bundleContext) throws Exception {
- CoreBundleActivator.context = bundleContext;
- }
-
- /* (non-Javadoc)
- * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
- */
- @Override
- public void stop(BundleContext bundleContext) throws Exception {
- CoreBundleActivator.context = null;
- }
-}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.ui/.options b/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.ui/.options
deleted file mode 100644
index 66e04a666..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.ui/.options
+++ /dev/null
@@ -1 +0,0 @@
-org.eclipse.tm.te.tcf.terminals.ui/debugmode = 0
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.ui/.project b/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.ui/.project
deleted file mode 100644
index a9c77f56d..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.ui/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.tm.te.tcf.terminals.ui</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/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.ui/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.ui/META-INF/MANIFEST.MF
deleted file mode 100644
index 47da02d37..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.ui/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,23 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.tm.te.tcf.terminals.ui;singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Bundle-Activator: org.eclipse.tm.te.tcf.terminals.ui.activator.UIPlugin
-Bundle-Vendor: %providerName
-Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
- org.eclipse.core.expressions;bundle-version="3.4.300",
- org.eclipse.ui;bundle-version="3.7.0",
- org.eclipse.ui.forms;bundle-version="3.5.100",
- org.eclipse.tm.te.runtime;bundle-version="1.0.0",
- org.eclipse.tm.te.runtime.services;bundle-version="1.0.0",
- org.eclipse.tm.tcf.core;bundle-version="0.5.0",
- org.eclipse.tm.te.tcf.locator;bundle-version="1.0.0",
- org.eclipse.tm.te.tcf.terminals.core;bundle-version="1.0.0",
- org.eclipse.tm.te.ui;bundle-version="1.0.0",
- org.eclipse.tm.te.ui.terminals;bundle-version="1.0.0",
- org.eclipse.tm.te.ui.controls;bundle-version="1.0.0",
- org.eclipse.tm.terminal;bundle-version="3.1.1"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Bundle-ActivationPolicy: lazy
-Bundle-Localization: plugin
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.ui/pom.xml b/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.ui/pom.xml
deleted file mode 100644
index 94028481e..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.ui/pom.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
- xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.eclipse.tcf</groupId>
- <artifactId>tcf-parent</artifactId>
- <version>0.5.0-SNAPSHOT</version>
- <relativePath>../../../pom.xml</relativePath>
- </parent>
-
- <version>1.0.0.qualifier</version>
- <artifactId>org.eclipse.tm.te.tcf.terminals.ui</artifactId>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.ui/src/org/eclipse/tm/te/tcf/terminals/ui/nls/Messages.properties b/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.ui/src/org/eclipse/tm/te/tcf/terminals/ui/nls/Messages.properties
deleted file mode 100644
index 234bbc751..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.ui/src/org/eclipse/tm/te/tcf/terminals/ui/nls/Messages.properties
+++ /dev/null
@@ -1,4 +0,0 @@
-#
-# org.eclipse.tm.te.tcf.terminals.ui
-# Externalized Strings.
-#
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/META-INF/MANIFEST.MF
deleted file mode 100644
index 80d40eb63..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,41 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.tm.te.tcf.ui;singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Bundle-Activator: org.eclipse.tm.te.tcf.ui.activator.UIPlugin
-Bundle-Vendor: %providerName
-Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
- org.eclipse.ui;bundle-version="3.7.0",
- org.eclipse.ui.forms;bundle-version="3.5.100",
- org.eclipse.ui.navigator;bundle-version="3.5.100",
- org.eclipse.tm.tcf.core;bundle-version="0.5.0",
- org.eclipse.tm.te.ui;bundle-version="1.0.0",
- org.eclipse.tm.te.ui.controls;bundle-version="1.0.0",
- org.eclipse.tm.te.ui.forms;bundle-version="1.0.0",
- org.eclipse.tm.te.ui.swt;bundle-version="1.0.0",
- org.eclipse.tm.te.ui.views;bundle-version="1.0.0",
- org.eclipse.tm.te.runtime;bundle-version="1.0.0",
- org.eclipse.tm.te.runtime.persistence;bundle-version="1.0.0",
- org.eclipse.tm.te.runtime.services;bundle-version="1.0.0",
- org.eclipse.tm.te.runtime.statushandler;bundle-version="1.0.0",
- org.eclipse.tm.te.tcf.core;bundle-version="1.0.0",
- org.eclipse.tm.te.tcf.locator;bundle-version="1.0.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Bundle-ActivationPolicy: lazy
-Bundle-Localization: plugin
-Export-Package: org.eclipse.tm.te.tcf.ui.activator;x-internal:=true,
- org.eclipse.tm.te.tcf.ui.dialogs,
- org.eclipse.tm.te.tcf.ui.internal;x-internal:=true,
- org.eclipse.tm.te.tcf.ui.internal.editor.pages;x-internal:=true,
- org.eclipse.tm.te.tcf.ui.internal.filter;x-internal:=true,
- org.eclipse.tm.te.tcf.ui.internal.handler;x-internal:=true,
- org.eclipse.tm.te.tcf.ui.internal.help;x-internal:=true,
- org.eclipse.tm.te.tcf.ui.internal.navigator;x-internal:=true,
- org.eclipse.tm.te.tcf.ui.internal.navigator.images;x-internal:=true,
- org.eclipse.tm.te.tcf.ui.model,
- org.eclipse.tm.te.tcf.ui.nls;x-internal:=true,
- org.eclipse.tm.te.tcf.ui.tables,
- org.eclipse.tm.te.tcf.ui.wizards;x-internal:=true,
- org.eclipse.tm.te.tcf.ui.wizards.controls,
- org.eclipse.tm.te.tcf.ui.wizards.pages;x-internal:=true
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/plugin.xml b/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/plugin.xml
deleted file mode 100644
index f76c57a7b..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/plugin.xml
+++ /dev/null
@@ -1,194 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
-
-<!-- Common navigator contributions -->
- <extension point="org.eclipse.ui.navigator.viewer">
- <viewerContentBinding viewerId="org.eclipse.tm.te.ui.views.TargetExplorer">
- <includes>
- <contentExtension
- isRoot="true"
- pattern="org.eclipse.tm.te.tcf.ui.navigator.*"/>
- </includes>
- </viewerContentBinding>
- </extension>
-
- <extension point="org.eclipse.ui.navigator.navigatorContent">
- <navigatorContent
- activeByDefault="true"
- contentProvider="org.eclipse.tm.te.tcf.ui.internal.navigator.ContentProviderDelegate"
- icon="icons/obj16/rootNode_obj.gif"
- id="org.eclipse.tm.te.tcf.ui.navigator.content"
- labelProvider="org.eclipse.tm.te.tcf.ui.internal.navigator.LabelProvider"
- name="Dynamic Target Discovery (TCF)"
- priority="normal">
- <enablement>
- <instanceof value="org.eclipse.tm.te.tcf.locator.interfaces.nodes.IPeerModel"/>
- </enablement>
- <commonSorter
- class="org.eclipse.tm.te.ui.trees.TreeViewerSorter"
- id="org.eclipse.tm.te.tcf.ui.navigator.sorter"/>
- <commonWizard
- type="new"
- wizardId="org.eclipse.tm.te.tcf.ui.wizards.NewTargetWizard">
- <enablement>
- <instanceof value="org.eclipse.tm.te.tcf.locator.interfaces.nodes.IPeerModel"/>
- </enablement>
- </commonWizard>
- </navigatorContent>
- <commonFilter
- activeByDefault="false"
- class="org.eclipse.tm.te.tcf.ui.internal.filter.UnreachablePeersFilter"
- id="org.eclipse.tm.te.tcf.ui.navigator.UnreachablePeersFilter"
- name="%UnreachablePeersFilter.name"
- visibleInUI="true">
- </commonFilter>
- </extension>
-
-<!-- New target wizard contributions -->
-
- <extension point="org.eclipse.tm.te.ui.newWizards">
- <category
- id="org.eclipse.tm.te.tcf.ui.newWizards.category"
- name="%NewWizards.category.name">
- </category>
- <wizard
- category="org.eclipse.tm.te.tcf.ui.newWizards.category"
- class="org.eclipse.tm.te.tcf.ui.wizards.NewTargetWizard"
- icon="icons/elcl16/newTarget_wiz.gif"
- id="org.eclipse.tm.te.tcf.ui.wizards.NewTargetWizard"
- name="%NewTargetWizard.name">
- <description>
- %NewTargetWizard.description
- </description>
- </wizard>
- </extension>
-
-<!-- Target Explorer Details Editor page contributions -->
- <extension point="org.eclipse.tm.te.ui.views.editorPages">
- <editorPage
- class="org.eclipse.tm.te.tcf.ui.internal.editor.pages.NodePropertiesEditorPage"
- name="%NodePropertiesEditorPage.name"
- id="org.eclipse.tm.te.tcf.ui.NodePropertiesEditorPage">
- </editorPage>
- </extension>
-
-<!-- Target Explorer Details Editor page binding contributions -->
- <extension point="org.eclipse.tm.te.ui.views.editorPageBindings">
- <editorPageBinding
- id="org.eclipse.tm.te.tcf.ui.binding.NodePropertiesEditorPage"
- pageId="org.eclipse.tm.te.tcf.ui.NodePropertiesEditorPage"
- insertBefore="first">
- <enablement>
- <with variable="activeEditorInput">
- <instanceof value="org.eclipse.tm.te.tcf.locator.interfaces.nodes.IPeerModel"/>
- </with>
- </enablement>
- </editorPageBinding>
- </extension>
-
-<!-- Target Explorer menu contributions -->
- <extension point="org.eclipse.ui.menus">
- <menuContribution locationURI="popup:org.eclipse.tm.te.ui.views.TargetExplorer#Popup?after=group.refresh">
- <command
- commandId="org.eclipse.tm.te.tcf.ui.command.refresh"
- disabledIcon="platform:/plugin/org.eclipse.ui/icons/full/dlcl16/refresh_nav.gif"
- helpContextId="org.eclipse.tm.te.tcf.ui.command_Refresh"
- icon="platform:/plugin/org.eclipse.ui/icons/full/elcl16/refresh_nav.gif"
- id="org.eclipse.tm.te.tcf.ui.commands.refresh"
- label="%command.refresh.label"
- style="push"
- tooltip="%command.refresh.tooltip">
- <visibleWhen checkEnabled="false">
- <with variable="selection">
- <count value="+"/>
- <iterate operator="and" ifEmpty="false">
- <instanceof value="org.eclipse.tm.te.tcf.locator.interfaces.nodes.IPeerModel"/>
- </iterate>
- </with>
- </visibleWhen>
- </command>
- <separator name="operationsGroupMarker" visible="true"/>
- </menuContribution>
-
- <menuContribution locationURI="popup:org.eclipse.tm.te.ui.views.TargetExplorer#Popup?after=group.delete">
- <command
- commandId="org.eclipse.ui.edit.delete"
- disabledIcon="platform:/plugin/org.eclipse.ui/icons/full/dtool16/delete.gif"
- helpContextId="org.eclipse.tm.te.tcf.ui.command_Delete"
- icon="platform:/plugin/org.eclipse.ui/icons/full/etool16/delete.gif"
- id="org.eclipse.tm.te.tcf.ui.commands.delete"
- label="%command.delete.label"
- style="push"
- tooltip="%command.delete.tooltip">
- <visibleWhen checkEnabled="false">
- <with variable="selection">
- <count value="+"/>
- <iterate operator="and" ifEmpty="false">
- <and>
- <instanceof value="org.eclipse.tm.te.tcf.locator.interfaces.nodes.IPeerModel"/>
- <test property="org.eclipse.tm.te.tcf.locator.isStaticPeer" value="true"/>
- </and>
- </iterate>
- </with>
- </visibleWhen>
- </command>
- </menuContribution>
- </extension>
-
-<!-- Target Explorer command contributions -->
- <extension point="org.eclipse.ui.commands">
- <category
- id="org.eclipse.tm.te.tcf.ui.commands.category"
- name="%command.category.name">
- </category>
- <command
- categoryId="org.eclipse.tm.te.tcf.ui.commands.category"
- helpContextId="org.eclipse.tm.te.tcf.ui.command_Refresh"
- id="org.eclipse.tm.te.tcf.ui.command.refresh"
- name="%command.refresh.name">
- </command>
- </extension>
-
-<!-- Target Explorer handler contributions -->
- <extension point="org.eclipse.ui.handlers">
- <handler
- class="org.eclipse.tm.te.tcf.ui.internal.handler.RefreshCommandHandler"
- commandId="org.eclipse.tm.te.tcf.ui.command.refresh">
- <activeWhen>
- <reference definitionId="te.expressions.tcf.peerModel.handlerActivation"/>
- </activeWhen>
- </handler>
-
- <handler
- class="org.eclipse.tm.te.tcf.ui.internal.handler.DeleteCommandHandler"
- commandId="org.eclipse.ui.edit.delete">
- <activeWhen>
- <reference definitionId="te.expressions.tcf.peerModel.handlerActivation"/>
- </activeWhen>
- </handler>
- </extension>
-
-<!-- Reusable core expression fragments -->
- <extension point="org.eclipse.core.expressions.definitions">
-
- <!-- Expression to test if the active part is the Target Explorer and
- the selection contains only elements of type IPeerModel.
-
- This expression is for use in the handlers activeWhen markup.
- -->
- <definition id="te.expressions.tcf.peerModel.handlerActivation">
- <and>
- <with variable="activePartId">
- <equals value="org.eclipse.tm.te.ui.views.TargetExplorer"/>
- </with>
- <with variable="selection">
- <count value="+"/>
- <iterate operator="and" ifEmpty="false">
- <instanceof value="org.eclipse.tm.te.tcf.locator.interfaces.nodes.IPeerModel"/>
- </iterate>
- </with>
- </and>
- </definition>
- </extension>
-</plugin>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/internal/editor/pages/NodePropertiesEditorPage.java b/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/internal/editor/pages/NodePropertiesEditorPage.java
deleted file mode 100644
index dd94c81fa..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/internal/editor/pages/NodePropertiesEditorPage.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.te.tcf.ui.internal.editor.pages;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.ViewerComparator;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.tm.te.tcf.ui.internal.help.IContextHelpIds;
-import org.eclipse.tm.te.tcf.ui.tables.NodePropertiesContentProvider;
-import org.eclipse.tm.te.tcf.ui.tables.NodePropertiesLabelProvider;
-import org.eclipse.tm.te.tcf.ui.tables.NodePropertiesViewerComparator;
-import org.eclipse.tm.te.ui.forms.CustomFormToolkit;
-import org.eclipse.tm.te.ui.nls.Messages;
-import org.eclipse.tm.te.ui.tables.properties.NodePropertiesTableControl;
-import org.eclipse.tm.te.ui.views.editor.AbstractCustomFormToolkitEditorPage;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.forms.IManagedForm;
-import org.eclipse.ui.forms.widgets.ExpandableComposite;
-import org.eclipse.ui.forms.widgets.Section;
-import org.eclipse.ui.forms.widgets.TableWrapData;
-
-
-/**
- * TCF node properties details editor page implementation.
- */
-public class NodePropertiesEditorPage extends AbstractCustomFormToolkitEditorPage {
- // The references to the pages subcontrol's (needed for disposal)
- private NodePropertiesTableControl nodePropertiesTableControl;
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.forms.editor.FormPage#dispose()
- */
- @Override
- public void dispose() {
- if (nodePropertiesTableControl != null) { nodePropertiesTableControl.dispose(); nodePropertiesTableControl = null; }
- super.dispose();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.forms.editor.FormPage#createFormContent(org.eclipse.ui.forms.IManagedForm)
- */
- @Override
- protected void createFormContent(IManagedForm managedForm) {
- super.createFormContent(managedForm);
-
- // Configure the managed form
- configureManagedForm(managedForm);
-
- // Do create the content of the form now
- doCreateFormContent(managedForm.getForm().getBody(), getFormToolkit());
-
- // Re-arrange the controls
- managedForm.reflow(true);
- }
-
- /**
- * Configure the managed form to be ready for usage.
- *
- * @param managedForm The managed form. Must not be <code>null</code>.
- */
- protected void configureManagedForm(IManagedForm managedForm) {
- Assert.isNotNull(managedForm);
-
- // Configure main layout
- Composite body = managedForm.getForm().getBody();
- GridLayout layout = new GridLayout();
- layout.marginHeight = 2; layout.marginWidth = 0;
- body.setLayout(layout);
- body.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB));
-
- // Set context help id
- PlatformUI.getWorkbench().getHelpSystem().setHelp(managedForm.getForm(), IContextHelpIds.NODE_PROPERTIES_EDITOR_PAGE);
- }
-
- /**
- * Do create the managed form content.
- *
- * @param parent The parent composite. Must not be <code>null</code>
- * @param toolkit The {@link CustomFormToolkit} instance. Must not be <code>null</code>.
- */
- protected void doCreateFormContent(Composite parent, CustomFormToolkit toolkit) {
- Assert.isNotNull(parent);
- Assert.isNotNull(toolkit);
-
- Section section = toolkit.getFormToolkit().createSection(parent, ExpandableComposite.TITLE_BAR);
- String title = NLS.bind(Messages.NodePropertiesTableControl_section_title, Messages.NodePropertiesTableControl_section_title_noSelection);
- // Stretch to a length of 40 characters to make sure the title can be changed
- // to hold and show text up to this length
- while (title.length() < 40) {
- title += " "; //$NON-NLS-1$
- }
- // Set the title to the section
- section.setText(title);
- section.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- // Create the client area
- Composite client = toolkit.getFormToolkit().createComposite(section);
- GridLayout layout = new GridLayout();
- layout.marginWidth = 0; layout.marginHeight = 0;
- client.setLayout(layout);
- section.setClient(client);
-
- // Setup the node properties table control
- nodePropertiesTableControl = doCreateNodePropertiesTableControl();
- Assert.isNotNull(nodePropertiesTableControl);
- nodePropertiesTableControl.setupFormPanel((Composite)section.getClient(), toolkit);
-
- // Set the initial input
- nodePropertiesTableControl.getViewer().setInput(getEditorInputNode());
- }
-
- /**
- * Creates and returns a new node properties table control.
- *
- * @return The new node properties table control.
- */
- protected NodePropertiesTableControl doCreateNodePropertiesTableControl() {
- return new NodePropertiesTableControl(this) {
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.vtl.ui.datasource.controls.tables.NodePropertiesTableControl#doCreateTableViewerContentProvider(org.eclipse.jface.viewers.TableViewer)
- */
- @Override
- protected IStructuredContentProvider doCreateTableViewerContentProvider(TableViewer viewer) {
- return new NodePropertiesContentProvider(true);
- }
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.vtl.ui.datasource.controls.tables.properties.NodePropertiesTableControl#doCreateTableViewerLabelProvider(org.eclipse.jface.viewers.TableViewer)
- */
- @Override
- protected ITableLabelProvider doCreateTableViewerLabelProvider(TableViewer viewer) {
- return new NodePropertiesLabelProvider(viewer);
- }
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.vtl.ui.datasource.controls.tables.NodePropertiesTableControl#doCreateTableViewerComparator(org.eclipse.jface.viewers.TableViewer)
- */
- @Override
- protected ViewerComparator doCreateTableViewerComparator(TableViewer viewer) {
- return new NodePropertiesViewerComparator(viewer, (ITableLabelProvider)viewer.getLabelProvider());
- }
- };
- }
-
- /**
- * Returns the associated node properties table control.
- *
- * @return The associated node properties table control or <code>null</code>.
- */
- protected final NodePropertiesTableControl getNodePropertiesTableControl() {
- return nodePropertiesTableControl;
- }
-}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/internal/navigator/ModelListener.java b/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/internal/navigator/ModelListener.java
deleted file mode 100644
index b42cf2c5a..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/internal/navigator/ModelListener.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.te.tcf.ui.internal.navigator;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.tm.te.tcf.locator.interfaces.nodes.ILocatorModel;
-import org.eclipse.tm.te.tcf.locator.interfaces.nodes.IPeerModel;
-import org.eclipse.tm.te.tcf.locator.listener.ModelAdapter;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.navigator.CommonViewer;
-
-
-/**
- * TCF locator model listener implementation.
- */
-public class ModelListener extends ModelAdapter {
- private final ILocatorModel parentModel;
- /* default */ final CommonViewer viewer;
-
- /**
- * Constructor.
- *
- * @param parent The parent locator model. Must not be <code>null</code>.
- * @param viewer The common viewer instance. Must not be <code>null</code>.
- */
- public ModelListener(ILocatorModel parent, CommonViewer viewer) {
- Assert.isNotNull(parent);
- Assert.isNotNull(viewer);
-
- this.parentModel = parent;
- this.viewer = viewer;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.locator.core.listener.ModelAdapter#locatorModelChanged(org.eclipse.tm.te.tcf.locator.core.interfaces.nodes.ILocatorModel)
- */
- @Override
- public void locatorModelChanged(final ILocatorModel model) {
- if (parentModel.equals(model)) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- @Override
- public void run() {
- viewer.refresh();
- }
- });
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.locator.core.listener.ModelAdapter#peerModelChanged(org.eclipse.tm.te.tcf.locator.core.interfaces.nodes.ILocatorModel, org.eclipse.tm.te.tcf.locator.core.interfaces.nodes.IPeerModel)
- */
- @Override
- public void peerModelChanged(final ILocatorModel model, final IPeerModel peer) {
- if (parentModel.equals(model)) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- @Override
- public void run() {
- viewer.refresh(peer);
- }
- });
- }
- }
-}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/tables/NodePropertiesLabelProvider.java b/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/tables/NodePropertiesLabelProvider.java
deleted file mode 100644
index 81fd2897b..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/tables/NodePropertiesLabelProvider.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.te.tcf.ui.tables;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.jface.viewers.ITableColorProvider;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.tm.te.tcf.locator.interfaces.nodes.IPeerModelProperties;
-import org.eclipse.tm.te.tcf.ui.nls.Messages;
-import org.eclipse.tm.te.ui.tables.properties.NodePropertiesTableTableNode;
-
-
-/**
- * TCF node properties table label provider implementation.
- */
-public class NodePropertiesLabelProvider extends LabelProvider implements ITableLabelProvider, ITableColorProvider {
- // Reference to the parent table viewer
- private final TableViewer parentViewer;
-
- /**
- * Constructor.
- *
- * @param viewer The table viewer or <code>null</code>.
- */
- public NodePropertiesLabelProvider(TableViewer viewer) {
- super();
- parentViewer = viewer;
- }
-
- /**
- * Returns the parent table viewer instance.
- *
- * @return The parent table viewer or <code>null</code>.
- */
- protected final TableViewer getParentViewer() {
- return parentViewer;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.vtl.ui.datasource.controls.tables.TableLabelProvider#getColumnText(org.eclipse.tm.te.tcf.core.runtime.model.interfaces.IModelNode, int)
- */
- @Override
- public String getColumnText(Object element, int columnIndex) {
- Assert.isNotNull(element);
-
- String label = null;
-
- if (element instanceof NodePropertiesTableTableNode) {
- switch (columnIndex) {
- case 0:
- label = ((NodePropertiesTableTableNode)element).name;
- break;
- case 1:
- label = ((NodePropertiesTableTableNode)element).value;
- break;
- }
-
- if (label != null) {
- if (IPeerModelProperties.PROP_LAST_SCANNER_ERROR.equals(label)) {
- label = Messages.NodePropertiesLabelProvider_lastScannerError;
- } else if (IPeerModelProperties.PROP_STATE.equals(label)) {
- label = Messages.NodePropertiesLabelProvider_state;
- } else if (IPeerModelProperties.PROP_LOCAL_SERVICES.equals(label)) {
- label = Messages.NodePropertiesLabelProvider_services_local;
- } else if (IPeerModelProperties.PROP_REMOTE_SERVICES.equals(label)) {
- label = Messages.NodePropertiesLabelProvider_services_remote;
- } else if (columnIndex == 1 && IPeerModelProperties.PROP_STATE.equals(((NodePropertiesTableTableNode)element).name)) {
- label = Messages.getString("NodePropertiesLabelProvider_state_" + label.replace('-', '_')); //$NON-NLS-1$
- }
- }
- }
-
- return label;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnImage(java.lang.Object, int)
- */
- @Override
- public Image getColumnImage(Object element, int columnIndex) {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ITableColorProvider#getForeground(java.lang.Object, int)
- */
- @Override
- public Color getForeground(Object element, int columnIndex) {
- if (element instanceof NodePropertiesTableTableNode && IPeerModelProperties.PROP_LAST_SCANNER_ERROR.equals(((NodePropertiesTableTableNode)element).name)) {
- return getParentViewer().getControl().getDisplay().getSystemColor(SWT.COLOR_RED);
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ITableColorProvider#getBackground(java.lang.Object, int)
- */
- @Override
- public Color getBackground(Object element, int columnIndex) {
- return null;
- }
-
-
-}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/tables/NodePropertiesViewerComparator.java b/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/tables/NodePropertiesViewerComparator.java
deleted file mode 100644
index 0a644f14f..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/tables/NodePropertiesViewerComparator.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.te.tcf.ui.tables;
-
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.tm.te.tcf.ui.nls.Messages;
-import org.eclipse.tm.te.ui.tables.TableViewerComparator;
-
-
-/**
- * TCF node properties table viewer comparator implementation.
- */
-public class NodePropertiesViewerComparator extends TableViewerComparator {
-
- /**
- * Constructor.
- *
- * @param viewer The parent viewer. Must not be <code>null</code>.
- * @param labelProvider The table label provider. Must not be <code>null</code>.
- */
- public NodePropertiesViewerComparator(Viewer viewer, ITableLabelProvider labelProvider) {
- super(viewer, labelProvider);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.tcf.vtl.ui.tables.TableViewerComparator#doCompare(java.lang.Object, java.lang.Object, java.lang.String, int, int)
- */
- @Override
- protected int doCompare(Object node1, Object node2, String sortColumn, int index, int inverter) {
- if (node1 != null && node2 != null) {
- String t1 = doGetText(node1, index);
- String t2 = doGetText(node2, index);
-
- // Name column sorting
- if (index == 0) {
- // Special handling for empty text and last error text
- if ("".equals(t1) || "".equals(t2) //$NON-NLS-1$ //$NON-NLS-2$
- || Messages.NodePropertiesLabelProvider_lastScannerError.equals(t1)
- || Messages.NodePropertiesLabelProvider_lastScannerError.equals(t2)) {
- if (("".equals(t1) || Messages.NodePropertiesLabelProvider_lastScannerError.equals(t1)) //$NON-NLS-1$
- && !("".equals(t2) || Messages.NodePropertiesLabelProvider_lastScannerError.equals(t2))) { //$NON-NLS-1$
- return 1;
- }
- if (!("".equals(t1) || Messages.NodePropertiesLabelProvider_lastScannerError.equals(t1)) //$NON-NLS-1$
- && ("".equals(t2) || Messages.NodePropertiesLabelProvider_lastScannerError.equals(t2))) { //$NON-NLS-1$
- return -1;
- }
- if ("".equals(t1) && Messages.NodePropertiesLabelProvider_lastScannerError.equals(t2)) { //$NON-NLS-1$
- return -1;
- }
- if ("".equals(t2) && Messages.NodePropertiesLabelProvider_lastScannerError.equals(t1)) { //$NON-NLS-1$
- return 1;
- }
- }
- // Special handling for "\t"
- else if ("\t".equals(t1) || "\t".equals(t2)) { //$NON-NLS-1$ //$NON-NLS-2$
- return 0;
- }
- }
- // Value column sorting
- else if (index == 1) {
- String t11 = doGetText(node1, 0);
- String t21 = doGetText(node2, 0);
- // Special handling for "\t"
- if ("\t".equals(t11) || "\t".equals(t21)) { //$NON-NLS-1$ //$NON-NLS-2$
- return 0;
- }
- }
- }
-
- return super.doCompare(node1, node2, sortColumn, index, inverter);
- }
-}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/wizards/NewTargetWizard.java b/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/wizards/NewTargetWizard.java
deleted file mode 100644
index 08ed8cefe..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/wizards/NewTargetWizard.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.te.tcf.ui.wizards;
-
-import java.io.IOException;
-import java.util.Map;
-
-import org.eclipse.jface.dialogs.IMessageProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.tm.tcf.protocol.IPeer;
-import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.te.runtime.persistence.interfaces.IPersistenceService;
-import org.eclipse.tm.te.runtime.services.ServiceManager;
-import org.eclipse.tm.te.tcf.locator.interfaces.nodes.ILocatorModel;
-import org.eclipse.tm.te.tcf.locator.interfaces.nodes.IPeerModel;
-import org.eclipse.tm.te.tcf.locator.interfaces.services.ILocatorModelLookupService;
-import org.eclipse.tm.te.tcf.locator.interfaces.services.ILocatorModelRefreshService;
-import org.eclipse.tm.te.tcf.ui.model.Model;
-import org.eclipse.tm.te.tcf.ui.nls.Messages;
-import org.eclipse.tm.te.tcf.ui.wizards.pages.NewTargetWizardPage;
-import org.eclipse.tm.te.ui.views.ViewsUtil;
-import org.eclipse.tm.te.ui.views.interfaces.IUIConstants;
-import org.eclipse.tm.te.ui.wizards.AbstractWizard;
-import org.eclipse.ui.INewWizard;
-import org.eclipse.ui.IWorkbench;
-
-/**
- * New TCF target wizard implementation.
- */
-public class NewTargetWizard extends AbstractWizard implements INewWizard {
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchWizard#init(org.eclipse.ui.IWorkbench, org.eclipse.jface.viewers.IStructuredSelection)
- */
- @Override
- public void init(IWorkbench workbench, IStructuredSelection selection) {
- // Set the window title
- setWindowTitle(Messages.NewTargetWizard_windowTitle);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.wizard.Wizard#addPages()
- */
- @Override
- public void addPages() {
- // Create and add the wizard pages
- addPage(new NewTargetWizardPage());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.wizard.Wizard#performFinish()
- */
- @Override
- public boolean performFinish() {
- IWizardPage page = getPage(NewTargetWizardPage.class.getName());
- if (page instanceof NewTargetWizardPage) {
- // Trigger the saving of the widget history
- ((NewTargetWizardPage)page).saveWidgetValues();
- // Get the peer attributes map from the page
- final Map<String, String> peerAttributes = ((NewTargetWizardPage)page).getPeerAttributes();
- if (peerAttributes != null) {
- try {
- // Save the new peer
- IPersistenceService persistenceService = ServiceManager.getInstance().getService(IPersistenceService.class);
- if (persistenceService == null) throw new IOException("Persistence service instance unavailable."); //$NON-NLS-1$
- persistenceService.write(peerAttributes);
-
- // Get the locator model
- final ILocatorModel model = Model.getModel();
- if (model != null) {
- // Trigger a refresh of the model to read in the newly created static peer
- final ILocatorModelRefreshService service = model.getService(ILocatorModelRefreshService.class);
- if (service != null) {
- Protocol.invokeLater(new Runnable() {
- @Override
- public void run() {
- // Refresh the model now (must be executed within the TCF dispatch thread)
- service.refresh();
-
- // Get the peer model node from the model and select it in the tree
- final IPeerModel peerNode = model.getService(ILocatorModelLookupService.class).lkupPeerModelById(peerAttributes.get(IPeer.ATTR_ID));
- if (peerNode != null) {
- ViewsUtil.setSelection(IUIConstants.ID_EXPLORER, new StructuredSelection(peerNode));
- }
- }
- });
- }
- }
- } catch (IOException e) {
- ((NewTargetWizardPage)page).setMessage(NLS.bind(Messages.NewTargetWizard_error_savePeer, e.getLocalizedMessage()), IMessageProvider.ERROR);
- getContainer().updateMessage();
- return false;
- }
- }
- }
-
- return true;
- }
-
-}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/wizards/pages/NewTargetWizardPage.java b/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/wizards/pages/NewTargetWizardPage.java
deleted file mode 100644
index 33ef778da..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.ui/src/org/eclipse/tm/te/tcf/ui/wizards/pages/NewTargetWizardPage.java
+++ /dev/null
@@ -1,424 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.te.tcf.ui.wizards.pages;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.UUID;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogPage;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.tm.tcf.protocol.IPeer;
-import org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer;
-import org.eclipse.tm.te.runtime.properties.PropertiesContainer;
-import org.eclipse.tm.te.tcf.core.interfaces.ITransportTypes;
-import org.eclipse.tm.te.tcf.ui.internal.help.IContextHelpIds;
-import org.eclipse.tm.te.tcf.ui.nls.Messages;
-import org.eclipse.tm.te.tcf.ui.wizards.controls.CustomTransportPanel;
-import org.eclipse.tm.te.tcf.ui.wizards.controls.PeerAttributesTablePart;
-import org.eclipse.tm.te.tcf.ui.wizards.controls.PeerIdControl;
-import org.eclipse.tm.te.tcf.ui.wizards.controls.PeerNameControl;
-import org.eclipse.tm.te.tcf.ui.wizards.controls.PipeTransportPanel;
-import org.eclipse.tm.te.tcf.ui.wizards.controls.TcpTransportPanel;
-import org.eclipse.tm.te.tcf.ui.wizards.controls.TransportTypeControl;
-import org.eclipse.tm.te.tcf.ui.wizards.controls.TransportTypePanelControl;
-import org.eclipse.tm.te.ui.controls.interfaces.IWizardConfigurationPanel;
-import org.eclipse.tm.te.ui.forms.FormLayoutFactory;
-import org.eclipse.tm.te.ui.swt.SWTControlUtil;
-import org.eclipse.tm.te.ui.wizards.interfaces.ISharedDataWizardPage;
-import org.eclipse.tm.te.ui.wizards.pages.AbstractValidatableWizardPage;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.forms.widgets.ExpandableComposite;
-import org.eclipse.ui.forms.widgets.FormToolkit;
-import org.eclipse.ui.forms.widgets.Section;
-
-/**
- * Wizard page implementation querying all information needed
- * to create the different TCF peer types.
- */
-public class NewTargetWizardPage extends AbstractValidatableWizardPage {
- private PeerIdControl peerIdControl;
- private PeerNameControl peerNameControl;
- TransportTypeControl transportTypeControl;
- TransportTypePanelControl transportTypePanelControl;
- private PeerAttributesTablePart tablePart;
-
- private FormToolkit toolkit = null;
-
- /**
- * Local transport type control implementation.
- */
- private class MyTransportTypeControl extends TransportTypeControl {
-
- /**
- * Constructor.
- *
- * @param parentPage The parent dialog page this control is embedded in.
- * Might be <code>null</code> if the control is not associated with a page.
- */
- public MyTransportTypeControl(IDialogPage parentPage) {
- super(parentPage);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.BaseEditBrowseTextControl#widgetSelected(org.eclipse.swt.events.SelectionEvent)
- */
- @Override
- public void widgetSelected(SelectionEvent e) {
- if (transportTypePanelControl != null) {
- transportTypePanelControl.showConfigurationPanel(getSelectedTransportType());
- validatePage();
- }
- }
- }
-
- /**
- * Local transport type panel control implementation.
- */
- private class MyTransportTypePanelControl extends TransportTypePanelControl {
-
- /**
- * Constructor.
- *
- * @param parentPage The parent dialog page this control is embedded in.
- * Might be <code>null</code> if the control is not associated with a page.
- */
- public MyTransportTypePanelControl(IDialogPage parentPage) {
- super(parentPage);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.BaseControl#isValid()
- */
- @Override
- public boolean isValid() {
- boolean valid = super.isValid();
- if (!valid) return false;
-
- // Get the currently selected transport type
- if (transportTypeControl != null) {
- String transportType = transportTypeControl.getSelectedTransportType();
- if (transportType != null) {
- // get the panel for the transport type and validate the panel
- IWizardConfigurationPanel panel = getConfigurationPanel(transportType);
-
- if (panel != null) {
- valid = panel.isValid();
- setMessage(panel.getMessage(), panel.getMessageType());
- }
- }
- }
-
- return valid;
- }
- }
-
- /**
- * Constructor.
- */
- public NewTargetWizardPage() {
- this(NewTargetWizardPage.class.getName());
- }
-
- /**
- * Constructor.
- *
- * @param pageName The page name. Must not be <code>null</code>.
- */
- public NewTargetWizardPage(String pageName) {
- super(pageName);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.DialogPage#dispose()
- */
- @Override
- public void dispose() {
- if (peerIdControl != null) { peerIdControl.dispose(); peerIdControl = null; }
- if (peerNameControl != null) { peerNameControl.dispose(); peerNameControl = null; }
- if (transportTypeControl != null) { transportTypeControl.dispose(); transportTypeControl = null; }
- if (transportTypePanelControl != null) { transportTypePanelControl.dispose(); transportTypePanelControl = null; }
- if (tablePart != null) { tablePart.dispose(); tablePart = null; }
-
- super.dispose();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
- */
- @Override
- public void createControl(Composite parent) {
- // Setup title and description
- setTitle(Messages.NewTargetWizardPage_title);
- setDescription(Messages.NewTargetWizardPage_description);
-
- // Create the forms toolkit
- toolkit = new FormToolkit(parent.getDisplay());
-
- // Create the main panel
- Composite mainPanel = toolkit.createComposite(parent);
- mainPanel.setLayout(FormLayoutFactory.createClearGridLayout(false, 1));
- mainPanel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
- mainPanel.setBackground(parent.getBackground());
-
- setControl(mainPanel);
-
- // Setup the help
- PlatformUI.getWorkbench().getHelpSystem().setHelp(mainPanel, IContextHelpIds.NEW_TARGET_WIZARD_PAGE);
-
- // Do not validate the page while creating the controls
- boolean changed = setValidationInProgress(true);
- // Create the main panel sub controls
- createMainPanelControls(mainPanel, toolkit);
- // Reset the validation in progress state
- if (changed) setValidationInProgress(false);
-
- // Adjust the font
- Dialog.applyDialogFont(mainPanel);
-
- // Validate the page for the first time
- validatePage();
- }
-
- /**
- * Creates the main panel sub controls.
- *
- * @param parent The parent main panel composite. Must not be <code>null</code>.
- * @param toolkit The form toolkit. Must not be <code>null</code>.
- */
- protected void createMainPanelControls(Composite parent, FormToolkit toolkit) {
- Assert.isNotNull(parent);
-
- // Create the client composite
- Composite client = toolkit.createComposite(parent);
- client.setLayout(FormLayoutFactory.createSectionClientGridLayout(false, 2));
- client.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
- client.setBackground(parent.getBackground());
-
- // Add the controls
- peerIdControl = new PeerIdControl(this);
- peerIdControl.setFormToolkit(toolkit);
- peerIdControl.setParentControlIsInnerPanel(true);
- peerIdControl.setupPanel(client);
- peerIdControl.getEditFieldControl().setEnabled(false);
- peerIdControl.setEditFieldControlText(UUID.randomUUID().toString());
-
- peerNameControl = new PeerNameControl(this);
- peerNameControl.setFormToolkit(toolkit);
- peerNameControl.setParentControlIsInnerPanel(true);
- peerNameControl.setupPanel(client);
- peerNameControl.getEditFieldControl().setFocus();
-
- createEmptySpace(client, 5, 2, toolkit);
-
- // Create and configure the transport type section
- Section transportTypeSection = toolkit.createSection(client, ExpandableComposite.TITLE_BAR);
- transportTypeSection.setText(Messages.NewTargetWizardPage_section_transportType);
- transportTypeSection.setLayout(FormLayoutFactory.createSectionClientGridLayout(false, 2));
- GridData layoutData = new GridData(SWT.FILL, SWT.CENTER, true, false);
- layoutData.horizontalSpan = 2;
- transportTypeSection.setLayoutData(layoutData);
- transportTypeSection.setBackground(client.getBackground());
-
- Composite transportTypeClient = toolkit.createComposite(transportTypeSection);
- transportTypeClient.setLayout(new GridLayout());
- transportTypeClient.setBackground(transportTypeSection.getBackground());
- transportTypeSection.setClient(transportTypeClient);
-
- // Create the transport type control
- transportTypeControl = new MyTransportTypeControl(this);
- transportTypeControl.setFormToolkit(toolkit);
- transportTypeControl.setupPanel(transportTypeClient);
-
- // The transport type specific controls are placed into a stack
- transportTypePanelControl = new MyTransportTypePanelControl(this);
-
- // Create and add the panels
- TcpTransportPanel tcpTransportPanel = new TcpTransportPanel(transportTypePanelControl);
- transportTypePanelControl.addConfigurationPanel(ITransportTypes.TRANSPORT_TYPE_TCP, tcpTransportPanel);
- transportTypePanelControl.addConfigurationPanel(ITransportTypes.TRANSPORT_TYPE_SSL, tcpTransportPanel);
- transportTypePanelControl.addConfigurationPanel(ITransportTypes.TRANSPORT_TYPE_PIPE, new PipeTransportPanel(transportTypePanelControl));
- transportTypePanelControl.addConfigurationPanel(ITransportTypes.TRANSPORT_TYPE_CUSTOM, new CustomTransportPanel(transportTypePanelControl));
-
- // Setup the panel control
- transportTypePanelControl.setupPanel(transportTypeClient, TransportTypeControl.TRANSPORT_TYPES, toolkit);
- layoutData = new GridData(SWT.FILL, SWT.FILL, true, true);
- layoutData.horizontalSpan = 2;
- transportTypePanelControl.getPanel().setLayoutData(layoutData);
- toolkit.adapt(transportTypePanelControl.getPanel());
-
- transportTypePanelControl.showConfigurationPanel(transportTypeControl.getSelectedTransportType());
-
- // Create the advanced peer properties table
- createPeerAttributesTableControl(client, toolkit);
-
- // restore the widget values from the history
- restoreWidgetValues();
- }
-
- /**
- * Creates the peer attributes table controls.
- *
- * @param parent The parent composite. Must not be <code>null</code>.
- * @param toolkit The form toolkit. Must not be <code>null</code>.
- */
- protected void createPeerAttributesTableControl(Composite parent, FormToolkit toolkit) {
- Assert.isNotNull(parent);
-
- createEmptySpace(parent, 5, 2, toolkit);
-
- // Create and configure the advanced attributes section
- Section attributesSection = toolkit.createSection(parent, ExpandableComposite.TITLE_BAR);
- attributesSection.setText(Messages.NewTargetWizardPage_section_attributes);
- attributesSection.setLayout(FormLayoutFactory.createSectionClientGridLayout(false, 2));
- GridData layoutData = new GridData(SWT.FILL, SWT.CENTER, true, false);
- layoutData.horizontalSpan = 2;
- attributesSection.setLayoutData(layoutData);
- attributesSection.setBackground(parent.getBackground());
-
- Composite client = toolkit.createComposite(attributesSection);
- client.setLayout(new GridLayout(2, false));
- client.setBackground(attributesSection.getBackground());
- attributesSection.setClient(client);
-
- tablePart = new PeerAttributesTablePart();
- tablePart.setMinSize(SWTControlUtil.convertWidthInCharsToPixels(client, 20), SWTControlUtil.convertHeightInCharsToPixels(client, 6));
- tablePart.setBannedNames(new String[] { IPeer.ATTR_ID, IPeer.ATTR_AGENT_ID, IPeer.ATTR_SERVICE_MANGER_ID, IPeer.ATTR_NAME, IPeer.ATTR_TRANSPORT_NAME, IPeer.ATTR_IP_HOST, IPeer.ATTR_IP_PORT, "PipeName" }); //$NON-NLS-1$
- tablePart.createControl(client, SWT.SINGLE | SWT.FULL_SELECTION, 2, toolkit);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.wizards.pages.AbstractValidatableWizardPage#validatePage()
- */
- @Override
- public void validatePage() {
- super.validatePage();
- if (!isPageComplete()) return;
-
- if (isValidationInProgress()) return;
- setValidationInProgress(true);
-
- boolean valid = true;
-
- if (peerIdControl != null) {
- valid &= peerIdControl.isValid();
- setMessage(peerIdControl.getMessage(), peerIdControl.getMessageType());
- }
-
- if (peerNameControl != null) {
- valid &= peerNameControl.isValid();
- if (peerNameControl.getMessageType() > getMessageType()) {
- setMessage(peerNameControl.getMessage(), peerNameControl.getMessageType());
- }
- }
-
- if (transportTypeControl != null) {
- valid &= transportTypeControl.isValid();
- if (transportTypeControl.getMessageType() > getMessageType()) {
- setMessage(transportTypeControl.getMessage(), transportTypeControl.getMessageType());
- }
- }
-
- if (transportTypePanelControl != null) {
- valid &= transportTypePanelControl.isValid();
- if (transportTypePanelControl.getMessageType() > getMessageType()) {
- setMessage(transportTypePanelControl.getMessage(), transportTypePanelControl.getMessageType());
- }
- }
-
- setPageComplete(valid);
- setValidationInProgress(false);
- }
-
- /**
- * Updates the given attributes map with the current control content.
- *
- * @param peerAttributes The peer attributes map to update. Must not be <code>null</code>.
- */
- protected void updatePeerAttributes(Map<String, String> peerAttributes) {
- Assert.isNotNull(peerAttributes);
-
- peerAttributes.put(IPeer.ATTR_ID, peerIdControl.getEditFieldControlText());
-
- String value = peerNameControl.getEditFieldControlText();
- if (value != null && !"".equals(value)) peerAttributes.put(IPeer.ATTR_NAME, value); //$NON-NLS-1$
-
- value = transportTypeControl.getSelectedTransportType();
- if (value != null && !"".equals(value) && !ITransportTypes.TRANSPORT_TYPE_CUSTOM.equals(value)) { //$NON-NLS-1$
- peerAttributes.put(IPeer.ATTR_TRANSPORT_NAME, value);
- }
-
- IWizardConfigurationPanel panel = transportTypePanelControl.getConfigurationPanel(value);
- if (panel instanceof ISharedDataWizardPage) {
- IPropertiesContainer data = new PropertiesContainer();
- ((ISharedDataWizardPage)panel).extractData(data);
-
- // Copy all string properties to the peer attributes map
- for (String key : data.getProperties().keySet()) {
- value = data.getStringProperty(key);
- if (value != null && !"".equals(value)) peerAttributes.put(key, value); //$NON-NLS-1$
- }
- }
-
- Map<String, String> additionalAttributes = tablePart.getAttributes();
- if (additionalAttributes != null && !additionalAttributes.isEmpty()) {
- peerAttributes.putAll(additionalAttributes);
- }
- }
-
- /**
- * Returns the peer attributes.
- *
- * @return The peer attributes or <code>null</code> if canceled.
- */
- public final Map<String, String> getPeerAttributes() {
- // Create a new peer attributes map
- Map<String, String> peerAttributes = new HashMap<String, String>();
- // Update with the current control content
- updatePeerAttributes(peerAttributes);
-
- return peerAttributes;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.wizards.pages.AbstractWizardPage#saveWidgetValues()
- */
- @Override
- public void saveWidgetValues() {
- IDialogSettings settings = getDialogSettings();
- if (settings != null) {
- if (peerIdControl != null) peerIdControl.saveWidgetValues(settings, null);
- if (peerNameControl != null) peerNameControl.saveWidgetValues(settings, null);
- if (transportTypeControl != null) transportTypeControl.saveWidgetValues(settings, null);
- if (transportTypePanelControl != null) transportTypePanelControl.saveWidgetValues(settings, null);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.wizards.pages.AbstractWizardPage#restoreWidgetValues()
- */
- @Override
- public void restoreWidgetValues() {
- IDialogSettings settings = getDialogSettings();
- if (settings != null) {
- if (peerIdControl != null) peerIdControl.restoreWidgetValues(settings, null);
- if (peerNameControl != null) peerNameControl.restoreWidgetValues(settings, null);
- if (transportTypeControl != null) transportTypeControl.restoreWidgetValues(settings, null);
- if (transportTypePanelControl != null) transportTypePanelControl.restoreWidgetValues(settings, null);
- }
- }
-}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tests/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tm.te.tests/META-INF/MANIFEST.MF
deleted file mode 100644
index bd37534c6..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tests/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,21 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.tm.te.tests;singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Bundle-Activator: org.eclipse.tm.te.tests.activator.UIPlugin
-Bundle-Vendor: %providerName
-Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
- org.eclipse.ui;bundle-version="3.7.0",
- org.junit;bundle-version="4.8.2",
- org.eclipse.tm.te.ui.views;bundle-version="1.0.0",
- org.eclipse.tm.te.runtime;bundle-version="1.0.0",
- org.eclipse.tm.te.runtime.statushandler;bundle-version="1.0.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Bundle-ActivationPolicy: lazy
-Bundle-Localization: plugin
-Export-Package: org.eclipse.tm.te.tests,
- org.eclipse.tm.te.tests.activator;x-internal:=true,
- org.eclipse.tm.te.tests.interfaces,
- org.eclipse.tm.te.tests.statushandler,
- org.eclipse.tm.te.tests.suites
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tests/plugin.xml b/target_explorer/plugins/org.eclipse.tm.te.tests/plugin.xml
deleted file mode 100644
index f63004576..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.tests/plugin.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
-
-<!-- Test status handler contributions -->
- <extension point="org.eclipse.tm.te.runtime.statushandler.handlers">
- <handler
- id="org.eclipse.tm.te.tests.handler1"
- class="org.eclipse.tm.te.tests.statushandler.TestStatusHandler">
- </handler>
-
- <handler
- id="org.eclipse.tm.te.tests.handler2"
- class="org.eclipse.tm.te.tests.statushandler.TestStatusHandler">
- </handler>
- </extension>
-
- <extension point="org.eclipse.tm.te.runtime.statushandler.bindings">
- <binding
- handlerId="org.eclipse.tm.te.tests.handler1"
- id="org.eclipse.tm.te.tests.binding1">
- <enablement>
- <instanceof value="org.eclipse.tm.te.tests.CoreTestCase"/>
- </enablement>
- </binding>
-
- <binding
- handlerId="org.eclipse.tm.te.tests.handler2"
- id="org.eclipse.tm.te.tests.binding2">
- <enablement>
- <instanceof value="org.eclipse.tm.te.tests.interfaces.IInterruptCondition"/>
- </enablement>
- </binding>
- </extension>
-</plugin>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tm.te.ui.controls/META-INF/MANIFEST.MF
deleted file mode 100644
index e17fab28f..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,24 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.tm.te.ui.controls;singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Bundle-Activator: org.eclipse.tm.te.ui.controls.activator.UIPlugin
-Bundle-Vendor: %providerName
-Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
- org.eclipse.core.resources;bundle-version="3.7.100";resolution:=optional,
- org.eclipse.ui;bundle-version="3.7.0",
- org.eclipse.ui.forms;bundle-version="3.5.100",
- org.eclipse.tm.te.runtime;bundle-version="1.0.0",
- org.eclipse.tm.te.ui;bundle-version="1.0.0",
- org.eclipse.tm.te.ui.swt;bundle-version="1.0.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Bundle-ActivationPolicy: lazy
-Bundle-Localization: plugin
-Export-Package: org.eclipse.tm.te.ui.controls,
- org.eclipse.tm.te.ui.controls.activator;x-internal:=true,
- org.eclipse.tm.te.ui.controls.interfaces,
- org.eclipse.tm.te.ui.controls.net,
- org.eclipse.tm.te.ui.controls.nls,
- org.eclipse.tm.te.ui.controls.panels,
- org.eclipse.tm.te.ui.controls.validator
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/pom.xml b/target_explorer/plugins/org.eclipse.tm.te.ui.controls/pom.xml
deleted file mode 100644
index a77729f4a..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.controls/pom.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
- xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.eclipse.tcf</groupId>
- <artifactId>tcf-parent</artifactId>
- <version>0.5.0-SNAPSHOT</version>
- <relativePath>../../../pom.xml</relativePath>
- </parent>
-
- <version>1.0.0.qualifier</version>
- <artifactId>org.eclipse.tm.te.ui.controls</artifactId>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.forms/pom.xml b/target_explorer/plugins/org.eclipse.tm.te.ui.forms/pom.xml
deleted file mode 100644
index 4a3a44eb7..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.forms/pom.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
- xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.eclipse.tcf</groupId>
- <artifactId>tcf-parent</artifactId>
- <version>0.5.0-SNAPSHOT</version>
- <relativePath>../../../pom.xml</relativePath>
- </parent>
-
- <version>1.0.0.qualifier</version>
- <artifactId>org.eclipse.tm.te.ui.forms</artifactId>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.swt/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tm.te.ui.swt/META-INF/MANIFEST.MF
deleted file mode 100644
index 7363d7405..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.swt/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,19 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.tm.te.ui.swt;singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Bundle-Activator: org.eclipse.tm.te.ui.swt.activator.UIPlugin
-Bundle-Vendor: %providerName
-Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
- org.eclipse.ui;bundle-version="3.7.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Bundle-ActivationPolicy: lazy
-Bundle-Localization: plugin
-Export-Package: org.eclipse.tm.te.ui.jface.dialogs,
- org.eclipse.tm.te.ui.jface.images,
- org.eclipse.tm.te.ui.swt,
- org.eclipse.tm.te.ui.swt.activator;x-internal:=true,
- org.eclipse.tm.te.ui.swt.listener,
- org.eclipse.tm.te.ui.swt.nls;x-internal:=true,
- org.eclipse.tm.te.ui.swt.widgets
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.swt/pom.xml b/target_explorer/plugins/org.eclipse.tm.te.ui.swt/pom.xml
deleted file mode 100644
index 5d2830829..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.swt/pom.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
- xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.eclipse.tcf</groupId>
- <artifactId>tcf-parent</artifactId>
- <version>0.5.0-SNAPSHOT</version>
- <relativePath>../../../pom.xml</relativePath>
- </parent>
-
- <version>1.0.0.qualifier</version>
- <artifactId>org.eclipse.tm.te.ui.swt</artifactId>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.process/.options b/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.process/.options
deleted file mode 100644
index da72ca114..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.process/.options
+++ /dev/null
@@ -1 +0,0 @@
-org.eclipse.tm.te.ui.terminals.process/debugmode = 0
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.process/.project b/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.process/.project
deleted file mode 100644
index 9e4ed017d..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.process/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.tm.te.ui.terminals.process</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/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.process/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.process/META-INF/MANIFEST.MF
deleted file mode 100644
index 0c8446cb9..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.process/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.te.ui.terminals.process;singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Bundle-Activator: org.eclipse.tm.te.ui.terminals.process.activator.UIPlugin
-Bundle-Vendor: %providerName
-Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
- org.eclipse.core.resources;bundle-version="3.7.100";resolution:=optional,
- org.eclipse.ui;bundle-version="3.7.0",
- org.eclipse.tm.terminal;bundle-version="3.1.1",
- org.eclipse.cdt.core;bundle-version="5.3.1",
- org.eclipse.tm.te.runtime;bundle-version="1.0.0",
- org.eclipse.tm.te.runtime.services;bundle-version="1.0.0",
- org.eclipse.tm.te.ui.terminals;bundle-version="1.0.0",
- org.eclipse.tm.te.ui.swt;bundle-version="1.0.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Bundle-ActivationPolicy: lazy
-Bundle-Localization: plugin
-Export-Package: org.eclipse.tm.te.ui.terminals.process,
- org.eclipse.tm.te.ui.terminals.process.activator;x-internal:=true,
- org.eclipse.tm.te.ui.terminals.process.nls;x-internal:=true
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.ssh/.options b/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.ssh/.options
deleted file mode 100644
index 960a21564..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.ssh/.options
+++ /dev/null
@@ -1 +0,0 @@
-org.eclipse.tm.te.ui.terminals.ssh/debugmode = 0
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.ssh/.project b/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.ssh/.project
deleted file mode 100644
index 86539d19a..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.ssh/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.tm.te.ui.terminals.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>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.ssh/plugin.xml b/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.ssh/plugin.xml
deleted file mode 100644
index 95e05dfbe..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.ssh/plugin.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
-<!-- Terminal connector type contributions -->
- <extension point="org.eclipse.tm.te.ui.terminals.connectorTypes">
- <connectorType
- class="org.eclipse.tm.te.ui.terminals.ssh.types.SshConnectorType"
- id="org.eclipse.tm.te.ui.terminals.type.ssh"
- label="%SshConnectorType.label">
- </connectorType>
- </extension>
-
- <extension
- point="org.eclipse.tm.te.ui.terminals.launcherDelegates">
- <delegate
- class="org.eclipse.tm.te.ui.terminals.ssh.launcher.SshLauncherDelegate"
- id="org.eclipse.tm.te.ui.terminals.ssh.launcher.ssh"
- label="%SshLauncherDelegate.label">
- <enablement>
- <with variable="selection">
- <count value="1"/>
- <iterate operator="and" ifEmpty="false">
- <instanceof value="org.eclipse.tm.te.tcf.locator.interfaces.nodes.IPeerModel"/>
- </iterate>
- </with>
- </enablement>
- </delegate>
- </extension>
-</plugin>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.ssh/pom.xml b/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.ssh/pom.xml
deleted file mode 100644
index 43a0f79e5..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals.ssh/pom.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
- xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.eclipse.tcf</groupId>
- <artifactId>tcf-parent</artifactId>
- <version>0.5.0-SNAPSHOT</version>
- <relativePath>../../../pom.xml</relativePath>
- </parent>
-
- <version>1.0.0.qualifier</version>
- <artifactId>org.eclipse.tm.te.ui.terminals.ssh</artifactId>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/.options b/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/.options
deleted file mode 100644
index 149ccb08d..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/.options
+++ /dev/null
@@ -1,2 +0,0 @@
-org.eclipse.tm.te.ui.terminals/debugmode = 0
-org.eclipse.tm.te.ui.terminals/trace/outputStreamMonitor = false
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/.project b/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/.project
deleted file mode 100644
index ad1ea71d6..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.tm.te.ui.terminals</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/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/META-INF/MANIFEST.MF
deleted file mode 100644
index 9a545e543..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,42 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.tm.te.ui.terminals;singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Bundle-Activator: org.eclipse.tm.te.ui.terminals.activator.UIPlugin
-Bundle-Vendor: %providerName
-Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
- org.eclipse.core.expressions;bundle-version="3.4.300",
- org.eclipse.core.resources;bundle-version="3.7.100";resolution:=optional,
- org.eclipse.ui;bundle-version="3.7.0",
- org.eclipse.ui.ide;bundle-version="3.7.0",
- org.eclipse.ui.forms;bundle-version="3.5.100",
- org.eclipse.tm.terminal;bundle-version="3.1.1",
- org.eclipse.tm.terminal.telnet;bundle-version="2.1.0",
- org.eclipse.tm.terminal.view;bundle-version="2.2.0",
- org.eclipse.tm.te.runtime;bundle-version="1.0.0",
- org.eclipse.tm.te.runtime.services;bundle-version="1.0.0",
- org.eclipse.tm.te.ui;bundle-version="1.0.0",
- org.eclipse.tm.te.ui.controls;bundle-version="1.0.0",
- org.eclipse.tm.te.ui.swt;bundle-version="1.0.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Bundle-ActivationPolicy: lazy
-Bundle-Localization: plugin
-Export-Package: org.eclipse.tm.te.ui.terminals.actions,
- org.eclipse.tm.te.ui.terminals.activator;x-internal:=true,
- org.eclipse.tm.te.ui.terminals.events,
- org.eclipse.tm.te.ui.terminals.help,
- org.eclipse.tm.te.ui.terminals.interfaces,
- org.eclipse.tm.te.ui.terminals.internal;x-internal:=true,
- org.eclipse.tm.te.ui.terminals.internal.dialogs;x-internal:=true,
- org.eclipse.tm.te.ui.terminals.internal.handler;x-internal:=true,
- org.eclipse.tm.te.ui.terminals.internal.tracing;x-internal:=true,
- org.eclipse.tm.te.ui.terminals.launcher,
- org.eclipse.tm.te.ui.terminals.manager,
- org.eclipse.tm.te.ui.terminals.nls;x-internal:=true,
- org.eclipse.tm.te.ui.terminals.panels,
- org.eclipse.tm.te.ui.terminals.services,
- org.eclipse.tm.te.ui.terminals.streams,
- org.eclipse.tm.te.ui.terminals.tabs,
- org.eclipse.tm.te.ui.terminals.types,
- org.eclipse.tm.te.ui.terminals.view
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/pom.xml b/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/pom.xml
deleted file mode 100644
index 26a4b4bbd..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/pom.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
- xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.eclipse.tcf</groupId>
- <artifactId>tcf-parent</artifactId>
- <version>0.5.0-SNAPSHOT</version>
- <relativePath>../../../pom.xml</relativePath>
- </parent>
-
- <version>1.0.0.qualifier</version>
- <artifactId>org.eclipse.tm.te.ui.terminals</artifactId>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/panels/AbstractConfigurationPanel.java b/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/panels/AbstractConfigurationPanel.java
deleted file mode 100644
index caa239469..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.terminals/src/org/eclipse/tm/te/ui/terminals/panels/AbstractConfigurationPanel.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.te.ui.terminals.panels;
-
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.tm.te.ui.controls.BaseDialogPageControl;
-import org.eclipse.tm.te.ui.controls.panels.AbstractWizardConfigurationPanel;
-import org.eclipse.tm.te.ui.terminals.interfaces.IConfigurationPanel;
-
-/**
- * Abstract terminal configuration panel implementation.
- */
-public abstract class AbstractConfigurationPanel extends AbstractWizardConfigurationPanel implements IConfigurationPanel {
- // The selection
- private ISelection selection;
-
- /**
- * Constructor.
- *
- * @param parentControl The parent control. Must not be <code>null</code>!
- */
- public AbstractConfigurationPanel(BaseDialogPageControl parentControl) {
- super(parentControl);
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.terminals.interfaces.IConfigurationPanel#setSelection(org.eclipse.jface.viewers.ISelection)
- */
- @Override
- public void setSelection(ISelection selection) {
- this.selection = selection;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.terminals.interfaces.IConfigurationPanel#getSelection()
- */
- @Override
- public ISelection getSelection() {
- return selection;
- }
-
-}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.views/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tm.te.ui.views/META-INF/MANIFEST.MF
deleted file mode 100644
index 70ffcb35e..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.views/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,36 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.tm.te.ui.views;singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Bundle-Activator: org.eclipse.tm.te.ui.views.activator.UIPlugin
-Bundle-Vendor: %providerName
-Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
- org.eclipse.core.expressions;bundle-version="3.4.300",
- org.eclipse.ui;bundle-version="3.7.0",
- org.eclipse.ui.forms;bundle-version="3.5.100",
- org.eclipse.ui.navigator;bundle-version="3.5.100",
- org.eclipse.tm.te.runtime;bundle-version="1.0.0",
- org.eclipse.tm.te.runtime.model;bundle-version="1.0.0",
- org.eclipse.tm.te.ui;bundle-version="1.0.0",
- org.eclipse.tm.te.ui.forms;bundle-version="1.0.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Bundle-ActivationPolicy: lazy
-Bundle-Localization: plugin
-Export-Package: org.eclipse.tm.te.ui.views,
- org.eclipse.tm.te.ui.views.actions,
- org.eclipse.tm.te.ui.views.activator;x-internal:=true,
- org.eclipse.tm.te.ui.views.editor,
- org.eclipse.tm.te.ui.views.events,
- org.eclipse.tm.te.ui.views.expressions,
- org.eclipse.tm.te.ui.views.extensions,
- org.eclipse.tm.te.ui.views.handler,
- org.eclipse.tm.te.ui.views.interfaces,
- org.eclipse.tm.te.ui.views.interfaces.workingsets,
- org.eclipse.tm.te.ui.views.internal;x-internal:=true,
- org.eclipse.tm.te.ui.views.internal.editor;x-internal:=true,
- org.eclipse.tm.te.ui.views.listeners,
- org.eclipse.tm.te.ui.views.nls;x-internal:=true,
- org.eclipse.tm.te.ui.views.perspective,
- org.eclipse.tm.te.ui.views.workingsets,
- org.eclipse.tm.te.ui.views.workingsets.pages
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.views/pom.xml b/target_explorer/plugins/org.eclipse.tm.te.ui.views/pom.xml
deleted file mode 100644
index 495b15f39..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.views/pom.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
- xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.eclipse.tcf</groupId>
- <artifactId>tcf-parent</artifactId>
- <version>0.5.0-SNAPSHOT</version>
- <relativePath>../../../pom.xml</relativePath>
- </parent>
-
- <version>1.0.0.qualifier</version>
- <artifactId>org.eclipse.tm.te.ui.views</artifactId>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/actions/WorkingSetActionProvider.java b/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/actions/WorkingSetActionProvider.java
deleted file mode 100644
index 687e02589..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/actions/WorkingSetActionProvider.java
+++ /dev/null
@@ -1,409 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.te.ui.views.actions;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.tm.te.ui.views.activator.UIPlugin;
-import org.eclipse.tm.te.ui.views.internal.ViewRoot;
-import org.eclipse.tm.te.ui.views.nls.Messages;
-import org.eclipse.tm.te.ui.views.workingsets.WorkingSetFilter;
-import org.eclipse.tm.te.ui.views.workingsets.WorkingSetsContentProvider;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.IAggregateWorkingSet;
-import org.eclipse.ui.IMemento;
-import org.eclipse.ui.IWorkbenchPreferenceConstants;
-import org.eclipse.ui.IWorkingSet;
-import org.eclipse.ui.IWorkingSetManager;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.actions.WorkingSetFilterActionGroup;
-import org.eclipse.ui.internal.navigator.NavigatorFilterService;
-import org.eclipse.ui.navigator.CommonActionProvider;
-import org.eclipse.ui.navigator.CommonViewer;
-import org.eclipse.ui.navigator.ICommonActionExtensionSite;
-import org.eclipse.ui.navigator.IExtensionActivationListener;
-import org.eclipse.ui.navigator.IExtensionStateModel;
-import org.eclipse.ui.navigator.INavigatorContentService;
-
-/**
- * Working set action provider implementation.
- * <p>
- * Copied and adapted from <code>org.eclipse.ui.internal.navigator.resources.actions.WorkingSetActionProvider</code>.
- */
-@SuppressWarnings("restriction")
-public class WorkingSetActionProvider extends CommonActionProvider {
-
- private static final String TAG_CURRENT_WORKING_SET_NAME = "currentWorkingSetName"; //$NON-NLS-1$
-
- private static final String WORKING_SET_FILTER_ID = "org.eclipse.tm.te.ui.views.navigator.filters.workingSet"; //$NON-NLS-1$
-
- private boolean contributedToViewMenu = false;
-
- /* default */ CommonViewer viewer;
-
- /* default */ INavigatorContentService contentService;
-
- private NavigatorFilterService filterService;
-
- private WorkingSetFilterActionGroup workingSetActionGroup;
- /* default */ WorkingSetRootModeActionGroup workingSetRootModeActionGroup;
-
- private Object originalViewerInput = null;
-
- /* default */ IExtensionStateModel extensionStateModel;
-
- /* default */ boolean emptyWorkingSet;
- /* default */ IWorkingSet workingSet;
-
- /* default */ IPropertyChangeListener topLevelModeListener;
-
- /* default */ boolean ignoreFilterChangeEvents;
-
- /**
- * Provides a smart listener to monitor changes to the Working Set Manager.
- *
- */
- public class WorkingSetManagerListener implements IPropertyChangeListener {
-
- private boolean listening = false;
-
- @Override
- public void propertyChange(PropertyChangeEvent event) {
- String property = event.getProperty();
- Object newValue = event.getNewValue();
- Object oldValue = event.getOldValue();
-
- String newLabel = null;
- if (IWorkingSetManager.CHANGE_WORKING_SET_REMOVE.equals(property) && oldValue == workingSet) {
- newLabel = ""; //$NON-NLS-1$
- setWorkingSet(null);
- } else if (IWorkingSetManager.CHANGE_WORKING_SET_NAME_CHANGE.equals(property) && newValue == workingSet) {
- newLabel = workingSet.getLabel();
- } else if (IWorkingSetManager.CHANGE_WORKING_SET_CONTENT_CHANGE.equals(property) && newValue == workingSet) {
- if (workingSet.isAggregateWorkingSet() && workingSet.isEmpty()) {
- // act as if the working set has been made null
- if (!emptyWorkingSet) {
- emptyWorkingSet = true;
- setWorkingSetFilter(null);
- }
- } else {
- // we've gone from empty to non-empty on our set.
- // Restore it.
- if (emptyWorkingSet) {
- emptyWorkingSet = false;
- setWorkingSetFilter(workingSet);
- newLabel = workingSet.getLabel();
- }
- }
- }
- if (viewer != null) {
- if (newLabel != null)
- viewer.getCommonNavigator().setWorkingSetLabel(newLabel);
- viewer.getFrameList().reset();
- viewer.refresh();
- }
- }
-
- /**
- * Begin listening to the correct source if not already listening.
- */
- public synchronized void listen() {
- if (!listening) {
- PlatformUI.getWorkbench().getWorkingSetManager().addPropertyChangeListener(managerChangeListener);
- listening = true;
- }
- }
-
- /**
- * Begin listening to the correct source if not already listening.
- */
- public synchronized void ignore() {
- if (listening) {
- PlatformUI.getWorkbench().getWorkingSetManager().removePropertyChangeListener(managerChangeListener);
- listening = false;
- }
- }
- }
-
- private IPropertyChangeListener filterChangeListener = new IPropertyChangeListener() {
- @Override
- public void propertyChange(PropertyChangeEvent event) {
-
- if (ignoreFilterChangeEvents)
- return;
-
- IWorkingSet newWorkingSet = (IWorkingSet) event.getNewValue();
-
- setWorkingSet(newWorkingSet);
- if (newWorkingSet != null) {
- if (!contentService.isActive(WorkingSetsContentProvider.EXTENSION_ID)) {
- contentService.getActivationService().activateExtensions(
- new String[] { WorkingSetsContentProvider.EXTENSION_ID }, false);
- contentService.getActivationService().persistExtensionActivations();
- }
- if (newWorkingSet.isAggregateWorkingSet()) {
- IAggregateWorkingSet agWs = (IAggregateWorkingSet) newWorkingSet;
- IWorkingSet[] comps = agWs.getComponents();
- if (comps.length > 1) {
- viewer.getCommonNavigator().setWorkingSetLabel(Messages.WorkingSetActionProvider_multipleWorkingSets);
- } else if (comps.length > 0) {
- viewer.getCommonNavigator().setWorkingSetLabel(comps[0].getLabel());
- } else {
- viewer.getCommonNavigator().setWorkingSetLabel(null);
- }
- } else
- viewer.getCommonNavigator().setWorkingSetLabel(workingSet.getLabel());
- } else {
- viewer.getCommonNavigator().setWorkingSetLabel(null);
- }
-
- viewer.getFrameList().reset();
- }
- };
-
- /* default */ WorkingSetManagerListener managerChangeListener = new WorkingSetManagerListener();
-
- private IExtensionActivationListener activationListener = new IExtensionActivationListener() {
-
- private IWorkingSet savedWorkingSet;
-
- @Override
- public void onExtensionActivation(String aViewerId, String[] theNavigatorExtensionIds, boolean isActive) {
-
- for (int i = 0; i < theNavigatorExtensionIds.length; i++) {
- if (WorkingSetsContentProvider.EXTENSION_ID.equals(theNavigatorExtensionIds[i])) {
- if (isActive) {
- extensionStateModel = contentService.findStateModel(WorkingSetsContentProvider.EXTENSION_ID);
- workingSetRootModeActionGroup.setStateModel(extensionStateModel);
- extensionStateModel.addPropertyChangeListener(topLevelModeListener);
-
- if (savedWorkingSet != null) {
- setWorkingSet(savedWorkingSet);
- }
- managerChangeListener.listen();
-
- } else {
- savedWorkingSet = workingSet;
- setWorkingSet(null);
- viewer.getCommonNavigator().setWorkingSetLabel(null);
- managerChangeListener.ignore();
- workingSetRootModeActionGroup.setShowTopLevelWorkingSets(false);
- extensionStateModel.removePropertyChangeListener(topLevelModeListener);
-
- }
- }
- }
- }
-
- };
-
- @Override
- public void init(ICommonActionExtensionSite site) {
- viewer = (CommonViewer) site.getStructuredViewer();
- contentService = site.getContentService();
- filterService = (NavigatorFilterService) contentService.getFilterService();
- originalViewerInput = ViewRoot.getInstance();
-
- extensionStateModel = contentService.findStateModel(WorkingSetsContentProvider.EXTENSION_ID);
-
- workingSetActionGroup = new WorkingSetFilterActionGroup(site.getViewSite().getShell(), filterChangeListener);
- workingSetRootModeActionGroup = new WorkingSetRootModeActionGroup(viewer, extensionStateModel);
-
- topLevelModeListener = new IPropertyChangeListener() {
- @Override
- public void propertyChange(PropertyChangeEvent event) {
- setWorkingSet(workingSet);
- viewer.getFrameList().reset();
- }
- };
-
- if (contentService.isActive(WorkingSetsContentProvider.EXTENSION_ID)) {
- managerChangeListener.listen();
- extensionStateModel.addPropertyChangeListener(topLevelModeListener);
- }
-
- contentService.getActivationService().addExtensionActivationListener(activationListener);
- }
-
- /**
- * Restores the working set filter from the persistence store.
- */
- protected void initWorkingSetFilter(String workingSetName) {
- IWorkingSet workingSet = null;
-
- if (workingSetName != null && workingSetName.length() > 0) {
- IWorkingSetManager workingSetManager = PlatformUI.getWorkbench().getWorkingSetManager();
- workingSet = workingSetManager.getWorkingSet(workingSetName);
- } else if (PlatformUI.getPreferenceStore().getBoolean(IWorkbenchPreferenceConstants.USE_WINDOW_WORKING_SET_BY_DEFAULT)) {
- // use the window set by default if the global preference is set
- workingSet = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getAggregateWorkingSet();
- }
-
- if (workingSet != null) {
- setWorkingSet(workingSet);
- }
- }
-
- /* default */ void setWorkingSetFilter(IWorkingSet workingSet) {
- setWorkingSetFilter(workingSet, true);
- }
-
- private void setWorkingSetFilter(IWorkingSet workingSet, boolean firstTime) {
- WorkingSetFilter workingSetFilter = null;
- ViewerFilter[] filters = viewer.getFilters();
- for (int i = 0; i < filters.length; i++) {
- if (filters[i] instanceof WorkingSetFilter) {
- workingSetFilter = (WorkingSetFilter) filters[i];
- break;
- }
- }
- if (workingSetFilter == null) {
- if (firstTime) {
- filterService.addActiveFilterIds(new String[] { WORKING_SET_FILTER_ID });
- filterService.updateViewer();
- setWorkingSetFilter(workingSet, false);
- return;
- }
-
- IStatus status = new Status(IStatus.ERROR, UIPlugin.getUniqueIdentifier(),
- "Required filter " + WORKING_SET_FILTER_ID //$NON-NLS-1$
- + " is not present. Working set support will not function correctly."); //$NON-NLS-1$
- UIPlugin.getDefault().getLog().log(status);
- return;
- }
- workingSetFilter.setActive(extensionStateModel.getBooleanProperty(WorkingSetsContentProvider.SHOW_TOP_LEVEL_WORKING_SETS));
- }
-
- /**
- * Set current active working set.
- *
- * @param workingSet
- * working set to be activated, may be <code>null</code>
- */
- protected void setWorkingSet(IWorkingSet workingSet) {
- this.workingSet = workingSet;
- emptyWorkingSet = workingSet != null && workingSet.isAggregateWorkingSet() && workingSet.isEmpty();
-
- ignoreFilterChangeEvents = true;
- try {
- workingSetActionGroup.setWorkingSet(workingSet);
- } finally {
- ignoreFilterChangeEvents = false;
- }
-
- if (viewer != null) {
- setWorkingSetFilter(workingSet);
- if (workingSet == null || emptyWorkingSet
- || !extensionStateModel.getBooleanProperty(WorkingSetsContentProvider.SHOW_TOP_LEVEL_WORKING_SETS)) {
- if (viewer.getInput() != originalViewerInput) {
- viewer.setInput(originalViewerInput);
- } else {
- viewer.refresh();
- }
- } else {
- if (!workingSet.isAggregateWorkingSet()) {
- IWorkingSetManager workingSetManager = PlatformUI.getWorkbench().getWorkingSetManager();
- viewer.setInput(workingSetManager.createAggregateWorkingSet(
- "", "", new IWorkingSet[] { workingSet })); //$NON-NLS-1$ //$NON-NLS-2$
- } else {
- viewer.setInput(workingSet);
- }
- }
- }
- }
-
- @Override
- public void restoreState(final IMemento aMemento) {
- super.restoreState(aMemento);
-
- // Need to run this async to avoid being reentered when processing a selection change
- viewer.getControl().getShell().getDisplay().asyncExec(new Runnable() {
- @Override
- public void run() {
- boolean showWorkingSets = true;
- if (aMemento != null) {
- Integer showWorkingSetsInt = aMemento
- .getInteger(WorkingSetsContentProvider.SHOW_TOP_LEVEL_WORKING_SETS);
- showWorkingSets = showWorkingSetsInt == null || showWorkingSetsInt.intValue() == 1;
- extensionStateModel.setBooleanProperty(WorkingSetsContentProvider.SHOW_TOP_LEVEL_WORKING_SETS,
- showWorkingSets);
- workingSetRootModeActionGroup.setShowTopLevelWorkingSets(showWorkingSets);
-
- String lastWorkingSetName = aMemento.getString(TAG_CURRENT_WORKING_SET_NAME);
- initWorkingSetFilter(lastWorkingSetName);
- } else {
- showWorkingSets = false;
-
- extensionStateModel.setBooleanProperty(WorkingSetsContentProvider.SHOW_TOP_LEVEL_WORKING_SETS,
- showWorkingSets);
- workingSetRootModeActionGroup.setShowTopLevelWorkingSets(showWorkingSets);
- }
- }
- });
- }
-
- @Override
- public void saveState(IMemento aMemento) {
- super.saveState(aMemento);
-
- if (aMemento != null) {
- int showWorkingSets = extensionStateModel
- .getBooleanProperty(WorkingSetsContentProvider.SHOW_TOP_LEVEL_WORKING_SETS) ? 1 : 0;
- aMemento.putInteger(WorkingSetsContentProvider.SHOW_TOP_LEVEL_WORKING_SETS, showWorkingSets);
-
- if (workingSet != null) {
- aMemento.putString(TAG_CURRENT_WORKING_SET_NAME, workingSet.getName());
- }
- }
-
- }
-
- @Override
- public void fillActionBars(IActionBars actionBars) {
- if (!contributedToViewMenu) {
- try {
- super.fillActionBars(actionBars);
- workingSetActionGroup.fillActionBars(actionBars);
- if (workingSetRootModeActionGroup != null) {
- workingSetRootModeActionGroup.fillActionBars(actionBars);
- }
- } finally {
- contributedToViewMenu = true;
- }
- }
- }
-
- @Override
- public void dispose() {
- super.dispose();
- workingSetActionGroup.dispose();
- if (workingSetRootModeActionGroup != null) {
- workingSetRootModeActionGroup.dispose();
- }
-
- managerChangeListener.ignore();
- extensionStateModel.removePropertyChangeListener(topLevelModeListener);
-
- contentService.getActivationService().removeExtensionActivationListener(activationListener);
- }
-
- /**
- * This is used only for the tests.
- *
- * @return a PropertyChangeListener
- */
- public IPropertyChangeListener getFilterChangeListener() {
- return filterChangeListener;
- }
-
-}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/editor/AbstractCustomFormToolkitEditorPage.java b/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/editor/AbstractCustomFormToolkitEditorPage.java
deleted file mode 100644
index d905adccd..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/editor/AbstractCustomFormToolkitEditorPage.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.te.ui.views.editor;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.tm.te.ui.forms.CustomFormToolkit;
-import org.eclipse.ui.forms.IManagedForm;
-
-/**
- * Abstract details editor page implementation managing
- * an custom form toolkit instance.
- */
-public class AbstractCustomFormToolkitEditorPage extends AbstractEditorPage {
- // Reference to the form toolkit instance
- private CustomFormToolkit toolkit = null;
-
- /**
- * Returns the custom form toolkit instance.
- *
- * @return The custom form toolkit instance or <code>null</code>.
- */
- protected final CustomFormToolkit getFormToolkit() {
- return toolkit;
- }
-
- /**
- * Sets the custom form toolkit instance.
- *
- * @param toolkit The custom form toolkit instance or <code>null</code>.
- */
- protected final void setFormToolkit(CustomFormToolkit toolkit) {
- this.toolkit = toolkit;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.forms.editor.FormPage#createFormContent(org.eclipse.ui.forms.IManagedForm)
- */
- @Override
- protected void createFormContent(IManagedForm managedForm) {
- super.createFormContent(managedForm);
-
- Assert.isNotNull(managedForm);
-
- // Create the toolkit instance
- toolkit = new CustomFormToolkit(managedForm.getToolkit());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.forms.editor.FormPage#dispose()
- */
- @Override
- public void dispose() {
- if (toolkit != null) { toolkit.dispose(); toolkit = null; }
- super.dispose();
- }
-}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/internal/editor/Editor.java b/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/internal/editor/Editor.java
deleted file mode 100644
index 49460e3c9..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/internal/editor/Editor.java
+++ /dev/null
@@ -1,215 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.te.ui.views.internal.editor;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.tm.te.ui.views.extensions.EditorPageBinding;
-import org.eclipse.tm.te.ui.views.extensions.EditorPageBindingExtensionPointManager;
-import org.eclipse.tm.te.ui.views.extensions.EditorPageExtensionPointManager;
-import org.eclipse.tm.te.ui.views.interfaces.IEditorPage;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorSite;
-import org.eclipse.ui.IMemento;
-import org.eclipse.ui.IPersistable;
-import org.eclipse.ui.IPersistableEditor;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.XMLMemento;
-import org.eclipse.ui.forms.editor.FormEditor;
-import org.eclipse.ui.forms.editor.IFormPage;
-
-
-/**
- * Details editor.
- */
-public class Editor extends FormEditor implements IPersistableEditor {
-
- // The reference to an memento to restore once the editor got activated
- private IMemento mementoToRestore;
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.forms.editor.FormEditor#addPages()
- */
- @Override
- protected void addPages() {
- // Read extension point and add the contributed pages.
- IEditorInput input = getEditorInput();
- // Get all applicable editor page bindings
- EditorPageBinding[] bindings = EditorPageBindingExtensionPointManager.getInstance().getApplicableEditorPageBindings(input);
- for (EditorPageBinding binding : bindings) {
- String pageId = binding.getPageId();
- if (pageId != null) {
- // Get the corresponding editor page instance
- IEditorPage page = EditorPageExtensionPointManager.getInstance().getEditorPage(pageId, true);
- if (page != null) {
- try {
- // Associate this editor with the page instance.
- // This is typically done in the constructor, but we are
- // utilizing a default constructor to instantiate the page.
- page.initialize(this);
-
- // Read in the "insertBefore" and "insertAfter" properties of the binding
- String insertBefore = binding.getInsertBefore().trim();
- String insertAfter = binding.getInsertAfter().trim();
-
- // insertBefore will eclipse insertAfter is both is specified.
- if (!"".equals(insertBefore)) { //$NON-NLS-1$
- // If it is "first", we insert the page at index 0
- if ("first".equalsIgnoreCase(insertBefore)) { //$NON-NLS-1$
- addPage(0, page);
- } else {
- // Find the index of the page we shall insert this page before
- int index = getIndexOf(insertBefore);
- if (index != -1) addPage(index, page);
- else addPage(page);
- }
- } else if (!"".equals(insertAfter) && !"last".equalsIgnoreCase(insertAfter)) { //$NON-NLS-1$ //$NON-NLS-2$
- // Find the index of the page we shall insert this page after
- int index = getIndexOf(insertAfter);
- if (index != -1 && index + 1 < pages.size()) addPage(index + 1, page);
- else addPage(page);
- } else {
- // And add the page to the editor as last page.
- addPage(page);
- }
- } catch (PartInitException e) { /* ignored on purpose */ }
- }
- }
- }
-
- if (mementoToRestore != null) {
- // Loop over all registered pages and pass on the editor specific memento
- // to the pages which implements IPersistableEditor as well
- for (Object page : pages) {
- if (page instanceof IPersistableEditor) {
- ((IPersistableEditor)page).restoreState(mementoToRestore);
- }
- }
- mementoToRestore = null;
- }
- }
-
- /**
- * Returns the index of the page with the given id.
- *
- * @param pageId The page id. Must not be <code>null</code>.
- * @return The page index or <code>-1</code> if not found.
- */
- private int getIndexOf(String pageId) {
- Assert.isNotNull(pageId);
- for (int i = 0; i < pages.size(); i++) {
- Object page = pages.get(i);
- if (page instanceof IFormPage) {
- IFormPage fpage = (IFormPage)page;
- if (fpage.getId().equals(pageId))
- return i;
- }
- }
- return -1;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.forms.editor.FormPage#init(org.eclipse.ui.IEditorSite, org.eclipse.ui.IEditorInput)
- */
- @Override
- public void init(IEditorSite site, IEditorInput input) throws PartInitException {
- super.init(site, input);
-
- // Update the part name
- if (!"".equals(input.getName())) setPartName(input.getName()); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.part.EditorPart#doSave(org.eclipse.core.runtime.IProgressMonitor)
- */
- @Override
- public void doSave(IProgressMonitor monitor) {
- commitPages(true);
- editorDirtyStateChanged();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.part.EditorPart#doSaveAs()
- */
- @Override
- public void doSaveAs() {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.part.EditorPart#isSaveAsAllowed()
- */
- @Override
- public boolean isSaveAsAllowed() {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IPersistableEditor#restoreState(org.eclipse.ui.IMemento)
- */
- @Override
- public void restoreState(IMemento memento) {
- // Get the editor specific memento
- mementoToRestore = internalGetMemento(memento);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IPersistable#saveState(org.eclipse.ui.IMemento)
- */
- @Override
- public void saveState(IMemento memento) {
- // Get the editor specific memento
- memento = internalGetMemento(memento);
- // Loop over all registered pages and pass on the editor specific memento
- // to the pages which implements IPersistable as well
- for (Object page : pages) {
- if (page instanceof IPersistable) {
- ((IPersistable)page).saveState(memento);
- }
- }
- }
-
- /**
- * Internal helper method accessing our editor local child memento
- * from the given parent memento.
- */
- private IMemento internalGetMemento(IMemento memento) {
- // Assume the editor memento to be the same as the parent memento
- IMemento editorMemento = memento;
-
- // If the parent memento is not null, create a child within the parent
- if (memento != null) {
- editorMemento = memento.getChild(Editor.class.getName());
- if (editorMemento == null) {
- editorMemento = memento.createChild(Editor.class.getName());
- }
- } else {
- // The parent memento is null. Create a new internal instance
- // of a XMLMemento. This case is happening if the user switches
- // to another perspective an the view becomes visible by this switch.
- editorMemento = XMLMemento.createWriteRoot(Editor.class.getName());
- }
-
- return editorMemento;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.part.MultiPageEditorPart#getAdapter(java.lang.Class)
- */
- @Override
- public Object getAdapter(Class adapter) {
- // We pass on the adapt request to the currently active page
- Object adapterInstance = getActivePageInstance() != null ? getActivePageInstance().getAdapter(adapter) : null;
- if (adapterInstance == null) {
- // If failed to adapt via the currently active page, pass on to the super implementation
- adapterInstance = super.getAdapter(adapter);
- }
- return adapterInstance;
- }
-}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/workingsets/OthersWorkingSetElementUpdater.java b/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/workingsets/OthersWorkingSetElementUpdater.java
deleted file mode 100644
index afb8eb119..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/workingsets/OthersWorkingSetElementUpdater.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.te.ui.views.workingsets;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.tm.te.runtime.interfaces.workingsets.IWorkingSetElement;
-import org.eclipse.tm.te.ui.views.internal.ViewRoot;
-import org.eclipse.ui.IWorkingSet;
-import org.eclipse.ui.IWorkingSetManager;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.navigator.CommonViewer;
-
-/**
- * "Others" working set element updater.
- */
-public class OthersWorkingSetElementUpdater extends WorkingSetElementUpdater {
- // The reference to the "Others" working set
- private IWorkingSet othersWorkingSet;
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.views.workingsets.WorkingSetElementUpdater#add(org.eclipse.ui.IWorkingSet)
- */
- @Override
- public void add(IWorkingSet workingSet) {
- Assert.isTrue(othersWorkingSet == null);
- othersWorkingSet = workingSet;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.views.workingsets.WorkingSetElementUpdater#remove(org.eclipse.ui.IWorkingSet)
- */
- @Override
- public boolean remove(IWorkingSet workingSet) {
- Assert.isTrue(othersWorkingSet == workingSet);
- othersWorkingSet = null;
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.views.workingsets.WorkingSetElementUpdater#contains(org.eclipse.ui.IWorkingSet)
- */
- @Override
- public boolean contains(IWorkingSet workingSet) {
- return othersWorkingSet == workingSet;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.views.workingsets.WorkingSetElementUpdater#onUpdateWorkingSets(org.eclipse.ui.navigator.CommonViewer, org.eclipse.ui.IWorkingSet[])
- */
- @Override
- protected void onUpdateWorkingSets(CommonViewer viewer, IWorkingSet[] workingsets) {
- Assert.isNotNull(viewer);
- Assert.isNotNull(workingsets);
-
- // The list of elements not be contained by any other working set
- List<WorkingSetElementHolder> otherElements = new ArrayList<WorkingSetElementHolder>();
-
- // Get all (root) elements from the common viewer
- Object[] elements = viewer.getNavigatorContentService().createCommonContentProvider().getElements(ViewRoot.getInstance());
-
- // Get all working sets
- IWorkingSetManager manager = PlatformUI.getWorkbench().getWorkingSetManager();
- IWorkingSet[] allWorkingSets = manager.getAllWorkingSets();
-
- // Loop the elements and check if they are contained in a working set
- for (Object element : elements) {
- if (!(element instanceof IWorkingSetElement)) continue;
-
- boolean isContained = isContained((IWorkingSetElement)element, allWorkingSets);
- if (!isContained) {
- WorkingSetElementHolder holder = new WorkingSetElementHolder(othersWorkingSet.getName(), ((IWorkingSetElement)element).getElementId());
- holder.setElement((IWorkingSetElement)element);
- otherElements.add(holder);
- }
- }
-
- othersWorkingSet.setElements(otherElements.toArray(new IAdaptable[otherElements.size()]));
- }
-
- /**
- * Walks over the given working set list and checks if the element is contained in
- * one of them.
- *
- * @param element The element. Must not be <code>null</code>.
- * @param allWorkingSets The list of working sets. Must not be <code>null</code>.
- *
- * @return <code>True</code> if the element is contained in at least one of the given working sets, <code>false</code> otherwise.
- */
- protected boolean isContained(IWorkingSetElement element, IWorkingSet[] allWorkingSets) {
- Assert.isNotNull(element);
- Assert.isNotNull(allWorkingSets);
-
- boolean contained = false;
-
- for (IWorkingSet workingSet : allWorkingSets) {
- IAdaptable[] wsElements = workingSet.getElements();
- for (IAdaptable wsElement : wsElements) {
- if (!(wsElement instanceof WorkingSetElementHolder)) continue;
-
- IWorkingSetElement candidate = ((WorkingSetElementHolder)wsElement).getElement();
- String candidateId = ((WorkingSetElementHolder)wsElement).getElementId();
-
- if (element.equals(candidate)) {
- contained = true;
- break;
- } else if (candidate == null && element.getElementId().equals(candidateId)) {
- contained = true;
- ((WorkingSetElementHolder)wsElement).setElement(element);
- break;
- }
- }
- if (contained) break;
- }
-
- return contained;
- }
-}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/workingsets/WorkingSetViewerSorter.java b/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/workingsets/WorkingSetViewerSorter.java
deleted file mode 100644
index da2679143..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.ui.views/src/org/eclipse/tm/te/ui/views/workingsets/WorkingSetViewerSorter.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.te.ui.views.workingsets;
-
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.tm.te.ui.trees.TreeViewerSorter;
-import org.eclipse.tm.te.ui.views.interfaces.workingsets.IWorkingSetIDs;
-import org.eclipse.ui.IWorkingSet;
-
-/**
- * Working set viewer sorter implementation.
- */
-public class WorkingSetViewerSorter extends TreeViewerSorter {
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.trees.TreeViewerSorter#doCompare(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object, java.lang.String, int, int)
- */
- @Override
- protected int doCompare(Viewer viewer, Object node1, Object node2, String sortColumn, int index, int inverter) {
- if (node1 instanceof IWorkingSet && node2 instanceof IWorkingSet) {
- // The "Others" working set will appear always at the bottom of the tree
- if (IWorkingSetIDs.ID_WS_OTHERS.equals(((IWorkingSet)node1).getId())) {
- return 1;
- }
- if (IWorkingSetIDs.ID_WS_OTHERS.equals(((IWorkingSet)node2).getId())) {
- return -1;
- }
- }
- return super.doCompare(viewer, node1, node2, sortColumn, index, inverter);
- }
-
-}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tm.te.ui/META-INF/MANIFEST.MF
deleted file mode 100644
index 4a0932cca..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.ui/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,38 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.tm.te.ui;singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Bundle-Activator: org.eclipse.tm.te.ui.activator.UIPlugin
-Bundle-Vendor: %providerName
-Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
- org.eclipse.core.expressions;bundle-version="3.4.300",
- org.eclipse.ui;bundle-version="3.7.0",
- org.eclipse.ui.forms;bundle-version="3.5.100",
- org.eclipse.help;bundle-version="3.5.100",
- org.eclipse.tm.te.runtime;bundle-version="1.0.0",
- org.eclipse.tm.te.runtime.concurrent;bundle-version="1.0.0",
- org.eclipse.tm.te.runtime.model;bundle-version="1.0.0",
- org.eclipse.tm.te.runtime.statushandler;bundle-version="1.0.0",
- org.eclipse.tm.te.core;bundle-version="1.0.0",
- org.eclipse.tm.te.ui.swt;bundle-version="1.0.0",
- org.eclipse.tm.te.ui.forms;bundle-version="1.0.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Bundle-ActivationPolicy: lazy
-Bundle-Localization: plugin
-Export-Package: org.eclipse.tm.te.ui,
- org.eclipse.tm.te.ui.activator,
- org.eclipse.tm.te.ui.decorators.images,
- org.eclipse.tm.te.ui.dialogs,
- org.eclipse.tm.te.ui.events,
- org.eclipse.tm.te.ui.interfaces,
- org.eclipse.tm.te.ui.internal.executors;x-internal:=true,
- org.eclipse.tm.te.ui.nls,
- org.eclipse.tm.te.ui.statushandler,
- org.eclipse.tm.te.ui.tables,
- org.eclipse.tm.te.ui.tables.properties,
- org.eclipse.tm.te.ui.trees,
- org.eclipse.tm.te.ui.wizards,
- org.eclipse.tm.te.ui.wizards.interfaces,
- org.eclipse.tm.te.ui.wizards.newWizard,
- org.eclipse.tm.te.ui.wizards.pages
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui/plugin.xml b/target_explorer/plugins/org.eclipse.tm.te.ui/plugin.xml
deleted file mode 100644
index dec1b0987..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.ui/plugin.xml
+++ /dev/null
@@ -1,87 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
- <extension-point id="newWizards" name="New Target Wizards" schema="schema/newWizards.exsd"/>
-
-<!-- New target wizard contributions -->
-
- <extension point="org.eclipse.tm.te.ui.newWizards">
- <category
- id="org.eclipse.tm.te.ui.newWizards.category.general"
- name="%NewWizards.category.name">
- </category>
- </extension>
-
-<!-- Command contributions -->
- <extension point="org.eclipse.ui.commands">
- <category
- id="org.eclipse.tm.te.ui.commands.category"
- name="%Command.category.name">
- </category>
-
- <command
- categoryId="org.eclipse.tm.te.ui.commands.category"
- defaultHandler="org.eclipse.tm.te.ui.wizards.newWizard.NewWizardCommandHandler"
- description="%Command.newWizards.description"
- helpContextId="org.eclipse.tm.te.ui.command.newWizards"
- id="org.eclipse.tm.te.ui.command.newWizards"
- name="%Command.newWizards.name">
- </command>
- </extension>
-
-<!-- Command image contributions -->
- <extension point="org.eclipse.ui.commandImages">
- <image
- commandId="org.eclipse.tm.te.ui.command.newWizards"
- disabledIcon="icons/dlcl16/newtarget_wiz.gif"
- icon="icons/elcl16/newtarget_wiz.gif">
- </image>
- </extension>
-
-<!-- Context and binding contributions -->
- <extension point="org.eclipse.ui.contexts">
- <context
- description="%context.targetexplorer.description"
- id="org.eclipse.tm.te.ui.views.TargetExplorer"
- name="%context.targetexplorer.name"
- parentId="org.eclipse.ui.contexts.window">
- </context>
- </extension>
-
- <extension point="org.eclipse.ui.bindings">
- <key
- commandId="org.eclipse.tm.te.ui.command.newWizards"
- contextId="org.eclipse.tm.te.ui.views.TargetExplorer"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="M1+N">
- </key>
- </extension>
-
-<!-- Status handler contributions -->
- <extension point="org.eclipse.tm.te.runtime.statushandler.handlers">
- <handler
- class="org.eclipse.tm.te.ui.statushandler.DefaultStatusHandler"
- id="org.eclipse.tm.te.statushandler.default"
- label="%DefaultStatusHandler.label">
- </handler>
- </extension>
-
-<!-- Executor service contributions -->
- <extension point="org.eclipse.tm.te.runtime.concurrent.executorServices">
- <executorService
- id="org.eclipse.tm.te.ui.executors.SWTDisplay"
- label="Eclipse Platform Display Executor"
- class="org.eclipse.tm.te.ui.internal.executors.SWTDisplayExecutor">
- </executorService>
- </extension>
-
-<!-- Executor utility delegate contributions -->
- <extension point="org.eclipse.tm.te.runtime.concurrent.executorUtilDelegates">
- <executorUtilDelegate
- class="org.eclipse.tm.te.ui.internal.executors.SWTDisplayExecutorUtilDelegate"
- id="org.eclipse.tm.te.ui.executors.delegate.SWTDisplay"
- label="%SWTDisplayExecutorUtilDelegate.label">
- </executorUtilDelegate>
- </extension>
-
-</plugin>
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/decorators/images/ConnectableImageDescriptor.java b/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/decorators/images/ConnectableImageDescriptor.java
deleted file mode 100644
index b6669549b..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/decorators/images/ConnectableImageDescriptor.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.te.ui.decorators.images;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.jface.resource.ImageRegistry;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.tm.te.core.model.interfaces.IConnectable;
-import org.eclipse.tm.te.runtime.model.interfaces.IModelNode;
-import org.eclipse.tm.te.ui.interfaces.ImageConsts;
-import org.eclipse.tm.te.ui.jface.images.AbstractImageDescriptor;
-
-
-/**
- * Connectable node image descriptor implementation.
- */
-public class ConnectableImageDescriptor extends AbstractImageDescriptor {
- // the base image to decorate with overlays
- private Image baseImage;
- // the image size
- private Point imageSize;
-
- // Flags representing the object states to decorate
- private int connectState;
- private int connectSubState;
- private boolean pending;
-
- /**
- * Constructor.
- *
- * @param registry The image registry. Must not be <code>null</code>.
- * @param baseImage The base image. Must not be <code>null</code>.
- * @param node The connectable node. Must not be <code>null</code>.
- */
- public ConnectableImageDescriptor(final ImageRegistry registry, final Image baseImage, final IConnectable node) {
- super(registry);
-
- Assert.isNotNull(baseImage);
- this.baseImage = baseImage;
- imageSize = new Point(baseImage.getImageData().width, baseImage.getImageData().height);
-
- // invoke initialize
- invokeInitialize(node);
-
- // build up the key for the image registry
- defineKey(baseImage.hashCode());
- }
-
- /**
- * Invoke the initialize method.
- * <p>
- * Called from the constructor to initialize the image descriptor. Sub classes
- * can overwrite this method to implement necessary thread-safety.
- *
- * @param node The connectable node. Must not be <code>null</code>.
- */
- protected void invokeInitialize(IConnectable node) {
- Assert.isNotNull(node);
- initialize(node);
- }
-
- /**
- * Initialize the image descriptor from the connectable node.
- *
- * @param node The target node. Must not be <code>null</code>.
- */
- protected void initialize(IConnectable node) {
- Assert.isNotNull(node);
-
- connectState = node.getConnectState();
- connectSubState = node.getConnectSubState();
- pending = node instanceof IModelNode ? ((IModelNode)node).isPending() : false;
- }
-
- protected void defineKey(int hashCode) {
- String key = "CNID:" + //$NON-NLS-1$
- hashCode + ":" + //$NON-NLS-1$
- connectState + ":" + //$NON-NLS-1$
- connectSubState + ":" + //$NON-NLS-1$
- pending;
-
- setDecriptorKey(key);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.resource.CompositeImageDescriptor#drawCompositeImage(int, int)
- */
- @Override
- protected void drawCompositeImage(int width, int height) {
- drawCentered(baseImage, width, height);
-
- if (pending || (connectState == IConnectable.STATE_UNREACHABLE && (connectSubState == IConnectable.SUB_STATE_REBOOT_MANUAL))) {
- drawTopLeft(ImageConsts.BUSY_OVR);
- }
-
- if (connectState == IConnectable.STATE_CONNECTING || connectState == IConnectable.STATE_DISCONNECTING) {
- drawBottomRight(ImageConsts.GOLD_OVR);
- } else if (connectState == IConnectable.STATE_UNREACHABLE) {
- drawBottomRight(ImageConsts.RED_OVR);
- } else if (connectState == IConnectable.STATE_CONNECTED) {
- drawBottomRight(ImageConsts.GREEN_OVR);
- } else if (connectState == IConnectable.STATE_UNCONNECTED) {
- drawBottomRight(ImageConsts.GREY_OVR);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.resource.CompositeImageDescriptor#getSize()
- */
- @Override
- protected Point getSize() {
- return imageSize;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.jface.images.AbstractImageDescriptor#getBaseImage()
- */
- @Override
- protected Image getBaseImage() {
- return baseImage;
- }
-}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/trees/AbstractTreeControl.java b/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/trees/AbstractTreeControl.java
deleted file mode 100644
index 1483c14e9..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/trees/AbstractTreeControl.java
+++ /dev/null
@@ -1,309 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.te.ui.trees;
-
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.jface.action.IMenuListener;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerComparator;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.graphics.Cursor;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.ToolBar;
-import org.eclipse.tm.te.ui.WorkbenchPartControl;
-import org.eclipse.tm.te.ui.forms.CustomFormToolkit;
-import org.eclipse.ui.IWorkbenchActionConstants;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.forms.widgets.Section;
-
-
-/**
- * Abstract tree control implementation.
- */
-public abstract class AbstractTreeControl extends WorkbenchPartControl {
- // Reference to the tree viewer instance
- private TreeViewer viewer;
- // Reference to the selection changed listener
- private ISelectionChangedListener selectionChangedListener;
-
- /**
- * Constructor.
- */
- public AbstractTreeControl() {
- super();
- }
-
- /**
- * Constructor.
- *
- * @param parentPart The parent workbench part this control is embedded in or <code>null</code>.
- */
- public AbstractTreeControl(IWorkbenchPart parentPart) {
- super(parentPart);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.WorkbenchPartControl#dispose()
- */
- @Override
- public void dispose() {
- // Unregister the selection changed listener
- if (selectionChangedListener != null) {
- if (getViewer() != null) {
- getViewer().removeSelectionChangedListener(selectionChangedListener);
- }
- selectionChangedListener = null;
- }
-
- super.dispose();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.WorkbenchPartControl#setupFormPanel(org.eclipse.swt.widgets.Composite, org.eclipse.tm.te.ui.forms.CustomFormToolkit)
- */
- @Override
- public void setupFormPanel(Composite parent, CustomFormToolkit toolkit) {
- super.setupFormPanel(parent, toolkit);
-
- // Create the tree viewer
- viewer = doCreateTreeViewer(parent);
- // And configure the tree viewer
- configureTreeViewer(viewer);
-
- // Prepare popup menu and toolbar
- createContributionItems(viewer);
- }
-
- /**
- * Creates the tree viewer instance.
- *
- * @param parent The parent composite. Must not be <code>null</code>.
- * @return The tree viewer.
- */
- protected TreeViewer doCreateTreeViewer(Composite parent) {
- Assert.isNotNull(parent);
- return new TreeViewer(parent, SWT.FULL_SELECTION | SWT.SINGLE);
- }
-
- /**
- * Configure the tree viewer.
- *
- * @param viewer The tree viewer. Must not be <code>null</code>.
- */
- protected void configureTreeViewer(TreeViewer viewer) {
- Assert.isNotNull(viewer);
-
- viewer.setAutoExpandLevel(getAutoExpandLevel());
-
- viewer.setLabelProvider(doCreateTreeViewerLabelProvider(viewer));
- viewer.setContentProvider(doCreateTreeViewerContentProvider(viewer));
- viewer.setComparator(doCreateTreeViewerComparator(viewer));
-
- viewer.getTree().setLayoutData(doCreateTreeViewerLayoutData(viewer));
-
- // Attach the selection changed listener
- selectionChangedListener = doCreateTreeViewerSelectionChangedListener(viewer);
- if (selectionChangedListener != null) {
- viewer.addSelectionChangedListener(selectionChangedListener);
- }
- }
-
- /**
- * Returns the number of levels to auto expand.
- * If the method returns <code>0</code>, no auto expansion will happen
- *
- * @return The number of levels to auto expand or <code>0</code>.
- */
- protected int getAutoExpandLevel() {
- return 2;
- }
-
- /**
- * Creates the tree viewer layout data instance.
- *
- * @param viewer The tree viewer. Must not be <code>null</code>.
- * @return The tree viewer layout data instance.
- */
- protected Object doCreateTreeViewerLayoutData(TreeViewer viewer) {
- return new GridData(GridData.FILL_BOTH);
- }
-
- /**
- * Creates the tree viewer label provider instance.
- *
- * @param viewer The tree viewer. Must not be <code>null</code>.
- * @return The tree viewer label provider instance.
- */
- protected abstract ILabelProvider doCreateTreeViewerLabelProvider(TreeViewer viewer);
-
- /**
- * Creates the tree viewer content provider instance.
- *
- * @param viewer The tree viewer. Must not be <code>null</code>.
- * @return The tree viewer content provider instance.
- */
- protected abstract ITreeContentProvider doCreateTreeViewerContentProvider(TreeViewer viewer);
-
- /**
- * Creates the tree viewer comparator instance.
- *
- * @param viewer The tree viewer. Must not be <code>null</code>.
- * @return The tree viewer comparator instance or <code>null</code> to turn of sorting.
- */
- protected ViewerComparator doCreateTreeViewerComparator(TreeViewer viewer) {
- Assert.isNotNull(viewer);
- return null;
- }
-
- /**
- * Creates a new selection changed listener instance.
- *
- * @param viewer The tree viewer. Must not be <code>null</code>.
- * @return The selection changed listener instance.
- */
- protected abstract ISelectionChangedListener doCreateTreeViewerSelectionChangedListener(TreeViewer viewer);
-
- /**
- * Create the context menu and toolbar groups.
- *
- * @param viewer The tree viewer instance. Must not be <code>null</code>.
- */
- protected void createContributionItems(TreeViewer viewer) {
- Assert.isNotNull(viewer);
-
- // Create the menu manager
- MenuManager manager = new MenuManager("#PopupMenu"); //$NON-NLS-1$
- // Attach the menu listener
- manager.addMenuListener(new IMenuListener() {
- @Override
- public void menuAboutToShow(IMenuManager manager) {
- manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
- }
- });
- // All items are removed when menu is closing
- manager.setRemoveAllWhenShown(true);
- // Associated with the tree
- viewer.getTree().setMenu(manager.createContextMenu(viewer.getTree()));
-
- // Register the context menu at the parent workbench part site.
- if (getParentPart() != null && getParentPart().getSite() != null && getContextMenuId() != null) {
- getParentPart().getSite().registerContextMenu(getContextMenuId(), manager, viewer);
- }
-
- // The toolbar is a bit more complicated as we want to have the
- // toolbar placed within the section title.
- createToolbarContributionItem(viewer);
- }
-
- /**
- * Returns the context menu id.
- *
- * @return The context menu id.
- */
- protected abstract String getContextMenuId();
-
- /**
- * Creates the toolbar within the section parent of the given tree viewer.
- *
- * @param viewer The tree viewer instance. Must not be <code>null</code>.
- */
- protected void createToolbarContributionItem(TreeViewer viewer) {
- Assert.isNotNull(viewer);
-
- // Determine the section parent from the tree viewer
- Composite parent = viewer.getTree().getParent();
- while (parent != null && !(parent instanceof Section)) {
- parent = parent.getParent();
- }
-
- // We are done here if we cannot find a section parent or the parent is disposed
- if (parent == null || parent.isDisposed()) {
- return;
- }
-
- // Create the toolbar control
- ToolBar toolbar = new ToolBar(parent, SWT.FLAT | SWT.HORIZONTAL | SWT.RIGHT);
-
- // The cursor within the toolbar shall change to an hand
- final Cursor handCursor = new Cursor(parent.getDisplay(), SWT.CURSOR_HAND);
- toolbar.setCursor(handCursor);
- // Cursor needs to be explicitly disposed
- toolbar.addDisposeListener(new DisposeListener() {
- @Override
- public void widgetDisposed(DisposeEvent e) {
- if (handCursor.isDisposed() == false) {
- handCursor.dispose();
- }
- }
- });
-
- // If the parent composite is a forms section, set the toolbar
- // as text client to the section header
- if (parent instanceof Section) {
- Section section = (Section)parent;
- // Set the toolbar as text client
- section.setTextClient(toolbar);
- }
-
- // create the toolbar items
- createToolBarItems(toolbar);
- }
-
- /**
- * Create the toolbar items to be added to the toolbar. Override
- * to add the wanted toolbar items.
- * <p>
- * <b>Note:</b> The toolbar items are added from left to right.
- *
- * @param toolbar The toolbar to add the toolbar items too. Must not be <code>null</code>.
- */
- protected void createToolBarItems(ToolBar toolbar) {
- Assert.isNotNull(toolbar);
- }
-
- /**
- * Returns the viewer instance.
- *
- * @return The viewer instance or <code>null</code>.
- */
- public Viewer getViewer() {
- return viewer;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
- */
- @Override
- public Object getAdapter(Class adapter) {
- if (Viewer.class.isAssignableFrom(adapter)) {
- // We have to double check if our real viewer is assignable to
- // the requested Viewer class.
- Viewer viewer = getViewer();
- if (!adapter.isAssignableFrom(viewer.getClass())) {
- viewer = null;
- }
- return viewer;
- }
-
- return super.getAdapter(adapter);
- }
-
-}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/trees/TreeViewerComparator.java b/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/trees/TreeViewerComparator.java
deleted file mode 100644
index c340244d7..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/trees/TreeViewerComparator.java
+++ /dev/null
@@ -1,178 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.te.ui.trees;
-
-import java.util.Arrays;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.tm.te.ui.AbstractViewerComparator;
-
-
-/**
- * Common tree control viewer comparator implementation.
- */
-public class TreeViewerComparator extends AbstractViewerComparator {
- private final ILabelProvider labelProvider;
-
- /**
- * Constructor.
- *
- * @param viewer The parent viewer. Must not be <code>null</code>.
- * @param labelProvider The label provider. Must not be <code>null</code>.
- */
- public TreeViewerComparator(Viewer viewer, ILabelProvider labelProvider) {
- super(viewer);
- Assert.isNotNull(labelProvider);
- this.labelProvider = labelProvider;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.AbstractViewerComparator#doDetermineInverter(org.eclipse.jface.viewers.Viewer)
- */
- @Override
- protected int doDetermineInverter(Viewer viewer) {
- int inverter = 1;
-
- // Viewer must be of type TreeViewer and the tree must not be disposed yet
- if (viewer instanceof TreeViewer && ((TreeViewer)viewer).getTree() != null) {
- Tree tree = ((TreeViewer)viewer).getTree();
- if (!tree.isDisposed() && tree.getSortDirection() == SWT.DOWN) inverter = -1;
- }
-
- return inverter;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.AbstractViewerComparator#doGetText(java.lang.Object, int)
- */
- @Override
- protected String doGetText(Object node, int index) {
- if (node != null && labelProvider != null) {
- return labelProvider.getText(node);
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.AbstractViewerComparator#doGetSortColumnLabel(org.eclipse.jface.viewers.Viewer)
- */
- @Override
- protected String doGetSortColumnLabel(Viewer viewer) {
- // Viewer must be of type TreeViewer and the tree must not be disposed yet
- if (viewer instanceof TreeViewer && ((TreeViewer)viewer).getTree() != null && !((TreeViewer)viewer).getTree().isDisposed()) {
- Tree tree = ((TreeViewer)viewer).getTree();
- return tree.getSortColumn() != null ? tree.getSortColumn().getText() : ""; //$NON-NLS-1$
- }
- return ""; //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.AbstractViewerComparator#doGetSortColumnIndex(org.eclipse.jface.viewers.Viewer)
- */
- @Override
- protected int doGetSortColumnIndex(Viewer viewer) {
- if (viewer instanceof TreeViewer && ((TreeViewer)viewer).getTree() != null && !((TreeViewer)viewer).getTree().isDisposed()) {
- Tree tree = ((TreeViewer)viewer).getTree();
- return tree.getSortColumn() != null ? Arrays.asList(tree.getColumns()).indexOf(tree.getSortColumn()) : -1;
- }
- return -1;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.te.ui.controls.AbstractViewerComparator#doCompare(java.lang.Object, java.lang.Object, java.lang.String, int, int)
- */
- @Override
- protected int doCompare(Object node1, Object node2, String sortColumn, int index, int inverter) {
- if (node1 == null && node2 == null) return 0;
- if (node1 != null && node2 == null) return 1;
- if (node1 == null && node2 != null) return -1;
-
- // Get the labels
- String text1 = doGetText(node1, index);
- String text2 = doGetText(node2, index);
-
- // Normalize labels
- if (text1 == null) text1 = ""; //$NON-NLS-1$
- if (text2 == null) text2 = ""; //$NON-NLS-1$
-
- // The tree sorts not strictly alphabetical. First comes entries starting with numbers,
- // second entries starting with uppercase and than all the rest. Additional, if a label contains
- // uppercase characters, it is sorted in before any labels being lowercase only.
- if (text1.length() > 0 && text2.length() > 0) {
- // Get the first characters of both
- char c1 = text1.charAt(0);
- char c2 = text2.charAt(0);
-
- if (Character.isDigit(c1) || Character.isDigit(c2)) {
- // Check on the differences. If both are digits, the standard compare will do it
- if (Character.isDigit(c1) && !Character.isDigit(c2)) return -1 * inverter;
- if (!Character.isDigit(c1) && Character.isDigit(c2)) return 1 * inverter;
- }
-
- if (Character.isUpperCase(c1) || Character.isUpperCase(c2)) {
- // Check on the differences. If both are uppercase characters, the standard compare will do it
- if (Character.isUpperCase(c1) && !Character.isUpperCase(c2)) return -1 * inverter;
- if (!Character.isUpperCase(c1) && Character.isUpperCase(c2)) return 1 * inverter;
- }
-
- Matcher m1 = Pattern.compile("(\\D+)(\\d+)").matcher(text1); //$NON-NLS-1$
- Matcher m2 = Pattern.compile("(\\D+)(\\d+)").matcher(text2); //$NON-NLS-1$
- if (m1.matches() && m2.matches()) {
- String p11 = m1.group(1);
- String p12 = m1.group(2);
-
- String p21 = m2.group(1);
- String p22 = m2.group(2);
-
- if (p11 != null && p11.equals(p21)) {
- // Compare the second parts as number
- try {
- int result = 0;
- long l1 = Long.parseLong(p12);
- long l2 = Long.parseLong(p22);
-
- if (l1 > l2) result = 1;
- if (l1 < l2) result = -1;
-
- return result;
- } catch (NumberFormatException e) { /* ignored on purpose */ }
- }
- }
-
- if (text1.matches(".*[A-Z]+.*") || text2.matches(".*[A-Z]+.*")) { //$NON-NLS-1$ //$NON-NLS-2$
- if (text1.matches(".*[A-Z]+.*") && !text2.matches(".*[A-Z]+.*")) return -1 * inverter; //$NON-NLS-1$ //$NON-NLS-2$
- if (!text1.matches(".*[A-Z]+.*") && text2.matches(".*[A-Z]+.*")) return 1 * inverter; //$NON-NLS-1$ //$NON-NLS-2$
-
- // Additionally, it even depends on the position of the first uppercase
- // character if both strings contains them :-(
- int minLength = Math.min(text1.length(), text2.length());
- for (int i = 0; i < minLength; i++) {
- char ch1 = text1.charAt(i);
- char ch2 = text2.charAt(i);
-
- if (Character.isUpperCase(ch1) && !Character.isUpperCase(ch2)) return -1 * inverter;
- if (!Character.isUpperCase(ch1) && Character.isUpperCase(ch2)) return 1 * inverter;
- // If both are uppercase, we break the loop and compare as usual
- if (Character.isUpperCase(ch1) && Character.isUpperCase(ch2)) break;
- }
- }
- }
-
- // Compare the text alphabetical
- return getComparator().compare(text1, text2) * inverter;
- }
-}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/wizards/interfaces/ISharedDataWizardPage.java b/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/wizards/interfaces/ISharedDataWizardPage.java
deleted file mode 100644
index e3c133ff1..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/wizards/interfaces/ISharedDataWizardPage.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.te.ui.wizards.interfaces;
-
-import org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer;
-
-/**
- * Public interface for wizard or dialog pages or wizard page
- * widgets sharing a common data object.
- */
-public interface ISharedDataWizardPage {
-
- /**
- * Initialize the page widgets based of the data from the given properties container.
- * <p>
- * This method may called multiple times during the lifetime of the page and
- * the given properties container might be even <code>null</code>.
- *
- * @param data The properties container or <code>null</code>.
- */
- public void setupData(IPropertiesContainer data);
-
- /**
- * Extract the data from the page widgets and write it back to the given
- * properties container.
- * <p>
- * This method may called multiple times during the lifetime of the page and
- * the given properties container might be even <code>null</code>.
- *
- * @param data The properties container or <code>null</code>.
- */
- public void extractData(IPropertiesContainer data);
-
- /**
- * Initialize the given properties container with default values for the data
- * this page is managing.
- * <p>
- * This method is called once for each wizard page and is typically called from a
- * new target wizard. The page widgets are typically not yet created as this method
- * can be called before the page is set visible.
- *
- * @param data The properties container or <code>null</code>.
- */
- public void initializeData(IPropertiesContainer data);
-
- /**
- * Remove the data of the page widgets from the given properties
- * container.
- * <p>
- * This method may called multiple times during the lifetime of the page and the
- * given properties container might be even <code>null</code>.
- *
- * @param data The properties container or <code>null</code>.
- */
- public void removeData(IPropertiesContainer data);
-}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/wizards/interfaces/IValidatableWizardPage.java b/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/wizards/interfaces/IValidatableWizardPage.java
deleted file mode 100644
index 8698e42d6..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/wizards/interfaces/IValidatableWizardPage.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.te.ui.wizards.interfaces;
-
-import org.eclipse.jface.wizard.WizardPage;
-
-/**
- * Public interface for validatable wizard pages.
- */
-public interface IValidatableWizardPage {
-
- /**
- * Validates the page status.
- * <p>
- * If necessary, set corresponding messages and message types to signal if some
- * control on the page needs attention.
- * <p>
- * Depending on the outcome of the page data validation, call {@link WizardPage#setPageComplete(boolean)}
- * with either <code>true</code> or <code>false</code> to signal if the wizard
- * can finish given the current page data or not.
- */
- public void validatePage();
-}
diff --git a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/wizards/newWizard/NewWizardRegistry.java b/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/wizards/newWizard/NewWizardRegistry.java
deleted file mode 100644
index e5b6db317..000000000
--- a/target_explorer/plugins/org.eclipse.tm.te.ui/src/org/eclipse/tm/te/ui/wizards/newWizard/NewWizardRegistry.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.te.ui.wizards.newWizard;
-
-
-import org.eclipse.tm.te.ui.activator.UIPlugin;
-import org.eclipse.ui.internal.wizards.AbstractExtensionWizardRegistry;
-
-/**
- * New target wizard registry.
- *
- * @see org.eclipse.ui.internal.wizards.NewWizardRegistry
- */
-@SuppressWarnings("restriction")
-public final class NewWizardRegistry extends AbstractExtensionWizardRegistry {
-
- /*
- * Thread save singleton instance creation.
- */
- private static class LazyInstance {
- public static NewWizardRegistry instance = new NewWizardRegistry();
- }
-
- /**
- * Constructor.
- */
- /* default */ NewWizardRegistry() {
- super();
- }
-
- /**
- * Returns the singleton instance of the wizard registry.
- */
- public static NewWizardRegistry getInstance() {
- return LazyInstance.instance;
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.internal.wizards.AbstractExtensionWizardRegistry#getExtensionPoint()
- */
- @Override
- protected String getExtensionPoint() {
- return "newWizards"; //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.internal.wizards.AbstractExtensionWizardRegistry#getPlugin()
- */
- @Override
- protected String getPlugin() {
- return UIPlugin.getUniqueIdentifier();
- }
-
-}
diff --git a/tests/mem-leaks/Makefile b/tests/mem-leaks/Makefile
deleted file mode 100644
index 76b098864..000000000
--- a/tests/mem-leaks/Makefile
+++ /dev/null
@@ -1,30 +0,0 @@
-TCF_AGENT_DIR=../../../org.eclipse.tcf.agent
-
-include $(TCF_AGENT_DIR)/Makefile.inc
-
-override CFLAGS += $(foreach dir,$(INCDIRS),-I$(dir)) $(OPTS)
-
-HFILES := $(foreach dir,$(SRCDIRS),$(wildcard $(dir)/*.h)) $(HFILES)
-CFILES := $(sort $(foreach dir,$(SRCDIRS),$(wildcard $(dir)/*.c)) $(CFILES))
-
-EXECS = $(BINDIR)/agent$(EXTEXE)
-
-all: $(EXECS)
-
-$(BINDIR)/libtcf$(EXTLIB) : $(OFILES)
- $(AR) -rc $@ $^
- $(RANLIB)
-
-$(BINDIR)/agent$(EXTEXE): $(BINDIR)/main/main$(EXTOBJ) $(BINDIR)/libtcf$(EXTLIB)
- $(CC) $(CFLAGS) -o $@ $(BINDIR)/main/main$(EXTOBJ) $(BINDIR)/libtcf$(EXTLIB) $(LIBS)
-
-$(BINDIR)/%$(EXTOBJ): %.c $(HFILES) Makefile
- @$(call MKDIR,$(dir $@))
- $(CC) $(CFLAGS) -c -o $@ $<
-
-$(BINDIR)/%$(EXTOBJ): $(TCF_AGENT_DIR)/%.c $(HFILES) Makefile
- @$(call MKDIR,$(dir $@))
- $(CC) $(CFLAGS) -c -o $@ $<
-
-clean:
- $(call RMDIR,$(BINDIR))
diff --git a/tests/mem-leaks/agent.sln b/tests/mem-leaks/agent.sln
deleted file mode 100644
index 0701c5ad8..000000000
--- a/tests/mem-leaks/agent.sln
+++ /dev/null
@@ -1,20 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual C++ Express 2008
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "agent", "agent.vcproj", "{DAB1E508-ECE7-4C2B-B6D6-870ACC72CAF0}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Win32 = Debug|Win32
- Release|Win32 = Release|Win32
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {DAB1E508-ECE7-4C2B-B6D6-870ACC72CAF0}.Debug|Win32.ActiveCfg = Debug|Win32
- {DAB1E508-ECE7-4C2B-B6D6-870ACC72CAF0}.Debug|Win32.Build.0 = Debug|Win32
- {DAB1E508-ECE7-4C2B-B6D6-870ACC72CAF0}.Release|Win32.ActiveCfg = Release|Win32
- {DAB1E508-ECE7-4C2B-B6D6-870ACC72CAF0}.Release|Win32.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/tests/mem-leaks/agent.vcproj b/tests/mem-leaks/agent.vcproj
deleted file mode 100644
index ff6c6cff9..000000000
--- a/tests/mem-leaks/agent.vcproj
+++ /dev/null
@@ -1,647 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="agent"
- ProjectGUID="{DAB1E508-ECE7-4C2B-B6D6-870ACC72CAF0}"
- RootNamespace="agent"
- Keyword="Win32Proj"
- TargetFrameworkVersion="196613"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)\obj\MSVC\$(ConfigurationName)"
- IntermediateDirectory="$(SolutionDir)\obj\MSVC\$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=".;C:\tcf\trunk\agent;C:\tcf\trunk\agent\system\Windows;C:\tcf\trunk\agent\machine\i386"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="WS2_32.lib Iphlpapi.lib version.lib"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionDir)\obj\MSVC\$(ConfigurationName)"
- IntermediateDirectory="$(SolutionDir)\obj\MSVC\$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="2"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- EnableIntrinsicFunctions="true"
- AdditionalIncludeDirectories=".;C:\tcf\trunk\agent;C:\tcf\trunk\agent\system\Windows;C:\tcf\trunk\agent\machine\i386"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="WS2_32.lib Iphlpapi.lib version.lib"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="main"
- >
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\main\cmdline.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\main\cmdline.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\main\main.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\main\server.c"
- >
- </File>
- <File
- RelativePath=".\main\services-ext.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\main\services.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\main\test.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\main\test.h"
- >
- </File>
- </Filter>
- <Filter
- Name="services"
- >
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\breakpoints.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\breakpoints.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\diagnostics.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\diagnostics.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\discovery.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\discovery.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\discovery_udp.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\discovery_udp.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\expressions.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\expressions.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\filesystem.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\filesystem.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\linenumbers.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\linenumbers.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\linenumbers_elf.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\linenumbers_proxy.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\linenumbers_win32.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\memorymap.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\memorymap.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\memoryservice.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\memoryservice.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\pathmap.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\pathmap.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\processes.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\processes.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\registers.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\registers.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\runctrl.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\runctrl.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\stacktrace.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\stacktrace.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\streamsservice.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\streamsservice.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\symbols.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\symbols.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\symbols_alloc.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\symbols_elf.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\symbols_proxy.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\symbols_win32.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\sysmon.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\sysmon.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\terminals.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\terminals.h"
- >
- </File>
- </Filter>
- <Filter
- Name="framework"
- >
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\asyncreq.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\asyncreq.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\base64.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\base64.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\cache.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\cache.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\channel.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\channel.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\channel_pipe.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\channel_pipe.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\channel_tcp.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\channel_tcp.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\context.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\context.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\cpudefs.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\cpudefs.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\errors.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\errors.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\events.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\events.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\exceptions.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\exceptions.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\inputbuf.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\inputbuf.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\ip_ifc.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\ip_ifc.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\json.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\json.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\link.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\mdep.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\mdep.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\myalloc.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\myalloc.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\outputbuf.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\outputbuf.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\peer.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\peer.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\plugins.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\plugins.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\protocol.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\protocol.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\proxy.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\proxy.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\signames.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\signames.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\streams.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\streams.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\tcf.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\trace.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\trace.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\waitpid.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\waitpid.h"
- >
- </File>
- </Filter>
- <Filter
- Name="trace"
- >
- <File
- RelativePath=".\services\memtrace.c"
- >
- </File>
- <File
- RelativePath=".\services\memtrace.h"
- >
- </File>
- </Filter>
- <Filter
- Name="system"
- >
- <Filter
- Name="Windows"
- >
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\system\Windows\context-win32.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\system\Windows\context-win32.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\system\Windows\pthreads-win32.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\system\Windows\regset.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\system\Windows\windbgcache.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\system\Windows\windbgcache.h"
- >
- </File>
- </Filter>
- </Filter>
- <File
- RelativePath=".\config.h"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/tests/mem-leaks/config.h b/tests/mem-leaks/config.h
deleted file mode 100644
index 35c27e49c..000000000
--- a/tests/mem-leaks/config.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and Eclipse Distribution License v1.0 which accompany this distribution.
- * The Eclipse Public License is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * You may elect to redistribute this code under either of these licenses.
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-
-#ifndef D_config
-
-#define USE_HW_BPS 0
-#include "../../../org.eclipse.tcf.agent/config.h"
-
-#endif /* D_config */ \ No newline at end of file
diff --git a/tests/mem-leaks/main/services-ext.h b/tests/mem-leaks/main/services-ext.h
deleted file mode 100644
index e6285c5fa..000000000
--- a/tests/mem-leaks/main/services-ext.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2010 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and Eclipse Distribution License v1.0 which accompany this distribution.
- * The Eclipse Public License is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * You may elect to redistribute this code under either of these licenses.
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-
-/*
- * Services initialization code extension point.
- * If the agent is built with additional user-defined services,
- * a customized version of services-ext.h file can be added to compiler headers search paths.
- */
-
-#include <services/memtrace.h>
-
-static void ini_ext_services(Protocol * proto, TCFBroadcastGroup * bcg) {
- ini_mem_trace_service(proto);
-}
diff --git a/tests/mem-leaks/services/memtrace.c b/tests/mem-leaks/services/memtrace.c
deleted file mode 100644
index cb4e72809..000000000
--- a/tests/mem-leaks/services/memtrace.c
+++ /dev/null
@@ -1,799 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and Eclipse Distribution License v1.0 which accompany this distribution.
- * The Eclipse Public License is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * You may elect to redistribute this code under either of these licenses.
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-
-/*
- * Memory Trace service.
- */
-
-#include "config.h"
-
-#include <stdio.h>
-#include <assert.h>
-#include <framework/link.h>
-#include <framework/myalloc.h>
-#include <framework/protocol.h>
-#include <framework/context.h>
-#include <services/breakpoints.h>
-#include <services/stacktrace.h>
-#include <services/linenumbers.h>
-#include <services/memtrace.h>
-#if defined(WIN32)
-# include <system/Windows/context-win32.h>
-#endif
-
-#define USE_DEBUG_REGS 0
-
-#define FUNC_CREATE 1
-#define FUNC_ALLOC 2
-#define FUNC_REALLOC 3
-#define FUNC_EXPAND 4
-#define FUNC_FREE 5
-#define FUNC_DESTROY 6
-
-typedef struct EventPoint {
- char * name;
- int heap_type;
- int func_type;
-} EventPoint;
-
-static EventPoint points[] = {
- { "_malloc", 1, FUNC_ALLOC },
- { "_realloc", 1, FUNC_REALLOC },
- { "_expand", 1, FUNC_EXPAND },
- { "_free", 1, FUNC_FREE },
-
- { "malloc", 1, FUNC_ALLOC },
- { "realloc", 1, FUNC_REALLOC },
- { "free", 1, FUNC_FREE },
-
-#if defined(WIN32)
- { "_malloc_dbg", 2, FUNC_ALLOC },
- { "_realloc_dbg", 2, FUNC_REALLOC },
- { "_expand_dbg", 2, FUNC_EXPAND },
- { "_free_dbg", 2, FUNC_FREE },
-
- { "HeapCreate", 3, FUNC_CREATE },
- { "HeapAlloc", 3, FUNC_ALLOC },
- { "HeapReAlloc", 3, FUNC_REALLOC },
- { "HeapFree", 3, FUNC_FREE },
- { "HeapDestroy", 3, FUNC_DESTROY },
-#endif
-
- { NULL, 0, 0 }
-};
-
-#define STK_TRACE_SIZE 8
-#define STK_HASH_SIZE 511
-#define MEM_HASH_SIZE 111
-
-typedef struct StackTrace {
- LINK link_all;
- Context * mem;
- int heap_type;
- int func_type;
- int frame_cnt;
- ContextAddress frames[STK_TRACE_SIZE];
-
- int call_cnt;
- uint64_t size_total;
- uint64_t size_current;
-} StackTrace;
-/* TODO: 'frames' must be represented as module plus offset to support DLL loading/unloading */
-
-typedef struct MemBlock {
- int heap_type;
- ContextAddress addr;
- ContextAddress size;
- StackTrace * trace;
- struct MemBlock * l;
- struct MemBlock * r;
- int bal;
-} MemBlock;
-
-typedef struct MemorySpace {
- LINK link_all;
- LINK link_rtn;
- LINK stk_hash[STK_HASH_SIZE];
- Context * mem;
- MemBlock * table;
- time_t report_time;
-} MemorySpace;
-
-typedef struct ReturnPoint {
- LINK link_mem;
- Context * ctx;
-#if !USE_DEBUG_REGS
- BreakpointInfo * bp;
-#endif
- MemorySpace * mem;
- StackTrace * trace;
- ContextAddress addr;
- ContextAddress args[2];
-} ReturnPoint;
-
-static LINK mem_hash[MEM_HASH_SIZE];
-static RegisterDefinition * reg_def_eax = NULL;
-static RegisterDefinition * reg_def_esp = NULL;
-static RegisterDefinition * reg_def_eip = NULL;
-static RegisterDefinition * reg_def_rdi = NULL;
-static RegisterDefinition * reg_def_rsi = NULL;
-
-#define link_mem2trace(x) ((StackTrace *)((char *)(x) - offsetof(StackTrace, link_all)))
-#define link_mem2ret(x) ((ReturnPoint *)((char *)(x) - offsetof(ReturnPoint, link_mem)))
-#define link_all2mem(x) ((MemorySpace *)((char *)(x) - offsetof(MemorySpace, link_all)))
-
-static unsigned calc_trace_hash(StackTrace * t) {
- int i;
- unsigned h = ((uintptr_t)t->mem >> 4) + t->heap_type + t->func_type;
- for (i = 0; i < t->frame_cnt; i++) {
- h += (unsigned)t->frames[i];
- }
- return h % STK_HASH_SIZE;
-}
-
-static unsigned calc_mem_hash(Context * ctx) {
- return (unsigned)((uintptr_t)ctx->mem % MEM_HASH_SIZE);
-}
-
-static MemorySpace * get_mem_space(Context * ctx, int alloc) {
- MemorySpace * m = NULL;
- unsigned h = calc_mem_hash(ctx);
- LINK * l = mem_hash[h].next;
- while (l != mem_hash + h) {
- MemorySpace * x = link_all2mem(l);
- l = l->next;
- if (x->mem == ctx->mem) {
- m = x;
- break;
- }
- }
- if (m == NULL && alloc) {
- int i;
- m = (MemorySpace *)loc_alloc_zero(sizeof(MemorySpace));
- m->mem = ctx->mem;
- list_init(&m->link_rtn);
- for (i = 0; i < STK_HASH_SIZE; i++) list_init(m->stk_hash + i);
- list_add_first(&m->link_all, mem_hash + h);
- }
- return m;
-}
-
-static void free_mem_block(MemBlock * x) {
- if (x->l) free_mem_block(x->l);
- if (x->r) free_mem_block(x->r);
- loc_free(x);
-}
-
-static void free_mem_space(MemorySpace * m) {
- int i;
-
- assert(list_is_empty(&m->link_rtn));
- list_remove(&m->link_all);
- for (i = 0; i < STK_HASH_SIZE; i++) {
- LINK * l = m->stk_hash[i].next;
- while (l != m->stk_hash + i) {
- StackTrace * x = link_mem2trace(l);
- l = l->next;
- assert(x->mem == m->mem);
- list_remove(&x->link_all);
- loc_free(x);
- }
- }
- if (m->table) free_mem_block(m->table);
- loc_free(m);
-}
-
-static void free_return_point(ReturnPoint * r) {
- int error = 0;
-
-#if USE_DEBUG_REGS
- CONTEXT regs;
-
- memset(&regs, 0, sizeof(regs));
- regs.ContextFlags = CONTEXT_DEBUG_REGISTERS;
- if (GetThreadContext(get_context_handle(r->ctx), &regs) == 0) error = set_win32_errno(GetLastError());
- if (!error) {
- regs.Dr7 &= ~0x03030003;
- if (SetThreadContext(get_context_handle(r->ctx), &regs) == 0) error = set_win32_errno(GetLastError());
- }
-#else
- destroy_eventpoint(r->bp);
-#endif
-
- if (error) {
- printf("free_return_point: %s\n", errno_to_str(error));
- }
-
- context_unlock(r->ctx);
- list_remove(&r->link_mem);
- loc_free(r);
-}
-
-static void app_bal(MemBlock * x, MemBlock ** p, int * h) {
- MemBlock * p1, * p2;
- if (*p == NULL) {
- *p = x;
- x->l = NULL;
- x->r = NULL;
- *h = 1;
- x->bal = 0;
- return;
- }
- if ((*p)->addr > x->addr) {
- app_bal(x, &(*p)->l, h);
- if (*h) {
- switch((*p)->bal) {
- case +1: (*p)->bal = 0; (*h) = 0; break;
- case 0: (*p)->bal =-1; break;
- case -1:
- p1 = (*p)->l;
- if (p1->bal == -1) {
- (*p)->l = p1->r; p1->r = (*p);
- (*p)->bal = 0; (*p) = p1;
- }
- else {
- p2 = p1->r; p1->r = p2->l;
- p2->l = p1; (*p)->l = p2->r; p2->r = (*p);
- if (p2->bal == -1) (*p)->bal = +1; else (*p)->bal = 0;
- if (p2->bal == +1) p1->bal = -1; else p1->bal = 0;
- (*p) = p2;
- }
- (*p)->bal = 0;
- (*h) = 0;
- break;
- default:
- assert(0);
- }
- }
- }
- else if ((*p)->addr < x->addr) {
- app_bal(x, &(*p)->r, h);
- if (*h) {
- switch ((*p)->bal) {
- case -1: (*p)->bal = 0; (*h) = 0; break;
- case 0: (*p)->bal =+1; break;
- case +1:
- p1 = (*p)->r;
- if (p1->bal == +1) {
- (*p)->r = p1->l; p1->l = *p;
- (*p)->bal = 0; *p = p1;
- }
- else {
- p2 = p1->l; p1->l = p2->r;
- p2->r = p1; (*p)->r = p2->l; p2->l = *p;
- if (p2->bal == +1) (*p)->bal = -1; else (*p)->bal = 0;
- if (p2->bal == -1) p1->bal = +1; else p1->bal = 0;
- (*p) = p2;
- }
- (*p)->bal = 0;
- (*h) = 0;
- break;
- default:
- assert(0);
- }
- }
- }
-}
-
-static MemBlock * rem_lost = NULL;
-
-/*
- * remove entry x from table p
- * h == 1 tree length decreased
- */
-static void rem_bal(MemBlock * x, MemBlock ** p, int * h) {
- MemBlock * p1 = NULL;
- MemBlock * p2 = NULL;
- assert(*p != NULL);
- assert(x != NULL);
- if ((*p)->addr > x->addr) {
- if ((*p)->l == NULL) return;
- rem_bal(x, &(*p)->l, h);
- if (*h) {
- switch((*p)->bal) {
- case -1: /* left was longer */
- (*p)->bal = 0; break;
- case 0:
- (*p)->bal = +1; (*h) = 0; break;
- case +1: /* right was longer */
- p1 = (*p)->r;
- assert(p1 != NULL);
- if (p1->bal == +1) {
- assert(p1->r != NULL);
- (*p)->r = p1->l;
- p1->l = *p;
- (*p)->bal = 0;
- *p = p1;
- (*p)->bal = 0;
- (*h) = 1;
- }
- else if (p1->bal == 0 && p1->l->bal == -1) {
- (*p)->r = p1->l;
- p1->l = *p;
- (*p)->bal = +1;
- *p = p1;
- (*p)->bal = -1;
- (*h) = 0;
- }
- else {
- int i = p1->bal;
- p2 = p1->l;
- p1->l = p2->r;
- p2->r = p1;
- (*p)->r = p2->l;
- p2->l = *p;
- (*p)->bal = (p2->bal == +1 ? -1 : 0);
- p1->bal = (i < 0 && p2->bal >= 0 ? 0 : +1);
- p2->bal = (i < 0 ? 0 : +1);
- (*p) = p2;
- (*h) = i < 0;
- }
- break;
- default:
- assert(0);
- }
- }
- }
- else if ((*p)->addr < x->addr) {
- if ((*p)->r == NULL) return;
- rem_bal(x, &(*p)->r, h);
- if (*h) {
- switch ((*p)->bal) {
- case +1:
- (*p)->bal = 0; break;
- case 0:
- (*p)->bal =-1; (*h) = 0; break;
- case -1:
- p1 = (*p)->l;
- assert(p1 != NULL);
- if (p1->bal == -1) {
- (*p)->l = p1->r;
- p1->r = *p;
- (*p)->bal = 0;
- (*p) = p1;
- (*p)->bal = 0;
- (*h) = 1;
- }
- else if (p1->bal == 0 && p1->r->bal == +1) {
- (*p)->l = p1->r;
- p1->r = *p;
- (*p)->bal = -1;
- (*p) = p1;
- (*p)->bal = +1;
- (*h) = 0;
- }
- else {
- int i = p1->bal;
- p2 = p1->r;
- p1->r = p2->l;
- p2->l = p1;
- (*p)->l = p2->r;
- p2->r = (*p);
- (*p)->bal = (p2->bal == -1 ? +1 : 0);
- p1->bal = (i > 0 && p2->bal <= 0 ? 0 : -1);
- p2->bal = (i > 0 ? 0 : -1);
- (*p) = p2;
- (*h) = i > 0;
- }
- break;
- default:
- assert(0);
- }
- }
- }
- else if ((*p)->l == NULL) { /* found it, no left link... */
- *p = (*p)->r; /* unlink right */
- *h = 1; /* set flag */
- }
- else if ((*p)->bal < 0) {
- rem_lost = (*p)->r; /* save right side in rem_lost */
- *p = (*p)->l; /* unlink left */
- *h = 1; /* set flag */
- }
- else {
- assert((*p)->r != NULL);
- rem_lost = (*p)->l; /* save left side in rem_lost */
- *p = (*p)->r; /* unlink right */
- *h = 1; /* set flag */
- }
-}
-
-static void add_mem_block(MemorySpace * m, MemBlock * x) {
- int h = 0;
- app_bal(x, &m->table, &h);
-}
-
-static void append_tree(MemorySpace * m, MemBlock * x) {
- if (x->l) append_tree(m, x->l);
- if (x->r) append_tree(m, x->r);
- add_mem_block(m, x);
-}
-
-static void rem_mem_block(MemorySpace * m, MemBlock * x) {
- int h = 0;
- rem_lost = NULL;
- rem_bal(x, &m->table, &h);
- if (rem_lost) append_tree(m, rem_lost);
-}
-
-static MemBlock * find_mem_block(MemorySpace * m, ContextAddress p, ContextAddress e) {
- MemBlock * x = m->table;
- while (x != NULL) {
- if (x->addr <= e && x->addr + x->size >= p) return x;
- x = x->addr < p ? x->r : x->l;
- }
- return NULL;
-}
-
-static ReturnPoint * find_pending_return_point(Context * ctx) {
- LINK * l;
- MemorySpace * m = NULL;
-
- m = get_mem_space(ctx, 0);
- if (m == NULL) return NULL;
- l = m->link_rtn.next;
- while (l != &m->link_rtn) {
- ReturnPoint * r = link_mem2ret(l);
- l = l->next;
- if (r->ctx == ctx) return r;
- }
- return NULL;
-}
-
-static ContextAddress read_reg(Context * ctx, RegisterDefinition * r) {
- size_t i;
- ContextAddress n = 0;
- uint8_t buf[8];
- assert(r->size <= sizeof(buf));
- if (context_read_reg(ctx, r, 0, r->size, buf) < 0) return 0;
- for (i = 0; i < r->size; i++) {
- n = n << 8;
- n |= buf[r->big_endian ? i : r->size - i - 1];
- }
- return n;
-}
-
-static void return_point(Context * ctx, ReturnPoint * r) {
- MemBlock * b = NULL;
- ContextAddress eax = read_reg(ctx, reg_def_eax);
-
- switch (r->trace->func_type) {
- case FUNC_ALLOC:
- if (eax != 0) {
- b = (MemBlock *)loc_alloc_zero(sizeof(MemBlock));
- b->heap_type = r->trace->heap_type;
- b->addr = eax;
- b->size = r->args[0];
- b->trace = r->trace;
- b->trace->size_current += b->size;
- b->trace->size_total += b->size;
- add_mem_block(r->mem, b);
- }
- break;
- case FUNC_REALLOC:
- case FUNC_EXPAND:
- if (eax != 0) {
- b = find_mem_block(r->mem, r->args[0], r->args[0] + 1);
- if (b != NULL) {
- rem_mem_block(r->mem, b);
- b->trace->size_current -= b->size;
- }
- else {
- b = (MemBlock *)loc_alloc_zero(sizeof(MemBlock));
- }
- b->heap_type = r->trace->heap_type;
- b->addr = eax;
- b->size = r->args[1];
- b->trace = r->trace;
- b->trace->size_current += b->size;
- b->trace->size_total += b->size;
- add_mem_block(r->mem, b);
- }
- break;
- }
- free_return_point(r);
-}
-
-static int sort_func(const void * x, const void * y) {
- StackTrace * tx = *(StackTrace **)x;
- StackTrace * ty = *(StackTrace **)y;
- if (tx->size_current > ty->size_current) return -1;
- if (tx->size_current < ty->size_current) return +1;
- return 0;
-}
-
-static int print_text_pos_cnt = 0;
-
-static void print_text_pos(CodeArea * area, void * args) {
- if (print_text_pos_cnt == 0) {
- printf(" %s %d\n", area->file, area->start_line);
- }
- print_text_pos_cnt++;
-}
-
-#if !USE_DEBUG_REGS
-static void rp_callback(Context * ctx, void * args) {
- ReturnPoint * r = (ReturnPoint *)args;
- assert(r->ctx == ctx);
- return_point(ctx, r);
-}
-#endif
-
-static void event_point(Context * ctx, void * args) {
- EventPoint * p = (EventPoint *)args;
- int top_frame = STACK_NO_FRAME;
- StackFrame * info = NULL;
- uint64_t esp = 0;
- uint64_t eip = 0;
- uint64_t rdi = 0;
- uint64_t rsi = 0;
- ContextAddress buf[4];
- MemorySpace * m = NULL;
- static StackTrace trace;
- StackTrace * t = NULL;
- int error = 0;
-
- if (find_pending_return_point(ctx) != NULL) return;
-
- if (p->heap_type == 3) {
- printf("%s\n", p->name);
- return;
- }
-
- if ((top_frame = get_top_frame(ctx)) < 0) error = set_errno(errno, "Cannot get top frame");
- if (!error && get_frame_info(ctx, top_frame, &info) < 0) error = set_errno(errno, "Cannot get frame info");
- if (!error && read_reg_value(info, reg_def_esp, &esp) < 0) error = set_errno(errno, "Cannot read SP register");
- if (!error && read_reg_value(info, reg_def_eip, &eip) < 0) error = set_errno(errno, "Cannot read IP register");
-#if defined(__x86_64__)
- if (!error && read_reg_value(info, reg_def_rdi, &rdi) < 0) error = set_errno(errno, "Cannot read DI register");
- if (!error && read_reg_value(info, reg_def_rsi, &rsi) < 0) error = set_errno(errno, "Cannot read SI register");
-#endif
- if (!error && context_read_mem(ctx, (ContextAddress)esp, buf, sizeof(buf)) < 0) error = set_errno(errno, "Cannot read memory");
- memset(&trace, 0, sizeof(trace));
- if (!error) {
- trace.mem = ctx->mem;
- trace.heap_type = p->heap_type;
- trace.func_type = p->func_type;
- trace.frame_cnt = 0;
- while (trace.frame_cnt < STK_TRACE_SIZE && trace.frame_cnt < top_frame) {
- if (get_frame_info(ctx, top_frame - trace.frame_cnt - 1, &info) < 0) {
- if (trace.frame_cnt == 0) error = errno;
- break;
- }
- if (read_reg_value(info, reg_def_eip, &eip) < 0) {
- if (trace.frame_cnt == 0) error = errno;
- break;
- }
- trace.frames[trace.frame_cnt++] = (ContextAddress)eip;
- }
- }
- if (!error) {
- LINK * l;
- unsigned h = calc_trace_hash(&trace);
- m = get_mem_space(ctx, 1);
- for (l = m->stk_hash[h].next; l != m->stk_hash + h; l = l->next) {
- int i;
- StackTrace * x = (StackTrace *)link_mem2trace(l);
- if (x->mem != trace.mem) continue;
- if (x->heap_type != trace.heap_type) continue;
- if (x->func_type != trace.func_type) continue;
- if (x->frame_cnt != trace.frame_cnt) continue;
- for (i = 0; i < trace.frame_cnt; i++) {
- if (x->frames[i] != trace.frames[i]) break;
- }
- if (i == trace.frame_cnt) {
- t = x;
- break;
- }
- }
- if (t == NULL) {
- *(t = (StackTrace *)loc_alloc(sizeof(StackTrace))) = trace;
- list_add_first(&t->link_all, m->stk_hash + h);
- }
- t->call_cnt++;
- }
- if (!error) {
- if (p->func_type == FUNC_FREE) {
-#if defined(__x86_64__)
- ContextAddress addr = (ContextAddress)rdi;
-#else
- ContextAddress addr = buf[1];
-#endif
- MemBlock * b = find_mem_block(m, addr, addr + 1);
- if (b != NULL) {
- rem_mem_block(m, b);
- b->trace->size_current -= b->size;
- loc_free(b);
- }
- }
- else if (p->func_type == FUNC_DESTROY) {
- }
- else {
- ReturnPoint * r = (ReturnPoint *)loc_alloc_zero(sizeof(ReturnPoint));
-
- r->trace = t;
- r->ctx = ctx;
- r->mem = m;
- r->addr = buf[0];
-#if defined(__x86_64__)
- r->args[0] = (ContextAddress)rdi;
- r->args[1] = (ContextAddress)rsi;
-#else
- r->args[0] = buf[1];
- r->args[1] = buf[2];
-#endif
- list_add_first(&r->link_mem, &m->link_rtn);
- context_lock(r->ctx);
-
-#if USE_DEBUG_REGS
- {
- CONTEXT regs;
- memset(&regs, 0, sizeof(regs));
- regs.ContextFlags = CONTEXT_DEBUG_REGISTERS;
- if (GetThreadContext(get_context_handle(ctx), &regs) == 0) error = set_win32_errno(GetLastError());
- if (!error && (regs.Dr7 & 0x03) != 0) error = set_errno(ERR_OTHER, "HW breakpoint not available");
- if (!error) {
- regs.Dr0 = r->addr;
- regs.Dr7 &= ~0x03030003;
- regs.Dr7 |= 0x00000001;
- if (SetThreadContext(get_context_handle(ctx), &regs) == 0) error = set_win32_errno(GetLastError());
- }
- }
-#else
- {
- char buf[64];
- snprintf(buf, sizeof(buf), "0x%" PRIX64, (uint64_t)r->addr);
- r->bp = create_eventpoint(buf, ctx, rp_callback, r);
- }
-#endif
- if (error) free_return_point(r);
- }
- }
- if (error) {
- printf("%s: %s\n", p->name, errno_to_str(error));
- }
- if (m != NULL && m->report_time + 30 < time(NULL)) {
- int i;
- int cnt = 0;
- m->report_time = time(NULL);
- for (i = 0; i < STK_HASH_SIZE; i++) {
- LINK * l = m->stk_hash[i].next;
- while (l != m->stk_hash + i) {
- l = l->next;
- cnt++;
- }
- }
- if (cnt > 0) {
- int pos = 0;
- StackTrace ** buf = (StackTrace **)loc_alloc(sizeof(StackTrace *) * cnt);
- for (i = 0; i < STK_HASH_SIZE; i++) {
- LINK * l = m->stk_hash[i].next;
- while (l != m->stk_hash + i) {
- buf[pos++] = link_mem2trace(l);
- l = l->next;
- }
- }
- assert(pos == cnt);
- qsort(buf, cnt, sizeof(StackTrace *), sort_func);
- printf("\nID %s, total traces %d\n", m->mem->id, cnt);
- for (i = 0; i < 8 && i < cnt; i++) {
- int j;
- StackTrace * t = buf[i];
- printf(" curr %lld, total %lld, calls %d\n",
- (long long)t->size_current, (long long)t->size_total, t->call_cnt);
- for (j = 0; j < t->frame_cnt; j++) {
- print_text_pos_cnt = 0;
- address_to_line(ctx, t->frames[j], t->frames[j] + 1, print_text_pos, NULL);
- if (print_text_pos_cnt == 0) {
- printf(" 0x%" PRIX64 "\n", (uint64_t)t->frames[j]);
- }
- }
- }
- loc_free(buf);
- }
- }
-}
-
-static void event_context_created(Context * ctx, void * args) {
- if (ctx->parent != NULL && ctx->parent->mem == ctx->mem) return;
-
-}
-
-#if USE_DEBUG_REGS
-static int contex_exception_handler(Context * ctx, EXCEPTION_DEBUG_INFO * info) {
- if (info->ExceptionRecord.ExceptionCode == EXCEPTION_SINGLE_STEP) {
- MemorySpace * m = get_mem_space(ctx, 0);
- if (m != NULL) {
- LINK * l = m->link_rtn.next;
- while (l != &m->link_rtn) {
- ReturnPoint * r = link_mem2ret(l);
- l = l->next;
- if (r->ctx == ctx) {
- ContextAddress addr = read_reg(ctx, reg_def_eip);
- if (r->addr == addr) {
- return_point(ctx, r);
- return 1;
- }
- }
- }
- }
- }
- return 0;
-}
-#endif
-
-static void event_context_stopped(Context * ctx, void * args) {
-}
-
-static void event_context_exited(Context * ctx, void * args) {
- MemorySpace * m = get_mem_space(ctx, 0);
- if (m != NULL) {
- LINK * l = m->link_rtn.next;
- while (l != &m->link_rtn) {
- ReturnPoint * r = link_mem2ret(l);
- l = l->next;
- if (r->ctx == ctx) {
- free_return_point(r);
- break;
- }
- }
- if (ctx->parent == NULL || ctx->parent->mem != ctx->mem) {
- free_mem_space(m);
- }
- }
-}
-
-void ini_mem_trace_service(Protocol * proto) {
- int i;
- EventPoint * p = points;
- RegisterDefinition * r = get_reg_definitions(NULL);
-
- static ContextEventListener listener = {
- event_context_created,
- event_context_exited,
- event_context_stopped,
- NULL,
- NULL
- };
-
- while (p->name) {
- create_eventpoint(p->name, NULL, event_point, p);
- p++;
- }
-
- for (i = 0; i < MEM_HASH_SIZE; i++) list_init(mem_hash + i);
-
- while (r->name != NULL) {
-#if defined(__x86_64__)
- if (strcmp(r->name, "rax") == 0) reg_def_eax = r;
- if (strcmp(r->name, "rsp") == 0) reg_def_esp = r;
- if (strcmp(r->name, "rip") == 0) reg_def_eip = r;
- if (strcmp(r->name, "rdi") == 0) reg_def_rdi = r;
- if (strcmp(r->name, "rsi") == 0) reg_def_rsi = r;
-#elif defined(__i386__)
- if (strcmp(r->name, "eax") == 0) reg_def_eax = r;
- if (strcmp(r->name, "esp") == 0) reg_def_esp = r;
- if (strcmp(r->name, "eip") == 0) reg_def_eip = r;
-#else
-# error Unknown CPU
-#endif
- r++;
- }
-
- add_context_event_listener(&listener, NULL);
-#if USE_DEBUG_REGS
- add_context_exception_handler(contex_exception_handler);
-#endif
-}
diff --git a/tests/mem-leaks/services/memtrace.h b/tests/mem-leaks/services/memtrace.h
deleted file mode 100644
index e85997943..000000000
--- a/tests/mem-leaks/services/memtrace.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and Eclipse Distribution License v1.0 which accompany this distribution.
- * The Eclipse Public License is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * You may elect to redistribute this code under either of these licenses.
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-
-/*
- * Memory Trace service.
- */
-
-#ifndef D_memtrace
-#define D_memtrace
-
-#include <config.h>
-#include <framework/protocol.h>
-
-extern void ini_mem_trace_service(Protocol * proto);
-
-#endif /* D_memtrace */
diff --git a/tests/plugins/org.eclipse.tcf.debug.test/.classpath b/tests/plugins/org.eclipse.tcf.debug.test/.classpath
new file mode 100644
index 000000000..64c5e31b7
--- /dev/null
+++ b/tests/plugins/org.eclipse.tcf.debug.test/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/tests/plugins/org.eclipse.tcf.debug.test/.project b/tests/plugins/org.eclipse.tcf.debug.test/.project
new file mode 100644
index 000000000..114675c19
--- /dev/null
+++ b/tests/plugins/org.eclipse.tcf.debug.test/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.tcf.debug.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/tests/plugins/org.eclipse.tcf.debug.test/.settings/org.eclipse.jdt.core.prefs b/tests/plugins/org.eclipse.tcf.debug.test/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..9d7f7d27a
--- /dev/null
+++ b/tests/plugins/org.eclipse.tcf.debug.test/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Thu May 26 13:10:48 PDT 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/tests/plugins/org.eclipse.tcf.debug.test/META-INF/MANIFEST.MF b/tests/plugins/org.eclipse.tcf.debug.test/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..bbb668758
--- /dev/null
+++ b/tests/plugins/org.eclipse.tcf.debug.test/META-INF/MANIFEST.MF
@@ -0,0 +1,17 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Test
+Bundle-SymbolicName: org.eclipse.tcf.debug.test
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipse.tcf.debug.test.Activator
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.tcf.debug,
+ org.eclipse.tcf.debug.ui,
+ org.eclipse.tcf.core,
+ org.junit;bundle-version="3.8.2",
+ org.eclipse.debug.ui;bundle-version="3.7.0",
+ org.eclipse.cdt.debug.core;bundle-version="7.2.0"
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Import-Package: org.eclipse.debug.internal.ui.viewers.model
diff --git a/tests/plugins/org.eclipse.tcf.debug.test/build.properties b/tests/plugins/org.eclipse.tcf.debug.test/build.properties
new file mode 100644
index 000000000..34d2e4d2d
--- /dev/null
+++ b/tests/plugins/org.eclipse.tcf.debug.test/build.properties
@@ -0,0 +1,4 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .
diff --git a/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/AbstractTcfUITest.java b/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/AbstractTcfUITest.java
new file mode 100644
index 000000000..587682467
--- /dev/null
+++ b/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/AbstractTcfUITest.java
@@ -0,0 +1,488 @@
+package org.eclipse.tcf.debug.test;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.CancellationException;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.regex.Pattern;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.ILaunchConfigurationType;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.core.ILaunchManager;
+import org.eclipse.debug.core.ILaunchesListener2;
+import org.eclipse.debug.core.model.IDisconnect;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.PresentationContext;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.VirtualItem;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.VirtualTreeModelViewer;
+import org.eclipse.debug.ui.IDebugUIConstants;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.tcf.core.TransientPeer;
+import org.eclipse.tcf.debug.test.services.BreakpointsCM;
+import org.eclipse.tcf.debug.test.services.DiagnosticsCM;
+import org.eclipse.tcf.debug.test.services.RunControlCM;
+import org.eclipse.tcf.debug.test.services.RunControlCM.ContextState;
+import org.eclipse.tcf.debug.test.services.StackTraceCM;
+import org.eclipse.tcf.debug.test.services.SymbolsCM;
+import org.eclipse.tcf.debug.test.util.AggregateCallback;
+import org.eclipse.tcf.debug.test.util.Callback;
+import org.eclipse.tcf.debug.test.util.Callback.ICanceledListener;
+import org.eclipse.tcf.debug.test.util.DataCallback;
+import org.eclipse.tcf.debug.test.util.ICache;
+import org.eclipse.tcf.debug.test.util.Query;
+import org.eclipse.tcf.debug.test.util.Task;
+import org.eclipse.tcf.debug.test.util.Transaction;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.services.IBreakpoints;
+import org.eclipse.tcf.services.IDiagnostics;
+import org.eclipse.tcf.services.IExpressions;
+import org.eclipse.tcf.services.IMemoryMap;
+import org.eclipse.tcf.services.IRunControl;
+import org.eclipse.tcf.services.IRunControl.RunControlContext;
+import org.eclipse.tcf.services.IStackTrace;
+import org.eclipse.tcf.services.ISymbols;
+import org.junit.Assert;
+
+/**
+ * Base test for validating TCF Debugger UI.
+ */
+@SuppressWarnings("restriction")
+public abstract class AbstractTcfUITest extends TestCase implements IViewerUpdatesListenerConstants {
+
+ private final static int NUM_CHANNELS = 1;
+
+
+ protected IChannel[] channels;
+
+ private Query<Object> fMonitorChannelQuery;
+ private List<Throwable> errors = new ArrayList<Throwable>();
+ private IPeer peer;
+ protected ILaunch fLaunch;
+
+ protected VirtualTreeModelViewer fDebugViewViewer;
+ protected TestDebugContextProvider fDebugContextProvider;
+ protected VirtualViewerUpdatesListener fDebugViewListener;
+ protected VariablesVirtualTreeModelViewer fVariablesViewViewer;
+ protected VirtualViewerUpdatesListener fVariablesViewListener;
+ protected VariablesVirtualTreeModelViewer fRegistersViewViewer;
+ protected VirtualViewerUpdatesListener fRegistersViewListener;
+
+ protected Object fTestRunKey;
+
+ protected IDiagnostics diag;
+ protected IExpressions expr;
+ protected ISymbols syms;
+ protected IStackTrace stk;
+ protected IRunControl rc;
+ protected IBreakpoints bp;
+ protected IMemoryMap fMemoryMap;
+
+ protected RunControlCM fRunControlCM;
+ protected DiagnosticsCM fDiagnosticsCM;
+ protected BreakpointsCM fBreakpointsCM;
+ protected StackTraceCM fStackTraceCM;
+ protected SymbolsCM fSymbolsCM;
+
+ private static class RemotePeer extends TransientPeer {
+ private final ArrayList<Map<String,String>> attrs;
+
+ public RemotePeer(ArrayList<Map<String,String>> attrs) {
+ super(attrs.get(0));
+ this.attrs = attrs;
+ }
+
+ public IChannel openChannel() {
+ assert Protocol.isDispatchThread();
+ IChannel c = super.openChannel();
+ for (int i = 1; i < attrs.size(); i++) c.redirect(attrs.get(i));
+ return c;
+ }
+ }
+
+ private static IPeer getPeer(String[] arr) {
+ ArrayList<Map<String,String>> l = new ArrayList<Map<String,String>>();
+ for (String s : arr) {
+ Map<String,String> map = new HashMap<String,String>();
+ int len = s.length();
+ int i = 0;
+ while (i < len) {
+ int i0 = i;
+ while (i < len && s.charAt(i) != '=' && s.charAt(i) != 0) i++;
+ int i1 = i;
+ if (i < len && s.charAt(i) == '=') i++;
+ int i2 = i;
+ while (i < len && s.charAt(i) != ':') i++;
+ int i3 = i;
+ if (i < len && s.charAt(i) == ':') i++;
+ String key = s.substring(i0, i1);
+ String val = s.substring(i2, i3);
+ map.put(key, val);
+ }
+ l.add(map);
+ }
+ return new RemotePeer(l);
+ }
+
+ protected void setUp() throws Exception {
+
+ fTestRunKey = new Object();
+
+ createDebugViewViewer();
+ createLaunch();
+
+ // Command line should contain peer description string, for example:
+ // "ID=Test:TransportName=TCP:Host=127.0.0.1:Port=1534"
+ final String[] args = new String[] { "TransportName=TCP:Host=127.0.0.1:Port=1534" };
+ if (args.length < 1) {
+ System.err.println("Missing command line argument - peer identification string");
+ System.exit(4);
+ }
+
+ peer = new Query<IPeer>() {
+ @Override
+ protected void execute(DataCallback<IPeer> callback) {
+ callback.setData(getPeer(args));
+ callback.done();
+ }
+ }.get();
+
+ channels = new IChannel[NUM_CHANNELS];
+
+ new Query<Object>() {
+ @Override
+ protected void execute(DataCallback<Object> callback) {
+ try {
+ openChannels(peer, callback);
+ }
+ catch (Throwable x) {
+ errors.add(x);
+ int cnt = 0;
+ for (int i = 0; i < channels.length; i++) {
+ if (channels[i] == null) continue;
+ if (channels[i].getState() != IChannel.STATE_CLOSED) channels[i].close();
+ cnt++;
+ }
+ if (cnt == 0) {
+ callback.setError(errors.get(0));
+ callback.done();
+ }
+ }
+ }
+ }.get();
+
+ getRemoteServices();
+
+ new Task<Object>() {
+ @Override
+ public Object call() throws Exception {
+ setUpServiceListeners();
+ return null;
+ }
+ }.get();
+
+ validateTestAvailable();
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ new Task<Object>() {
+ @Override
+ public Object call() throws Exception {
+ tearDownServiceListeners();
+ return null;
+ }
+ }.get();
+
+ terminateLaunch();
+ disposeDebugViewViewer();
+
+ new Query<Object>() {
+ @Override
+ protected void execute(DataCallback<Object> callback) {
+ closeChannels(callback);
+ }
+ }.get();
+ }
+
+ protected String getDiagnosticsTestName() {
+ return "RCBP1";
+ }
+
+ protected void setUpServiceListeners() throws Exception{
+ fRunControlCM = new RunControlCM(rc);
+ fDiagnosticsCM = new DiagnosticsCM(diag);
+ fBreakpointsCM = new BreakpointsCM(bp);
+ fStackTraceCM = new StackTraceCM(stk, rc);
+ fSymbolsCM = new SymbolsCM(syms, fRunControlCM, fMemoryMap);
+ }
+
+ protected void tearDownServiceListeners() throws Exception{
+ fSymbolsCM.dispose();
+ fBreakpointsCM.dispose();
+ fStackTraceCM.dispose();
+ fRunControlCM.dispose();
+ fDiagnosticsCM.dispose();
+ }
+
+ private void createDebugViewViewer() {
+ final Display display = Display.getDefault();
+ display.syncExec(new Runnable() {
+ public void run() {
+ fDebugViewViewer = new VirtualTreeModelViewer(display, SWT.NONE, new PresentationContext(IDebugUIConstants.ID_DEBUG_VIEW));
+ fDebugViewViewer.setInput(DebugPlugin.getDefault().getLaunchManager());
+ fDebugViewViewer.setAutoExpandLevel(-1);
+ fDebugViewListener = new VirtualViewerUpdatesListener(fDebugViewViewer);
+ fDebugContextProvider = new TestDebugContextProvider(fDebugViewViewer);
+ fVariablesViewViewer = new VariablesVirtualTreeModelViewer(IDebugUIConstants.ID_VARIABLE_VIEW, fDebugContextProvider);
+ fVariablesViewListener = new VirtualViewerUpdatesListener(fVariablesViewViewer);
+ fRegistersViewViewer = new VariablesVirtualTreeModelViewer(IDebugUIConstants.ID_REGISTER_VIEW, fDebugContextProvider);
+ fRegistersViewListener = new VirtualViewerUpdatesListener(fRegistersViewViewer);
+ }
+ });
+ }
+
+ private void disposeDebugViewViewer() {
+ final Display display = Display.getDefault();
+ display.syncExec(new Runnable() {
+ public void run() {
+ fDebugViewListener.dispose();
+ fDebugContextProvider.dispose();
+ fDebugViewViewer.dispose();
+ fVariablesViewListener.dispose();
+ fVariablesViewViewer.dispose();
+ fRegistersViewListener.dispose();
+ fRegistersViewViewer.dispose();
+ }
+ });
+
+ }
+
+ private void createLaunch() throws Exception {
+ ILaunchManager lManager = DebugPlugin.getDefault().getLaunchManager();
+ ILaunchConfigurationType lcType = lManager.getLaunchConfigurationType("org.eclipse.tcf.debug.LaunchConfigurationType");
+ ILaunchConfigurationWorkingCopy lcWc = lcType.newInstance(null, "test");
+ lcWc.doSave();
+ fDebugViewListener.reset();
+ fDebugViewListener.setDelayContentUntilProxyInstall(true);
+ fLaunch = lcWc.launch("debug", new NullProgressMonitor());
+ fDebugViewListener.waitTillFinished(MODEL_CHANGED_COMPLETE | MODEL_PROXIES_INSTALLED | CONTENT_SEQUENCE_COMPLETE | LABEL_UPDATES_RUNNING);
+ Assert.assertTrue( fLaunch instanceof IDisconnect );
+
+ VirtualItem launchItem = fDebugViewListener.findElement(new Pattern[] { Pattern.compile(".*" + fLaunch.getLaunchConfiguration().getName() + ".*") } );
+ Assert.assertTrue( launchItem != null && fLaunch.equals(launchItem.getData()) );
+ }
+
+ private void terminateLaunch() throws DebugException, InterruptedException, ExecutionException {
+ ((IDisconnect)fLaunch).disconnect();
+
+ new Query<Object>() {
+ @Override
+ protected void execute(final DataCallback<Object> callback) {
+ final ILaunchManager lm = DebugPlugin.getDefault().getLaunchManager();
+
+ final AtomicBoolean callbackDone = new AtomicBoolean(false);
+ ILaunchesListener2 disconnectListener = new ILaunchesListener2() {
+ public void launchesAdded(ILaunch[] launches) {}
+ public void launchesChanged(ILaunch[] launches) {}
+ public void launchesRemoved(ILaunch[] launches) {}
+ public void launchesTerminated(ILaunch[] launches) {
+ if (Arrays.asList(launches).contains(fLaunch)) {
+ if (!callbackDone.getAndSet(true)) {
+ lm.removeLaunchListener(this);
+ callback.done();
+ }
+ }
+ }
+ };
+ lm.addLaunchListener(disconnectListener);
+ if (((IDisconnect)fLaunch).isDisconnected() && !callbackDone.getAndSet(true)) {
+ lm.removeLaunchListener(disconnectListener);
+ callback.done();
+
+ }
+ }
+ }.get();
+ }
+
+ private void getRemoteServices() {
+ assert !Protocol.isDispatchThread();
+ Protocol.invokeAndWait(new Runnable() {
+ public void run() {
+ diag = channels[0].getRemoteService(IDiagnostics.class);
+ expr = channels[0].getRemoteService(IExpressions.class);
+ syms = channels[0].getRemoteService(ISymbols.class);
+ stk = channels[0].getRemoteService(IStackTrace.class);
+ rc = channels[0].getRemoteService(IRunControl.class);
+ bp = channels[0].getRemoteService(IBreakpoints.class);
+ fMemoryMap = channels[0].getRemoteService(IMemoryMap.class);
+ };
+ });
+ }
+
+ private void openChannels(IPeer peer, Callback callback) {
+ assert Protocol.isDispatchThread();
+
+ for (int i = 0; i < channels.length; i++) {
+ channels[i] = peer.openChannel();
+ }
+ monitorChannels(
+ new Callback(callback) {
+ @Override
+ protected void handleSuccess() {
+ fMonitorChannelQuery = new Query<Object>() {
+ protected void execute(org.eclipse.tcf.debug.test.util.DataCallback<Object> callback) {
+ monitorChannels(callback, true);
+ };
+ };
+ fMonitorChannelQuery.invoke();
+ super.handleSuccess();
+ }
+ },
+ false);
+ }
+
+ private void closeChannels(final Callback callback) {
+ assert Protocol.isDispatchThread();
+ fMonitorChannelQuery.cancel(false);
+ try {
+ fMonitorChannelQuery.get();
+ } catch (ExecutionException e) {
+ callback.setError(e.getCause());
+ } catch (CancellationException e) {
+ // expected
+ } catch (InterruptedException e) {
+ }
+
+ for (int i = 0; i < channels.length; i++) {
+ if (channels[i].getState() != IChannel.STATE_CLOSED) channels[i].close();
+ }
+ monitorChannels(callback, true);
+ }
+
+ private static class ChannelMonitorListener implements IChannel.IChannelListener {
+
+ final IChannel fChannel;
+ final boolean fClose;
+ final Callback fCallback;
+ private boolean fActive = true;
+
+ private class CancelListener implements ICanceledListener {
+ public void requestCanceled(Callback rm) {
+ Protocol.invokeLater(new Runnable() {
+ public void run() {
+ if (deactivate()) {
+ fCallback.done();
+ }
+ }
+ });
+ }
+ }
+
+ private boolean deactivate() {
+ if (fActive) {
+ fChannel.removeChannelListener(ChannelMonitorListener.this);
+ fActive = false;
+ return true;
+ }
+ return false;
+ }
+
+ ChannelMonitorListener (IChannel channel, Callback cb, boolean close) {
+ fCallback = cb;
+ fClose = close;
+ fChannel = channel;
+ fChannel.addChannelListener(this);
+ fCallback.addCancelListener(new CancelListener());
+ }
+
+ public void onChannelOpened() {
+ if (!deactivate()) return;
+
+ fChannel.removeChannelListener(this);
+ fCallback.done();
+ }
+
+ public void congestionLevel(int level) {
+ }
+
+ public void onChannelClosed(Throwable error) {
+ if (!deactivate()) return;
+
+ if (!fClose) {
+ fCallback.setError( new IOException("Remote peer closed connection before all tests finished") );
+ } else {
+ fCallback.setError(error);
+ }
+ fCallback.done();
+ }
+ }
+
+ protected void monitorChannels(final Callback callback, final boolean close) {
+ assert Protocol.isDispatchThread();
+
+ AggregateCallback acb = new AggregateCallback(callback);
+ int count = 0;
+ for (int i = 0; i < channels.length; i++) {
+ if (!checkChannelsState(channels[i], close)) {
+ new ChannelMonitorListener(channels[i], new Callback(acb), close);
+ count++;
+ }
+ }
+ acb.setDoneCount(count);
+ }
+
+ // Checks whether all channels have achieved the desired state.
+ private boolean checkChannelsState(IChannel channel, boolean close) {
+ if (close) {
+ if (channel.getState() != IChannel.STATE_CLOSED) {
+ return false;
+ }
+ } else {
+ if (channel.getState() != IChannel.STATE_OPEN) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ private void validateTestAvailable() throws ExecutionException, InterruptedException {
+ String[] testList = new Transaction<String[]>() {
+ protected String[] process() throws InvalidCacheException ,ExecutionException {
+ return validate( fDiagnosticsCM.getTestList() );
+ }
+ }.get();
+
+ int i = 0;
+ for (; i < testList.length; i++) {
+ if ("RCBP1".equals(testList[i])) break;
+ }
+
+ Assert.assertTrue("Required test not supported", i != testList.length);
+ }
+
+ protected ContextState resumeAndWaitForSuspend(final RunControlContext context, final int mode) throws InterruptedException, ExecutionException {
+ return new Transaction<ContextState>() {
+ @Override
+ protected ContextState process() throws InvalidCacheException, ExecutionException {
+ ICache<Object> waitCache = fRunControlCM.waitForContextSuspended(context.getID(), this);
+ validate( fRunControlCM.resume(context, this, mode, 1) );
+ validate(waitCache);
+ return validate( fRunControlCM.getState(context.getID()) );
+ }
+ }.get();
+ }
+
+}
diff --git a/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/Activator.java b/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/Activator.java
new file mode 100644
index 000000000..35dca5f16
--- /dev/null
+++ b/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/Activator.java
@@ -0,0 +1,50 @@
+package org.eclipse.tcf.debug.test;
+
+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.tcf.debug.test"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (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/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/BreakpointsTest.java b/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/BreakpointsTest.java
new file mode 100644
index 000000000..9594baad5
--- /dev/null
+++ b/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/BreakpointsTest.java
@@ -0,0 +1,115 @@
+package org.eclipse.tcf.debug.test;
+
+import java.util.Collection;
+import java.util.Map;
+import java.util.TreeMap;
+import java.util.concurrent.ExecutionException;
+
+import org.eclipse.cdt.debug.core.CDIDebugModel;
+import org.eclipse.tcf.debug.test.util.Transaction;
+import org.eclipse.tcf.services.IBreakpoints;
+import org.eclipse.tcf.services.IRunControl.RunControlContext;
+import org.junit.Assert;
+
+@SuppressWarnings("restriction")
+public class BreakpointsTest extends AbstractTcfUITest
+{
+ private String fTestId;
+ private RunControlContext fTestCtx;
+ private String fProcessId = "";
+ private String fThreadId = "";
+ private RunControlContext fThreadCtx;
+
+ private void createBreakpoint(final String bpId, final String testFunc) throws InterruptedException, ExecutionException {
+ new Transaction<Object>() {
+ private Map<String,Object> fBp;
+
+ {
+ fBp = new TreeMap<String,Object>();
+ fBp.put(IBreakpoints.PROP_ID, bpId);
+ fBp.put(IBreakpoints.PROP_ENABLED, Boolean.TRUE);
+ fBp.put(IBreakpoints.PROP_LOCATION, testFunc);
+ }
+
+ @Override
+ protected Object process() throws InvalidCacheException, ExecutionException {
+ @SuppressWarnings("unchecked")
+ Map<String, Object>[] bps = (Map<String, Object>[])new Map[] { fBp };
+ validate( fBreakpointsCM.set(bps, this) );
+
+ return null;
+ }
+ }.get();
+ }
+
+ private void checkBreakpointForErrors(final String bpId, final String processId) throws InterruptedException, ExecutionException {
+ new Transaction<Object>() {
+ @Override
+ protected Object process() throws InvalidCacheException, ExecutionException {
+ // Wait for breakpoint status event and validate it.
+ Map<String, Object> status = validate( fBreakpointsCM.getStatus(bpId) );
+ String s = (String)status.get(IBreakpoints.STATUS_ERROR);
+ if (s != null) {
+ Assert.fail("Invalid BP status: " + s);
+ }
+ @SuppressWarnings("unchecked")
+ Collection<Map<String,Object>> list = (Collection<Map<String,Object>>)status.get(IBreakpoints.STATUS_INSTANCES);
+ if (list != null) {
+ String err = null;
+ for (Map<String,Object> map : list) {
+ String ctx = (String)map.get(IBreakpoints.INSTANCE_CONTEXT);
+ if (processId.equals(ctx) && map.get(IBreakpoints.INSTANCE_ERROR) != null)
+ err = (String)map.get(IBreakpoints.INSTANCE_ERROR);
+ }
+ if (err != null) {
+ Assert.fail("Invalid BP status: " + s);
+ }
+ }
+ return null;
+ }
+ }.get();
+ }
+
+ private void startProcess() throws InterruptedException, ExecutionException {
+ new Transaction<Object>() {
+ protected Object process() throws Transaction.InvalidCacheException ,ExecutionException {
+ fTestId = validate( fDiagnosticsCM.runTest(getDiagnosticsTestName(), this) );
+ fTestCtx = validate( fRunControlCM.getContext(fTestId) );
+ fProcessId = fTestCtx.getProcessID();
+ // Create the cache to listen for exceptions.
+ fRunControlCM.waitForContextException(fTestId, fTestRunKey);
+
+ if (!fProcessId.equals(fTestId)) {
+ fThreadId = fTestId;
+ } else {
+ String[] threads = validate( fRunControlCM.getChildren(fProcessId) );
+ fThreadId = threads[0];
+ }
+ fThreadCtx = validate( fRunControlCM.getContext(fThreadId) );
+
+ Assert.assertTrue("Invalid thread context", fThreadCtx.hasState());
+ return new Object();
+ };
+ }.get();
+ }
+
+
+ private void initProcessModel(String bpId, String testFunc) throws Exception {
+ createBreakpoint(bpId, testFunc);
+ fDebugViewListener.reset();
+
+ startProcess();
+ fDebugViewListener.waitTillFinished(MODEL_CHANGED_COMPLETE | CONTENT_SEQUENCE_COMPLETE | LABEL_SEQUENCE_COMPLETE | LABEL_UPDATES);
+ }
+
+ public void testCreateBreakpoint() throws Exception {
+ String bpId = "TestStepBP";
+ initProcessModel(bpId, "tcf_test_func0");
+
+
+
+ //CDIDebugModel.createFunctionBreakpoint();
+
+ checkBreakpointForErrors(bpId, fProcessId);
+ }
+}
diff --git a/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/IViewerUpdatesListenerConstants.java b/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/IViewerUpdatesListenerConstants.java
new file mode 100644
index 000000000..fb8995fc2
--- /dev/null
+++ b/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/IViewerUpdatesListenerConstants.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Wind River Systems and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.debug.test;
+
+/**
+ * Copied from org.eclipse.cdt.tests.dsf.
+ *
+ * Convenience interface with constants used by the test model update listener.
+ */
+public interface IViewerUpdatesListenerConstants {
+
+ public static final int LABEL_SEQUENCE_COMPLETE = 0X00000001;
+ public static final int CONTENT_SEQUENCE_COMPLETE = 0X00000002;
+ public static final int CONTENT_SEQUENCE_STARTED = 0X00020000;
+ public static final int LABEL_UPDATES = 0X00000004;
+ public static final int LABEL_SEQUENCE_STARTED = 0X00040000;
+ public static final int HAS_CHILDREN_UPDATES = 0X00000008;
+ public static final int HAS_CHILDREN_UPDATES_STARTED = 0X00080000;
+ public static final int CHILD_COUNT_UPDATES = 0X00000010;
+ public static final int CHILD_COUNT_UPDATES_STARTED = 0X00100000;
+ public static final int CHILDREN_UPDATES = 0X00000020;
+ public static final int CHILDREN_UPDATES_STARTED = 0X00200000;
+ public static final int MODEL_CHANGED_COMPLETE = 0X00000040;
+
+ /**
+ * Flag to check whether a model proxy was installed for the model. The model proxy installation is tracked by
+ * looking for the IModelDelta.EXPAND flag, since the model expands and selects threads when Debug view is opened.
+ */
+ public static final int MODEL_PROXIES_INSTALLED = 0X00000080;
+ public static final int STATE_SAVE_COMPLETE = 0X00000100;
+ public static final int STATE_SAVE_STARTED = 0X01000000;
+ public static final int STATE_RESTORE_COMPLETE = 0X00000200;
+ public static final int STATE_RESTORE_STARTED = 0X02000000;
+ public static final int STATE_UPDATES = 0X00000400;
+ public static final int STATE_UPDATES_STARTED = 0X04000000;
+
+ public static final int VIEWER_UPDATES_RUNNING = 0X00001000;
+ public static final int LABEL_UPDATES_RUNNING = 0X00002000;
+
+ public static final int VIEWER_UPDATES_STARTED = HAS_CHILDREN_UPDATES_STARTED | CHILD_COUNT_UPDATES_STARTED | CHILDREN_UPDATES_STARTED;
+
+ public static final int LABEL_COMPLETE = LABEL_SEQUENCE_COMPLETE | LABEL_UPDATES | LABEL_UPDATES_RUNNING;
+ public static final int CONTENT_UPDATES = HAS_CHILDREN_UPDATES | CHILD_COUNT_UPDATES | CHILDREN_UPDATES;
+ public static final int CONTENT_COMPLETE = CONTENT_UPDATES | CONTENT_SEQUENCE_COMPLETE | VIEWER_UPDATES_RUNNING;
+
+ public static final int ALL_UPDATES_COMPLETE = LABEL_COMPLETE | CONTENT_COMPLETE | MODEL_PROXIES_INSTALLED | LABEL_UPDATES_RUNNING | VIEWER_UPDATES_RUNNING;
+}
diff --git a/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/SampleTest.java b/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/SampleTest.java
new file mode 100644
index 000000000..7173f262a
--- /dev/null
+++ b/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/SampleTest.java
@@ -0,0 +1,502 @@
+package org.eclipse.tcf.debug.test;
+
+import java.math.BigInteger;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+import java.util.TreeMap;
+import java.util.concurrent.ExecutionException;
+import java.util.regex.Pattern;
+
+import org.eclipse.debug.internal.ui.viewers.model.provisional.VirtualItem;
+import org.eclipse.jface.viewers.TreePath;
+import org.eclipse.tcf.debug.test.services.IWaitForEventCache;
+import org.eclipse.tcf.debug.test.services.RunControlCM;
+import org.eclipse.tcf.debug.test.services.RunControlCM.ContextState;
+import org.eclipse.tcf.debug.test.util.Transaction;
+import org.eclipse.tcf.debug.ui.ITCFObject;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.services.IBreakpoints;
+import org.eclipse.tcf.services.IDiagnostics.ISymbol;
+import org.eclipse.tcf.services.IRunControl;
+import org.eclipse.tcf.services.IRunControl.RunControlContext;
+import org.eclipse.tcf.services.ISymbols;
+import org.eclipse.tcf.services.ISymbols.Symbol;
+import org.junit.Assert;
+
+@SuppressWarnings("restriction")
+public class SampleTest extends AbstractTcfUITest
+{
+ private String fTestId;
+ private RunControlContext fTestCtx;
+ private String fProcessId = "";
+ private String fThreadId = "";
+ private RunControlContext fThreadCtx;
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ clearBreakpoints();
+ }
+
+ private void clearBreakpoints() throws InterruptedException, ExecutionException {
+ new Transaction<Object>() {
+ @Override
+ protected Object process() throws InvalidCacheException, ExecutionException {
+ // Initialize the event cache for breakpoint status
+ @SuppressWarnings("unchecked")
+ Map<String, Object>[] bps = (Map<String, Object>[])new Map[] { };
+ validate( fBreakpointsCM.set(bps, this) );
+ return null;
+ }
+ }.get();
+ }
+
+ private void createBreakpoint(final String bpId, final String testFunc) throws InterruptedException, ExecutionException {
+ new Transaction<Object>() {
+ private Map<String,Object> fBp;
+
+ {
+ fBp = new TreeMap<String,Object>();
+ fBp.put(IBreakpoints.PROP_ID, bpId);
+ fBp.put(IBreakpoints.PROP_ENABLED, Boolean.TRUE);
+ fBp.put(IBreakpoints.PROP_LOCATION, testFunc);
+ }
+
+ @Override
+ protected Object process() throws InvalidCacheException, ExecutionException {
+
+ // Initialize the event cache for breakpoint status
+// ICache<Map<String, Object>> waitStatusCache = fBreakpointsCM.waitStatusChanged(bpId, fTestRunKey);
+
+ validate( fBreakpointsCM.add(fBp, this) );
+
+// // Wait for breakpoint status event and validate it.
+// Map<String, Object> status = validate(waitStatusCache);
+// String s = (String)status.get(IBreakpoints.STATUS_ERROR);
+// if (s != null) {
+// Assert.fail("Invalid BP status: " + s);
+// }
+// @SuppressWarnings("unchecked")
+// Collection<Map<String,Object>> list = (Collection<Map<String,Object>>)status.get(IBreakpoints.STATUS_INSTANCES);
+// if (list != null) {
+// String err = null;
+// for (Map<String,Object> map : list) {
+// String ctx = (String)map.get(IBreakpoints.INSTANCE_CONTEXT);
+// if (processId.equals(ctx) && map.get(IBreakpoints.INSTANCE_ERROR) != null)
+// err = (String)map.get(IBreakpoints.INSTANCE_ERROR);
+// }
+// if (err != null) {
+// Assert.fail("Invalid BP status: " + s);
+// }
+// }
+ return null;
+ }
+ }.get();
+ }
+
+ private void checkBreakpointForErrors(final String bpId, final String processId) throws InterruptedException, ExecutionException {
+ new Transaction<Object>() {
+ @Override
+ protected Object process() throws InvalidCacheException, ExecutionException {
+ // Wait for breakpoint status event and validate it.
+ Map<String, Object> status = validate( fBreakpointsCM.getStatus(bpId) );
+ String s = (String)status.get(IBreakpoints.STATUS_ERROR);
+ if (s != null) {
+ Assert.fail("Invalid BP status: " + s);
+ }
+ @SuppressWarnings("unchecked")
+ Collection<Map<String,Object>> list = (Collection<Map<String,Object>>)status.get(IBreakpoints.STATUS_INSTANCES);
+ if (list != null) {
+ String err = null;
+ for (Map<String,Object> map : list) {
+ String ctx = (String)map.get(IBreakpoints.INSTANCE_CONTEXT);
+ if (processId.equals(ctx) && map.get(IBreakpoints.INSTANCE_ERROR) != null)
+ err = (String)map.get(IBreakpoints.INSTANCE_ERROR);
+ }
+ if (err != null) {
+ Assert.fail("Invalid BP status: " + s);
+ }
+ }
+ return null;
+ }
+ }.get();
+ }
+
+ private void startProcess() throws InterruptedException, ExecutionException {
+ new Transaction<Object>() {
+ protected Object process() throws Transaction.InvalidCacheException ,ExecutionException {
+ fTestId = validate( fDiagnosticsCM.runTest(getDiagnosticsTestName(), this) );
+ fTestCtx = validate( fRunControlCM.getContext(fTestId) );
+ fProcessId = fTestCtx.getProcessID();
+ // Create the cache to listen for exceptions.
+ fRunControlCM.waitForContextException(fTestId, fTestRunKey);
+
+ if (!fProcessId.equals(fTestId)) {
+ fThreadId = fTestId;
+ } else {
+ String[] threads = validate( fRunControlCM.getChildren(fProcessId) );
+ fThreadId = threads[0];
+ }
+ fThreadCtx = validate( fRunControlCM.getContext(fThreadId) );
+
+ Assert.assertTrue("Invalid thread context", fThreadCtx.hasState());
+ return new Object();
+ };
+ }.get();
+ }
+
+ private boolean runToTestEntry(final String testFunc) throws InterruptedException, ExecutionException {
+ return new Transaction<Boolean>() {
+ Object fWaitForSuspendKey = new Object();
+ boolean fSuspendEventReceived = false;
+ protected Boolean process() throws Transaction.InvalidCacheException ,ExecutionException {
+ ISymbol sym_func0 = validate( fDiagnosticsCM.getSymbol(fProcessId, testFunc) );
+ String sym_func0_value = sym_func0.getValue().toString();
+ ContextState state = validate (fRunControlCM.getState(fThreadId));
+ if (state.suspended) {
+ if ( !new BigInteger(state.pc).equals(new BigInteger(sym_func0_value)) ) {
+ fSuspendEventReceived = true;
+ // We are not at test entry. Create a new suspend wait cache.
+ fWaitForSuspendKey = new Object();
+ fRunControlCM.waitForContextSuspended(fThreadId, fWaitForSuspendKey);
+ // Run to entry point.
+ validate( fRunControlCM.resume(fThreadCtx, fWaitForSuspendKey, IRunControl.RM_RESUME, 1) );
+ }
+ } else {
+ // Wait until we suspend.
+ validate( fRunControlCM.waitForContextSuspended(fThreadId, fWaitForSuspendKey) );
+ }
+
+ return fSuspendEventReceived;
+ }
+ }.get();
+ }
+
+ private void initProcessModel(String bpId, String testFunc) throws Exception {
+ createBreakpoint(bpId, testFunc);
+ fDebugViewListener.reset();
+
+ ITCFObject processTCFContext = new ITCFObject() {
+ public String getID() { return fProcessId; }
+ public IChannel getChannel() { return channels[0]; }
+ };
+ ITCFObject threadTCFContext = new ITCFObject() {
+ public String getID() { return fThreadId; }
+ public IChannel getChannel() { return channels[0]; }
+ };
+
+ fDebugViewListener.addLabelUpdate(new TreePath(new Object[] { fLaunch, processTCFContext }));
+ fDebugViewListener.addLabelUpdate(new TreePath(new Object[] { fLaunch, processTCFContext, threadTCFContext }));
+
+ startProcess();
+ runToTestEntry(testFunc);
+
+ final String topFrameId = new Transaction<String>() {
+ @Override
+ protected String process() throws InvalidCacheException, ExecutionException {
+ String[] frameIds = validate( fStackTraceCM.getChildren(fThreadId) );
+ Assert.assertTrue("No stack frames" , frameIds.length != 0);
+ return frameIds[frameIds.length - 1];
+ }
+ }.get();
+
+ ITCFObject frameTCFContext = new ITCFObject() {
+ public String getID() { return topFrameId; }
+ public IChannel getChannel() { return channels[0]; }
+ };
+ fDebugViewListener.addLabelUpdate(new TreePath(new Object[] { fLaunch, processTCFContext, threadTCFContext, frameTCFContext }));
+
+ fDebugViewListener.waitTillFinished(MODEL_CHANGED_COMPLETE | CONTENT_SEQUENCE_COMPLETE | LABEL_SEQUENCE_COMPLETE | LABEL_UPDATES);
+ }
+
+ public void testDebugViewContent() throws Exception {
+ String bpId = "TestStepBP";
+ initProcessModel(bpId, "tcf_test_func0");
+
+ VirtualItem launchItem = fDebugViewListener.findElement(new Pattern[] { Pattern.compile(".*" + fLaunch.getLaunchConfiguration().getName() + ".*") } );
+ Assert.assertTrue(launchItem != null);
+
+ VirtualItem processItem = fDebugViewListener.findElement(launchItem, new Pattern[] { Pattern.compile(".*agent.*") } );
+ Assert.assertTrue(processItem != null);
+
+ VirtualItem threadItem = fDebugViewListener.findElement(processItem, new Pattern[] { Pattern.compile(".*" + fThreadId + ".*") } );
+ Assert.assertTrue(threadItem != null);
+
+ VirtualItem frameItem = fDebugViewListener.findElement(threadItem, new Pattern[] { Pattern.compile(".*tcf_test_func0.*")});
+ Assert.assertTrue(frameItem != null);
+
+ checkBreakpointForErrors(bpId, fProcessId);
+ }
+
+ public void testSteppingDebugViewOnly() throws Exception {
+ String bpId = "TestStepBP";
+ initProcessModel(bpId, "tcf_test_func0");
+
+ // Execute step loop
+ String previousThreadLabel = null;
+ for (int stepNum = 0; stepNum < 100; stepNum++) {
+ fDebugViewListener.reset();
+
+ resumeAndWaitForSuspend(fThreadCtx, IRunControl.RM_STEP_INTO_LINE);
+
+ fDebugViewListener.waitTillFinished(MODEL_CHANGED_COMPLETE | CONTENT_SEQUENCE_COMPLETE | LABEL_UPDATES_RUNNING);
+ VirtualItem topFrameItem = fDebugViewListener.findElement(
+ new Pattern[] { Pattern.compile(".*"), Pattern.compile(".*"), Pattern.compile(".*" + fProcessId + ".*\\(Step.*"), Pattern.compile(".*")});
+ Assert.assertTrue(topFrameItem != null);
+ String topFrameLabel = ((String[])topFrameItem.getData(VirtualItem.LABEL_KEY))[0];
+ Assert.assertTrue(!topFrameLabel.equals(previousThreadLabel));
+ previousThreadLabel = topFrameLabel;
+ }
+
+ checkBreakpointForErrors(bpId, fProcessId);
+ }
+
+ public void testSteppingWithVariablesAndRegisters() throws Exception {
+ fVariablesViewViewer.setActive(true);
+ fRegistersViewViewer.setActive(true);
+
+ initProcessModel("TestStepBP", "tcf_test_func0");
+
+ // Execute step loop
+ String previousThreadLabel = null;
+ for (int stepNum = 0; stepNum < 100; stepNum++) {
+ fDebugViewListener.reset();
+ fVariablesViewListener.reset();
+ fRegistersViewListener.reset();
+
+ resumeAndWaitForSuspend(fThreadCtx, IRunControl.RM_STEP_INTO_LINE);
+
+ fDebugViewListener.waitTillFinished(MODEL_CHANGED_COMPLETE | CONTENT_SEQUENCE_COMPLETE | LABEL_UPDATES_RUNNING);
+ fVariablesViewListener.waitTillFinished(CONTENT_SEQUENCE_COMPLETE | LABEL_UPDATES_RUNNING);
+ fRegistersViewListener.waitTillFinished(CONTENT_SEQUENCE_COMPLETE | LABEL_UPDATES_RUNNING);
+ VirtualItem topFrameItem = fDebugViewListener.findElement(
+ new Pattern[] { Pattern.compile(".*"), Pattern.compile(".*"), Pattern.compile(".*" + fProcessId + ".*\\(Step.*"), Pattern.compile(".*")});
+ Assert.assertTrue(topFrameItem != null);
+ String topFrameLabel = ((String[])topFrameItem.getData(VirtualItem.LABEL_KEY))[0];
+ Assert.assertTrue(!topFrameLabel.equals(previousThreadLabel));
+ previousThreadLabel = topFrameLabel;
+ }
+
+ checkBreakpointForErrors("TestStepBP", fProcessId);
+ }
+
+ public void testSymbolsCMResetOnContextRemove() throws Exception {
+ createBreakpoint("TestStepBP", "tcf_test_func0");
+ startProcess();
+ runToTestEntry("tcf_test_func0");
+
+ // Retrieve the current PC for use later
+ final String pc = new Transaction<String>() {
+ @Override
+ protected String process() throws InvalidCacheException, ExecutionException {
+ return validate(fRunControlCM.getState(fThreadId)).pc;
+ }
+ }.get();
+
+ // Find symbol by name and valide the cache.
+ final String symbolId = new Transaction<String>() {
+ @Override
+ protected String process() throws InvalidCacheException, ExecutionException {
+ String symId = validate( fSymbolsCM.find(fProcessId, new BigInteger(pc), "tcf_test_func0") );
+ Symbol sym = validate( fSymbolsCM.getContext(symId) );
+ Assert.assertEquals(ISymbols.UPDATE_ON_MEMORY_MAP_CHANGES, sym.getUpdatePolicy());
+ return symId;
+ }
+ }.get();
+
+ // Find symbol by address and validate its context. Save address for later.
+ final Number symAddr = new Transaction<Number>() {
+ @Override
+ protected Number process() throws InvalidCacheException, ExecutionException {
+ Symbol sym = validate( fSymbolsCM.getContext(symbolId) );
+ String symId2 = validate( fSymbolsCM.findByAddr(fProcessId, sym.getAddress()) );
+ Symbol sym2 = validate( fSymbolsCM.getContext(symId2) );
+ Assert.assertEquals(sym.getAddress(), sym2.getAddress());
+ return sym.getAddress();
+ }
+ }.get();
+
+ // End test, check that all caches were reset and now return an error.
+ new Transaction<String>() {
+ @Override
+ protected String process() throws InvalidCacheException, ExecutionException {
+ validate( fDiagnosticsCM.cancelTest(fTestId, this) );
+ validate( fRunControlCM.waitForContextRemoved(fProcessId, this) );
+ try {
+ validate( fSymbolsCM.getContext(symbolId) );
+ Assert.fail("Expected error");
+ } catch (ExecutionException e) {}
+ try {
+ validate( fSymbolsCM.find(fProcessId, new BigInteger(pc), "tcf_test_func0") );
+ Assert.fail("Expected error");
+ } catch (ExecutionException e) {}
+ try {
+ validate( fSymbolsCM.findByAddr(fProcessId, symAddr) );
+ Assert.fail("Expected error");
+ } catch (ExecutionException e) {}
+
+ return null;
+ }
+ }.get();
+ }
+
+ public void testSymbolsCMResetOnContextStateChange() throws Exception {
+ createBreakpoint("TestStepBP", "tcf_test_func2");
+ startProcess();
+ runToTestEntry("tcf_test_func2");
+
+ // Retrieve the current PC and top frame for use later
+ final String pc = new Transaction<String>() {
+ @Override
+ protected String process() throws InvalidCacheException, ExecutionException {
+ return validate(fRunControlCM.getState(fThreadId)).pc;
+ }
+ }.get();
+ final String topFrameId = new Transaction<String>() {
+ @Override
+ protected String process() throws InvalidCacheException, ExecutionException {
+ String[] frameIds = validate( fStackTraceCM.getChildren(fThreadId) );
+ return frameIds[frameIds.length - 1];
+ }
+ }.get();
+
+ // Find symbol by name and valide the cache.
+ final String symbolId = new Transaction<String>() {
+ @Override
+ protected String process() throws InvalidCacheException, ExecutionException {
+ String symId = validate( fSymbolsCM.find(topFrameId, new BigInteger(pc), "func2_local1") );
+ Symbol sym = validate( fSymbolsCM.getContext(symId) );
+ Assert.assertEquals(ISymbols.UPDATE_ON_EXE_STATE_CHANGES, sym.getUpdatePolicy());
+ return symId;
+ }
+ }.get();
+
+ // Note: findByAddr doesn't seem to work on a local var.
+// // Find symbol by address and validate its context. Save address for later.
+// final Number symAddr = new Transaction<Number>() {
+// @Override
+// protected Number process() throws InvalidCacheException, ExecutionException {
+// Symbol sym = validate( fSymbolsCM.getContext(symbolId) );
+// String symId2 = validate( fSymbolsCM.findByAddr(topFrameId, sym.getAddress()) );
+// Symbol sym2 = validate( fSymbolsCM.getContext(symId2) );
+// Assert.assertEquals(sym.getAddress(), sym2.getAddress());
+// return sym.getAddress();
+// }
+// }.get();
+
+ // Execute a step.
+ resumeAndWaitForSuspend(fThreadCtx, IRunControl.RM_STEP_OUT);
+
+ // End test, check that all caches were reset and now return an error.
+ new Transaction<Object>() {
+ @Override
+ protected Object process() throws InvalidCacheException, ExecutionException {
+ Assert.assertFalse(
+ "Expected cache to be reset",
+ fSymbolsCM.getContext(symbolId).isValid());
+ Assert.assertFalse(
+ "Expected cache to be reset",
+ fSymbolsCM.find(topFrameId, new BigInteger(pc), "func2_local1").isValid() );
+ return null;
+ }
+ }.get();
+ }
+
+ public void testRunControlCMChildrenInvalidation() throws Exception {
+ createBreakpoint("BP1", "tcf_test_func0");
+ startProcess();
+ runToTestEntry("tcf_test_func0");
+
+ // Wait for each threads to start.
+ final String[] threads = new Transaction<String[]>() {
+ List<String> fThreads = new ArrayList<String>();
+ @Override
+ protected String[] process() throws InvalidCacheException, ExecutionException {
+ IWaitForEventCache<RunControlContext[]> waitCache = fRunControlCM.waitForContextAdded(fProcessId, this);
+ validate(fRunControlCM.resume(fTestCtx, this, IRunControl.RM_RESUME, 1));
+ RunControlContext[] addedContexts = validate(waitCache);
+ for (RunControlContext addedContext : addedContexts) {
+ fThreads.add(addedContext.getID());
+ }
+ if (fThreads.size() < 4) {
+ waitCache.reset();
+ validate(waitCache);
+ }
+ // Validate children cache
+ String[] children = validate (fRunControlCM.getChildren(fProcessId));
+ Assert.assertTrue(
+ "Expected children array to contain added ids",
+ Arrays.asList(children).containsAll(fThreads));
+
+ return fThreads.toArray(new String[fThreads.size()]);
+ }
+ }.get();
+
+ // Wait for each thread to suspend, update caches
+ for (final String thread : threads) {
+ new Transaction<Object>() {
+ @Override
+ protected Object process() throws InvalidCacheException, ExecutionException {
+ RunControlCM.ContextState state = validate(fRunControlCM.getState(thread));
+ if (!state.suspended) {
+ validate( fRunControlCM.waitForContextSuspended(thread, this) );
+ }
+ String symId = validate( fSymbolsCM.find(thread, new BigInteger(state.pc), "tcf_test_func0") );
+ Number symAddr = validate( fSymbolsCM.getContext(symId) ).getAddress();
+ Assert.assertEquals("Expected thread to suspend at breakpoint address", symAddr.toString(), state.pc);
+ String[] children = validate( fRunControlCM.getChildren(thread));
+ Assert.assertEquals("Expected thread to have no children contexts", 0, children.length);
+ return null;
+ }
+ }.get();
+ }
+
+ // End test, check for remvoed events and that state caches were cleared
+ new Transaction<String>() {
+ @Override
+ protected String process() throws InvalidCacheException, ExecutionException {
+ validate( fDiagnosticsCM.cancelTest(fTestId, this) );
+ // Create wait caches
+ IWaitForEventCache<?>[] waitCaches = new IWaitForEventCache<?>[threads.length];
+ for (int i = 0; i < threads.length; i++) {
+ waitCaches[i] = fRunControlCM.waitForContextRemoved(threads[i], this);
+ }
+ validate(fRunControlCM.waitForContextRemoved(fProcessId, this));
+
+ try {
+ validate( fRunControlCM.getContext(fProcessId) );
+ Assert.fail("Expected error");
+ } catch (ExecutionException e) {}
+ try {
+ validate( fRunControlCM.getState(fProcessId) );
+ Assert.fail("Expected error");
+ } catch (ExecutionException e) {}
+ try {
+ String children[] = validate( fRunControlCM.getChildren(fProcessId) );
+ Assert.assertEquals("Expected no children", 0, children.length);
+ } catch (ExecutionException e) {}
+
+ for (String thread : threads) {
+ try {
+ validate( fRunControlCM.getContext(thread) );
+ Assert.fail("Expected error");
+ } catch (ExecutionException e) {}
+ try {
+ validate( fRunControlCM.getState(thread) );
+ Assert.fail("Expected error");
+ } catch (ExecutionException e) {}
+ try {
+ String children[] = validate( fRunControlCM.getChildren(fProcessId) );
+ Assert.assertEquals("Expected no children", 0, children.length);
+ } catch (ExecutionException e) {}
+ }
+
+ return null;
+ }
+ }.get();
+ }
+
+}
diff --git a/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/TestDebugContextProvider.java b/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/TestDebugContextProvider.java
new file mode 100644
index 000000000..7d127ab7a
--- /dev/null
+++ b/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/TestDebugContextProvider.java
@@ -0,0 +1,162 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Wind River Systems, Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.debug.test;
+
+import java.util.ArrayList;
+
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelChangedListener;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDeltaVisitor;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxy;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.ITreeModelViewer;
+import org.eclipse.debug.ui.contexts.AbstractDebugContextProvider;
+import org.eclipse.debug.ui.contexts.DebugContextEvent;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.ITreeSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.TreePath;
+import org.eclipse.swt.widgets.Display;
+
+/**
+ * Copied from org.eclipse.debug.internal.ui.views.launch.LaunchView class.
+ *
+ * This debug context provider emulates the Debug view debug context
+ * provider behavior.
+ */
+@SuppressWarnings("restriction")
+public class TestDebugContextProvider extends AbstractDebugContextProvider implements IModelChangedListener, ISelectionChangedListener{
+
+ private ISelection fContext = null;
+ private ITreeModelViewer fViewer = null;
+ private Visitor fVisitor = new Visitor();
+
+ class Visitor implements IModelDeltaVisitor {
+ public boolean visit(IModelDelta delta, int depth) {
+ if ((delta.getFlags() & (IModelDelta.STATE | IModelDelta.CONTENT)) > 0) {
+ // state and/or content change
+ if ((delta.getFlags() & IModelDelta.SELECT) == 0) {
+ // no select flag
+ if ((delta.getFlags() & IModelDelta.CONTENT) > 0) {
+ // content has changed without select >> possible re-activation
+ possibleChange(getViewerTreePath(delta), DebugContextEvent.ACTIVATED);
+ } else if ((delta.getFlags() & IModelDelta.STATE) > 0) {
+ // state has changed without select >> possible state change of active context
+ possibleChange(getViewerTreePath(delta), DebugContextEvent.STATE);
+ }
+ }
+ }
+ return true;
+ }
+ }
+
+ /**
+ * Returns a tree path for the node, *not* including the root element.
+ *
+ * @param node
+ * model delta
+ * @return corresponding tree path
+ */
+ private TreePath getViewerTreePath(IModelDelta node) {
+ ArrayList<Object> list = new ArrayList<Object>();
+ IModelDelta parentDelta = node.getParentDelta();
+ while (parentDelta != null) {
+ list.add(0, node.getElement());
+ node = parentDelta;
+ parentDelta = node.getParentDelta();
+ }
+ return new TreePath(list.toArray());
+ }
+
+ public TestDebugContextProvider(ITreeModelViewer viewer) {
+ super(null);
+ fViewer = viewer;
+ fViewer.addModelChangedListener(this);
+ fViewer.addSelectionChangedListener(this);
+ }
+
+ protected void dispose() {
+ fContext = null;
+ fViewer.removeModelChangedListener(this);
+ fViewer.removeSelectionChangedListener(this);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.ui.contexts.IDebugContextProvider#getActiveContext()
+ */
+ public synchronized ISelection getActiveContext() {
+ return fContext;
+ }
+
+ protected void activate(ISelection selection) {
+ synchronized (this) {
+ fContext = selection;
+ }
+ fire(new DebugContextEvent(this, selection, DebugContextEvent.ACTIVATED));
+ }
+
+ protected void possibleChange(TreePath element, int type) {
+ DebugContextEvent event = null;
+ synchronized (this) {
+ if (fContext instanceof ITreeSelection) {
+ ITreeSelection ss = (ITreeSelection) fContext;
+ if (ss.size() == 1) {
+ TreePath current = ss.getPaths()[0];
+ if (current.startsWith(element, null)) {
+ if (current.getSegmentCount() == element.getSegmentCount()) {
+ event = new DebugContextEvent(this, fContext, type);
+ } else {
+ // if parent of the currently selected element
+ // changes, issue event to update STATE only
+ event = new DebugContextEvent(this, fContext, DebugContextEvent.STATE);
+ }
+ }
+ }
+ }
+ }
+ if (event == null) {
+ return;
+ }
+ if (Display.getDefault().getThread() == Thread.currentThread()) {
+ fire(event);
+ } else {
+ final DebugContextEvent finalEvent = event;
+ Display.getDefault().asyncExec(new Runnable() {
+ public void run() {
+ // verify selection is still the same context since job was scheduled
+ synchronized (TestDebugContextProvider.this) {
+ if (fContext instanceof IStructuredSelection) {
+ IStructuredSelection ss = (IStructuredSelection) fContext;
+ Object changed = ((IStructuredSelection)finalEvent.getContext()).getFirstElement();
+ if (!(ss.size() == 1 && ss.getFirstElement().equals(changed))) {
+ return;
+ }
+ }
+ }
+ fire(finalEvent);
+ }
+ });
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.internal.ui.viewers.model.provisional.IModelChangedListener#modelChanged(org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta)
+ */
+ public void modelChanged(IModelDelta delta, IModelProxy proxy) {
+ delta.accept(fVisitor);
+ }
+
+ public void selectionChanged(SelectionChangedEvent event) {
+ activate(event.getSelection());
+ }
+
+}
diff --git a/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/VariablesVirtualTreeModelViewer.java b/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/VariablesVirtualTreeModelViewer.java
new file mode 100644
index 000000000..f41afd046
--- /dev/null
+++ b/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/VariablesVirtualTreeModelViewer.java
@@ -0,0 +1,80 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Wind River Systems and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.debug.test;
+
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerInputRequestor;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerInputUpdate;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.PresentationContext;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.ViewerInputService;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.VirtualTreeModelViewer;
+import org.eclipse.debug.ui.contexts.DebugContextEvent;
+import org.eclipse.debug.ui.contexts.IDebugContextListener;
+import org.eclipse.debug.ui.contexts.IDebugContextProvider;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Display;
+
+/**
+ *
+ */
+@SuppressWarnings("restriction")
+public class VariablesVirtualTreeModelViewer extends VirtualTreeModelViewer implements IDebugContextListener {
+
+ private IDebugContextProvider fDebugContextProvider;
+ private ViewerInputService fInputService;
+ private boolean fActive = false;
+
+ public VariablesVirtualTreeModelViewer(String contextId, IDebugContextProvider debugContextProvider) {
+ super(Display.getDefault(), SWT.NONE, new PresentationContext(contextId));
+ fInputService = new ViewerInputService(this, new IViewerInputRequestor() {
+
+ public void viewerInputComplete(IViewerInputUpdate update) {
+ if (!update.isCanceled()) {
+ setInput(update.getInputElement());
+ }
+ }
+ });
+ fDebugContextProvider = debugContextProvider;
+ debugContextProvider.addDebugContextListener(this);
+ }
+
+ public void setActive(boolean active) {
+ if (fActive == active) {
+ return;
+ }
+ fActive = active;
+ if (fActive) {
+ setActiveContext(fDebugContextProvider.getActiveContext());
+ } else {
+ fInputService.resolveViewerInput(ViewerInputService.NULL_INPUT);
+ }
+ }
+
+ @Override
+ public void dispose() {
+ fDebugContextProvider.removeDebugContextListener(this);
+ fInputService.dispose();
+ super.dispose();
+ }
+
+ public void debugContextChanged(DebugContextEvent event) {
+ if (fActive && (event.getFlags() | DebugContextEvent.ACTIVATED) != 0) {
+ setActiveContext(event.getContext());
+ }
+ }
+
+ private void setActiveContext(ISelection selection) {
+ if (selection instanceof IStructuredSelection) {
+ fInputService.resolveViewerInput(((IStructuredSelection)selection).getFirstElement());
+ }
+ }
+}
diff --git a/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/ViewerUpdatesListener.java b/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/ViewerUpdatesListener.java
new file mode 100644
index 000000000..c175167bf
--- /dev/null
+++ b/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/ViewerUpdatesListener.java
@@ -0,0 +1,649 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Wind River Systems and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.debug.test;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+import java.util.TreeSet;
+
+import junit.framework.Assert;
+
+import org.eclipse.debug.internal.ui.viewers.model.ILabelUpdateListener;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IChildrenCountUpdate;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IChildrenUpdate;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IHasChildrenUpdate;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.ILabelUpdate;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelChangedListener;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDeltaVisitor;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxy;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IStateUpdateListener;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.ITreeModelViewer;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdateListener;
+import org.eclipse.jface.viewers.TreePath;
+
+/**
+ * Copied from org.eclipse.cdt.tests.dsf
+ *
+ */
+@SuppressWarnings("restriction")
+public class ViewerUpdatesListener
+ implements IViewerUpdateListener, ILabelUpdateListener, IModelChangedListener, IViewerUpdatesListenerConstants,
+ IStateUpdateListener
+{
+ private ITreeModelViewer fViewer;
+
+ private boolean fFailOnRedundantUpdates;
+ private Set<IViewerUpdate> fRedundantUpdates = new HashSet<IViewerUpdate>();
+
+ private boolean fFailOnMultipleModelUpdateSequences;
+ private boolean fMultipleModelUpdateSequencesObserved;
+ private boolean fFailOnMultipleLabelUpdateSequences;
+ private boolean fMultipleLabelUpdateSequencesObserved;
+
+ private boolean fDelayContentUntilProxyInstall;
+
+ private Set<TreePath> fHasChildrenUpdatesScheduled = makeTreePathSet();
+ private Set<IViewerUpdate> fHasChildrenUpdatesRunning = new HashSet<IViewerUpdate>();
+ private Set<IViewerUpdate> fHasChildrenUpdatesCompleted = new HashSet<IViewerUpdate>();
+ private Map<TreePath, Set<Integer>> fChildrenUpdatesScheduled = makeTreePathMap();
+ private Set<IViewerUpdate> fChildrenUpdatesRunning = new HashSet<IViewerUpdate>();
+ private Set<IViewerUpdate> fChildrenUpdatesCompleted = new HashSet<IViewerUpdate>();
+ private Set<TreePath> fChildCountUpdatesScheduled = makeTreePathSet();
+ private Set<IViewerUpdate> fChildCountUpdatesRunning = new HashSet<IViewerUpdate>();
+ private Set<IViewerUpdate> fChildCountUpdatesCompleted = new HashSet<IViewerUpdate>();
+ private Set<TreePath> fLabelUpdates = makeTreePathSet();
+ private Set<IViewerUpdate> fLabelUpdatesRunning = new HashSet<IViewerUpdate>();
+ private Set<IViewerUpdate> fLabelUpdatesCompleted = new HashSet<IViewerUpdate>();
+ private Set<TreePath> fPropertiesUpdates = makeTreePathSet();
+ private boolean fModelProxyInstalled;
+ private Set<TreePath> fStateUpdates = makeTreePathSet();
+ private boolean fContentSequenceStarted;
+ private boolean fContentSequenceComplete;
+ private boolean fLabelUpdatesStarted;
+ private boolean fLabelSequenceComplete;
+ private boolean fModelChangedComplete;
+ private boolean fStateSaveStarted;
+ private boolean fStateSaveComplete;
+ private boolean fStateRestoreStarted;
+ private boolean fStateRestoreComplete;
+ private int fContentUpdatesCounter;
+ private int fLabelUpdatesCounter;
+ private int fTimeoutInterval = 60000;
+ private long fTimeoutTime;
+
+ protected Set<TreePath> makeTreePathSet() {
+ return new HashSet<TreePath>();
+ }
+
+ protected <V> Map<TreePath, V> makeTreePathMap() {
+ return new HashMap<TreePath, V>();
+ }
+
+ public ViewerUpdatesListener(ITreeModelViewer viewer, boolean failOnRedundantUpdates, boolean failOnMultipleModelUpdateSequences) {
+ this(viewer);
+ setFailOnRedundantUpdates(failOnRedundantUpdates);
+ setFailOnMultipleModelUpdateSequences(failOnMultipleModelUpdateSequences);
+ }
+
+ public ViewerUpdatesListener() {
+ // No viewer to register with. Client will have to register the listener manually.
+ }
+
+ public ViewerUpdatesListener(ITreeModelViewer viewer) {
+ fViewer = viewer;
+ fViewer.addLabelUpdateListener(this);
+ fViewer.addModelChangedListener(this);
+ fViewer.addStateUpdateListener(this);
+ fViewer.addViewerUpdateListener(this);
+ }
+
+ public void dispose() {
+ if (fViewer != null) {
+ fViewer.removeLabelUpdateListener(this);
+ fViewer.removeModelChangedListener(this);
+ fViewer.removeStateUpdateListener(this);
+ fViewer.removeViewerUpdateListener(this);
+ fViewer = null;
+ }
+ }
+
+
+ public void setFailOnRedundantUpdates(boolean failOnRedundantUpdates) {
+ fFailOnRedundantUpdates = failOnRedundantUpdates;
+ }
+
+ public void setFailOnMultipleModelUpdateSequences(boolean failOnMultipleLabelUpdateSequences) {
+ fFailOnMultipleModelUpdateSequences = failOnMultipleLabelUpdateSequences;
+ }
+
+ public void setFailOnMultipleLabelUpdateSequences(boolean failOnMultipleLabelUpdateSequences) {
+ fFailOnMultipleLabelUpdateSequences = failOnMultipleLabelUpdateSequences;
+ }
+
+ /**
+ * Causes the content sequence started/ended notifications to be ignored
+ * until the model proxy is installed. This flag has to be set again after
+ * every reset.
+ * @param delay If true, listener will delay.
+ */
+ public void setDelayContentUntilProxyInstall(boolean delay) {
+ fDelayContentUntilProxyInstall = delay;
+ }
+
+ /**
+ * Sets the the maximum amount of time (in milliseconds) that the update listener
+ * is going to wait. If set to -1, the listener will wait indefinitely.
+ */
+ public void setTimeoutInterval(int milis) {
+ fTimeoutInterval = milis;
+ }
+
+ public void reset() {
+ fRedundantUpdates.clear();
+ fMultipleLabelUpdateSequencesObserved = false;
+ fMultipleModelUpdateSequencesObserved = false;
+ fHasChildrenUpdatesScheduled.clear();
+ fHasChildrenUpdatesRunning.clear();
+ fHasChildrenUpdatesCompleted.clear();
+ fChildrenUpdatesScheduled.clear();
+ fChildrenUpdatesRunning.clear();
+ fChildrenUpdatesCompleted.clear();
+ fChildCountUpdatesScheduled.clear();
+ fChildCountUpdatesRunning.clear();
+ fChildCountUpdatesCompleted.clear();
+ fLabelUpdates.clear();
+ fLabelUpdatesRunning.clear();
+ fLabelUpdatesCompleted.clear();
+ fModelProxyInstalled = false;
+ fContentSequenceStarted = false;
+ fContentSequenceComplete = false;
+ fLabelUpdatesStarted = false;
+ fLabelSequenceComplete = false;
+ fStateSaveStarted = false;
+ fStateSaveComplete = false;
+ fStateRestoreStarted = false;
+ fStateRestoreComplete = false;
+ fDelayContentUntilProxyInstall = false;
+
+ fTimeoutTime = System.currentTimeMillis() + fTimeoutInterval;
+ resetModelChanged();
+ }
+
+ public void resetModelChanged() {
+ fModelChangedComplete = false;
+ }
+
+ public void addHasChildrenUpdate(TreePath path) {
+ fHasChildrenUpdatesScheduled.add(path);
+ }
+
+ public void removeHasChildrenUpdate(TreePath path) {
+ fHasChildrenUpdatesScheduled.remove(path);
+ }
+
+ public void addChildCountUpdate(TreePath path) {
+ fChildCountUpdatesScheduled.add(path);
+ }
+
+ public void removeChildreCountUpdate(TreePath path) {
+ fChildCountUpdatesScheduled.remove(path);
+ }
+
+ public void addChildreUpdate(TreePath path, int index) {
+ Set<Integer> childrenIndexes = fChildrenUpdatesScheduled.get(path);
+ if (childrenIndexes == null) {
+ childrenIndexes = new TreeSet<Integer>();
+ fChildrenUpdatesScheduled.put(path, childrenIndexes);
+ }
+ childrenIndexes.add(new Integer(index));
+ }
+
+ public void removeChildrenUpdate(TreePath path, int index) {
+ Set<Integer> childrenIndexes = fChildrenUpdatesScheduled.get(path);
+ if (childrenIndexes != null) {
+ childrenIndexes.remove(new Integer(index));
+ if (childrenIndexes.isEmpty()) {
+ fChildrenUpdatesScheduled.remove(path);
+ }
+ }
+ }
+
+ public void addLabelUpdate(TreePath path) {
+ fLabelUpdates.add(path);
+ }
+
+ public void addPropertiesUpdate(TreePath path) {
+ fPropertiesUpdates.add(path);
+ }
+
+ public void removeLabelUpdate(TreePath path) {
+ fLabelUpdates.remove(path);
+ }
+
+ public void addStateUpdate(TreePath path) {
+ fStateUpdates.add(path);
+ }
+
+ public void removeStateUpdate(TreePath path) {
+ fStateUpdates.remove(path);
+ }
+
+
+ public boolean isFinished() {
+ return isFinished(ALL_UPDATES_COMPLETE);
+ }
+
+ public boolean isTimedOut() {
+ return fTimeoutInterval > 0 && fTimeoutTime < System.currentTimeMillis();
+ }
+
+ public void waitTillFinished(int flags) throws InterruptedException {
+ synchronized(this) {
+ while(!isFinished(flags)) {
+ wait(100);
+ }
+ }
+ }
+
+ public boolean isFinished(int flags) {
+// if (isTimedOut()) {
+// throw new RuntimeException("Timed Out: " + toString(flags));
+// }
+
+ if (fFailOnRedundantUpdates && !fRedundantUpdates.isEmpty()) {
+ Assert.fail("Redundant Updates: " + fRedundantUpdates.toString());
+ }
+ if (fFailOnMultipleLabelUpdateSequences && !fMultipleLabelUpdateSequencesObserved) {
+ Assert.fail("Multiple label update sequences detected");
+ }
+ if (fFailOnMultipleModelUpdateSequences && fMultipleModelUpdateSequencesObserved) {
+ Assert.fail("Multiple viewer update sequences detected");
+ }
+
+ if ( (flags & LABEL_SEQUENCE_COMPLETE) != 0) {
+ if (!fLabelSequenceComplete) return false;
+ }
+ if ( (flags & LABEL_SEQUENCE_STARTED) != 0) {
+ if (!fLabelUpdatesStarted) return false;
+ }
+ if ( (flags & LABEL_UPDATES) != 0) {
+ if (!fLabelUpdates.isEmpty()) return false;
+ }
+ if ( (flags & CONTENT_SEQUENCE_STARTED) != 0) {
+ if (!fContentSequenceStarted) return false;
+ }
+ if ( (flags & CONTENT_SEQUENCE_COMPLETE) != 0) {
+ if (!fContentSequenceComplete) return false;
+ }
+ if ( (flags & HAS_CHILDREN_UPDATES_STARTED) != 0) {
+ if (fHasChildrenUpdatesRunning.isEmpty() && fHasChildrenUpdatesCompleted.isEmpty()) return false;
+ }
+ if ( (flags & HAS_CHILDREN_UPDATES) != 0) {
+ if (!fHasChildrenUpdatesScheduled.isEmpty()) return false;
+ }
+ if ( (flags & CHILD_COUNT_UPDATES_STARTED) != 0) {
+ if (fChildCountUpdatesRunning.isEmpty() && fChildCountUpdatesCompleted.isEmpty()) return false;
+ }
+ if ( (flags & CHILD_COUNT_UPDATES) != 0) {
+ if (!fChildCountUpdatesScheduled.isEmpty()) return false;
+ }
+ if ( (flags & CHILDREN_UPDATES_STARTED) != 0) {
+ if (fChildrenUpdatesRunning.isEmpty() && fChildrenUpdatesCompleted.isEmpty()) return false;
+ }
+ if ( (flags & CHILDREN_UPDATES) != 0) {
+ if (!fChildrenUpdatesScheduled.isEmpty()) return false;
+ }
+ if ( (flags & MODEL_CHANGED_COMPLETE) != 0) {
+ if (!fModelChangedComplete) return false;
+ }
+ if ( (flags & STATE_SAVE_COMPLETE) != 0) {
+ if (!fStateSaveComplete) return false;
+ }
+ if ( (flags & STATE_SAVE_STARTED) != 0) {
+ if (!fStateSaveStarted) return false;
+ }
+ if ( (flags & STATE_RESTORE_COMPLETE) != 0) {
+ if (!fStateRestoreComplete) return false;
+ }
+ if ( (flags & STATE_RESTORE_STARTED) != 0) {
+ if (!fStateRestoreStarted) return false;
+ }
+ if ( (flags & MODEL_PROXIES_INSTALLED) != 0) {
+ if (!fModelProxyInstalled) return false;
+ }
+ if ( (flags & VIEWER_UPDATES_RUNNING) != 0) {
+ if (fContentUpdatesCounter != 0) {
+ return false;
+ }
+ }
+ if ( (flags & LABEL_UPDATES_RUNNING) != 0) {
+ if (fLabelUpdatesCounter != 0) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ public synchronized void updateStarted(IViewerUpdate update) {
+ synchronized (this) {
+ fContentUpdatesCounter++;
+ if (update instanceof IHasChildrenUpdate) {
+ fHasChildrenUpdatesRunning.add(update);
+ } if (update instanceof IChildrenCountUpdate) {
+ fChildCountUpdatesRunning.add(update);
+ } else if (update instanceof IChildrenUpdate) {
+ fChildCountUpdatesRunning.add(update);
+ }
+ }
+ notifyAll();
+ }
+
+ public synchronized void updateComplete(IViewerUpdate update) {
+ synchronized (this) {
+ fContentUpdatesCounter--;
+ }
+
+ if (!update.isCanceled()) {
+ if (update instanceof IHasChildrenUpdate) {
+ fHasChildrenUpdatesRunning.remove(update);
+ fHasChildrenUpdatesCompleted.add(update);
+ if (!fHasChildrenUpdatesScheduled.remove(update.getElementPath()) && fFailOnRedundantUpdates) {
+ fRedundantUpdates.add(update);
+ }
+ } if (update instanceof IChildrenCountUpdate) {
+ fChildCountUpdatesRunning.remove(update);
+ fChildCountUpdatesCompleted.add(update);
+ if (!fChildCountUpdatesScheduled.remove(update.getElementPath()) && fFailOnRedundantUpdates) {
+ fRedundantUpdates.add(update);
+ }
+ } else if (update instanceof IChildrenUpdate) {
+ fChildrenUpdatesRunning.remove(update);
+ fChildrenUpdatesCompleted.add(update);
+
+ int start = ((IChildrenUpdate)update).getOffset();
+ int end = start + ((IChildrenUpdate)update).getLength();
+
+ Set<Integer> childrenIndexes = fChildrenUpdatesScheduled.get(update.getElementPath());
+ if (childrenIndexes != null) {
+ for (int i = start; i < end; i++) {
+ childrenIndexes.remove(new Integer(i));
+ }
+ if (childrenIndexes.isEmpty()) {
+ fChildrenUpdatesScheduled.remove(update.getElementPath());
+ }
+ } else if (fFailOnRedundantUpdates) {
+ fRedundantUpdates.add(update);
+ }
+ }
+ }
+ notifyAll();
+ }
+
+ public synchronized void viewerUpdatesBegin() {
+ if (fDelayContentUntilProxyInstall && !fModelProxyInstalled) return;
+ if (fFailOnMultipleModelUpdateSequences && fContentSequenceComplete) {
+ fMultipleModelUpdateSequencesObserved = true;
+ }
+ fContentSequenceStarted = true;
+ notifyAll();
+ }
+
+ public synchronized void viewerUpdatesComplete() {
+ if (fDelayContentUntilProxyInstall && !fModelProxyInstalled) return;
+ fContentSequenceComplete = true;
+ notifyAll();
+ }
+
+ public synchronized void labelUpdateComplete(ILabelUpdate update) {
+ fLabelUpdatesRunning.remove(update);
+ fLabelUpdatesCompleted.add(update);
+ fLabelUpdatesCounter--;
+ if (!update.isCanceled() && !fLabelUpdates.remove(update.getElementPath()) && fFailOnRedundantUpdates) {
+ fRedundantUpdates.add(update);
+ }
+ notifyAll();
+ }
+
+ public synchronized void labelUpdateStarted(ILabelUpdate update) {
+ fLabelUpdatesRunning.add(update);
+ fLabelUpdatesCounter++;
+ notifyAll();
+ }
+
+ public synchronized void labelUpdatesBegin() {
+ if (fFailOnMultipleLabelUpdateSequences && fLabelSequenceComplete) {
+ fMultipleLabelUpdateSequencesObserved = true;
+ }
+ fLabelUpdatesStarted = true;
+ notifyAll();
+ }
+
+ public synchronized void labelUpdatesComplete() {
+ fLabelSequenceComplete = true;
+ notifyAll();
+ }
+
+ public synchronized void modelChanged(IModelDelta delta, IModelProxy proxy) {
+ fModelChangedComplete = true;
+
+ if (!fModelProxyInstalled) {
+ delta.accept(new IModelDeltaVisitor() {
+ public boolean visit(IModelDelta delta, int depth) {
+ if ((delta.getFlags() & IModelDelta.INSTALL) != 0) {
+ fModelProxyInstalled = true;
+ return false;
+ }
+ return true;
+ }
+ });
+ }
+ notifyAll();
+ }
+
+ public synchronized void stateRestoreUpdatesBegin(Object input) {
+ fStateRestoreStarted = true;
+ notifyAll();
+ }
+
+ public synchronized void stateRestoreUpdatesComplete(Object input) {
+ fStateRestoreComplete = true;
+ notifyAll();
+ }
+
+ public synchronized void stateSaveUpdatesBegin(Object input) {
+ fStateSaveStarted = true;
+ notifyAll();
+ }
+
+ public synchronized void stateSaveUpdatesComplete(Object input) {
+ fStateSaveComplete = true;
+ notifyAll();
+ }
+
+ public void stateUpdateComplete(Object input, IViewerUpdate update) {
+ }
+
+ public void stateUpdateStarted(Object input, IViewerUpdate update) {
+ }
+
+ private String toString(int flags) {
+ StringBuffer buf = new StringBuffer("Viewer Update Listener");
+
+ if (fFailOnRedundantUpdates) {
+ buf.append("\n\t");
+ buf.append("fRedundantUpdates = ");
+ buf.append( toStringViewerUpdatesSet(fRedundantUpdates) );
+ }
+ if (fFailOnMultipleLabelUpdateSequences) {
+ buf.append("\n\t");
+ buf.append("fMultipleLabelUpdateSequencesObserved = " + fMultipleLabelUpdateSequencesObserved);
+ }
+ if (fFailOnMultipleModelUpdateSequences) {
+ buf.append("\n\t");
+ buf.append("fMultipleModelUpdateSequencesObserved = " + fMultipleModelUpdateSequencesObserved);
+ }
+ if ( (flags & LABEL_SEQUENCE_COMPLETE) != 0) {
+ buf.append("\n\t");
+ buf.append("fLabelSequenceComplete = " + fLabelSequenceComplete);
+ }
+ if ( (flags & LABEL_UPDATES_RUNNING) != 0) {
+ buf.append("\n\t");
+ buf.append("fLabelUpdatesRunning = " + fLabelUpdatesCounter);
+ }
+ if ( (flags & LABEL_SEQUENCE_STARTED) != 0) {
+ buf.append("\n\t");
+ buf.append("fLabelUpdatesRunning = ");
+ buf.append( toStringViewerUpdatesSet(fLabelUpdatesRunning) );
+ buf.append("\n\t");
+ buf.append("fLabelUpdatesCompleted = ");
+ buf.append( toStringViewerUpdatesSet(fLabelUpdatesCompleted) );
+ }
+ if ( (flags & LABEL_UPDATES) != 0) {
+ buf.append("\n\t");
+ buf.append("fLabelUpdates = ");
+ buf.append( toString(fLabelUpdates) );
+ }
+ if ( (flags & CONTENT_SEQUENCE_COMPLETE) != 0) {
+ buf.append("\n\t");
+ buf.append("fContentSequenceComplete = " + fContentSequenceComplete);
+ }
+ if ( (flags & VIEWER_UPDATES_RUNNING) != 0) {
+ buf.append("\n\t");
+ buf.append("fContentUpdatesCounter = " + fContentUpdatesCounter);
+ }
+ if ( (flags & HAS_CHILDREN_UPDATES_STARTED) != 0) {
+ buf.append("\n\t");
+ buf.append("fHasChildrenUpdatesRunning = ");
+ buf.append( toStringViewerUpdatesSet(fHasChildrenUpdatesRunning) );
+ buf.append("\n\t");
+ buf.append("fHasChildrenUpdatesCompleted = ");
+ buf.append( toStringViewerUpdatesSet(fHasChildrenUpdatesCompleted) );
+ }
+ if ( (flags & HAS_CHILDREN_UPDATES) != 0) {
+ buf.append("\n\t");
+ buf.append("fHasChildrenUpdates = ");
+ buf.append( toString(fHasChildrenUpdatesScheduled) );
+ }
+ if ( (flags & CHILD_COUNT_UPDATES_STARTED) != 0) {
+ buf.append("\n\t");
+ buf.append("fChildCountUpdatesRunning = ");
+ buf.append( toStringViewerUpdatesSet(fChildCountUpdatesRunning) );
+ buf.append("\n\t");
+ buf.append("fChildCountUpdatesCompleted = ");
+ buf.append( toStringViewerUpdatesSet(fChildCountUpdatesCompleted) );
+ }
+ if ( (flags & CHILD_COUNT_UPDATES) != 0) {
+ buf.append("\n\t");
+ buf.append("fChildCountUpdates = ");
+ buf.append( toString(fChildCountUpdatesScheduled) );
+ }
+ if ( (flags & CHILDREN_UPDATES_STARTED) != 0) {
+ buf.append("\n\t");
+ buf.append("fChildrenUpdatesRunning = ");
+ buf.append( fChildrenUpdatesRunning );
+ buf.append("\n\t");
+ buf.append("fChildrenUpdatesCompleted = ");
+ buf.append( toStringViewerUpdatesSet(fChildrenUpdatesCompleted) );
+ }
+ if ( (flags & CHILDREN_UPDATES) != 0) {
+ buf.append("\n\t");
+ buf.append("fChildrenUpdates = ");
+ buf.append( toStringTreePathMap(fChildrenUpdatesScheduled) );
+ }
+ if ( (flags & MODEL_CHANGED_COMPLETE) != 0) {
+ buf.append("\n\t");
+ buf.append("fModelChangedComplete = " + fModelChangedComplete);
+ }
+ if ( (flags & STATE_SAVE_COMPLETE) != 0) {
+ buf.append("\n\t");
+ buf.append("fStateSaveComplete = " + fStateSaveComplete);
+ }
+ if ( (flags & STATE_RESTORE_COMPLETE) != 0) {
+ buf.append("\n\t");
+ buf.append("fStateRestoreComplete = " + fStateRestoreComplete);
+ }
+ if ( (flags & MODEL_PROXIES_INSTALLED) != 0) {
+ buf.append("\n\t");
+ buf.append("fModelProxyInstalled = " + fModelProxyInstalled);
+ }
+ if (fTimeoutInterval > 0) {
+ buf.append("\n\t");
+ buf.append("fTimeoutInterval = " + fTimeoutInterval);
+ }
+ return buf.toString();
+ }
+
+ private String toString(Set<TreePath> set) {
+ if (set.isEmpty()) {
+ return "(EMPTY)";
+ }
+ StringBuffer buf = new StringBuffer();
+ for (Iterator<TreePath> itr = set.iterator(); itr.hasNext(); ) {
+ buf.append("\n\t\t");
+ buf.append(toStringTreePath(itr.next()));
+ }
+ return buf.toString();
+ }
+
+ private String toStringViewerUpdatesSet(Set<IViewerUpdate> set) {
+ if (set.isEmpty()) {
+ return "(EMPTY)";
+ }
+ StringBuffer buf = new StringBuffer();
+ for (Iterator<IViewerUpdate> itr = set.iterator(); itr.hasNext(); ) {
+ buf.append("\n\t\t");
+ buf.append(toStringTreePath((itr.next()).getElementPath()));
+ }
+ return buf.toString();
+ }
+
+ private String toStringTreePathMap(Map<TreePath, Set<Integer>> map) {
+ if (map.isEmpty()) {
+ return "(EMPTY)";
+ }
+ StringBuffer buf = new StringBuffer();
+ for (Iterator<TreePath> itr = map.keySet().iterator(); itr.hasNext(); ) {
+ buf.append("\n\t\t");
+ TreePath path = itr.next();
+ buf.append(toStringTreePath(path));
+ Set<?> updates = map.get(path);
+ buf.append(" = ");
+ buf.append(updates.toString());
+ }
+ return buf.toString();
+ }
+
+ private String toStringTreePath(TreePath path) {
+ if (path.getSegmentCount() == 0) {
+ return "/";
+ }
+ StringBuffer buf = new StringBuffer();
+ for (int i = 0; i < path.getSegmentCount(); i++) {
+ buf.append("/");
+ buf.append(path.getSegment(i));
+ }
+ return buf.toString();
+ }
+
+ @Override
+ public String toString() {
+ return toString(ALL_UPDATES_COMPLETE | MODEL_CHANGED_COMPLETE | STATE_RESTORE_COMPLETE |
+ VIEWER_UPDATES_STARTED | LABEL_SEQUENCE_STARTED);
+ }
+}
+
+
diff --git a/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/VirtualViewerUpdatesListener.java b/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/VirtualViewerUpdatesListener.java
new file mode 100644
index 000000000..845dfd6ef
--- /dev/null
+++ b/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/VirtualViewerUpdatesListener.java
@@ -0,0 +1,194 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Wind River Systems and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.debug.test;
+
+import java.util.AbstractSet;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+import java.util.regex.Pattern;
+
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.VirtualItem;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.VirtualTreeModelViewer;
+import org.eclipse.jface.viewers.IElementComparer;
+import org.eclipse.jface.viewers.TreePath;
+import org.eclipse.tcf.debug.ui.ITCFObject;
+
+/**
+ * Extends base listener to use virtual viewer capabilities.
+ */
+@SuppressWarnings("restriction")
+public class VirtualViewerUpdatesListener extends ViewerUpdatesListener {
+ private final VirtualTreeModelViewer fVirtualViewer;
+
+ public VirtualViewerUpdatesListener(VirtualTreeModelViewer viewer) {
+ super(viewer, false, false);
+ fVirtualViewer = viewer;
+ }
+
+ public VirtualItem findElement(Pattern[] patterns) {
+ return findElement(fVirtualViewer.getTree(), patterns);
+ }
+
+ public VirtualItem findElement(VirtualItem parent, Pattern[] patterns) {
+ VirtualItem item = parent;
+ patterns: for (int i = 0; i < patterns.length; i++) {
+ for (VirtualItem child : item.getItems()) {
+ String[] label = (String[])child.getData(VirtualItem.LABEL_KEY);
+ if (label != null && label.length >= 1 && label[0] != null && patterns[i].matcher(label[0]).matches()) {
+ item = child;
+ continue patterns;
+ }
+ }
+ return null;
+ }
+ return item;
+ }
+
+ @Override
+ protected Set<TreePath> makeTreePathSet() {
+ return new MatchingSet();
+ }
+
+ private final IElementComparer fPatternComparer = new IElementComparer() {
+ public boolean equals(Object a, Object b) {
+ Pattern pattern = null;
+ Object element = null;
+ if (a instanceof Pattern) {
+ pattern = (Pattern) a;
+ element = b;
+ } else if (b instanceof Pattern) {
+ pattern = (Pattern) b;
+ element = a;
+ }
+ if (pattern != null) {
+ return elementMatches(element, pattern);
+ }
+ return false;
+ }
+
+ private boolean elementMatches(Object element, Pattern pattern) {
+ VirtualItem[] items = fVirtualViewer.findItems(element);
+ if (items.length >= 0) {
+ String[] label = (String[])items[0].getData(VirtualItem.LABEL_KEY);
+ if (label != null && label.length >= 1 && label[0] != null && pattern.matcher(label[0]).matches()) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public int hashCode(Object element) {
+ throw new UnsupportedOperationException();
+ }
+ };
+
+ private final IElementComparer fTCFContextComparer = new IElementComparer() {
+ public boolean equals(Object a, Object b) {
+ ITCFObject context = null;
+ Object element = null;
+ if (a instanceof ITCFObject) {
+ context = (ITCFObject) a;
+ element = b;
+ } else if (b instanceof ITCFObject) {
+ context = (ITCFObject) b;
+ element = a;
+ }
+ if (context != null) {
+ return elementMatches((ITCFObject)DebugPlugin.getAdapter(element, ITCFObject.class), context);
+ }
+ return false;
+ }
+
+ private boolean elementMatches(ITCFObject element, ITCFObject pattern) {
+ return element != null && element.getID().equals(pattern.getID());
+ }
+
+ public int hashCode(Object element) {
+ throw new UnsupportedOperationException();
+ }
+ };
+
+ class MatchingSet extends AbstractSet<TreePath> {
+ List<TreePath> fList = new ArrayList<TreePath>(4);
+
+ @Override
+ public Iterator<TreePath> iterator() {
+ return fList.iterator();
+ }
+
+ @Override
+ public int size() {
+ return fList.size();
+ }
+
+ @Override
+ public boolean add(TreePath o) {
+ return fList.add(o);
+ }
+
+ @Override
+ public void clear() {
+ fList.clear();
+ }
+
+ @Override
+ public boolean contains(Object o) {
+ if (o instanceof TreePath) {
+ return find((TreePath)o) >= 0;
+ }
+ return false;
+ }
+
+ @Override
+ public boolean remove(Object o) {
+ if (o instanceof TreePath) {
+ int index = find((TreePath)o);
+ if (index >= 0) {
+ fList.remove(index);
+ return true;
+ }
+ }
+ return false;
+ }
+
+ private int find(TreePath path) {
+ for (int i = 0; i < fList.size(); i++) {
+ if (matches(fList.get(i), path)) {
+ return i;
+ }
+ }
+ return -1;
+ }
+
+ private boolean matches(TreePath patternPath, TreePath elementPath) {
+ if (patternPath.getSegmentCount() != elementPath.getSegmentCount()) {
+ return false;
+ }
+
+ for (int i = 0; i < patternPath.getSegmentCount(); i++) {
+ Object patternSegment = patternPath.getSegment(i);
+ Object elementSegment = elementPath.getSegment(i);
+ if ( fPatternComparer.equals(elementSegment, patternSegment) ) {
+ continue;
+ } else if (fTCFContextComparer.equals(elementSegment, patternSegment) ) {
+ continue;
+ } else if (patternSegment.equals(elementSegment)) {
+ continue;
+ }
+ return false;
+ }
+ return true;
+ }
+ }
+}
diff --git a/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/services/AbstractCacheManager.java b/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/services/AbstractCacheManager.java
new file mode 100644
index 000000000..909483446
--- /dev/null
+++ b/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/services/AbstractCacheManager.java
@@ -0,0 +1,43 @@
+package org.eclipse.tcf.debug.test.services;
+
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+import org.eclipse.tcf.debug.test.util.ICache;
+
+public class AbstractCacheManager {
+
+ protected Map<Key<?>, ICache<?>> fMap = new LinkedHashMap<Key<?>, ICache<?>>();
+
+ public AbstractCacheManager() {
+ super();
+ }
+
+ public void dispose() {
+ }
+
+ protected <V> V getCache(Key<V> key) {
+ @SuppressWarnings("unchecked")
+ V cache = (V)fMap.get(key);
+ return cache;
+ }
+
+ protected <V> V mapCache(Key<V> key) {
+ @SuppressWarnings("unchecked")
+ V cache = (V)fMap.get(key);
+ if (cache != null) return cache;
+ cache = key.createCache();
+ fMap.put(key, (ICache<?>)cache);
+ return cache;
+ }
+
+ protected boolean contains(Object[] elements, Object toFind) {
+ for (int i = 0; i < elements.length; i++) {
+ if (toFind.equals(elements[i])) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+} \ No newline at end of file
diff --git a/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/services/BreakpointsCM.java b/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/services/BreakpointsCM.java
new file mode 100644
index 000000000..3efade570
--- /dev/null
+++ b/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/services/BreakpointsCM.java
@@ -0,0 +1,348 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.debug.test.services;
+
+import java.util.Map;
+
+import org.eclipse.tcf.debug.test.util.ICache;
+import org.eclipse.tcf.debug.test.util.TokenCache;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.services.IBreakpoints;
+
+/**
+ *
+ */
+public class BreakpointsCM extends AbstractCacheManager implements IBreakpoints.BreakpointsListener {
+
+ private IBreakpoints fService;
+
+ public BreakpointsCM(IBreakpoints service) {
+ fService = service;
+ fService.addListener(this);
+ }
+
+ @Override
+ public void dispose() {
+ fService.removeListener(this);
+ // TODO Auto-generated method stub
+ super.dispose();
+ }
+
+ private abstract static class DoneCommandCache extends TokenCache<Object> implements IBreakpoints.DoneCommand {
+ public void doneCommand(IToken token, Exception error) {
+ set(token, null, error);
+ }
+ }
+
+ public ICache<Object> set(final Map<String,Object>[] properties, Object clientKey) {
+ class MyCache extends DoneCommandCache {
+ @Override
+ protected IToken retrieveToken() {
+ return fService.set(properties, this);
+ }
+ }
+ return mapCache( new CommandKey<MyCache>(MyCache.class, clientKey) {
+ @Override MyCache createCache() { return new MyCache(); }
+ });
+ }
+
+ public ICache<Object> add(final Map<String,Object> properties, Object clientKey) {
+ class MyCache extends DoneCommandCache {
+ @Override
+ protected IToken retrieveToken() {
+ return fService.add(properties, this);
+ }
+ }
+ return mapCache( new CommandKey<MyCache>(MyCache.class, clientKey) {
+ @Override MyCache createCache() { return new MyCache(); }
+ });
+ }
+
+ public ICache<Object> change(final Map<String,Object> properties, Object clientKey) {
+ class MyCache extends DoneCommandCache {
+ @Override
+ protected IToken retrieveToken() {
+ return fService.change(properties, this);
+ }
+ }
+ return mapCache( new CommandKey<MyCache>(MyCache.class, clientKey) {
+ @Override MyCache createCache() { return new MyCache(); }
+ });
+ }
+
+ public ICache<Object> enable(final String[] ids, Object clientKey) {
+ class MyCache extends DoneCommandCache {
+ @Override
+ protected IToken retrieveToken() {
+ return fService.enable(ids, this);
+ }
+ }
+ return mapCache( new CommandKey<MyCache>(MyCache.class, clientKey) {
+ @Override MyCache createCache() { return new MyCache(); }
+ });
+ }
+
+ public ICache<Object> disable(final String[] ids, Object clientKey) {
+ class MyCache extends DoneCommandCache {
+ @Override
+ protected IToken retrieveToken() {
+ return fService.disable(ids, this);
+ }
+ }
+ return mapCache( new CommandKey<MyCache>(MyCache.class, clientKey) {
+ @Override MyCache createCache() { return new MyCache(); }
+ });
+ }
+
+ public ICache<Object> remove(final String[] ids, Object clientKey) {
+ class MyCache extends DoneCommandCache {
+ @Override
+ protected IToken retrieveToken() {
+ return fService.remove(ids, this);
+ }
+ }
+ return mapCache( new CommandKey<MyCache>(MyCache.class, clientKey) {
+ @Override MyCache createCache() { return new MyCache(); }
+ });
+ }
+
+ private class IDsCache extends TokenCache<String[]> implements IBreakpoints.DoneGetIDs {
+ @Override
+ protected IToken retrieveToken() {
+ return fService.getIDs(this);
+ }
+
+ public void doneGetIDs(IToken token, Exception error, String[] ids) {
+ set(token, ids, error);
+ }
+
+ public void resetIDs() {
+ // TODO: handle add/remove ids
+ if (isValid()) reset();
+ }
+ }
+
+ private class IDsCacheKey extends Key<IDsCache> {
+ public IDsCacheKey() {
+ super(IDsCache.class);
+ }
+
+ @Override IDsCache createCache() { return new IDsCache(); }
+ }
+
+ public ICache<String[]> getIDs() {
+ return mapCache( new IDsCacheKey() );
+ }
+
+ private class PropertiesCache extends TokenCache<Map<String,Object>> implements IBreakpoints.DoneGetProperties {
+ String fId;
+
+ public PropertiesCache(String id) {
+ fId = id;
+ }
+
+ @Override
+ protected IToken retrieveToken() {
+ return fService.getProperties(fId, this);
+ }
+
+ public void doneGetProperties(IToken token, Exception error, Map<String, Object> properties) {
+ set(token, properties, error);
+ }
+
+ public void setProperties(Map<String, Object> properties) {
+ set(null, properties, null);
+ }
+
+ public void resetProperties() {
+ if (isValid()) reset();
+ }
+ }
+
+ private class PropertiesCacheKey extends IdKey<PropertiesCache> {
+ public PropertiesCacheKey(String id) {
+ super(PropertiesCache.class, id);
+ }
+
+ @Override PropertiesCache createCache() { return new PropertiesCache(fId); }
+ };
+
+ public ICache<Map<String,Object>> getProperties(String id) {
+ return mapCache( new PropertiesCacheKey(id) );
+ }
+
+ private class StatusCache extends TokenCache<Map<String,Object>> implements IBreakpoints.DoneGetStatus {
+ String fId;
+
+ public StatusCache(String id) {
+ fId = id;
+ }
+
+ @Override
+ protected IToken retrieveToken() {
+ return fService.getStatus(fId, this);
+ }
+
+ public void doneGetStatus(IToken token, Exception error, Map<String, Object> status) {
+ set(token, status, error);
+ }
+
+ public void setStatus(Map<String, Object> status) {
+ set(null, status, null);
+ }
+ }
+
+ private class StatusCacheKey extends IdKey<StatusCache> {
+ public StatusCacheKey(String id) {
+ super(StatusCache.class, id);
+ }
+ @Override StatusCache createCache() { return new StatusCache(fId); }
+ }
+
+ public ICache<Map<String,Object>> getStatus(String id) {
+ return mapCache( new StatusCacheKey(id) );
+ }
+
+ public ICache<Map<String,Object>> getCapabilities(final String id) {
+ class MyCache extends TokenCache<Map<String,Object>> implements IBreakpoints.DoneGetCapabilities {
+ @Override
+ protected IToken retrieveToken() {
+ return fService.getCapabilities(id, this);
+ }
+ public void doneGetCapabilities(IToken token, Exception error, Map<String, Object> capabilities) {
+ set(token, capabilities, error);
+ }
+ }
+ return mapCache( new IdKey<MyCache>(MyCache.class, id) {
+ @Override MyCache createCache() { return new MyCache(); }
+ });
+ }
+
+ private class StatusChangedCache extends WaitForEventCache<Map<String, Object>> {}
+
+ public ICache<Map<String, Object>> waitStatusChanged(String id, Object clientKey) {
+ return mapCache(new IdEventKey<StatusChangedCache>(StatusChangedCache.class, id, clientKey) {
+ @Override
+ StatusChangedCache createCache() {
+ return new StatusChangedCache();
+ }
+ });
+ }
+
+ public void breakpointStatusChanged(String id, final Map<String, Object> status) {
+ StatusCache statusCache = getCache(new StatusCacheKey(id));
+ if (statusCache != null) {
+ statusCache.setStatus(status);
+ }
+
+ // TODO: avoid iterating over all entries, use separate list for events.
+ for (Map.Entry<Key<?>, ICache<?>> entry: fMap.entrySet()) {
+ if (entry.getKey() instanceof IdEventKey) {
+ IdEventKey<?> eventKey = (IdEventKey<?>)entry.getKey();
+ if ( StatusChangedCache.class.equals( eventKey.getCacheClass() ) &&
+ eventKey.fId.equals(id) )
+ {
+ ((StatusChangedCache)entry.getValue()).eventReceived(status);
+ }
+ }
+ }
+ }
+
+ private void setBreakpointsProperties(Map<String, Object>[] bps) {
+ for (Map<String, Object> bp : bps) {
+ Object id = (String)bp.get(IBreakpoints.PROP_ID);
+ if (id instanceof String) {
+ PropertiesCache cache = mapCache(new PropertiesCacheKey((String)id));
+ cache.setProperties(bp);
+ }
+ }
+ }
+
+ private class ContextAddedCache extends WaitForEventCache<Map<String, Object>[]> {}
+
+ public ICache<Map<String, Object>[]> waitContextAdded(Object clientKey) {
+ return mapCache(new EventKey<ContextAddedCache>(ContextAddedCache.class, clientKey) {
+ @Override
+ ContextAddedCache createCache() {
+ return new ContextAddedCache();
+ }
+ });
+ }
+
+ public void contextAdded(Map<String, Object>[] bps) {
+ IDsCache idsCache = getCache(new IDsCacheKey());
+ if (idsCache != null && idsCache.isValid()) {
+ idsCache.resetIDs();
+ }
+
+ setBreakpointsProperties(bps);
+
+ // TODO: avoid iterating over all entries, use separate list for events.
+ for (Map.Entry<Key<?>, ICache<?>> entry: fMap.entrySet()) {
+ if (entry.getKey() instanceof IdEventKey) {
+ IdEventKey<?> eventKey = (IdEventKey<?>)entry.getKey();
+ if ( ContextAddedCache.class.equals( eventKey.getCacheClass() ) ) {
+ ((ContextAddedCache)entry.getValue()).eventReceived(bps);
+ }
+ }
+ }
+ }
+
+ private class ContextChangedCache extends WaitForEventCache<Map<String, Object>[]> {}
+
+ public ICache<Map<String, Object>[]> waitContextChanged(Object clientKey) {
+ return mapCache(new EventKey<ContextChangedCache>(ContextChangedCache.class, clientKey) {
+ @Override
+ ContextChangedCache createCache() {
+ return new ContextChangedCache();
+ }
+ });
+ }
+
+ public void contextChanged(Map<String, Object>[] bps) {
+ setBreakpointsProperties(bps);
+
+ // TODO: avoid iterating over all entries, use separate list for events.
+ for (Map.Entry<Key<?>, ICache<?>> entry: fMap.entrySet()) {
+ if (entry.getKey() instanceof IdEventKey) {
+ IdEventKey<?> eventKey = (IdEventKey<?>)entry.getKey();
+ if ( ContextChangedCache.class.equals( eventKey.getCacheClass() ) ) {
+ ((ContextChangedCache)entry.getValue()).eventReceived(bps);
+ }
+ }
+ }
+ }
+
+ private class ContextRemovedCache extends WaitForEventCache<String[]> {}
+
+ public ICache<String[]> waitContextRemoved(Object clientKey) {
+ return mapCache(new EventKey<ContextRemovedCache>(ContextRemovedCache.class, clientKey) {
+ @Override
+ ContextRemovedCache createCache() {
+ return new ContextRemovedCache();
+ }
+ });
+ }
+
+ public void contextRemoved(String[] ids) {
+ IDsCache idsCache = getCache(new IDsCacheKey());
+ if (idsCache != null) {
+ idsCache.resetIDs();
+ }
+
+ for (String id : ids) {
+ PropertiesCache cache = mapCache(new PropertiesCacheKey(id));
+ cache.resetProperties();
+ }
+ }
+
+
+}
diff --git a/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/services/CommandKey.java b/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/services/CommandKey.java
new file mode 100644
index 000000000..51f00c8f0
--- /dev/null
+++ b/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/services/CommandKey.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.debug.test.services;
+
+
+/**
+ *
+ */
+public abstract class CommandKey<V> extends Key<V> {
+ Object fClientKey;
+
+ CommandKey(Class<V> cacheClass, Object clientKey) {
+ super(cacheClass);
+ fClientKey = clientKey;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (super.equals(obj) && obj instanceof CommandKey<?>) {
+ return ((CommandKey<?>)obj).fClientKey.equals(fClientKey);
+ }
+ return false;
+ }
+
+ @Override
+ public int hashCode() {
+ return super.hashCode() + fClientKey.hashCode();
+ }
+}
diff --git a/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/services/DiagnosticsCM.java b/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/services/DiagnosticsCM.java
new file mode 100644
index 000000000..c2a257112
--- /dev/null
+++ b/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/services/DiagnosticsCM.java
@@ -0,0 +1,136 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.debug.test.services;
+
+import org.eclipse.tcf.debug.test.util.ICache;
+import org.eclipse.tcf.debug.test.util.TokenCache;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.services.IDiagnostics;
+import org.eclipse.tcf.services.IDiagnostics.ISymbol;
+
+/**
+ *
+ */
+public class DiagnosticsCM extends AbstractCacheManager{
+ private IDiagnostics fService;
+
+ public DiagnosticsCM(IDiagnostics service) {
+ fService = service;
+ }
+
+ @Override
+ public void dispose() {
+ super.dispose();
+ }
+
+ public ICache<String> echo(final String msg, Object clientId) {
+ class MyCache extends TokenCache<String> implements IDiagnostics.DoneEcho {
+ @Override
+ protected IToken retrieveToken() {
+ return fService.echo(msg, this);
+ }
+ public void doneEcho(IToken token, Throwable error, String s) {
+ set(token, s, error);
+ }
+ };
+
+ return mapCache(new CommandKey<MyCache>(MyCache.class, clientId) {
+ @Override MyCache createCache() { return new MyCache(); }
+ });
+ }
+
+ public ICache<String[]> getTestList() {
+ class MyCache extends TokenCache<String[]> implements IDiagnostics.DoneGetTestList {
+ @Override
+ protected IToken retrieveToken() {
+ return fService.getTestList(this);
+ }
+ public void doneGetTestList(IToken token, Throwable error, String[] list) {
+ set(token, list, error);
+ }
+ };
+
+ return mapCache(new Key<MyCache>(MyCache.class) {
+ @Override MyCache createCache() { return new MyCache(); }
+ });
+ }
+
+ public ICache<String> runTest(final String name, Object clientId) {
+ class MyCache extends TokenCache<String> implements IDiagnostics.DoneRunTest {
+ @Override
+ protected IToken retrieveToken() {
+ return fService.runTest(name, this);
+ }
+ public void doneRunTest(IToken token, Throwable error, String context_id) {
+ set(token, context_id, error);
+ }
+ };
+
+ return mapCache(new CommandKey<MyCache>(MyCache.class, clientId) {
+ @Override MyCache createCache() { return new MyCache(); }
+ });
+ }
+
+ public ICache<Object> cancelTest(final String context_id, Object clientId) {
+ class MyCache extends TokenCache<Object> implements IDiagnostics.DoneCancelTest {
+ @Override
+ protected IToken retrieveToken() {
+ return fService.cancelTest(context_id, this);
+ }
+ public void doneCancelTest(IToken token, Throwable error) {
+ set(token, null, error);
+ }
+ };
+
+ return mapCache(new CommandKey<MyCache>(MyCache.class, clientId) {
+ @Override MyCache createCache() { return new MyCache(); }
+ });
+ }
+
+ abstract class SymbolKey<V> extends IdKey<V> {
+ String fSymbolName;
+
+ public SymbolKey(Class<V> clazz, String id, String symbolName) {
+ super(clazz, id);
+ fSymbolName = symbolName;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (super.equals(obj) && obj instanceof SymbolKey<?>) {
+ return ((SymbolKey<?>)obj).fSymbolName.equals(fSymbolName);
+ }
+ return false;
+ }
+
+ @Override
+ public int hashCode() {
+ return super.hashCode() + fSymbolName.hashCode();
+ }
+ }
+
+ public ICache<IDiagnostics.ISymbol> getSymbol(final String context_id, final String symbol_name) {
+ class MyCache extends TokenCache<IDiagnostics.ISymbol> implements IDiagnostics.DoneGetSymbol {
+ @Override
+ protected IToken retrieveToken() {
+ return fService.getSymbol(context_id, symbol_name, this);
+ }
+ public void doneGetSymbol(IToken token, Throwable error, ISymbol symbol) {
+ set(token, symbol, error);
+ }
+ };
+
+ return mapCache(new SymbolKey<MyCache>(MyCache.class, context_id, symbol_name) {
+ @Override MyCache createCache() { return new MyCache(); }
+ });
+ }
+
+}
diff --git a/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/services/EventKey.java b/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/services/EventKey.java
new file mode 100644
index 000000000..20869ffbf
--- /dev/null
+++ b/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/services/EventKey.java
@@ -0,0 +1,24 @@
+package org.eclipse.tcf.debug.test.services;
+
+
+abstract class EventKey<V> extends Key<V> {
+ private Object fClientKey;
+
+ public EventKey(Class<V> eventClazz, Object clientKey) {
+ super(eventClazz);
+ fClientKey = clientKey;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (super.equals(obj) && obj instanceof EventKey<?>) {
+ return ((EventKey<?>)obj).fClientKey.equals(fClientKey);
+ }
+ return false;
+ }
+
+ @Override
+ public int hashCode() {
+ return super.hashCode() + fClientKey.hashCode();
+ }
+} \ No newline at end of file
diff --git a/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/services/IWaitForEventCache.java b/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/services/IWaitForEventCache.java
new file mode 100644
index 000000000..50dd8bf01
--- /dev/null
+++ b/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/services/IWaitForEventCache.java
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Wind River Systems and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.debug.test.services;
+
+import org.eclipse.tcf.debug.test.util.ICache;
+
+/**
+ *
+ */
+public interface IWaitForEventCache<V> extends ICache<V> {
+
+ /**
+ * Resets the event cache so that it will be called again upon the next event.
+ */
+ public void reset();
+}
diff --git a/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/services/IdEventKey.java b/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/services/IdEventKey.java
new file mode 100644
index 000000000..019d7b6a6
--- /dev/null
+++ b/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/services/IdEventKey.java
@@ -0,0 +1,24 @@
+package org.eclipse.tcf.debug.test.services;
+
+
+abstract class IdEventKey<V> extends IdKey<V> {
+ private Object fClientKey;
+
+ public IdEventKey(Class<V> eventClazz, String id, Object clientKey) {
+ super(eventClazz, id);
+ fClientKey = clientKey;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (super.equals(obj) && obj instanceof IdEventKey<?>) {
+ return ((IdEventKey<?>)obj).fClientKey.equals(fClientKey);
+ }
+ return false;
+ }
+
+ @Override
+ public int hashCode() {
+ return super.hashCode() + fClientKey.hashCode();
+ }
+} \ No newline at end of file
diff --git a/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/services/IdKey.java b/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/services/IdKey.java
new file mode 100644
index 000000000..2d355dafa
--- /dev/null
+++ b/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/services/IdKey.java
@@ -0,0 +1,28 @@
+package org.eclipse.tcf.debug.test.services;
+
+
+abstract class IdKey<V> extends Key<V> {
+ String fId;
+
+ public IdKey(Class<V> clazz, String id) {
+ super(clazz);
+ fId = id;
+ }
+
+ public String getId() {
+ return fId;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (super.equals(obj) && obj instanceof IdKey<?>) {
+ return ((IdKey<?>)obj).fId.equals(fId);
+ }
+ return false;
+ }
+
+ @Override
+ public int hashCode() {
+ return super.hashCode() + fId.hashCode();
+ }
+} \ No newline at end of file
diff --git a/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/services/Key.java b/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/services/Key.java
new file mode 100644
index 000000000..91aae61d6
--- /dev/null
+++ b/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/services/Key.java
@@ -0,0 +1,29 @@
+package org.eclipse.tcf.debug.test.services;
+
+
+abstract class Key<V> {
+ private Class<V> fCacheClass;
+
+ public Key(Class<V> cacheClass) {
+ fCacheClass = cacheClass;
+ }
+
+ abstract V createCache();
+
+ public Class<V> getCacheClass() {
+ return fCacheClass;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (obj instanceof Key) {
+ return ((Key<?>)obj).fCacheClass.equals(fCacheClass);
+ }
+ return false;
+ }
+
+ @Override
+ public int hashCode() {
+ return fCacheClass.hashCode();
+ }
+} \ No newline at end of file
diff --git a/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/services/ResetMap.java b/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/services/ResetMap.java
new file mode 100644
index 000000000..56bfc2820
--- /dev/null
+++ b/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/services/ResetMap.java
@@ -0,0 +1,159 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Wind River Systems and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.debug.test.services;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.TreeMap;
+import java.util.TreeSet;
+
+import org.eclipse.tcf.debug.test.util.AbstractCache;
+import org.eclipse.tcf.protocol.Protocol;
+
+/**
+ *
+ */
+public class ResetMap {
+
+ public static final String ANY_ID = "";
+
+ private Map<String, List<AbstractCache<?>>> fValid = new TreeMap<String, List<AbstractCache<?>>>();
+ private Map<String, Set<String>> fChildren = new TreeMap<String, Set<String>>();
+ private Map<String, String> fParents = new TreeMap<String, String>();
+ private Map<AbstractCache<?>, Set<String>> fPending = new LinkedHashMap<AbstractCache<?>, Set<String>>();
+
+ public synchronized Set<String> removePending(AbstractCache<?> cache) {
+ Set<String> pendingIds = fPending.remove(cache);
+ if (pendingIds == null) {
+ pendingIds = Collections.emptySet();
+ }
+ return pendingIds;
+ }
+
+ public synchronized void addValid(String id, AbstractCache<?> cache) {
+ assert !fPending.containsKey(cache);
+
+ List<AbstractCache<?>> list = fValid.get(id);
+ if (list == null) {
+ list = new ArrayList<AbstractCache<?>>();
+ fValid.put(id, list);
+ }
+ list.add(cache);
+ }
+
+ public synchronized void addValid(String id, String[] childrenIds, AbstractCache<?> cache) {
+ assert !fPending.containsKey(cache);
+
+ List<AbstractCache<?>> list = fValid.get(id);
+ if (list == null) {
+ list = new ArrayList<AbstractCache<?>>();
+ fValid.put(id, list);
+ }
+ list.add(cache);
+ for (String childId : childrenIds) {
+ fParents.put(childId, id);
+ }
+ }
+
+ public synchronized void addValid(List<String> ids, AbstractCache<?> cache) {
+ assert !fPending.containsKey(cache);
+
+ String id = ids.get(0);
+ List<AbstractCache<?>> list = fValid.get(id);
+ if (list == null) {
+ list = new ArrayList<AbstractCache<?>>();
+ fValid.put(id, list);
+ }
+ list.add(cache);
+
+ for (int i = 0; i < ids.size() - 1; i++) {
+ Set<String> children = fChildren.get(ids.get(i + 1));
+ if (children == null) {
+ children = new TreeSet<String>();
+ fChildren.put(ids.get(i + 1), children);
+ }
+ children.add(ids.get(i));
+ }
+ }
+
+ public synchronized List<AbstractCache<?>> getCaches(String id) {
+ List<AbstractCache<?>> list = fValid.get(id);
+ if (list == null) {
+ list = Collections.emptyList();
+ }
+ return list;
+ }
+
+ public void reset(String id) {
+ reset(id, true, true);
+ }
+
+ public void reset(String id, boolean resetChildren, boolean resetParents) {
+ assert Protocol.isDispatchThread();
+
+ // Do not call reset while holding lock to reset map. Instead collect
+ // caches to reset and reset them outside the lock.
+ List<AbstractCache<?>> anyList = Collections.emptyList();
+ List<AbstractCache<?>> idList = Collections.emptyList();
+ List<AbstractCache<?>> parentList = Collections.emptyList();
+ synchronized (this) {
+ for (Set<String> pendingIds : fPending.values()) {
+ pendingIds.add(id);
+ }
+ anyList = fValid.remove(ANY_ID);
+
+ if (resetChildren && fChildren.containsKey(id)) {
+ idList = new ArrayList<AbstractCache<?>>();
+ collectChildren(id, idList);
+ } else {
+ idList = fValid.remove(id);
+ }
+
+ if (resetParents) {
+ String parentId = fParents.remove(id);
+ if (parentId != null) {
+ parentList = fValid.remove(parentId);
+ }
+ }
+ }
+ resetList(anyList);
+ resetList(idList);
+ resetList(parentList);
+ }
+
+ private void collectChildren(String id, List<AbstractCache<?>> caches) {
+ caches.addAll( fValid.remove(id) );
+ Set<String> children = fChildren.remove(id);
+ if (children != null) {
+ for (String child : children) {
+ collectChildren(child, caches);
+ }
+ }
+ }
+
+ private void resetList(List<AbstractCache<?>> list) {
+ if (list != null) {
+ for (AbstractCache<?> cache : list) {
+ if (cache.isValid()) {
+ cache.reset();
+ }
+ }
+ }
+ }
+
+ public synchronized void addPending(AbstractCache<?> cache) {
+ fPending.put(cache, new TreeSet<String>());
+ }
+}
diff --git a/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/services/RunControlCM.java b/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/services/RunControlCM.java
new file mode 100644
index 000000000..ca4b8194e
--- /dev/null
+++ b/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/services/RunControlCM.java
@@ -0,0 +1,629 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.debug.test.services;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.TreeSet;
+import java.util.concurrent.ExecutionException;
+
+import org.eclipse.tcf.debug.test.util.CallbackCache;
+import org.eclipse.tcf.debug.test.util.DataCallback;
+import org.eclipse.tcf.debug.test.util.ICache;
+import org.eclipse.tcf.debug.test.util.TokenCache;
+import org.eclipse.tcf.debug.test.util.Transaction;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.services.IRunControl;
+import org.eclipse.tcf.services.IRunControl.DoneCommand;
+import org.eclipse.tcf.services.IRunControl.RunControlContext;
+import org.eclipse.tcf.services.IRunControl.RunControlListener;
+
+/**
+ *
+ */
+public class RunControlCM extends AbstractCacheManager implements RunControlListener {
+
+ private final IRunControl fService;
+ private final ResetMap fStateResetMap = new ResetMap();
+ private final ResetMap fChildrenResetMap = new ResetMap();
+ private final List<RunControlListener> fListeners = new ArrayList<RunControlListener>();
+
+ public RunControlCM(IRunControl service) {
+ fService = service;
+ fService.addListener(this);
+ }
+
+ public void dispose() {
+ fService.removeListener(this);
+ super.dispose();
+ }
+
+ public void addListener(RunControlListener listener) {
+ fListeners.add(listener);
+ }
+
+ public void removeListener(RunControlListener listener) {
+ fListeners.remove(listener);
+ }
+
+ public IRunControl getService() {
+ return fService;
+ }
+
+ public ICache<RunControlContext> getContext(final String id) {
+ class MyCache extends RunControlTokenCache<RunControlContext> implements IRunControl.DoneGetContext {
+ @Override
+ protected String getId() {
+ return id;
+ }
+ @Override
+ protected IToken retrieveToken() {
+ return fService.getContext(id, this);
+ }
+ public void doneGetContext(IToken token, Exception error, RunControlContext context) {
+ set(token, context, error);
+ }
+
+ };
+
+ return mapCache(new IdKey<MyCache>(MyCache.class, id) {
+ @Override MyCache createCache() { return new MyCache(); }
+ });
+ }
+
+ private abstract class RunControlTokenCache<V> extends TokenCache<V> {
+ abstract protected String getId();
+
+ protected void set(IToken token, V data, Throwable error) {
+ fStateResetMap.addValid(getId(), this);
+ super.set(token, data, error);
+ }
+ }
+
+ private class ChildrenCache extends TokenCache<String[]> implements IRunControl.DoneGetChildren {
+ private final String fId;
+ public ChildrenCache(String id) {
+ fId = id;
+ }
+
+ @Override
+ protected IToken retrieveToken() {
+ return fService.getChildren(fId, this);
+ }
+ public void doneGetChildren(IToken token, Exception error, String[] child_ids) {
+ fChildrenResetMap.addValid(fId, child_ids, this);
+ set(token, child_ids, error);
+ }
+ };
+
+ private class ChildrenCacheKey extends IdKey<ChildrenCache> {
+ public ChildrenCacheKey(String id) {
+ super(ChildrenCache.class, id);
+ }
+ @Override ChildrenCache createCache() { return new ChildrenCache(fId); }
+ }
+
+ public ICache<String[]> getChildren(String id) {
+ return mapCache(new ChildrenCacheKey(id));
+ }
+
+ public static class ContextState {
+ public final boolean suspended;
+ public final String pc;
+ public final String reason;
+ public final Map<String, Object> params;
+ ContextState(boolean suspended, String pc, String reason, Map<String, Object> params) {
+ this.suspended = suspended;
+ this.pc = pc;
+ this.reason = reason;
+ this.params = params;
+ }
+
+ }
+
+ protected abstract static class ContextKey<V> extends Key<V> {
+ RunControlContext fContext;
+
+ ContextKey(Class<V> cacheClass, RunControlContext context) {
+ super(cacheClass);
+ fContext = context;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (super.equals(obj) && obj instanceof ContextKey<?>) {
+ return ((ContextKey<?>)obj).fContext.equals(fContext);
+ }
+ return false;
+ }
+
+ @Override
+ public int hashCode() {
+ return super.hashCode() + fContext.hashCode();
+ }
+ }
+
+
+ private class ContextStateCache extends CallbackCache<ContextState> {
+
+ private class InnerContextStateCache extends TokenCache<ContextState> implements IRunControl.DoneGetState {
+ private final RunControlContext fContext;
+
+ public InnerContextStateCache(RunControlContext context) {
+ fContext = context;
+ }
+
+ public void doneGetState(IToken token, Exception error, boolean suspended, String pc, String reason,
+ Map<String, Object> params) {
+ set(token, new ContextState(suspended, pc, reason, params), error);
+ }
+
+ @Override
+ protected IToken retrieveToken() {
+ return fContext.getState(this);
+ }
+ }
+
+ private final String fId;
+ private InnerContextStateCache fInnerCache;
+ public ContextStateCache(String id) {
+ fId = id;
+ }
+
+ @Override
+ protected void retrieve(DataCallback<ContextState> rm) {
+ new Transaction<ContextState>() {
+ @Override
+ protected ContextState process() throws InvalidCacheException, ExecutionException
+ {
+ RunControlContext context = validate( getContext(fId) );
+ if (fInnerCache == null || !fInnerCache.fContext.equals(context)) {
+ fInnerCache = new InnerContextStateCache(context);
+ }
+ return validate(fInnerCache);
+ }
+ }.request(rm);
+ }
+
+ @Override
+ protected void handleCompleted(ContextState data, Throwable error, boolean canceled) {
+ if (canceled) return;
+ fStateResetMap.addValid(fId, this);
+ set(data, error, true);
+ }
+
+ public void setState(ContextState state, Throwable error) {
+ fStateResetMap.addValid(fId, this);
+ set(state, error, true);
+ }
+
+ public void reset() {
+ super.reset();
+ if (fInnerCache != null) {
+ fInnerCache.reset();
+ }
+ }
+
+ }
+
+ private class ContextStateKey extends IdKey<ContextStateCache> {
+ public ContextStateKey(String id) {
+ super(ContextStateCache.class, id);
+ }
+ @Override
+ ContextStateCache createCache() {
+ return new ContextStateCache(getId());
+ }
+ }
+
+ public ICache<ContextState> getState(String id) {
+ return mapCache(new ContextStateKey(id));
+ }
+
+ protected abstract static class ContextCommandKey<V> extends ContextKey<V> {
+ Object fClientKey;
+
+ ContextCommandKey(Class<V> cacheClass, RunControlContext context, Object clientKey) {
+ super(cacheClass, context);
+ fClientKey = clientKey;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (super.equals(obj) && obj instanceof ContextCommandKey<?>) {
+ return ((ContextCommandKey<?>)obj).fClientKey.equals(fClientKey);
+ }
+ return false;
+ }
+
+ @Override
+ public int hashCode() {
+ return super.hashCode() + fClientKey.hashCode();
+ }
+ }
+
+ private abstract static class DoneCommandCache extends TokenCache<Object> implements DoneCommand {
+ public void doneCommand(IToken token, Exception error) {
+ set(token, null, error);
+ }
+ }
+
+ public ICache<Object> suspend(final RunControlContext context, Object clientKey) {
+ class MyCache extends DoneCommandCache {
+ @Override
+ protected IToken retrieveToken() {
+ return context.suspend(this);
+ }
+ }
+ return mapCache( new ContextCommandKey<MyCache>(MyCache.class, context, clientKey) {
+ @Override MyCache createCache() { return new MyCache(); }
+ });
+ }
+
+ public ICache<Object> resume(final RunControlContext context, Object clientKey, final int mode,
+ final int count)
+ {
+ class MyCache extends DoneCommandCache {
+ @Override
+ protected IToken retrieveToken() {
+ return context.resume(mode, count, this);
+ }
+ }
+ return mapCache( new ContextCommandKey<MyCache>(MyCache.class, context, clientKey) {
+ @Override MyCache createCache() { return new MyCache(); }
+ });
+ }
+
+ public ICache<Object> resume(final RunControlContext context, Object clientKey, final int mode,
+ final int count, final Map<String,Object> params)
+ {
+ class MyCache extends DoneCommandCache {
+ @Override
+ protected IToken retrieveToken() {
+ return context.resume(mode, count, params, this);
+ }
+ }
+ return mapCache( new ContextCommandKey<MyCache>(MyCache.class, context, clientKey) {
+ @Override MyCache createCache() { return new MyCache(); }
+ });
+ }
+
+ public ICache<Object> terminate(final RunControlContext context, Object clientKey) {
+ class MyCache extends DoneCommandCache {
+ @Override
+ protected IToken retrieveToken() {
+ return context.terminate(this);
+ }
+ }
+ return mapCache( new ContextCommandKey<MyCache>(MyCache.class, context, clientKey) {
+ @Override MyCache createCache() { return new MyCache(); }
+ });
+
+ }
+
+ private class WaitForContainerResumedCache extends WaitForEventCache<String[]> {}
+
+ public IWaitForEventCache<String[]> waitForContainerResumed(String id, Object clientKey) {
+ return mapCache(new IdEventKey<WaitForContainerResumedCache>(WaitForContainerResumedCache.class, id, clientKey) {
+ @Override
+ WaitForContainerResumedCache createCache() {
+ return new WaitForContainerResumedCache();
+ }
+ });
+ }
+
+ public void containerResumed(String[] context_ids) {
+ for (RunControlListener listener : fListeners) {
+ listener.containerResumed(context_ids);
+ }
+
+ for (Map.Entry<Key<?>, ICache<?>> entry: fMap.entrySet()) {
+ if (entry.getKey() instanceof IdEventKey) {
+ IdEventKey<?> eventKey = (IdEventKey<?>)entry.getKey();
+ if ( WaitForContainerResumedCache.class.equals(eventKey.getCacheClass()) &&
+ contains(context_ids, eventKey.fId) )
+ {
+ ((WaitForContainerResumedCache)entry.getValue()).eventReceived(context_ids);
+ }
+ }
+ }
+ for (String id : context_ids) {
+ doContextResumed(id);
+ }
+ }
+
+ private class WaitForContainerSuspendedCache extends WaitForEventCache<String[]> {}
+
+ public IWaitForEventCache<String[]> waitForContainerSuspended(String id, Object clientKey) {
+ return mapCache(new IdEventKey<WaitForContainerSuspendedCache>(WaitForContainerSuspendedCache.class, id, clientKey) {
+ @Override
+ WaitForContainerSuspendedCache createCache() {
+ return new WaitForContainerSuspendedCache();
+ }
+ });
+ }
+
+ public void containerSuspended(String context, String pc, String reason, Map<String, Object> params,
+ String[] suspended_ids)
+ {
+ // Call client listeners first
+ for (RunControlListener listener : fListeners) {
+ listener.containerSuspended(context, pc, reason, params, suspended_ids);
+ }
+
+ for (Map.Entry<Key<?>, ICache<?>> entry: fMap.entrySet()) {
+ if (entry.getKey() instanceof IdEventKey) {
+ IdEventKey<?> eventKey = (IdEventKey<?>)entry.getKey();
+ if ( WaitForContainerSuspendedCache.class.equals( eventKey.getCacheClass() ) &&
+ eventKey.fId.equals(context) )
+ {
+ ((WaitForContainerSuspendedCache)entry.getValue()).eventReceived(suspended_ids);
+ }
+ }
+ }
+
+ ContextState state = pc == null ? null : new ContextState(true, pc, reason, params);
+ doContextSuspended(context, state);
+
+ for (String id : suspended_ids) {
+ if (!id.equals(context)) {
+ doContextSuspended(id, null);
+ }
+ }
+ }
+
+ private class WaitForContextSuspendedCache extends WaitForEventCache<Object> {}
+
+ public IWaitForEventCache<Object> waitForContextSuspended(String id, Object clientKey) {
+ return mapCache(new IdEventKey<WaitForContextSuspendedCache>(WaitForContextSuspendedCache.class, id, clientKey) {
+ @Override
+ WaitForContextSuspendedCache createCache() {
+ return new WaitForContextSuspendedCache();
+ }
+ });
+ }
+
+ public void contextSuspended(String id, String pc, String reason, Map<String, Object> params) {
+ // Call client listeners first
+ for (RunControlListener listener : fListeners) {
+ listener.contextSuspended(id, pc, reason, params);
+ }
+
+ ContextState state = pc == null ? null : new ContextState(true, pc, reason, params);
+ doContextSuspended(id, state);
+ }
+
+ public void doContextSuspended(String id, ContextState state) {
+ fStateResetMap.reset(id);
+ ContextStateCache stateCache = getCache(new ContextStateKey(id));
+ if (stateCache != null) {
+ if (state != null) {
+ stateCache.setState(state, null);
+ }
+ }
+
+ // TODO: avoid iterating over all entries, use separate list for events.
+ for (Map.Entry<Key<?>, ICache<?>> entry: fMap.entrySet()) {
+ if (entry.getKey() instanceof IdEventKey) {
+ IdEventKey<?> eventKey = (IdEventKey<?>)entry.getKey();
+ if ( WaitForContextSuspendedCache.class.equals( eventKey.getCacheClass() ) &&
+ eventKey.fId.equals(id) )
+ {
+ ((WaitForContextSuspendedCache)entry.getValue()).eventReceived(null);
+ }
+ }
+ }
+ }
+
+ private class WaitForContextResumedCache extends WaitForEventCache<Object> {}
+
+ public IWaitForEventCache<Object> waitForContextResumed(String id, Object clientKey) {
+ return mapCache(new IdEventKey<WaitForContextResumedCache>(WaitForContextResumedCache.class, id, clientKey) {
+ @Override
+ WaitForContextResumedCache createCache() {
+ return new WaitForContextResumedCache();
+ }
+ });
+ }
+
+ private static final ContextState RESUMED_STATE = new ContextState(false, null, null, null);
+
+ public void contextResumed(String id) {
+ for (RunControlListener listener : fListeners) {
+ listener.contextResumed(id);
+ }
+ doContextResumed(id);
+ }
+
+ private void doContextResumed(String id) {
+ for (RunControlListener listener : fListeners) {
+ listener.contextResumed(id);
+ } fStateResetMap.reset(id);
+
+ ContextStateCache stateCache = getCache(new ContextStateKey(id));
+ if (stateCache != null) {
+ stateCache.setState(RESUMED_STATE, null);
+ }
+
+ // TODO: avoid iterating over all entries, use separate list for events.
+ for (Map.Entry<Key<?>, ICache<?>> entry: fMap.entrySet()) {
+ if (entry.getKey() instanceof IdEventKey) {
+ IdEventKey<?> eventKey = (IdEventKey<?>)entry.getKey();
+ if ( WaitForContextResumedCache.class.equals( eventKey.getCacheClass() ) &&
+ eventKey.fId.equals(id) )
+ {
+ ((WaitForContextResumedCache)entry.getValue()).eventReceived(null);
+ }
+ }
+ }
+ }
+
+ private class WaitForContextExceptionCache extends WaitForEventCache<String> {}
+
+ public IWaitForEventCache<String> waitForContextException(String id, Object clientKey) {
+ return mapCache(new IdEventKey<WaitForContextExceptionCache>(WaitForContextExceptionCache.class, id, clientKey) {
+ @Override
+ WaitForContextExceptionCache createCache() {
+ return new WaitForContextExceptionCache();
+ }
+ });
+ }
+
+ public void contextException(String id, String msg) {
+ fStateResetMap.reset(id);
+
+ // TODO: avoid iterating over all entries, use separate list for events.
+ for (Map.Entry<Key<?>, ICache<?>> entry: fMap.entrySet()) {
+ if (entry.getKey() instanceof IdEventKey) {
+ IdEventKey<?> eventKey = (IdEventKey<?>)entry.getKey();
+ if ( WaitForContextExceptionCache.class.equals( eventKey.getCacheClass() ) &&
+ eventKey.fId.equals(id) )
+ {
+ ((WaitForContextExceptionCache)entry.getValue()).eventReceived(msg);
+ }
+ }
+ }
+ }
+
+ private abstract class ContextEventKey<V> extends IdKey<V> {
+ private Object fClientKey;
+
+ public ContextEventKey(Class<V> eventClazz, String id, Object clientKey) {
+ super(eventClazz, id);
+ fClientKey = clientKey;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (super.equals(obj) && obj instanceof ContextEventKey<?>) {
+ return ((ContextEventKey<?>)obj).fClientKey.equals(fClientKey);
+ }
+ return false;
+ }
+
+ @Override
+ public int hashCode() {
+ return super.hashCode() + fClientKey.hashCode();
+ }
+ }
+
+ private class WaitForContextAddedCache extends WaitForEventCache<RunControlContext[]> {}
+
+ public IWaitForEventCache<RunControlContext[]> waitForContextAdded(String parentId, Object clientKey) {
+ return mapCache(new ContextEventKey<WaitForContextAddedCache>(WaitForContextAddedCache.class, parentId, clientKey) {
+ @Override
+ WaitForContextAddedCache createCache() {
+ return new WaitForContextAddedCache();
+ }
+ });
+ }
+
+ public void contextAdded(RunControlContext[] contexts) {
+ for (RunControlListener listener : fListeners) {
+ listener.contextAdded(contexts);
+ }
+
+ for (RunControlContext context : contexts) {
+ fStateResetMap.reset(context.getID());
+ }
+
+ Set<String> parents = new TreeSet<String>();
+ for (RunControlContext context : contexts) {
+ if (context.getParentID() != null) {
+ parents.add(context.getParentID());
+ }
+ }
+ for (String parent : parents) {
+ fChildrenResetMap.reset(parent, false, false);
+ }
+
+ for (Map.Entry<Key<?>, ICache<?>> entry: fMap.entrySet()) {
+ if (entry.getKey() instanceof ContextEventKey) {
+ ContextEventKey<?> eventKey = (ContextEventKey<?>)entry.getKey();
+ if ( WaitForContextAddedCache.class.equals( eventKey.getCacheClass()) &&
+ parents.contains(eventKey.getId()) )
+ {
+ ((WaitForContextAddedCache)entry.getValue()).eventReceived(contexts);
+ }
+ }
+ }
+ }
+
+ private class WaitForContextChangedCache extends WaitForEventCache<RunControlContext[]> {}
+
+ public IWaitForEventCache<RunControlContext[]> waitForContextChanged(String id, Object clientKey) {
+ return mapCache(new ContextEventKey<WaitForContextChangedCache>(WaitForContextChangedCache.class, id, clientKey) {
+ @Override
+ WaitForContextChangedCache createCache() {
+ return new WaitForContextChangedCache();
+ }
+ });
+ }
+
+ public void contextChanged(RunControlContext[] contexts) {
+ for (RunControlListener listener : fListeners) {
+ listener.contextChanged(contexts);
+ }
+
+ for (RunControlContext context : contexts) {
+ fStateResetMap.reset(context.getID());
+ fChildrenResetMap.reset(context.getID(), true, false);
+ }
+
+ for (Map.Entry<Key<?>, ICache<?>> entry: fMap.entrySet()) {
+ if (entry.getKey() instanceof ContextEventKey) {
+ ContextEventKey<?> eventKey = (ContextEventKey<?>)entry.getKey();
+ if ( WaitForContextChangedCache.class.equals( eventKey.getCacheClass()) &&
+ contains(contexts, eventKey.getId()) )
+ {
+ ((WaitForContextChangedCache)entry.getValue()).eventReceived(null);
+ }
+ }
+ }
+ }
+
+ private class WaitForContextRemovedCache extends WaitForEventCache<String[]> {}
+
+ public IWaitForEventCache<String[]> waitForContextRemoved(String id, Object clientKey) {
+ return mapCache(new IdEventKey<WaitForContextRemovedCache>(WaitForContextRemovedCache.class, id, clientKey) {
+ @Override
+ WaitForContextRemovedCache createCache() {
+ return new WaitForContextRemovedCache();
+ }
+ });
+ }
+
+ public void contextRemoved(String[] context_ids) {
+ // Call client listeners first
+ for (RunControlListener listener : fListeners) {
+ listener.contextRemoved(context_ids);
+ }
+
+ for (String context_id : context_ids) {
+ fChildrenResetMap.reset(context_id, false, true);
+ fStateResetMap.reset(context_id);
+ }
+
+ for (Map.Entry<Key<?>, ICache<?>> entry: fMap.entrySet()) {
+ if (entry.getKey() instanceof IdEventKey) {
+ IdEventKey<?> eventKey = (IdEventKey<?>)entry.getKey();
+ if ( WaitForContextRemovedCache.class.equals( eventKey.getCacheClass()) &&
+ contains(context_ids, eventKey.getId()) )
+ {
+ ((WaitForContextRemovedCache)entry.getValue()).eventReceived(context_ids);
+ }
+ }
+ }
+ }
+
+}
diff --git a/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/services/StackTraceCM.java b/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/services/StackTraceCM.java
new file mode 100644
index 000000000..5f8b582db
--- /dev/null
+++ b/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/services/StackTraceCM.java
@@ -0,0 +1,162 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.debug.test.services;
+
+import java.util.Map;
+
+import org.eclipse.tcf.debug.test.util.ICache;
+import org.eclipse.tcf.debug.test.util.TokenCache;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.services.IRunControl;
+import org.eclipse.tcf.services.IRunControl.RunControlContext;
+import org.eclipse.tcf.services.IStackTrace;
+import org.eclipse.tcf.services.IStackTrace.StackTraceContext;
+
+/**
+ *
+ */
+public class StackTraceCM extends AbstractCacheManager implements IRunControl.RunControlListener {
+ private IStackTrace fService;
+ private IRunControl fRunControl;
+
+ public StackTraceCM(IStackTrace service, IRunControl runControl) {
+ fService = service;
+ fRunControl = runControl;
+ fRunControl.addListener(this);
+ }
+
+ @Override
+ public void dispose() {
+ fRunControl.removeListener(this);
+ super.dispose();
+ }
+
+ private class ChildrenCache extends TokenCache<String[]> implements IStackTrace.DoneGetChildren {
+ private final String fId;
+ public ChildrenCache(String id) {
+ fId = id;
+ }
+
+ @Override
+ protected IToken retrieveToken() {
+ return fService.getChildren(fId, this);
+ }
+ public void doneGetChildren(IToken token, Exception error, String[] context_ids) {
+ set(token, context_ids, error);
+ }
+ public void resetChildren() {
+ if (isValid()) reset();
+ }
+ };
+
+ private class ChildrenCacheKey extends IdKey<ChildrenCache> {
+ public ChildrenCacheKey(String id) {
+ super(ChildrenCache.class, id);
+ }
+ @Override ChildrenCache createCache() { return new ChildrenCache(fId); }
+ }
+
+ public ICache<String[]> getChildren(String id) {
+ return mapCache(new ChildrenCacheKey(id));
+ }
+
+ class ContextCache extends TokenCache<StackTraceContext> implements IStackTrace.DoneGetContext {
+ private final String fId;
+
+ public ContextCache(String id) {
+ fId = id;
+ }
+ @Override
+ protected IToken retrieveToken() {
+ return fService.getContext(new String[] { fId }, this);
+ }
+ public void doneGetContext(IToken token, Exception error, StackTraceContext[] contexts) {
+ StackTraceContext context = contexts != null && contexts.length > 0 ? contexts[0] : null;
+ set(token, context, error);
+ }
+ public void resetContext() {
+ if (isValid()) reset();
+ }
+ }
+
+ private class ContextCacheKey extends IdKey<ContextCache> {
+ public ContextCacheKey(String id) {
+ super(ContextCache.class, id);
+ }
+ @Override ContextCache createCache() { return new ContextCache(fId); }
+ }
+
+ public ICache<StackTraceContext>[] getContext(final String[] ids) {
+ @SuppressWarnings("unchecked")
+ ICache<StackTraceContext>[] caches = (ICache<StackTraceContext>[])new ICache[ids.length];
+ for (int i = 0; i < ids.length; i++) {
+ caches[i] = mapCache(new ContextCacheKey(ids[i]));
+ }
+ return caches;
+ }
+
+ public void contextAdded(RunControlContext[] contexts) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void contextChanged(RunControlContext[] contexts) {
+ for (RunControlContext context : contexts) {
+ resetRunControlContext(context.getID());
+ }
+ }
+
+ public void contextRemoved(String[] context_ids) {
+ for (String id : context_ids) {
+ resetRunControlContext(id);
+ }
+ }
+
+ public void contextSuspended(String context, String pc, String reason, Map<String, Object> params) {
+ resetRunControlContext(context);
+ }
+
+ public void contextResumed(String context) {
+ resetRunControlContext(context);
+ }
+
+ public void containerSuspended(String context, String pc, String reason, Map<String, Object> params,
+ String[] suspended_ids)
+ {
+ for (String id : suspended_ids) {
+ resetRunControlContext(id);
+ }
+ }
+
+ public void containerResumed(String[] context_ids) {
+ for (String id : context_ids) {
+ resetRunControlContext(id);
+ }
+ }
+
+ public void contextException(String context, String msg) {
+ resetRunControlContext(context);
+ }
+
+ private void resetRunControlContext(String id) {
+ ChildrenCache childrenCache = getCache(new ChildrenCacheKey(id));
+ if (childrenCache != null && childrenCache.isValid() && childrenCache.getData() != null) {
+ String[] frameIds = childrenCache.getData();
+ for (String frameId : frameIds) {
+ ContextCache contextCache = getCache(new ContextCacheKey(frameId));
+ if (contextCache != null) {
+ contextCache.resetContext();
+ }
+ }
+ childrenCache.resetChildren();
+ }
+ }
+}
diff --git a/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/services/SymbolsCM.java b/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/services/SymbolsCM.java
new file mode 100644
index 000000000..3a1ce110c
--- /dev/null
+++ b/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/services/SymbolsCM.java
@@ -0,0 +1,422 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.debug.test.services;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.ExecutionException;
+
+import org.eclipse.tcf.debug.test.util.AbstractCache;
+import org.eclipse.tcf.debug.test.util.CallbackCache;
+import org.eclipse.tcf.debug.test.util.DataCallback;
+import org.eclipse.tcf.debug.test.util.ICache;
+import org.eclipse.tcf.debug.test.util.TokenCache;
+import org.eclipse.tcf.debug.test.util.Transaction;
+import org.eclipse.tcf.debug.test.util.Transaction.InvalidCacheException;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.services.IMemoryMap;
+import org.eclipse.tcf.services.IMemoryMap.MemoryMapListener;
+import org.eclipse.tcf.services.IRunControl.RunControlContext;
+import org.eclipse.tcf.services.IRunControl.RunControlListener;
+import org.eclipse.tcf.services.ISymbols;
+import org.eclipse.tcf.services.ISymbols.Symbol;
+
+/**
+ *
+ */
+public class SymbolsCM extends AbstractCacheManager {
+
+ private ResetMap fRunControlResetMap = new ResetMap();
+ private ResetMap fMemoryResetMap = new ResetMap();
+
+ private ISymbols fService;
+ private IMemoryMap fMemoryMap;
+ private RunControlCM fRunControlCM;
+
+ public SymbolsCM(ISymbols service, RunControlCM runControl, IMemoryMap memoryMap) {
+ fService = service;
+ fRunControlCM = runControl;
+ fRunControlCM.addListener(fRunControlListener);
+ fMemoryMap = memoryMap;
+ fMemoryMap.addListener(fMemoryListener);
+ }
+
+ @Override
+ public void dispose() {
+ fRunControlCM.removeListener(fRunControlListener);
+ fMemoryMap.removeListener(fMemoryListener);
+ super.dispose();
+ }
+
+ private static final List<String> ANY_ID_PARENTS = new ArrayList<String>(1);
+ {
+ ANY_ID_PARENTS.add(ResetMap.ANY_ID);
+ }
+
+ abstract private class SymbolCache<V> extends CallbackCache<V> {
+ protected final AbstractCache<V> fInner;
+ private Symbol fSymbol;
+ private List<String> fParents = new ArrayList<String>(4);
+
+ public SymbolCache(AbstractCache<V> inner) {
+ fInner = inner;
+ }
+
+ public void reset() {
+ super.reset();
+ if (fInner.isValid()) fInner.reset();
+ }
+
+ abstract protected String getSymbolId();
+
+ @Override
+ protected void retrieve(final DataCallback<V> rm) {
+ fRunControlResetMap.addPending(this);
+ fMemoryResetMap.addPending(this);
+ Transaction<V> transaction = new Transaction<V>() {
+ protected V process() throws InvalidCacheException, ExecutionException {
+ V retVal = processInner(this);
+ fSymbol = processSymbol(this);
+ fParents = processParents(this);
+ return retVal;
+ }
+ };
+ transaction.request(rm);
+ }
+
+ protected V processInner(Transaction<V> t) throws InvalidCacheException, ExecutionException {
+ return t.validate(fInner);
+ }
+
+ protected Symbol processSymbol(Transaction<V> t) throws InvalidCacheException, ExecutionException {
+ return t.validate( getContext(getSymbolId()) );
+ }
+
+ protected List<String> processParents(Transaction<V> t) throws InvalidCacheException, ExecutionException {
+ List<String> parents = new ArrayList<String>(2);
+ String rcContextId = fSymbol.getOwnerID();
+ while( rcContextId != null ) {
+ parents.add(rcContextId);
+ RunControlContext rcContext = t.validate( fRunControlCM.getContext(rcContextId) );
+ rcContextId = rcContext.getParentID();
+ }
+ return parents;
+ }
+
+ @Override
+ protected void handleCompleted(V data, Throwable error, boolean canceled) {
+ if (canceled) return;
+
+ // If we cannot retrieve the symbol's context. Reset the cache on
+ // any rc event.
+ List<String> parents = ANY_ID_PARENTS;
+ int updatePolicy = ISymbols.UPDATE_ON_EXE_STATE_CHANGES;
+ if (error == null) {
+ parents = fParents;
+ updatePolicy = fSymbol.getUpdatePolicy();
+ }
+ updateRunControlResetMap(parents, updatePolicy, data, error);
+ updateMemoryMapResetMap(parents, data, error);
+ }
+
+ private void updateRunControlResetMap(List<String> parents, int updatePolicy, V data, Throwable error) {
+ Set<String> pendingIds = fRunControlResetMap.removePending(this);
+ if (updatePolicy == ISymbols.UPDATE_ON_EXE_STATE_CHANGES) {
+ String ownerId = parents.get(0);
+ if (pendingIds.contains(ownerId) || (ResetMap.ANY_ID.equals(ownerId) && !pendingIds.isEmpty())) {
+ // Reset cache immediately after setting value.
+ set(data, error, false);
+ } else {
+ fRunControlResetMap.addValid(ownerId, this);
+ set(data, error, true);
+ }
+ }
+ }
+
+ private void updateMemoryMapResetMap(List<String> parents, V data, Throwable error) {
+ Set<String> pendingIds = fMemoryResetMap.removePending(this);
+ boolean resetPending = false;
+ if (!pendingIds.isEmpty()) {
+ if (ResetMap.ANY_ID.equals(parents.get(0))) {
+ resetPending = true;
+ } else {
+ for (String parent : parents) {
+ if (pendingIds.contains(parent)) {
+ resetPending = true;
+ }
+ }
+ }
+ }
+
+ if (resetPending) {
+ // Reset cache immediately after setting value.
+ set(data, error, false);
+ } else {
+ fMemoryResetMap.addValid(parents, this);
+ set(data, error, true);
+ }
+ }
+ }
+
+ private class ChildrenCache extends SymbolCache<String[]> {
+ public ChildrenCache(InnerChildrenCache inner) {
+ super(inner);
+ }
+
+ @Override
+ protected String getSymbolId() {
+ return ((InnerChildrenCache)fInner).fId;
+ }
+ }
+
+ private class InnerChildrenCache extends TokenCache<String[]> implements ISymbols.DoneGetChildren {
+ private final String fId;
+ public InnerChildrenCache(String id) {
+ fId = id;
+ }
+
+ @Override
+ protected IToken retrieveToken() {
+ fRunControlResetMap.addPending(this);
+ return fService.getChildren(fId, this);
+ }
+ public void doneGetChildren(IToken token, Exception error, String[] context_ids) {
+ set(token, context_ids, error);
+ }
+ };
+
+ private class ChildrenCacheKey extends IdKey<ChildrenCache> {
+ public ChildrenCacheKey(String id) {
+ super(ChildrenCache.class, id);
+ }
+ @Override ChildrenCache createCache() { return new ChildrenCache( new InnerChildrenCache(fId) ); }
+ }
+
+ public ICache<String[]> getChildren(String id) {
+ return mapCache(new ChildrenCacheKey(id));
+ }
+
+ private class ContextCache extends SymbolCache<Symbol> {
+ public ContextCache(InnerContextCache inner) {
+ super(inner);
+ }
+ @Override
+ protected String getSymbolId() {
+ return fInner.getData().getID();
+ }
+ @Override
+ protected Symbol processSymbol(Transaction<Symbol> t) throws InvalidCacheException, ExecutionException {
+ return fInner.getData();
+ }
+ }
+
+ class InnerContextCache extends TokenCache<Symbol> implements ISymbols.DoneGetContext {
+ private final String fId;
+
+ public InnerContextCache(String id) {
+ fId = id;
+ }
+ @Override
+ protected IToken retrieveToken() {
+ return fService.getContext(fId, this);
+ }
+ public void doneGetContext(IToken token, Exception error, Symbol symbol) {
+ set(token, symbol, error);
+ }
+ public void resetContext() {
+ if (isValid()) reset();
+ }
+ }
+
+ private class ContextCacheKey extends IdKey<ContextCache> {
+ public ContextCacheKey(String id) {
+ super(ContextCache.class, id);
+ }
+ @Override ContextCache createCache() { return new ContextCache( new InnerContextCache(fId)); }
+ }
+
+ public ICache<Symbol> getContext(String id) {
+ return mapCache(new ContextCacheKey(id));
+ }
+
+ private class FindCache extends SymbolCache<String> {
+ public FindCache(InnerFindCache inner) {
+ super(inner);
+ }
+ @Override
+ protected String getSymbolId() {
+ return fInner.getData();
+ }
+ }
+
+ class InnerFindCache extends TokenCache<String> implements ISymbols.DoneFind {
+ private final String fId;
+ private final Number fIp;
+ private final String fName;
+
+ public InnerFindCache(String id, Number ip, String name) {
+ fId = id;
+ fIp = ip;
+ fName = name;
+ }
+ @Override
+ protected IToken retrieveToken() {
+ return fService.find(fId, fIp, fName, this);
+ }
+
+ public void doneFind(IToken token, Exception error, String symbol_id) {
+ set(token, symbol_id, error);
+ }
+ }
+
+ private class FindCacheKey extends IdKey<FindCache> {
+ private final Number fIp;
+ private final String fName;
+
+ public FindCacheKey(String id, Number ip, String name) {
+ super(FindCache.class, id);
+ fIp = ip;
+ fName = name;
+ }
+ @Override FindCache createCache() { return new FindCache(new InnerFindCache(fId, fIp, fName)); }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (super.equals(obj) && obj instanceof FindCacheKey) {
+ FindCacheKey other = (FindCacheKey)obj;
+ return fIp.equals(other.fIp) && fName.equals(other.fName);
+ }
+ return false;
+ }
+ @Override
+ public int hashCode() {
+ return super.hashCode() + fIp.hashCode() + fName.hashCode();
+ }
+ }
+
+ public ICache<String> find(String context_id, Number ip, String name) {
+ return mapCache(new FindCacheKey(context_id, ip, name));
+ }
+
+ private class FindByAddrCache extends SymbolCache<String> {
+
+ public FindByAddrCache(InnerFindByAddrCache inner) {
+ super(inner);
+ }
+
+ @Override
+ protected String getSymbolId() {
+ return fInner.getData();
+ }
+ }
+
+ private class InnerFindByAddrCache extends TokenCache<String> implements ISymbols.DoneFind {
+ private final String fId;
+ private final Number fAddr;
+
+ public InnerFindByAddrCache(String id, Number addr) {
+ fId = id;
+ fAddr = addr;
+ }
+ @Override
+ protected IToken retrieveToken() {
+ return fService.findByAddr(fId, fAddr, this);
+ }
+
+ public void doneFind(IToken token, Exception error, String symbol_id) {
+ set(token, symbol_id, error);
+ }
+ }
+
+ private class FindByAddrCacheKey extends IdKey<FindByAddrCache> {
+ private final Number fAddr;
+
+ public FindByAddrCacheKey(String id, Number addr) {
+ super(FindByAddrCache.class, id);
+ fAddr = addr;
+ }
+ @Override FindByAddrCache createCache() { return new FindByAddrCache(new InnerFindByAddrCache(fId, fAddr)); }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (super.equals(obj) && obj instanceof FindByAddrCacheKey) {
+ FindByAddrCacheKey other = (FindByAddrCacheKey)obj;
+ return fAddr.equals(other.fAddr);
+ }
+ return false;
+ }
+ @Override
+ public int hashCode() {
+ return super.hashCode() + fAddr.hashCode();
+ }
+ }
+
+ public ICache<String> findByAddr(String context_id, Number addr) {
+ return mapCache(new FindByAddrCacheKey(context_id, addr));
+ }
+
+ private RunControlListener fRunControlListener = new RunControlListener() {
+
+ public void contextAdded(RunControlContext[] contexts) {
+ }
+
+ public void contextChanged(RunControlContext[] contexts) {
+ for (RunControlContext context : contexts) {
+ resetRunControlContext(context.getID());
+ }
+ }
+
+ public void contextRemoved(String[] context_ids) {
+ for (String id : context_ids) {
+ resetRunControlContext(id);
+ fMemoryResetMap.reset(id);
+ }
+ }
+
+ public void contextSuspended(String context, String pc, String reason, Map<String, Object> params) {
+ resetRunControlContext(context);
+ }
+
+ public void contextResumed(String context) {
+ resetRunControlContext(context);
+ }
+
+ public void containerSuspended(String context, String pc, String reason, Map<String, Object> params,
+ String[] suspended_ids)
+ {
+ for (String id : suspended_ids) {
+ resetRunControlContext(id);
+ }
+ }
+
+ public void containerResumed(String[] context_ids) {
+ for (String id : context_ids) {
+ resetRunControlContext(id);
+ }
+ }
+
+ public void contextException(String context, String msg) {
+ resetRunControlContext(context);
+ }
+ };
+
+ private void resetRunControlContext(String id) {
+ fRunControlResetMap.reset(id);
+ }
+
+ private MemoryMapListener fMemoryListener = new MemoryMapListener() {
+ public void changed(String context_id) {
+ fMemoryResetMap.reset(context_id);
+ }
+ };
+}
diff --git a/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/services/WaitForEventCache.java b/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/services/WaitForEventCache.java
new file mode 100644
index 000000000..3966c58bf
--- /dev/null
+++ b/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/services/WaitForEventCache.java
@@ -0,0 +1,16 @@
+package org.eclipse.tcf.debug.test.services;
+
+import org.eclipse.tcf.debug.test.util.AbstractCache;
+
+class WaitForEventCache<V> extends AbstractCache<V> implements IWaitForEventCache<V> {
+ @Override
+ protected void retrieve() { } // no-op - called by listener
+ @Override
+ protected void canceled() { } // no-op - no command sent
+
+ public void eventReceived(V data) {
+ if (!isValid()) {
+ set(data, null, true); // notify listeners
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/util/AbstractCache.java b/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/util/AbstractCache.java
new file mode 100644
index 000000000..29dbd81f1
--- /dev/null
+++ b/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/util/AbstractCache.java
@@ -0,0 +1,314 @@
+package org.eclipse.tcf.debug.test.util;
+
+/*******************************************************************************
+ * 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:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.CancellationException;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.tcf.protocol.Protocol;
+
+/**
+ * A base implementation of a general purpose cache. Sub classes must implement
+ * {@link #retrieve(DataRequestMonitor)} to fetch data from the data source.
+ * Sub-classes are also responsible for calling {@link #set(Object, IStatus)}
+ * and {@link #reset()} to manage the state of the cache in response to events
+ * from the data source.
+ * <p>
+ * This cache requires an executor to use. The executor is used to synchronize
+ * access to the cache state and data.
+ * </p>
+ * @since 2.2
+ */
+public abstract class AbstractCache<V> implements ICache<V> {
+
+ private static final Throwable INVALID_STATUS = new Throwable("Cache invalid"); //$NON-NLS-1$
+
+ private class RequestCanceledListener implements Callback.ICanceledListener {
+ public void requestCanceled(final Callback canceledRm) {
+ invokeInDispatchThread(new Runnable() {
+ public void run() {
+ handleCanceledRm(canceledRm);
+ }
+ });
+ }
+ };
+
+ private RequestCanceledListener fRequestCanceledListener = new RequestCanceledListener();
+
+ private boolean fValid;
+
+ private V fData;
+ private Throwable fError = INVALID_STATUS;
+
+ private Object fWaitingList;
+
+ /**
+ * Sub-classes should override this method to retrieve the cache data from
+ * its source. The implementation should call {@link #set(Object, IStatus)}
+ * to store the newly retrieved data when it arrives (or an error, if one
+ * occurred retrieving the data)
+ *
+ * @param rm
+ * Request monitor for completion of data retrieval.
+ */
+ abstract protected void retrieve();
+
+ protected void invokeInDispatchThread(Runnable runnable) {
+ if (Protocol.isDispatchThread()) {
+ runnable.run();
+ } else {
+ Protocol.invokeLater(runnable);
+ }
+ }
+
+ /**
+ * Called to cancel a retrieve request. This method is called when
+ * clients of the cache no longer need data that was requested. <br>
+ * Sub-classes should cancel and clean up requests to the asynchronous
+ * data source.
+ *
+ * <p>
+ * Note: Called while holding a lock to "this". No new request will start until
+ * this call returns.
+ * </p>
+ */
+ abstract protected void canceled();
+
+ public boolean isValid() {
+ return fValid;
+ }
+
+ public V getData() {
+ if (!fValid) {
+ throw new IllegalStateException("Cache is not valid. Cache data can be read only when cache is valid."); //$NON-NLS-1$
+ }
+ return fData;
+ }
+
+ public Throwable getError() {
+ if (!fValid) {
+ throw new IllegalStateException("Cache is not valid. Cache status can be read only when cache is valid."); //$NON-NLS-1$
+ }
+ return fError;
+ }
+
+ public void update(Callback rm) {
+ assert Protocol.isDispatchThread();
+
+ if (!fValid) {
+ boolean first = false;
+ synchronized (this) {
+ if (fWaitingList == null) {
+ first = true;
+ fWaitingList = rm;
+ } else if (fWaitingList instanceof Callback[]) {
+ Callback[] waitingList = (Callback[])fWaitingList;
+ int waitingListLength = waitingList.length;
+ int i;
+ for (i = 0; i < waitingListLength; i++) {
+ if (waitingList[i] == null) {
+ waitingList[i] = rm;
+ break;
+ }
+ }
+ if (i == waitingListLength) {
+ Callback[] newWaitingList = new Callback[waitingListLength + 1];
+ System.arraycopy(waitingList, 0, newWaitingList, 0, waitingListLength);
+ newWaitingList[waitingListLength] = rm;
+ fWaitingList = newWaitingList;
+ }
+ } else {
+ Callback[] newWaitingList = new Callback[2];
+ newWaitingList[0] = (Callback)fWaitingList;
+ newWaitingList[1] = rm;
+ fWaitingList = newWaitingList;
+ }
+ }
+ rm.addCancelListener(fRequestCanceledListener);
+ if (first) {
+ retrieve();
+ }
+ } else {
+ rm.setError(fError);
+ rm.done();
+ }
+ }
+
+ private void completeWaitingRms() {
+ Object waiting = null;
+ synchronized(this) {
+ waiting = fWaitingList;
+ fWaitingList = null;
+ }
+ if (waiting != null) {
+ if (waiting instanceof Callback) {
+ completeWaitingRm((Callback)waiting);
+ } else if (waiting instanceof Callback[]) {
+ Callback[] waitingList = (Callback[])waiting;
+ for (int i = 0; i < waitingList.length; i++) {
+ if (waitingList[i] != null) {
+ completeWaitingRm(waitingList[i]);
+ }
+ }
+ }
+ waiting = null;
+ }
+ }
+
+ private void completeWaitingRm(Callback rm) {
+ rm.setError(fError);
+ rm.removeCancelListener(fRequestCanceledListener);
+ rm.done();
+ }
+
+ private void handleCanceledRm(final Callback rm) {
+
+ boolean found = false;
+ boolean waiting = false;
+ synchronized (this) {
+ if (rm.equals(fWaitingList)) {
+ found = true;
+ waiting = false;
+ fWaitingList = null;
+ } else if(fWaitingList instanceof Callback[]) {
+ Callback[] waitingList = (Callback[])fWaitingList;
+ for (int i = 0; i < waitingList.length; i++) {
+ if (!found && rm.equals(waitingList[i])) {
+ waitingList[i] = null;
+ found = true;
+ }
+ waiting = waiting || waitingList[i] != null;
+ }
+ }
+ if (found && !waiting) {
+ canceled();
+ }
+ }
+
+ // If we have no clients waiting anymore, cancel the request
+ if (found) {
+ // We no longer need to listen to cancellations.
+ rm.removeCancelListener(fRequestCanceledListener);
+ rm.setError(new CancellationException());
+ rm.done();
+ }
+
+ }
+
+ /**
+ * Returns true if there are no clients waiting for this cache or if the
+ * clients that are waiting, have already canceled their requests.
+ * <p>
+ * Note: Calling this method may cause the client request monitors that were
+ * canceled to be completed with a cancel status. If all the client request
+ * monitors were canceled, this method will also cause the {@link #canceled()}
+ * method to be called. Both of these side effects will only happen
+ * asynchronously after <code>isCanceled()</code> returns.
+ * </p>
+ *
+ * @return <code>true</code> if all clients waiting on this cache have been
+ * canceled, or if there are no clients waiting at all.
+ */
+ protected boolean isCanceled() {
+ boolean canceled;
+ List<Callback> canceledRms = null;
+ synchronized (this) {
+ if (fWaitingList instanceof Callback) {
+ if ( ((Callback)fWaitingList).isCanceled() ) {
+ canceledRms = new ArrayList<Callback>(1);
+ canceledRms.add((Callback)fWaitingList);
+ canceled = true;
+ } else {
+ canceled = false;
+ }
+ } else if(fWaitingList instanceof Callback[]) {
+ canceled = true;
+ Callback[] waitingList = (Callback[])fWaitingList;
+ for (int i = 0; i < waitingList.length; i++) {
+ if (waitingList[i] != null) {
+ if (waitingList[i].isCanceled()) {
+ if (canceledRms == null) {
+ canceledRms = new ArrayList<Callback>(1);
+ }
+ canceledRms.add( waitingList[i] );
+ } else {
+ canceled = false;
+ }
+ }
+ }
+ } else {
+ assert fWaitingList == null;
+ canceled = true;
+ }
+ }
+ if (canceledRms != null) {
+ final List<Callback> _canceledRms = canceledRms;
+ Protocol.invokeLater(new Runnable() {
+ public void run() {
+ for (Callback canceledRm : _canceledRms) {
+ handleCanceledRm(canceledRm);
+ }
+ }
+ });
+ }
+
+ return canceled;
+ }
+
+ /**
+ * Resets the cache, setting the data to null and the status to
+ * INVALID_STATUS. When in the invalid state, neither the data nor the
+ * status can be queried.
+ */
+ public void reset() {
+ set(null, INVALID_STATUS, false);
+ }
+
+ /**
+ * Sets data and error values into the cache, and optionally puts in valid
+ * state. Note that data may be null and status may be an error status.
+ * 'Valid' simply means that our data is not stale. In other words, if the
+ * request to the source encounters an error, the cache object becomes valid
+ * all the same. The status indicates what error was encountered.
+ *
+ * <p>
+ * This method is called internally, typically in response to having
+ * obtained the result from the asynchronous request to the source. The
+ * data/status will remain valid until the cache object receives an event
+ * notification from the source indicating otherwise.
+ *
+ * @param data
+ * The data that should be returned to any clients waiting for
+ * cache data and for clients requesting data until the cache is
+ * invalidated.
+ * @param error The status that should be returned to any clients waiting for
+ * cache data and for clients requesting data until the cache is
+ * invalidated
+ * @param valid Whether the cache should bet set in valid state. If false,
+ * any callback waiting for data are completed but the cache
+ * is moved back to invalid state.
+ *
+ * @see #reset
+ */
+ public void set(V data, Throwable error, boolean valid) {
+ assert Protocol.isDispatchThread();
+
+ fData = data;
+ fError = error;
+ fValid = valid;
+
+ completeWaitingRms();
+ }
+
+}
diff --git a/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/util/AggregateCallback.java b/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/util/AggregateCallback.java
new file mode 100644
index 000000000..25313f12f
--- /dev/null
+++ b/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/util/AggregateCallback.java
@@ -0,0 +1,126 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Wind River Systems and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.debug.test.util;
+
+import java.util.List;
+
+/**
+ * Copied and adapted from org.eclipse.cdt.dsf.concurrent.
+ *
+ * A request monitor that is used for multiple activities. We are told the
+ * number of activities that constitutes completion. When our {@link #done()} is
+ * called that many times, the request is considered complete.
+ *
+ * The usage is as follows: <code><pre>
+ * final CountingRequestMonitor countingRm = new CountingRequestMonitor(fExecutor, null) {
+ * public void handleCompleted() {
+ * System.out.println("All complete, errors=" + !getStatus().isOK());
+ * }
+ * };
+ *
+ * int count = 0;
+ * for (int i : elements) {
+ * service.call(i, countingRm);
+ * count++;
+ * }
+ *
+ * countingRm.setDoneCount(count);
+ * </pre></code>
+ *
+ * @since 1.0
+ */
+public class AggregateCallback extends Callback {
+
+ /**
+ * Counter tracking the remaining number of times that the done() method
+ * needs to be called before this request monitor is actually done.
+ */
+ private int fDoneCounter;
+
+ /**
+ * Flag indicating whether the initial count has been set on this monitor.
+ */
+ private boolean fInitialCountSet = false;
+
+ public AggregateCallback(Callback parentCallback) {
+ super(parentCallback);
+ }
+
+ /**
+ * Sets the number of times that this request monitor needs to be called
+ * before this monitor is truly considered done. This method must be called
+ * exactly once in the life cycle of each counting request monitor.
+ * @param count Number of times that done() has to be called to mark the request
+ * monitor as complete. If count is '0', then the counting request monitor is
+ * marked as done immediately.
+ */
+ public synchronized void setDoneCount(int count) {
+ assert !fInitialCountSet;
+ fInitialCountSet = true;
+ fDoneCounter += count;
+ if (fDoneCounter <= 0) {
+ assert fDoneCounter == 0; // Mismatch in the count.
+ super.done();
+ }
+ }
+
+ /**
+ * Called to indicate that one of the calls using this monitor is finished.
+ * Only when we've been called the number of times corresponding to the
+ * completion count will this request monitor will be considered complete.
+ * This method can be called before {@link #setDoneCount(int)}; in that
+ * case, we simply bump the count that tracks the number of times we've been
+ * called. The monitor will not move into the completed state until after
+ * {@link #setDoneCount(int)} has been called (or during if the given
+ * completion count is equal to the number of times {@link #done()} has
+ * already been called.)
+ */
+ @Override
+ public synchronized void done() {
+ fDoneCounter--;
+ if (fInitialCountSet && fDoneCounter <= 0) {
+ assert fDoneCounter == 0; // Mismatch in the count.
+ super.done();
+ }
+ }
+
+ @Override
+ public String toString() {
+ return "AggregateError: " + getError().toString(); //$NON-NLS-1$
+ }
+
+ @Override
+ public synchronized void setError(Throwable error) {
+ if ((getError() == null)) {
+ super.setError(new AggregateError("") {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public String getMessage() {
+ StringBuffer message = new StringBuffer();
+ List<Throwable> children = getChildren();
+ for (int i = 0; i < children.size(); i++) {
+ message.append(children.get(i).getMessage());
+ if (i + 1 < children.size()) {
+ message.append(" ,"); //$NON-NLS-1$
+ }
+ }
+ return message.toString();
+ }
+ });
+ }
+
+
+ if ((getError() instanceof AggregateError)) {
+ ((AggregateError)getError()).add(error);
+ }
+ };
+}
diff --git a/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/util/AggregateError.java b/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/util/AggregateError.java
new file mode 100644
index 000000000..a358f8523
--- /dev/null
+++ b/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/util/AggregateError.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Wind River Systems and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.debug.test.util;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * Exception that combines several exceptions for propagation to client.
+ */
+public class AggregateError extends Exception {
+ private static final long serialVersionUID = 1L;
+
+ final private List<Throwable> fChildren = Collections.synchronizedList(new ArrayList<Throwable>(1));
+
+ public AggregateError(String message) {
+ super(message);
+ }
+
+ public void add(Throwable child) {
+ boolean initCause = false;
+ synchronized(fChildren) {
+ if (fChildren.isEmpty()) {
+ initCause = true;
+ }
+ fChildren.add(child);
+ }
+ if (initCause) {
+ super.initCause(child);
+ }
+ }
+
+ public List<Throwable> getChildren() {
+ return fChildren;
+ }
+}
diff --git a/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/util/Callback.java b/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/util/Callback.java
new file mode 100644
index 000000000..227112fbe
--- /dev/null
+++ b/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/util/Callback.java
@@ -0,0 +1,402 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Wind River Systems and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.debug.test.util;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.CancellationException;
+
+import org.eclipse.tcf.protocol.Protocol;
+
+/**
+ * Copied and apdapted from org.eclipse.cdt.dsf.concurrent.
+ *
+ * Used to monitor the result of an asynchronous request. Because of the
+ * asynchronous nature of DSF code, a very large number of methods needs to
+ * signal the result of an operation through a call-back. This class is the base
+ * class for such call backs.
+ * <p>
+ * The intended use of this class, is that a client who is calling an asynchronous
+ * method, will sub-class Callback, and implement the method {@link #handleCompleted()},
+ * or any of the other <code>handle...</code> methods, in order to interpret the
+ * results of the request. The object implementing the asynchronous method is required
+ * to call the {@link #done()} method on the request monitor object that it received
+ * as an argument.
+ * </p>
+ * <p>
+ * The error the returned by #getError() can be used to
+ * determine the success or failure of the asynchronous operation. By convention
+ * the error value returned by asynchronous method should be interpreted as follows:
+ * <ul>
+ * <li><code>null</code> - Result is a success. In DataCallback, getData() should
+ * return a value.</li>
+ * <li>non-<code>null</code> - An error condition that should probably be reported
+ * to the user.</li>
+ * <li><code>CancellationException</code> - The request was canceled, and the
+ * asynchronous method was not completed.</li>
+ * </ul>
+ * </p>
+ * <p>
+ * The Callback constructor accepts an optional "parent" request monitor. If a
+ * parent monitor is specified, it will automatically be invoked by this monitor when
+ * the request is completed. The parent option is useful when implementing a method
+ * which is asynchronous (and accepts a request monitor as an argument) and which itself
+ * calls another asynchronous method to complete its operation. For example, in the
+ * request monitor implementation below, the implementation only needs to override
+ * <code>handleSuccess()</code>, because the base implementation will handle notifying the
+ * parent <code>rm</code> in case the <code>getIngredients()</code> call fails.
+ * <pre>
+ * public void createCupCakes(final DataCallback<CupCake[]> rm) {
+ * getIngredients(new DataCallback<Ingredients>(fExecutor, rm) {
+ * public void handleSuccess() {
+ * rm.setData( new CupCake(getData().getFlour(), getData().getSugar(),
+ * getData().getBakingPowder()));
+ * rm.done();
+ * }
+ * });
+ * }
+ * </pre>
+ * </p>
+ *
+ * @since 1.0
+ */
+public class Callback {
+
+ /**
+ * Interface used by Callback to notify when a given request monitor
+ * is canceled.
+ *
+ * @see Callback
+ */
+ public static interface ICanceledListener {
+
+ /**
+ * Called when the given request monitor is canceled.
+ */
+ public void requestCanceled(Callback rm);
+ }
+
+ /**
+ * The request monitor which was used to call into the method that created this
+ * monitor.
+ */
+ private final Callback fParentCallback;
+
+ private List<ICanceledListener> fCancelListeners;
+
+ /**
+ * Status
+ */
+ private Throwable fError = null;
+ private boolean fCanceled = false;
+ private boolean fDone = false;
+
+ private final ICanceledListener fCanceledListener;
+
+ /**
+ * This field is never read by any code; its purpose is strictly to assist
+ * developers debug DPF code. Developer can select this field in the
+ * Variables view and see a monitor backtrace in the details pane. See
+ * {@link DsfExecutable#DEBUG_MONITORS}.
+ *
+ * <p>
+ * This field is set only when tracing is enabled.
+ */
+ @SuppressWarnings("unused")
+ private String fMonitorBacktrace;
+
+ public Callback() {
+ this(null);
+ }
+
+ /**
+ * Constructor with an optional parent monitor.
+ *
+ * @param executor
+ * This executor will be used to invoke the runnable that will
+ * allow processing the completion code of this request monitor.
+ * I.e., the runnable will call {@link #handleCompleted()}.
+ * @param parentCallback
+ * An optional parent request monitor. By default, our completion
+ * handlers invoke the parent monitor's <code>done</code> method,
+ * thus allowing monitors to be daisy chained. If this request is
+ * unsuccessful, its status is set into the parent monitor.
+ * Parameter may be null.
+ */
+ public Callback(Callback parentCallback) {
+ fParentCallback = parentCallback;
+
+ // If the parent rm is not null, add ourselves as a listener so that
+ // this request monitor will automatically be canceled when the parent
+ // is canceled.
+ if (fParentCallback != null) {
+ fCanceledListener = new ICanceledListener() {
+ public void requestCanceled(Callback rm) {
+ cancel();
+ }
+ };
+
+ fParentCallback.addCancelListener(fCanceledListener);
+ } else {
+ fCanceledListener = null;
+ }
+ }
+
+ /**
+ * Sets the status of the result of the request. If status is OK, this
+ * method does not need to be called.
+ */
+ public synchronized void setError(Throwable error) {
+ fError = error;
+ }
+
+ /** Returns the status of the completed method. */
+ public synchronized Throwable getError() {
+ if (isCanceled()) {
+ return new CancellationException();
+ }
+ return fError;
+ }
+
+ /**
+ * Sets this request monitor as canceled and calls the cancel listeners if
+ * any.
+ * <p>
+ * Note: Calling cancel() does not automatically complete the
+ * Callback. The asynchronous call still has to call done().
+ * </p>
+ * <p>
+ * Note: logically a request should only be canceled by the client that
+ * issued the request in the first place. After a request is canceled, the
+ * method that is fulfilling the request may call
+ * {@link #setError(Throwable)} with <code>CancelledException</code>
+ * to indicate that it recognized that the given request was canceled and it
+ * did not perform the given operation.
+ * </p>
+ * <p>
+ * Canceling a monitor effectively cancels all descendant monitors, by
+ * virtue of the default implementation of {@link #isCanceled()}, which
+ * checks not only its own state but that of its parent. However, only the
+ * cancel listeners of the monitor directly canceled will be called.
+ * </p>
+ */
+ public void cancel() {
+ ICanceledListener[] listeners = null;
+ synchronized (this) {
+ // Check to make sure the request monitor wasn't previously canceled.
+ if (!fCanceled) {
+ fCanceled = true;
+ if (fCancelListeners != null) {
+ listeners = fCancelListeners.toArray(new ICanceledListener[fCancelListeners.size()]);
+ }
+ }
+ }
+
+ // Call the listeners outside of a synchronized section to reduce the
+ // risk of deadlocks.
+ if (listeners != null) {
+ for (ICanceledListener listener : listeners) {
+ listener.requestCanceled(this);
+ }
+ }
+ }
+
+ /**
+ * Returns whether the request was canceled. Even if the request is
+ * canceled by the client, the implementor handling the request should
+ * still call {@link #done()} in order to complete handling
+ * of the request monitor.
+ *
+ * <p>
+ * A request monitor is considered canceled if either it or its parent was canceled.
+ * </p>
+ */
+ public boolean isCanceled() {
+ boolean canceled = false;
+
+ // Avoid holding onto this lock while calling parent RM, which may
+ // acquire other locks (bug 329488).
+ synchronized(this) {
+ canceled = fCanceled;
+ }
+ return canceled || (fParentCallback != null && fParentCallback.isCanceled());
+ }
+
+ /**
+ * Adds the given listener to list of listeners that are notified when this
+ * request monitor is directly canceled.
+ */
+ public synchronized void addCancelListener(ICanceledListener listener) {
+ if (fCancelListeners == null) {
+ fCancelListeners = new ArrayList<ICanceledListener>(1);
+ }
+ fCancelListeners.add(listener);
+ }
+
+ /**
+ * Removes the given listener from the list of listeners that are notified
+ * when this request monitor is directly canceled.
+ */
+ public synchronized void removeCancelListener(ICanceledListener listener) {
+ if (fCancelListeners != null) {
+ fCancelListeners.remove(listener);
+ }
+ }
+
+ public void done(Throwable error) {
+ setError(error);
+ done();
+ }
+
+ /**
+ * Marks this request as completed. Once this method is called, the
+ * monitor submits a runnable to the DSF Executor to call the
+ * <code>handle...</code> methods.
+ * <p>
+ * Note: This method should be called once and only once, for every request
+ * issued. Even if the request was canceled.
+ * </p>
+ */
+ public synchronized void done() {
+ assert Protocol.getEventQueue().isDispatchThread();
+
+ if (fDone) {
+ throw new IllegalStateException("Callback: " + this + ", done() method called more than once"); //$NON-NLS-1$//$NON-NLS-2$
+ }
+ fDone = true;
+
+ // This Callback is done, it can no longer be canceled.
+ // We must clear the list of cancelListeners because it causes a
+ // circular reference between parent and child Callback, which
+ // causes a memory leak.
+ fCancelListeners = null;
+
+ if (fParentCallback != null) {
+ fParentCallback.removeCancelListener(fCanceledListener);
+ }
+
+ handleCompleted();
+ }
+
+ @Override
+ public String toString() {
+ return "Callback (" + super.toString() + "): " + getError(); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ /**
+ * Checks whether the given request monitor completed with success or
+ * failure result. If the request monitor was canceled it is considered a
+ * failure, regardless of the status. If the status has a severity higher
+ * than INFO (i.e., WARNING, ERROR or CANCEL), it is considered a failure.
+ */
+ public synchronized boolean isSuccess() {
+ return !isCanceled() && getError() == null ;
+ }
+
+ /**
+ * First tier handler for the completion of the request. By default, the
+ * {@link #done()} method drives this method on the executor specified at
+ * construction time. By default, this handler merely calls a more
+ * specialized handler, which in turn may call an even more specialized
+ * handler, and so on, thus giving a subclass the ability to
+ * compartmentalize its completion logic by overriding specific handlers.
+ * All handlers are named <code>handleXxxxx</code>. More specifically, the
+ * base implementation calls {@link #handleSuccess()} if the request
+ * succeeded, and calls {@link #handleFailure()} otherwise. <br>
+ *
+ * The complete hierarchy of handlers is as follows: <br>
+ * <pre>
+ * + handleCompleted
+ * - handleSuccess
+ * + handleFailure
+ * - handleCancel
+ * + handleErrororWarning
+ * - handleError
+ * - handleWarning
+ * </pre>
+ *
+ * <p>
+ * Note: Sub-classes may override this method.
+ */
+ protected void handleCompleted() {
+ if (isSuccess()) {
+ handleSuccess();
+ } else {
+ handleFailure();
+ }
+ }
+
+ /**
+ * Default handler for a successful the completion of a request. If this
+ * monitor has a parent monitor that was configured by the constructor, that
+ * parent monitor is notified. Otherwise this method does nothing.
+ * {@link #handleFailure()} or cancel otherwise.
+ * <br>
+ * Note: Sub-classes may override this method.
+ */
+ protected void handleSuccess() {
+ if (fParentCallback != null) {
+ fParentCallback.done();
+ }
+ }
+
+ /**
+ * The default implementation of a cancellation or an error result of a
+ * request. The implementation delegates to {@link #handleCancel()} and
+ * {@link #handleErrorOrWarning()} as needed.
+ * <br>
+ * Note: Sub-classes may override this method.
+ */
+ protected void handleFailure() {
+ assert !isSuccess();
+
+ if (isCanceled()) {
+ handleCancel();
+ } else {
+ handleError();
+ }
+ }
+
+ /**
+ * The default implementation of an error result of a request. If this
+ * monitor has a parent monitor that was configured by the constructor, that
+ * parent monitor is configured with a new status containing this error.
+ * Otherwise the error is logged.
+ * <br>
+ * Note: Sub-classes may override this method.
+ */
+ protected void handleError() {
+ if (fParentCallback != null) {
+ fParentCallback.setError(getError());
+ fParentCallback.done();
+ } else {
+ Protocol.log("Unhandled error in callback " + toString(), getError());
+ }
+ }
+
+
+ /**
+ * Default completion handler for a canceled request. If this monitor was
+ * constructed with a parent monitor, the status is propagated up to it.
+ * Otherwise this method does nothing. <br>
+ * Note: Sub-classes may override this method.
+ */
+ protected void handleCancel() {
+ if (fParentCallback != null) {
+ if (getError() instanceof CancellationException && !fParentCallback.isCanceled()) {
+ Protocol.log("Sub-request " + toString() + " was canceled and not handled.'", getError());
+ } else {
+ fParentCallback.setError(getError());
+ }
+ fParentCallback.done();
+ }
+ }
+}
diff --git a/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/util/CallbackCache.java b/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/util/CallbackCache.java
new file mode 100644
index 000000000..9275118c7
--- /dev/null
+++ b/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/util/CallbackCache.java
@@ -0,0 +1,100 @@
+package org.eclipse.tcf.debug.test.util;
+
+/*******************************************************************************
+ * 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:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+
+
+/**
+ * A general purpose cache, which caches the result of a single request.
+ * Sub classes need to implement {@link #retrieve(DataRequestMonitor)} to fetch
+ * data from the data source. Clients are responsible for calling
+ * {@link #disable()} and {@link #reset()} to manage the state of the cache in
+ * response to events from the data source.
+ * <p>
+ * This cache requires an executor to use. The executor is used to synchronize
+ * access to the cache state and data.
+ * </p>
+ * @since 2.2
+ */
+public abstract class CallbackCache<V> extends AbstractCache<V> {
+
+ protected DataCallback<V> fRm;
+
+ @Override
+ protected final void retrieve() {
+ // Make sure to cancel the previous rm. This may lead to the rm being
+ // canceled twice, but that's not harmful.
+ if (fRm != null) {
+ fRm.cancel();
+ }
+
+ fRm = new DataCallback<V>(null) {
+ @Override
+ protected void handleCompleted() {
+ if (this == fRm) {
+ fRm = null;
+ CallbackCache.this.handleCompleted(getData(), getError(), isCanceled());
+ }
+ }
+
+ @Override
+ public boolean isCanceled() {
+ return super.isCanceled() || CallbackCache.this.isCanceled();
+ };
+ };
+ retrieve(fRm);
+ }
+
+ /**
+ * Sub-classes should override this method to retrieve the cache data
+ * from its source.
+ *
+ * @param rm Request monitor for completion of data retrieval.
+ */
+ protected abstract void retrieve(DataCallback<V> rm);
+
+ protected void handleCompleted(V data, Throwable error, boolean canceled) {
+ // If the requestor canceled the request, then leave the
+ // cache as is, regardless of how the retrieval completes.
+ // We want the cache to stay in the invalid state so that
+ // it remains functional. The request may have completed
+ // successfully, but using it may produce inconsistent
+ // results.
+ if (!canceled) {
+ set(data, error, true);
+ }
+ }
+
+ @Override
+ protected synchronized void canceled() {
+ if (fRm != null) {
+ fRm.cancel();
+ }
+ }
+
+ @Override
+ public void set(V data, Throwable error, boolean valid) {
+ if (fRm != null) {
+ fRm.cancel();
+ fRm = null;
+ }
+ super.set(data, error, valid);
+ }
+
+ @Override
+ public void reset() {
+ if (fRm != null) {
+ fRm.cancel();
+ fRm = null;
+ }
+ super.reset();
+ }
+}
diff --git a/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/util/DataCallback.java b/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/util/DataCallback.java
new file mode 100644
index 000000000..8127d9e06
--- /dev/null
+++ b/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/util/DataCallback.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 Wind River Systems and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.debug.test.util;
+
+
+
+/**
+ * Copied and apdapted from org.eclipse.cdt.dsf.concurrent.
+ *
+ * Request monitor that allows data to be returned to the request initiator.
+ *
+ * @param V The type of the data object that this monitor handles.
+ *
+ * @since 1.0
+ */
+public class DataCallback<V> extends Callback {
+
+ /** Data object reference */
+ private V fData;
+
+ public DataCallback() {
+ this(null);
+ }
+
+ public DataCallback(Callback parentCallback) {
+ super(parentCallback);
+ }
+
+ /**
+ * Sets the data object to specified value. To be called by the
+ * asynchronous method implementor.
+ * @param data Data value to set.
+ */
+ public synchronized void setData(V data) { fData = data; }
+
+ /**
+ * Returns the data value, null if not set.
+ */
+ public synchronized V getData() { return fData; }
+
+ public void done(V data, Throwable error) {
+ setData(data);
+ done(error);
+ }
+
+ @Override
+ public String toString() {
+ if (getData() != null) {
+ return getData().toString();
+ } else {
+ return super.toString();
+ }
+ }
+}
diff --git a/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/util/ICache.java b/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/util/ICache.java
new file mode 100644
index 000000000..eca1bb713
--- /dev/null
+++ b/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/util/ICache.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Wind River Systems and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.debug.test.util;
+
+
+/**
+ * The interface for a general purpose cache that caches the result of a single
+ * request. Implementations need to provide the logic to fetch data from an
+ * asynchronous data source.
+ * <p>
+ * This cache requires an executor to use. The executor is used to synchronize
+ * access to the cache state and data.
+ * </p>
+ * @since 2.2
+ */
+public interface ICache<V> {
+
+ /**
+ * Returns the current data value held by this cache. Clients should first
+ * call isValid() to determine if the data is up to date. Calling this when
+ * in the invalid state will throw an IllegalStateException
+ */
+ public V getData();
+
+ /**
+ * Returns the status of the source request held by this cache. Clients
+ * should first call isValid() to determine if the data is up to date.
+ * Calling this when in the invalid state will throw an
+ * IllegalStateException
+ */
+ public Throwable getError();
+
+ /**
+ * Asks the cache to update its value from the source. If the cache is
+ * already valid, the request is completed immediately, otherwise data will
+ * first be retrieved from the source. Typically, this method is called by a
+ * client after it discovers the cache is invalid via {@link #isValid()}
+ *
+ * @param rm
+ * RequestMonitor that is called when cache becomes valid.
+ */
+ public void update(Callback rm);
+
+ /**
+ * Returns <code>true</code> if the cache is currently valid. I.e.
+ * whether the cache can return a value immediately without first
+ * retrieving it from the data source.
+ */
+ public boolean isValid();
+}
diff --git a/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/util/Query.java b/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/util/Query.java
new file mode 100644
index 000000000..b75b74627
--- /dev/null
+++ b/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/util/Query.java
@@ -0,0 +1,177 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Wind River Systems and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.debug.test.util;
+
+import java.util.concurrent.CancellationException;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.Future;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
+
+import org.eclipse.tcf.protocol.Protocol;
+
+
+/**
+ * Copied and adapted from org.eclipse.cdt.dsf.concurrent.
+ *
+ * A convenience class that allows a client to retrieve data from services
+ * synchronously from a non-dispatch thread. This class is different from
+ * a Callable<V> in that it allows the implementation code to calculate
+ * the result in several dispatches, rather than requiring it to return the
+ * data at end of Callable#call method.
+ * <p>
+ * Usage:<br/>
+ * <pre>
+ * class DataQuery extends Query<Data> {
+ * protected void execute(DataCallback<Data> callback) {
+ * callback.setData(fSlowService.getData());
+ * callback.done();
+ * }
+ * }
+ *
+ * DsfExecutor executor = getExecutor();
+ * DataQuery query = new DataQuery();
+ * executor.submit(query);
+ *
+ * try {
+ * Data data = query.get();
+ * }
+ *
+ * </pre>
+ * <p>
+ * @see java.util.concurrent.Callable
+ *
+ */
+abstract public class Query<V> implements Future<V>
+{
+ private class QueryCallback extends DataCallback<V> {
+
+ boolean fExecuted = false;
+
+ boolean fCompleted = false;
+
+ private QueryCallback() {
+ super(null);
+ }
+
+ @Override
+ public synchronized void handleCompleted() {
+ fCompleted = true;
+ notifyAll();
+ }
+
+ public synchronized boolean isCompleted() {
+ return fCompleted;
+ }
+
+ public synchronized boolean setExecuted() {
+ if (fExecuted || isCanceled()) {
+ // already executed or canceled
+ return false;
+ }
+ fExecuted = true;
+ return true;
+ }
+ };
+
+ private final QueryCallback fCallback = new QueryCallback();
+
+ /**
+ * The no-argument constructor
+ */
+ public Query() {}
+
+ public V get() throws InterruptedException, ExecutionException {
+ invoke();
+ Throwable error;
+ V data;
+ synchronized (fCallback) {
+ while (!isDone()) {
+ fCallback.wait();
+ }
+ error = fCallback.getError();
+ data = fCallback.getData();
+ }
+
+ if (error instanceof CancellationException) {
+ throw new CancellationException();
+ } else if (error != null) {
+ throw new ExecutionException(error);
+ }
+ return data;
+ }
+
+ public V get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException {
+ invoke();
+
+ long timeLeft = unit.toMillis(timeout);
+ long timeoutTime = System.currentTimeMillis() + unit.toMillis(timeout);
+
+ Throwable error;
+ V data;
+ synchronized (fCallback) {
+ while (!isDone()) {
+ if (timeLeft <= 0) {
+ throw new TimeoutException();
+ }
+ fCallback.wait(timeLeft);
+ timeLeft = timeoutTime - System.currentTimeMillis();
+ }
+ error = fCallback.getError();
+ data = fCallback.getData();
+ }
+
+ if (error instanceof CancellationException) {
+ throw new CancellationException();
+ } else if (error != null) {
+ throw new ExecutionException(error);
+ }
+ return data;
+ }
+
+ /**
+ * Don't try to interrupt the DSF executor thread, just ignore the request
+ * if set.
+ */
+ public boolean cancel(boolean mayInterruptIfRunning) {
+ boolean completed = false;
+ synchronized (fCallback) {
+ completed = fCallback.isCompleted();
+ if (!completed) {
+ fCallback.cancel();
+ fCallback.notifyAll();
+ }
+ }
+ return !completed;
+ }
+
+ public boolean isCancelled() { return fCallback.isCanceled(); }
+
+ public boolean isDone() {
+ synchronized (fCallback) {
+ // If future is canceled, return right away.
+ return fCallback.isCompleted() || fCallback.isCanceled();
+ }
+ }
+
+ abstract protected void execute(DataCallback<V> callback);
+
+ public void invoke() {
+ Protocol.invokeLater(new Runnable() {
+ public void run() {
+ if (fCallback.setExecuted()) {
+ execute(fCallback);
+ }
+ }
+ });
+ }
+}
+
diff --git a/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/util/Task.java b/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/util/Task.java
new file mode 100644
index 000000000..8af55fa85
--- /dev/null
+++ b/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/util/Task.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Wind River Systems and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.debug.test.util;
+
+import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.Future;
+import java.util.concurrent.FutureTask;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import org.eclipse.tcf.protocol.Protocol;
+
+/**
+ * Future implementation that executes a call on the TCF Protocol
+ * thread.
+ */
+public abstract class Task<V> implements Future<V> , Callable<V> {
+
+ private final AtomicBoolean fInvoked = new AtomicBoolean(false);
+ private final FutureTask<V> fInternalFT = new FutureTask<V>(this);
+
+ public boolean cancel(boolean mayInterruptIfRunning) {
+ return fInternalFT.cancel(mayInterruptIfRunning);
+ }
+
+ public boolean isCancelled() {
+ return fInternalFT.isCancelled();
+ }
+
+ public boolean isDone() {
+ return fInternalFT.isDone();
+ }
+
+ public V get() throws InterruptedException, ExecutionException {
+ invoke();
+ return fInternalFT.get();
+ }
+
+ public V get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException {
+ invoke();
+ return fInternalFT.get(timeout, unit);
+ }
+
+ public void invoke() {
+ if (!fInvoked.getAndSet(true)) {
+ Protocol.invokeLater(fInternalFT);
+ }
+ }
+
+ abstract public V call() throws Exception;
+}
diff --git a/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/util/TokenCache.java b/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/util/TokenCache.java
new file mode 100644
index 000000000..e19b73457
--- /dev/null
+++ b/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/util/TokenCache.java
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.debug.test.util;
+
+import java.util.concurrent.atomic.AtomicReference;
+
+import org.eclipse.tcf.protocol.IToken;
+
+/**
+ *
+ */
+public abstract class TokenCache<V> extends AbstractCache<V> {
+
+ private AtomicReference<IToken> fToken = new AtomicReference<IToken>();
+
+ @Override
+ final protected void retrieve() {
+ fToken.set(retrieveToken());
+ }
+
+ protected boolean checkToken(IToken token) {
+ return fToken.compareAndSet(token, null);
+ }
+
+ abstract protected IToken retrieveToken();
+
+ protected void set(IToken token, V data, Throwable error) {
+ if (checkToken(token) ) {
+ set(data, error, true);
+ }
+ }
+
+ @Override
+ protected void canceled() {
+ IToken token = fToken.getAndSet(null);
+ token.cancel();
+ }
+}
diff --git a/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/util/Transaction.java b/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/util/Transaction.java
new file mode 100644
index 000000000..d27281eaf
--- /dev/null
+++ b/tests/plugins/org.eclipse.tcf.debug.test/src/org/eclipse/tcf/debug/test/util/Transaction.java
@@ -0,0 +1,254 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.debug.test.util;
+
+import java.util.Arrays;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.Future;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
+
+import org.eclipse.core.runtime.CoreException;
+
+/**
+ * @since 2.2
+ */
+public abstract class Transaction<V> implements Future<V> {
+
+ /**
+ * The exception we throw when the client transaction logic asks us to
+ * validate a cache object that is stale (or has never obtained a value from
+ * the source)
+ */
+ private static final InvalidCacheException INVALID_CACHE_EXCEPTION = new InvalidCacheException();
+
+ /** The request object we've been given to set the transaction results in */
+ private DataCallback<V> fRm;
+
+ private Query<V> fQuery;
+
+ public static class InvalidCacheException extends Exception {
+ private static final long serialVersionUID = 1L;
+ }
+
+ /**
+ * Kicks off the transaction. We'll either complete the request monitor
+ * immediately if all the data points the transaction needs are cached and
+ * valid, or we'll end up asynchronously completing the monitor if and when
+ * either (a) all the data points are available and up-to-date, or (b)
+ * obtaining them from the source encountered an error. Note that there is
+ * potential in (b) for us to never complete the monitor. If one or more
+ * data points are perpetually becoming stale, then we'll indefinitely wait
+ * for them to stabilize. The caller should cancel its request monitor in
+ * order to get us to stop waiting.
+ *
+ * @param rm Request completion monitor.
+ */
+ public void request(DataCallback<V> rm) {
+ if (fRm != null) {
+ assert fRm.isCanceled();
+ fRm.done();
+ }
+ fRm = rm;
+ assert fRm != null;
+ execute();
+ }
+
+ /**
+ * The transaction logic--code that tries to synchronously make use of,
+ * usually, multiple data points that are normally obtained asynchronously.
+ * Each data point is represented by a cache object. The transaction logic
+ * must check the validity of each cache object just prior to using it
+ * (calling its getData()). It should do that check by calling one of our
+ * validate() methods. Those methods will throw InvalidCacheException if the
+ * cached data is invalid (stale, e.g.,) or CoreException if an error was
+ * encountered the last time it got data form the source. The exception will
+ * abort the transaction, but in the case of InvalidCacheException, we
+ * schedule an asynchronous call that will re-invoke the transaction
+ * logic once the cache object has been updated from the source.
+ *
+ * @return the cached data if it's valid, otherwise an exception is thrown
+ * @throws Transaction.InvalidCacheException Exception indicating that a
+ * cache is not valid and transaction will need to be rescheduled.
+ * @throws CoreException Exception indicating that one of the caches is
+ * in error state and transaction cannot be processed.
+ */
+ abstract protected V process() throws InvalidCacheException, ExecutionException;
+
+ /**
+ * Method which invokes the transaction logic and handles any exception that
+ * may result. If that logic encounters a stale/unset cache object, then we
+ * simply do nothing. This method will be called again once the cache
+ * objects tell us it has obtained an updated value form the source.
+ */
+ private void execute() {
+ if (fRm.isCanceled()) {
+ fRm.done();
+ fRm = null;
+ return;
+ }
+
+ try {
+ // Execute the transaction logic
+ V data = process();
+
+ // No exception means all cache objects used by the transaction
+ // were valid and up to date. Complete the request
+ fRm.setData(data);
+ fRm.done();
+ fRm = null;
+ }
+ catch (InvalidCacheException e) {
+ // At least one of the cache objects was stale/unset. Keep the
+ // request monitor in the incomplete state, thus leaving our client
+ // "waiting" (asynchronously). We'll get called again once the cache
+ // objects are updated, thus re-starting the whole transaction
+ // attempt.
+ }
+ catch (Throwable e) {
+ // At least one of the cache objects encountered a failure obtaining
+ // the data from the source. Complete the request.
+ fRm.setError(e);
+ fRm.done();
+ fRm = null;
+ }
+
+ }
+
+ /**
+ * Clients must call one of our validate methods prior to using (calling
+ * getData()) on data cache object.
+ *
+ * @param cache
+ * the object being validated
+ * @throws InvalidCacheException
+ * if the data is stale/unset
+ * @throws ExecutionException
+ * if an error was encountered getting the data from the source
+ */
+ public <T> T validate(ICache<T> cache) throws InvalidCacheException, ExecutionException {
+ if (cache.isValid()) {
+ if (cache.getError() != null) {
+ throw new ExecutionException(cache.getError());
+ }
+ return cache.getData();
+ } else {
+ // Throw the invalid cache exception, but first ask the cache to
+ // update itself from its source, and schedule a re-attempt of the
+ // transaction logic to occur when the stale/unset cache has been
+ // updated
+ cache.update(new Callback(fRm) {
+ @Override
+ protected void handleCompleted() {
+ execute();
+ }
+ });
+ throw INVALID_CACHE_EXCEPTION;
+ }
+ }
+
+ /**
+ * See {@link #validate(RequestCache)}. This variant simply validates
+ * multiple cache objects.
+ */
+ public <T> void validate(ICache<?> ... caches) throws InvalidCacheException, ExecutionException {
+ validate(Arrays.asList(caches));
+ }
+
+ /**
+ * See {@link #validate(RequestCache)}. This variant simply validates
+ * multiple cache objects.
+ */
+ public void validate(@SuppressWarnings("rawtypes") Iterable caches) throws InvalidCacheException, ExecutionException {
+ // Check if any of the caches have errors:
+ boolean allValid = true;
+
+ for (Object cacheObj : caches) {
+ ICache<?> cache = (ICache<?>)cacheObj;
+ if (cache.isValid()) {
+ if (cache.getError() != null) {
+ throw new ExecutionException(cache.getError());
+ }
+ } else {
+ allValid = false;
+ }
+ }
+ if (!allValid) {
+ // Throw the invalid cache exception, but first schedule a
+ // re-attempt of the transaction logic, to occur when the
+ // stale/unset cache objects have been updated
+ AggregateCallback countringRm = new AggregateCallback(fRm) {
+ @Override
+ protected void handleCompleted() {
+ execute();
+ }
+ };
+ int count = 0;
+ for (Object cacheObj : caches) {
+ ICache<?> cache = (ICache<?>)cacheObj;
+ if (!cache.isValid()) {
+ cache.update(countringRm);
+ count++;
+ }
+ }
+ countringRm.setDoneCount(count);
+ throw INVALID_CACHE_EXCEPTION;
+ }
+ }
+
+ private synchronized Query<V> getQuery(boolean create) {
+ if (fQuery == null && create) {
+ fQuery = new Query<V>() {
+ @Override
+ protected void execute(DataCallback<V> callback) {
+ request(callback);
+ }
+ };
+ fQuery.invoke();
+ }
+
+ return fQuery;
+ }
+
+ public boolean cancel(boolean mayInterruptIfRunning) {
+ Query<V> query = getQuery(false);
+ if (query != null) {
+ return query.cancel(mayInterruptIfRunning);
+ }
+ return false;
+ }
+
+ public boolean isCancelled() {
+ Query<V> query = getQuery(false);
+ if (query != null) {
+ return query.isCancelled();
+ }
+ return false;
+ }
+
+ public boolean isDone() {
+ Query<V> query = getQuery(false);
+ if (query != null) {
+ return query.isDone();
+ }
+ return false;
+ }
+
+ public V get() throws InterruptedException, ExecutionException {
+ return getQuery(true).get();
+ }
+
+ public V get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException {
+ return getQuery(true).get(timeout, unit);
+ }
+
+
+}
diff --git a/tests/test-all b/tests/test-all
index 01c29f09d..1c527d251 100755
--- a/tests/test-all
+++ b/tests/test-all
@@ -25,22 +25,22 @@ VBOXHOST=192.168.155.1
rm -rf java-bin || exit 1
mkdir java-bin || exit 1
-SRCPATH=$REPOS/org.eclipse.tcf/plugins/org.eclipse.tm.tcf
+SRCPATH=$REPOS/org.eclipse.tcf/plugins/org.eclipse.tcf
DSTPATH=$BUILD/java-bin
javac -g -nowarn \
-sourcepath $SRCPATH.core/src:$SRCPATH.debug/src \
-d $DSTPATH \
- "$SRCPATH.debug/src/org/eclipse/tm/internal/tcf/debug/tests/Main.java" \
+ "$SRCPATH.debug/src/org/eclipse/tcf/internal/debug/tests/Main.java" \
|| exit 1
-pushd "$SRCPATH.core/src/org/eclipse/tm/internal/tcf/services/remote" >/dev/null || exit 1
+pushd "$SRCPATH.core/src/org/eclipse/tcf/internal/services/remote" >/dev/null || exit 1
for FILE in `ls *.java`
do
javac -g -nowarn \
-classpath $DSTPATH \
-sourcepath "$SRCPATH.core/src" \
-d $DSTPATH \
- "$SRCPATH.core/src/org/eclipse/tm/internal/tcf/services/remote/$FILE" \
+ "$SRCPATH.core/src/org/eclipse/tcf/internal/services/remote/$FILE" \
|| exit 1
done
popd >/dev/null
@@ -100,7 +100,8 @@ function start_vm()
local LOGFILE=$HOST-Start.txt
echo "<td>" >>$HTML
echo "<a href=\"$LOGFILE\">" >>$HTML
- echo Starting $VM >logs/$LOGFILE
+ date >logs/$LOGFILE
+ echo Starting $VM >>logs/$LOGFILE
if VBoxManage --nologo list runningvms | sed -e "s/.*{\\(.*\\)}/\\1/" | grep -q $VM >>logs/$LOGFILE 2>&1 ; then
echo $VM is already running >>logs/$LOGFILE
echo "<img src=\"../icons/accept.png\" title=\"OK\"/>" >>$HTML
@@ -118,7 +119,8 @@ function ping_vm()
local LOGFILE=$HOST-Ping.txt
echo "<td>" >>$HTML
echo "<a href=\"$LOGFILE\">" >>$HTML
- echo Ping $VM >logs/$LOGFILE
+ date >logs/$LOGFILE
+ echo Ping $VM >>logs/$LOGFILE
sleep 4
if ping -c 30 $HOST >>logs/$LOGFILE 2>&1 || \
ping -c 30 $HOST >>logs/$LOGFILE 2>&1
@@ -153,20 +155,22 @@ function ping_vm()
function stop_vm()
{
+ local LOGFILE=$HOST-Stop.txt
echo "<td>" >>$HTML
- echo "<a href=\"$HOST-Stop.txt\">" >>$HTML
- echo "Stop $VM" >logs/$HOST-Stop.txt
+ echo "<a href=\"$LOGFILE\">" >>$HTML
+ date >logs/$LOGFILE
+ echo "Stop $VM" >>logs/$LOGFILE
if [ -z "$STOP_VM" ] ; then
- echo "VM does not need to be stopped" >>logs/$HOST-Stop.txt
+ echo "VM does not need to be stopped" >>logs/$LOGFILE
echo "<img src=\"../icons/accept.png\" title=\"OK\"/>" >>$HTML
elif VBoxManage --nologo list runningvms | sed -e "s/.*{\\(.*\\)}/\\1/" | grep -q $VM ; then
- if VBoxManage --nologo controlvm $VM savestate >>logs/$HOST-Stop.txt 2>&1 ; then
+ if VBoxManage --nologo controlvm $VM savestate >>logs/$LOGFILE 2>&1 ; then
echo "<img src=\"../icons/accept.png\" title=\"OK\"/>" >>$HTML
else
echo "<img src=\"../icons/cross.png\" title=\"Failed\"/>" >>$HTML
fi
else
- echo $VM is already stopped >>logs/$HOST-Stop.txt 2>&1
+ echo $VM is already stopped >>logs/$LOGFILE 2>&1
echo "<img src=\"../icons/error.png\" title=\"Already stopped\"/>" >>$HTML
fi
echo "</a>" >>$HTML
@@ -177,16 +181,16 @@ function get_make_options()
# Currently we cannot test login feature of Terminals service
case $CC in
gcc)
- OPTS="CC=gcc 'CFLAGS=-Werror -DTERMINALS_NO_LOGIN=1 $CFLAGS'"
+ OPTS="CC=gcc 'CFLAGS=-Werror -DTERMINALS_NO_LOGIN=1 -DENABLE_SignalHandlers=0 $CFLAGS'"
;;
g++)
- OPTS="CC=g++ 'CFLAGS=-Werror -DTERMINALS_NO_LOGIN=1 $CFLAGS'"
+ OPTS="CC=g++ 'CFLAGS=-Werror -DTERMINALS_NO_LOGIN=1 -DENABLE_SignalHandlers=0 $CFLAGS'"
;;
msvc++)
- OPTS="'CFLAGS=-x c++ $CFLAGS'"
+ OPTS="'CFLAGS=-x c++ -DENABLE_SignalHandlers=0 $CFLAGS'"
;;
*)
- OPTS="'CFLAGS=$CFLAGS'"
+ OPTS="'CFLAGS=-DENABLE_SignalHandlers=0 $CFLAGS'"
;;
esac
echo "OPSYS=$OPSYS CONF=$CONF $OPTS"
@@ -240,17 +244,17 @@ function build_and_test_agent()
local BUILD_ERROR=
local TEST_ERROR=
local TEST_WARNING=
- if $SSH "cd $AGENT; time -p $MAKE `get_make_options` clean all" >>logs/$LOGFILE 2>&1
+ if $SSH "cd $AGENT/agent; time -p $MAKE `get_make_options` clean all" >>logs/$LOGFILE 2>&1
then
if [ $SEQ = 1 ] ; then
- $SSH "$AGENT/obj/$OPSYS/$MACHINE/$CONF/agent -c" >>logs/$LOGFILE 2>&1
+ $SSH "$AGENT/agent/obj/$OPSYS/$MACHINE/$CONF/agent -c" >>logs/$LOGFILE 2>&1
fi
if [ $OPSYS = Windows ] ; then
local AGENT_L_OPT=-L`$SSH "cygpath -m $VMBUILD/logs/agent-$HOST.txt"`
else
local AGENT_L_OPT=-L$VMBUILD/logs/agent-$HOST.txt
fi
- $SSH -f "$AGENT/obj/$OPSYS/$MACHINE/$CONF/agent -s TCP::1534 $AGENT_L_OPT -l0" >>logs/$LOGFILE 2>&1
+ $SSH -f "$AGENT/agent/obj/$OPSYS/$MACHINE/$CONF/agent -s TCP::1534 $AGENT_L_OPT -l0" >>logs/$LOGFILE 2>&1
sleep 15
TESTURL1=TransportName=TCP:Host=$HOST:Port=1534
TESTURL2=TransportName=TCP:Host=$HOST:Port=1535
@@ -259,7 +263,7 @@ function build_and_test_agent()
echo "Starting tests, target: $TESTURL1" >>logs/$LOGFILE
if time -p java -ea \
-classpath java-bin \
- org.eclipse.tm.internal.tcf.debug.tests.Main \
+ org.eclipse.tcf.internal.debug.tests.Main \
$TESTURL1 \
>>logs/$LOGFILE 2>&1
then
@@ -312,13 +316,13 @@ function build_and_test_agent()
TESTURL1=TransportName=TCP:Host=localhost:Port=1534
;;
esac
- $SSH -f "$AGENT/obj/$OPSYS/$MACHINE/$CONF/agent -s $AGENT_S_OPT $AGENT_L_OPT -l0" >>logs/$LOGFILE 2>&1
+ $SSH -f "$AGENT/agent/obj/$OPSYS/$MACHINE/$CONF/agent -s $AGENT_S_OPT $AGENT_L_OPT -l0" >>logs/$LOGFILE 2>&1
sleep 25
echo >>logs/$LOGFILE
echo "Starting tests, target: $TESTURL2 $TESTURL1" >>logs/$LOGFILE
if time -p java -ea \
-classpath java-bin \
- org.eclipse.tm.internal.tcf.debug.tests.Main \
+ org.eclipse.tcf.internal.debug.tests.Main \
$TESTURL2 $TESTURL1 \
>>logs/$LOGFILE 2>&1
then
@@ -356,7 +360,7 @@ function build_and_test_agent()
echo "</a>" >>$HTML
sleep 5
- $SSH "cd $AGENT; rm -rf obj" >>logs/$LOGFILE 2>&1
+ $SSH "cd $AGENT/agent; rm -rf obj" >>logs/$LOGFILE 2>&1
}
function test_one_conf()
@@ -425,12 +429,14 @@ function test_one_opsys()
function build_rpm()
{
+ local LOGFILE=$HOST-RPM.txt
echo "<td>" >>$HTML
- echo "<a href=\"$HOST-RPM.txt\">" >>$HTML
- echo RPM build on $VM >logs/$HOST-RPM.txt
+ echo "<a href=\"$LOGFILE\">" >>$HTML
+ date >logs/$LOGFILE
+ echo RPM build on $VM >>logs/$LOGFILE
if [ -z "$BUILD_RPM" ] ; then
echo "<img src=\"../icons/error.png\" title=\"Not supported\"/>" >>$HTML
- elif $SSH "cd $AGENT; $MAKE clean rpm" >>logs/$HOST-RPM.txt 2>&1 ; then
+ elif $SSH "cd $AGENT/agent; $MAKE clean rpm" >>logs/$LOGFILE 2>&1 ; then
echo "<img src=\"../icons/accept.png\" title=\"OK\"/>" >>$HTML
else
echo "<img src=\"../icons/cross.png\" title=\"Failed\"/>" >>$HTML
diff --git a/tests/test-dwarf/Makefile b/tests/test-dwarf/Makefile
deleted file mode 100644
index 3815e2221..000000000
--- a/tests/test-dwarf/Makefile
+++ /dev/null
@@ -1,30 +0,0 @@
-TCF_AGENT_DIR=../../../org.eclipse.tcf.agent
-
-include $(TCF_AGENT_DIR)/Makefile.inc
-
-override CFLAGS += $(foreach dir,$(INCDIRS),-I$(dir)) $(OPTS)
-
-HFILES := $(foreach dir,$(SRCDIRS) backend,$(wildcard $(dir)/*.h)) $(HFILES)
-CFILES := $(sort $(foreach dir,$(SRCDIRS) backend,$(wildcard $(dir)/*.c)) $(CFILES))
-
-EXECS = $(BINDIR)/dwarf-test$(EXTEXE)
-
-all: $(EXECS)
-
-$(BINDIR)/libtcf$(EXTLIB) : $(OFILES)
- $(AR) -rc $@ $^
- $(RANLIB)
-
-$(BINDIR)/dwarf-test$(EXTEXE): $(BINDIR)/main/main$(EXTOBJ) $(BINDIR)/libtcf$(EXTLIB)
- $(CC) $(CFLAGS) -o $@ $(BINDIR)/main/main$(EXTOBJ) $(BINDIR)/libtcf$(EXTLIB) $(LIBS)
-
-$(BINDIR)/%$(EXTOBJ): %.c $(HFILES) Makefile
- @$(call MKDIR,$(dir $@))
- $(CC) $(CFLAGS) -c -o $@ $<
-
-$(BINDIR)/%$(EXTOBJ): $(TCF_AGENT_DIR)/%.c $(HFILES) Makefile
- @$(call MKDIR,$(dir $@))
- $(CC) $(CFLAGS) -c -o $@ $<
-
-clean:
- $(call RMDIR,$(BINDIR))
diff --git a/tests/test-dwarf/backend/backend.c b/tests/test-dwarf/backend/backend.c
deleted file mode 100644
index 946e66120..000000000
--- a/tests/test-dwarf/backend/backend.c
+++ /dev/null
@@ -1,565 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2011 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and Eclipse Distribution License v1.0 which accompany this distribution.
- * The Eclipse Public License is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * You may elect to redistribute this code under either of these licenses.
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-
-/* Fake debug context API implementation. It used for testing symbol services. */
-
-#include <config.h>
-
-#include <sys/stat.h>
-#include <assert.h>
-#include <stdio.h>
-#if !defined(WIN32) || defined(__CYGWIN__)
-# include <dirent.h>
-#endif
-
-#include <framework/context.h>
-#include <framework/events.h>
-#include <framework/myalloc.h>
-#include <framework/exceptions.h>
-
-#include <services/tcf_elf.h>
-#include <services/symbols.h>
-#include <services/linenumbers.h>
-#include <services/memorymap.h>
-#include <services/dwarfframe.h>
-
-#include <backend/backend.h>
-
-#ifndef S_ISDIR
-#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
-#endif
-
-static Context * elf_ctx = NULL;
-static MemoryMap mem_map;
-static RegisterDefinition reg_defs[MAX_REGS];
-static char reg_names[MAX_REGS][32];
-static uint8_t reg_vals[MAX_REGS * 8];
-static unsigned reg_size = 0;
-
-static uint8_t frame_data[0x1000];
-static ContextAddress frame_addr = 0x40000000u;
-
-static const char * elf_file_name = NULL;
-static int mem_region_pos = 0;
-static ContextAddress pc = 0;
-static unsigned pass_cnt = 0;
-static int test_posted = 0;
-static struct timespec time_start;
-
-static char ** files = NULL;
-static unsigned files_max = 0;
-static unsigned files_cnt = 0;
-
-RegisterDefinition * get_reg_definitions(Context * ctx) {
- return reg_defs;
-}
-
-RegisterDefinition * get_PC_definition(Context * ctx) {
- return reg_defs;
-}
-
-Context * id2ctx(const char * id) {
- if (id != NULL && strcmp(id, elf_ctx->id) == 0) return elf_ctx;
- return NULL;
-}
-
-unsigned context_word_size(Context * ctx) {
- return get_PC_definition(ctx)->size;
-}
-
-int context_has_state(Context * ctx) {
- return 1;
-}
-
-Context * context_get_group(Context * ctx, int group) {
- return ctx;
-}
-
-int context_read_reg(Context * ctx, RegisterDefinition * def, unsigned offs, unsigned size, void * buf) {
- if (ctx != elf_ctx) {
- errno = ERR_INV_CONTEXT;
- return -1;
- }
- memcpy(buf, reg_vals + def->offset + offs, size);
- return 0;
-}
-
-int context_write_reg(Context * ctx, RegisterDefinition * def, unsigned offs, unsigned size, void * buf) {
- if (ctx != elf_ctx) {
- errno = ERR_INV_CONTEXT;
- return -1;
- }
- memcpy(reg_vals + def->offset + offs, buf, size);
- return 0;
-}
-
-int context_read_mem(Context * ctx, ContextAddress address, void * buf, size_t size) {
- if (address >= frame_addr && address + size >= address && address + size <= frame_addr + sizeof(frame_data)) {
- memcpy(buf, frame_data + (address - frame_addr), size);
- return 0;
- }
- memset(buf, 0, size);
- return 0;
-}
-
-int context_write_mem(Context * ctx, ContextAddress address, void * buf, size_t size) {
- /* TODO: context_write_mem */
- errno = ERR_UNSUPPORTED;
- return -1;
-}
-
-int context_get_memory_map(Context * ctx, MemoryMap * map) {
- unsigned i;
- for (i = 0; i < mem_map.region_cnt; i++) {
- MemoryRegion * r = NULL;
- if (map->region_cnt >= map->region_max) {
- map->region_max += 8;
- map->regions = (MemoryRegion *)loc_realloc(map->regions, sizeof(MemoryRegion) * map->region_max);
- }
- r = map->regions + map->region_cnt++;
- *r = mem_map.regions[i];
- if (r->file_name) r->file_name = loc_strdup(r->file_name);
- if (r->sect_name) r->sect_name = loc_strdup(r->sect_name);
- }
- return 0;
-}
-
-int crawl_stack_frame(StackFrame * frame, StackFrame * down) {
- if (frame->is_top_frame) {
- frame->fp = frame_addr;
- return 0;
- }
- errno = ERR_INV_ADDRESS;
- return -1;
-}
-
-static void error(const char * func) {
- int err = errno;
- printf("File : %s\n", elf_file_name);
- printf("Address : 0x%" PRIX64 "\n", (uint64_t)pc);
- printf("Function: %s\n", func);
- printf("Error : %s\n", errno_to_str(err));
- fflush(stdout);
- exit(1);
-}
-
-static void line_numbers_callback(CodeArea * area, void * args) {
- CodeArea * dst = (CodeArea *)args;
- *dst = *area;
-}
-
-static void print_time(struct timespec time_start, int cnt) {
- struct timespec time_now;
- struct timespec time_diff;
- if (cnt == 0) return;
- clock_gettime(CLOCK_REALTIME, &time_now);
- time_diff.tv_sec = time_now.tv_sec - time_start.tv_sec;
- if (time_now.tv_nsec < time_start.tv_nsec) {
- time_diff.tv_sec--;
- time_diff.tv_nsec = time_now.tv_nsec + 1000000000 - time_start.tv_nsec;
- }
- else {
- time_diff.tv_nsec = time_now.tv_nsec - time_start.tv_nsec;
- }
- time_diff.tv_nsec /= cnt;
- time_diff.tv_nsec += (long)(((uint64_t)(time_diff.tv_sec % cnt) * 1000000000) / cnt);
- time_diff.tv_sec /= cnt;
- printf("search time: %ld.%06ld\n", (long)time_diff.tv_sec, time_diff.tv_nsec / 1000);
- fflush(stdout);
-}
-
-static void test(void * args);
-
-static void loc_var_func(void * args, Symbol * sym) {
- int frame = 0;
- Context * ctx = NULL;
- RegisterDefinition * reg = NULL;
- ContextAddress addr = 0;
- ContextAddress size = 0;
- SYM_FLAGS flags = 0;
- int symbol_class = 0;
- int type_class = 0;
- Symbol * type = NULL;
- Symbol * index_type = NULL;
- Symbol * base_type = NULL;
- ContextAddress length = 0;
- int64_t lower_bound = 0;
- void * value = NULL;
- size_t value_size = 0;
- int value_big_endian = 0;
-
- if (get_symbol_flags(sym, &flags) < 0) {
- error("get_symbol_flags");
- }
-
- if (get_symbol_address(sym, &addr) < 0) {
- int err = errno;
- if ((get_symbol_register(sym, &ctx, &frame, &reg) < 0 || reg == NULL) &&
- (get_symbol_value(sym, &value, &value_size, &value_big_endian) < 0 || value == NULL)) {
- if (strncmp(errno_to_str(err), "No object location info found", 29) == 0) return;
- if (strncmp(errno_to_str(err), "Object is not available", 23) == 0) return;
- if (strncmp(errno_to_str(err), "Object has no RT address", 24) == 0) return;
- errno = err;
- error("get_symbol_address");
- }
- }
- if (get_symbol_size(sym, &size) < 0) {
- error("get_symbol_size");
- }
- if (get_symbol_class(sym, &symbol_class) < 0) {
- error("get_symbol_class");
- }
- if (get_symbol_type(sym, &type) < 0) {
- error("get_symbol_type");
- }
- if (type != NULL) {
- if (get_symbol_type_class(sym, &type_class) < 0) {
- error("get_symbol_type_class");
- }
- if (get_symbol_flags(type, &flags) < 0) {
- error("get_symbol_flags");
- }
- if (type_class == TYPE_CLASS_ARRAY) {
- if (get_symbol_index_type(type, &index_type) < 0) {
- error("get_symbol_index_type");
- }
- if (get_symbol_base_type(type, &base_type) < 0) {
- error("get_symbol_base_type");
- }
- if (get_symbol_length(type, &length) < 0) {
- error("get_symbol_length");
- }
- if (get_symbol_lower_bound(type, &lower_bound) < 0) {
- error("get_symbol_lower_bound");
- }
- }
- else if (type_class == TYPE_CLASS_POINTER) {
- if (get_symbol_base_type(type, &base_type) < 0) {
- error("get_symbol_base_type");
- }
- }
- else if (type_class == TYPE_CLASS_ENUMERATION) {
- int i;
- int count = 0;
- Symbol ** children = NULL;
- if (get_symbol_children(type, &children, &count) < 0) {
- error("get_symbol_children");
- }
- for (i = 0; i < count; i++) {
- void * value = NULL;
- size_t value_size = 0;
- int big_endian = 0;
- if (get_symbol_value(children[i], &value, &value_size, &big_endian) < 0) {
- error("get_symbol_value");
- }
- }
- }
- }
-}
-
-static void next_pc(void) {
- Symbol * sym = NULL;
- CodeArea area;
- ContextAddress lt_addr;
- ELF_File * lt_file;
- ELF_Section * lt_sec;
- struct timespec time_now;
- Trap trap;
- int test_cnt = 0;
- int loaded = mem_region_pos < 0;
-
- for (;;) {
- if (mem_region_pos < 0) {
- mem_region_pos = 0;
- pc = mem_map.regions[mem_region_pos].addr;
- }
- else if (pc + 5 < mem_map.regions[mem_region_pos].addr + mem_map.regions[mem_region_pos].size) {
- pc += 5;
- }
- else if (mem_region_pos + 1 < (int)mem_map.region_cnt) {
- mem_region_pos++;
- pc = mem_map.regions[mem_region_pos].addr;
- }
- else {
- mem_region_pos++;
- pc = 0;
- print_time(time_start, test_cnt);
- return;
- }
-
- while ((mem_map.regions[mem_region_pos].flags & MM_FLAG_X) == 0) {
- if (mem_region_pos + 1 < (int)mem_map.region_cnt) {
- mem_region_pos++;
- pc = mem_map.regions[mem_region_pos].addr;
- }
- else {
- mem_region_pos++;
- pc = 0;
- print_time(time_start, test_cnt);
- return;
- }
- }
-
- set_regs_PC(elf_ctx, pc);
- send_context_changed_event(elf_ctx);
-
- if (find_symbol_by_addr(elf_ctx, STACK_NO_FRAME, pc, &sym) < 0) {
- if (get_error_code(errno) != ERR_SYM_NOT_FOUND) {
- error("find_symbol_by_addr");
- }
- }
- else {
- char * name = NULL;
- char name_buf[0x1000];
- if (get_symbol_name(sym, &name) < 0) {
- error("get_symbol_name");
- }
- if (name != NULL) {
- strcpy(name_buf, name);
- if (find_symbol_by_name(elf_ctx, STACK_TOP_FRAME, 0, name_buf, &sym) < 0) {
- if (get_error_code(errno) != ERR_SYM_NOT_FOUND) {
- error("find_symbol_by_name");
- }
- }
- else {
- if (get_symbol_name(sym, &name) < 0) {
- error("get_symbol_name");
- }
- if (strcmp(name_buf, name) != 0) {
- errno = ERR_OTHER;
- error("strcmp(name_buf, name)");
- }
- }
- }
- }
-
- if (find_symbol_by_name(elf_ctx, STACK_TOP_FRAME, 0, "@ non existing name @", &sym) < 0) {
- if (get_error_code(errno) != ERR_SYM_NOT_FOUND) {
- error("find_symbol_by_name");
- }
- }
-
- memset(&area, 0, sizeof(area));
- if (address_to_line(elf_ctx, pc, pc + 1, line_numbers_callback, &area) < 0) {
- error("address_to_line");
- }
- else if (area.start_line > 0) {
- char elf_file_name[0x1000];
- strlcpy(elf_file_name, area.file, sizeof(elf_file_name));
- if (line_to_address(elf_ctx, elf_file_name, area.start_line, area.start_column, line_numbers_callback, &area) < 0) {
- error("line_to_address");
- }
- }
-
- if (enumerate_symbols(elf_ctx, STACK_TOP_FRAME, loc_var_func, NULL) < 0) {
- error("enumerate_symbols");
- }
-
- lt_file = NULL;
- lt_sec = NULL;
- lt_addr = elf_map_to_link_time_address(elf_ctx, pc, &lt_file, &lt_sec);
- assert(lt_file != NULL);
- assert(pc == elf_map_to_run_time_address(elf_ctx, lt_file, lt_sec, lt_addr));
- if (set_trap(&trap)) {
- get_dwarf_stack_frame_info(elf_ctx, lt_file, lt_sec, lt_addr);
- clear_trap(&trap);
- }
- else {
- error("get_dwarf_stack_frame_info");
- }
-
- test_cnt++;
- if (loaded) {
- struct timespec time_diff;
- clock_gettime(CLOCK_REALTIME, &time_now);
- time_diff.tv_sec = time_now.tv_sec - time_start.tv_sec;
- if (time_now.tv_nsec < time_start.tv_nsec) {
- time_diff.tv_sec--;
- time_diff.tv_nsec = time_now.tv_nsec + 1000000000 - time_start.tv_nsec;
- }
- else {
- time_diff.tv_nsec = time_now.tv_nsec - time_start.tv_nsec;
- }
- printf("load time: %ld.%06ld\n", (long)time_diff.tv_sec, time_diff.tv_nsec / 1000);
- fflush(stdout);
- time_start = time_now;
- loaded = 0;
- }
- else if (test_cnt >= 100000) {
- print_time(time_start, test_cnt);
- clock_gettime(CLOCK_REALTIME, &time_start);
- test_posted = 1;
- post_event(test, NULL);
- return;
- }
- }
-}
-
-static void next_file(void) {
- unsigned j;
- ELF_File * f = NULL;
- struct stat st;
-
- if (pass_cnt == files_cnt) exit(0);
- elf_file_name = files[pass_cnt % files_cnt];
-
- printf("File: %s\n", elf_file_name);
- fflush(stdout);
- if (stat(elf_file_name, &st) < 0) {
- printf("Cannot stat ELF: %s\n", errno_to_str(errno));
- exit(1);
- }
-
- clock_gettime(CLOCK_REALTIME, &time_start);
-
- f = elf_open(elf_file_name);;
- if (f == NULL) {
- printf("Cannot open ELF: %s\n", errno_to_str(errno));
- exit(1);
- }
-
- if (elf_ctx == NULL) {
- elf_ctx = create_context("test");
- elf_ctx->stopped = 1;
- elf_ctx->pending_intercept = 1;
- elf_ctx->mem = elf_ctx;
- elf_ctx->big_endian = f->big_endian;
- list_add_first(&elf_ctx->ctxl, &context_root);
- elf_ctx->ref_count++;
- }
-
- context_clear_memory_map(&mem_map);
- for (j = 0; j < f->pheader_cnt; j++) {
- MemoryRegion * r = NULL;
- ELF_PHeader * p = f->pheaders + j;
- if (p->type != PT_LOAD) continue;
- if (mem_map.region_cnt >= mem_map.region_max) {
- mem_map.region_max += 8;
- mem_map.regions = (MemoryRegion *)loc_realloc(mem_map.regions, sizeof(MemoryRegion) * mem_map.region_max);
- }
- r = mem_map.regions + mem_map.region_cnt++;
- memset(r, 0, sizeof(MemoryRegion));
- r->addr = p->address;
- r->file_name = loc_strdup(elf_file_name);
- r->file_offs = p->offset;
- r->size = p->file_size;
- r->flags = MM_FLAG_R | MM_FLAG_W;
- if (p->flags & PF_X) r->flags |= MM_FLAG_X;
- r->dev = st.st_dev;
- r->ino = st.st_ino;
- }
- if (mem_map.region_cnt == 0) {
- for (j = 0; j < f->section_cnt; j++) {
- ELF_Section * sec = f->sections + j;
- if (sec->size == 0) continue;
- if (sec->name == NULL) continue;
- if (strcmp(sec->name, ".text") == 0 ||
- strcmp(sec->name, ".data") == 0 ||
- strcmp(sec->name, ".bss") == 0) {
- MemoryRegion * r = NULL;
- if (mem_map.region_cnt >= mem_map.region_max) {
- mem_map.region_max += 8;
- mem_map.regions = (MemoryRegion *)loc_realloc(mem_map.regions, sizeof(MemoryRegion) * mem_map.region_max);
- }
- r = mem_map.regions + mem_map.region_cnt++;
- memset(r, 0, sizeof(MemoryRegion));
- r->addr = sec->addr + 0x10000;
- r->size = sec->size;
- r->file_offs = sec->offset;
- r->bss = strcmp(sec->name, ".bss") == 0;
- r->dev = st.st_dev;
- r->ino = st.st_ino;
- r->file_name = loc_strdup(elf_file_name);
- r->sect_name = loc_strdup(sec->name);
- r->flags = MM_FLAG_R | MM_FLAG_W;
- if (strcmp(sec->name, ".text") == 0) r->flags |= MM_FLAG_X;
- }
- }
- }
- if (mem_map.region_cnt == 0) {
- printf("File has no program headers.\n");
- exit(1);
- }
- memory_map_event_module_loaded(elf_ctx);
- mem_region_pos = -1;
-
- reg_size = 0;
- memset(reg_defs, 0, sizeof(reg_defs));
- memset(reg_vals, 0, sizeof(reg_vals));
- for (j = 0; j < MAX_REGS - 1; j++) {
- RegisterDefinition * r = reg_defs + j;
- r->big_endian = f->big_endian;
- r->dwarf_id = j == 0 ? -1 : j - 1;
- r->eh_frame_id = -1;
- r->name = reg_names[j];
- snprintf(reg_names[j], sizeof(reg_names[j]), "R%d", j);
- r->offset = reg_size;
- r->size = f->elf64 ? 8 : 4;
- if (j == 0) r->role = "PC";
- reg_size += r->size;
- }
-
- pc = 0;
- pass_cnt++;
-
- test_posted = 1;
- post_event(test, NULL);
-}
-
-static void test(void * args) {
- assert(test_posted);
- test_posted = 0;
- if (elf_file_name == NULL || mem_region_pos >= (int)mem_map.region_cnt) {
- next_file();
- }
- else {
- next_pc();
- }
-}
-
-static void on_elf_file_closed(ELF_File * f) {
- if (!test_posted) {
- test_posted = 1;
- post_event(test, NULL);
- }
-}
-
-void init_contexts_sys_dep(void) {
- const char * dir_name = "files";
- DIR * dir = opendir(dir_name);
- if (dir == NULL) {
- printf("Cannot open '%s' directory\n", dir_name);
- fflush(stdout);
- exit(1);
- }
- for (;;) {
- struct dirent * e = readdir(dir);
- char path[FILE_PATH_SIZE];
- struct stat st;
- if (e == NULL) break;
- snprintf(path, sizeof(path), "%s/%s", dir_name, e->d_name);
- if (stat(path, &st) == 0 && !S_ISDIR(st.st_mode)) {
- if (files_cnt >= files_max) {
- files_max += 8;
- files = (char **)loc_realloc(files, files_max * sizeof(char *));
- }
- files[files_cnt++] = loc_strdup(path);
- }
- }
- closedir(dir);
- elf_add_close_listener(on_elf_file_closed);
- test_posted = 1;
- post_event(test, NULL);
-}
diff --git a/tests/test-dwarf/backend/backend.h b/tests/test-dwarf/backend/backend.h
deleted file mode 100644
index e590c3e2b..000000000
--- a/tests/test-dwarf/backend/backend.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2011 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and Eclipse Distribution License v1.0 which accompany this distribution.
- * The Eclipse Public License is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * You may elect to redistribute this code under either of these licenses.
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-
-/* Fake debug context API implementation. It used for testing symbol services. */
-
-#ifndef D_backend
-#define D_backend
-
-#include <config.h>
-#include <framework/channel.h>
-
-#define MAX_REGS 2000
-
-struct RegisterData {
- uint8_t data[MAX_REGS * 8];
- uint8_t mask[MAX_REGS * 8];
-};
-
-#endif /* D_backend */
diff --git a/tests/test-dwarf/config.h b/tests/test-dwarf/config.h
deleted file mode 100644
index 8ba440602..000000000
--- a/tests/test-dwarf/config.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2010 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and Eclipse Distribution License v1.0 which accompany this distribution.
- * The Eclipse Public License is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * You may elect to redistribute this code under either of these licenses.
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-
-/*
- * This file contains "define" statements that control agent configuration.
- * SERVICE_* definitions control which service implementations are included into the agent.
- */
-
-#ifndef D_config
-#define D_config
-
-#include <framework/mdep.h>
-
-#if !defined(SERVICE_Locator)
-#define SERVICE_Locator 1
-#endif
-#if !defined(SERVICE_Registers)
-#define SERVICE_Registers 1
-#endif
-#if !defined(SERVICE_Memory)
-#define SERVICE_Memory 1
-#endif
-#if !defined(SERVICE_LineNumbers)
-#define SERVICE_LineNumbers 1
-#endif
-#if !defined(SERVICE_Symbols)
-#define SERVICE_Symbols 1
-#endif
-#if !defined(SERVICE_Expressions)
-#define SERVICE_Expressions 1
-#endif
-#if !defined(SERVICE_MemoryMap)
-#define SERVICE_MemoryMap 1
-#endif
-#if !defined(SERVICE_StackTrace)
-#define SERVICE_StackTrace 1
-#endif
-
-#if !defined(ENABLE_ZeroCopy)
-#define ENABLE_ZeroCopy 1
-#endif
-
-#if !defined(ENABLE_Trace)
-# define ENABLE_Trace 1
-#endif
-
-#if !defined(ENABLE_Discovery)
-# define ENABLE_Discovery 0
-#endif
-
-#if !defined(ENABLE_ContextProxy)
-# define ENABLE_ContextProxy 1
-#endif
-
-#if !defined(ENABLE_SymbolsProxy)
-# define ENABLE_SymbolsProxy 0
-#endif
-
-#if !defined(ENABLE_LineNumbersProxy)
-# define ENABLE_LineNumbersProxy 0
-#endif
-
-#if !defined(ENABLE_Symbols)
-# define ENABLE_Symbols (ENABLE_SymbolsProxy || SERVICE_Symbols)
-#endif
-
-#if !defined(ENABLE_LineNumbers)
-# define ENABLE_LineNumbers (ENABLE_LineNumbersProxy || SERVICE_LineNumbers)
-#endif
-
-#if !defined(ENABLE_DebugContext)
-# define ENABLE_DebugContext 1
-#endif
-
-#if !defined(ENABLE_ELF)
-# define ENABLE_ELF 1
-#endif
-
-#define ENABLE_SSL 0
-#define ENABLE_Unix_Domain 0
-
-#if !defined(ENABLE_STREAM_MACROS)
-#define ENABLE_STREAM_MACROS 1
-#endif
-
-#endif /* D_config */
diff --git a/tests/test-dwarf/dwarf-test.sln b/tests/test-dwarf/dwarf-test.sln
deleted file mode 100644
index 5c46eb126..000000000
--- a/tests/test-dwarf/dwarf-test.sln
+++ /dev/null
@@ -1,20 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual C++ Express 2008
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dwarf-test", "dwarf-test.vcproj", "{D08FED31-38A6-4239-8D20-D4276FC2BAFA}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Win32 = Debug|Win32
- Release|Win32 = Release|Win32
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {D08FED31-38A6-4239-8D20-D4276FC2BAFA}.Debug|Win32.ActiveCfg = Debug|Win32
- {D08FED31-38A6-4239-8D20-D4276FC2BAFA}.Debug|Win32.Build.0 = Debug|Win32
- {D08FED31-38A6-4239-8D20-D4276FC2BAFA}.Release|Win32.ActiveCfg = Release|Win32
- {D08FED31-38A6-4239-8D20-D4276FC2BAFA}.Release|Win32.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/tests/test-dwarf/dwarf-test.vcproj b/tests/test-dwarf/dwarf-test.vcproj
deleted file mode 100644
index a15f1ca01..000000000
--- a/tests/test-dwarf/dwarf-test.vcproj
+++ /dev/null
@@ -1,692 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="dwarf-test"
- ProjectGUID="{D08FED31-38A6-4239-8D20-D4276FC2BAFA}"
- RootNamespace="symtest"
- Keyword="Win32Proj"
- TargetFrameworkVersion="196613"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)\obj\MSVC\$(ConfigurationName)"
- IntermediateDirectory="$(SolutionDir)\obj\MSVC\$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=".;C:\tcf\git\org.eclipse.tcf.agent"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="1"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="WS2_32.lib Iphlpapi.lib"
- LinkIncremental="2"
- GenerateManifest="false"
- GenerateDebugInformation="true"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionDir)\obj\MSVC\$(ConfigurationName)"
- IntermediateDirectory="$(SolutionDir)\obj\MSVC\$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="1"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- EnableIntrinsicFunctions="true"
- AdditionalIncludeDirectories=".;C:\tcf\git\org.eclipse.tcf.agent"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="WS2_32.lib Iphlpapi.lib"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="framework"
- >
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\asyncreq.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\asyncreq.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\base64.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\base64.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\cache.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\cache.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\channel.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\channel.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\channel_pipe.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\channel_pipe.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\channel_tcp.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\channel_tcp.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\context.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\context.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\cpudefs.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\cpudefs.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\errors.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\errors.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\events.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\events.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\exceptions.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\exceptions.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\inputbuf.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\inputbuf.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\ip_ifc.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\ip_ifc.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\json.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\json.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\link.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\mdep.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\mdep.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\myalloc.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\myalloc.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\outputbuf.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\outputbuf.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\peer.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\peer.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\plugins.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\plugins.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\protocol.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\protocol.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\proxy.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\proxy.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\signames.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\signames.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\streams.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\streams.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\tcf.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\trace.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\trace.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\waitpid.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\framework\waitpid.h"
- >
- </File>
- </Filter>
- <Filter
- Name="main"
- >
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\main\main.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\main\server.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\main\server.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\main\services-ext.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\main\services.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\main\services.h"
- >
- </File>
- </Filter>
- <Filter
- Name="services"
- >
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\breakpoints.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\breakpoints.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\diagnostics.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\diagnostics.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\discovery.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\discovery.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\discovery_udp.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\discovery_udp.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\dwarf.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\dwarfcache.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\dwarfcache.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\dwarfexpr.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\dwarfexpr.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\dwarfframe.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\dwarfframe.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\dwarfio.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\dwarfio.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\dwarfreloc.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\dwarfreloc.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\expressions.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\expressions.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\filesystem.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\filesystem.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\linenumbers.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\linenumbers.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\linenumbers_elf.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\linenumbers_proxy.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\linenumbers_win32.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\memorymap.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\memorymap.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\memoryservice.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\memoryservice.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\pathmap.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\pathmap.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\processes.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\processes.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\registers.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\registers.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\runctrl.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\runctrl.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\stacktrace.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\stacktrace.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\streamsservice.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\streamsservice.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\symbols.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\symbols.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\symbols_alloc.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\symbols_elf.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\symbols_proxy.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\symbols_win32.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\sysmon.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\sysmon.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\tcf_elf.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\tcf_elf.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\terminals.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\terminals.h"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\vm.c"
- >
- </File>
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\services\vm.h"
- >
- </File>
- </Filter>
- <Filter
- Name="machine"
- >
- <File
- RelativePath=".\machine\cpudefs-ext.h"
- >
- </File>
- <Filter
- Name="i386"
- >
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\machine\i386\elf-mdep.h"
- >
- </File>
- </Filter>
- </Filter>
- <Filter
- Name="backend"
- >
- <File
- RelativePath=".\backend\backend.c"
- >
- </File>
- <File
- RelativePath=".\backend\backend.h"
- >
- </File>
- </Filter>
- <Filter
- Name="system"
- >
- <File
- RelativePath="..\..\..\org.eclipse.tcf.agent\system\Windows\pthreads-win32.c"
- >
- </File>
- </Filter>
- <File
- RelativePath=".\config.h"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/tests/test-dwarf/machine/cpudefs-ext.h b/tests/test-dwarf/machine/cpudefs-ext.h
deleted file mode 100644
index 040dc0670..000000000
--- a/tests/test-dwarf/machine/cpudefs-ext.h
+++ /dev/null
@@ -1,114 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2011 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and Eclipse Distribution License v1.0 which accompany this distribution.
- * The Eclipse Public License is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- * You may elect to redistribute this code under either of these licenses.
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-
-#include <backend/backend.h>
-
-static RegisterDefinition * get_reg_by_dwarf_id(unsigned id) {
- static RegisterDefinition ** map = NULL;
- static unsigned map_length = 0;
-
- if (map == NULL) {
- RegisterDefinition * r;
- RegisterDefinition * regs_index = get_reg_definitions(NULL);
- for (r = regs_index; r->name != NULL; r++) {
- if (r->dwarf_id >= (int)map_length) map_length = r->dwarf_id + 1;
- }
- map = (RegisterDefinition **)loc_alloc_zero(sizeof(RegisterDefinition *) * map_length);
- for (r = regs_index; r->name != NULL; r++) {
- if (r->dwarf_id >= 0) map[r->dwarf_id] = r;
- }
- }
- return id < map_length ? map[id] : NULL;
-}
-
-static RegisterDefinition * get_reg_by_eh_frame_id(unsigned id) {
- static RegisterDefinition ** map = NULL;
- static unsigned map_length = 0;
-
- if (map == NULL) {
- RegisterDefinition * r;
- RegisterDefinition * regs_index = get_reg_definitions(NULL);
- for (r = regs_index; r->name != NULL; r++) {
- if (r->eh_frame_id >= (int)map_length) map_length = r->eh_frame_id + 1;
- }
- map = (RegisterDefinition **)loc_alloc_zero(sizeof(RegisterDefinition *) * map_length);
- for (r = regs_index; r->name != NULL; r++) {
- if (r->eh_frame_id >= 0) map[r->eh_frame_id] = r;
- }
- }
- return id < map_length ? map[id] : NULL;
-}
-
-RegisterDefinition * get_reg_by_id(Context * ctx, unsigned id, RegisterIdScope * scope) {
- RegisterDefinition * def = NULL;
- switch (scope->id_type) {
- case REGNUM_DWARF: def = get_reg_by_dwarf_id(id); break;
- case REGNUM_EH_FRAME: def = get_reg_by_eh_frame_id(id); break;
- }
- if (def == NULL) set_errno(ERR_OTHER, "Invalid register ID");
- return def;
-}
-
-int read_reg_bytes(StackFrame * frame, RegisterDefinition * reg_def, unsigned offs, unsigned size, uint8_t * buf) {
- if (reg_def != NULL && frame != NULL) {
- if (frame->is_top_frame) {
- return context_read_reg(frame->ctx, reg_def, offs, size, buf);
- }
- if (frame->regs != NULL) {
- size_t i;
- uint8_t * r_addr = (uint8_t *)&frame->regs->data + reg_def->offset;
- uint8_t * m_addr = (uint8_t *)&frame->regs->mask + reg_def->offset;
- for (i = 0; i < size; i++) {
- if (m_addr[offs + i] != 0xff) {
- errno = ERR_INV_CONTEXT;
- return -1;
- }
- }
- if (offs + size > reg_def->size) {
- errno = ERR_INV_DATA_SIZE;
- return -1;
- }
- memcpy(buf, r_addr + offs, size);
- return 0;
- }
- }
- errno = ERR_INV_CONTEXT;
- return -1;
-}
-
-int write_reg_bytes(StackFrame * frame, RegisterDefinition * reg_def, unsigned offs, unsigned size, uint8_t * buf) {
- if (reg_def != NULL && frame != NULL) {
- if (frame->is_top_frame) {
- return context_write_reg(frame->ctx, reg_def, offs, size, buf);
- }
- if (frame->regs == NULL && context_has_state(frame->ctx)) {
- frame->regs = (RegisterData *)loc_alloc_zero(sizeof(RegisterData));
- }
- if (frame->regs != NULL) {
- uint8_t * r_addr = (uint8_t *)&frame->regs->data + reg_def->offset;
- uint8_t * m_addr = (uint8_t *)&frame->regs->mask + reg_def->offset;
-
- if (offs + size > reg_def->size) {
- errno = ERR_INV_DATA_SIZE;
- return -1;
- }
- memcpy(r_addr + offs, buf, size);
- memset(m_addr + offs, 0xff, size);
- return 0;
- }
- }
- errno = ERR_INV_CONTEXT;
- return -1;
-}

Back to the top