Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/TCF Agent Porting Guide.html10
-rw-r--r--docs/TCF Context Identifier Explanation.html2
-rw-r--r--docs/TCF Getting Started.html12
-rw-r--r--docs/TCF Project.html128
-rw-r--r--docs/TCF Service - Breakpoints.html82
-rw-r--r--docs/TCF Service - File System.html166
-rw-r--r--docs/TCF Service - Memory.html172
-rw-r--r--docs/TCF Service - Processes.html170
-rw-r--r--docs/TCF Service - Registers.html154
-rw-r--r--docs/TCF Service - Run Control.html116
-rw-r--r--docs/TCF Service - Stack Trace.html62
-rw-r--r--docs/TCF Service - Streams.html78
-rw-r--r--docs/TCF Service - System Monitor.html290
-rw-r--r--docs/TCF Services.html28
-rw-r--r--docs/TCF Specification.html530
-rw-r--r--examples/org.eclipse.tm.tcf.examples.daytime/src/org/eclipse/tm/internal/tcf/examples/daytime/Activator.java10
-rw-r--r--examples/org.eclipse.tm.tcf.examples.daytime/src/org/eclipse/tm/internal/tcf/examples/daytime/DaytimeServiceProxy.java16
-rw-r--r--examples/org.eclipse.tm.tcf.examples.daytime/src/org/eclipse/tm/internal/tcf/examples/daytime/IDaytimeService.java16
-rw-r--r--plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/Activator.java10
-rw-r--r--plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/TCFLaunchContext.java14
-rw-r--r--plugins/org.eclipse.tm.tcf.core/activator/org/eclipse/tm/internal/tcf/Activator.java12
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/ChannelLoop.java10
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/LocalPeer.java12
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/RemotePeer.java18
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/ServiceManager.java18
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/Token.java12
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/TransportManager.java42
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/local/ChannelProxy.java28
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/local/DiagnosticsService.java16
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/local/LocatorService.java102
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/BreakpointsProxy.java10
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/DiagnosticsProxy.java22
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/ExpressionsProxy.java24
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/FileSystemProxy.java46
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/GenericProxy.java14
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/LineNumbersProxy.java10
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/LocatorProxy.java24
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/MemoryProxy.java28
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/ProcessesProxy.java22
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/RegistersProxy.java40
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/RunControlProxy.java14
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/StackTraceProxy.java10
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/StreamsProxy.java10
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/SymbolsProxy.java8
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/SysMonitorProxy.java12
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/AbstractChannel.java64
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/AbstractPeer.java22
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/Base64.java16
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/ChannelTCP.java10
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/Command.java42
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/ErrorReport.java16
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/ServerTCP.java30
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/StreamChannel.java18
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IChannel.java38
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IErrorReport.java38
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IEventQueue.java14
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/ILogger.java16
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IPeer.java14
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IService.java14
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IServiceProvider.java16
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IToken.java14
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/ITransportProvider.java16
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/JSON.java74
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/Protocol.java78
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IBreakpoints.java56
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IDiagnostics.java56
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IExpressions.java68
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IFileSystem.java166
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/ILineNumbers.java28
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/ILocator.java36
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IMemory.java48
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IProcesses.java92
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IRegisters.java108
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IRunControl.java108
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IStackTrace.java44
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IStreams.java26
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/ISymbols.java58
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/ISysMonitor.java168
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/util/TCFDataCache.java44
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/util/TCFFileInputStream.java32
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/util/TCFFileOutputStream.java20
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/util/TCFTask.java44
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/Activator.java14
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/ImageCache.java32
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/adapters/TCFLaunchAdapterFactory.java10
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/adapters/TCFLaunchLabelProvider.java10
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/adapters/TCFNodeAdapterFactory.java16
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/AbstractActionDelegate.java28
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/BreakpointCommand.java12
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/DisconnectCommand.java10
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/ResumeCommand.java10
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/SignalsCommand.java12
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/SignalsDialog.java58
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/StepCommand.java18
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/StepIntoCommand.java18
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/StepOverCommand.java20
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/StepReturnCommand.java16
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/SuspendCommand.java10
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/TerminateCommand.java10
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/ITCFLaunchContext.java36
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/PeerPropsDialog.java22
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFArgumentsTab.java16
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFLaunchContext.java18
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFLaunchShortcut.java22
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFMainTab.java30
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFPropertyTester.java12
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFTabGroup.java10
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFTargetTab.java82
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TestErrorsDialog.java28
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/AbstractRemoteShell.java12
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/IRemoteShell.java20
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/PeerPropsControl.java52
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/SSHClient.java20
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/SetupWizardDialog.java22
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/TelnetClient.java12
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/TelnetInputStream.java24
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/TimeOutInputStream.java12
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/WizardFirstPage.java18
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/WizardLocalPage.java10
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/WizardLogPage.java70
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/WizardLoginPage.java22
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/WizardPropsPage.java12
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFAnnotationManager.java116
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildren.java38
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenExecContext.java24
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenExpressions.java20
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenLocalVariables.java10
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenRegisters.java12
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenStackTrace.java20
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenSubExpressions.java18
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFColumnPresentationExpression.java16
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFColumnPresentationRegister.java18
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFDebugTask.java12
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFDetailPane.java20
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFDetailPaneFactory.java10
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFMemoryBlockRetrieval.java24
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModel.java128
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModelManager.java14
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModelPresentation.java18
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModelProxy.java20
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModelSelectionPolicy.java20
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNode.java46
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeArrayPartition.java26
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeExecContext.java42
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeExpression.java70
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeLaunch.java30
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeRegister.java24
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeStackFrame.java30
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNumberFormat.java24
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFRunnable.java12
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/trace/TraceView.java36
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/Activator.java16
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFAction.java16
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFActionStepInto.java12
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFActionStepOut.java12
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFActionStepOver.java16
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFLaunchDelegate.java16
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFLocalAgent.java28
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFSourceLookupDirector.java10
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFSourceLookupParticipant.java10
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFSourcePathComputerDelegate.java10
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFUserDefPeer.java6
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/ITCFBreakpointListener.java10
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/ITCFConstants.java10
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFBreakpoint.java20
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFBreakpointsModel.java42
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFBreakpointsStatus.java24
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFContextState.java12
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFError.java10
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFLaunch.java100
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFSourceRef.java12
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/ITCFTest.java14
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/Main.java30
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TCFTestSuite.java34
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestAttachTerminate.java28
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestEcho.java16
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestEchoFP.java8
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestExpressions.java22
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestFileSystem.java18
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestRCBP1.java58
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestStreams.java26
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestSysMonitor.java4
-rw-r--r--plugins/org.eclipse.tm.tcf.dsf.ui/src/org/eclipse/tm/internal/tcf/dsf/ui/Activator.java12
-rw-r--r--plugins/org.eclipse.tm.tcf.dsf.ui/src/org/eclipse/tm/internal/tcf/dsf/ui/AdapterFactory.java34
-rw-r--r--plugins/org.eclipse.tm.tcf.dsf.ui/src/org/eclipse/tm/internal/tcf/dsf/ui/actions/TcfTerminateCommand.java10
-rw-r--r--plugins/org.eclipse.tm.tcf.dsf.ui/src/org/eclipse/tm/internal/tcf/dsf/ui/launch/LaunchDialogTabGroup.java10
-rw-r--r--plugins/org.eclipse.tm.tcf.dsf.ui/src/org/eclipse/tm/internal/tcf/dsf/ui/viewmodel/ExecutableContextLayoutNode.java20
-rw-r--r--plugins/org.eclipse.tm.tcf.dsf.ui/src/org/eclipse/tm/internal/tcf/dsf/ui/viewmodel/LaunchVMProvider.java44
-rw-r--r--plugins/org.eclipse.tm.tcf.dsf.ui/src/org/eclipse/tm/internal/tcf/dsf/ui/viewmodel/RegisterVMProvider.java22
-rw-r--r--plugins/org.eclipse.tm.tcf.dsf.ui/src/org/eclipse/tm/internal/tcf/dsf/ui/viewmodel/ViewModelAdapter.java12
-rw-r--r--plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/Activator.java10
-rw-r--r--plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/launch/TCFDSFExecuter.java10
-rw-r--r--plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/launch/TCFDSFLaunch.java12
-rw-r--r--plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/launch/TCFDSFLaunchDelegate.java10
-rw-r--r--plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/launch/TCFDSFLaunchSequence.java10
-rw-r--r--plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/launch/TCFDSFShutdownSequence.java6
-rw-r--r--plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/launch/TCFDSFSourceLookupDirector.java10
-rw-r--r--plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/launch/TCFDSFSourceLookupParticipant.java10
-rw-r--r--plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/services/TCFAddress.java16
-rw-r--r--plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/services/TCFDSFBreakpoints.java46
-rw-r--r--plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/services/TCFDSFExecutionDMC.java30
-rw-r--r--plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/services/TCFDSFMemory.java24
-rw-r--r--plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/services/TCFDSFRegisters.java106
-rw-r--r--plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/services/TCFDSFRunControl.java58
-rw-r--r--plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/services/TCFDSFStack.java70
-rw-r--r--plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/ITCFSubSystem.java10
-rw-r--r--plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/Messages.java32
-rw-r--r--plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/TCFConnectorService.java10
-rw-r--r--plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/processes/TCFProcessAdapter.java12
-rw-r--r--plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/processes/TCFProcessResource.java16
-rw-r--r--plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/processes/TCFProcessService.java4
-rw-r--r--plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/processes/TCFSystemViewProcessAdapterFactory.java18
-rw-r--r--plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/processes/TCFSystemViewRemoteProcessAdapter.java6
-rw-r--r--plugins/org.eclipse.tm.tcf/src/org/eclipse/tm/tcf/ssl/TCFSecurityManager.java38
214 files changed, 3773 insertions, 3781 deletions
diff --git a/docs/TCF Agent Porting Guide.html b/docs/TCF Agent Porting Guide.html
index 57da3c6fd..216afa01a 100644
--- a/docs/TCF Agent Porting Guide.html
+++ b/docs/TCF Agent Porting Guide.html
@@ -61,7 +61,7 @@
Single threaded event driven design provides good level of concurrency (equivalent to cooperative multithreading), while greatly reduces need for synchronization -
each event dispatch cycle can be viewed as fully synchronized atomic operation.
</p>
-
+
<p>
Event driven code should avoid long running or potentially blocking operations in event handlers since they can stop all event processing for indefinite time.
Such operations should use asynchronous APIs (like POSIX Asynchronous I/O), or should be performed by background threads.
@@ -69,7 +69,7 @@
Background thread scope should be limited to a single module and it should not call agent public APIs.
Instead they should communicate with the rest of the code by posting events.
</p>
-
+
<p>
An event is essentially a function pointer (a call-back) that points to event handler, plus a data pointer.
Call-backs are also used throughout the agent code to subscribe listeners for various state change notifications.
@@ -91,7 +91,7 @@
Also, macro values can be overwritten by using -D option in C compiler command line.
Agent <a href='http://dev.eclipse.org/svnroot/dsdp/org.eclipse.tm.tcf/trunk/agent/Makefile'>Makefile</a> contains additional logic that makes it even more convenient to build different agent configurations.
</p>
-
+
<p>
It should be much easier to port the agent if you don't need all TCF services.
For example, for RSE integration you only need File System, System Monitor and Processes services,
@@ -130,7 +130,7 @@
When it is not possible or not feasible to use portable POSIX APIs, the agent code contains conditional compilation statements that
use well known macros like WIN32, __CYGWIN__, __MINGW32__, etc. Such places might require editing when porting to a new OS.
</p>
-
+
<h2>
<a name='NewCPU'>Porting TCF Agent to a New CPU Type</a>
</h2>
@@ -138,7 +138,7 @@
<p>
Searching TCF agent source code for __i386__ is a good way to find all places where the source code depends on CPU type.
</p>
-
+
<p>
There are several files in the code that might need changes in order to support a new CPU type:
</p>
diff --git a/docs/TCF Context Identifier Explanation.html b/docs/TCF Context Identifier Explanation.html
index 956c56cf2..fa76450ac 100644
--- a/docs/TCF Context Identifier Explanation.html
+++ b/docs/TCF Context Identifier Explanation.html
@@ -108,7 +108,7 @@ be relatively simple; the information is categorized as follows:</P>
<P CLASS="western">2. Slow changing properties per service, a.k.a.
properties</P>
<P CLASS="western">3. Fast changing properties per service, a.k.a.
-state or status
+state or status
</P>
<P CLASS="western">Category 1 provides a simple way to express
unbounded lists of related contextIds. If such a list becomes too
diff --git a/docs/TCF Getting Started.html b/docs/TCF Getting Started.html
index 6ed3b19a6..ba030da47 100644
--- a/docs/TCF Getting Started.html
+++ b/docs/TCF Getting Started.html
@@ -5,9 +5,9 @@
</head>
<body lang='EN-US'>
-
+
<h1>Target Communication Framework: Getting Started</h1>
-
+
<p>Copyright (c) 2007, 2008 Wind River Systems, Inc. Made available under the EPL v1.0
<p>Direct comments, questions to the <a href="mailto:dsdp-tcf-dev@eclipse.org">dsdp-tcf-dev@eclipse.org</a> mailing list
@@ -24,7 +24,7 @@
<h2><a name='Workspace'>Creating Eclipse Workspace</a></h2>
-<p>Eclipse can be used for developing clients for TCF in Java.
+<p>Eclipse can be used for developing clients for TCF in Java.
TCF host side code is organized into several Eclipse plug-in projects,
below are steps to create and populate Eclipse workspace with TCF projects:</p>
@@ -98,7 +98,7 @@ below are steps to create and populate Eclipse workspace with TCF projects:</p>
<dt><b>org.eclipse.tm.tcf</b>
<dd>This is the main TCF plugin. It contains Eclipse integration code for the framework.
It is the only TCF plugin, which (together with its fragments) should be required by a TCF client. The rest of TCF plugins are
- clients developed as a reference implementation or for demonstration purposes.
+ clients developed as a reference implementation or for demonstration purposes.
<p>
<dt><b>org.eclipse.tm.tcf.core</b>
<dd>This is a fragment of <b>org.eclipse.tm.tcf</b> plugin. It contains the framework itself and interfaces for standard services.
@@ -160,7 +160,7 @@ following changes in settings may be necessary:<ul>
add <tt>_CRT_SECURE_NO_DEPRECATE</tt></li>
<li>Project &gt; Properties &gt; Linker &gt; Input &gt; Additional Dependencies :
add <tt>shell32.lib</tt></li>
-</ul></li>
+</ul></li>
</ul></p>
<p>On <b>VxWorks</b>, line number mapping and the SysMonitor service (needed for RSE Processes
@@ -322,7 +322,7 @@ The integration has only been tested on Linux at this point.
<p><code>cd &lt;<i>luadir</i>&gt;
<br>curl -O http://www.lua.org/ftp/lua-5.1.4.tar.gz
-<br>tar zxf lua-5.1.4.tar.gz
+<br>tar zxf lua-5.1.4.tar.gz
<br>cd lua-5.1.4
<br>make linux
<br>make local
diff --git a/docs/TCF Project.html b/docs/TCF Project.html
index 3feb27f88..373ad50e6 100644
--- a/docs/TCF Project.html
+++ b/docs/TCF Project.html
@@ -12,9 +12,9 @@
<H2><A name='Index'></A>Index</H2>
<UL>
- <LI><A href="#Summary">Summary</A>
- <LI><A href="#Goals">Goals</A>
- <LI><A href="#Features">Features</A>
+ <LI><A href="#Summary">Summary</A>
+ <LI><A href="#Goals">Goals</A>
+ <LI><A href="#Features">Features</A>
<LI><A href="#Agent">Reference implementation of a target agent</A>
<LI><A href="#Debugger">Prototype of a debugger based on Eclipse Debug Framework and TCF</A>
<LI><A href="#RSE">Prototype of a system monitor and remote file access based on Remote System Explorer and TCF</A>
@@ -23,46 +23,46 @@
<P>
<H2><A name='Summary'></A>Summary </H2>
-<P>Today almost every device software development tool on the market has its own
-method of communication with target system. Communication methods often conflict
-with each other, require individual setup, configuration and maintenance, impose
-all kinds of unnecessary limitations. Target Communication Framework is designed
-to establish common ground in the area of communication protocols between
-development tools and embedded devices.
+<P>Today almost every device software development tool on the market has its own
+method of communication with target system. Communication methods often conflict
+with each other, require individual setup, configuration and maintenance, impose
+all kinds of unnecessary limitations. Target Communication Framework is designed
+to establish common ground in the area of communication protocols between
+development tools and embedded devices.
<P>
<H2><A name='Goals'></A>Goals </H2>
<P>
<UL>
- <LI>Universal, extensible, simple, lightweight, vendor agnostic framework for
- tools and targets to communicate for purpose of debugging, profiling, code
- patching and other device software development needs.
- <LI>Single configuration per target (not per tool per target as today in most
- cases), or no configuration when possible.
+ <LI>Universal, extensible, simple, lightweight, vendor agnostic framework for
+ tools and targets to communicate for purpose of debugging, profiling, code
+ patching and other device software development needs.
+ <LI>Single configuration per target (not per tool per target as today in most
+ cases), or no configuration when possible.
<LI>Small overhead and footprint on target side. </LI></UL>
<P>
<H2><A name='Features'></A>Features </H2>
-<P><A href="TCF Specification.html">Target Communication Framework Specification</A> is a document
-describing design goals, requirements and format of TCF communication protocol,
-as well as framework API and software design considerations.
-<P>TCF communication model is based on the idea of services. A service is a group
-of related commands, events and semantics. A service can be discovered,
-added or removed as a group at communication endpoint. Service definitions are
-not part of the framework specification, and new services are expected to be
-defined by developers of tools and target agents. However, standardization of
-common services is needed to achieve certain level of compatibility of
+<P><A href="TCF Specification.html">Target Communication Framework Specification</A> is a document
+describing design goals, requirements and format of TCF communication protocol,
+as well as framework API and software design considerations.
+<P>TCF communication model is based on the idea of services. A service is a group
+of related commands, events and semantics. A service can be discovered,
+added or removed as a group at communication endpoint. Service definitions are
+not part of the framework specification, and new services are expected to be
+defined by developers of tools and target agents. However, standardization of
+common services is needed to achieve certain level of compatibility of
tools/targets, see <A href="TCF Services.html">TCF Services Specification</A>
-as starting point of this work.
+as starting point of this work.
<H2><A name='Agent'></A>Reference implementation of a target agent</H2>
-<P>Current reference implementation of TCF target agents is fully functional,
-can run on Windows, Linux and VxWorks. On Linux it is implemented
-using PTRACE, on VxWorks is uses vxdbgLib, on Windows it uses Debug API and dbghelp.dll.
-The agent provides the following services:
+<P>Current reference implementation of TCF target agents is fully functional,
+can run on Windows, Linux and VxWorks. On Linux it is implemented
+using PTRACE, on VxWorks is uses vxdbgLib, on Windows it uses Debug API and dbghelp.dll.
+The agent provides the following services:
<UL>
- <LI>Run Control - provides threads and processes run control functionality
+ <LI>Run Control - provides threads and processes run control functionality
sufficient for debugging of user space programs.
<LI>Breakpoints - provides basic breakpoints support.
@@ -72,7 +72,7 @@ The agent provides the following services:
<LI>Memory - program memory access.
- <LI>Processes - provides access to the target OS's process
+ <LI>Processes - provides access to the target OS's process
information, allows starting new and terminating existing processes,
and allows attaching and detaching processes for debugging.
@@ -80,56 +80,56 @@ The agent provides the following services:
and corresponding machine instruction addresses in the executable object.
Implemented for Linux and Windows, not supported on VxWorks.
- <LI>Sys Monitor - provides list of processes, process attributes and
- CPU/memory utilization data. On Linux it is implemented using /proc file
- system, on Windows and VxWorks it is not currently supported.
+ <LI>Sys Monitor - provides list of processes, process attributes and
+ CPU/memory utilization data. On Linux it is implemented using /proc file
+ system, on Windows and VxWorks it is not currently supported.
<LI>File System - provides access to remote file system.
-
+
<LI>Streams - a generic service to support streaming of data between host and target.
- <LI>Diagnostics - allows testing of communication channel and agent
+ <LI>Diagnostics - allows testing of communication channel and agent
functionality.
</UL>
-<P>The agent code is designed to be easily extensible by adding new command
-handler implementations. The code separates machine dependences, common TCF
-logic and service implementations, which allows easy porting to a new OS or a
-target and reconfiguring of the agent for specific needs. The code is written in
+<P>The agent code is designed to be easily extensible by adding new command
+handler implementations. The code separates machine dependences, common TCF
+logic and service implementations, which allows easy porting to a new OS or a
+target and reconfiguring of the agent for specific needs. The code is written in
ANSI C. See <A href="TCF Linux Agent Prototype.html">TCF Linux Agent Prototype</A>
-for more details about the agent code.
+for more details about the agent code.
<H2><A name='Debugger'></A>Prototype of a debugger based on Eclipse Debug Framework and TCF</H2>
-<P>The prototype code connects Eclipse Debug Framework and Target Communication
-Framework. It allows to launch Eclipse debug session by connecting to a target
-running TCF agent, and then perform basic debugging tasks, like resuming,
+<P>The prototype code connects Eclipse Debug Framework and Target Communication
+Framework. It allows to launch Eclipse debug session by connecting to a target
+running TCF agent, and then perform basic debugging tasks, like resuming,
suspending, single-stepping, setting/removing breakpoints, etc.
-<P>The prototype launch configuration autodetects TCF targets on a local network
-and allows a user to connect to a target by simply selecting it from a list
-without a need for any further configuration or setup. TCF launch configuration
-dialog also offers controls to run a built-in diagnostics on a selecting target,
-which perform stress testing of communication channel, agent and target itself:
-<P><IMG alt="TCF launch configuration dialog" src="TCF_Launch_Dialog.jpg">
-
-<P>The prototype makes use of flexible debug model element hierarchy support,
-which is available in Eclipse debug framework since Eclipse 3.2. The flexible
-hierarchy allows debugger views to be "data driven" or, in other words, dynamically
-adapt to a given targets capabilities and structure, without a need to modify
+<P>The prototype launch configuration autodetects TCF targets on a local network
+and allows a user to connect to a target by simply selecting it from a list
+without a need for any further configuration or setup. TCF launch configuration
+dialog also offers controls to run a built-in diagnostics on a selecting target,
+which perform stress testing of communication channel, agent and target itself:
+<P><IMG alt="TCF launch configuration dialog" src="TCF_Launch_Dialog.jpg">
+
+<P>The prototype makes use of flexible debug model element hierarchy support,
+which is available in Eclipse debug framework since Eclipse 3.2. The flexible
+hierarchy allows debugger views to be "data driven" or, in other words, dynamically
+adapt to a given targets capabilities and structure, without a need to modify
debugger code to support a new target.
-
+
<H2><A name='RSE'></A>Prototype of a system monitor and remote file access based on Remote System Explorer and TCF</H2>
-<P>Remote System Explorer is an Eclipse based component that allows users to
-create connections to remote machines and explore their file systems, see list
-of processes and access some other resources, like remote shells. Remote System
-Explorer has been designed as a flexible, extensible framework to which Eclipse
-plug-in developers can contribute their own system definitions, actions, etc.
-<P>The prototype enables use of Processes and Files subsystems of Remote System
-Explorer over TCF. It also extends Processes subsystem to include CPU
+<P>Remote System Explorer is an Eclipse based component that allows users to
+create connections to remote machines and explore their file systems, see list
+of processes and access some other resources, like remote shells. Remote System
+Explorer has been designed as a flexible, extensible framework to which Eclipse
+plug-in developers can contribute their own system definitions, actions, etc.
+<P>The prototype enables use of Processes and Files subsystems of Remote System
+Explorer over TCF. It also extends Processes subsystem to include CPU
utilization data and some other process attributes in RSE views:
-<P><IMG alt="Remote System Explorer: Files subsystem over TCF" src="TCF_RSE_Files.jpg">
-<P><IMG alt="Remote System Explorer: Processes subsystem over TCF" src="TCF_RSE_Processes.jpg">
+<P><IMG alt="Remote System Explorer: Files subsystem over TCF" src="TCF_RSE_Files.jpg">
+<P><IMG alt="Remote System Explorer: Processes subsystem over TCF" src="TCF_RSE_Processes.jpg">
</BODY>
</HTML> \ No newline at end of file
diff --git a/docs/TCF Service - Breakpoints.html b/docs/TCF Service - Breakpoints.html
index d58617ff7..0bf6ce047 100644
--- a/docs/TCF Service - Breakpoints.html
+++ b/docs/TCF Service - Breakpoints.html
@@ -5,9 +5,9 @@
</head>
<body lang='EN-US'>
-
+
<h1>Target Communication Framework Services - Breakpoints</h1>
-
+
<ul>
<li><a href='#VersionHistory'>Version History</a>
<li><a href='#Overview'>Overview</a>
@@ -55,16 +55,16 @@
<p>A breakpoint is represented by a unique identifier and set of properties.
A breakpoint identifier (String id) needs to be unique across all hosts and targets.</p>
-
+
<p>A breakpoint's property set is an extensible collection of named attributes,
-which define the breakpoint's location, the conditions that trigger the breakpoint, and the actions
+which define the breakpoint's location, the conditions that trigger the breakpoint, and the actions
executed as a result. As such, breakpoint properties are separated into three broad categories:
<ul><b>
<li>Location properties
<li>Condition properties
<li>Action properties
</b></ul>
-<p>The Location and Condition properties dictate how a breakpoint is installed and whether it should be triggered.
+<p>The Location and Condition properties dictate how a breakpoint is installed and whether it should be triggered.
The Action properties dictate the effect of the breakpoint if it is triggered.
<p>The split of Location and Condition properties is subjective and is
@@ -83,19 +83,19 @@ change in any of the attached contexts. Adding properties reduces the
(sub)set of state changes that triggers the breakpoint.
<p>The <b>Location properties category</b> contains the following properties:
-<p>Context defining properties specifying which context a breakpoint applies to are provided through the <a href='#propContextIds'>ContextIds</a>,
-<a href='#propContextNames'>ContextNames </a> or the <a href='#propExecPaths'>ExecutablePaths</a> properties.
+<p>Context defining properties specifying which context a breakpoint applies to are provided through the <a href='#propContextIds'>ContextIds</a>,
+<a href='#propContextNames'>ContextNames </a> or the <a href='#propExecPaths'>ExecutablePaths</a> properties.
<p>The presence of certain properties defines what kind of breakpoint is installed.
<ul>
-<li>Line Breakpoints, which are configured using the <a href='#propFile'>File</a>,
+<li>Line Breakpoints, which are configured using the <a href='#propFile'>File</a>,
<a href='#propLine'>Line</a> and <a href='#propColumn'>Column</a> properties
-<li>Address breakpoints and watchpoints are configured using the <a href='#propLocation'>Location</a>,
-<a href='#propAccessMode'>AccessMode</a>, <a href='#propSize'>Size</a>,
+<li>Address breakpoints and watchpoints are configured using the <a href='#propLocation'>Location</a>,
+<a href='#propAccessMode'>AccessMode</a>, <a href='#propSize'>Size</a>,
<a href='#propMaskValue'>MaskValue </a>and <a href='#propMask'>Mask</a> properties.
-<li>Temporal breakpoints which are located on a time scale are configured using the <a href='#propTime'>Time</a>,
+<li>Temporal breakpoints which are located on a time scale are configured using the <a href='#propTime'>Time</a>,
<a href='#propTimeScale'>TimeScale</a>, and <a href='#propTimeUnits'> TimeUnits</a> properties.
</ul>
@@ -112,14 +112,14 @@ like actual addresses where breakpoint is installed or installation errors.
<p>Every breakpoint is associated with a communication channel and when the channel is closed
the target agent removes all corresponding breakpoints.
-Target agent should maintain separate breakpoint tables for each communication channel.
+Target agent should maintain separate breakpoint tables for each communication channel.
It is allowed to set the same breakpoint (same ID) through multiple
channels, target agent should treat it as single breakpoint with multiple references. Such a breakpoint
is removed when all referring channels are closed.
<p>The service uses standard format for error reports,
see <a href='TCF Services.html#ErrorFormat'>Error Report Format</a>.</p>
-
+
<h2><a name='Cmds'>Commands</a></h2>
<h3><a name='CmdSet'>Set</a></h3>
@@ -141,8 +141,8 @@ C &bull; <i>&lt;token&gt;</i> &bull; Breakpoints &bull; set &bull; <i>&lt;array
</font></b></pre>
<p> The command downloads breakpoint data to a target agent.
-The command is intended to be used only to initialize the target's breakpoint table
-when communication channel is open. After that, host should
+The command is intended to be used only to initialize the target's breakpoint table
+when communication channel is open. After that, host should
notify the target about (incremental) changes in breakpoints data by sending
Add, Change and Remove commands.<p>
@@ -157,7 +157,7 @@ A breakpoint service implementation may not change the properties set by the cli
<dd>Breakpoint ID. This is the only required property.
<li><dt><code><b><font face="Courier New" size=2 color=#333399><a name='propeEnabled'>"Enabled"</a> : <i>&lt;boolean&gt;</i></font></b></code>
- <dd>If true, the breakpoint is enabled.
+ <dd>If true, the breakpoint is enabled.
<li><dt><code><b><font face="Courier New" size=2 color=#333399><a name='propType'>"Type"</a> : <i>&lt;string&gt;</i></font></b></code>
<dd>The breakpoint type
@@ -177,10 +177,10 @@ A breakpoint service implementation may not change the properties set by the cli
<dd>This property contains an array of contexts names (such as a process/thread name) for which this breakpoint should be installed.
<li><dt><code><b><font face="Courier New" size=2 color=#333399><a name='propExecPaths'>"ExecutablePaths"</a> : <i>&lt;string&gt;</i></font></b></code>
- <dd>This property contains all the target executable paths for which this breakpoint should be installed.
+ <dd>This property contains all the target executable paths for which this breakpoint should be installed.
<li><dt><code><b><font face="Courier New" size=2 color=#333399><a name='propLocation'> "Location" </a> : <i>&lt;string&gt;</i></font></b></code>
- <dd>If preset, defines location of the breakpoint. The expression evaluates either to a memory address
+ <dd>If preset, defines location of the breakpoint. The expression evaluates either to a memory address
or a register location.
<li><dt><code><b><font face="Courier New" size=2 color=#333399><a name='propAccessMode'>"AccessMode"</a> : <i>&lt;int&gt;</i></font></b></code>
@@ -195,7 +195,7 @@ A breakpoint service implementation may not change the properties set by the cli
</dl>
<li><dt><code><b><font face="Courier New" size=2 color=#333399><a name='propSize'>"Size"</a> : <i>&lt;int&gt;</i></font></b></code>
<dd>The number of bytes starting at the location expression to which the AccessMode triggers applies
-
+
<li><dt><code><b><font face="Courier New" size=2 color=#333399><a name='propFile'>"File"</a> : <i>&lt;string&gt;</i></font></b></code>
<dd>Source code file name of breakpoint location.
<li><dt><code><b><font face="Courier New" size=2 color=#333399><a name='propLine'>"Line"</a> : <i>&lt;int&gt;</i></font></b></code>
@@ -204,7 +204,7 @@ A breakpoint service implementation may not change the properties set by the cli
<dd>Source code column number of breakpoint location.
<li><dt><code><b><font face="Courier New" size=2 color=#333399><a name='propMaskValue'>"MaskValue"</a> : <i>&lt;int&gt;</i></font></b></code>
- <dd>A breakpoint can be qualified with a mask value which may be further refined with a mask.
+ <dd>A breakpoint can be qualified with a mask value which may be further refined with a mask.
<li><dt><code><b><font face="Courier New" size=2 color=#333399><a name='propMask'>"Mask"</a> : <i>&lt;int&gt;</i></font></b></code>
<dd>A mask which is bitwise ANDed with the value accessed.
@@ -234,7 +234,7 @@ A breakpoint service implementation may not change the properties set by the cli
<li><dt><code><b><font face="Courier New" size=2 color=#333399><a name='propIgnoreCount'>"IgnoreCount"</a>: <i>&lt;int&gt;</i></font></b></code>
<dd>The number of times this breakpoint is to be ignored before it is triggered. The ignore count is tested after all other Location and Condition properties are validated.
-
+
<li><dt><code><b><font face="Courier New" size=2 color=#333399><a name = 'propStopGroup'>"StopGroup"</a> : <i>&lt;string&gt;</i></font></b></code>
<dd>An array of TCF Context identifiers representing contexts to be stopped when this breakpoint is triggered.
This is an "Action" property that is used to stop contexts in addition to the one that triggered the breakpoint.
@@ -427,8 +427,8 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;b
</font></b></pre>
<p>Breakpoint status consists of a list of status properties. All properties are optional.
-Tools and targets can define additional properties.
-Setting any properties that are not supported by or unknown to the service implementation will yield an error,
+Tools and targets can define additional properties.
+Setting any properties that are not supported by or unknown to the service implementation will yield an error,
which is reported in the Error property of the breakpoint status object.</p>
<p>Predefined properties are:</p>
@@ -455,7 +455,7 @@ in a list of instance status data objects
<i>&lt;Instance status data list&gt;</i>
&rArr; <i>&lt;Instance status data&gt;</i>
&rArr; <i>&lt;Instance staus data list&gt;</i>, <i>&lt;Instance status data&gt;</i>
-
+
<i>&lt;Instance status data&gt;</i>
&rArr; <i>&lt;object&gt;</i>
</font></b></pre>
@@ -534,16 +534,16 @@ E &bull; Breakpoints &bull; contextRemoved &bull; <i>&lt;array of breakpoint IDs
</dl>
<h2><a name='API'>API</a></h2>
-
+
<pre>
<font color=#3F5FBF>/**
* Breakpoint is represented by unique identifier and set of properties.
* Breakpoint identifier (String id) needs to be unique across all hosts and targets.
- *
+ *
* Breakpoint properties (Map&lt;String,Object>) is extensible collection of named attributes,
* which define breakpoint location and behavior. This module defines some common
* attribute names (see PROP_*), host tools and target agents may support additional attributes.
- *
+ *
* For each breakpoint a target agent maintains another extensible collection of named attributes:
* breakpoint status (Map&lt;String,Object>, see STATUS_*). While breakpoint properties are
* persistent and represent user input, breakpoint status reflects dynamic target agent reports
@@ -583,31 +583,31 @@ E &bull; Breakpoints &bull; contextRemoved &bull; <i>&lt;array of breakpoint IDs
PROP_TEMPORARY = "Temporary"; // Boolean
<font color=#3F5FBF>/**
- * BreakpointType values
+ * BreakpointType values
*/</font>
<font color=#7F0055>static final</font> String
TYPE_RELATIVE = "Software",
TYPE_ABSOLUTE = "Hardware",
TYPE_AUTO = "Auto";
- <font color=#3F5FBF>/**
- * AccessMode values
+ <font color=#3F5FBF>/**
+ * AccessMode values
*/ </font>
- <font color=#7F0055>static final</font> int
+ <font color=#7F0055>static final</font> int
ACCESSMODE_READ = 0x01,
- ACCESSMODE_WRITE = 0x02,
+ ACCESSMODE_WRITE = 0x02,
ACCESSMODE_EXECUTE = 0x04,
ACCESSMODE_CHANGE = 0x08;
<font color=#3F5FBF>/**
- * TimeScale values
+ * TimeScale values
*/</font>
- <font color=#7F0055>static final</font> String
+ <font color=#7F0055>static final</font> String
TIMESCALE_RELATIVE = "Relative",
TIMESCALE_ABSOLUTE = "Absolute";
-
+
<font color=#3F5FBF>/**
- * TimeUnits values
+ * TimeUnits values
*/</font>
<font color=#7F0055>static final</font> String
TIMEUNIT_NSECS = "Nanoseconds",
@@ -623,7 +623,7 @@ E &bull; Breakpoints &bull; contextRemoved &bull; <i>&lt;array of breakpoint IDs
STATUS_FILE = "File", // String
STATUS_LINE = "Line", // Number
STATUS_COLUMN = "Column"; // Number
-
+
<font color=#3F5FBF>/**
* Breakpoint service capabilities.
*/</font>
@@ -643,11 +643,11 @@ E &bull; Breakpoints &bull; contextRemoved &bull; <i>&lt;array of breakpoint IDs
<font color=#3F5FBF>/**
* Download breakpoints data to target agent.
- * The command is intended to be used only to initialize target breakpoints table
- * when communication channel is open. After that, host should
+ * The command is intended to be used only to initialize target breakpoints table
+ * when communication channel is open. After that, host should
* notify target about (incremental) changes in breakpoint data by sending
* add, change and remove commands.
- *
+ *
* @param properties - array of breakpoints.
* @param done - command result call back object.
*/</font>
@@ -687,7 +687,7 @@ E &bull; Breakpoints &bull; contextRemoved &bull; <i>&lt;array of breakpoint IDs
* @param done - command result call back object.
*/</font>
IToken remove(String[] ids, DoneCommand done);
-
+
<font color=#3F5FBF>/**
* Upload IDs of breakpoints known to target agent.
* @param done - command result call back object.
diff --git a/docs/TCF Service - File System.html b/docs/TCF Service - File System.html
index 51666f56e..cd467db8e 100644
--- a/docs/TCF Service - File System.html
+++ b/docs/TCF Service - File System.html
@@ -5,9 +5,9 @@
</head>
<body lang='EN-US'>
-
+
<h1>Target Communication Framework Services - File System</h1>
-
+
<ul>
<li><a href='#VersionHistory'>Version History</a>
<li><a href='#Overview'>Overview</a>
@@ -63,7 +63,7 @@
<p>File System service provides file transfer (and more generally file
system access) functionality in TCF. The service design is
derived from SSH File Transfer Protocol specifications.</p>
-
+
<h2><a name='ReqSync'>Request Synchronization and Reordering</a></h2>
<p>The protocol and implementations MUST process requests relating to
@@ -142,7 +142,7 @@ using a slash ('/') as the separator, and that will work as expected.</p>
<dd>Forces an existing file with the same name to be truncated to zero
length when creating a file by specifying TCF_O_CREAT.
TCF_O_CREAT MUST also be specified if this flag is used.
-
+
<dt><code>TCF_O_EXCL = 0x00000020</code>
<dd>Causes the request to fail if the named file already exists.
TCF_O_CREAT MUST also be specified if this flag is used.
@@ -403,7 +403,7 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;array of directory entries&gt;</i> &
&rArr; null
&rArr; [ ]
&rArr; [ <i>&lt;directory entry list&gt;</i> ]
-
+
<i>&lt;directory entry list&gt;</i>
&rArr; <i>&lt;directory entry&gt;</i>
&rArr; <i>&ltdirectory entry list&gt;</i> , <i>&lt;directory entry&gt;</i>
@@ -468,7 +468,7 @@ C &bull; <i>&lt;token&gt;</i> &bull; FileSystem &bull; roots &bull;
UNIX file system can report just one root with path "/". Other types of systems
can have more the one root. For example, Windows server can return multiple roots:
one per disc (e.g. "/C:/", "/D:/", etc.). Note: even Windows implementation of
-the service must use forward slash as directory separator, and must start
+the service must use forward slash as directory separator, and must start
absolute path with "/". Server should implement proper translation of
protocol file names to OS native names and back.</p>
@@ -583,7 +583,7 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull;
C &bull; <i>&lt;token&gt;</i> &bull; FileSystem &bull; user &bull;
</font></b></pre>
-<p>The command retrieves information about user account, which is used by server
+<p>The command retrieves information about user account, which is used by server
to access file system on behalf of the client.</p>
<p>Reply:</p>
@@ -594,7 +594,7 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;int: real UID&gt;</i> &bull; <i>&lt;
</font></b></pre>
<h2><a name='API'>API</a></h2>
-
+
<pre>
<font color=#3F5FBF>/**
* File System service provides file transfer (and more generally file
@@ -602,7 +602,7 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;int: real UID&gt;</i> &bull; <i>&lt;
* derived from SSH File Transfer Protocol specifications.
*/</font>
<font color=#7F0055>public interface</font> IFileSystem <font color=#7F0055>extends</font> IService {
-
+
<font color=#3F5FBF>/**
* Service name.
*/</font>
@@ -612,7 +612,7 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;int: real UID&gt;</i> &bull; <i>&lt;
* Flags to be used with open() method.
*/</font>
<font color=#7F0055>static final int</font>
-
+
<font color=#3F5FBF>/**
* Open the file for reading.
*/</font>
@@ -627,7 +627,7 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;int: real UID&gt;</i> &bull; <i>&lt;
<font color=#3F5FBF>/**
* Force all writes to append data at the end of the file.
*/</font>
- TCF_O_APPEND = 0x00000004,
+ TCF_O_APPEND = 0x00000004,
<font color=#3F5FBF>/**
* If this flag is specified, then a new file will be created if one
@@ -672,30 +672,30 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;int: real UID&gt;</i> &bull; <i>&lt;
* server normally returns all attributes it knows about.
*/</font>
<font color=#7F0055>final static class</font> FileAttrs {
-
+
<font color=#3F5FBF>/**
* The `flags' specify which of the fields are present.
*/</font>
<font color=#7F0055>public final int</font> flags;
-
+
<font color=#3F5FBF>/**
* The `size' field specifies the size of the file in bytes.
*/</font>
<font color=#7F0055>public final long</font> size;
-
+
<font color=#3F5FBF>/**
* The `uid' and `gid' fields contain numeric Unix-like user and group
* identifiers, respectively.
*/</font>
<font color=#7F0055>public final int</font> uid;
<font color=#7F0055>public final int</font> gid;
-
+
<font color=#3F5FBF>/**
* The `permissions' field contains a bit mask of file permissions as
* defined by posix [1].
*/</font>
<font color=#7F0055>public final int</font> permissions;
-
+
<font color=#3F5FBF>/**
* The `atime' and `mtime' contain the access and modification times of
* the files, respectively. They are represented as milliseconds from
@@ -708,13 +708,13 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;int: real UID&gt;</i> &bull; <i>&lt;
* Additional (non-standard) attributes.
*/</font>
<font color=#7F0055>public final</font> Map&lt;String,Object&gt; attributes;
-
+
<font color=#7F0055>public</font> FileAttrs(<font color=#7F0055>int</font> flags, <font color=#7F0055>long</font> size, <font color=#7F0055>int</font> uid, <font color=#7F0055>int</font> gid,
<font color=#7F0055>int</font> permissions, <font color=#7F0055>long</font> atime, <font color=#7F0055>long</font> mtime, Map&lt;String,Object&gt; attributes);
-
+
<font color=#3F5FBF>/**
* Determines if the file system object is a file on the remote file system.
- *
+ *
* @return true if and only if the object on the remote system can be considered to have "contents" that
* have the potential to be read and written as a byte stream.
*/</font>
@@ -722,13 +722,13 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;int: real UID&gt;</i> &bull; <i>&lt;
<font color=#3F5FBF>/**
* Determines if the file system object is a directory on the remote file system.
- *
+ *
* @return true if and only if the object on the remote system is a directory.
* That is, it contains entries that can be interpreted as other files.
*/</font>
<font color=#7F0055>public boolean</font> isDirectory();
}
-
+
<font color=#3F5FBF>/**
* The following flags are defined for the 'permissions' field:
*/</font>
@@ -756,14 +756,14 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;int: real UID&gt;</i> &bull; <i>&lt;
S_IROTH = 00004, // others have read permission
S_IWOTH = 00002, // others have write permisson
S_IXOTH = 00001; // others have execute permission
-
+
<font color=#7F0055>final static class</font> DirEntry {
<font color=#3F5FBF>/**
* `filename' is a file name being returned. It is a relative name within
* the directory, without any path components;
*/</font>
<font color=#7F0055>public final</font> String filename;
-
+
<font color=#3F5FBF>/**
* `longname' is an expanded format for the file name, similar to what
* is returned by "ls -l" on Unix systems.
@@ -775,29 +775,29 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;int: real UID&gt;</i> &bull; <i>&lt;
* use the attrs field instead.
*/</font>
<font color=#7F0055>public final</font> String longname;
-
+
<font color=#3F5FBF>/**
* `attrs' is the attributes of the file.
*/</font>
<font color=#7F0055>public final</font> FileAttrs attrs;
-
+
<font color=#7F0055>public</font> DirEntry(String filename, String longname, FileAttrs attrs);
}
-
+
<font color=#3F5FBF>/**
* Opaque representation of open file handle.
- * Note: open file handle can be used only with service instance that
+ * Note: open file handle can be used only with service instance that
* created the handle.
*/</font>
<font color=#7F0055>interface</font> IFileHandle {
IFileSystem getService();
}
-
+
<font color=#3F5FBF>/**
* Service specific error codes.
*/</font>
<font color=#7F0055>static final int</font>
-
+
<font color=#3F5FBF>/**
* Indicates end-of-file condition; for read() it means that no
* more data is available in the file, and for readdir() it
@@ -817,19 +817,19 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;int: real UID&gt;</i> &bull; <i>&lt;
*/</font>
STATUS_PERMISSION_DENIED = 0x10003;
-
+
<font color=#3F5FBF>/**
- * The class to represent File System error reports.
+ * The class to represent File System error reports.
*/</font>
<font color=#7F0055>abstract static class</font> FileSystemException extends IOException {
-
+
<font color=#7F0055>protected</font> FileSystemException(String message);
-
+
<font color=#7F0055>protected</font> FileSystemException(Exception x)
-
+
<font color=#3F5FBF>/**
* Get error code. The code can be standard TCF error code or
- * one of service specific codes, see STATUS_*.
+ * one of service specific codes, see STATUS_*.
* @return error code.
*/</font>
<font color=#7F0055>public abstract int</font> getStatus();
@@ -837,7 +837,7 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;int: real UID&gt;</i> &bull; <i>&lt;
<font color=#3F5FBF>/**
* Open or create a file on a remote system.
- *
+ *
* @param file_name specifies the file name. See 'File Names' for more information.
* @param flags is a bit mask of TCF_O_* flags.
* @param attrs specifies the initial attributes for the file.
@@ -846,25 +846,25 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;int: real UID&gt;</i> &bull; <i>&lt;
* @return pending command handle.
*/</font>
IToken open(String file_name, <font color=#7F0055>int</font> flags, FileAttrs attrs, DoneOpen done);
-
+
<font color=#7F0055>interface</font> DoneOpen {
<font color=#7F0055>void</font> doneOpen(IToken token, FileSystemException error, IFileHandle handle);
}
-
+
<font color=#3F5FBF>/**
* Close a file on a remote system.
- *
+ *
* @param handle is a handle previously returned in the response to
* open() or opendir().
* @param done is call back object.
* @return pending command handle.
*/</font>
IToken close(IFileHandle handle, DoneClose done);
-
+
<font color=#7F0055>interface</font> DoneClose {
<font color=#7F0055>void</font> doneClose(IToken token, FileSystemException error);
}
-
+
<font color=#3F5FBF>/**
* Read bytes from an open file.
* In response to this request, the server will read as many bytes as it
@@ -875,7 +875,7 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;int: real UID&gt;</i> &bull; <i>&lt;
* true in case of EOF. For normal disk files, it is guaranteed
* that this will read the specified number of bytes, or up to end of file
* or error. For e.g. device files this may return fewer bytes than requested.
- *
+ *
* @param handle is an open file handle returned by open().
* @param offset is the offset (in bytes) relative
* to the beginning of the file from where to start reading.
@@ -884,7 +884,7 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;int: real UID&gt;</i> &bull; <i>&lt;
* @return pending command handle.
*/</font>
IToken read(IFileHandle handle, long offset, <font color=#7F0055>int</font> len, DoneRead done);
-
+
<font color=#7F0055>interface</font> DoneRead {
<font color=#7F0055>void</font> doneRead(IToken token, FileSystemException error, byte[] data, boolean eof);
}
@@ -895,7 +895,7 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;int: real UID&gt;</i> &bull; <i>&lt;
* It is legal to write way beyond the end of the file; the semantics
* are to write zeroes from the end of the file to the specified offset
* and then the data.
- *
+ *
* @param handle is an open file handle returned by open().
* @param offset is the offset (in bytes) relative
* to the beginning of the file from where to start writing.
@@ -911,10 +911,10 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;int: real UID&gt;</i> &bull; <i>&lt;
<font color=#7F0055>interface</font> DoneWrite {
<font color=#7F0055>void</font> doneWrite(IToken token, FileSystemException error);
}
-
+
<font color=#3F5FBF>/**
* Retrieve file attributes.
- *
+ *
* @param path - specifies the file system object for which
* status is to be returned.
* @param done is call back object.
@@ -925,27 +925,27 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;int: real UID&gt;</i> &bull; <i>&lt;
<font color=#3F5FBF>/**
* Retrieve file attributes.
* Unlike 'stat()', 'lstat()' does not follow symbolic links.
- *
+ *
* @param path - specifies the file system object for which
* status is to be returned.
* @param done is call back object.
* @return pending command handle.
*/</font>
IToken lstat(String path, DoneStat done);
-
+
<font color=#3F5FBF>/**
* Retrieve file attributes for an open file (identified by the file handle).
- *
+ *
* @param handle is a file handle returned by 'open()'.
* @param done is call back object.
* @return pending command handle.
*/</font>
IToken fstat(IFileHandle handle, DoneStat done);
-
+
<font color=#7F0055>interface</font> DoneStat {
<font color=#7F0055>void</font> doneStat(IToken token, FileSystemException error, FileAttrs attrs);
}
-
+
<font color=#3F5FBF>/**
* Set file attributes.
* This request is used for operations such as changing the ownership,
@@ -953,7 +953,7 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;int: real UID&gt;</i> &bull; <i>&lt;
* An error will be returned if the specified file system object does
* not exist or the user does not have sufficient rights to modify the
* specified attributes.
- *
+ *
* @param path specifies the file system object (e.g. file or directory)
* whose attributes are to be modified.
* @param attrs specifies the modifications to be made to file attributes.
@@ -961,23 +961,23 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;int: real UID&gt;</i> &bull; <i>&lt;
* @return pending command handle.
*/</font>
IToken setstat(String path, FileAttrs attrs, DoneSetStat done);
-
+
<font color=#3F5FBF>/**
* Set file attributes for an open file (identified by the file handle).
* This request is used for operations such as changing the ownership,
* permissions or access times, as well as for truncating a file.
- *
+ *
* @param handle is a file handle returned by 'open()'.
* @param attrs specifies the modifications to be made to file attributes.
* @param done is call back object.
* @return pending command handle.
*/</font>
IToken fsetstat(IFileHandle handle, FileAttrs attrs, DoneSetStat done);
-
+
<font color=#7F0055>interface</font> DoneSetStat {
<font color=#7F0055>void</font> doneSetStat(IToken token, FileSystemException error);
}
-
+
<font color=#3F5FBF>/**
* The opendir() command opens a directory for reading.
* Once the directory has been successfully opened, files (and
@@ -991,7 +991,7 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;int: real UID&gt;</i> &bull; <i>&lt;
* @return pending command handle.
*/</font>
IToken opendir(String path, DoneOpen done);
-
+
<font color=#3F5FBF>/**
* The files in a directory can be listed using the opendir() and
* readdir() requests. Each readdir() request returns one
@@ -1007,21 +1007,21 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;int: real UID&gt;</i> &bull; <i>&lt;
* @return pending command handle.
*/</font>
IToken readdir(IFileHandle handle, DoneReadDir done);
-
+
<font color=#7F0055>interface</font> DoneReadDir {
<font color=#7F0055>void</font> doneReadDir(IToken token, FileSystemException error, DirEntry[] entries, boolean eof);
}
-
+
<font color=#3F5FBF>/**
* Create a directory on the server.
- *
+ *
* @param path - specifies the directory to be created.
* @param attrs - new directory attributes.
* @param done - result call back object.
* @return pending command handle.
*/</font>
IToken mkdir(String path, FileAttrs attrs, DoneMkDir done);
-
+
<font color=#7F0055>interface</font> DoneMkDir {
<font color=#7F0055>void</font> doneMkDir(IToken token, FileSystemException error);
}
@@ -1032,13 +1032,13 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;int: real UID&gt;</i> &bull; <i>&lt;
* with the specified path exists, or if the specified directory is not
* empty, or if the path specified a file system object other than a
* directory.
- *
+ *
* @param path - specifies the directory to be removed.
* @param done - result call back object.
* @return pending command handle.
*/</font>
IToken rmdir(String path, DoneRemove done);
-
+
<font color=#7F0055>interface</font> DoneRemove {
<font color=#7F0055>void</font> doneRemove(IToken token, FileSystemException error);
}
@@ -1048,15 +1048,15 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;int: real UID&gt;</i> &bull; <i>&lt;
* UNIX file system can report just one root with path "/". Other types of systems
* can have more the one root. For example, Windows server can return multiple roots:
* one per disc (e.g. "/C:/", "/D:/", etc.). Note: even Windows implementation of
- * the service must use forward slash as directory separator, and must start
+ * the service must use forward slash as directory separator, and must start
* absolute path with "/". Server should implement proper translation of
- * protocol file names to OS native names and back.
- *
+ * protocol file names to OS native names and back.
+ *
* @param done - result call back object.
* @return pending command handle.
*/</font>
IToken roots(DoneRoots done);
-
+
<font color=#7F0055>interface</font> DoneRoots {
<font color=#7F0055>void</font> doneRoots(IToken token, FileSystemException error, DirEntry[] entries);
}
@@ -1064,24 +1064,24 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;int: real UID&gt;</i> &bull; <i>&lt;
<font color=#3F5FBF>/**
* Remove a file or symbolic link.
* This request cannot be used to remove directories.
- *
+ *
* @param file_name is the name of the file to be removed.
* @param done - result call back object.
* @return pending command handle.
*/</font>
IToken remove(String file_name, DoneRemove done);
-
+
<font color=#3F5FBF>/**
* Canonicalize any given path name to an absolute path.
* This is useful for converting path names containing ".." components or
* relative pathnames without a leading slash into absolute paths.
- *
+ *
* @param path specifies the path name to be canonicalized.
* @param done - result call back object.
* @return pending command handle.
*/</font>
IToken realpath(String path, DoneRealPath done);
-
+
<font color=#7F0055>interface</font> DoneRealPath {
<font color=#7F0055>void</font> doneRealPath(IToken token, FileSystemException error, String path);
}
@@ -1092,48 +1092,48 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;int: real UID&gt;</i> &bull; <i>&lt;
* with the name specified by 'new_path'. The server may also fail rename
* requests in other situations, for example if `old_path' and `new_path'
* point to different file systems on the server.
- *
+ *
* @param old_path is the name of an existing file or directory.
* @param new_path is the new name for the file or directory.
* @param done - result call back object.
* @return pending command handle.
*/</font>
IToken rename(String old_path, String new_path, DoneRename done);
-
+
<font color=#7F0055>interface</font> DoneRename {
<font color=#7F0055>void</font> doneRename(IToken token, FileSystemException error);
}
<font color=#3F5FBF>/**
* Read the target of a symbolic link.
- *
+ *
* @param path specifies the path name of the symbolic link to be read.
* @param done - result call back object.
* @return pending command handle.
*/</font>
IToken readlink(String path, DoneReadLink done);
-
+
<font color=#7F0055>interface</font> DoneReadLink {
<font color=#7F0055>void</font> doneReadLink(IToken token, FileSystemException error, String path);
}
<font color=#3F5FBF>/**
* Create a symbolic link on the server.
- *
+ *
* @param link_path specifies the path name of the symbolic link to be created.
* @param target_path specifies the target of the symbolic link.
* @param done - result call back object.
* @return pending command handle.
*/</font>
IToken symlink(String link_path, String target_path, DoneSymLink done);
-
+
<font color=#7F0055>interface</font> DoneSymLink {
<font color=#7F0055>void</font> doneSymLink(IToken token, FileSystemException error);
}
<font color=#3F5FBF>/**
* Copy a file on remote system.
- *
+ *
* @param src_path specifies the path name of the file to be copied.
* @param dst_path specifies destination file name.
* @param copy_permissions - if true then copy source file permissions.
@@ -1143,20 +1143,20 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;int: real UID&gt;</i> &bull; <i>&lt;
*/</font>
IToken copy(String src_path, String dst_path,
boolean copy_permissions, boolean copy_ownership, DoneCopy done);
-
+
<font color=#7F0055>interface</font> DoneCopy {
<font color=#7F0055>void</font> doneCopy(IToken token, FileSystemException error);
}
-
+
<font color=#3F5FBF>/**
- * Retrieve information about user account, which is used by server
+ * Retrieve information about user account, which is used by server
* to access file system on behalf of the client.
- *
+ *
* @param done - result call back object.
* @return pending command handle.
*/</font>
IToken user(DoneUser done);
-
+
<font color=#7F0055>interface</font> DoneUser {
<font color=#7F0055>void</font> doneUser(IToken token, FileSystemException error,
<font color=#7F0055>int</font> real_uid, <font color=#7F0055>int</font> effective_uid, <font color=#7F0055>int</font> real_gid, <font color=#7F0055>int</font> effective_gid,
diff --git a/docs/TCF Service - Memory.html b/docs/TCF Service - Memory.html
index 559ddcbe2..2079567fd 100644
--- a/docs/TCF Service - Memory.html
+++ b/docs/TCF Service - Memory.html
@@ -5,9 +5,9 @@
</head>
<body lang='EN-US'>
-
+
<h1>Target Communication Framework Services - Memory</h1>
-
+
<ul>
<li><a href='#VersionHistory'>Version History</a>
<li><a href='#Overview'>Overview</a>
@@ -53,20 +53,20 @@ and event parameters are encoded as zero terminated <a href='TCF Specification.h
<p>The service uses standard format for error reports,
see <a href='TCF Services.html#ErrorFormat'>Error Report Format</a>.</p>
-
+
<p>A single memory access can succeed for some addresses and fail for others. In such
situation result message can contain partially valid data. Array of error addresses,
in addition to error report, describes data validity on per byte basis:</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
<i>&lt;array of error addresses&gt;</i>
&rArr; null
&rArr; [ <i>&lt;error address list&gt;</i> ]
-
+
<i>&lt;error address list&gt;</i>
&rArr; <i>&lt;error address&gt;</i>
&rArr; <i>&lt;error address list&gt;</i> , <i>&lt;error address&gt;</i>
-
+
<i>&lt;error address&gt;</i>
&rArr; { "addr" : <i>&lt;int: range starting address&gt;</i> , "size" : <i>&lt;int: range length in bytes&gt;</i> , "stat" : <i>&lt;int: status code&gt;</i> , "msg" : <i>&lt;object: error description&gt;</i> }
</font></b></pre>
@@ -86,7 +86,7 @@ byte is defined by main error report.</p>
<h2><a name='Cmds'>Commands</a></h2>
<h3><a name='CmdGetContext'>Get Context</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; Memory &bull; getContext &bull; <i>&lt;string: context ID&gt;</i> &bull;
</font></b></pre>
@@ -95,20 +95,20 @@ C &bull; <i>&lt;token&gt;</i> &bull; Memory &bull; getContext &bull; <i>&lt;stri
execution thread, process, address space, etc. Exact
meaning of a context depends on the target. Target agent should define contexts hierarchy
that is:</p>
-
+
<ul type='disc'>
<li>Sufficient to resolve possible ambiguity of a memory address;
-
+
<li>Adequately reflects target memory management strategy;
-
+
<li>Intuitive to a user.
</ul>
-
+
<p>For traditional OS, like UNIX, memory access context can be one of:</p>
-
+
<ul type='disc'>
<li>Kernel address space;
-
+
<li>A process.
</ul>
@@ -197,20 +197,20 @@ Service sends contextChanged event to notify changes in context data.</p>
</ul>
<h3><a name='CmdGetChildren'>Get Children</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; Memory &bull; getChildren &bull; <i>&lt;string: parent context ID&gt;</i> &bull;
</font></b></pre>
<p>The command requests a list of contexts available for memory access commands.</p>
-
+
<p>Parent context ID can be null &ndash; to retrieve top level of the hierarchy, can be one
of context IDs retrieved by previous getChildren commands, or it can be obtained from another service.
Contexts hierarchy can be simple plain list or it can form a tree. It is up to target agent developers to
choose layout that is most descriptive for a given target.</p>
-
+
<p>Reply:</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;array of context IDs&gt;</i> &bull;<i></i>
@@ -218,7 +218,7 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;a
&rArr; null
&rArr; [ ]
&rArr; [ <i>&lt;context ID list&gt;</i> ]
-
+
<i>&lt;context ID list&gt;</i>
&rArr; <i>&lt;string: context ID&gt;</i>
&rArr; <i>&lt;context ID list&gt;</i> , <i>&lt;string: context ID&gt;</i>
@@ -226,9 +226,9 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;a
</font></b></pre>
<h3><a name='CmdSetMemory'>Set Memory</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
-C &bull; &lt;token&gt; &bull; Memory &bull; set &bull;
+C &bull; &lt;token&gt; &bull; Memory &bull; set &bull;
<i>&lt;string: context ID&gt;</i> &bull; <i>&lt;int: address&gt;</i> &bull; <i>&lt;int: word size&gt;</i> &bull;
<i>&lt;int: byte count&gt;</i> &bull; <i>&lt;int: mode&gt;</i> &bull; <i>&lt;string: BASE64 encoded byte array&gt;</i> &bull;
</font></b></pre>
@@ -236,15 +236,15 @@ C &bull; &lt;token&gt; &bull; Memory &bull; set &bull;
<p>Writes data bytes at given address in memory, "word size" bytes at a time. Address
should be aligned by "word size". Context ID must be one returned by getContexts.
Mode is logical OR of any combination of:</p>
-
+
<ul type='disc'>
<li>0x1 &ndash; continue on error (like bus error or page fault)
-
+
<li>0x2 &ndash; verify data after writing by reading back and compare
</ul>
-
+
<p>Result message:</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;array of error addresses&gt;</i> &bull;
</font></b></pre>
@@ -254,7 +254,7 @@ of error. Error addresses, when present, let client know which bytes of data fai
to be written into memory.</p>
<h3><a name='CmdGetMemory'>Get Memory</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; &lt;token&gt; &bull; Memory &bull; get &bull;
<i>&lt;string: context ID&gt;</i> &bull; <i>&lt;int: address&gt;</i> &bull; <i>&lt;int: word size&gt;</i> &bull;
@@ -264,15 +264,15 @@ C &bull; &lt;token&gt; &bull; Memory &bull; get &bull;
<p>Reads data bytes at given address in memory, "word size" bytes at a time. Address
should be aligned by "word size". Context ID must be one returned by getContexts.
Mode is logical OR of any combination of:</p>
-
+
<ul type='disc'>
<li>0x1 &ndash; continue on error (like bus error or page fault)
-
+
<li>0x2 &ndash; verify data after reading by re-reading and compare
</ul>
-
+
<p>Result message:</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;string: BASE64 encoded byte array&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;array of error addresses&gt;</i> &bull;
</font></b></pre>
@@ -282,9 +282,9 @@ of error. Error addresses, when present, let client know which bytes of data fai
to be retrieved from memory.</p>
<h3><a name='CmdFillMemory'>Fill Memory</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
-C &bull; &lt;token&gt; &bull; Memory &bull; fill &bull;
+C &bull; &lt;token&gt; &bull; Memory &bull; fill &bull;
<i>&lt;string: context ID&gt;</i> &bull; <i>&lt;int: address&gt;</i> &bull; <i>&lt;int: word size&gt;</i> &bull;
&lt;int: byte count&gt; &bull; <i>&lt;int: mode&gt;</i> &bull; <i>&lt;array: array of pattern bytes&gt;</i> &bull;
</font></b></pre>
@@ -293,15 +293,15 @@ C &bull; &lt;token&gt; &bull; Memory &bull; fill &bull;
should be aligned by "word size". If "byte count" is bigger then pattern size, then
pattern is repeated necessary number of times. Context ID must be one returned by
getContexts. Mode is logical OR of any combination of:</p>
-
+
<ul type='disc'>
<li>0x1 &ndash; continue on error (like bus error or page fault)
-
+
<li>0x2 &ndash; verify data after writing by reading back and compare
</ul>
-
+
<p>Result message:</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;array of error addresses&gt;</i> &bull;
</font></b></pre>
@@ -311,29 +311,29 @@ of error. Error addresses, when present, let client know which bytes of data fai
to be written into memory.</p>
<h2><a name='Events'>Events</a></h2>
-
+
<p>Memory service broadcasts notification events when memory contexts are added, removed
or changed, and when memory content is altered by "set" or "fill" commands.</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
E &bull; Memory &bull; contextAdded &bull; <i>&lt;array of context data&gt;</i> &bull;
E &bull; Memory &bull; contextChanged &bull; <i>&lt;array of context data&gt;</i> &bull;
E &bull; Memory &bull; contextRemoved &bull; <i>&lt;array of context IDs&gt;</i> &bull;
E &bull; Memory &bull; memoryChanged &bull; <i>&lt;string: context ID&gt;</i> &bull; <i>&lt;array of address ranges&gt;</i> &bull;
-
+
<i>&lt;array of context data&gt;</i> <font face="Times New Roman" size=3>- see Get Contexts command.</font>
-
+
<i>&lt;array of context IDs&gt;</i>
&rArr; [ <i>&lt;context ID list&gt;</i> ]
-
+
<i>&lt;context ID list&gt;</i>
&rArr; <i>&lt;string: context ID&gt;</i>
&rArr; <i>&lt;context ID list&gt;</i> , <i>&lt;string: context ID&gt;</i>
-
+
<i>&lt;array of address ranges&gt;</i>
&rArr; null
&rArr; [ <i>&lt;address ranges list&gt;</i> ]
-
+
<i>&lt;address ranges list&gt;</i>
&rArr; <i>&lt;address range&gt;</i>
&rArr; <i>&lt;address ranges list&gt;</i> , <i>&lt;address range&gt;</i>
@@ -343,13 +343,13 @@ E &bull; Memory &bull; memoryChanged &bull; <i>&lt;string: context ID&gt;</i> &b
</font></b></pre>
<h2><a name='API'>API</a></h2>
-
+
<pre>
<font color=#3F5FBF>/**
* IMemory service provides basic operations to read/write memory on a target.
*/</font>
<font color=#7F0055>public interface</font> Memory <font color=#7F0055>extends</font> Service {
-
+
<font color=#7F0055>static final</font> String NAME = "Memory";
<font color=#3F5FBF>/**
@@ -365,7 +365,7 @@ E &bull; Memory &bull; memoryChanged &bull; <i>&lt;string: context ID&gt;</i> &b
PROP_START_BOUND = "StartBound", <font color=#3F5FBF>/** Number, lowest address (inclusive) which is valid for the context */</font>
PROP_END_BOUND = "EndBound", <font color=#3F5FBF>/** Number, highest address (inclusive) which is valid for the context */</font>
PROP_ACCESS_TYPES = "AccessTypes"; <font color=#3F5FBF>/** Array of String, the access types allowed for this context */</font>
-
+
<font color=#3F5FBF>/**
* Values of "AccessTypes".
* Target system can support multiple different memory access types, like instruction and data access.
@@ -386,11 +386,11 @@ E &bull; Memory &bull; memoryChanged &bull; <i>&lt;string: context ID&gt;</i> &b
ACCESS_PHYSICAL = "physical", <font color=#3F5FBF>/** Context uses physical addresses */</font>
ACCESS_CACHE = "cache", <font color=#3F5FBF>/** Context is a cache */</font>
ACCESS_TLB = "tlb"; <font color=#3F5FBF>/** Context is a TLB memory */</font>
-
+
<font color=#3F5FBF>/**
* Retrieve context info for given context ID.
- *
- * <font color=#7F9FBF>@param</font> id &ndash; context ID.
+ *
+ * <font color=#7F9FBF>@param</font> id &ndash; context ID.
* <font color=#7F9FBF>@param</font> done - callback interface called when operation is completed.
*/</font>
IToken getContext(String id, DoneGetContext done);
@@ -416,7 +416,7 @@ E &bull; Memory &bull; memoryChanged &bull; <i>&lt;string: context ID&gt;</i> &b
* all services. In other words, all services access same hierarchy of contexts,
* with same IDs, however, each service accesses its own subset of context's
* attributes and functionality, which is relevant to that service.
- *
+ *
* <font color=#7F9FBF>@param</font> parent_context_id &ndash; parent context ID. Can be null &ndash;
* to retrieve top level of the hierarchy, or one of context IDs retrieved
* by previous getContexts commands.
@@ -443,89 +443,89 @@ E &bull; Memory &bull; memoryChanged &bull; <i>&lt;string: context ID&gt;</i> &b
* were not processed correctly.
*/</font>
<font color=#7F0055>final static int</font> MODE_CONTINUEONERROR = 0x1;
-
+
<font color=#3F5FBF>/**
* Memory access mode:
* Verify result of memory operations (by reading and comparing).
*/</font>
<font color=#7F0055>final static int</font> MODE_VERIFY = 0x2;
-
+
<font color=#7F0055>interface</font> MemoryContext {
-
- <font color=#3F5FBF>/**
+
+ <font color=#3F5FBF>/**
* Get context ID.
* <font color=#7F9FBF>@return</font> context ID.
*/</font>
String getID();
- <font color=#3F5FBF>/**
+ <font color=#3F5FBF>/**
* Get parent context ID.
* <font color=#7F9FBF>@return</font> parent ID.
*/</font>
String getParentID();
-
- <font color=#3F5FBF>/**
+
+ <font color=#3F5FBF>/**
* Get process ID, if applicable.
* <font color=#7F9FBF>@return</font> process ID.
*/</font>
String getProcessID();
-
- <font color=#3F5FBF>/**
+
+ <font color=#3F5FBF>/**
* Get memory endianess.
* <font color=#7F9FBF>@return</font> true if memory id big-endian.
*/</font>
boolean isBigEndian();
-
- <font color=#3F5FBF>/**
+
+ <font color=#3F5FBF>/**
* Get memory address size.
* <font color=#7F9FBF>@return</font> number of bytes used to store memory address value.
*/</font>
<font color=#7F0055>int</font> getAddressSize();
-
- <font color=#3F5FBF>/**
+
+ <font color=#3F5FBF>/**
* Get memory context name.
* The name can be used for UI purposes.
* <font color=#7F9FBF>@return</font> context name.
*/</font>
String getName();
-
- <font color=#3F5FBF>/**
+
+ <font color=#3F5FBF>/**
* Get lowest address (inclusive) which is valid for the context.
* <font color=#7F9FBF>@return</font> lowest address.
*/</font>
Number getStartBound();
-
- <font color=#3F5FBF>/**
+
+ <font color=#3F5FBF>/**
* Get highest address (inclusive) which is valid for the context.
* <font color=#7F9FBF>@return</font> highest address.
*/</font>
Number getEndBound();
-
- <font color=#3F5FBF>/**
+
+ <font color=#3F5FBF>/**
* Get the access types allowed for this context.
* <font color=#7F9FBF>@return</font> collection of access type names.
*/</font>
Collection&lt;String> getAccessTypes();
- <font color=#3F5FBF>/**
+ <font color=#3F5FBF>/**
* Get context properties.
* <font color=#7F9FBF>@return</font> all available context properties.
*/</font>
Map&lt;String,Object> getProperties();
-
+
<font color=#3F5FBF>/**
* Set target memory.
* If 'word_size' is 0 it means client does not care about word size.
*/</font>
<font color=#7F0055>void</font> set(long addr, <font color=#7F0055>int</font> word_size, byte[] buf,
<font color=#7F0055>int</font> offs, <font color=#7F0055>int</font> size, <font color=#7F0055>int</font> mode, DoneMemory done);
-
+
<font color=#3F5FBF>/**
* Read target memory.
*/</font>
<font color=#7F0055>void</font> get(long addr, <font color=#7F0055>int</font> word_size, byte[] buf,
<font color=#7F0055>int</font> offs, <font color=#7F0055>int</font> size, <font color=#7F0055>int</font> mode, DoneMemory done);
-
+
<font color=#3F5FBF>/**
* Fill target memory with given pattern.
* 'size' is number of bytes to fill.
@@ -533,7 +533,7 @@ E &bull; Memory &bull; memoryChanged &bull; <i>&lt;string: context ID&gt;</i> &b
<font color=#7F0055>void</font> fill(long addr, <font color=#7F0055>int</font> word_size, byte[] value,
<font color=#7F0055>int</font> size, <font color=#7F0055>int</font> mode, DoneMemory done);
}
-
+
<font color=#3F5FBF>/**
* Client callback interface for set(), get() and fill().
*/</font>
@@ -543,7 +543,7 @@ E &bull; Memory &bull; memoryChanged &bull; <i>&lt;string: context ID&gt;</i> &b
<font color=#7F0055>class</font> MemoryError <font color=#7F0055>extends</font> Exception {
}
-
+
<font color=#3F5FBF>/**
* ErrorOffset interface can be implemented by MemoryError object,
* which is returned by get, set and fill commands.
@@ -556,26 +556,26 @@ E &bull; Memory &bull; memoryChanged &bull; <i>&lt;string: context ID&gt;</i> &b
* possible reasons of partial memory operation.
*/</font>
<font color=#7F0055>interface</font> ErrorOffset {
-
+
// Error may have per byte information
- <font color=#7F0055>final static int</font>
+ <font color=#7F0055>final static int</font>
BYTE_VALID = 0x00,
BYTE_UNKNOWN = 0x01, // e.g. out of range
BYTE_INVALID = 0x02,
BYTE_CANNOT_READ = 0x04,
BYTE_CANNOT_WRITE = 0x08;
-
+
<font color=#7F0055>int</font> getStatus(<font color=#7F0055>int</font> offset);
-
+
<font color=#3F5FBF>/**
* Returns the detail message string about the
* byte associated with specified location.
* <font color=#7F9FBF>@return</font> the detail error message string.
*/</font>
String getMessage(<font color=#7F0055>int</font> offset);
-
+
}
-
+
<font color=#3F5FBF>/**
* Add memory service event listener.
* <font color=#7F9FBF>@param</font> listener - event listener implementation.
@@ -590,27 +590,27 @@ E &bull; Memory &bull; memoryChanged &bull; <i>&lt;string: context ID&gt;</i> &b
<font color=#3F5FBF>/**
* Memory event listener is notified when memory context hierarchy
- * changes, and when memory is modified by memory service commands.
+ * changes, and when memory is modified by memory service commands.
*/</font>
<font color=#7F0055>interface</font> MemoryListener {
-
+
<font color=#3F5FBF>/**
* Called when a new memory access context(s) is created.
*/</font>
<font color=#7F0055>void</font> contextAdded(Context[] contexts);
-
+
<font color=#3F5FBF>/**
* Called when a new memory access context(s) properties changed.
*/</font>
<font color=#7F0055>void</font> contextChanged(Context[] contexts);
-
+
<font color=#3F5FBF>/**
* Called when memory access context(s) is removed.
*/</font>
<font color=#7F0055>void</font> contextRemoved(String[] context_ids);
-
+
<font color=#3F5FBF>/**
- * Called when target memory content was changed and clients
+ * Called when target memory content was changed and clients
* need to update themselves. Clients, at least, should invalidate
* corresponding cached memory data.
* Not every change is notified - it is not possible,
diff --git a/docs/TCF Service - Processes.html b/docs/TCF Service - Processes.html
index 1c0bfa5db..ec4a3d20e 100644
--- a/docs/TCF Service - Processes.html
+++ b/docs/TCF Service - Processes.html
@@ -5,9 +5,9 @@
</head>
<body lang='EN-US'>
-
+
<h1>Target Communication Framework Services - Processes</h1>
-
+
<ul>
<li><a href='#VersionHistory'>Version History</a>
<li><a href='#Overview'>Overview</a>
@@ -45,18 +45,18 @@
<tr>
<td>0.2
<td>2009-02-26
- <td>Added signal and environment commands, and properties for standard I/O redirection
+ <td>Added signal and environment commands, and properties for standard I/O redirection
</table>
<h2><a name='Overview'>Overview</a></h2>
-<p>Processes service provides access to the target OS's process
+<p>Processes service provides access to the target OS's process
information, allows to start and terminate a process, and allows
to attach and detach a process for debugging. Debug services,
like Memory and Run Control, require a process to be attached
before they can access it.</p>
-<p>If a process is started by this service, its standard input/output streams are
+<p>If a process is started by this service, its standard input/output streams are
available for client to read/write using <a href='TCF Service - Streams.html'>Streams Service</a>. Stream type of such
streams is set to "Processes".</p>
@@ -65,11 +65,11 @@ as zero terminated <a href='TCF Specification.html#JSON'>JSON</a> strings.</p>
<p>The service uses standard format for error reports,
see <a href='TCF Services.html#ErrorFormat'>Error Report Format</a>.</p>
-
+
<h2><a name='Cmds'>Commands</a></h2>
<h3><a name='CmdGetContext'>Get Context</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; Processes &bull; getContext &bull; <i>&lt;string: context ID&gt;</i> &bull;
</font></b></pre>
@@ -82,7 +82,7 @@ However, 'Processes.getContext' is supposed to return only process specific data
If the ID is not a process ID, 'Processes.getContext' may not return any
useful information.
</p>
-
+
<p>Reply:</p>
<pre><b><font face="Courier New" size=2 color=#333399>
@@ -104,42 +104,42 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;c
<li><code><b><font face="Courier New" size=2 color=#333399>"ParentID" : <i>&lt;string&gt;</i></font></b></code>
- parent context ID.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"Name" : <i>&lt;string&gt;</i></font></b></code>
- process name. Client UI can show this name to a user.
<li><code><b><font face="Courier New" size=2 color=#333399>"Attached" : <i>&lt;boolean&gt;</i></font></b></code>
- true if the context is attached to debugger.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"CanTerminate" : <i>&lt;boolean&gt;</i></font></b></code>
- true if the service can terminate the process.
<li><code><b><font face="Courier New" size=2 color=#333399>"StdInID" : <i>&lt;string&gt;</i></font></b></code>
- process standard input stream ID.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"StdOutID" : <i>&lt;string&gt;</i></font></b></code>
- process standard output stream ID.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"StdErrID" : <i>&lt;string&gt;</i></font></b></code>
- process standard error stream ID.
</ul>
<h3><a name='CmdGetChildren'>Get Children</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; Processes &bull; getChildren &bull; <i>&lt;string: parent context ID&gt;</i> &bull; <i>&lt;boolean: attached only&gt;</i> &bull;
</font></b></pre>
<p>The command requests a list of contexts available for process control commands.</p>
-
+
<p>Parent context ID can be null &ndash; to retrieve top level of the hierarchy, can be one
of context IDs retrieved by previous getChildren commands, or it can be obtained from another service.
Contexts hierarchy can be simple plain list or it can form a tree. It is up to target agent developers to
choose layout that is most descriptive for a given target.</p>
<p>If <i>&lt;boolean: attached only&gt;</i> is true, the command returns only those processes that are attached for debugging.</p>
-
+
<p>Reply:</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;array of context IDs&gt;</i> &bull;
@@ -147,65 +147,65 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;a
&rArr; null
&rArr; [ ]
&rArr; [ <i>&lt;context ID list&gt;</i> ]
-
+
<i>&lt;context ID list&gt;</i>
&rArr; <i>&lt;string: context ID&gt;</i>
&rArr; <i>&lt;context ID list&gt;</i> , <i>&lt;string: context ID&gt;</i>
</font></b></pre>
<h3><a name='CmdAttach'>Attach</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; Processes &bull; attach &bull; <i>&lt;string: context ID&gt;</i> &bull;
</font></b></pre>
<p>The command attaches debugger to a process.
Services like Run Control, Memory, Breakpoints work only with attached processes.</p>
-
+
<p>Reply:</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull;
</font></b></pre>
<h3><a name='CmdDetach'>Detach</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; Processes &bull; detach &bull; <i>&lt;string: context ID&gt;</i> &bull;
</font></b></pre>
<p>The command detaches debugger from a process.</p>
-
+
<p>Reply:</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull;
</font></b></pre>
<h3><a name='CmdTerminate'>Terminate</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; Processes &bull; terminate &bull; <i>&lt;string: context ID&gt;</i> &bull;
</font></b></pre>
<p>The command terminates a process.</p>
-
+
<p>Reply:</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull;
</font></b></pre>
<h3><a name='CmdGetSignalList'>Get Signal List</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; Processes &bull; getSignalList &bull; <i>&lt;string: context ID&gt;</i> &bull;
</font></b></pre>
<p>The command returns a complete list of available signals. The list containg all signals that can be sent to a given context.</p>
-
+
<p>Reply:</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;array of signal descriptions&gt;</i> &bull;
@@ -213,7 +213,7 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;a
&rArr; null
&rArr; [ ]
&rArr; [ <i>&lt;signal description list&gt;</i> ]
-
+
<i>&lt;signal description list&gt;</i>
&rArr; <i>&lt;object: signal description&gt;</i>
&rArr; <i>&lt;signal description list&gt;</i> , <i>&lt;object: signal description&gt;</i>
@@ -233,7 +233,7 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;a
<h3><a name='CmdGetSignalMask'>Get Signal Mask</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; Processes &bull; getSignalMask &bull; <i>&lt;string: context ID&gt;</i> &bull;
</font></b></pre>
@@ -244,7 +244,7 @@ When new context is created it inherits the mask from its parent.
If context is not attached the command will return an error.</p>
<p>Reply:</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;int: don't stop bitset&gt;</i> &bull; <i>&lt;int: don't pass bitset&gt;</i> &bull; <i>&lt;int: pending bitset&gt;</i> &bull;
</font></b></pre>
@@ -256,7 +256,7 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;i
Note: "pending bitset" is meaningful only if the context is suspended.
<h3><a name='CmdSetSignalMask'>Set Signal Mask</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; Processes &bull; setSignalMask &bull; <i>&lt;string: context ID&gt;</i> &bull; <i>&lt;int: don't stop bitset&gt;</i> &bull; <i>&lt;int: don't pass bitset&gt;</i> &bull;
</font></b></pre>
@@ -266,46 +266,46 @@ Bits in the mask control how signals should be handled by debug agent.
If context is not attached the command will return an error.</p>
<ul>
<li>don't stop bitset - signals that should not suspend execution of the context.
- By default, debugger suspends a process before it receives a signal.
+ By default, debugger suspends a process before it receives a signal.
<li>don't pass bitset - signals that should not be delivered to the context.
</ul>
-
+
<p>Reply:</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull;
</font></b></pre>
<h3><a name='CmdSignal'>Signal</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; Processes &bull; signal &bull; <i>&lt;string: context ID&gt;</i> &bull; <i>&lt;int: signal&gt;</i> &bull;
</font></b></pre>
<p>The command sends a signal to a context.</p>
-
+
<p>Reply:</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull;
</font></b></pre>
<h3><a name='CmdGetEnvironment'>Get Environment</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; Processes &bull; getEnvironment &bull;
</font></b></pre>
<p>The command returns default set of environment variables used to start a new process.</p>
-
+
<p>Reply:</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;object: environment variables&gt;</i> &bull;
</font></b></pre>
<h3><a name='CmdStart'>Start</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; Processes &bull; start &bull; <i>&lt;string: working directory&gt;</i> &bull; <i>&lt;string: program image file&gt;</i> &bull;
<i>&lt;string array: command line&gt;</i> &bull; <i>&lt;object: environment variables&gt;</i> &bull; <i>&lt;boolean: attach&gt;</i> &bull;
@@ -314,7 +314,7 @@ C &bull; <i>&lt;token&gt;</i> &bull; Processes &bull; start &bull; <i>&lt;string
&rArr; null
&rArr; [ ]
&rArr; [ <i>&lt;string list&gt;</i> ]
-
+
<i>&lt;string list&gt;</i>
&rArr; <i>&lt;string&gt;</i>
&rArr; <i>&lt;string list&gt;</i> , <i>&lt;string&gt;</i>
@@ -326,12 +326,12 @@ C &bull; <i>&lt;token&gt;</i> &bull; Processes &bull; start &bull; <i>&lt;string
<li><i>&lt;string: program image file&gt;</i> - image file to start process with.
<li><i>&lt;string array: command line&gt;</i> - command line arguments for the process.
<li><i>&lt;object: environment variables&gt;</i> - list of environment variables for the process,
- they will be added to default process environment.
+ they will be added to default process environment.
<li><i>&lt;boolean: attach&gt;</i> - if true debugger should be attached to the process.</p>
</ul>
-
+
<p>Reply:</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;context data&gt;</i> &bull;
</font></b></pre>
@@ -342,18 +342,18 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;c
<p>Processes service broadcasts notification event when a proceess exits.
Only processes that were started by the service will generate exit event.</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
E &bull; Processes &bull; exited &bull; <i>&lt;string: process ID&gt;</i> &bull; <i>&lt;int: exit code&gt;</i> &bull;
</font></b></pre>
<h2><a name='API'>API</a></h2>
-
+
<pre>
<font color=#7F0055>public interface</font> IProcesses <font color=#7F0055>extends</font> IService {
<font color=#7F0055>static final</font> String NAME = "Processes";
-
+
<font color=#3F5FBF>/**
* Retrieve context info for given context ID.
* A context corresponds to an execution thread, process, address space, etc.
@@ -363,8 +363,8 @@ E &bull; Processes &bull; exited &bull; <i>&lt;string: process ID&gt;</i> &bull;
* However, 'Processes.getContext' is supposed to return only process specific data,
* If the ID is not a process ID, 'IProcesses.getContext' may not return any
* useful information
- *
- * <font color=#7F9FBF>@param</font> id &ndash; context ID.
+ *
+ * <font color=#7F9FBF>@param</font> id &ndash; context ID.
* <font color=#7F9FBF>@param</font> done - call back interface called when operation is completed.
*/</font>
IToken getContext(String id, DoneGetContext done);
@@ -383,10 +383,10 @@ E &bull; Processes &bull; exited &bull; <i>&lt;string: process ID&gt;</i> &bull;
<font color=#3F5FBF>/**
* Retrieve children of given context.
- *
+ *
* <font color=#7F9FBF>@param</font> parent_context_id &ndash; parent context ID. Can be null &ndash;
* to retrieve top level of the hierarchy, or one of context IDs retrieved
- * by previous getContext or getChildren commands.
+ * by previous getContext or getChildren commands.
* <font color=#7F9FBF>@param</font> attached_only - if true return only attached process IDs.
* <font color=#7F9FBF>@param</font> done - call back interface called when operation is completed.
*/</font>
@@ -403,38 +403,38 @@ E &bull; Processes &bull; exited &bull; <i>&lt;string: process ID&gt;</i> &bull;
*/</font>
<font color=#7F0055>void</font> doneGetChildren(IToken token, Exception error, String[] context_ids);
}
-
+
<font color=#3F5FBF>/**
* Context property names.
*/</font>
<font color=#7F0055>static final</font> String
<font color=#3F5FBF>/** The TCF context ID */</font>
PROP_ID = "ID",
-
+
<font color=#3F5FBF>/** The TCF parent context ID */</font>
PROP_PARENTID = "ParentID",
-
+
<font color=#3F5FBF>/** Is the context attached */</font>
PROP_ATTACHED = "Attached",
-
+
<font color=#3F5FBF>/** Can terminate the context */</font>
PROP_CAN_TERMINATE = "CanTerminate",
-
+
<font color=#3F5FBF>/** Process name. Client UI can show this name to a user */</font>
PROP_NAME = "Name",
<font color=#3F5FBF>/** Process standard input stream ID */</font>
PROP_STDIN_ID = "StdInID",
-
+
<font color=#3F5FBF>/** Process standard output stream ID */</font>
PROP_STDOUT_ID = "StdOutID",
-
+
<font color=#3F5FBF>/** Process standard error stream ID */</font>
PROP_STDERR_ID = "StdErrID";
-
+
<font color=#7F0055>interface</font> ProcessContext {
-
- <font color=#3F5FBF>/**
+
+ <font color=#3F5FBF>/**
* Get context ID.
* Same as getProperties().get(&ldquo;ID&rdquo;)
*/</font>
@@ -471,7 +471,7 @@ E &bull; Processes &bull; exited &bull; <i>&lt;string: process ID&gt;</i> &bull;
* <font color=#7F9FBF>@return</font> Map 'property name' -> 'property value'
*/</font>
Map&lt;String, Object&gt; getProperties();
-
+
<font color=#3F5FBF>/**
* Attach debugger to a process.
* Services like IRunControl, IMemory, IBreakpoints work only with attached processes.
@@ -487,15 +487,15 @@ E &bull; Processes &bull; exited &bull; <i>&lt;string: process ID&gt;</i> &bull;
* <font color=#7F9FBF>@return</font> pending command handle, can be used to cancel the command.
*/</font>
IToken detach(DoneCommand done);
-
+
<font color=#3F5FBF>/**
- * Terminate a process.
+ * Terminate a process.
* <font color=#7F9FBF>@param</font> done - call back interface called when operation is completed.
* <font color=#7F9FBF>@return</font> pending command handle, can be used to cancel the command.
*/</font>
IToken terminate(DoneCommand done);
}
-
+
<font color=#7F0055>interface</font> DoneCommand {
<font color=#7F0055>void</font> doneCommand(IToken token, Exception error);
}
@@ -506,16 +506,16 @@ E &bull; Processes &bull; exited &bull; <i>&lt;string: process ID&gt;</i> &bull;
<font color=#7F0055>static final</font> String
<font color=#3F5FBF>/** Number, bit position in the signal mask */</font>
SIG_INDEX = "Index",
-
+
<font color=#3F5FBF>/** String, signal name, for example "SIGHUP" */</font>
SIG_NAME = "Name",
-
+
<font color=#3F5FBF>/** Number, signal code, as defined by OS */</font>
SIG_CODE = "Code",
-
+
<font color=#3F5FBF>/** String, human readable description of the signal */</font>
SIG_DESCRIPTION = "Description";
-
+
<font color=#3F5FBF>/**
* Get list of signals that can be send to the context.
* <font color=#7F9FBF>@param</font> done - call back interface called when operation is completed.
@@ -529,17 +529,17 @@ E &bull; Processes &bull; exited &bull; <i>&lt;string: process ID&gt;</i> &bull;
<font color=#7F0055>interface</font> DoneGetSignalList {
<font color=#7F0055>void</font> doneGetSignalList(IToken token, Exception error, Collection<Map<String,Object>> list);
}
-
+
<font color=#3F5FBF>/**
* Get process or thread signal mask.
* Bits in the mask control how signals should be handled by debug agent.
* When new context is created it inherits the mask from its parent.
- * If context is not attached the command will return an error.
+ * If context is not attached the command will return an error.
* <font color=#7F9FBF>@param</font> done - call back interface called when operation is completed.
* <font color=#7F9FBF>@return</font> pending command handle, can be used to cancel the command.
*/</font>
IToken getSignalMask(String context_id, DoneGetSignalMask done);
-
+
<font color=#3F5FBF>/**
* Call-back interface to be called when "getSignalMask" command is complete.
*/</font>
@@ -553,13 +553,13 @@ E &bull; Processes &bull; exited &bull; <i>&lt;string: process ID&gt;</i> &bull;
*/</font>
<font color=#7F0055>void</font> doneGetSignalMask(IToken token, Exception error, <font color=#7F0055>int</font> dont_stop, <font color=#7F0055>int</font> dont_pass, <font color=#7F0055>int</font> pending);
}
-
+
<font color=#3F5FBF>/**
- * Set process or thread signal mask.
+ * Set process or thread signal mask.
* Bits in the mask control how signals should be handled by debug agent.
- * If context is not attached the command will return an error.
+ * If context is not attached the command will return an error.
* <font color=#7F9FBF>@param</font> dont_stop - bit-set of signals that should not suspend execution of the context.
- * By default, debugger suspends a context before it receives a signal.
+ * By default, debugger suspends a context before it receives a signal.
* <font color=#7F9FBF>@param</font> dont_pass - bit-set of signals that should not be delivered to the context.
* <font color=#7F9FBF>@param</font> done - call back interface called when operation is completed.
* <font color=#7F9FBF>@return</font> pending command handle, can be used to cancel the command.
@@ -581,7 +581,7 @@ E &bull; Processes &bull; exited &bull; <i>&lt;string: process ID&gt;</i> &bull;
* <font color=#7F9FBF>@return</font> pending command handle, can be used to cancel the command.
*/</font>
IToken getEnvironment(DoneGetEnvironment done);
-
+
<font color=#3F5FBF>/**
* Call-back interface to be called when "getEnvironment" command is complete.
*/</font>
@@ -594,15 +594,15 @@ E &bull; Processes &bull; exited &bull; <i>&lt;string: process ID&gt;</i> &bull;
* <font color=#7F9FBF>@param</font> directory - initial value of working directory for the process.
* <font color=#7F9FBF>@param</font> file - process image file.
* <font color=#7F9FBF>@param</font> command_line - command line arguments for the process.
- * <font color=#7F9FBF>@param</font> environment - list of environment variables for the process.
- * if null then default set of environment variables will be used.
+ * <font color=#7F9FBF>@param</font> environment - list of environment variables for the process.
+ * if null then default set of environment variables will be used.
* <font color=#7F9FBF>@param</font> attach - if true debugger should be attached to the process.
* <font color=#7F9FBF>@param</font> done - call back interface called when operation is completed.
* <font color=#7F9FBF>@return</font> pending command handle, can be used to cancel the command.
*/</font>
IToken start(String directory, String file,
String[] command_line, String[] environment, <font color=#7F0055>boolean</font> attach, DoneStart done);
-
+
<font color=#3F5FBF>/**
* Call-back interface to be called when "start" command is complete.
*/</font>
@@ -624,10 +624,10 @@ E &bull; Processes &bull; exited &bull; <i>&lt;string: process ID&gt;</i> &bull;
<font color=#3F5FBF>/**
* Process event listener is notified when a process exits.
- * Event are reported only for processes that were started by 'start' command.
+ * Event are reported only for processes that were started by 'start' command.
*/</font>
<font color=#7F0055>interface</font> ProcessesListener {
-
+
<font color=#3F5FBF>/**
* Called when a process exits.
* <font color=#7F9FBF>@param</font> process_id - process context ID
diff --git a/docs/TCF Service - Registers.html b/docs/TCF Service - Registers.html
index 11892d390..d94a6da53 100644
--- a/docs/TCF Service - Registers.html
+++ b/docs/TCF Service - Registers.html
@@ -5,9 +5,9 @@
</head>
<body lang='EN-US'>
-
+
<h1>Target Communication Framework Services - Registers</h1>
-
+
<ul>
<li><a href='#VersionHistory'>Version History</a>
<li><a href='#Overview'>Overview</a>
@@ -67,11 +67,11 @@ multiple locations. This allows:
<li> to specify offset and size for get/set on large register groups
<li> to get/set truncated register values, e.g. only the low 32 bits of a 64-bit register
</ol>
-
+
<h2><a name='Cmds'>Commands</a></h2>
<h3><a name='CmdGetContext'>Get Context</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; Registers &bull; getContext &bull; <i>&lt;string: context ID&gt;</i> &bull;
</font></b></pre>
@@ -79,13 +79,13 @@ C &bull; <i>&lt;token&gt;</i> &bull; Registers &bull; getContext &bull; <i>&lt;s
<p>The command retrieves context info for given context ID. A context corresponds to an
register, register group, register bit field, etc. Exact meaning of a context depends on the target.
Target agent should define contexts hierarchy that is:</p>
-
+
<ul type='disc'>
<li>Adequately reflects target hardware registers layout;
<li>Consistent with the lingo/terminology of the processor manuals;
<li>Intuitive to a user.
</ul>
-
+
<p>Reply:</p>
<pre><b><font face="Courier New" size=2 color=#333399>
@@ -165,7 +165,7 @@ Service sends contextChanged event to notify changes in context data.</p>
&rArr; null
&rArr; [ ]
&rArr; [ <i>&lt;named values list&gt;</i> ]
-
+
<i>&lt;named values list&gt;</i>
&rArr; <i>&lt;object: named value properties&gt;</i>
&rArr; <i>&lt;named values list&gt;</i> , <i>&lt;object: named value properties&gt;</i>
@@ -218,20 +218,20 @@ Service sends contextChanged event to notify changes in context data.</p>
</ul>
<h3><a name='CmdGetChildren'>Get Children</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; Registers &bull; getChildren &bull; <i>&lt;string: parent context ID&gt;</i> &bull;
</font></b></pre>
<p>The command requests a list of contexts available for registers access commands.</p>
-
+
<p>Parent context ID is usually a thread ID retrieved through Run Control Service or one
of context IDs retrieved by previous getChildren commands.
Contexts hierarchy can be simple plain list of registers, or it can form a tree of register groups, registers and bit fields.
It is up to target agent developers to choose layout that is most descriptive for a given target.</p>
-
+
<p>Reply:</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;array of context IDs&gt;</i> &bull;<i></i>
@@ -239,7 +239,7 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;a
&rArr; null
&rArr; [ ]
&rArr; [ <i>&lt;context ID list&gt;</i> ]
-
+
<i>&lt;context ID list&gt;</i>
&rArr; <i>&lt;string: context ID&gt;</i>
&rArr; <i>&lt;context ID list&gt;</i> , <i>&lt;string: context ID&gt;</i>
@@ -247,16 +247,16 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;a
</font></b></pre>
<h3><a name='CmdSetRegister'>Set Register</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; &lt;token&gt; &bull; Registers &bull; set &bull; <i>&lt;string: context ID&gt;</i> &bull; <i>&lt;string: value&gt;</i> &bull;
</font></b></pre>
<p>Writes value into given register context. Context ID must be one returned by getContexts.
Value is BASE64 encoded byte array of binary data. Array size should match the size of the register.</p>
-
+
<p>Result message:</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull;
</font></b></pre>
@@ -265,16 +265,16 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull;
of error.</p>
<h3><a name='CmdGetRegister'>Get Register</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; &lt;token&gt; &bull; Registers &bull; get &bull; <i>&lt;string: context ID&gt;</i> &bull;
</font></b></pre>
<p>Reads register value from given register context. Context ID must be one returned by getContexts.
</p>
-
+
<p>Result message:</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;string: value&gt;</i> &bull;
</font></b></pre>
@@ -283,7 +283,7 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;s
of error. Value is BASE64 encoded byte array of binary data. Array size should match the size of the register.</p>
<h3><a name='CmdSetMultiple'>Set Multiple Registers</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; &lt;token&gt; &bull; Registers &bull; setm &bull; <i>&lt;array of locations&gt;</i> &bull; <i>&lt;string: value&gt;</i> &bull;
@@ -293,7 +293,7 @@ C &bull; &lt;token&gt; &bull; Registers &bull; setm &bull; <i>&lt;array of locat
<i>&lt;location list&gt;</i>
&rArr; <i>&lt;location&gt;</i>
&rArr; <i>&lt;location list&gt;</i> , <i>&lt;location&gt;</i>
-
+
<i>&lt;location&gt;</i>
&rArr; [ <i>&lt;string: register context ID&gt;</i> , <i>&lt;int: offset in bytes&gt;</i> , <i>&lt;int: size in bytes&gt;</i> ]
</font></b></pre>
@@ -301,9 +301,9 @@ C &bull; &lt;token&gt; &bull; Registers &bull; setm &bull; <i>&lt;array of locat
<p>Writes value into given list of locations in registers. Each location is represented by 3-element array that consists of
context ID, offset in the context in bytes and value size in bytes.
Value is BASE64 encoded byte array of binary data. Byte array size should match the sum of location sizes.</p>
-
+
<p>Result message:</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull;
</font></b></pre>
@@ -312,7 +312,7 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull;
of error.</p>
<h3><a name='CmdGetMultiple'>Get Multiple Registers</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; &lt;token&gt; &bull; Registers &bull; getm &bull; <i>&lt;array of locations&gt;</i> &bull;
@@ -322,7 +322,7 @@ C &bull; &lt;token&gt; &bull; Registers &bull; getm &bull; <i>&lt;array of locat
<i>&lt;location list&gt;</i>
&rArr; <i>&lt;location&gt;</i>
&rArr; <i>&lt;location list&gt;</i> , <i>&lt;location&gt;</i>
-
+
<i>&lt;location&gt;</i>
&rArr; [ <i>&lt;string: register context ID&gt;</i> , <i>&lt;int: offset in bytes&gt;</i> , <i>&lt;int: size in bytes&gt;</i> ]
</font></b></pre>
@@ -330,9 +330,9 @@ C &bull; &lt;token&gt; &bull; Registers &bull; getm &bull; <i>&lt;array of locat
<p>Reads register values from given list of locations in registers. Each location is represented by 3-element array that consists of
context ID, offset in the context in bytes and value size in bytes.
</p>
-
+
<p>Result message:</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;string: value&gt;</i> &bull;
</font></b></pre>
@@ -341,12 +341,12 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;s
of error. Value is BASE64 encoded byte array of binary data. Byte array size should match the sum of location sizes.</p>
<h3><a name='CmdSearch'>Search for Registers</a></h3>
-
+
<pre><b><font face="Courier New" size="2" color="#333399">
C &bull; &lt;token&gt; &bull; Registers &bull; search &bull; <i>&lt;string: start context ID&gt; &bull; &lt;object:filter properties&gt;</i> &bull;
</font></b></pre>
-<p>Search returns a path to each context with properties matching the filter. A path consists of a list of
+<p>Search returns a path to each context with properties matching the filter. A path consists of a list of
context ids starting with a direct child of the start context up to the found context.
Search is only supported for properties listed in the CanSearch property.
@@ -360,9 +360,9 @@ C &bull; &lt;token&gt; &bull; Registers &bull; search &bull; <i>&lt;string: star
</li>
</ul>
</p>
-
+
<p>Result message:</p>
-
+
<pre><b><font face="Courier New" size="2" color="#333399">
R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;array of context Paths&gt;</i> &bull;
@@ -370,7 +370,7 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;a
&rArr; null
&rArr; [ ]
&rArr; [ <i>&lt;context Path list&gt;</i> ]
-
+
<i>&lt;context Path list&gt;</i>
&rArr; <i>&lt;array of context IDs&gt;</i>
&rArr; <i>&lt;context Path list&gt;</i> , <i>&lt;array of context IDs&gt;</i>
@@ -404,17 +404,17 @@ R &bull; "1235" &bull; [["ID_G0"]] &bull;
</font></b></pre>
<h2><a name='Events'>Events</a></h2>
-
+
<p>Registers service broadcasts notification events when registers contexts are changed, and when
a register content is altered by "set" commands.</p>
-
+
<pre><b><font face="Courier New" size="2" color="#333399">
E &bull; Registers &bull; contextChanged &bull;
E &bull; Registers &bull; registerChanged &bull; <i>&lt;string: context ID&gt;</i> &bull;
</font></b></pre>
<h2><a name='API'>API</a></h2>
-
+
<pre>
<font color=#3F5FBF>/**
* IRegisters service provides access to target CPU register values and properties.
@@ -449,7 +449,7 @@ E &bull; Registers &bull; registerChanged &bull; <i>&lt;string: context ID&gt;</
PROP_MEMORY_CONTEXT = "MemoryContext", <font color=#3F5FBF>/** String, the context ID of a memory context in which a memory mapped register is located */</font>
PROP_CAN_SEARCH = "CanSearch", <font color=#3F5FBF>/** Array of String, a list of attribute names which can be searched for starting on this context */</font>
PROP_ROLE = "Role"; <font color=#3F5FBF>/** String, the role the register plays in a program execution */</font>
-
+
<font color=#3F5FBF>/**
* Role property names.
*/</font>
@@ -459,7 +459,7 @@ E &bull; Registers &bull; registerChanged &bull; <i>&lt;string: context ID&gt;</
ROLE_FP = "FP", <font color=#3F5FBF>/** Register defining the current frame pointer location */</font>
ROLE_RET = "RET", <font color=#3F5FBF>/** Register used to store the return address for calls */</font>
ROLE_CORE = "CORE"; <font color=#3F5FBF>/** Indicates register or register groups which belong to the core state */</font>
-
+
<font color=#3F5FBF>/**
* Filter property names.
*/</font>
@@ -470,8 +470,8 @@ E &bull; Registers &bull; registerChanged &bull; <i>&lt;string: context ID&gt;</
<font color=#3F5FBF>/**
* Retrieve context info for given context ID.
- *
- * <font color=#7F9FBF>@param</font> id &ndash; context ID.
+ *
+ * <font color=#7F9FBF>@param</font> id &ndash; context ID.
* <font color=#7F9FBF>@param</font> done - call back interface called when operation is completed.
*/</font>
IToken getContext(String id, DoneGetContext done);
@@ -497,7 +497,7 @@ E &bull; Registers &bull; registerChanged &bull; <i>&lt;string: context ID&gt;</
* all services. In other words, all services access same hierarchy of contexts,
* with same IDs, however, each service accesses its own subset of context's
* attributes and functionality, which is relevant to that service.
- *
+ *
* <font color=#7F9FBF>@param</font> parent_context_id &ndash; parent context ID. Can be null &ndash;
* to retrieve top level of the hierarchy, or one of context IDs retrieved
* by previous getChildren commands.
@@ -516,9 +516,9 @@ E &bull; Registers &bull; registerChanged &bull; <i>&lt;string: context ID&gt;</
*/</font>
<font color=#7F0055>void</font> doneGetChildren(IToken token, Exception error, String[] context_ids);
}
-
+
<font color=#3F5FBF>/**
- * RegistersContext objects represent register groups, registers and bit fields.
+ * RegistersContext objects represent register groups, registers and bit fields.
*/</font>
<font color=#7F0055>interface</font> RegistersContext {
<font color=#3F5FBF>/**
@@ -526,25 +526,25 @@ E &bull; Registers &bull; registerChanged &bull; <i>&lt;string: context ID&gt;</
* <font color=#7F9FBF>@return</font> context ID.
*/</font>
String getID();
-
+
<font color=#3F5FBF>/**
* Get parent context ID.
* <font color=#7F9FBF>@return</font> parent context ID.
*/</font>
String getParentID();
-
+
<font color=#3F5FBF>/**
* Get context (register, register group, bit field) name.
* <font color=#7F9FBF>@return</font> context name.
*/</font>
String getName();
-
+
<font color=#3F5FBF>/**
* Get context description.
* <font color=#7F9FBF>@return</font> context description.
*/</font>
String getDescription();
-
+
<font color=#3F5FBF>/**
* Get context size in bytes.
* Byte arrays in get()/set() methods should be same size.
@@ -554,57 +554,57 @@ E &bull; Registers &bull; registerChanged &bull; <i>&lt;string: context ID&gt;</
* @return context size in bytes.
*/</font>
<font color=#7F0055>int</font> getSize();
-
+
<font color=#3F5FBF>/**
* Check if context value can be read.
* <font color=#7F9FBF>@return</font> true if can read value of the context.
*/</font>
<font color=#7F0055>boolean</font> isReadable();
-
+
<font color=#3F5FBF>/**
* Check if reading the context (register) destroys its current value -
* it can be read only once.
* <font color=#7F9FBF>@return</font> true if read-once register.
*/</font>
<font color=#7F0055>boolean</font> isReadOnce();
-
+
<font color=#3F5FBF>/**
* Check if context value can be written.
* <font color=#7F9FBF>@return</font> true if can write value of the context.
*/</font>
<font color=#7F0055>boolean</font> isWriteable();
-
+
<font color=#3F5FBF>/**
* Check if register value can not be overwritten - every write counts.
* <font color=#7F9FBF>@return</font> true if write-once register.
*/</font>
<font color=#7F0055>boolean</font> isWriteOnce();
-
+
<font color=#3F5FBF>/**
- * Check if writing the context can change values of other registers.
+ * Check if writing the context can change values of other registers.
* <font color=#7F9FBF>@return</font> true if has side effects.
*/</font>
<font color=#7F0055>boolean</font> hasSideEffects();
-
+
<font color=#3F5FBF>/**
* Check if the register value can change even when target is stopped.
* <font color=#7F9FBF>@return</font> true if the register value can change at any time.
*/</font>
<font color=#7F0055>boolean</font> isVolatile();
-
+
<font color=#3F5FBF>/**
* Check if the register value is a floating-point value.
* <font color=#7F9FBF>@return</font> true if a floating-point register.
*/</font>
<font color=#7F0055>boolean</font> isFloat();
-
+
<font color=#3F5FBF>/**
* Check endianess of the context.
- * Big endian means decreasing numeric significance with increasing bit number.
+ * Big endian means decreasing numeric significance with increasing bit number.
* <font color=#7F9FBF>@return</font> true if big endian.
*/</font>
<font color=#7F0055>boolean</font> isBigEndian();
-
+
<font color=#3F5FBF>/**
* Check if the lowest numbered bit (i.e. bit #0 or bit #1 depending on
* getFirstBitNumber() value) should be shown to user as the left-most bit or
@@ -612,45 +612,45 @@ E &bull; Registers &bull; registerChanged &bull; <i>&lt;string: context ID&gt;</
* <font color=#7F9FBF>@return</font> true if the first bit is left-most bit.
*/</font>
<font color=#7F0055>boolean</font> isLeftToRight();
-
+
<font color=#3F5FBF>/**
* If the context has bit field children, bit positions of the fields
* can be zero-based or 1-based.
* <font color=#7F9FBF>@return</font> first bit position - 0 or 1.
*/</font>
<font color=#7F0055>int</font> getFirstBitNumber();
-
+
<font color=#3F5FBF>/**
- * If context is a bit field, get the field bit numbers in parent context.
+ * If context is a bit field, get the field bit numbers in parent context.
* <font color=#7F9FBF>@return</font> array of bit numbers.
*/</font>
<font color=#7F0055>int</font>[] getBitNumbers();
-
+
<font color=#3F5FBF>/**
* A context can have predefined names (mnemonics) for some its values.
* This method returns a list of such named values.
* <font color=#7F9FBF>@return</font> array of named values or null.
*/</font>
NamedValue[] getNamedValues();
-
+
<font color=#3F5FBF>/**
* Get the address of a memory mapped register.
* <font color=#7F9FBF>@return</font> address.
*/</font>
Number getMemoryAddress();
-
+
<font color=#3F5FBF>/**
- * Get the context ID of a memory context in which a memory mapped register is located.
+ * Get the context ID of a memory context in which a memory mapped register is located.
* <font color=#7F9FBF>@return</font> memory context ID.
*/</font>
String getMemoryContext();
-
+
<font color=#3F5FBF>/**
* Get a list of property names which can be searched for starting on this context
* <font color=#7F9FBF>@return</font> collection of property names.
*/</font>
Collection<String> canSearch();
-
+
<font color=#3F5FBF>/**
* Get the role the register plays in a program execution.
* <font color=#7F9FBF>@return</font> role name.
@@ -662,14 +662,14 @@ E &bull; Registers &bull; registerChanged &bull; <i>&lt;string: context ID&gt;</
* <font color=#7F9FBF>@return</font> map of all available context properties.
*/</font>
Map<String,Object> getProperties();
-
+
<font color=#3F5FBF>/**
* Read value of the context.
* <font color=#7F9FBF>@param</font> done - call back object.
* <font color=#7F9FBF>@return</font> - pending command handle.
*/</font>
IToken get(DoneGet done);
-
+
<font color=#3F5FBF>/**
* Set value of the context.
* <font color=#7F9FBF>@param</font> value - value to write into the context.
@@ -690,7 +690,7 @@ E &bull; Registers &bull; registerChanged &bull; <i>&lt;string: context ID&gt;</
<font color=#3F5FBF>/**
* A register context can have predefined names (mnemonics) for some its values.
- * NamedValue objects represent such values.
+ * NamedValue objects represent such values.
*/</font>
<font color=#7F0055>interface</font> NamedValue {
<font color=#3F5FBF>/**
@@ -698,20 +698,20 @@ E &bull; Registers &bull; registerChanged &bull; <i>&lt;string: context ID&gt;</
* <font color=#7F9FBF>@return</font> the value as an array of bytes.
*/</font>
byte[] getValue();
-
+
<font color=#3F5FBF>/**
* Get name (mnemonic) of the value.
* <font color=#7F9FBF>@return</font> value name.
*/</font>
String getName();
-
+
<font color=#3F5FBF>/**
* Get human readable description of the value.
* <font color=#7F9FBF>@return</font> value description.
*/</font>
String getDescription();
}
-
+
<font color=#3F5FBF>/**
* Read values of multiple locations in registers.
* <font color=#7F9FBF>@param</font> locs - array of data locations.
@@ -719,7 +719,7 @@ E &bull; Registers &bull; registerChanged &bull; <i>&lt;string: context ID&gt;</
* <font color=#7F9FBF>@return</font> - pending command handle.
*/</font>
IToken getm(Location[] locs, DoneGet done);
-
+
<font color=#3F5FBF>/**
* Set values of multiple locations in registers.
* <font color=#7F9FBF>@param</font> locs - array of data locations.
@@ -734,7 +734,7 @@ E &bull; Registers &bull; registerChanged &bull; <i>&lt;string: context ID&gt;</
*/</font>
<font color=#7F0055>final class</font> Location {
<font color=#3F5FBF>/** Register context ID */</font>
- <font color=#7F0055>public final</font> String id;
+ <font color=#7F0055>public final</font> String id;
<font color=#3F5FBF>/** offset in the context, in bytes */</font>
<font color=#7F0055>public final int</font> offs;
@@ -761,7 +761,7 @@ E &bull; Registers &bull; registerChanged &bull; <i>&lt;string: context ID&gt;</
*/</font>
<font color=#7F0055>void</font> doneGet(IToken token, Exception error, byte[] value);
}
-
+
<font color=#3F5FBF>/**
* 'set' command call back interface.
*/</font>
@@ -801,7 +801,7 @@ E &bull; Registers &bull; registerChanged &bull; <i>&lt;string: context ID&gt;</
<font color=#3F5FBF>/**
* Registers event listener is notified when registers context hierarchy
- * changes, and when a register is modified by the service commands.
+ * changes, and when a register is modified by the service commands.
*/</font>
<font color=#7F0055>interface</font> RegistersListener {
@@ -810,12 +810,12 @@ E &bull; Registers &bull; registerChanged &bull; <i>&lt;string: context ID&gt;</
* Most targets have static set of registers and register properties.
* Such targets never generate this event. However, some targets,
* for example, JTAG probes, allow user to modify register definitions.
- * Clients should flush all cached register context data.
+ * Clients should flush all cached register context data.
*/</font>
<font color=#7F0055>void</font> contextChanged();
<font color=#3F5FBF>/**
- * Called when register content was changed and clients
+ * Called when register content was changed and clients
* need to update themselves. Clients, at least, should invalidate
* corresponding cached registers data.
* Not every change is notified - it is not possible,
diff --git a/docs/TCF Service - Run Control.html b/docs/TCF Service - Run Control.html
index ecdc40100..785770f04 100644
--- a/docs/TCF Service - Run Control.html
+++ b/docs/TCF Service - Run Control.html
@@ -5,9 +5,9 @@
</head>
<body lang='EN-US'>
-
+
<h1>Target Communication Framework Services - Run Control</h1>
-
+
<ul>
<li><a href='#VersionHistory'>Version History</a>
<li><a href='#Overview'>Overview</a>
@@ -50,9 +50,9 @@ Command and event parameters are encoded as zero terminated <a href='TCF Specifi
<p>The service uses standard format for error reports,
see <a href='TCF Services.html#ErrorFormat'>Error Report Format</a>.</p>
-
+
<h2><a name='Cmds'>Commands</a></h2>
-
+
<p>All run control commands are fully asynchronous, which means they never wait until
context is in a particular state. For example, if single step command arrives when
context is running, it does not wait until it stops, but returns an error. If a command
@@ -66,13 +66,13 @@ to the command and intended destination was not reached. Client can know when an
why a context is suspended by listening to events.</p>
<h3><a name='CmdGetContext'>Get Context</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; RunControl &bull; getContext &bull; <i>&lt;string: context ID&gt;</i> &bull;
</font></b></pre>
<p>The command retrieves context properties for given context ID.
-Exact meaning of context depends on the target.
+Exact meaning of context depends on the target.
A context can represent an execution thread, a process, an address space, etc.
A context can belong to a parent context. Contexts hierarchy can be simple
plain list or it can form a tree. It is up to target agent developers to choose
@@ -82,7 +82,7 @@ with same IDs, however, each service accesses its own subset of context's
attributes and functionality, which is relevant to that service.</p>
<p>Reply:</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;context data&gt;</i> &bull;
@@ -134,7 +134,7 @@ contextChanged event to notify changes in context data.</p>
</ul>
<h3><a name='CmdGetChildren'>Get Children</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; RunControl &bull; getChildren &bull; <i>&lt;string: parent context ID&gt;</i> &bull;
</font></b></pre>
@@ -145,23 +145,23 @@ C &bull; <i>&lt;token&gt;</i> &bull; RunControl &bull; getChildren &bull; <i>&lt
of context IDs retrieved by previous getChildren commands, or it can be obtained from another service.
Contexts hierarchy can be simple plain list or it can form a tree. It is up to target agent developers to
choose layout that is most descriptive for a given target.</p>
-
+
<p>Reply:</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;array of context IDs&gt;</i> &bull;
<i>&lt;array of context IDs&gt;</i>
&rArr; null
&rArr; [ <i>&lt;context ID list&gt;</i> ]
-
+
<i>&lt;context ID list&gt;</i>
&rArr; <i>&lt;string: context ID&gt;</i>
&rArr; <i>&lt;context ID list&gt;</i> , <i>&lt;string: context ID&gt;</i>
</font></b></pre>
<h3><a name='CmdSuspend'>Suspend</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; RunControl &bull; suspend &bull; <i>&lt;string: context ID&gt;</i> &bull;
</font></b></pre>
@@ -169,9 +169,9 @@ C &bull; <i>&lt;token&gt;</i> &bull; RunControl &bull; suspend &bull; <i>&lt;str
<p>The command suspends execution of given context. The command should fail if CanSuspend property of the context is false.
If context's IsContainer = true, the command is propagated to context's children. Only contexts with HasState = true
can be suspended.</p>
-
+
<p>Result message:</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull;
</font></b></pre>
@@ -272,24 +272,24 @@ to context's children. Only contexts with HasState = true can be resumed.</p>
<code>RM_REVERSE_STEP_INTO_RANGE = 15</code> - reverse of <code>RM_STEP_INTO_RANGE</code>.
</li>
</ul>
-
+
<p>Result message:</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull;
</font></b></pre>
<h3><a name='CmdGetState'>Get State</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; RunControl &bull; getState &bull; <i>&lt;string: context ID&gt;</i> &bull;
</font></b></pre>
<p>The command retrieves current state of the context. The command should fail if HasState property of
the context is false.</p>
-
+
<p>Result message:</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;boolean: suspended&gt;</i> &bull;
<i>&lt;int: PC&gt;</i> &bull; <i>&lt;string: last state change reason&gt;</i> &bull; <i>&lt;state data&gt;</i> &bull;
@@ -315,24 +315,24 @@ a generic client might be able to handle it better. Predefined reasons are:</p>
<p>Context state properties can contain any data relevant to context state.
Definition of state properties depends on a target.</p>
-
+
<h3><a name='CmdTerminate'>Terminate</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; RunControl &bull; terminate &bull; <i>&lt;string: context ID&gt;</i> &bull;
</font></b></pre>
<p>The command terminates execution of given context. The command should fail if CanTerminate
property of the context is false.</p>
-
+
<p>Result message:</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull;
</font></b></pre>
<h2><a name='Events'>Events</a></h2>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
E &bull; RunControl &bull; contextAdded &bull; <i>&lt;array of context data&gt;</i> &bull;
@@ -355,7 +355,7 @@ E &bull; RunControl &bull; containerResumed &bull; <i>&lt;array of context IDs&g
<i>&lt;array of context data&gt;</i>
&rArr; null
&rArr; [ <i>&lt;context data list&gt;</i> ]
-
+
<i>&lt;context data list&gt;</i>
&rArr; <i>&lt;object: context data&gt;</i>
&rArr; <i>&lt;context data list&gt;</i> , <i>&lt;object: context data&gt;</i>
@@ -411,7 +411,7 @@ E &bull; RunControl &bull; containerResumed &bull; <i>&lt;array of context IDs&g
PROP_CAN_TERMINATE = "CanTerminate";
<font color=#3F5FBF>/**
- * Context resume modes.
+ * Context resume modes.
*/</font>
<font color=#7F0055>static final int</font>
RM_RESUME = 0,
@@ -430,7 +430,7 @@ E &bull; RunControl &bull; containerResumed &bull; <i>&lt;array of context IDs&g
<font color=#3F5FBF>/**
* State change reason of a context.
* Reason can be any text, but if it is one of predefined strings,
- * a generic client might be able to handle it better.
+ * a generic client might be able to handle it better.
*/</font>
<font color=#7F0055>static final</font> String
REASON_USER_REQUEST = "Suspended",
@@ -445,8 +445,8 @@ E &bull; RunControl &bull; containerResumed &bull; <i>&lt;array of context IDs&g
<font color=#3F5FBF>/**
* Retrieve context info for given context ID.
- *
- * <font color=#7F9FBF>@param</font> id &ndash; context ID.
+ *
+ * <font color=#7F9FBF>@param</font> id &ndash; context ID.
* <font color=#7F9FBF>@param</font> done - callback interface called when operation is completed.
*/</font>
IToken getContext(String id, DoneGetContext done);
@@ -465,14 +465,14 @@ E &bull; RunControl &bull; containerResumed &bull; <i>&lt;array of context IDs&g
<font color=#3F5FBF>/**
* Retrieve children of given context.
- *
+ *
* <font color=#7F9FBF>@param</font> parent_context_id &ndash; parent context ID. Can be null &ndash;
* to retrieve top level of the hierarchy, or one of context IDs retrieved
- * by previous getContext or getChildren commands.
+ * by previous getContext or getChildren commands.
* <font color=#7F9FBF>@param</font> done - callback interface called when operation is completed.
*/</font>
IToken getChildren(String parent_context_id, DoneGetChildren done);
-
+
<font color=#3F5FBF>/**
* Client callback interface for getContexts().
*/</font>
@@ -484,7 +484,7 @@ E &bull; RunControl &bull; containerResumed &bull; <i>&lt;array of context IDs&g
*/</font>
<font color=#7F0055>void</font> doneGetChildren(IToken token, RunControlError error, Context[] contexts);
}
-
+
<font color=#3F5FBF>/**
* A context corresponds to an execution thread, process, address space, etc.
* A context can belong to a parent context. Contexts hierarchy can be simple
@@ -492,17 +492,17 @@ E &bull; RunControl &bull; containerResumed &bull; <i>&lt;array of context IDs&g
* layout that is most descriptive for a given target. Context IDs are valid across
* all services. In other words, all services access same hierarchy of contexts,
* with same IDs, however, each service accesses its own subset of context's
- * attributes and functionality, which is relevant to that service.
+ * attributes and functionality, which is relevant to that service.
*/</font>
<font color=#7F0055>interface</font> RunControlContext {
-
- <font color=#3F5FBF>/**
+
+ <font color=#3F5FBF>/**
* Retrieve context ID.
* Same as getProperties().get("ID")
*/</font>
String getID();
-
- <font color=#3F5FBF>/**
+
+ <font color=#3F5FBF>/**
* Retrieve parent context ID.
* Same as getProperties().get("ParentID")
*/</font>
@@ -514,21 +514,21 @@ E &bull; RunControl &bull; containerResumed &bull; <i>&lt;array of context IDs&g
* <font color=#7F9FBF>@return</font> Map of context properties.
*/</font>
Map&lt;String,Object&gt; getProperties();
-
+
<font color=#3F5FBF>/**
* Utility method to read context property PROP_IS_CONTAINER.
* Executing resume or suspend command on a container causes all its children to resume or suspend.
* <font color=#7F9FBF>@return</font> value of PROP_IS_CONTAINER.
*/</font>
<font color=#7F0055>boolean</font> isContainer();
-
+
<font color=#3F5FBF>/**
* Utility method to read context property PROP_HAS_STATE.
- * Only context that has a state can be resumed or suspended.
+ * Only context that has a state can be resumed or suspended.
* <font color=#7F9FBF>@return</font> value of PROP_HAS_STATE.
*/</font>
<font color=#7F0055>boolean</font> hasState();
-
+
<font color=#3F5FBF>/**
* Utility method to read context property PROP_CAN_SUSPEND.
* Value 'true' means suspend command is supported by the context,
@@ -538,29 +538,29 @@ E &bull; RunControl &bull; containerResumed &bull; <i>&lt;array of context IDs&g
* <font color=#7F9FBF>@return</font> value of PROP_CAN_SUSPEND.
*/</font>
<font color=#7F0055>boolean</font> canSuspend();
-
+
<font color=#3F5FBF>/**
* Utility method to read a 'mode' bit in context property PROP_CAN_RESUME.
* Value 'true' means resume 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 resumed.
- * <font color=#7F9FBF>@param</font> mode - resume mode, see RM_*.
- * <font color=#7F9FBF>@return</font> value of requested bit of PROP_CAN_RESUME.
+ * <font color=#7F9FBF>@param</font> mode - resume mode, see RM_*.
+ * <font color=#7F9FBF>@return</font> value of requested bit of PROP_CAN_RESUME.
*/</font>
<font color=#7F0055>boolean</font> canResume(<font color=#7F0055>int</font> mode);
-
+
<font color=#3F5FBF>/**
* Utility method to read a 'mode' bit in context property PROP_CAN_COUNT.
* Value 'true' means resume command with count other then 1 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 resumed.
- * <font color=#7F9FBF>@param</font> mode - resume mode, see RM_*.
- * <font color=#7F9FBF>@return</font> value of requested bit of PROP_CAN_COUNT.
+ * <font color=#7F9FBF>@param</font> mode - resume mode, see RM_*.
+ * <font color=#7F9FBF>@return</font> value of requested bit of PROP_CAN_COUNT.
*/</font>
<font color=#7F0055>boolean</font> canCount(<font color=#7F0055>int</font> mode);
-
+
<font color=#3F5FBF>/**
* Utility method to read context property PROP_CAN_TERMINATE.
* Value 'true' means terminate command is supported by the context,
@@ -585,7 +585,7 @@ E &bull; RunControl &bull; containerResumed &bull; <i>&lt;array of context IDs&g
* <font color=#7F9FBF>@return</font> pending command handle, can be used to cancel the command.
*/</font>
IToken suspend(DoneCommand done);
-
+
<font color=#3F5FBF>/**
* Send a command to resume a context.
* Also resumes children if context is a container.
@@ -595,7 +595,7 @@ E &bull; RunControl &bull; containerResumed &bull; <i>&lt;array of context IDs&g
* <font color=#7F9FBF>@return</font> pending command handle, can be used to cancel the command.
*/</font>
IToken resume(<font color=#7F0055>int</font> mode, <font color=#7F0055>int</font> count, DoneCommand done);
-
+
<font color=#3F5FBF>/**
* Send a command to terminate a context.
* <font color=#7F9FBF>@param</font> done - command result call back object.
@@ -603,10 +603,10 @@ E &bull; RunControl &bull; containerResumed &bull; <i>&lt;array of context IDs&g
*/</font>
IToken terminate(DoneCommand done);
}
-
+
<font color=#7F0055>class</font> RunControlError <font color=#7F0055>extends</font> Exception {
}
-
+
<font color=#7F0055>interface</font> DoneGetState {
<font color=#7F0055>void</font> doneGetState(IToken token, Exception error, <font color=#7F0055>boolean</font> suspended, String pc,
String reason, Map&lt;String,Object&gt; params);
@@ -626,7 +626,7 @@ E &bull; RunControl &bull; containerResumed &bull; <i>&lt;array of context IDs&g
* <font color=#7F9FBF>@param</font> listener - run control event listener to add.
*/</font>
<font color=#7F0055>void</font> addListener(RunControlListener listener);
-
+
<font color=#3F5FBF>/**
* Remove run control event listener.
* <font color=#7F9FBF>@param</font> listener - run control event listener to remove.
@@ -675,14 +675,14 @@ E &bull; RunControl &bull; containerResumed &bull; <i>&lt;array of context IDs&g
<font color=#3F5FBF>/**
* Called when target simultaneously suspends multiple threads in a container
* (process, core, etc.).
- *
+ *
* <font color=#7F9FBF>@param</font> context - ID of a context responsible for the event. It can be container ID or
* any one of container children, for example, it can be thread that hit "suspend all" breakpoint.
* Client expected to move focus (selection) to this context.
* <font color=#7F9FBF>@param</font> pc - program counter of the context.
* <font color=#7F9FBF>@param</font> reason - human readable description of suspend reason.
* <font color=#7F9FBF>@param</font> params - additional target specific data about suspended context.
- * <font color=#7F9FBF>@param</font> suspended_ids - full list of all contexts that were suspended.
+ * <font color=#7F9FBF>@param</font> suspended_ids - full list of all contexts that were suspended.
*/</font>
<font color=#7F0055>void</font> containerSuspended(String context, String pc,
String reason, Map&lt;String,Object&gt; params, String[] suspended_ids);
@@ -690,8 +690,8 @@ E &bull; RunControl &bull; containerResumed &bull; <i>&lt;array of context IDs&g
<font color=#3F5FBF>/**
* Called when target simultaneously resumes multiple threads in a container (process,
* core, etc.).
- *
- * <font color=#7F9FBF>@param</font> context_ids - full list of all contexts that were resumed.
+ *
+ * <font color=#7F9FBF>@param</font> context_ids - full list of all contexts that were resumed.
*/</font>
<font color=#7F0055>void</font> containerResumed(String[] context_ids);
diff --git a/docs/TCF Service - Stack Trace.html b/docs/TCF Service - Stack Trace.html
index 33bf4933b..c0ee6d360 100644
--- a/docs/TCF Service - Stack Trace.html
+++ b/docs/TCF Service - Stack Trace.html
@@ -5,9 +5,9 @@
</head>
<body lang='EN-US'>
-
+
<h1>Target Communication Framework Services - Stack Trace</h1>
-
+
<ul>
<li><a href='#VersionHistory'>Version History</a>
<li><a href='#Overview'>Overview</a>
@@ -42,11 +42,11 @@ and event parameters are encoded as zero terminated <a href='TCF Specification.h
<p>The service uses standard format for error reports,
see <a href='TCF Services.html#ErrorFormat'>Error Report Format</a>.</p>
-
+
<h2><a name='Cmds'>Commands</a></h2>
<h3><a name='CmdGetContext'>Get Context</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; StackTrace &bull; getContext &bull; <i>&lt;array of context IDs&gt;</i> &bull;
@@ -54,7 +54,7 @@ C &bull; <i>&lt;token&gt;</i> &bull; StackTrace &bull; getContext &bull; <i>&lt;
&rArr; null
&rArr; [ ]
&rArr; [ <i>&lt;context ID list&gt;</i> ]
-
+
<i>&lt;context ID list&gt;</i>
&rArr; <i>&lt;string: context ID&gt;</i>
&rArr; <i>&lt;context ID list&gt;</i> , <i>&lt;string: context ID&gt;</i>
@@ -65,17 +65,17 @@ Command allows to query multiple contexts at once.
Stack Trace context represents single stack frame.
If target supports more then one stack per thread,
each stack is also represented by a separate context.</p>
-
+
<p>Reply:</p>
<pre><b><font face="Courier New" size=2 color=#333399>
-R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;array of context data&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull;
+R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;array of context data&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull;
<i>&lt;array of context data&gt;</i>
&rArr; null
&rArr; [ ]
&rArr; [ <i>&lt;context data list&gt;</i> ]
-
+
<i>&lt;context data list&gt;</i>
&rArr; <i>&lt;context data&gt;</i>
&rArr; <i>&lt;context data list&gt;</i> , <i>&lt;context data&gt;</i>
@@ -121,7 +121,7 @@ Cached context data should by flushed when parent thread is resumed.</p>
</ul>
<h3><a name='CmdGetChildren'>Get Children</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; StackTrace &bull; getChildren &bull; <i>&lt;string: parent context ID&gt;</i> &bull;
</font></b></pre>
@@ -131,12 +131,12 @@ Parent context usually corresponds to an execution thread.
Some targets have more then one stack. In such case children of a thread
are stacks, and stack frames are deeper in the hierarchy - they can be
retrieved with additional getChildren commands.</p>
-
+
<p>The command will fail if parent thread is not suspended.
Client can use Run Control service to suspend a thread.</p>
-
+
<p>Reply:</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;array of context IDs&gt;</i> &bull;<i></i>
@@ -144,7 +144,7 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;a
&rArr; null
&rArr; [ ]
&rArr; [ <i>&lt;context ID list&gt;</i> ]
-
+
<i>&lt;context ID list&gt;</i>
&rArr; <i>&lt;string: context ID&gt;</i>
&rArr; <i>&lt;context ID list&gt;</i> , <i>&lt;string: context ID&gt;</i>
@@ -153,11 +153,11 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;a
<h2><a name='Events'>Events</a></h2>
-
+
<p>No events are currently defined for Stack Trace service.</p>
-
+
<h2><a name='API'>API</a></h2>
-
+
<pre>
<font color=#7F0055>public interface</font> IStackTrace <font color=#7F0055>extends</font> IService {
@@ -179,11 +179,11 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;a
<font color=#3F5FBF>/**
* Retrieve context info for given context IDs.
- *
+ *
* The command will fail if parent thread is not suspended.
* Client can use Run Control service to suspend a thread.
- *
- * <font color=#7F9FBF>@param</font> id &ndash; array of context IDs.
+ *
+ * <font color=#7F9FBF>@param</font> id &ndash; array of context IDs.
* <font color=#7F9FBF>@param</font> done - call back interface called when operation is completed.
*/</font>
IToken getContext(String[] id, DoneGetContext done);
@@ -206,10 +206,10 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;a
* Some targets have more then one stack. In such case children of a thread
* are stacks, and stack frames are deeper in the hierarchy - they can be
* retrieved with additional getChildren commands.
- *
+ *
* The command will fail if parent thread is not suspended.
* Client can use Run Control service to suspend a thread.
- *
+ *
* <font color=#7F9FBF>@param</font> parent_context_id &ndash; parent context ID.
* <font color=#7F9FBF>@param</font> done - call back interface called when operation is completed.
*/</font>
@@ -227,55 +227,55 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;a
*/</font>
<font color=#7F0055>void</font> doneGetChildren(IToken token, Exception error, String[] context_ids);
}
-
+
<font color=#3F5FBF>/**
- * StackTraceContext represents stack trace objects - stacks and stack frames.
+ * StackTraceContext represents stack trace objects - stacks and stack frames.
*/</font>
<font color=#7F0055>interface</font> StackTraceContext {
-
+
<font color=#3F5FBF>/**
* Get Context ID.
* <font color=#7F9FBF>@return</font> context ID.
*/</font>
String getID();
-
+
<font color=#3F5FBF>/**
* Get parent context ID.
* <font color=#7F9FBF>@return</font> parent context ID.
*/</font>
String getParentID();
-
+
<font color=#3F5FBF>/**
* Get context name - if context represents a stack.
* <font color=#7F9FBF>@return</font> context name or null.
*/</font>
String getName();
-
+
<font color=#3F5FBF>/**
* Get memory address of this frame.
* <font color=#7F9FBF>@return</font> address or null if not a stack frame.
*/</font>
Number getFrameAddress();
-
+
<font color=#3F5FBF>/**
* Get program counter saved in this stack frame -
* it is address of instruction to be executed when the function returns.
* <font color=#7F9FBF>@return</font> program counter or null if not a stack frame.
*/</font>
Number getProgramCounter();
-
+
<font color=#3F5FBF>/**
* Get number of function arguments for this frame.
* <font color=#7F9FBF>@return</font> function arguments count.
*/</font>
<font color=#7F0055>int</font> getArgumentsCount();
-
+
<font color=#3F5FBF>/**
* Get address of function arguments area in memory.
* <font color=#7F9FBF>@return</font> function arguments address or null if not available.
*/</font>
Number getArgumentsAddress();
-
+
<font color=#3F5FBF>/**
* Get stack frame level.
* <font color=#7F9FBF>@return</font> frame level or 0 if not a stack frame.
diff --git a/docs/TCF Service - Streams.html b/docs/TCF Service - Streams.html
index 3d166f869..5a3378a13 100644
--- a/docs/TCF Service - Streams.html
+++ b/docs/TCF Service - Streams.html
@@ -5,9 +5,9 @@
</head>
<body lang='EN-US'>
-
+
<h1>Target Communication Framework Services - Streams</h1>
-
+
<ul>
<li><a href='#VersionHistory'>Version History</a>
<li><a href='#Overview'>Overview</a>
@@ -58,18 +58,18 @@
can continue data processing concurrently with data transmission.
<li> Multicast: multiple clients can receive data from same stream.
<li> Subscription model: clients are required to expressed interest in particular streams by subscribing for the service.
- <li> Flow control: peers can throttle data flow of individual streams by delaying 'read' and 'write' commands.
+ <li> Flow control: peers can throttle data flow of individual streams by delaying 'read' and 'write' commands.
</ul>
<p> Command and event parameters are encoded as zero terminated <a href='TCF Specification.html#JSON'>JSON</a> strings.</p>
<p>The service uses standard format for error reports,
see <a href='TCF Services.html#ErrorFormat'>Error Report Format</a>.</p>
-
+
<h2><a name='Cmds'>Commands</a></h2>
<h3><a name='CmdSubscribe'>Subscribe</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; Streams &bull; subscribe &bull; <i>&lt;string: stream source type&gt;</i> &bull;
</font></b></pre>
@@ -80,7 +80,7 @@ For example, <a href='TCF Service - Processes.html'>Processes Service</a> define
"Processes" strem source that represents standard input/output streams.
Subscribers receive notifications when a stream of given type is created or disposed.
Subscribers are required to respond with 'read' or 'disconnect' commands as necessary.</p>
-
+
<p>Reply:</p>
<pre><b><font face="Courier New" size=2 color=#333399>
@@ -95,13 +95,13 @@ If not disconnected, subscriber is required to send 'read' commands as necessary
</p>
<h3><a name='CmdUnsubscribe'>Unsubscribe</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; Streams &bull; unsubscribe &bull; <i>&lt;string: stream source type&gt;</i> &bull;
</font></b></pre>
<p>Unsubscribe the client from given stream source type.</p>
-
+
<p>Reply:</p>
<pre><b><font face="Courier New" size=2 color=#333399>
@@ -109,7 +109,7 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull;
</font></b></pre>
<h3><a name='CmdRead'>Read</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; Streams &bull; read &bull; <i>&lt;string: stream ID&gt;</i> &bull; <i>&lt;int: size&gt;</i> &bull;
</font></b></pre>
@@ -127,7 +127,7 @@ Pending 'read' commands will be executed in same order as issued.
Client can delay sending of 'read' command if it is not ready to receive more data,
however, delaying for too long can cause stream buffer overflow and lost of data.
.</p>
-
+
<p>Reply:</p>
<pre><b><font face="Courier New" size=2 color=#333399>
@@ -138,12 +138,12 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;string: data&gt;</i> &bull; <i>&lt;e
<li><dt><code><b>data</b></code> <dd>BASE64 encoded bytes that were read from the stream.
<li><dt><code><b>lost size</b></code> <dd>Number of bytes that were lost because of buffer overflow.
-1 means unknown number of bytes were lost. if both 'lost_size' and 'data.length' are non-zero then lost bytes are considered
- located right before read bytes.
+ located right before read bytes.
<li><dt><code><b>EOS</b></code> <dd>true if end of stream was reached.
</ul>
<h3><a name='CmdWrite'>Write</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; Streams &bull; write &bull; <i>&lt;string: stream ID&gt;</i> &bull; <i>&lt;int: size&gt;</i> &bull; <i>&lt;string: data&gt;</i> &bull;
</font></b></pre>
@@ -159,7 +159,7 @@ Remote peer will continue to process other commands while 'write' command is pen
Client can send more 'write' commands without waiting for the first command to complete.
Doing that improves communication channel bandwidth utilization.
Pending 'write' commands will be executed in same order as issued.</p>
-
+
<p>Reply:</p>
<pre><b><font face="Courier New" size=2 color=#333399>
@@ -167,13 +167,13 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull;
</font></b></pre>
<h3><a name='CmdEOS'>End of Stream</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; Streams &bull; eos &bull; <i>&lt;string: stream ID&gt;</i> &bull;
</font></b></pre>
<p>The command sends End Of Stream marker to a stream. No more writing to the stream is allowed after that.</p>
-
+
<p>Reply:</p>
<pre><b><font face="Courier New" size=2 color=#333399>
@@ -181,7 +181,7 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull;
</font></b></pre>
<h3><a name='CmdConnect'>Connect</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; Streams &bull; connect &bull; <i>&lt;string: stream ID&gt;</i> &bull;
</font></b></pre>
@@ -189,7 +189,7 @@ C &bull; <i>&lt;token&gt;</i> &bull; Streams &bull; connect &bull; <i>&lt;string
<p>The command connects client to a stream. Some data might be dropped from the stream by the time "connect" command is executed.
Client should be able to re-sync with stream data if it wants to read from such stream.
If a client wants to read a stream from the beginning it should use "subscribe" command instead of "connect"</p>
-
+
<p>Reply:</p>
<pre><b><font face="Courier New" size=2 color=#333399>
@@ -197,14 +197,14 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull;
</font></b></pre>
<h3><a name='CmdDisconnect'>Disconnect</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; Streams &bull; disconnect &bull; <i>&lt;string: stream ID&gt;</i> &bull;
</font></b></pre>
<p>The command disconnects client from a stream. Note that disconnect does not destroy the stream, client on other channels can
continue reading or writing the stream.</p>
-
+
<p>Reply:</p>
<pre><b><font face="Courier New" size=2 color=#333399>
@@ -212,10 +212,10 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull;
</font></b></pre>
<h2><a name='Events'>Events</a></h2>
-
+
<p>Streams service sends events when a stream is created or disposed. Only clients with active subscribtion will recceive the events.
Clients can change their subscription with <b>subscribe</b> and <b>unsubscribe</b> commands.</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
E &bull; Streams &bull; created &bull; <i>&lt;string: stream type&gt;</i> &bull; <i>&lt;string: stream ID&gt;</i> &bull; <i>&lt;string: context ID&gt;</i> &bull;
</font></b></pre>
@@ -234,16 +234,16 @@ Stream types and context IDs are defined by services that use Streams service to
E &bull; Streams &bull; disposed &bull; <i>&lt;string: stream type&gt;</i> &bull; <i>&lt;string: stream ID&gt;</i> &bull;
</font></b></pre>
<p>
-Sent when a stream is disposed.
+Sent when a stream is disposed.
"stream type" - source type of the stream.
"stream ID" - ID of the stream.
</p>
<h2><a name='API'>API</a></h2>
-
+
<pre>
<font color=#7F0055>public interface</font> IStreams extends IService {
-
+
<font color=#3F5FBF>/**
* Service name.
*/</font>
@@ -251,14 +251,14 @@ Sent when a stream is disposed.
<font color=#3F5FBF>/**
* Clients can implement StreamsListener interface to be notified
- * when a stream is created or disposed. The interface is registered with 'subscribe' command.
- *
+ * when a stream is created or disposed. The interface is registered with 'subscribe' command.
+ *
* When new stream is created, client must decide if it is interested in that particular stream instance.
* If not interested, client should send 'disconnect' command to allow remote peer to free resources and bandwidth.
* If not disconnected, client is required to send 'read' commands as necessary to prevent stream buffer overflow.
*/</font>
<font color=#7F0055>interface</font> StreamsListener {
-
+
<font color=#3F5FBF>/**
* Called when a new stream is created.
* <font color=#7F9FBF>@param</font> stream_type - source type of the stream.
@@ -268,15 +268,15 @@ Sent when a stream is disposed.
* Stream types and context IDs are defined by services that use Streams service to transmit data.
*/</font>
<font color=#7F0055>void</font> created(String stream_type, String stream_id, String context_id);
-
+
<font color=#3F5FBF>/**
- * Called when a stream is disposed.
+ * Called when a stream is disposed.
* <font color=#7F9FBF>@param</font> stream_type - source type of the stream.
* <font color=#7F9FBF>@param</font> stream_id - ID of the stream.
*/</font>
<font color=#7F0055>void</font> disposed(String stream_type, String stream_id);
}
-
+
<font color=#3F5FBF>/**
* Clients must subscribe for one or more stream types to be able to send or receive stream data.
* Subscribers receive notifications when a stream of given type is created or disposed.
@@ -287,7 +287,7 @@ Sent when a stream is disposed.
* <font color=#7F9FBF>@return</font> - pending command handle.
*/</font>
IToken subscribe(String stream_type, StreamsListener listener, DoneSubscribe done);
-
+
<font color=#3F5FBF>/**
* Call back interface for 'subscribe' command.
*/</font>
@@ -303,7 +303,7 @@ Sent when a stream is disposed.
* <font color=#7F9FBF>@return</font> - pending command handle.
*/</font>
IToken unsubscribe(String stream_type, StreamsListener listener, DoneUnsubscribe done);
-
+
<font color=#3F5FBF>/**
* Call back interface for 'unsubscribe' command.
*/</font>
@@ -325,7 +325,7 @@ Sent when a stream is disposed.
* <font color=#7F9FBF>@return</font> - pending command handle.
*/</font>
IToken read(String stream_id, <font color=#7F0055>int</font> size, DoneRead done);
-
+
<font color=#3F5FBF>/**
* Call back interface for 'read' command.
*/</font>
@@ -337,7 +337,7 @@ Sent when a stream is disposed.
* <font color=#7F9FBF>@param</font> lost_size - number of bytes that were lost because of buffer overflow.
* 'lost_size' -1 means unknown number of bytes were lost.
* if both 'lost_size' and 'data.length' are non-zero then lost bytes are considered
- * located right before read bytes.
+ * located right before read bytes.
* <font color=#7F9FBF>@param</font> data - bytes read from the stream.
* <font color=#7F9FBF>@param</font> eos - true if end of stream was reached.
*/</font>
@@ -358,7 +358,7 @@ Sent when a stream is disposed.
* <font color=#7F9FBF>@return</font> - pending command handle.
*/</font>
IToken write(String stream_id, <font color=#7F0055>byte</font>[] buf, <font color=#7F0055>int</font> offset, <font color=#7F0055>int</font> size, DoneWrite done);
-
+
<font color=#3F5FBF>/**
* Call back interface for 'write' command.
*/</font>
@@ -370,15 +370,15 @@ Sent when a stream is disposed.
*/</font>
<font color=#7F0055>void</font> doneWrite(IToken token, Exception error);
}
-
+
<font color=#3F5FBF>/**
- * Send End Of Stream marker to a stream. No more writing to the stream is allowed after that.
+ * Send End Of Stream marker to a stream. No more writing to the stream is allowed after that.
* <font color=#7F9FBF>@param</font> stream_id - ID of the stream.
* <font color=#7F9FBF>@param</font> done - command result call back object.
* <font color=#7F9FBF>@return</font> - pending command handle.
*/</font>
IToken eos(String stream_id, DoneEOS done);
-
+
<font color=#3F5FBF>/**
* Call back interface for 'eos' command.
*/</font>
@@ -398,7 +398,7 @@ Sent when a stream is disposed.
* <font color=#7F9FBF>@return</font> - pending command handle.
*/</font>
IToken disconnect(String stream_id, DoneDisconnect done);
-
+
<font color=#3F5FBF>/**
* Call back interface for 'disconnect' command.
*/</font>
diff --git a/docs/TCF Service - System Monitor.html b/docs/TCF Service - System Monitor.html
index fe1175703..2763e684f 100644
--- a/docs/TCF Service - System Monitor.html
+++ b/docs/TCF Service - System Monitor.html
@@ -5,9 +5,9 @@
</head>
<body lang='EN-US'>
-
+
<h1>Target Communication Framework Services - System Monitor</h1>
-
+
<ul>
<li><a href='#VersionHistory'>Version History</a>
<li><a href='#Overview'>Overview</a>
@@ -49,11 +49,11 @@ as zero terminated <a href='TCF Specification.html#JSON'>JSON</a> strings.</p>
<p>The service uses standard format for error reports,
see <a href='TCF Services.html#ErrorFormat'>Error Report Format</a>.</p>
-
+
<h2><a name='Cmds'>Commands</a></h2>
<h3><a name='CmdGetContext'>Get Context</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; SysMonitor &bull; getContext &bull; <i>&lt;string: context ID&gt;</i> &bull;
</font></b></pre>
@@ -62,7 +62,7 @@ C &bull; <i>&lt;token&gt;</i> &bull; SysMonitor &bull; getContext &bull; <i>&lt;
A context corresponds to an execution thread or process.
Context IDs are valid across TCF services, so it is allowed to issue 'SysMonitor.getContext'
command with a context that was obtained from another service.</p>
-
+
<p>Reply:</p>
<pre><b><font face="Courier New" size=2 color=#333399>
@@ -84,176 +84,176 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;c
<li><code><b><font face="Courier New" size=2 color=#333399>"ParentID" : <i>&lt;string&gt;</i></font></b></code>
- parent context ID.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"CWD" : <i>&lt;string&gt;</i></font></b></code>
- current working directory of the process.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"Root" : <i>&lt;string&gt;</i></font></b></code>
- the process's root directory (as set by chroot).
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"UID" : <i>&lt;int&gt;</i></font></b></code>
- User ID of the process owner.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"UGID" : <i>&lt;int&gt;</i></font></b></code>
- Group ID of the process owner.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"UserName" : <i>&lt;string&gt;</i></font></b></code>
- user name of the process owner.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"GroupName" : <i>&lt;string&gt;</i></font></b></code>
- group name of the process owner.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"PID" : <i>&lt;int&gt;</i></font></b></code>
- system process ID.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"File" : <i>&lt;string&gt;</i></font></b></code>
- executable file of the process.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"State" : <i>&lt;string&gt;</i></font></b></code>
- one character from the string "RSDZTW" where R is running, S is
sleeping in an interruptible wait, D is waiting in uninterruptible
disk sleep, Z is zombie, T is traced or stopped (on a signal), and W
is paging.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"PPID" : <i>&lt;int&gt;</i></font></b></code>
- system ID of the parent process.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"PGRP" : <i>&lt;int&gt;</i></font></b></code>
- the process group ID of the process.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"Session" : <i>&lt;int&gt;</i></font></b></code>
- the session ID of the process.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"TTY" : <i>&lt;int&gt;</i></font></b></code>
- the tty the process uses.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"TGID" : <i>&lt;int&gt;</i></font></b></code>
- the process group ID of the process which currently owns the tty that
the process is connected to.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"TracerPID" : <i>&lt;int&gt;</i></font></b></code>
- ID of a process that has attached this process for tracing or debugging.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"Flags" : <i>&lt;int&gt;</i></font></b></code>
- the kernel flags word of the process. Details depend on the kernel.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"MinFlt" : <i>&lt;int&gt;</i></font></b></code>
- the number of minor faults the process has made which have not
required loading a memory page from disk.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"CMinFlt" : <i>&lt;int&gt;</i></font></b></code>
- the number of minor faults that the process's waited-for children have made.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"MajFlt" : <i>&lt;int&gt;</i></font></b></code>
- the number of major faults the process has made which have required
loading a memory page from disk.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"CMajFlt" : <i>&lt;int&gt;</i></font></b></code>
- the number of major faults that the process's waited-for children
have made.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"UTime" : <i>&lt;int&gt;</i></font></b></code>
- the number of milliseconds that this process has been scheduled in user mode.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"STime" : <i>&lt;int&gt;</i></font></b></code>
- the number of milliseconds that this process has been scheduled in kernel mode.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"CUTime" : <i>&lt;int&gt;</i></font></b></code>
- the number of jiffies that this process's waited-for children have
been scheduled in user mode.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"CSTime" : <i>&lt;int&gt;</i></font></b></code>
- the number of jiffies that this process's waited-for children have
been scheduled in user mode.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"Priority" : <i>&lt;int&gt;</i></font></b></code>
- the standard nice value.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"Nice" : <i>&lt;int&gt;</i></font></b></code>
- the nice value.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"ITRealValue" : <i>&lt;int&gt;</i></font></b></code>
- the time in milliseconds before the next SIGALRM is sent to the process
due to an interval timer.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"StartTime" : <i>&lt;int&gt;</i></font></b></code>
- the time in milliseconds the process started after system boot.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"VSize" : <i>&lt;int&gt;</i></font></b></code>
- virtual memory size in bytes.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"PSize" : <i>&lt;int&gt;</i></font></b></code>
- memory pages size in bytes.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"RSS" : <i>&lt;int&gt;</i></font></b></code>
- resident Set Size: number of pages the process has in real memory,
minus used for administrative purposes. This is just the pages which
count towards text, data, or stack space. This does not include
pages which have not been demand-loaded in, or which are swapped out.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"RLimit" : <i>&lt;int&gt;</i></font></b></code>
- current limit in bytes on the rss of the process.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"CodeStart" : <i>&lt;int&gt;</i></font></b></code>
- the address above which program text can run.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"CodeEnd" : <i>&lt;int&gt;</i></font></b></code>
- the address below which program text can run.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"StackStart" : <i>&lt;int&gt;</i></font></b></code>
- the address of the start of the stack.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"Signals" : <i>&lt;int&gt;</i></font></b></code>
- the bitmap of pending signals.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"SigBlock" : <i>&lt;int&gt;</i></font></b></code>
- the bitmap of blocked signals.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"SigIgnore" : <i>&lt;int&gt;</i></font></b></code>
- the bitmap of ignored signals.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"SigCatch" : <i>&lt;int&gt;</i></font></b></code>
- the bitmap of caught signals.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"WChan" : <i>&lt;int&gt;</i></font></b></code>
- this is the "channel" in which the process is waiting. It is the
address of a system call, and can be looked up in a namelist if you
need a textual name.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"NSwap" : <i>&lt;int&gt;</i></font></b></code>
- number of pages swapped.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"CNSwap" : <i>&lt;int&gt;</i></font></b></code>
- cumulative NSwap for child processes.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"ExitSignal" : <i>&lt;int&gt;</i></font></b></code>
- signal to be sent to parent when this process exits.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"Processor" : <i>&lt;int&gt;</i></font></b></code>
- CPU number last executed on.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"RTPriority" : <i>&lt;int&gt;</i></font></b></code>
- real-time scheduling priority.
-
+
<li><code><b><font face="Courier New" size=2 color=#333399>"Policy" : <i>&lt;int&gt;</i></font></b></code>
- scheduling policy.
</ul>
<h3><a name='CmdGetChildren'>Get Children</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; SysMonitor &bull; getChildren &bull; <i>&lt;string: parent context ID&gt;</i> &bull;
</font></b></pre>
<p>The command requests a list of contexts available for System Monitor commands.</p>
-
+
<p>Parent context ID can be null &ndash; to retrieve top level of the hierarchy, can be one
of context IDs retrieved by previous getChildren commands, or it can be obtained from another service.
Contexts hierarchy can be simple plain list or it can form a tree. It is up to target agent developers to
choose layout that is most descriptive for a given target.</p>
-
+
<p>Reply:</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;array of context IDs&gt;</i> &bull;
@@ -261,22 +261,22 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;a
&rArr; null
&rArr; [ ]
&rArr; [ <i>&lt;context ID list&gt;</i> ]
-
+
<i>&lt;context ID list&gt;</i>
&rArr; <i>&lt;string: context ID&gt;</i>
&rArr; <i>&lt;context ID list&gt;</i> , <i>&lt;string: context ID&gt;</i>
</font></b></pre>
<h3><a name='CmdGetCommandLine'>Get Command Line</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; SysMonitor &bull; getCommandLine &bull; <i>&lt;string: context ID&gt;</i> &bull;
</font></b></pre>
<p>The command requests a list of progess command line arguments.</p>
-
+
<p>Reply:</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;array of string&gt;</i> &bull;
@@ -284,22 +284,22 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;a
&rArr; null
&rArr; [ ]
&rArr; [ <i>&lt;string list&gt;</i> ]
-
+
<i>&lt;string list&gt;</i>
&rArr; <i>&lt;string&gt;</i>
&rArr; <i>&lt;string list&gt;</i> , <i>&lt;string&gt;</i>
</font></b></pre>
<h3><a name='CmdGetEnvironment'>Get Environment</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; SysMonitor &bull; getEnvironment &bull; <i>&lt;string: context ID&gt;</i> &bull;
</font></b></pre>
<p>The command requests a list of progess environment variables.</p>
-
+
<p>Reply:</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;array of string&gt;</i> &bull;
</font></b></pre>
@@ -309,7 +309,7 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;a
<p>No events are currently defined for System Monitor service.</p>
<h2><a name='API'>API</a></h2>
-
+
<pre>
<font color=#7F0055>public interface</font> ISysMonitor <font color=#7F0055>extends</font> IService {
@@ -317,8 +317,8 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;a
<font color=#3F5FBF>/**
* Retrieve context info for given context ID.
- *
- * <font color=#7F9FBF>@param</font> id &ndash; context ID.
+ *
+ * <font color=#7F9FBF>@param</font> id &ndash; context ID.
* <font color=#7F9FBF>@param</font> done - callback interface called when operation is completed.
*/</font>
IToken getContext(String id, DoneGetContext done);
@@ -337,10 +337,10 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;a
<font color=#3F5FBF>/**
* Retrieve children of given context.
- *
+ *
* <font color=#7F9FBF>@param</font> parent_context_id &ndash; parent context ID. Can be null &ndash;
* to retrieve top level of the hierarchy, or one of context IDs retrieved
- * by previous getContext or getChildren commands.
+ * by previous getContext or getChildren commands.
* <font color=#7F9FBF>@param</font> done - callback interface called when operation is completed.
*/</font>
IToken getChildren(String parent_context_id, DoneGetChildren done);
@@ -356,171 +356,171 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;a
*/</font>
<font color=#7F0055>void</font> doneGetChildren(IToken token, Exception error, String[] context_ids);
}
-
+
<font color=#3F5FBF>/**
* Context property names.
*/</font>
<font color=#7F0055>static final</font> String
<font color=#3F5FBF>/** The TCF context ID */</font>
PROP_ID = "ID",
-
+
<font color=#3F5FBF>/** The TCF parent context ID */</font>
PROP_PARENTID = "ParentID",
-
+
<font color=#3F5FBF>/** Current working directory of the process */</font>
PROP_CWD = "CWD",
-
+
<font color=#3F5FBF>/** The process's root directory (as set by chroot) */</font>
PROP_ROOT = "Root",
-
+
<font color=#3F5FBF>/** User ID of the process owner */</font>
PROP_UID = "UID",
-
+
<font color=#3F5FBF>/** Group ID of the process owner */</font>
PROP_UGID = "UGID",
-
+
<font color=#3F5FBF>/** User name of the process owner */</font>
PROP_USERNAME = "UserName",
-
+
<font color=#3F5FBF>/** Group name of the process owner */</font>
PROP_GROUPNAME = "GroupName",
-
+
<font color=#3F5FBF>/** System process ID */</font>
PROP_PID = "PID",
-
+
<font color=#3F5FBF>/** Executable file of the process */</font>
PROP_FILE = "File",
-
+
<font color=#3F5FBF>/** One character from the string "RSDZTW" where R is running, S is
* sleeping in an interruptible wait, D is waiting in uninterruptible
* disk sleep, Z is zombie, T is traced or stopped (on a signal), and W
* is paging.*/</font>
PROP_STATE = "State",
-
+
<font color=#3F5FBF>/** System ID of the parent process */</font>
PROP_PPID = "PPID",
-
+
<font color=#3F5FBF>/** The process group ID of the process */</font>
PROP_PGRP = "PGRP",
-
+
<font color=#3F5FBF>/** The session ID of the process */</font>
PROP_SESSION = "Session",
-
+
<font color=#3F5FBF>/** The tty the process uses */</font>
PROP_TTY = "TTY",
-
+
<font color=#3F5FBF>/** The process group ID of the process which currently owns the tty that
* the process is connected to. */</font>
PROP_TGID = "TGID",
-
+
<font color=#3F5FBF>/** ID of a process that has attached this process for tracing or debugging */</font>
PROP_TRACERPID = "TracerPID",
-
+
<font color=#3F5FBF>/** The kernel flags word of the process. Details depend on the kernel */</font>
PROP_FLAGS = "Flags",
-
+
<font color=#3F5FBF>/** The number of minor faults the process has made which have not
* required loading a memory page from disk */</font>
PROP_MINFLT = "MinFlt",
-
+
<font color=#3F5FBF>/** The number of minor faults that the process's waited-for children have made */</font>
- PROP_CMINFLT = "CMinFlt",
-
+ PROP_CMINFLT = "CMinFlt",
+
<font color=#3F5FBF>/** The number of major faults the process has made which have required
* loading a memory page from disk */</font>
PROP_MAJFLT = "MajFlt",
-
+
<font color=#3F5FBF>/** The number of major faults that the process's waited-for children
* have made */</font>
PROP_CMAJFLT = "CMajFlt",
-
+
<font color=#3F5FBF>/** The number of milliseconds that this process has been scheduled in user mode */</font>
PROP_UTIME = "UTime",
-
+
<font color=#3F5FBF>/** The number of milliseconds that this process has been scheduled in kernel mode */</font>
PROP_STIME = "STime",
-
+
<font color=#3F5FBF>/** The number of jiffies that this process's waited-for children have
* been scheduled in user mode */</font>
PROP_CUTIME = "CUTime",
-
+
<font color=#3F5FBF>/** The number of jiffies that this process's waited-for children have
* been scheduled in user mode */</font>
PROP_CSTIME = "CSTime",
-
+
<font color=#3F5FBF>/** The standard nice value */</font>
PROP_PRIORITY = "Priority",
-
+
<font color=#3F5FBF>/** The nice value */</font>
PROP_NICE = "Nice",
-
+
<font color=#3F5FBF>/** The time in milliseconds before the next SIGALRM is sent to the process
* due to an interval timer */</font>
PROP_ITREALVALUE = "ITRealValue",
-
+
<font color=#3F5FBF>/** The time in milliseconds the process started after system boot */</font>
PROP_STARTTIME = "StartTime",
-
+
<font color=#3F5FBF>/** Virtual memory size in bytes */</font>
PROP_VSIZE = "VSize",
-
+
<font color=#3F5FBF>/** Memory pages size in bytes */</font>
PROP_PSIZE = "PSize",
-
+
<font color=#3F5FBF>/** Resident Set Size: number of pages the process has in real memory,
* minus used for administrative purposes. This is just the pages which
* count towards text, data, or stack space. This does not include
* pages which have not been demand-loaded in, or which are swapped out */</font>
PROP_RSS = "RSS",
-
+
<font color=#3F5FBF>/** Current limit in bytes on the rss of the process */</font>
PROP_RLIMIT = "RLimit",
-
+
<font color=#3F5FBF>/** The address above which program text can run */</font>
PROP_CODESTART = "CodeStart",
-
+
<font color=#3F5FBF>/** The address below which program text can run */</font>
PROP_CODEEND = "CodeEnd",
-
+
<font color=#3F5FBF>/** The address of the start of the stack */</font>
PROP_STACKSTART = "StackStart",
-
+
<font color=#3F5FBF>/** The bitmap of pending signals */</font>
PROP_SIGNALS = "Signals",
-
+
<font color=#3F5FBF>/** The bitmap of blocked signals */</font>
PROP_SIGBLOCK = "SigBlock",
-
+
<font color=#3F5FBF>/** The bitmap of ignored signals */</font>
PROP_SIGIGNORE = "SigIgnore",
-
+
<font color=#3F5FBF>/** The bitmap of caught signals */</font>
PROP_SIGCATCH = "SigCatch",
-
+
<font color=#3F5FBF>/** This is the "channel" in which the process is waiting. It is the
* address of a system call, and can be looked up in a name list if you
* need a textual name */</font>
PROP_WCHAN = "WChan",
-
+
<font color=#3F5FBF>/** Number of pages swapped */</font>
PROP_NSWAP = "NSwap",
-
+
<font color=#3F5FBF>/** Cumulative NSwap for child processes */</font>
PROP_CNSWAP = "CNSwap",
-
+
<font color=#3F5FBF>/** Signal to be sent to parent when this process exits */</font>
PROP_EXITSIGNAL = "ExitSignal",
-
+
<font color=#3F5FBF>/** CPU number last executed on */</font>
PROP_PROCESSOR = "Processor",
-
+
<font color=#3F5FBF>/** Real-time scheduling priority */</font>
PROP_RTPRIORITY = "RTPriority",
-
+
<font color=#3F5FBF>/** Scheduling policy */</font>
PROP_POLICY = "Policy";
-
-
+
+
<font color=#3F5FBF>/**
* A context corresponds to an execution thread, process, address space, etc.
* A context can belong to a parent context. Contexts hierarchy can be simple
@@ -528,113 +528,113 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;a
* layout that is most descriptive for a given target. Context IDs are valid across
* all services. In other words, all services access same hierarchy of contexts,
* with same IDs, however, each service accesses its own subset of context's
- * attributes and functionality, which is relevant to that service.
+ * attributes and functionality, which is relevant to that service.
*/</font>
<font color=#7F0055>interface</font> SysMonitorContext {
-
- <font color=#3F5FBF>/**
+
+ <font color=#3F5FBF>/**
* Get context ID.
* Same as getProperties().get(&ldquo;ID&rdquo;)
*/</font>
String getID();
- <font color=#3F5FBF>/**
+ <font color=#3F5FBF>/**
* Get parent context ID.
* Same as getProperties().get(&ldquo;ParentID&rdquo;)
*/</font>
String getParentID();
- <font color=#3F5FBF>/**
+ <font color=#3F5FBF>/**
* Get process group ID.
* Same as getProperties().get(&ldquo;PGRP&rdquo;)
*/</font>
<font color=#7F0055>long</font> getPGRP();
- <font color=#3F5FBF>/**
+ <font color=#3F5FBF>/**
* Get process ID.
* Same as getProperties().get(&ldquo;PID&rdquo;)
*/</font>
<font color=#7F0055>long</font> getPID();
- <font color=#3F5FBF>/**
+ <font color=#3F5FBF>/**
* Get process parent ID.
* Same as getProperties().get(&ldquo;PPID&rdquo;)
*/</font>
<font color=#7F0055>long</font> getPPID();
- <font color=#3F5FBF>/**
+ <font color=#3F5FBF>/**
* Get process TTY group ID.
* Same as getProperties().get(&ldquo;TGID&rdquo;)
*/</font>
<font color=#7F0055>long</font> getTGID();
- <font color=#3F5FBF>/**
+ <font color=#3F5FBF>/**
* Get tracer process ID.
* Same as getProperties().get(&ldquo;TracerPID&rdquo;)
*/</font>
<font color=#7F0055>long</font> getTracerPID();
- <font color=#3F5FBF>/**
+ <font color=#3F5FBF>/**
* Get process owner user ID.
* Same as getProperties().get(&ldquo;UID&rdquo;)
*/</font>
<font color=#7F0055>long</font> getUID();
- <font color=#3F5FBF>/**
+ <font color=#3F5FBF>/**
* Get process owner user name.
* Same as getProperties().get(&ldquo;UserName&rdquo;)
*/</font>
String getUserName();
- <font color=#3F5FBF>/**
+ <font color=#3F5FBF>/**
* Get process owner user group ID.
* Same as getProperties().get(&ldquo;UGID&rdquo;)
*/</font>
<font color=#7F0055>long</font> getUGID();
- <font color=#3F5FBF>/**
+ <font color=#3F5FBF>/**
* Get process owner user group name.
* Same as getProperties().get(&ldquo;GroupName&rdquo;)
*/</font>
String getGroupName();
-
- <font color=#3F5FBF>/**
+
+ <font color=#3F5FBF>/**
* Get process state.
* Same as getProperties().get(&ldquo;State&rdquo;)
*/</font>
String getState();
- <font color=#3F5FBF>/**
+ <font color=#3F5FBF>/**
* Get process virtual memory size in bytes.
* Same as getProperties().get(&ldquo;VSize&rdquo;)
*/</font>
<font color=#7F0055>long</font> getVSize();
- <font color=#3F5FBF>/**
+ <font color=#3F5FBF>/**
* Get process virtual memory page size in bytes.
* Same as getProperties().get(&ldquo;PSize&rdquo;)
*/</font>
<font color=#7F0055>long</font> getPSize();
- <font color=#3F5FBF>/**
+ <font color=#3F5FBF>/**
* Get number of memory pages in process resident set.
* Same as getProperties().get(&ldquo;RSS&rdquo;)
*/</font>
<font color=#7F0055>long</font> getRSS();
- <font color=#3F5FBF>/**
+ <font color=#3F5FBF>/**
* Get context executable file.
* Same as getProperties().get(&ldquo;File&rdquo;)
*/</font>
String getFile();
- <font color=#3F5FBF>/**
+ <font color=#3F5FBF>/**
* Get context current file system root.
* Same as getProperties().get(&ldquo;Root&rdquo;)
*/</font>
String getRoot();
- <font color=#3F5FBF>/**
+ <font color=#3F5FBF>/**
* Get context current working directory.
* Same as getProperties().get(&ldquo;CWD&rdquo;)
*/</font>
@@ -646,21 +646,21 @@ R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull; <i>&lt;a
*/</font>
Map&lt;String,Object&gt; getProperties();
}
-
- <font color=#3F5FBF>/**
+
+ <font color=#3F5FBF>/**
* Get context command line.
*/</font>
IToken getCommandLine(String id, DoneGetCommandLine done);
-
+
<font color=#7F0055>interface</font> DoneGetCommandLine {
<font color=#7F0055>void</font> doneGetCommandLine(IToken token, Exception error, String[] cmd_line);
}
- <font color=#3F5FBF>/**
+ <font color=#3F5FBF>/**
* Get context environment variables.
*/</font>
IToken getEnvironment(String id, DoneGetEnvironment done);
-
+
<font color=#7F0055>interface</font> DoneGetEnvironment {
<font color=#7F0055>void</font> doneGetEnvironment(IToken token, Exception error, String[] environment);
}
diff --git a/docs/TCF Services.html b/docs/TCF Services.html
index 61b1aadf6..4b84061ff 100644
--- a/docs/TCF Services.html
+++ b/docs/TCF Services.html
@@ -5,12 +5,12 @@
</head>
<body lang='EN-US'>
-
+
<h1>Target Communication Framework Services</h1>
-
+
<p>Copyright (c) 2007 Wind River Systems, Inc. Made available under the EPL v1.0
<p>Direct comments, questions to the <a href="mailto:dsdp-tcf-dev@eclipse.org">dsdp-tcf-dev@eclipse.org</a> mailing list
-
+
<h2>Table of Contents</h2>
<ul>
<li><a href='#VersionHistory'>Version History</a>
@@ -48,13 +48,13 @@ For example, <a href='TCF Service - Memory.html'>Memory Service</a> defines grou
reading and writing target memory.
Service definitions are not part of the <a href='TCF Specification.html'>framework specification</a>, and new services
are expected to be defined by developers of tools and target agents.
-Defenitions of standard services are provided to achieve certain level of compatibility between tools and targets.
-
+Defenitions of standard services are provided to achieve certain level of compatibility between tools and targets.
+
<h2><a name='Syntax'>Syntax Rules Notation</a></h2>
-
+
<p>Format of the protocol messages is defined by syntax rules. Syntax is described
using a simple variant of Backus-Naur Form. In particular:</p>
-
+
<ul type='disc'>
<li>Italic lower case words in a courier font, enclosed into angular brackets, are
used to denote syntactic categories, for example:&nbsp;<b><i><font face="Courier New" size=2 color=#333399>&lt;token&gt;.
@@ -62,12 +62,12 @@ using a simple variant of Backus-Naur Form. In particular:</p>
of the category, for example: <b><i><font face="Courier New" size=2 color=#333399>&lt;int:
error code&gt;</font></i></b> has same meaning as <b><i><font face="Courier New" size=2 color=#333399>&lt;int&gt;</font></i></b>,
but denotes that the integer number used to indicate an "error code".
-
+
<li>A syntax rule consists of a category designation followed by one or more syntax
definitions for the category. The category name and each definition are placed on
separate lines, bullets are used to denote definitions, for example:
</ul>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
<i>&lt;chars&gt;</i>
&rArr; <i>&lt;char&gt;</i>
@@ -76,17 +76,17 @@ using a simple variant of Backus-Naur Form. In particular:</p>
<ul type='disc'>
<li>Spaces are added for readability only and they are not part of the syntax.
-
+
<li>All text in the category definition, other than categories and spaces, is UTF-8
based representation of a message bytes.
-
- <li>The symbol &lsquo;&bull;&rsquo; designates a zero byte.
+
+ <li>The symbol &lsquo;&bull;&rsquo; designates a zero byte.
</ul>
<h2><a name='ErrorFormat'>Error Report Format</a></h2>
<p>Most of TCF standard services use same format for error reporting:</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
<i>&lt;error report&gt;</i>
&rArr;
@@ -205,4 +205,4 @@ same way as "OTHER".</p>
</body>
</html>
-
+
diff --git a/docs/TCF Specification.html b/docs/TCF Specification.html
index e808f0b5e..5b443425c 100644
--- a/docs/TCF Specification.html
+++ b/docs/TCF Specification.html
@@ -4,14 +4,14 @@
<title>Target Communication Framework Specification</title>
</head>
<body lang='EN-US'>
-
+
<h1>Target Communication Framework Specification</h1>
-
+
<p>Copyright (c) 2007, 2008 Wind River Systems, Inc. Made available under the EPL v1.0
<p>Direct comments, questions to the <a href="mailto:dsdp-tcf-dev@eclipse.org">dsdp-tcf-dev@eclipse.org</a> mailing list
<h1>Table of Contents</h1>
-
+
<ul>
<li><a href='#VersionHistory'>Version History</a>
<li><a href='#Overview'>Overview</a>
@@ -70,28 +70,28 @@
<td>2009-03-04
<td>Added N message
</table>
-
+
<h1><a name='Overview'>Overview</a></h1>
-
+
<p>Today almost every device software development tool on the market has its own method
of communication with target system. Communication methods often require individual setup,
configuration and maintenance, impose unnecessary limitations.
Target Communication Framework goal is to establish common ground in
the area of communication protocols between development tools and embedded devices.</p>
-
+
<p>The goal is a single protocol used to communicate between all tools and targets:</p>
<p><img src='TCF Specification Image1.png'></p>
-
+
<h2><a name='Goals'>Goals</a></h2>
-
+
<ul type='disc'>
<li>Universal, simple, lightweight, vendor agnostic framework for tools and targets
to communicate for purpose of debugging, profiling, code patching and other device
software development needs.
-
+
<li>Single configuration per target (not per tool per target as today in most cases),
or no configuration when possible.
-
+
<li>Minimal overhead and footprint on target side.
</ul>
@@ -100,125 +100,125 @@ the area of communication protocols between development tools and embedded devic
<dl>
<dt><b>Peer:</b> <dd>communication endpoint. Both hosts and targets are called peers. A
peer can act as a client or a server depending on services it implements.
-
+
<dt><b>Service:</b> <dd>group of related commands, events and semantic define a service.
A service can be discovered, added or removed as a group at communication endpoint.
-
+
<dt><b>Message:</b> <dd>a packet of data, formatted according to framework specification
and transmitted over communication channel.
-
+
<dt><b>Channel:</b> <dd>communication link connecting two endpoints (peers). A single
channel may be used to communicate with multiple services. Multiple channels may
be used to connect the same peers, however no command or event ordering is guaranteed
across channels.
-
+
<dt><b>Command:</b> <dd>command is a message sent to remote peer in order to request some
predefined action there.
-
+
<dt><b>Result:</b> <dd>result is a message sent as a response to a command.
-
+
<dt><b>Event:</b> <dd>event is a message sent to all interested parties in order to notify
them about state changes.
</dl>
<h2><a name='Requirements'>Requirements</a></h2>
-
+
<ul type='disc'>
<li>Simple and extensible protocol.
-
+
<li>Small footprint on the target.
-
+
<li>Fully asynchronous, message based communication.
-
+
<li>Two ways of message routing:
<ul>
<li>Point to point request/response (command/result) communication.
-
+
<li>Subscription based broadcast of notifications (events).
- </ul>
-
+ </ul>
+
<li>Full duplex, symmetric communication: both host and target should be able to send
commands and events at same time, though ability to establish communication channel
can be limited to host only.
-
+
<li>For each communication channel between two peers, the framework should preserve
order of commands, results and events.
-
+
<li>Support for slow and high latency connections.
-
+
<li>Transport protocol agnostic. The framework should work well, at least, on top
of: TCP/IP, UDP, USB, RS232 and JTAG.
-
+
<li>The framework should support multiplexing, that is, single target device shared
between multiple tools at same time. To reduce footprint on the target, multiplexing
can be implemented on host if needed.
-
+
<li>Dynamic discovery of participating targets and hosts. No configuration when possible.
-
+
<li>Dynamic discovery of available services (high level protocols, command sets).
Clients can query for available services.
-
+
<li>Services can be added and removed dynamically.
-
+
<li>Framework should define a set of common high level interfaces (services). For
example: flow control, memory access, registers access, up-load mechanism, kernel
awareness, run control, target file system, console, flash programming. Implementation
of these interfaces is optional, but if provided it will support much wider compatibility
with various tools.
-
+
<li>Framework should be layered in such a way so it is possible to use different transport
- medias (e.g. TCP/IP, RS232, USB, etc) without any changes to individual services.
+ medias (e.g. TCP/IP, RS232, USB, etc) without any changes to individual services.
In other words, transport implementation should be services agnostic, and services
implementation should be transport agnostic.
-
+
<li>Each service defines how marshalling is done for command, result and event arguments.
This allows existing target agents to remain unchanged.
-
+
<li>Framework should define a preferred marshalling mechanism that new services can
use.
-
+
<li>The definition of services (groups of related commands and events) is separate
from the definition of the framework itself. The framework provides unified communication
mechanism, while services use it to communicate with its clients.
-
+
<li>Anybody (including 3rd parties) can add services without having to modify communication
protocol or framework software.
-
+
<li>The framework should support tunneling through a proxy. Proxy may be used, for
example:
-
+
<ul type='circle'>
- <li>to bridge different transport protocols, like TCP and RS232;
-
- <li>to make a RS232 or USB target connection accessible from multiple hosts;
-
+ <li>to bridge different transport protocols, like TCP and RS232;
+
+ <li>to make a RS232 or USB target connection accessible from multiple hosts;
+
<li>to access targets behind firewalls or otherwise not directly accessible
</ul>
-
+
<li>A proxy should be able to provide services in addition to those implemented by
a target. Such distribution of services allows target services to be implemented on
a host, thereby reducing the footprint on the target. For example, debug information,
stack back trace or OS awareness can be implemented by a proxy on a host. To provide
this functionality, proxy services would typically use low-level target services,
like memory access.
-
+
<li>Supports of concurrent requests. Maximum number of concurrent requests (window
size) can be limited on target side. Simple agents only have to support window size
of 1. Framework should maintain a queue of additional requests, so tools don't need
to know the window size. This may only be relevant for certain transport protocols
e.g. UDP.
-
+
<li>Events can be broadcasted at any time, i.e. no polling should be required.
-
+
<li>Protocol should support a standard mechanism of sending data larger than MTU.
</ul>
-
+
<h2><a name='Syntax'>Syntax Rules Notation</a></h2>
-
+
<p>Format of the protocol messages is defined by syntax rules. Syntax is described
using a simple variant of Backus-Naur Form. In particular:</p>
-
+
<ul type='disc'>
<li>Italic lower case words in a courier font, enclosed into angular brackets, are
used to denote syntactic categories, for example: <b><i><font face="Courier New" size=2 color=#333399>&lt;token&gt;.
@@ -226,7 +226,7 @@ using a simple variant of Backus-Naur Form. In particular:</p>
of the category, for example: <b><i><font face="Courier New" size=2 color=#333399>&lt;int:
error code&gt;</font></i></b> has same meaning as <b><i><font face="Courier New" size=2 color=#333399>&lt;int&gt;</font></i></b>,
but denotes that the integer number used to indicate an &ldquo;error code&rdquo;.
-
+
<li>A syntax rule consists of a category designation followed by one or more syntax
definitions for the category. The category name and each definition are placed on
separate lines, bullets are used to denote definitions, for example:
@@ -237,13 +237,13 @@ using a simple variant of Backus-Naur Form. In particular:</p>
</font></b></pre>
<li>Spaces are added for readability only and they are not part of the syntax.
-
+
<li>All text in the category definition, other then categories and spaces, is UTF-8
based representation of a message bytes.
-
- <li>The symbol &lsquo;&bull;&rsquo; designates a zero byte.
+
+ <li>The symbol &lsquo;&bull;&rsquo; designates a zero byte.
</ul>
-
+
<h1><a name='Design'>Framework Software Design Considerations</a></h1>
<p>The framework will be packaged, distributed and installed on a host as separate
@@ -251,7 +251,7 @@ product. It should be installed as system service and require no configuration f
most common case &ndash; target connected over TCP or UDP on a local network. For more complicated
setup, framework should have easily accessible and user friendly GUI with all relevant
configuration options.</p>
-
+
<p>Framework should use a dynamic discovery protocol to locate targets and other hosts
running instances of the framework when possible, and maintain a dynamic list of available
communication endpoints, as well as lists of services available at each endpoint.
@@ -261,49 +261,49 @@ JTAG to a remote host. It should also be possible to add target configuration ma
Development tools will access this data through the Locator Service API and use it,
for example, to present a user a list of available targets that have capabilities
needed by a particular tool.</p>
-
+
<p>Framework should provide software libraries to be used by tools and target agents
developers. The libraries should be available at least for ANSI C and Java. On host
side, at least Windows, Solaris and Linux must be supported. Libraries will provide
APIs for low-level communication protocol, Locator Service, preferred marshaling and
predefined common services.</p>
-
+
<p>The proposed target communication protocol is text-based. It allows extensions,
which define messages with blocks of binary data, but it is not a recommended data
formatting, and its usage is supposed to be limited. Text-based protocols have both
advantages and disadvantages in compare with binary protocols.</p>
-
+
<p>Advantages:</p>
-
+
<ul type='disc'>
<li>The software for text-based protocols is easier to develop and debug since they
use a relatively human-friendly communication.
-
+
<li>It is possible to use huge selection of existing tools and library routines to
view, edit, validate, and transform text-based data.
-
+
<li>Text based definition is in line with current trend in Internet protocols: most
popular protocols such as SMTP and HTTP are text-based.
</ul>
-
+
<p>Disadvantages:</p>
-
+
<ul type='disc'>
<li>Text-based protocols usually need more bytes to store numerical data than binary
protocols do.
-
+
<li>Parsing of text-based data is not efficient compared to parsing of binary data
since text-based data is usually not stored in a way similar to how it is stored in
computer memory.
-
+
<li>It is seldom possible to read only part of a text-based message since the exact
byte offset to a data item is generally not known.
</ul>
-
+
<p>A possible alternative to consider is binary, variable length encoding like BaseStream.</p>
-
+
<h2><a name='Concurrency'>Concurrency</a></h2>
-
+
<p>Concurrent asynchronous communication is much faster then synchronous, because
it alleviates communication channel latency and allows better bandwidth utilization.
But it also requires proper design of framework software. Concurrency, in general,
@@ -316,7 +316,7 @@ execution path is strictly contained in predefined subset of code (compartment),
no code, except for reentrant libraries, is executed by multiple threads. Each compartment
has a message queue and other threads communicate with the compartment thread by posting
messages to the queue.</p>
-
+
<p>Framework APIs are designed to be compatible with the compartment threading model.
Hence the API functions do not contain any thread synchronization primitives to protect
against multiple threads using the functions. All framework APIs belong to a single
@@ -329,15 +329,15 @@ such as Java, this is typically done by a single callback object argument contai
both the data and the function. The result listener is called asynchronously when
the job is done. This approach is commonly known as asynchronous<b>, </b>event-driven<b>
</b>or<b> </b>callback-based<b> </b>programming<b>.</b></p>
-
+
<p>One important characteristic of an asynchronous code is that the methods defined
by the user will often be called from within the framework itself, rather than from
the user's application code. The framework often plays the role of the main program
in coordinating and sequencing application activity. This phenomenon is called Inversion
of Control (also known as the Hollywood Principle - "Don't call us, we'll call you").</p>
-
+
<h2><a name='Reflection'>Reflection</a></h2>
-
+
<p>Communication between development tools and embedded devices must allow a host
to collect target side data and build a reflection of target state. Reflection is
usually incomplete &ndash; a subset of all remote data. Reflection is always delayed &ndash; it
@@ -345,36 +345,36 @@ represents a remote peer state in the past. Reflection can be updated by polling
data changes or by listening to events (event is communication message that is sent
asynchronously by a peer to notify others about state change). Reflection is correct
if it represents a state that actually did happen on remote peer.</p>
-
+
<p>Reflection is coherent if it is exactly equal to subset of peer state at a single
moment of time and that moment of time is not too far in the past. Non-coherent reflection
can have parts of data representing peer state at different moments of time. Coherent
reflection is more valuable for a user, because non-coherent reflection can have logically
conflicting data if that data was collected at different time.</p>
-
+
<p>Traditionally, debuggers would ensure coherence of state reflection by collecting
data only while target is suspended, and flushing all (or most) reflection data (reducing
observed subset to zero) when target is resumed. This approach does not work well
for multithreaded, multicore or real time targets. Maintaining correctness and coherence
of a non-empty reflection while target is running requires additional support from
target agent, communication software and debugger itself.</p>
-
+
<p>Since remote peer state is changing over time, coherent reflection can be built
only if:</p>
-
+
<ul type='disc'>
<li>Observed subset of state is properly selected and dynamically re-selected. Observing
too much can overflow communication channel. Observing too little has little value
for a user.
-
+
<li>Observer is listening to all relevant events.
-
+
<li>Events are coming in exactly same order as corresponding changes happen.
-
+
<li>Events are properly ordered relative to other messages that carry state data.
-
+
<li>All changes in observed subset of peer state are reported by events.
-
+
<li>All event messages must either contain a complete description of a change or they
all should not contain any state data at all. If client is getting some data from
events and required to retrieve new values of other changed data by using other means
@@ -383,24 +383,24 @@ only if:</p>
Sending deltas with events is usually more efficient then using data retrieval commands
to update reflection.
</ul>
-
+
<h2><a name='Ordering'>Message ordering</a></h2>
-
+
<p>The transmission order of commands, results and events is important, it coveys
valuable information about target state transitions and it should be preserved when
possible. Consider an example:</p>
-
+
<p>Client transmits: </p>
-
+
<pre>
Command X=2
</pre>
<p>Then, as result of some activity of another client or the target itself, X is assigned
value 3.</p>
-
+
<p>Target transmits:</p>
-
+
<pre>
Event X=3
Result X=2
@@ -414,12 +414,12 @@ will have no clue what to show &ndash; 2 or 3. In fact, the client will have to
decision about each message it receives: either trust message data as correct last
known target state, or assume the message came in out-of-order and ignore it, or re-request
the information from the target.</p>
-
+
<p>Note that re-requesting data from the target, in general, does not solve the problem
of interpretation of messages when order is not preserved. For example, after sending
a request to read value of X, X could change at about the same time, and client could
receive:</p>
-
+
<pre>
Event X=2
Result X=3
@@ -431,10 +431,10 @@ last one. A client could assume value of X unknown every time it receives a noti
of X change, and then re-request the data again. But this is expensive and, if events
coming in frequently, client can end up in infinite loop re-requesting the data again
and again, and it will never have trustworthy data about current target state.</p>
-
+
<p>Developers should be careful when using multithreading or multiple queues in software
design &ndash; it can easily cause message reordering.</p>
-
+
<p>The framework itself is required to preserve message order. However, if for whatever
reason a target agent cannot preserve message order, the result will be that clients
of the service can receive messages in the wrong order. When this is the case it should
@@ -442,57 +442,57 @@ be well documented, so tools developers are aware and can make the best of the s
In most cases it will not cause any trouble, but there is no perfect way to restore
actual sequence of events and maintain data coherency after ordering was lost, and
in some cases it can severely impact tool functionality and user experience.</p>
-
+
<h1><a name='Transport'>Transport Layer</a></h1>
-
+
<p>Tools are required to be transport protocol agnostic, so most of the layer functionality
is used internally by framework and is not exposed to clients. This layer maintains
a collection of transport protocol handlers. Each handler is designed to provide:</p>
-
+
<ul type='disc'>
<li>Enumeration of available peers, including both automatically discovered and manually
configured peers. Handler fires notification events when peers are added or removed.
Enumeration can be implemented by scanning JTAG chain, by broadcasting special UDP
packet and waiting for responses, by communicating with ICE hardware, or by any other
suitable means.
-
+
<li>Bidirectional point-to-point communication of data packets. Packets are arrays
of bytes of arbitrary size.
Transport handler and underlying protocol are responsible for adding all necessary
control data, headers, error checking bits, addresses, fragmentation/defragmentation,
flow control, transmission retries and whatever necessary to ensure lossless, order-preserving
delivery of packets.
-
+
<li>Configuration UI should allow user to inspect and modify properties of both manually
configured and automatically discovered peers, setup new peers, view connections status
and statistics.
</ul>
-
+
<p>Existing service discovery protocols can be used together with the framework, for
example:</p>
-
+
<ul type='disc'>
<li>Zero Configuration Networking (Zeroconf), see <a href='http://www.zeroconf.org/'>http://www.zeroconf.org</a>;
-
+
<li>Service Location Protocol (SLP), developed by the IETF;
-
+
<li>Jini, which is Sun's Java-base approach to service discovery, see <a href='http://www.sun.com/jini'>http://www.sun.com/jini</a>;
-
+
<li>Salutation, developed by an open industry consortium, called the Salutation Consortium;
-
+
<li>Microsoft's Universal Plug and Play (UPnP), see <a href='http://www.upnp.org/'>http://www.upnp.org</a>;
-
+
<li>Bluetooth Service Discovery Protocol (SDP).
</ul>
-
+
<p>Service discovery protocols, as well as transport protocols will be supported by
framework plug-ins, they are not part of framework code itself, and they can be developed
by 3rd parties. Note that existing discovery protocols define term &ldquo;service&rdquo; differently
- as an independent communication endpoint (usually a TCP/IP port). In this document
it is called &ldquo;peer&rdquo; (host, target, communication endpoint), and a peer can provide
multiple services over single communication channel.</p>
-
+
<p>Using of standard discovery protocols should be optional, because it can potentially
cause conflict or interference between development tools and application being developed
over a use of same standard protocol &ndash; devices software often includes implementation
@@ -507,19 +507,19 @@ of the communication channel for a particular peer, and for sending and receivin
data packets. The protocol define contents of a part of a packet, the rest of the
packet is treated as array of bytes at this level. The communication protocol implementation
also provides:</p>
-
+
<ul type='disc'>
<li>Multiplexing &ndash; opening multiple channels per peer.
-
+
<li>Proxy &ndash; packet forwarding in behalf of other hosts.
</ul>
-
+
<p>Protocol defines three packet types: commands (requests), results (responses),
and events. Each packet consists of several protocol defined control fields followed
by byte array of data. Binary representation of control fields is a sequence of zero
terminated ASCII strings. Format of data array depends on a service. We recommend
using framework preferred marshaling for data formatting.</p>
-
+
<p>Syntax:</p>
<pre><b><font face="Courier New" size=2 color=#333399>
<i>&lt;message&gt;</i>
@@ -530,37 +530,37 @@ using framework preferred marshaling for data formatting.</p>
</font></b></pre>
<h2><a name='ProtocolCommands'>Commands</a></h2>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
<i>&lt;command&gt;</i>
&rArr; C &bull; <i>&lt;token&gt; </i>&bull; <i>&lt;service name&gt; </i>&bull; <i>&lt;command name&gt; </i>&bull; <i>&lt;byte array: arguments&gt;</i>
</font></b></pre>
<p>Command packets start with string &ldquo;C&rdquo;.</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
<i>&lt;token&gt;</i>
&rArr; <i>&lt;chars&gt;</i>
</font></b></pre>
-
+
<p>Token is unique string generated by framework for each command. It is used to match
results to commands.</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
<i>&lt;service name&gt;</i>
&rArr; <i>&lt;chars&gt;</i>
</font></b></pre>
-
+
<p>Service name is used to identify a service that handles the command, it is same
string as returned by Service.getName().</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
<i>&lt;command name&gt;</i>
&rArr; <i>&lt;chars&gt;</i>
</font></b></pre>
-
+
<p>Command name interpretation depends on a service.</p>
-
+
<p>A command should always be answered with result packed. Result does not have to
be positive &ndash; it can include an error code, or it can be special "N" result that indicates that command was not recognized,
but there always must be one. Since client
@@ -574,7 +574,7 @@ unlimited number of requests, since this will use resources in forms of memory t
store the requests and time to process them.</p>
<h2><a name='ProtocolResults'>Results</a></h2>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
<i>&lt;result&gt;</i>
&rArr; N &bull; <i>&lt;token&gt;</i> &bull;
@@ -587,23 +587,23 @@ result, and &ldquo;N&rdquo; if command is not recognized. Receiving of &ldquo;R&
There should be exactly one &ldquo;R&rdquo; or &ldquo;N&rdquo; result for each command. In addition, command execution can produce any number of
intermediate &ldquo;P&rdquo; results. &ldquo;P&rdquo; results can be sent before &ldquo;R&rdquo;, and it can serve, for
example, as command execution progress report when execution takes long time.</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
<i>&lt;token&gt;</i>
&rArr; <i>&lt;chars&gt;</i>
</font></b></pre>
-
+
<p>Token should match token field of one of the pending commands that produced the result.</p>
<h2><a name='ProtocolEvents'>Events</a></h2>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
<i>&lt;event&gt;</i>
&rArr; E &bull; <i>&lt;service name&gt;</i> &bull; <i>&lt;event name&gt;</i> &bull; <i>&lt;byte array: event data&gt;</i>
</font></b></pre>
<p>Event packets start with string &ldquo;E&rdquo;.</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
<i>&lt;service name&gt;</i>
&rArr; <i>&lt;chars&gt;</i>
@@ -611,14 +611,14 @@ example, as command execution progress report when execution takes long time.</p
<p>Service name identifies a service that fired event, same string as returned by
Service.getName().</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
<i>&lt;event name&gt;</i>
&rArr; <i>&lt;chars&gt;</i>
</font></b></pre>
-
+
<p>Event name meaning depends on a service.</p>
-
+
<p>Events are used to notify clients about changes in peer state. Services should
provide sufficient variety of events for clients to track remote peer state without
too much of polling. Clients, interested in a particular aspect of the target state,
@@ -637,7 +637,7 @@ force clients to poll for changes and can also degrade performance. A balanced a
is the best.</p>
<h2><a name='ProtocolFlowControl'>Flow Control</a> </h2>
-
+
<p>It often happens that one side of communication channel produces messages faster
then they can be transmitted over the channel or can be consumed by another side.
This will cause channel traffic congestion (flooding). Framework will deal with the
@@ -660,14 +660,14 @@ indicate level of congestion. When a peer receives flow control message with con
it should try to reduce its transmition speed.</p>
<h2><a name='ProtocolExamples'>Message Examples</a></h2>
-
+
<p>Examples use simplified command arguments and result data. See service description
for actual data formats.</p>
-
+
<p>Executing <b><i>suspend</i></b> command from <b><i>RunControl</i></b> service:</p>
-
+
<p>&nbsp;</p>
-
+
<pre>
Send : C 1 RunControl suspend &ldquo;Thread1&rdquo;
Receive: E RunControl suspended &ldquo;Thread1&rdquo;
@@ -675,7 +675,7 @@ Receive: R 1 &ldquo;Success&rdquo;
</pre>
<p>Same command, but target was already suspended:</p>
-
+
<pre>
Receive: E RunControl suspended &ldquo;Thread1&rdquo;
&hellip;
@@ -685,7 +685,7 @@ Receive: R 2 &ldquo;Already suspended&rdquo;
<p>Same command, but target was suspended (by another client) after sending the command,
but before command was executed: </p>
-
+
<pre>
Receive: E RunControl running &ldquo;Thread1&rdquo;
&hellip;
@@ -695,40 +695,40 @@ Receive: R 3 &ldquo;Already suspended&rdquo;
</pre>
<h2><a name='API'>Framework API</a></h2>
-
+
<pre>
<font color=#3F5FBF>/**
- *
+ *
* Class Protocol provides static methods to access Target Communication Framework root objects:
* 1. the framework event queue and dispatch thread;
* 2. local instance of Locator service, which maintains a list of available targets;
* 3. list of open communication channels.
*/</font>
<font color=#7F0055>public class</font> Protocol {
-
+
<font color=#7F0055>private static</font> IEventQueue <i>event_queue</i>;
-
+
<font color=#3F5FBF>/**
* Before TCF can be used it should be given an object implementing IEventQueue interface.
* The implementation maintains a queue of objects implementing Runnable interface and
* executes <code>run</code> methods of that objects in a sequence by a single thread.
* The thread in referred as TCF event dispatch thread. Objects in the queue are called TCF events.
* Executing <code>run</code> method of an event is also called dispatching of event.
- *
+ *
* Only few methods in TCF APIs are thread safe - can be invoked from any thread.
- * If a method description does not say "can be invoked from any thread" explicitly -
+ * If a method description does not say "can be invoked from any thread" explicitly -
* the method must be invoked from TCF event dispatch thread. All TCF listeners are
* invoked from the dispatch thread.
- *
+ *
* <font color=#7F9FBF>@param</font> event_queue - IEventQueue implementation.
*/</font>
<font color=#7F0055>public static void</font> setEventQueue(IEventQueue event_queue);
-
+
<font color=#3F5FBF>/**
* <font color=#7F9FBF>@return</font> instance of IEventQueue that should be used for TCF events.
*/</font>
<font color=#7F0055>public static</font> IEventQueue getEventQueue();
-
+
<font color=#3F5FBF>/**
* Returns true if the calling thread is TCF dispatch thread.
* Use this call to ensure that a given task is being executed (or not being)
@@ -738,7 +738,7 @@ Receive: R 3 &ldquo;Already suspended&rdquo;
* <font color=#7F9FBF>@return</font> true if running on the dispatch thread.
*/</font>
<font color=#7F0055>public static boolean</font> isDispatchThread();
-
+
<font color=#3F5FBF>/**
* Causes runnable to have its run
* method called in the dispatch thread of the framework.
@@ -753,7 +753,7 @@ Receive: R 3 &ldquo;Already suspended&rdquo;
* method should be executed asynchronously.</font>
*/</font>
<font color=#7F0055>public static void</font> invokeLater(Runnable runnable);
-
+
<font color=#3F5FBF>/**
* Causes runnable to have its run
* method called in the dispatch thread of the framework.
@@ -765,21 +765,21 @@ Receive: R 3 &ldquo;Already suspended&rdquo;
*/</font>
<font color=#7F0055>public static void</font> invokeAndWait(Runnable runnable)
<font color=#7F0055>throws</font> InterruptedException;
-
+
<font color=#3F5FBF>/**
* Get instance of the framework locator service.
* The service can be used to discover available remote peers.
- *
+ *
* @return instance of ILocator.
*/</font>
<font color=#7F0055>public static</font> ILocator getLocator();
-
+
<font color=#3F5FBF>/**
* Return an array of all open channels.
* @return an array of IChannel
*/</font>
<font color=#7F0055>public static</font> IChannel[] getOpenChannels();
-
+
<font color=#3F5FBF>/**
* Interface to be implemented by clients willing to be notified when
* new TCF communication channel is opened.
@@ -787,7 +787,7 @@ Receive: R 3 &ldquo;Already suspended&rdquo;
<font color=#7F0055>public interface</font> ChannelOpenListener {
<font color=#7F0055>public void</font> onChannelOpen(IChannel channel);
}
-
+
<font color=#3F5FBF>/**
* Add a listener that will be notified when new channel is opened.
* @param listener
@@ -805,21 +805,21 @@ Receive: R 3 &ldquo;Already suspended&rdquo;
* The message is sent to all open communication channels &ndash; broadcasted.
*/</font>
<font color=#7F0055>public static void</font> sendEvent(String service, String name, byte[] data);
-
+
<font color=#3F5FBF>/**
* Call back after TCF messages sent by this host up to this moment are delivered
* to their intended target. This method is intended for synchronization of messages
* across multiple channels.
- *
+ *
* Note: Cross channel synchronization can reduce performance and throughput.
- * Most clients don't need cross channel synchronization and should not call this method.
- *
- * @param done will be executed by dispatch thread after communication
+ * Most clients don't need cross channel synchronization and should not call this method.
+ *
+ * @param done will be executed by dispatch thread after communication
* messages are delivered to corresponding targets.
*/</font>
<font color=#7F0055>public static void</font> sync(Runnable done);
}
-
+
<font color=#3F5FBF>/**
* IChannel represents communication link connecting two endpoints (peers).
* The channel asynchroniously transmits messages: commands, results and events.
@@ -828,7 +828,7 @@ Receive: R 3 &ldquo;Already suspended&rdquo;
* ordering is guaranteed across channels.
*/</font>
<font color=#7F0055>public interface</font> IChannel {
-
+
<font color=#3F5FBF>/**
* Channel state IDs
*/</font>
@@ -836,12 +836,12 @@ Receive: R 3 &ldquo;Already suspended&rdquo;
<i><font color=#0000C0>STATE_OPENNING</font></i> = 0,
<i><font color=#0000C0>STATE_OPEN</font></i> = 1,
<i><font color=#0000C0>STATE_CLOSED</font></i> = 2;
-
+
<font color=#3F5FBF>/**
* <font color=#7F9FBF>@return</font> channel current state, see STATE_*
*/</font>
int getState();
-
+
<font color=#3F5FBF>/**
* Send command message to remote peer for execution. Commands can be queued
* locally before transmission. Sending commands too fast can fill up
@@ -851,17 +851,17 @@ Receive: R 3 &ldquo;Already suspended&rdquo;
* <font color=#7F9FBF>@param</font> name - command name
* <font color=#7F9FBF>@param</font> args - command arguments encoded into array of bytes
* <font color=#7F9FBF>@param</font> done - call back object
- * <font color=#7F9FBF>@return</font> pending command handle
+ * <font color=#7F9FBF>@return</font> pending command handle
*/</font>
IToken sendCommand(IService service, String name, <font color=#7F0055>byte</font>[] args,
ICommandListener done);
-
+
<font color=#3F5FBF>/**
* Command listener interface. Clients implement this interface
* to receive command results.
*/</font>
<font color=#7F0055>interface</font> ICommandListener {
-
+
<font color=#3F5FBF>/**
* Called when progress message (intermediate result) is received
* from remote peer.
@@ -869,7 +869,7 @@ Receive: R 3 &ldquo;Already suspended&rdquo;
* <font color=#7F9FBF>@param</font> data - progress message arguments encoded into array of bytes
*/</font>
<font color=#7F0055>void</font> progress(<font color=#7F0055>byte</font>[] data);
-
+
<font color=#3F5FBF>/**
* Called when command result received from remote peer.
* <font color=#7F9FBF>@param</font> token - command handle
@@ -884,7 +884,7 @@ Receive: R 3 &ldquo;Already suspended&rdquo;
*/</font>
<font color=#7F0055>void</font> terminated(IToken token, Exception error);
}
-
+
<font color=#3F5FBF>/**
* Send result message to remote peer. Messages can be queued locally before
* transmission. Sending messages too fast can fill up communication channel
@@ -894,26 +894,26 @@ Receive: R 3 &ldquo;Already suspended&rdquo;
* <font color=#7F9FBF>@param</font> results - result message arguments encoded into array of bytes
*/</font>
<font color=#7F0055>void</font> sendResult(IToken token, <font color=#7F0055>byte</font>[] results);
-
+
<font color=#3F5FBF>/**
* Get current level of outbound traffic congestion.
- *
+ *
* <font color=#7F9FBF>@return</font> integer value in range &ndash;100..100, where &ndash;100 means no pending
* messages (no traffic), 0 means optimal load, and positive numbers
* indicate level of congestion.
- *
+ *
* Note: in-bound traffic congestion is detected by framework and reported to
* remote peer without client needed to be involved. Clients willing to provide
* additional data about local congestion should register itself using
* Protocol.addCongestionMonitor().
*/</font>
int getCongestion();
-
+
<font color=#3F5FBF>/**
* Channel listener interface.
*/</font>
<font color=#7F0055>interface</font> IChannelListener {
-
+
<font color=#3F5FBF>/**
* Called when a channel is opened.
*/</font>
@@ -934,26 +934,26 @@ Receive: R 3 &ldquo;Already suspended&rdquo;
*/</font>
<font color=#7F0055>void</font> congestionLevel(int level);
}
-
+
<font color=#3F5FBF>/**
* Subscribe a channel listener. The listener will be notified about changes of
* outbound traffic congestion level.
* <font color=#7F9FBF>@param</font> listener - channel listener implementation
*/</font>
<font color=#7F0055>void</font> addChannelListener(IChannelListener listener);
-
+
<font color=#3F5FBF>/**
* Remove a channel listener.
* <font color=#7F9FBF>@param</font> listener - channel listener implementation
*/</font>
<font color=#7F0055>void</font> removeChannelListener(IChannelListener listener);
-
+
<font color=#3F5FBF>/**
* Command server interface.
* This interface is to be implemented by service providers.
*/</font>
<font color=#7F0055>interface</font> ICommandServer {
-
+
<font color=#3F5FBF>/**
* Called every time a command is received from remote peer.
* <font color=#7F9FBF>@param</font> token - command handle
@@ -962,19 +962,19 @@ Receive: R 3 &ldquo;Already suspended&rdquo;
*/</font>
<font color=#7F0055>void</font> command(IToken token, String name, <font color=#7F0055>byte</font>[] data);
}
-
+
<font color=#3F5FBF>/**
* Subscribe a command server. The server will be notified about command
* messages received through this channel for given service.
* <font color=#7F9FBF>@param</font> service - local service implementation
- * <font color=#7F9FBF>@param</font> server - implementation of service commands listener
+ * <font color=#7F9FBF>@param</font> server - implementation of service commands listener
*/</font>
<font color=#7F0055>void</font> addCommandServer(IService service, ICommandServer listener);
-
+
<font color=#3F5FBF>/**
* Remove a command server.
* <font color=#7F9FBF>@param</font> service - local service implementation
- * <font color=#7F9FBF>@param</font> server - implementation of service commands listener
+ * <font color=#7F9FBF>@param</font> server - implementation of service commands listener
*/</font>
<font color=#7F0055>void</font> removeCommandServer(IService service, ICommandServer listener);
@@ -993,31 +993,31 @@ Receive: R 3 &ldquo;Already suspended&rdquo;
*/</font>
<font color=#7F0055>void</font> event(String name, <font color=#7F0055>byte</font>[] data);
}
-
+
<font color=#3F5FBF>/**
* Subscribe an event message listener for given service.
* <font color=#7F9FBF>@param</font> service - remote service proxy
- * <font color=#7F9FBF>@param</font> server - implementation of service event listener
+ * <font color=#7F9FBF>@param</font> server - implementation of service event listener
*/</font>
<font color=#7F0055>void</font> addEventListener(IService service, IEventListener listener);
-
+
<font color=#3F5FBF>/**
* Unsubscribe an event message listener for given service.
* <font color=#7F9FBF>@param</font> service - remote service proxy
- * <font color=#7F9FBF>@param</font> server - implementation of service event listener
+ * <font color=#7F9FBF>@param</font> server - implementation of service event listener
*/</font>
<font color=#7F0055>void</font> removeEventListener(IService service, IEventListener listener);
-
+
<font color=#3F5FBF>/**
* <font color=#7F9FBF>@return</font> IPeer object representing local endpoint of communication channel.
*/</font>
IPeer getLocalPeer();
-
+
<font color=#3F5FBF>/**
* <font color=#7F9FBF>@return</font> IPeer object representing remote endpoint of communication channel.
*/</font>
IPeer getRemotePeer();
-
+
<font color=#3F5FBF>/**
* <font color=#7F9FBF>@return</font> collection of services available on local peer.
*/</font>
@@ -1054,14 +1054,14 @@ Receive: R 3 &ldquo;Already suspended&rdquo;
* Return null if implementation of the interface is not available.
*/</font>
&lt;V <font color=#7F0055>extends</font> IService> V getRemoteService(Class&lt;V> service_interface);
-
+
<font color=#3F5FBF>/**
* Install a service proxy object on this channel.
* This method can be called only from channel open call-back.
* It allows a client to extends TCF by adding proxy objects for non-standard services.
* Client, wishing to become service proxy provider, should register itself
* using either Protocol.addChannelOpenListener() or IChannel.addChannelListener().
- * It is not allowed to register more then one proxy for a given service interface.
+ * It is not allowed to register more then one proxy for a given service interface.
*/</font>
&lt;V <font color=#7F0055>extends</font> IService&gt; <font color=#7F0055>void</font> setServiceProxy(Class&lt;V&gt; service_interface, IService service_proxy);
@@ -1069,34 +1069,34 @@ Receive: R 3 &ldquo;Already suspended&rdquo;
* Close communication channel.
*/</font>
<font color=#7F0055>void</font> close();
-
+
<font color=#3F5FBF>/**
* Close channel in case of communication error.
* <font color=#7F9FBF>@param error</font> - cause of channel termination
*/</font>
<font color=#7F0055>void</font> terminate(Throwable error);
-
+
<font color=#3F5FBF>/**
* Redirect this channel to given peer using this channel remote peer locator service as a proxy.
* <font color=#7F9FBF>@param peer_</font> - peer that will become new remote communication endpoint of this channel
*/</font>
<font color=#7F0055>void</font> redirect(IPeer peer);
}
-
-
+
+
<font color=#3F5FBF>/**
* Object implemeting IToken interface is created by framework for every
* command sent over communication channel. It is used to match command to its
* results, and also can be used to cancel commands.
*/</font>
<font color=#7F0055>public</font> interface IToken {
-
+
<font color=#3F5FBF>/**
* Try to cancel a command associated with given token. A command can be
* canceled by this method only if it was not transmitted yet to remote peer
* for execution. Successfully canceled command does not produce any result
* messages.
- *
+ *
* <font color=#7F9FBF>@return</font> true if successful.
*/</font>
<font color=#7F0055>boolean</font> cancel();
@@ -1110,55 +1110,55 @@ Receive: R 3 &ldquo;Already suspended&rdquo;
separate from protocol specification, a service designer can choose any data format that
suits the service requirements best. However, to promote better compatibility and to
simplify service design and implementation, we recommend to use <b>JSON</b> for data formatting.</p>
-
+
<p><b>JSON</b> (pronounced like the
English given name <i>Jason</i>), which stands for "<b>J</b>ava<b>S</b>cript <b>O</b>bject
<b>N</b>otation", is a lightweight, text-based, language-independent computer data
interchange format. <b>JSON</b> is a subset of the object literal notation of JavaScript
but its use does not require JavaScript.</p>
-
+
<p><b>JSON</b> represents data with the same basic types that programming languages
use. <b>JSON</b>'s basic types are:</p>
-
+
<ul type='disc'>
- <li>Number (integer, real, or floating-point)
-
- <li>String (double-quoted with backslash escapement)
-
+ <li>Number (integer, real, or floating-point)
+
+ <li>String (double-quoted with backslash escapement)
+
<li>Boolean (<code>true</code> and <code>false</code>)
-
- <li>Array (an ordered sequence of values)
-
- <li>Object (collection of key/value pairs)
-
- <li><code>null</code>
+
+ <li>Array (an ordered sequence of values)
+
+ <li>Object (collection of key/value pairs)
+
+ <li><code>null</code>
</ul>
-
+
<p>The structures used in most programming languages easily map directly onto JSON's
structures, and back again.</p>
-
+
<p>JSON maps data onto Unicode string. Then the string is mapped onto array of bytes
using UTF-8 encoding.</p>
-
+
<p>JSON specification:</p>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
<i>&lt;object&gt;</i>
&rArr; {}
&rArr; { <i>&lt;members&gt;</i> }
-
+
<i>&lt;members&gt;</i>
&rArr; <i>&lt;string&gt;</i> : <i>&lt;value&gt;</i>
&rArr; <i>&lt;members&gt;</i> , <i>&lt;string&gt;</i> : <i>&lt;value&gt;</i>
-
+
<i>&lt;array&gt;</i>
&rArr; []
&rArr; [ <i>&lt;elements&gt;</i> ]
-
+
<i>&lt;elements&gt;</i>
&rArr; <i>&lt;value&gt;</i>
&rArr; <i>&lt;elements</i>&gt; , <i>&lt;value&gt;</i>
-
+
<i>&lt;value&gt;</i>
&rArr; <i>&lt;string&gt;</i>
&rArr; <i>&lt;number&gt;</i>
@@ -1167,14 +1167,14 @@ using UTF-8 encoding.</p>
&rArr; <i>&lt;boolean&gt;</i>
&rArr; null
-<i>&lt;boolean&gt;</i>
+<i>&lt;boolean&gt;</i>
&rArr; true
&rArr; false
<i>&lt;string&gt;</i>
&rArr; ""
&rArr; " <i>&lt;chars&gt;</i> "
-
+
<i>&lt;chars&gt;</i>
&rArr; <i>&lt;char&gt;</i>
&rArr; <i>&lt;chars&gt; &lt;char&gt;</i>
@@ -1196,23 +1196,23 @@ using UTF-8 encoding.</p>
&rArr; &lt;<i>int&gt; &lt;fraction&gt;</i>
&rArr; &lt;<i>int&gt; &lt;exponent&gt;</i>
&rArr; &lt;<i>int&gt; &lt;fraction&gt; &lt;exponent&gt;</i>
-
+
<i>&lt;int&gt;</i>
&rArr; <i>&lt;digit&gt;</i>
- &rArr; &lt;<i>digit 1-9&gt; &lt;digits&gt;</i>
+ &rArr; &lt;<i>digit 1-9&gt; &lt;digits&gt;</i>
&rArr; - &lt;<i>digit&gt;</i>
&rArr; - &lt;<i>digit 1-9&gt; &lt;digits</i>&gt;
-
-<i>&lt;fraction&gt;</i>
- &rArr; . <i>&lt;digits&gt;</i>
-
-<i>&lt;exponent&gt;</i>
- &rArr; <i>&lt;e&gt;</i> <i>&lt;digits&gt;</i>
-
-<i>&lt;digits&gt;</i>
+
+<i>&lt;fraction&gt;</i>
+ &rArr; . <i>&lt;digits&gt;</i>
+
+<i>&lt;exponent&gt;</i>
+ &rArr; <i>&lt;e&gt;</i> <i>&lt;digits&gt;</i>
+
+<i>&lt;digits&gt;</i>
&rArr; <i>&lt;digit&gt;</i>
- &rArr; &lt;<i>digits&gt;</i> &lt;<i>digit&gt;</i>
-
+ &rArr; &lt;<i>digits&gt;</i> &lt;<i>digit&gt;</i>
+
<i>&lt;e&gt;</i>
&rArr; e
&rArr; e+
@@ -1224,11 +1224,11 @@ using UTF-8 encoding.</p>
</font></b></pre>
<p>See <a href='http://www.json.org/'>www.json.org</a> for more details.</p>
-
+
<h2><a name='JSONExamples'>Examples</a></h2>
-
+
<p>This is a JSON array containing two objects:</p>
-
+
<pre>
[
{
@@ -1251,7 +1251,7 @@ using UTF-8 encoding.</p>
}
]
</pre>
-
+
<h1><a name='Locator'>Locator Service</a></h1>
<p>Locator Service uses transport layer to search for peers and to collect data about
@@ -1304,7 +1304,7 @@ at services it implements (use IChannel.getRemoteServices() method to get a map
<h2><a name='LocatorCommands'>Locator Service Commands</a></h2>
<h3><a name='LocatorCommandRedirect'>redirect</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; Locator &bull; redirect &bull; <i>&lt;string: peer ID&gt;</i> &bull;
</font></b></pre>
@@ -1317,9 +1317,9 @@ Locator service starts acting as a proxy.</p>
<pre><b><font face="Courier New" size=2 color=#333399>
R &bull; <i>&lt;token&gt;</i> &bull; <i>&lt;error report&gt;</i> &bull;
</font></b></pre>
-
+
<h3><a name='LocatorCommandSync'>sync</a></h3>
-
+
<pre><b><font face="Courier New" size=2 color=#333399>
C &bull; <i>&lt;token&gt;</i> &bull; Locator &bull; sync &bull;
</font></b></pre>
@@ -1333,7 +1333,7 @@ for sync result a client makes sure that all commands, that were issued before s
<pre><b><font face="Courier New" size=2 color=#333399>
R &bull; <i>&lt;token&gt;</i> &bull;
</font></b></pre>
-
+
<h2><a name='LocatorEvents'>Locator Service Events</a></h2>
<pre><b><font face="Courier New" size=2 color=#333399>
@@ -1366,20 +1366,20 @@ E &bull; Locator &bull; peerRemoved &bull; <i>&lt;string: peer ID&gt;</i> &bull;
<font color=#3F5FBF>/**
* Base interface for all service interfaces. A client can get list of available services
* by calling IChannel.getLocalServices() and IChannel.getRemoteServices().
- *
+ *
* Remote services are represented by a proxy objects that implement service interfaces by
* translating method calls to TCF messages and sending them to a remote peer.
* When communication channel is open, TCF automatically creates proxies for standard services.
- * TCF clients can provides addition proxies for non-standard services by calling IChannel.setServiceProxy().
+ * TCF clients can provides addition proxies for non-standard services by calling IChannel.setServiceProxy().
*/</font>
<font color=#7F0055>public</font> interface IService {
-
+
<font color=#3F5FBF>/**
* Get unique name of this service.
*/</font>
String getName();
}
-
+
<font color=#3F5FBF>/**
* Both hosts and targets are represented by objects
* implementing IPeer interface. A peer can act as host or
@@ -1388,7 +1388,7 @@ E &bull; Locator &bull; peerRemoved &bull; <i>&lt;string: peer ID&gt;</i> &bull;
* calling ILocator.getPeers
*/</font>
<font color=#7F0055>public interface</font> IPeer {
-
+
<font color=#7F0055>static final</font> String
<i><font color=#0000C0>ATTR_ID</font></i> = <font color=#2A00FF>"ID"</font>,
<i><font color=#0000C0>ATTR_NAME</font></i> = <font color=#2A00FF>"Name"</font>,
@@ -1398,33 +1398,33 @@ E &bull; Locator &bull; peerRemoved &bull; <i>&lt;string: peer ID&gt;</i> &bull;
<i><font color=#0000C0>ATTR_IP_ALIASES</font></i> = <font color=#2A00FF>"Aliases"</font>,
<i><font color=#0000C0>ATTR_IP_ADDRESSES</font></i> = <font color=#2A00FF>"Addresses"</font>,
<i><font color=#0000C0>ATTR_IP_PORT</font></i> = <font color=#2A00FF>"Port"</font>;
-
-
+
+
<font color=#3F5FBF>/**
* <font color=#7F9FBF>@return</font> map of peer attributes
*/</font>
Map&lt;String, String&gt; getAttributes();
-
+
<font color=#3F5FBF>/**
* <font color=#7F9FBF>@return</font> peer unique ID, same as getAttributes().get(ATTR_ID)
*/</font>
String getID();
-
+
<font color=#3F5FBF>/**
* <font color=#7F9FBF>@return</font> peer name, same as getAttributes().get(ATTR_NAME)
*/</font>
String getName();
-
+
<font color=#3F5FBF>/**
* Same as getAttributes().get(ATTR_OS_NAME)
*/</font>
String getOSName();
-
+
<font color=#3F5FBF>/**
* Same as getAttributes().get(ATTR_TRANSPORT_NAME)
*/</font>
String getTransportName();
-
+
<font color=#3F5FBF>/**
* Open channel to communicate with this peer.
* Note: the channel is not fully open yet when this method returns.
@@ -1433,7 +1433,7 @@ E &bull; Locator &bull; peerRemoved &bull; <i>&lt;string: peer ID&gt;</i> &bull;
*/</font>
IChannel openChannel() <font color=#7F0055>throws</font> IOException;
}
-
+
<font color=#3F5FBF>/**
* ILocator service uses transport layer to search for peers and to collect data about
* peer's attributes and capabilities (services). Discovery mechanism depends on
@@ -1441,14 +1441,14 @@ E &bull; Locator &bull; peerRemoved &bull; <i>&lt;string: peer ID&gt;</i> &bull;
* hosts, are added to local list of peers.
* Automatically discovered targets require no further configuration. Additional targets
* can be configured manually.
- *
+ *
* Clients should use Protocol.getLocator() to obtain local instance of ILocator,
* then ILocator.getPeers() can be used to get of available peers (hosts and targets).
*/</font>
<font color=#7F0055>public interface</font> ILocator <font color=#7F0055>extends</font> IService {
-
+
<font color=#7F0055>static final</font> String <i><font color=#0000C0>NAME</font></i> = <font color=#2A00FF>"Locator"</font>;
-
+
<font color=#3F5FBF>/**
* Auto-configuration command and response codes.
*/</font>
@@ -1460,38 +1460,38 @@ E &bull; Locator &bull; peerRemoved &bull; <i>&lt;string: peer ID&gt;</i> &bull;
* <font color=#7F9FBF>@return</font> Locator service name: "Locator"
*/</font>
String getName();
-
+
<font color=#3F5FBF>/**
* Get map (ID -> IPeer) of available peers (hosts and targets).
* The method return cached (currently known to the framework) list of peers.
* The list is updated according to event received from transport layer
*/</font>
Map&lt;String,IPeer&gt; getPeers();
-
+
<font color=#3F5FBF>/**
* Redirect this service channel to given peer using this service as a proxy.
*/</font>
IToken redirect(String peer_id, DoneRedirect done);
-
+
<font color=#7F0055>interface</font> DoneRedirect {
<font color=#7F0055>void</font> doneRedirect(IToken token, Exception error);
}
-
+
<font color=#3F5FBF>/**
* Call back after TCF messages sent to this target up to this moment are delivered.
* This method is intended for synchronization of messages
* across multiple channels.
- *
+ *
* Note: Cross channel synchronization can reduce performance and throughput.
- * Most clients don't need channel synchronization and should not call this method.
- *
- * @param done will be executed by dispatch thread after communication
+ * Most clients don't need channel synchronization and should not call this method.
+ *
+ * @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}.
*/</font>
IToken sync(DoneSync done);
-
+
<font color=#7F0055>interface</font> DoneSync {
<font color=#7F0055>void</font> doneSync(IToken token);
}
@@ -1500,17 +1500,17 @@ E &bull; Locator &bull; peerRemoved &bull; <i>&lt;string: peer ID&gt;</i> &bull;
* Add a listener for locator service events.
*/</font>
<font color=#7F0055>void</font> addListener(Listener listener);
-
+
<font color=#3F5FBF>/**
* Remove a listener for locator service events.
*/</font>
<font color=#7F0055>void</font> removeListener(Listener listener);
-
+
<font color=#7F0055>interface</font> Listener {
<font color=#7F0055>void</font> peerAdded(IPeer peer);
-
+
<font color=#7F0055>void</font> peerRemoved(IPeer peer);
-
+
<font color=#7F0055>void</font> peerChanged(IPeer peer);
}
}
@@ -1518,4 +1518,4 @@ E &bull; Locator &bull; peerRemoved &bull; <i>&lt;string: peer ID&gt;</i> &bull;
</body>
</html>
-
+
diff --git a/examples/org.eclipse.tm.tcf.examples.daytime/src/org/eclipse/tm/internal/tcf/examples/daytime/Activator.java b/examples/org.eclipse.tm.tcf.examples.daytime/src/org/eclipse/tm/internal/tcf/examples/daytime/Activator.java
index 3ab60cddb..e8e753675 100644
--- a/examples/org.eclipse.tm.tcf.examples.daytime/src/org/eclipse/tm/internal/tcf/examples/daytime/Activator.java
+++ b/examples/org.eclipse.tm.tcf.examples.daytime/src/org/eclipse/tm/internal/tcf/examples/daytime/Activator.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* 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
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
diff --git a/examples/org.eclipse.tm.tcf.examples.daytime/src/org/eclipse/tm/internal/tcf/examples/daytime/DaytimeServiceProxy.java b/examples/org.eclipse.tm.tcf.examples.daytime/src/org/eclipse/tm/internal/tcf/examples/daytime/DaytimeServiceProxy.java
index cefa9b92e..37e37d6d1 100644
--- a/examples/org.eclipse.tm.tcf.examples.daytime/src/org/eclipse/tm/internal/tcf/examples/daytime/DaytimeServiceProxy.java
+++ b/examples/org.eclipse.tm.tcf.examples.daytime/src/org/eclipse/tm/internal/tcf/examples/daytime/DaytimeServiceProxy.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* 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
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -26,7 +26,7 @@ public class DaytimeServiceProxy implements IDaytimeService {
}
/**
- * Return service name, as it appears on the wire - a TCF name of the service.
+ * Return service name, as it appears on the wire - a TCF name of the service.
*/
public String getName() {
return NAME;
@@ -36,7 +36,7 @@ public class DaytimeServiceProxy implements IDaytimeService {
* The method translates arguments to JSON string and sends the command message
* to remote server. When response arrives, it is translated from JSON to
* Java object, which are used to call call-back object.
- *
+ *
* The translation (marshaling) is done by using utility class Command.
*/
public IToken getTimeOfDay(String tz, final DoneGetTimeOfDay done) {
@@ -60,7 +60,7 @@ public class DaytimeServiceProxy implements IDaytimeService {
* 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
* at TCF startup time, so proxy factory is properly activated even if nobody
- * import directly from this plugin.
+ * import directly from this plugin.
*/
Protocol.addChannelOpenListener(new Protocol.ChannelOpenListener() {
diff --git a/examples/org.eclipse.tm.tcf.examples.daytime/src/org/eclipse/tm/internal/tcf/examples/daytime/IDaytimeService.java b/examples/org.eclipse.tm.tcf.examples.daytime/src/org/eclipse/tm/internal/tcf/examples/daytime/IDaytimeService.java
index bebd22647..ef08ff838 100644
--- a/examples/org.eclipse.tm.tcf.examples.daytime/src/org/eclipse/tm/internal/tcf/examples/daytime/IDaytimeService.java
+++ b/examples/org.eclipse.tm.tcf.examples.daytime/src/org/eclipse/tm/internal/tcf/examples/daytime/IDaytimeService.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* 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
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -33,13 +33,13 @@ public interface IDaytimeService extends IService {
* @param tz - time zone name.
* @param done - a call-back object.
* @return a handle for the pending command. The handle can be used to cancel the command,
- * and to match responses to requests - if same call-back object is used for
- * multiple requests.
+ * and to match responses to requests - if same call-back object is used for
+ * multiple requests.
*/
IToken getTimeOfDay(String tz, DoneGetTimeOfDay done);
/**
- * Call-back interface for getTimeOfDay() command.
+ * Call-back interface for getTimeOfDay() command.
*/
interface DoneGetTimeOfDay {
/**
diff --git a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/Activator.java b/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/Activator.java
index d612afb9e..c389eed7b 100644
--- a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/Activator.java
+++ b/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/Activator.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* 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
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
diff --git a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/TCFLaunchContext.java b/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/TCFLaunchContext.java
index 98ac112a6..ef653e97f 100644
--- a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/TCFLaunchContext.java
+++ b/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/TCFLaunchContext.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* 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
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -87,7 +87,7 @@ public class TCFLaunchContext implements ITCFLaunchContext {
* settings, or <code>null</code> if none. Note, if possible we will
* return the IBinary based on configuration entry as this may be more useful then
* just the project.
- *
+ *
* @return C element context.
*/
private ICElement getContext(ILaunchConfiguration config) {
@@ -208,7 +208,7 @@ public class TCFLaunchContext implements ITCFLaunchContext {
}
name = dlg.generateName(name);
config.rename(name);
- renamed = true;
+ renamed = true;
}
}
diff --git a/plugins/org.eclipse.tm.tcf.core/activator/org/eclipse/tm/internal/tcf/Activator.java b/plugins/org.eclipse.tm.tcf.core/activator/org/eclipse/tm/internal/tcf/Activator.java
index 11fa1e12e..eae8edaf2 100644
--- a/plugins/org.eclipse.tm.tcf.core/activator/org/eclipse/tm/internal/tcf/Activator.java
+++ b/plugins/org.eclipse.tm.tcf.core/activator/org/eclipse/tm/internal/tcf/Activator.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2009 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -17,7 +17,7 @@ import org.osgi.service.packageadmin.PackageAdmin;
import org.osgi.util.tracker.ServiceTracker;
public class Activator implements BundleActivator {
-
+
private static final String TCF_INTEGRATION_BUNDLE_ID = "org.eclipse.tm.tcf";
public void start(BundleContext context) throws Exception {
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/ChannelLoop.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/ChannelLoop.java
index b27eba05b..1d79cd6ad 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/ChannelLoop.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/ChannelLoop.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/LocalPeer.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/LocalPeer.java
index 11a29fed3..c6fc79f44 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/LocalPeer.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/LocalPeer.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -16,7 +16,7 @@ import java.util.Map;
import org.eclipse.tm.tcf.core.AbstractPeer;
public class LocalPeer extends AbstractPeer {
-
+
private static Map<String,String> createAttributes() {
Map<String, String> attrs = new HashMap<String, String>();
attrs.put(ATTR_ID, "TCFLocal");
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/RemotePeer.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/RemotePeer.java
index 5facfa264..ce6a9f4fa 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/RemotePeer.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/RemotePeer.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -15,20 +15,20 @@ import java.util.Map;
import org.eclipse.tm.tcf.core.AbstractPeer;
public class RemotePeer extends AbstractPeer {
-
+
private long last_update_time;
-
+
public RemotePeer(Map<String,String> attrs) {
super(attrs);
last_update_time = System.currentTimeMillis();
}
-
+
@Override
public void updateAttributes(Map<String,String> attrs) {
super.updateAttributes(attrs);
last_update_time = System.currentTimeMillis();
}
-
+
public long getLastUpdateTime() {
return last_update_time;
}
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/ServiceManager.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/ServiceManager.java
index 360dac927..2f4155a09 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/ServiceManager.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/ServiceManager.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2008 Anyware Technologies and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Anyware Technologies - initial API and implementation
*******************************************************************************/
@@ -27,9 +27,9 @@ public class ServiceManager {
static {
addServiceProvider(new IServiceProvider() {
-
+
private final String package_name = LocatorProxy.class.getPackage().getName();
-
+
public IService[] getLocalService(IChannel channel) {
return new IService[]{ new DiagnosticsService(channel) };
}
@@ -56,7 +56,7 @@ public class ServiceManager {
public static void removeServiceProvider(IServiceProvider provider) {
providers.remove(provider);
}
-
+
public static void onChannelCreated(IChannel channel, Map<String,IService> services) {
IService zero_copy = new IService() {
public String getName() {
@@ -73,7 +73,7 @@ public class ServiceManager {
}
}
}
-
+
public static void onChannelOpened(IChannel channel, Collection<String> service_names, Map<String,IService> services) {
for (String name : service_names) {
for (IServiceProvider provider : providers) {
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/Token.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/Token.java
index 2e2f4c101..f247a67fd 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/Token.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/Token.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -67,7 +67,7 @@ public class Token implements IToken {
public IChannel.ICommandListener getListener() {
return listener;
}
-
+
@Override
public String toString() {
return id;
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/TransportManager.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/TransportManager.java
index 6844fa572..a652cff51 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/TransportManager.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/core/TransportManager.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007-2009 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -35,11 +35,11 @@ public class TransportManager {
private static final Collection<AbstractChannel> channels =
new LinkedList<AbstractChannel>();
- private static final Collection<Protocol.ChannelOpenListener> listeners =
+ private static final Collection<Protocol.ChannelOpenListener> listeners =
new LinkedList<Protocol.ChannelOpenListener>();
private static final HashMap<String,ITransportProvider> transports =
new HashMap<String,ITransportProvider>();
-
+
static {
addTransportProvider(new ITransportProvider() {
@@ -57,7 +57,7 @@ public class TransportManager {
return new ChannelTCP(peer, host, Integer.parseInt(port), false);
}
});
-
+
addTransportProvider(new ITransportProvider() {
public String getName() {
@@ -74,7 +74,7 @@ public class TransportManager {
return new ChannelTCP(peer, host, Integer.parseInt(port), true);
}
});
-
+
addTransportProvider(new ITransportProvider() {
public String getName() {
@@ -87,20 +87,20 @@ public class TransportManager {
}
});
}
-
+
public static void addTransportProvider(ITransportProvider transport) {
String name = transport.getName();
assert name != null;
if (transports.get(name) != null) throw new Error("Already registered: " + name);
transports.put(name, transport);
}
-
+
public static void removeTransportProvider(ITransportProvider transport) {
String name = transport.getName();
assert name != null;
if (transports.get(name) == transport) transports.remove(name);
}
-
+
public static IChannel openChannel(IPeer peer) {
String name = peer.getTransportName();
if (name == null) throw new Error("No transport name");
@@ -127,11 +127,11 @@ public class TransportManager {
assert channels.contains(channel);
channels.remove(channel);
}
-
+
public static IChannel[] getOpenChannels() {
return channels.toArray(new IChannel[channels.size()]);
}
-
+
public static void addChanelOpenListener(Protocol.ChannelOpenListener listener) {
assert listener != null;
listeners.add(listener);
@@ -155,7 +155,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}.
*/
public static void sendEvent(String service_name, String event_name, byte[] data) {
@@ -165,18 +165,18 @@ public class TransportManager {
if (s != null) channel.sendEvent(s, event_name, data);
}
}
-
+
/**
* Call back after TCF messages sent by this host up to this moment are delivered
* to their intended targets. This method is intended for synchronization of messages
* across multiple channels.
- *
+ *
* Note: Cross channel synchronization can reduce performance and throughput.
- * Most clients don't need cross channel synchronization and should not call this method.
- *
- * @param done will be executed by dispatch thread after communication
+ * Most clients don't need cross channel synchronization and should not call this method.
+ *
+ * @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}.
*/
public static void sync(final Runnable done) {
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/local/ChannelProxy.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/local/ChannelProxy.java
index f3530cd38..9a760cef2 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/local/ChannelProxy.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/local/ChannelProxy.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* 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
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -28,13 +28,13 @@ class ChannelProxy {
private final AbstractChannel ch_x;
private final AbstractChannel ch_y;
-
+
private boolean closed_x;
private boolean closed_y;
-
+
private final Map<IToken,IToken> tokens_x = new HashMap<IToken,IToken>();
private final Map<IToken,IToken> tokens_y = new HashMap<IToken,IToken>();
-
+
private final AbstractChannel.Proxy proxy_x = new AbstractChannel.Proxy() {
public void onChannelClosed(Throwable error) {
@@ -51,14 +51,14 @@ class ChannelProxy {
if (s == null) ch_x.terminate(new IOException("Invalid service name"));
else tokens_x.put(ch_y.sendCommand(s, name, data, cmd_listener_x), token);
}
-
+
public void onEvent(String service, String name, byte[] data) {
IService s = ch_x.getRemoteService(service);
if (s == null) ch_x.terminate(new IOException("Invalid service name"));
else if (!closed_y) ch_y.sendEvent(s, name, data);
}
};
-
+
private final AbstractChannel.Proxy proxy_y = new AbstractChannel.Proxy() {
public void onChannelClosed(Throwable error) {
@@ -75,14 +75,14 @@ class ChannelProxy {
if (s == null) ch_y.terminate(new IOException("Invalid service name"));
else tokens_y.put(ch_x.sendCommand(s, name, data, cmd_listener_y), token);
}
-
+
public void onEvent(String service, String name, byte[] data) {
IService s = ch_y.getRemoteService(service);
if (s == null) ch_y.terminate(new IOException("Invalid service name"));
else if (!closed_x) ch_x.sendEvent(s, name, data);
}
};
-
+
private final IChannel.ICommandListener cmd_listener_x = new IChannel.ICommandListener() {
public void progress(IToken token, byte[] data) {
@@ -98,7 +98,7 @@ class ChannelProxy {
tokens_x.remove(token);
}
};
-
+
private final IChannel.ICommandListener cmd_listener_y = new IChannel.ICommandListener() {
public void progress(IToken token, byte[] data) {
@@ -114,7 +114,7 @@ class ChannelProxy {
tokens_y.remove(token);
}
};
-
+
ChannelProxy(IChannel x, IChannel y) {
assert !(x instanceof ChannelLoop);
assert !(y instanceof ChannelLoop);
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/local/DiagnosticsService.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/local/DiagnosticsService.java
index 76f4dcc94..9637519c1 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/local/DiagnosticsService.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/local/DiagnosticsService.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -23,9 +23,9 @@ import org.eclipse.tm.tcf.services.IDiagnostics;
public class DiagnosticsService implements IDiagnostics {
private final IChannel channel;
-
+
private class CommandServer implements IChannel.ICommandServer {
-
+
public void command(IToken token, String name, byte[] data) {
try {
command(token, name, JSON.parseSequence(data));
@@ -34,7 +34,7 @@ public class DiagnosticsService implements IDiagnostics {
channel.terminate(x);
}
}
-
+
private void command(IToken token, String name, Object[] args) throws Exception {
if (name.equals("echo")) {
if (args.length != 1) throw new Exception("Invalid number of arguments");
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/local/LocatorService.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/local/LocatorService.java
index 77b27ac0c..952731ffb 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/local/LocatorService.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/local/LocatorService.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -50,7 +50,7 @@ import org.eclipse.tm.tcf.services.ILocator;
*/
// TODO: research usage of DNS-SD (DNS Service Discovery) to discover TCF peers
public class LocatorService implements ILocator {
-
+
private static final int DISCOVEY_PORT = 1534;
private static final int MAX_PACKET_SIZE = 9000 - 40 - 8;
private static final int PREF_PACKET_SIZE = 1500 - 40 - 8;
@@ -58,28 +58,28 @@ public class LocatorService implements ILocator {
private static LocatorService locator;
private static final Map<String,IPeer> peers = new HashMap<String,IPeer>();
private static final ArrayList<LocatorListener> listeners = new ArrayList<LocatorListener>();
-
+
private final HashSet<SubNet> subnets = new HashSet<SubNet>();
private final ArrayList<Slave> slaves = new ArrayList<Slave>();
private final byte[] inp_buf = new byte[MAX_PACKET_SIZE];
private final byte[] out_buf = new byte[MAX_PACKET_SIZE];
-
+
private InetAddress loopback_addr;
-
+
private static class SubNet {
final int prefix_length;
final InetAddress address;
final InetAddress broadcast;
-
+
long last_slaves_req_time;
boolean send_all_ok;
-
+
SubNet(int prefix_length, InetAddress address, InetAddress broadcast) {
this.prefix_length = prefix_length;
this.address = address;
this.broadcast = broadcast;
}
-
+
boolean contains(InetAddress addr) {
if (addr == null) return false;
byte[] a1 = addr.getAddress();
@@ -98,7 +98,7 @@ public class LocatorService implements ILocator {
}
return true;
}
-
+
@Override
public boolean equals(Object o) {
if (!(o instanceof SubNet)) return false;
@@ -108,44 +108,44 @@ public class LocatorService implements ILocator {
broadcast.equals(x.broadcast) &&
address.equals(x.address);
}
-
+
@Override
public int hashCode() {
return broadcast.hashCode();
}
-
+
@Override
public String toString() {
return broadcast.getHostAddress() + "/" + prefix_length;
}
}
-
+
private static class Slave {
final InetAddress address;
final int port;
-
+
/* Time of last packet receiver from this slave */
- long last_packet_time;
-
+ long last_packet_time;
+
/* Time of last REQ_SLAVES packet received from this slave */
long last_req_slaves_time;
-
+
Slave(InetAddress address, int port) {
this.address = address;
this.port = port;
}
-
+
@Override
public String toString() {
return address.getHostAddress() + ":" + port;
}
}
-
+
private static LocalPeer local_peer;
-
+
private DatagramSocket socket;
private long last_master_packet_time;
-
+
private Thread timer_thread = new Thread() {
public void run() {
while (true) {
@@ -167,7 +167,7 @@ public class LocatorService implements ILocator {
}
}
};
-
+
private Thread input_thread = new Thread() {
public void run() {
for (;;) {
@@ -192,10 +192,10 @@ public class LocatorService implements ILocator {
}
}
};
-
+
static {
ServiceManager.addServiceProvider(new IServiceProvider() {
-
+
public IService[] getLocalService(final IChannel channel) {
channel.addCommandServer(locator, new IChannel.ICommandServer() {
public void command(IToken token, String name, byte[] data) {
@@ -210,7 +210,7 @@ public class LocatorService implements ILocator {
}
});
}
-
+
public LocatorService() {
locator = this;
try {
@@ -264,7 +264,7 @@ public class LocatorService implements ILocator {
public static LocalPeer getLocalPeer() {
return local_peer;
}
-
+
public static LocatorListener[] getListeners() {
return listeners.toArray(new LocatorListener[listeners.size()]);
}
@@ -315,7 +315,7 @@ public class LocatorService implements ILocator {
else if (name.equals("getPeers")) {
int i = 0;
Object[] arr = new Object[peers.size()];
- for (IPeer p : peers.values()) arr[i++] = p.getAttributes();
+ for (IPeer p : peers.values()) arr[i++] = p.getAttributes();
channel.sendResult(token, JSON.toJSONSequence(new Object[]{ null, arr }));
}
else {
@@ -326,7 +326,7 @@ public class LocatorService implements ILocator {
channel.terminate(x);
}
}
-
+
private void refresh_timer() {
long time = System.currentTimeMillis();
/* Cleanup slave table */
@@ -377,7 +377,7 @@ public class LocatorService implements ILocator {
refreshSubNetList();
sendAll(null, 0, null, time);
}
-
+
private Slave addSlave(InetAddress addr, int port, long timestamp) {
for (Slave s : slaves) {
if (s.port == port && s.address.equals(addr)) {
@@ -394,9 +394,9 @@ public class LocatorService implements ILocator {
sendSlaveInfo(s, time);
return s;
}
-
+
private void refreshSubNetList() {
- HashSet<SubNet> set = new HashSet<SubNet>();
+ HashSet<SubNet> set = new HashSet<SubNet>();
try {
for (Enumeration<NetworkInterface> e = NetworkInterface.getNetworkInterfaces(); e.hasMoreElements();) {
NetworkInterface f = e.nextElement();
@@ -418,7 +418,7 @@ public class LocatorService implements ILocator {
}
catch (Exception x) {
// Java 1.5 or older
- // TODO: need a better way to get broadcast addresses on Java 1.5 VM
+ // TODO: need a better way to get broadcast addresses on Java 1.5 VM
Enumeration<InetAddress> n = f.getInetAddresses();
while (n.hasMoreElements()) {
InetAddress addr = n.nextElement();
@@ -448,7 +448,7 @@ public class LocatorService implements ILocator {
subnets.add(s);
}
}
-
+
private void sendPeersRequest(InetAddress addr, int port) {
out_buf[4] = CONF_REQ_INFO;
for (SubNet n : subnets) {
@@ -469,7 +469,7 @@ public class LocatorService implements ILocator {
}
}
}
-
+
private void sendPeerInfo(IPeer peer, InetAddress addr, int port) {
Map<String,String> attrs = peer.getAttributes();
if (attrs.get(IPeer.ATTR_IP_HOST) == null) return;
@@ -480,12 +480,12 @@ public class LocatorService implements ILocator {
for (String key : attrs.keySet()) {
String s = key + "=" + attrs.get(key);
byte[] bt = s.getBytes("UTF-8");
- if (i + bt.length >= out_buf.length) break;
+ if (i + bt.length >= out_buf.length) break;
System.arraycopy(bt, 0, out_buf, i, bt.length);
i += bt.length;
out_buf[i++] = 0;
}
-
+
InetAddress peer_addr = InetAddress.getByName(attrs.get(IPeer.ATTR_IP_HOST));
for (SubNet subnet : subnets) {
if (peer instanceof RemotePeer) {
@@ -513,7 +513,7 @@ public class LocatorService implements ILocator {
Protocol.log("Cannot send datagram packet", x);
}
}
-
+
private void sendEmptyPacket(InetAddress addr, int port) {
out_buf[4] = CONF_SLAVES_INFO;
for (SubNet n : subnets) {
@@ -535,7 +535,7 @@ public class LocatorService implements ILocator {
}
}
}
-
+
private void sendAll(InetAddress addr, int port, Slave sl, long time) {
for (SubNet n : subnets) n.send_all_ok = false;
for (IPeer peer : peers.values()) sendPeerInfo(peer, addr, port);
@@ -544,7 +544,7 @@ public class LocatorService implements ILocator {
}
sendEmptyPacket(addr, port);
}
-
+
private void sendSlavesRequest(InetAddress addr, int port) {
try {
out_buf[4] = CONF_REQ_SLAVES;
@@ -554,7 +554,7 @@ public class LocatorService implements ILocator {
Protocol.log("Cannot send datagram packet", x);
}
}
-
+
private void sendSlaveInfo(Slave x, long time) {
out_buf[4] = CONF_SLAVES_INFO;
for (SubNet n : subnets) {
@@ -577,7 +577,7 @@ public class LocatorService implements ILocator {
}
}
}
-
+
private void sendSlavesInfo(InetAddress addr, int port, long time) {
out_buf[4] = CONF_SLAVES_INFO;
for (SubNet n : subnets) {
@@ -608,7 +608,7 @@ public class LocatorService implements ILocator {
}
}
}
-
+
private boolean isRemote(InetAddress address, int port) {
if (port != socket.getLocalPort()) return true;
for (SubNet s : subnets) {
@@ -616,7 +616,7 @@ public class LocatorService implements ILocator {
}
return true;
}
-
+
private void handleDatagramPacket(DatagramPacket p) {
try {
long time = System.currentTimeMillis();
@@ -628,7 +628,7 @@ public class LocatorService implements ILocator {
if (buf[2] != 'F') return;
if (buf[3] != CONF_VERSION) return;
int remote_port = p.getPort();
- InetAddress remote_address = p.getAddress();
+ InetAddress remote_address = p.getAddress();
if (isRemote(remote_address, remote_port)) {
Slave sl = null;
if (p.getPort() != DISCOVEY_PORT) {
@@ -667,7 +667,7 @@ public class LocatorService implements ILocator {
Protocol.log("Invalid datagram packet received", x);
}
}
-
+
private void handlePeerInfoPacket(DatagramPacket p) {
try {
Map<String,String> map = new HashMap<String,String>();
@@ -743,12 +743,12 @@ public class LocatorService implements ILocator {
Protocol.log("Invalid datagram packet received", x);
}
}
-
+
private void handleReqSlavesPacket(DatagramPacket p, Slave sl, long time) {
if (sl != null) sl.last_req_slaves_time = time;
sendSlavesInfo(p.getAddress(), p.getPort(), time);
}
-
+
/*----------------------------------------------------------------------------------*/
public static LocatorService getLocator() {
@@ -758,7 +758,7 @@ public class LocatorService implements ILocator {
public String getName() {
return NAME;
}
-
+
public Map<String,IPeer> getPeers() {
assert Protocol.isDispatchThread();
return peers;
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/BreakpointsProxy.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/BreakpointsProxy.java
index 683055ea7..65c11a80a 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/BreakpointsProxy.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/BreakpointsProxy.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/DiagnosticsProxy.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/DiagnosticsProxy.java
index e3a5dd8cb..8faa2f104 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/DiagnosticsProxy.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/DiagnosticsProxy.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -21,13 +21,13 @@ import org.eclipse.tm.tcf.services.IDiagnostics;
public class DiagnosticsProxy implements IDiagnostics {
-
+
private final IChannel channel;
-
+
private static class Symbol implements ISymbol {
-
+
private final Map<String,Object> props;
-
+
Symbol(Map<String,Object> props) {
this.props = props;
}
@@ -65,7 +65,7 @@ public class DiagnosticsProxy implements IDiagnostics {
return s != null && s.equals("UNDEF");
}
}
-
+
public DiagnosticsProxy(IChannel channel) {
this.channel = channel;
}
@@ -211,7 +211,7 @@ public class DiagnosticsProxy implements IDiagnostics {
Collection<String> c = (Collection<String>)o;
return (String[])c.toArray(new String[c.size()]);
}
-
+
@SuppressWarnings("unchecked")
private ISymbol toSymbol(Object o) {
if (o == null) return null;
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/ExpressionsProxy.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/ExpressionsProxy.java
index 02fb12acf..1d5c1e0c4 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/ExpressionsProxy.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/ExpressionsProxy.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* 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
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -27,11 +27,11 @@ public class ExpressionsProxy implements IExpressions {
private final IChannel channel;
private final Map<ExpressionsListener,IChannel.IEventListener> listeners =
new HashMap<ExpressionsListener,IChannel.IEventListener>();
-
+
private class Context implements Expression {
-
+
private final Map<String,Object> props;
-
+
Context(Map<String,Object> props) {
this.props = props;
}
@@ -78,18 +78,18 @@ public class ExpressionsProxy implements IExpressions {
return (String)props.get(PROP_TYPE);
}
}
-
+
private class ContextValue implements Value {
private final byte[] value;
private final Map<String,Object> props;
-
+
ContextValue(byte[] value, Map<String,Object> props) {
if (props == null) props = new HashMap<String,Object>();
this.value = value;
this.props = props;
}
-
+
public Map<String, Object> getProperties() {
return props;
}
@@ -129,7 +129,7 @@ public class ExpressionsProxy implements IExpressions {
return n.booleanValue();
}
}
-
+
public ExpressionsProxy(IChannel channel) {
this.channel = channel;
}
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/FileSystemProxy.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/FileSystemProxy.java
index 13e6bbcf7..58fa9a7f3 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/FileSystemProxy.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/FileSystemProxy.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -23,10 +23,10 @@ import org.eclipse.tm.tcf.services.IFileSystem;
public class FileSystemProxy implements IFileSystem {
-
+
private final class FileHandle implements IFileHandle {
final String id;
-
+
FileHandle(String id) {
this.id = id;
}
@@ -34,31 +34,31 @@ public class FileSystemProxy implements IFileSystem {
public IFileSystem getService() {
return FileSystemProxy.this;
}
-
+
public String toString() {
return "[File Handle '" + id + "']";
}
}
-
+
private static final class Status extends FileSystemException implements IErrorReport {
-
+
private static final long serialVersionUID = -1636567076145085980L;
-
+
private final int status;
private final Map<String,Object> attrs;
-
+
Status(int status, String message, Map<String,Object> attrs) {
super(message);
this.status = status;
this.attrs = attrs;
}
-
+
Status(Exception x) {
super(x);
this.status = IErrorReport.TCF_ERROR_OTHER;
this.attrs = new HashMap<String,Object>();
}
-
+
public int getStatus() {
return status;
}
@@ -83,13 +83,13 @@ public class FileSystemProxy implements IFileSystem {
return attrs;
}
}
-
+
private abstract class FileSystemCommand extends Command {
-
+
FileSystemCommand(String command, Object[] args) {
super(channel, FileSystemProxy.this, command, args);
}
-
+
@SuppressWarnings("unchecked")
public Status toFSError(Object data) {
if (data == null) return null;
@@ -107,9 +107,9 @@ public class FileSystemProxy implements IFileSystem {
return s;
}
}
-
+
private final IChannel channel;
-
+
public FileSystemProxy(IChannel channel) {
this.channel = channel;
}
@@ -513,7 +513,7 @@ public class FileSystemProxy implements IFileSystem {
public String getName() {
return NAME;
}
-
+
private Object toObject(FileAttrs attrs) {
if (attrs == null) return null;
Map<String,Object> m = new HashMap<String,Object>();
@@ -534,7 +534,7 @@ public class FileSystemProxy implements IFileSystem {
}
return m;
}
-
+
@SuppressWarnings("unchecked")
private FileAttrs toFileAttrs(Object o) {
if (o == null) return null;
@@ -572,12 +572,12 @@ public class FileSystemProxy implements IFileSystem {
}
return new FileAttrs(flags, size, uid, gid, permissions, atime, mtime, m);
}
-
+
private FileHandle toFileHandle(Object o) {
if (o == null) return null;
return new FileHandle(o.toString());
}
-
+
@SuppressWarnings("unchecked")
private DirEntry[] toDirEntryArray(Object o) {
if (o == null) return null;
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/GenericProxy.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/GenericProxy.java
index 99df14426..af27505d7 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/GenericProxy.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/GenericProxy.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -28,11 +28,11 @@ public class GenericProxy implements IService {
this.channel = channel;
this.name = name;
}
-
+
public String getName() {
return name;
}
-
+
public IChannel getChannel() {
return channel;
}
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/LineNumbersProxy.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/LineNumbersProxy.java
index 3263e2dbe..cea1177a2 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/LineNumbersProxy.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/LineNumbersProxy.java
@@ -10,7 +10,7 @@ import org.eclipse.tm.tcf.services.ILineNumbers;
public class LineNumbersProxy implements ILineNumbers {
-
+
private final IChannel channel;
public LineNumbersProxy(IChannel channel) {
@@ -37,25 +37,25 @@ public class LineNumbersProxy implements ILineNumbers {
}
}.token;
}
-
+
private static int getInteger(Map<String,Object> map, String name, int def) {
Number n = (Number)map.get(name);
if (n == null) return def;
return n.intValue();
}
-
+
private static String getString(Map<String,Object> map, String name, String def) {
String s = (String)map.get(name);
if (s == null) return def;
return s;
}
-
+
private static boolean getBoolean(Map<String,Object> map, String name) {
Boolean b = (Boolean)map.get(name);
if (b == null) return false;
return b.booleanValue();
}
-
+
@SuppressWarnings("unchecked")
private CodeArea[] toTextAreaArray(Object o) {
if (o == null) return null;
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/LocatorProxy.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/LocatorProxy.java
index 8c72d8960..cacbaefc0 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/LocatorProxy.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/LocatorProxy.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -26,19 +26,19 @@ import org.eclipse.tm.tcf.services.ILocator;
public class LocatorProxy implements ILocator {
-
+
private final IChannel channel;
private final Map<String,IPeer> peers = new HashMap<String,IPeer>();
private final Collection<LocatorListener> listeners = new ArrayList<LocatorListener>();
-
+
private boolean get_peers_done = false;
-
+
private class Peer implements IPeer {
-
+
private final IPeer parent;
-
+
private final Map<String, String> attrs;
-
+
Peer(IPeer parent, Map<String,String> attrs) {
this.parent = parent;
this.attrs = attrs;
@@ -153,7 +153,7 @@ public class LocatorProxy implements ILocator {
}
}
};
-
+
public LocatorProxy(IChannel channel) {
this.channel = channel;
channel.addEventListener(this, event_listener);
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/MemoryProxy.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/MemoryProxy.java
index e8dd8b948..02215e433 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/MemoryProxy.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/MemoryProxy.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -31,26 +31,26 @@ public class MemoryProxy implements IMemory {
private final IChannel channel;
private final Map<MemoryListener,IChannel.IEventListener> listeners =
new HashMap<MemoryListener,IChannel.IEventListener>();
-
+
private static class Range implements Comparable<Range> {
int offs;
int size;
int stat;
String msg;
-
+
public int compareTo(Range o) {
if (offs < o.offs) return -1;
if (offs > o.offs) return +1;
return 0;
}
}
-
+
private class MemoryErrorReport extends MemoryError implements ErrorOffset, IErrorReport {
-
+
private static final long serialVersionUID = 796525409870265390L;
private final Map<String,Object> attrs;
private final Range[] ranges;
-
+
@SuppressWarnings("unchecked")
MemoryErrorReport(String msg, Map<String,Object> attrs, Number addr, Object ranges) {
super(msg);
@@ -250,7 +250,7 @@ public class MemoryProxy implements IMemory {
}
}.token;
}
-
+
public String toString() {
return "[Memory Context " + props.toString() + "]";
}
@@ -316,7 +316,7 @@ public class MemoryProxy implements IMemory {
}
}.token;
}
-
+
public IToken getChildren(String parent_context_id, final DoneGetChildren done) {
return new Command(channel, this, "getChildren", new Object[]{ parent_context_id }) {
@Override
@@ -335,9 +335,9 @@ public class MemoryProxy implements IMemory {
public String getName() {
return NAME;
}
-
+
private abstract class MemoryCommand extends Command {
-
+
MemoryCommand(String cmd, Object[] args) {
super(channel, MemoryProxy.this, cmd, args);
}
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/ProcessesProxy.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/ProcessesProxy.java
index b75c48c71..b71efef71 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/ProcessesProxy.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/ProcessesProxy.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -23,15 +23,15 @@ import org.eclipse.tm.tcf.services.IProcesses;
public class ProcessesProxy implements IProcesses {
-
+
private final IChannel channel;
private final Map<ProcessesListener,IChannel.IEventListener> listeners =
new HashMap<ProcessesListener,IChannel.IEventListener>();
-
+
private class ProcessContext implements IProcesses.ProcessContext {
private final Map<String,Object> props;
-
+
ProcessContext(Map<String,Object> props) {
this.props = props;
}
@@ -108,7 +108,7 @@ public class ProcessesProxy implements IProcesses {
return "[Processes Context " + props.toString() + "]";
}
}
-
+
public ProcessesProxy(IChannel channel) {
this.channel = channel;
}
@@ -293,7 +293,7 @@ public class ProcessesProxy implements IProcesses {
}
return arr;
}
-
+
@SuppressWarnings("unchecked")
private static Map<String,String> toEnvMap(Object o) {
Map<String,String> m = new HashMap<String,String>();
@@ -306,7 +306,7 @@ public class ProcessesProxy implements IProcesses {
}
return m;
}
-
+
@SuppressWarnings("unchecked")
private static Collection<Map<String,Object>> toSignalList(Object o) {
if (o == null) return null;
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/RegistersProxy.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/RegistersProxy.java
index 947852ccb..031de981d 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/RegistersProxy.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/RegistersProxy.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -27,11 +27,11 @@ public class RegistersProxy implements IRegisters {
private final IChannel channel;
private final Map<RegistersListener,IChannel.IEventListener> listeners =
new HashMap<RegistersListener,IChannel.IEventListener>();
-
+
private class Context implements RegistersContext {
-
+
private final Map<String,Object> props;
-
+
Context(Map<String,Object> props) {
this.props = props;
}
@@ -65,7 +65,7 @@ public class RegistersProxy implements IRegisters {
public String getParentID() {
return (String)props.get(PROP_PARENT_ID);
}
-
+
public int getSize() {
Number n = (Number)props.get(PROP_SIZE);
if (n == null) return 0;
@@ -197,16 +197,16 @@ public class RegistersProxy implements IRegisters {
}
}.token;
}
-
+
public String toString() {
return "[Registers Context " + props.toString() + "]";
}
}
-
+
public RegistersProxy(IChannel channel) {
this.channel = channel;
}
-
+
public String getName() {
return NAME;
}
@@ -270,7 +270,7 @@ public class RegistersProxy implements IRegisters {
}
}.token;
}
-
+
public void addListener(final RegistersListener listener) {
IChannel.IEventListener l = new IChannel.IEventListener() {
@@ -308,7 +308,7 @@ public class RegistersProxy implements IRegisters {
Collection<String> c = (Collection<String>)o;
return (String[])c.toArray(new String[c.size()]);
}
-
+
@SuppressWarnings("unchecked")
private int[] toIntArray(Object o) {
if (o == null) return null;
@@ -318,7 +318,7 @@ public class RegistersProxy implements IRegisters {
for (Number n : c) arr[i++] = n.intValue();
return arr;
}
-
+
@SuppressWarnings("unchecked")
private String[][] toPathArray(Object o) {
if (o == null) return null;
@@ -330,13 +330,13 @@ public class RegistersProxy implements IRegisters {
}
return r;
}
-
+
private static class NamedValueInfo implements NamedValue {
-
+
private final String desc;
private final String name;
private final byte[] value;
-
+
NamedValueInfo(Map<String,Object> m) {
desc = (String)m.get("Description");
name = (String)m.get("Name");
@@ -355,7 +355,7 @@ public class RegistersProxy implements IRegisters {
return value;
}
}
-
+
@SuppressWarnings("unchecked")
private NamedValue[] toValuesArray(Object o) {
Collection<Map<String,Object>> c = (Collection<Map<String,Object>>)o;
@@ -367,7 +367,7 @@ public class RegistersProxy implements IRegisters {
}
return arr;
}
-
+
static {
JSON.addObjectWriter(Location.class, new JSON.ObjectWriter() {
public void write(Object o) throws IOException {
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/RunControlProxy.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/RunControlProxy.java
index 67570fd7e..c1147e5a3 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/RunControlProxy.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/RunControlProxy.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -135,7 +135,7 @@ public class RunControlProxy implements IRunControl {
}
}.token;
}
-
+
public String toString() {
return "[Run Control Context " + props.toString() + "]";
}
@@ -207,7 +207,7 @@ public class RunControlProxy implements IRunControl {
channel.addEventListener(this, l);
listeners.put(listener, l);
}
-
+
public void removeListener(RunControlListener listener) {
IChannel.IEventListener l = listeners.remove(listener);
if (l != null) channel.removeEventListener(this, l);
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/StackTraceProxy.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/StackTraceProxy.java
index 59b57c014..a11d2ba3e 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/StackTraceProxy.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/StackTraceProxy.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/StreamsProxy.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/StreamsProxy.java
index 50d8e7771..861186638 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/StreamsProxy.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/StreamsProxy.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2009 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/SymbolsProxy.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/SymbolsProxy.java
index 6f21f5536..728321da4 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/SymbolsProxy.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/SymbolsProxy.java
@@ -12,12 +12,12 @@ import org.eclipse.tm.tcf.services.ISymbols;
public class SymbolsProxy implements ISymbols {
private final IChannel channel;
-
+
private class Context implements Symbol {
-
+
private final byte[] value;
private final Map<String,Object> props;
-
+
Context(Map<String,Object> props) {
this.props = props;
value = JSON.toByteArray(props.get(PROP_VALUE));
@@ -111,7 +111,7 @@ public class SymbolsProxy implements ISymbols {
public SymbolsProxy(IChannel channel) {
this.channel = channel;
}
-
+
public String getName() {
return NAME;
}
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/SysMonitorProxy.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/SysMonitorProxy.java
index 75a17d5d5..2ff8edd95 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/SysMonitorProxy.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/SysMonitorProxy.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -116,7 +116,7 @@ public class SysMonitorProxy implements ISysMonitor {
public Map<String, Object> getProperties() {
return props;
}
-
+
public String toString() {
return "[Sys Monitor Context " + props.toString() + "]";
}
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/AbstractChannel.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/AbstractChannel.java
index a346339fc..15b679330 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/AbstractChannel.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/AbstractChannel.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -33,30 +33,30 @@ import org.eclipse.tm.tcf.services.ILocator;
/**
* Abstract implementation of IChannel interface.
- *
+ *
* AbstractChannel implements communication link connecting two end points (peers).
* The channel asynchronously transmits messages: commands, results and events.
- *
+ *
* Clients can subclass AbstractChannel to support particular transport (wire) protocol.
* Also, see StreamChannel for stream oriented transport protocols.
*/
public abstract class AbstractChannel implements IChannel {
public interface TraceListener {
-
+
public void onMessageReceived(char type, String token,
String service, String name, byte[] data);
-
+
public void onMessageSent(char type, String token,
String service, String name, byte[] data);
-
+
public void onChannelClosed(Throwable error);
}
-
+
public interface Proxy {
-
+
public void onCommand(IToken token, String service, String name, byte[] data);
-
+
public void onEvent(String service, String name, byte[] data);
public void onChannelClosed(Throwable error);
@@ -73,7 +73,7 @@ public abstract class AbstractChannel implements IChannel {
boolean is_canceled;
Collection<TraceListener> trace;
-
+
Message(char type) {
this.type = type;
}
@@ -146,11 +146,11 @@ public abstract class AbstractChannel implements IChannel {
private long local_congestion_time;
private int local_congestion_cnt;
private Collection<TraceListener> trace_listeners;
-
+
public static final int
EOS = -1, // End Of Stream
EOM = -2; // End Of Message
-
+
protected AbstractChannel(IPeer remote_peer) {
this(LocatorService.getLocalPeer(), remote_peer);
}
@@ -372,7 +372,7 @@ public abstract class AbstractChannel implements IChannel {
if (state == STATE_CLOSED) return;
ServiceManager.onChannelCreated(AbstractChannel.this, local_service_by_name);
makeServiceByClassMap(local_service_by_name, local_service_by_class);
- Object[] args = new Object[]{ local_service_by_name.keySet() };
+ Object[] args = new Object[]{ local_service_by_name.keySet() };
sendEvent(Protocol.getLocator(), "Hello", JSON.toJSONSequence(args));
}
catch (IOException x) {
@@ -475,7 +475,7 @@ public abstract class AbstractChannel implements IChannel {
assert Protocol.isDispatchThread();
channel_listeners.remove(listener);
}
-
+
public void addTraceListener(TraceListener listener) {
if (trace_listeners == null) {
trace_listeners = new ArrayList<TraceListener>();
@@ -485,7 +485,7 @@ public abstract class AbstractChannel implements IChannel {
}
trace_listeners.add(listener);
}
-
+
public void removeTraceListener(TraceListener listener) {
trace_listeners = new ArrayList<TraceListener>(trace_listeners);
trace_listeners.remove(listener);
@@ -543,7 +543,7 @@ public abstract class AbstractChannel implements IChannel {
out_queue.notify();
}
}
-
+
public void close() {
assert Protocol.isDispatchThread();
try {
@@ -645,7 +645,7 @@ public abstract class AbstractChannel implements IChannel {
assert Protocol.isDispatchThread();
return remote_peer;
}
-
+
public Collection<String> getLocalServices() {
assert Protocol.isDispatchThread();
assert state != STATE_OPENNING;
@@ -657,7 +657,7 @@ public abstract class AbstractChannel implements IChannel {
assert state != STATE_OPENNING;
return remote_service_by_name.keySet();
}
-
+
@SuppressWarnings("unchecked")
public <V extends IService> V getLocalService(Class<V> cls) {
assert Protocol.isDispatchThread();
@@ -671,15 +671,15 @@ public abstract class AbstractChannel implements IChannel {
assert state != STATE_OPENNING;
return (V)remote_service_by_class.get(cls);
}
-
+
public <V extends IService> void setServiceProxy(Class<V> service_interface, IService service_proxy) {
if (!notifying_channel_opened) new Error("setServiceProxe() can be called only from channel open call-back");
- if (!(remote_service_by_name.get(service_proxy.getName()) instanceof GenericProxy)) throw new Error("Proxy already set");
+ if (!(remote_service_by_name.get(service_proxy.getName()) instanceof GenericProxy)) throw new Error("Proxy already set");
if (remote_service_by_class.get(service_interface) != null) throw new Error("Proxy already set");
remote_service_by_class.put(service_interface, service_proxy);
remote_service_by_name.put(service_proxy.getName(), service_proxy);
}
-
+
public IService getLocalService(String service_name) {
assert Protocol.isDispatchThread();
assert state != STATE_OPENNING;
@@ -691,14 +691,14 @@ public abstract class AbstractChannel implements IChannel {
assert state != STATE_OPENNING;
return remote_service_by_name.get(service_name);
}
-
+
public void setProxy(Proxy proxy, Collection<String> services) throws IOException {
this.proxy = proxy;
sendEvent(Protocol.getLocator(), "Hello", JSON.toJSONSequence(new Object[]{ services }));
local_service_by_class.clear();
local_service_by_name.clear();
}
-
+
private void addToOutQueue(Message msg) {
msg.trace = trace_listeners;
synchronized (out_queue) {
@@ -771,11 +771,11 @@ public abstract class AbstractChannel implements IChannel {
msg.data = args;
addToOutQueue(msg);
}
-
+
public boolean isZeroCopySupported() {
return zero_copy;
}
-
+
@SuppressWarnings("unchecked")
private void handleInput(Message msg) {
assert Protocol.isDispatchThread();
@@ -848,7 +848,7 @@ public abstract class AbstractChannel implements IChannel {
proxy.onEvent(msg.service, msg.name, msg.data);
}
else if (hello) {
- assert state == STATE_OPENNING;
+ assert state == STATE_OPENNING;
state = STATE_OPEN;
assert redirect_command == null;
if (redirect_queue.size() > 0) {
@@ -938,7 +938,7 @@ public abstract class AbstractChannel implements IChannel {
* Write one byte into the channel output stream.
* The method argument can be one of two special values:
* EOS (-1) end of stream marker;
- * EOM (-2) end of message marker.
+ * EOM (-2) end of message marker.
* The stream can put the byte into a buffer instead of transmitting it right away.
* @param n - the data byte.
* @throws IOException
@@ -955,7 +955,7 @@ public abstract class AbstractChannel implements IChannel {
/**
* Stop (close) channel underlying streams.
* If a thread is blocked by read() or write(), it should be
- * resumed (or interrupted).
+ * resumed (or interrupted).
* @throws IOException
*/
protected abstract void stop() throws IOException;
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/AbstractPeer.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/AbstractPeer.java
index ef79c1db6..94ab622ff 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/AbstractPeer.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/AbstractPeer.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -32,9 +32,9 @@ public class AbstractPeer implements IPeer {
private final Map<String, String> ro_attrs;
private final Map<String, String> rw_attrs;
-
+
private long last_heart_beat_time;
-
+
public AbstractPeer(Map<String,String> attrs) {
assert Protocol.isDispatchThread();
if (attrs != null) {
@@ -47,10 +47,10 @@ public class AbstractPeer implements IPeer {
assert getID() != null;
LocatorService.addPeer(this);
}
-
+
void onChannelTerminated() {
// A channel to this peer was terminated:
- // not delaying next heart beat helps client to recover much faster.
+ // not delaying next heart beat helps client to recover much faster.
last_heart_beat_time = 0;
}
@@ -111,7 +111,7 @@ public class AbstractPeer implements IPeer {
last_heart_beat_time = time;
}
}
-
+
public void sendPeerAddedEvent() {
for (LocatorListener l : LocatorService.getListeners()) {
try {
@@ -179,7 +179,7 @@ public class AbstractPeer implements IPeer {
assert Protocol.isDispatchThread();
return ro_attrs.get(ATTR_TRANSPORT_NAME);
}
-
+
public IChannel openChannel() {
return TransportManager.openChannel(this);
}
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/Base64.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/Base64.java
index 2a8ea72fa..27a3824cd 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/Base64.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/Base64.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -16,7 +16,7 @@ package org.eclipse.tm.tcf.core;
* @noinstantiate This class is not intended to be instantiated by clients.
*/
public final class Base64 {
-
+
public static char[] toBase64(byte[] buf, int pos, int len) {
char[] out_buf = new char[4 * ((len + 2) / 3)];
int end = pos + len;
@@ -46,7 +46,7 @@ public final class Base64 {
assert out_pos == out_buf.length;
return out_buf;
}
-
+
public static void toByteArray(byte[] buf, int offs, int size, char[] inp) {
int out_pos = offs;
if (inp != null) {
@@ -109,7 +109,7 @@ public final class Base64 {
toByteArray(buf, 0, buf.length, inp);
return buf;
}
-
+
/*
* See RFC 2045.
*/
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/ChannelTCP.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/ChannelTCP.java
index 20ac6cb87..0f552ab78 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/ChannelTCP.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/ChannelTCP.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2009 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/Command.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/Command.java
index 886a1a793..bc3f32e5a 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/Command.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/Command.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -30,17 +30,17 @@ import org.eclipse.tm.tcf.protocol.Protocol;
* This is utility class that helps to implement sending a command and receiving
* command result over TCF communication channel. The class uses JSON to encode
* command arguments and to decode result data.
- *
+ *
* The class also provides support for TCF standard error report encoding.
- *
+ *
* Clients are expected to subclass <code>Command</code> and override <code>done</code> method.
- *
+ *
* Note: most clients don't need to handle protocol commands directly and
* can use service APIs instead. Service API does all command encoding/decoding
* for a client.
- *
+ *
* Typical usage example:
- *
+ *
* public IToken getContext(String id, final DoneGetContext done) {
* return new Command(channel, IService.this, "getContext", new Object[]{ id }) {
* @Override
@@ -57,17 +57,17 @@ import org.eclipse.tm.tcf.protocol.Protocol;
* }
*/
public abstract class Command implements IChannel.ICommandListener {
-
+
private final IService service;
private final String command;
private final Object[] args;
-
+
public final IToken token;
-
+
private boolean done;
-
+
private static final SimpleDateFormat timestamp_format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
-
+
public Command(IChannel channel, IService service, String command, Object[] args) {
this.service = service;
this.command = command;
@@ -116,9 +116,9 @@ public abstract class Command implements IChannel.ICommandListener {
done = true;
done(error, null);
}
-
+
public abstract void done(Exception error, Object[] args);
-
+
public String getCommandString() {
StringBuffer buf = new StringBuffer();
buf.append(service.getName());
@@ -139,7 +139,7 @@ public abstract class Command implements IChannel.ICommandListener {
}
return buf.toString();
}
-
+
@SuppressWarnings({ "unchecked" })
public static String toErrorString(Object data) {
if (data == null) return null;
@@ -163,7 +163,7 @@ public abstract class Command implements IChannel.ICommandListener {
}
return "Invalid error report format";
}
-
+
static void appendErrorProps(StringBuffer bf, Map<String,Object> map) {
Number time = (Number)map.get(IErrorReport.ERROR_TIME);
Number code = (Number)map.get(IErrorReport.ERROR_CODE);
@@ -209,11 +209,11 @@ public abstract class Command implements IChannel.ICommandListener {
}
}
}
-
+
public Exception toError(Object data) {
return toError(data, true);
}
-
+
@SuppressWarnings("unchecked")
public Exception toError(Object data, boolean include_command_text) {
if (data == null) return null;
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/ErrorReport.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/ErrorReport.java
index 56dbca80e..59d3d3ffa 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/ErrorReport.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/ErrorReport.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007-2009 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -16,10 +16,10 @@ import java.util.Map;
import org.eclipse.tm.tcf.protocol.IErrorReport;
class ErrorReport extends Exception implements IErrorReport {
-
+
private static final long serialVersionUID = 3687543884858739977L;
private final Map<String,Object> attrs;
-
+
@SuppressWarnings("unchecked")
ErrorReport(String msg, Map<String,Object> attrs) {
super(msg);
@@ -34,7 +34,7 @@ class ErrorReport extends Exception implements IErrorReport {
initCause(new ErrorReport(bf.toString(), map));
}
}
-
+
ErrorReport(String msg, int code) {
super(msg);
attrs = new HashMap<String,Object>();
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/ServerTCP.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/ServerTCP.java
index 70d14924b..35e1bc67d 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/ServerTCP.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/ServerTCP.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* 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
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -28,27 +28,27 @@ import org.eclipse.tm.tcf.protocol.Protocol;
/**
* ServerTCP is a TCP server that is listening for incoming connection requests
* and creates TCF communication channels over TCP sockets for such requests.
- *
+ *
* Clients may create objects of this class to become a TCF server.
*/
public class ServerTCP extends ServerSocket {
-
+
private static class ServerPeer extends AbstractPeer {
ServerPeer(Map<String,String> attrs) {
super(attrs);
}
}
-
+
private static class RemotePeer extends AbstractPeer {
RemotePeer(Map<String,String> attrs) {
super(attrs);
}
}
-
+
private final String name;
private List<ServerPeer> peers;
private Thread thread;
-
+
public ServerTCP(String name, int port) throws IOException {
super(port);
this.name = name;
@@ -93,7 +93,7 @@ public class ServerTCP extends ServerSocket {
thread.setDaemon(true);
thread.start();
}
-
+
private ServerPeer getLocalPeer(String addr) {
for (ServerPeer p : peers) {
if (addr.equals(p.getAttributes().get(IPeer.ATTR_IP_HOST))) return p;
@@ -106,15 +106,15 @@ public class ServerTCP extends ServerSocket {
attrs.put(IPeer.ATTR_IP_HOST, addr);
attrs.put(IPeer.ATTR_IP_PORT, Integer.toString(getLocalPort()));
attrs.put(IPeer.ATTR_PROXY, "");
- ServerPeer p = new ServerPeer(attrs);
+ ServerPeer p = new ServerPeer(attrs);
peers.add(p);
return p;
}
-
+
private IPeer getLocalPeer(Socket socket) {
return getLocalPeer(socket.getLocalAddress().getHostAddress());
}
-
+
private IPeer getRemotePeer(Socket socket) {
String addr = socket.getInetAddress().getHostAddress();
for (IPeer p : Protocol.getLocator().getPeers().values()) {
@@ -126,7 +126,7 @@ public class ServerTCP extends ServerSocket {
attrs.put(IPeer.ATTR_IP_HOST, addr);
return new RemotePeer(attrs);
}
-
+
@Override
public void close() throws IOException {
if (peers != null) {
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/StreamChannel.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/StreamChannel.java
index 14d2e0cf5..ac16d4d6c 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/StreamChannel.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/StreamChannel.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -19,16 +19,16 @@ import org.eclipse.tm.tcf.protocol.IPeer;
*
* StreamChannel implements communication link connecting two end points (peers).
* The channel asynchronously transmits messages: commands, results and events.
- *
+ *
* StreamChannel uses escape sequences to represent End-Of-Message and End-Of-Stream markers.
- *
+ *
* Clients can subclass StreamChannel to support particular stream oriented transport (wire) protocol.
* Also, see ChannelTCP for a concrete IChannel implementation that works on top of TCP sockets as a transport.
*/
public abstract class StreamChannel extends AbstractChannel {
public static final int ESC = 3;
-
+
private int bin_data_size;
public StreamChannel(IPeer remote_peer) {
@@ -41,7 +41,7 @@ public abstract class StreamChannel extends AbstractChannel {
protected abstract int get() throws IOException;
protected abstract void put(int n) throws IOException;
-
+
protected void put(byte[] buf) throws IOException {
for (byte b : buf) put(b & 0xff);
}
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IChannel.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IChannel.java
index 23f6e59b7..5def99b87 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IChannel.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IChannel.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -18,7 +18,7 @@ import java.util.Collection;
* A single channel may be used to communicate with multiple services.
* Multiple channels may be used to connect the same peers, however no command or event
* ordering is guaranteed across channels.
- *
+ *
* @noimplement This interface is not intended to be implemented by clients.
* Clients can extend abstract implementations of IChannel: AbstractChannel or StreamChannel.
*/
@@ -47,13 +47,13 @@ public interface IChannel {
* @param name - command name
* @param args - command arguments encoded into array of bytes
* @param done - call back object
- * @return pending command handle
+ * @return pending command handle
*/
IToken sendCommand(IService service, String name, byte[] args, ICommandListener done);
/**
* Command listener interface. Clients implement this interface to
- * receive command results.
+ * receive command results.
*/
interface ICommandListener {
@@ -105,11 +105,11 @@ public interface IChannel {
/**
* Get current level of out-bound traffic congestion.
- *
+ *
* @return integer value in range –100..100, where –100 means no pending
* messages (no traffic), 0 means optimal load, and positive numbers
* indicate level of congestion.
- *
+ *
* Note: in-bound traffic congestion is detected by framework and reported to
* remote peer without client needed to be involved. Clients willing to provide
* additional data about local congestion should register itself using
@@ -175,14 +175,14 @@ public interface IChannel {
* Subscribe a command server. The server will be notified about command
* messages received through this channel for given service.
* @param service - local service implementation
- * @param server - implementation of service commands listener
+ * @param server - implementation of service commands listener
*/
void addCommandServer(IService service, ICommandServer server);
/**
* Remove a command server.
* @param service - local service implementation
- * @param server - implementation of service commands listener
+ * @param server - implementation of service commands listener
*/
void removeCommandServer(IService service, ICommandServer server);
@@ -191,7 +191,7 @@ public interface IChannel {
* Services usually define a service specific event listener interface,
* which is implemented using this generic listener.
* Clients should user service specific listener interface,
- * unless no such interface is defined.
+ * unless no such interface is defined.
*/
interface IEventListener {
/**
@@ -205,14 +205,14 @@ public interface IChannel {
/**
* Subscribe an event listener for given service.
* @param service - remote service proxy
- * @param server - implementation of service event listener
+ * @param server - implementation of service event listener
*/
void addEventListener(IService service, IEventListener listener);
/**
* Unsubscribe an event listener for given service.
* @param service - remote service proxy
- * @param server - implementation of service event listener
+ * @param server - implementation of service event listener
*/
void removeEventListener(IService service, IEventListener listener);
@@ -266,7 +266,7 @@ public interface IChannel {
* Return null if implementation of the interface is not available.
*/
<V extends IService> V getRemoteService(Class<V> service_interface);
-
+
/**
* Install a service proxy object on this channel.
* This method can be called only from channel open call-back.
@@ -276,10 +276,10 @@ public interface IChannel {
* It is not allowed to install more then one proxy for a given service interface on
* a particular channel.
* @param service_interface - service interface class
- * @param service_proxy - service proxy object
+ * @param service_proxy - service proxy object
*/
<V extends IService> void setServiceProxy(Class<V> service_interface, IService service_proxy);
-
+
/**
* Close communication channel.
*/
@@ -290,7 +290,7 @@ public interface IChannel {
* @param error - cause of channel termination
*/
void terminate(Throwable error);
-
+
/**
* Redirect this channel to given peer using this channel remote peer locator service as a proxy.
* @param peer_id - peer that will become new remote communication endpoint of this channel
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IErrorReport.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IErrorReport.java
index 86b85a1f9..e110c7133 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IErrorReport.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IErrorReport.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* 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
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -14,17 +14,17 @@ import java.util.Map;
/**
* This interface defines TCF standard format of error reports.
- *
+ *
* Exception objects can implement this interface to make error report details
* available for clients.
- *
+ *
* Usage example:
- *
+ *
* Exception x = ...
* if (x instanceof IErrorReport) {
* int error_code = ((IErrorReport)x).getErrorCode();
* ...
- *
+ *
* @noextend This interface is not intended to be extended by clients.
*/
public interface IErrorReport {
@@ -40,28 +40,28 @@ public interface IErrorReport {
ERROR_ALT_CODE = "AltCode", // integer
ERROR_ALT_ORG = "AltOrg", // string
ERROR_CAUSED_BY = "CausedBy"; // object
-
+
/** Error severity codes */
public static final int
SEVERITY_ERROR = 0,
SEVERITY_WARNING = 1,
SEVERITY_FATAL = 2;
-
+
/** Error code ranges */
public static final int
/** Standard TCF code range */
CODE_STD_MIN = 0,
CODE_STD_MAX = 0xffff,
-
+
/** Service specific codes. Decoding requires service ID. */
CODE_SERVICE_SPECIFIC_MIN = 0x10000,
CODE_SERVICE_SPECIFIC_MAX = 0x1ffff,
-
+
/** Reserved codes - will never be used by the TCF standard */
CODE_RESERVED_MIN = 0x20000,
CODE_RESERVED_MAX = 0x2ffff;
-
- /** Standard TCF error codes */
+
+ /** Standard TCF error codes */
public static final int
TCF_ERROR_OTHER = 1,
TCF_ERROR_JSON_SYNTAX = 2,
@@ -88,12 +88,12 @@ public interface IErrorReport {
TCF_ERROR_UNSUPPORTED = 23,
TCF_ERROR_INV_DATA_TYPE = 24,
TCF_ERROR_INV_COMMAND = 25;
-
+
public int getErrorCode();
-
+
public int getAltCode();
-
+
public String getAltOrg();
-
+
public Map<String,Object> getAttributes();
}
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IEventQueue.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IEventQueue.java
index 15da38e28..f94d2d0de 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IEventQueue.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IEventQueue.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -13,7 +13,7 @@ package org.eclipse.tm.tcf.protocol;
/**
* Clients of stand-alone version the framework should implement this interface and call Protocol.setEventQueue.
* Eclipse based clients don't need to implement IEventQueue since the implementation is provide by TCF bundle activator.
- *
+ *
* Implementation should encapsulate a queue and asynchronous event dispatch machinery, which
* extracts events from the queue and dispatches them by calling event's run() method.
* The implementation is used by framework to queue and dispatch all events.
@@ -40,7 +40,7 @@ public interface IEventQueue {
/**
* Get current level of queue congestion.
- *
+ *
* @return integer value in range –100..100, where –100 means no pending
* messages (no traffic), 0 means optimal load, and positive numbers
* indicate level of congestion.
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/ILogger.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/ILogger.java
index b2f869a64..af31d6425 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/ILogger.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/ILogger.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* 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
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -18,10 +18,10 @@ public interface ILogger {
/**
* Add an entry into a log.
- *
+ *
* This method can be invoked from any thread.
- *
- * @param msg - log entry text.
+ *
+ * @param msg - log entry text.
* @param x - a Java exception associated with the log entry or null.
*/
void log(String msg, Throwable x);
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IPeer.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IPeer.java
index 3f96d298a..ecacb224a 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IPeer.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IPeer.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -18,14 +18,14 @@ import java.util.Map;
* target depending on services it implements.
* List of currently known peers can be retrieved by
* calling ILocator.getPeers()
- *
+ *
* @noimplement This interface is not intended to be implemented by clients.
* Client can extends the abstract IPeer implementation: AbstractPeer.
*/
public interface IPeer {
/**
- * Peer property names. Implementation can define additional properties.
+ * Peer property names. Implementation can define additional properties.
*/
static final String
ATTR_ID = "ID",
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IService.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IService.java
index 583d41039..1f1a3ab48 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IService.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IService.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -13,11 +13,11 @@ package org.eclipse.tm.tcf.protocol;
/**
* Base interface for all service interfaces. A client can get list of available services
* by calling IChannel.getLocalServices() and IChannel.getRemoteServices().
- *
+ *
* Remote services are represented by a proxy objects that implement service interfaces by
* translating method calls to TCF messages and sending them to a remote peer.
* When communication channel is open, TCF automatically creates proxies for standard services.
- * TCF clients can provides addition proxies for non-standard services by calling IChannel.setServiceProxy().
+ * TCF clients can provides addition proxies for non-standard services by calling IChannel.setServiceProxy().
*/
public interface IService {
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IServiceProvider.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IServiceProvider.java
index fe9457f4a..c7339b608 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IServiceProvider.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IServiceProvider.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2008 Anyware Technologies and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Anyware Technologies - initial API and implementation
*******************************************************************************/
@@ -12,11 +12,11 @@ package org.eclipse.tm.tcf.protocol;
/**
* Clients can implement this interface if they want to provide implementation of a local service or
- * remote service proxy.
+ * remote service proxy.
*/
public interface IServiceProvider {
-
+
public IService[] getLocalService(IChannel channel);
-
+
public IService getServiceProxy(IChannel channel, String service_name);
}
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IToken.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IToken.java
index e03f7ed7d..4fa83890d 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IToken.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/IToken.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -13,7 +13,7 @@ package org.eclipse.tm.tcf.protocol;
/**
* IToken is created by the framework for each command sent to a remote peer.
* It is used to match results to commands and to cancel pending commands.
- *
+ *
* @noextend This interface is not intended to be extended by clients.
* @noimplement This interface is not intended to be implemented by clients.
*/
@@ -24,7 +24,7 @@ public interface IToken {
* canceled by this method only if it was not transmitted yet to remote peer
* for execution. Successfully canceled command does not produce any result
* messages.
- *
+ *
* @return true if successful.
*/
boolean cancel();
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/ITransportProvider.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/ITransportProvider.java
index c8a7a8187..3683f367a 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/ITransportProvider.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/ITransportProvider.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2009 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -13,12 +13,12 @@ package org.eclipse.tm.tcf.protocol;
/**
* ITransportProvider represents communication protocol that can be used to open TCF communication channels.
* Examples of transports are: TCP/IP, RS-232, USB.
- *
+ *
* Client can implement this interface if they want to provide support for a transport that is not
* supported directly by the framework.
*/
public interface ITransportProvider {
-
+
/**
* Return transport name. Same as used as peer attribute, @see IPeer.ATTR_TRANSPORT_NAME
* @return transport name.
@@ -30,7 +30,7 @@ public interface ITransportProvider {
* Note: the channel can be not fully open yet when this method returns.
* It’s state can be IChannel.STATE_OPENNING.
* Protocol.Listener will be called when the channel will be opened or closed.
- * @param peer - a IPeer object that describes remote end-point of the channel.
+ * @param peer - a IPeer object that describes remote end-point of the channel.
* @return TCF communication channel.
*/
IChannel openChannel(IPeer peer);
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/JSON.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/JSON.java
index a612cbfe9..e9f595103 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/JSON.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/JSON.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -30,18 +30,18 @@ import org.eclipse.tm.tcf.core.Base64;
*
* Reading of JSON produces data structure that consists of objects of these classes:
* Boolean, Number, String, Collection, Map.
- *
+ *
* Writing of JSON is supported for:
* Boolean, Number, String, char[], byte[], Object[], Collection, Map
- *
+ *
* Clients can enable writing support for objects of a other classes by
* registering ObjectWriter interface implementation.
- *
+ *
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/
public final class JSON {
-
+
/**
* Clients implement ObjectWriter interface when they want to enable marshaling of
* object classes that are not directly supported by JSON library.
@@ -49,38 +49,38 @@ public final class JSON {
public interface ObjectWriter {
void write(Object o) throws IOException;
}
-
- private static final Map<Class<?>,ObjectWriter> object_writers = new HashMap<Class<?>,ObjectWriter>();
-
+
+ private static final Map<Class<?>,ObjectWriter> object_writers = new HashMap<Class<?>,ObjectWriter>();
+
/** Wrapper class for binary byte blocs */
public final static class Binary {
public final byte[] bytes;
public final int offs;
public final int size;
-
+
public Binary(byte[] bytes, int offs, int size) {
this.bytes = bytes;
this.offs = offs;
this.size = size;
}
}
-
+
private static char[] tmp_buf = new char[0x1000];
private static byte[] tmp_bbf = new byte[0x1000];
private static int tmp_buf_pos;
private static boolean zero_copy;
private static Binary[] bin_buf = new Binary[0x10];
private static int bin_buf_pos;
-
+
private static byte[] inp;
private static int inp_pos;
private static int cur_ch;
-
- // This buffer is used to create nice error reports
+
+ // This buffer is used to create nice error reports
private static final char[] err_buf = new char[100];
private static int err_buf_pos;
private static int err_buf_cnt;
-
+
/**
* Add a handler for converting objects of a particular class into JSON.
* @param cls - a class
@@ -103,7 +103,7 @@ public final class JSON {
}
tmp_buf[tmp_buf_pos++] = ch;
}
-
+
/**
* Write a string into JSON output buffer.
* The string is written "as-is". Call writeObject() to convert a String into JSON string.
@@ -118,7 +118,7 @@ public final class JSON {
else tmp_buf[tmp_buf_pos++] = ch;
}
}
-
+
/**
* Write a non-negative integer number into JSON output buffer.
* Clients should not call this method directly, except from ObjectWriter implementation.
@@ -129,7 +129,7 @@ public final class JSON {
if (n >= 10) writeUInt(n / 10);
write((char)('0' + n % 10));
}
-
+
private static int readUTF8Char() {
if (inp_pos >= inp.length) return -1;
int ch = inp[inp_pos++];
@@ -165,7 +165,7 @@ public final class JSON {
err_buf_cnt++;
}
}
-
+
private static void error() throws IOException {
error("syntax error");
}
@@ -215,7 +215,7 @@ public final class JSON {
read();
return n;
}
-
+
private static Object readFloat(boolean sign, BigInteger val) throws IOException {
int scale = 0;
int fraction = 0;
@@ -241,7 +241,7 @@ public final class JSON {
if (sign) val = val.negate();
return new BigDecimal(val, fraction - scale);
}
-
+
private static Object readNestedObject() throws IOException {
switch (cur_ch) {
case '(':
@@ -435,7 +435,7 @@ public final class JSON {
}
return l.toArray();
}
-
+
/**
* Write an object into JSON output buffer.
* Clients should not call this method directly, except from ObjectWriter implementation.
@@ -588,22 +588,22 @@ public final class JSON {
out_pos += b.size;
}
else if (ch < 0x80) {
- tmp_bbf[out_pos++] = (byte)ch;
+ tmp_bbf[out_pos++] = (byte)ch;
}
else if (ch < 0x800) {
- tmp_bbf[out_pos++] = (byte)((ch >> 6) | 0xc0);
- tmp_bbf[out_pos++] = (byte)(ch & 0x3f | 0x80);
+ tmp_bbf[out_pos++] = (byte)((ch >> 6) | 0xc0);
+ tmp_bbf[out_pos++] = (byte)(ch & 0x3f | 0x80);
}
else if (ch < 0x10000) {
- tmp_bbf[out_pos++] = (byte)((ch >> 12) | 0xe0);
- tmp_bbf[out_pos++] = (byte)((ch >> 6) & 0x3f | 0x80);
- tmp_bbf[out_pos++] = (byte)(ch & 0x3f | 0x80);
+ tmp_bbf[out_pos++] = (byte)((ch >> 12) | 0xe0);
+ tmp_bbf[out_pos++] = (byte)((ch >> 6) & 0x3f | 0x80);
+ tmp_bbf[out_pos++] = (byte)(ch & 0x3f | 0x80);
}
else {
- tmp_bbf[out_pos++] = (byte)((ch >> 18) | 0xf0);
- tmp_bbf[out_pos++] = (byte)((ch >> 12) & 0x3f | 0x80);
- tmp_bbf[out_pos++] = (byte)((ch >> 6) & 0x3f | 0x80);
- tmp_bbf[out_pos++] = (byte)(ch & 0x3f | 0x80);
+ tmp_bbf[out_pos++] = (byte)((ch >> 18) | 0xf0);
+ tmp_bbf[out_pos++] = (byte)((ch >> 12) & 0x3f | 0x80);
+ tmp_bbf[out_pos++] = (byte)((ch >> 6) & 0x3f | 0x80);
+ tmp_bbf[out_pos++] = (byte)(ch & 0x3f | 0x80);
}
}
byte[] res = new byte[out_pos];
@@ -675,7 +675,7 @@ public final class JSON {
read();
return readSequence();
}
-
+
public static byte[] toByteArray(Object o) {
if (o == null) return null;
if (o instanceof byte[]) return (byte[])o;
@@ -683,7 +683,7 @@ public final class JSON {
if (o instanceof String) return Base64.toByteArray(((String)o).toCharArray());
throw new Error();
}
-
+
public static void toByteArray(byte[] buf, int offs, int size, Object o) {
if (o instanceof char[]) Base64.toByteArray(buf, offs, size, (char[])o);
else if (o instanceof String) Base64.toByteArray(buf, offs, size, ((String)o).toCharArray());
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/Protocol.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/Protocol.java
index 3f9939b21..5e6694ec9 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/Protocol.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/Protocol.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -25,13 +25,13 @@ import org.eclipse.tm.tcf.services.ILocator;
* 1. the framework event queue and dispatch thread;
* 2. local instance of Locator service, which maintains a list of available targets;
* 3. list of open communication channels.
- *
+ *
* It also provides utility methods for posting asynchronous events,
* including delayed events (timers).
- *
+ *
* Before TCF can be used, it should be given an object implementing IEventQueue interface:
* @see #setEventQueue
- *
+ *
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/
@@ -41,7 +41,7 @@ public final class Protocol {
private static ILogger logger;
private static final TreeSet<Timer> timer_queue = new TreeSet<Timer>();
private static int timer_cnt;
-
+
private static class Timer implements Comparable<Timer>{
final int id;
final long time;
@@ -103,12 +103,12 @@ public final class Protocol {
* executes <code>run</code> methods of that objects in a sequence by a single thread.
* The thread in referred as TCF event dispatch thread. Objects in the queue are called TCF events.
* Executing <code>run</code> method of an event is also called dispatching of the event.
- *
+ *
* Only few methods in TCF APIs are thread safe - can be invoked from any thread.
- * If a method description does not say "can be invoked from any thread" explicitly -
+ * If a method description does not say "can be invoked from any thread" explicitly -
* the method must be invoked from TCF event dispatch thread. All TCF listeners are
* invoked from the dispatch thread.
- *
+ *
* @param event_queue - IEventQueue implementation.
*/
public static void setEventQueue(IEventQueue event_queue) {
@@ -185,7 +185,7 @@ public final class Protocol {
}
}
}
-
+
/**
* Causes <code>runnable</code> to have its <code>run</code>
* method called in the dispatch thread of the framework.
@@ -226,17 +226,17 @@ public final class Protocol {
}
}
}
-
+
/**
* Set framework logger.
* By default Eclipse logger is used, or System.err if TCF is used stand-alone.
- *
+ *
* @param logger - an object implementing ILogger interface.
*/
public static synchronized void setLogger(ILogger logger) {
Protocol.logger = logger;
}
-
+
/**
* Logs the given message.
* @see #setLogger
@@ -256,13 +256,13 @@ public final class Protocol {
/**
* Get instance of the framework locator service.
* The service can be used to discover available remote peers.
- *
+ *
* @return instance of ILocator.
*/
public static ILocator getLocator() {
return LocatorService.getLocator();
}
-
+
/**
* Return an array of all open channels.
* @return an array of IChannel
@@ -271,11 +271,11 @@ public final class Protocol {
assert isDispatchThread();
return TransportManager.getOpenChannels();
}
-
+
/**
* Interface to be implemented by clients willing to be notified when
* new TCF communication channel is opened.
- *
+ *
* The interface allows a client to get pointers to channel objects
* that were opened by somebody else. If a client open a channel itself, it already has
* the pointer and does not need Protocol.ChannelOpenListener. If a channel is created,
@@ -285,7 +285,7 @@ public final class Protocol {
public interface ChannelOpenListener {
public void onChannelOpen(IChannel channel);
}
-
+
/**
* Add a listener that will be notified when new channel is opened.
* @param listener
@@ -312,28 +312,28 @@ public final class Protocol {
assert isDispatchThread();
TransportManager.sendEvent(service_name, event_name, data);
}
-
+
/**
* Call back after all TCF messages sent by this host up to this moment are delivered
* to their intended target. This method is intended for synchronization of messages
* across multiple channels.
- *
+ *
* Note: Cross channel synchronization can reduce performance and throughput.
- * Most clients don't need cross channel synchronization and should not call this method.
- *
- * @param done will be executed by dispatch thread after pending communication
+ * Most clients don't need cross channel synchronization and should not call this method.
+ *
+ * @param done will be executed by dispatch thread after pending communication
* messages are delivered to corresponding targets.
*/
public static void sync(Runnable done) {
assert isDispatchThread();
TransportManager.sync(done);
}
-
+
/**
* Clients implement CongestionMonitor interface to monitor usage of local resources,
* like, for example, display queue size - if the queue becomes too big, UI response time
* can become too high, or it can crash all together because of OutOfMemory errors.
- * TCF flow control logic prevents such conditions by throttling traffic coming from remote peers.
+ * TCF flow control logic prevents such conditions by throttling traffic coming from remote peers.
* Note: Local (in-bound traffic) congestion is detected by framework and reported to
* remote peer without client needed to be involved. Only clients willing to provide
* additional data about local congestion should implement CongestionMonitor and
@@ -341,13 +341,13 @@ public final class Protocol {
*/
public interface CongestionMonitor {
/**
- * Get current level of client resource utilization.
+ * Get current level of client resource utilization.
* @return integer value in range –100..100, where –100 means all resources are free,
* 0 means optimal load, and positive numbers indicate level of congestion.
*/
int getCongestionLevel();
}
-
+
/**
* Register a congestion monitor.
* @param monitor - client implementation of CongestionMonitor interface
@@ -357,7 +357,7 @@ public final class Protocol {
assert isDispatchThread();
congestion_monitors.add(monitor);
}
-
+
/**
* Unregister a congestion monitor.
* @param monitor - client implementation of CongestionMonitor interface
@@ -366,10 +366,10 @@ public final class Protocol {
assert isDispatchThread();
congestion_monitors.remove(monitor);
}
-
+
/**
* Get current level of local traffic congestion.
- *
+ *
* @return integer value in range –100..100, where –100 means no pending
* messages (no traffic), 0 means optimal load, and positive numbers
* indicate level of congestion.
@@ -390,15 +390,15 @@ public final class Protocol {
}
/**
- * Register s service provider.
+ * Register s service provider.
* @param provider - IServiceProvider implementation
*/
public static void addServiceProvider(IServiceProvider provider){
ServiceManager.addServiceProvider(provider);
}
-
+
/**
- * Unregister s service provider.
+ * Unregister s service provider.
* @param provider - IServiceProvider implementation
*/
public static void removeServiceProvider(IServiceProvider provider){
@@ -406,16 +406,16 @@ public final class Protocol {
}
/**
- * Register s transport provider.
+ * Register s transport provider.
* @param provider - ITransportProvider implementation
*/
public static void addTransportProvider(ITransportProvider provider){
assert isDispatchThread();
TransportManager.addTransportProvider(provider);
}
-
+
/**
- * Unregister s transport provider.
+ * Unregister s transport provider.
* @param provider - ITransportProvider implementation
*/
public static void removeTransportProvider(ITransportProvider provider){
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IBreakpoints.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IBreakpoints.java
index 9e40654bb..ae6b94f44 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IBreakpoints.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IBreakpoints.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -19,11 +19,11 @@ import org.eclipse.tm.tcf.protocol.IToken;
/**
* Breakpoint is represented by unique identifier and set of properties.
* Breakpoint identifier (String id) needs to be unique across all hosts and targets.
- *
+ *
* Breakpoint properties (Map<String,Object>) is extendible collection of named attributes,
* which define breakpoint location and behavior. This module defines some common
* attribute names (see PROP_*), host tools and target agents may support additional attributes.
- *
+ *
* For each breakpoint a target agent maintains another extendible collection of named attributes:
* breakpoint status (Map<String,Object>, see STATUS_*). While breakpoint properties are
* persistent and represent user input, breakpoint status reflects dynamic target agent reports
@@ -39,7 +39,7 @@ public interface IBreakpoints extends IService {
/**
* Breakpoint property names.
*/
- static final String
+ static final String
PROP_ID = "ID", // String
PROP_ENABLED = "Enabled", // Boolean
PROP_TYPE = "BreakpointType", // String
@@ -63,31 +63,31 @@ public interface IBreakpoints extends IService {
PROP_TEMPORARY = "Temporary"; // Boolean
/**
- * BreakpointType values
+ * BreakpointType values
*/
static final String
TYPE_RELATIVE = "Software",
TYPE_ABSOLUTE = "Hardware",
TYPE_AUTO = "Auto";
- /**
- * AccessMode values
- */
- static final int
+ /**
+ * AccessMode values
+ */
+ static final int
ACCESSMODE_READ = 0x01,
- ACCESSMODE_WRITE = 0x02,
+ ACCESSMODE_WRITE = 0x02,
ACCESSMODE_EXECUTE = 0x04,
ACCESSMODE_CHANGE = 0x08;
/**
- * TimeScale values
+ * TimeScale values
*/
- static final String
+ static final String
TIMESCALE_RELATIVE = "Relative",
TIMESCALE_ABSOLUTE = "Absolute";
-
+
/**
- * TimeUnits values
+ * TimeUnits values
*/
static final String
TIMEUNIT_NSECS = "Nanoseconds",
@@ -103,7 +103,7 @@ public interface IBreakpoints extends IService {
STATUS_FILE = "File", // String
STATUS_LINE = "Line", // Number
STATUS_COLUMN = "Column"; // Number
-
+
/**
* Breakpoint instance field names.
*/
@@ -111,7 +111,7 @@ public interface IBreakpoints extends IService {
INSTANCE_ERROR = "Error", // String
INSTANCE_CONTEXT = "LocationContext", // String
INSTANCE_ADDRESS = "Address"; // Number
-
+
/**
* Breakpoint service capabilities.
*/
@@ -136,11 +136,11 @@ public interface IBreakpoints extends IService {
/**
* Download breakpoints data to target agent.
- * The command is intended to be used only to initialize target breakpoints table
- * when communication channel is open. After that, host should
+ * The command is intended to be used only to initialize target breakpoints table
+ * when communication channel is open. After that, host should
* notify target about (incremental) changes in breakpoint data by sending
* add, change and remove commands.
- *
+ *
* @param properties - array of breakpoints.
* @param done - command result call back object.
* @return - pending command handle.
@@ -186,7 +186,7 @@ public interface IBreakpoints extends IService {
* @return - pending command handle.
*/
IToken remove(String[] ids, DoneCommand done);
-
+
/**
* Upload IDs of breakpoints known to target agent.
* @param done - command result call back object.
@@ -199,7 +199,7 @@ public interface IBreakpoints extends IService {
*/
interface DoneGetIDs {
/**
- * Called when 'getIDs' command is done.
+ * Called when 'getIDs' command is done.
* @param token - command handle.
* @param error - error object or null.
* @param ids - IDs of breakpoints known to target agent.
@@ -219,7 +219,7 @@ public interface IBreakpoints extends IService {
*/
interface DoneGetProperties {
/**
- * Called when 'getProperties' command is done.
+ * Called when 'getProperties' command is done.
* @param token - command handle.
* @param error - error object or null.
* @param properties - properties of the breakpoint.
@@ -240,7 +240,7 @@ public interface IBreakpoints extends IService {
*/
interface DoneGetStatus {
/**
- * Called when 'getStatus' command is done.
+ * Called when 'getStatus' command is done.
* @param token - command handle.
* @param error - error object or null.
* @param status - status of the breakpoint.
@@ -266,7 +266,7 @@ public interface IBreakpoints extends IService {
*/
interface DoneGetCapabilities {
/**
- * Called when 'getCapabilities' command is done.
+ * Called when 'getCapabilities' command is done.
* @param token - command handle.
* @param error - error object or null.
* @param capabilities - breakpoints service capabilities description.
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IDiagnostics.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IDiagnostics.java
index 52694f303..e3b84dd1e 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IDiagnostics.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IDiagnostics.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -16,7 +16,7 @@ import org.eclipse.tm.tcf.protocol.IService;
import org.eclipse.tm.tcf.protocol.IToken;
/**
- * This is optional service that can be implemented by a peer.
+ * This is optional service that can be implemented by a peer.
* If implemented, the service can be used for testing of the peer and
* communication channel functionality and reliability.
*/
@@ -24,17 +24,17 @@ import org.eclipse.tm.tcf.protocol.IToken;
public interface IDiagnostics extends IService {
static final String NAME = "Diagnostics";
-
+
/**
* 'echo' command result returns same string that was given as command argument.
* The command is used to test communication channel ability to transmit arbitrary strings in
- * both directions.
+ * both directions.
* @param s - any string.
* @param done - command result call back object.
* @return - pending command handle.
*/
IToken echo(String s, DoneEcho done);
-
+
/**
* Call back interface for 'echo' command.
*/
@@ -51,13 +51,13 @@ public interface IDiagnostics extends IService {
/**
* 'echoFP' command result returns same floating point number that was given as command argument.
* The command is used to test communication channel ability to transmit arbitrary floating point numbers in
- * both directions.
+ * both directions.
* @param n - any floating point number.
* @param done - command result call back object.
* @return - pending command handle.
*/
IToken echoFP(BigDecimal n, DoneEchoFP done);
-
+
/**
* Call back interface for 'echoFP' command.
*/
@@ -83,7 +83,7 @@ public interface IDiagnostics extends IService {
* @return - pending command handle.
*/
IToken getTestList(DoneGetTestList done);
-
+
/**
* Call back interface for 'getTestList' command.
*/
@@ -92,11 +92,11 @@ public interface IDiagnostics extends IService {
* Called when 'getTestList' command is done.
* @param token - command handle.
* @param error - error object or null.
- * @param list - names of tests that are supported by the peer.
+ * @param list - names of tests that are supported by the peer.
*/
void doneGetTestList(IToken token, Throwable error, String[] list);
}
-
+
/**
* Run a test. When started, a test performs a predefined set actions.
* Nature of test actions is uniquely identified by test name.
@@ -108,7 +108,7 @@ public interface IDiagnostics extends IService {
* @return - pending command handle.
*/
IToken runTest(String name, DoneRunTest done);
-
+
/**
* Call back interface for 'runTest' command.
*/
@@ -129,7 +129,7 @@ public interface IDiagnostics extends IService {
* @return - pending command handle.
*/
IToken cancelTest(String context_id, DoneCancelTest done);
-
+
/**
* Call back interface for 'cancelTest' command.
*/
@@ -141,7 +141,7 @@ public interface IDiagnostics extends IService {
*/
void doneCancelTest(IToken token, Throwable error);
}
-
+
/**
* Get information about a symbol in text execution context.
* @param context_id
@@ -150,7 +150,7 @@ public interface IDiagnostics extends IService {
* @return
*/
IToken getSymbol(String context_id, String symbol_name, DoneGetSymbol done);
-
+
/**
* Call back interface for 'getSymbol' command.
*/
@@ -163,7 +163,7 @@ public interface IDiagnostics extends IService {
*/
void doneGetSymbol(IToken token, Throwable error, ISymbol symbol);
}
-
+
/**
* Interface to access result value of 'getSymbol' command.
*/
@@ -176,7 +176,7 @@ public interface IDiagnostics extends IService {
boolean isLocal();
boolean isAbs();
}
-
+
/**
* Create a pair of virtual streams, @see IStreams service.
* Remote ends of the streams are connected, so any data sent into 'inp' stream
@@ -188,12 +188,12 @@ public interface IDiagnostics extends IService {
* @return - pending command handle.
*/
IToken createTestStreams(int inp_buf_size, int out_buf_size, DoneCreateTestStreams done);
-
+
/**
* Call back interface for 'createTestStreams' command.
*/
interface DoneCreateTestStreams {
-
+
/**
* Called when 'createTestStreams' command is done.
* @param token - command handle.
@@ -203,7 +203,7 @@ public interface IDiagnostics extends IService {
*/
void doneCreateTestStreams(IToken token, Throwable error, String inp_id, String out_id);
}
-
+
/**
* Dispose a virtual stream that was created by 'createTestStreams' command.
* @param id - the stream ID.
@@ -211,12 +211,12 @@ public interface IDiagnostics extends IService {
* @return - pending command handle.
*/
IToken disposeTestStream(String id, DoneDisposeTestStream done);
-
+
/**
* Call back interface for 'disposeTestStream' command.
*/
interface DoneDisposeTestStream {
-
+
/**
* Called when 'createTestStreams' command is done.
* @param token - command handle.
@@ -224,7 +224,7 @@ public interface IDiagnostics extends IService {
*/
void doneDisposeTestStream(IToken token, Throwable error);
}
-
+
/**
* Send a command that is not implemented by peer.
* Used to test handling of 'N' messages by communication channel.
@@ -232,9 +232,9 @@ public interface IDiagnostics extends IService {
* @return - pending command handle.
*/
IToken not_implemented_command(DoneNotImplementedCommand done);
-
+
interface DoneNotImplementedCommand {
-
+
/**
* Called when 'not_implemented_command' command is done.
* @param token - command handle.
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IExpressions.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IExpressions.java
index 0018fb837..82f40d7bb 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IExpressions.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IExpressions.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* 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
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -25,13 +25,13 @@ public interface IExpressions extends IService {
* Service name.
*/
static final String NAME = "Expressions";
-
+
/**
* Expression object represent an expression that can be evaluated by remote target.
* It has a unique ID and contains all information necessary to compute a value.
* The object data usually includes:
* 1. process, thread or stack frame ID that should be used to resolve symbol names;
- * 2. a script that can compute a value, like "x.y + z"
+ * 2. a script that can compute a value, like "x.y + z"
*/
interface Expression {
/**
@@ -39,53 +39,53 @@ public interface IExpressions extends IService {
* @return context ID.
*/
String getID();
-
+
/**
* Get parent context ID.
* @return parent context ID.
*/
String getParentID();
-
+
/**
* Get expression script language ID.
* @return language ID.
*/
String getLanguage();
-
+
/**
* Return expression string - the script part of the context.
- * @return expression script string
+ * @return expression script string
*/
String getExpression();
-
+
/**
* Get size of expression value in bits.
* Can be 0 if value size is even number of bytes, use getSize() in such case.
* @return size in bits.
*/
int getBits();
-
+
/**
* Get size in bytes. The size can include extra (unused) bits.
* This is "static" or "declared" size - as determined by expression type.
* @return size in bytes.
*/
int getSize();
-
+
/**
* Get expression type ID. Symbols service can be used to get type properties.
* This is "static" or "declared" type ID, actual type of a value can be different -
- * if expression language supports dynamic typing.
+ * if expression language supports dynamic typing.
* @return type ID.
*/
String getTypeID();
-
+
/**
* Check if the expression can be assigned a new value.
* @return true if can assign.
*/
boolean canAssign();
-
+
/**
* Get complete map of context properties.
* @return map of context properties.
@@ -111,14 +111,14 @@ public interface IExpressions extends IService {
* Note that same expression can be evaluated multiple times with different results.
*/
interface Value {
-
+
/**
* Get value type class.
* @see ISymbols.TypeClass
* @return
*/
ISymbols.TypeClass getTypeClass();
-
+
/**
* Get value type ID. Symbols service can be used to get type properties.
* @return type ID.
@@ -133,11 +133,11 @@ public interface IExpressions extends IService {
/**
* Check endianess of the values.
- * Big endian means decreasing numeric significance with increasing byte number.
+ * Big endian means decreasing numeric significance with increasing byte number.
* @return true if big endian.
*/
boolean isBigEndian();
-
+
/**
* Get value as array of bytes.
* @return value as array of bytes.
@@ -163,8 +163,8 @@ public interface IExpressions extends IService {
/**
* Retrieve expression context info for given context ID.
* @see Expression
- *
- * @param id – context ID.
+ *
+ * @param id – context ID.
* @param done - call back interface called when operation is completed.
* @return - pending command handle.
*/
@@ -186,16 +186,16 @@ public interface IExpressions extends IService {
/**
* Retrieve children IDs for given parent ID.
* Meaning of the operation depends on parent kind:
- * 1. expression with type of a struct, union, or class - fields;
+ * 1. expression with type of a struct, union, or class - fields;
* 2. expression with type of an enumeration - enumerators;
* 3. expression with type of an array - array elements;
* 4. stack frame - function arguments and local variables;
* 5. thread - top stack frame function arguments and local variables;
* 6. process - global variables;
- *
+ *
* Children list does *not* include IDs of expressions that were created by clients
* using "create" command.
- *
+ *
* @param parent_context_id – parent context ID.
* @param done - call back interface called when operation is completed.
* @return - pending command handle.
@@ -214,7 +214,7 @@ public interface IExpressions extends IService {
*/
void doneGetChildren(IToken token, Exception error, String[] context_ids);
}
-
+
/**
* Create an expression context.
* The context should be disposed after use.
@@ -246,7 +246,7 @@ public interface IExpressions extends IService {
* @return - pending command handle.
*/
IToken dispose(String id, DoneDispose done);
-
+
/**
* Client call back interface for dispose().
*/
@@ -266,7 +266,7 @@ public interface IExpressions extends IService {
* @return - pending command handle.
*/
IToken evaluate(String id, DoneEvaluate done);
-
+
/**
* Client call back interface for evaluate().
*/
@@ -279,7 +279,7 @@ public interface IExpressions extends IService {
*/
void doneEvaluate(IToken token, Exception error, Value value);
}
-
+
/**
* Assign a value to memory location determined by an expression.
* @param id - expression ID.
@@ -288,7 +288,7 @@ public interface IExpressions extends IService {
* @return - pending command handle.
*/
IToken assign(String id, byte[] value, DoneAssign done);
-
+
/**
* Client call back interface for assign().
*/
@@ -300,7 +300,7 @@ public interface IExpressions extends IService {
*/
void doneAssign(IToken token, Exception error);
}
-
+
/**
* Add expressions service event listener.
* @param listener - event listener implementation.
@@ -315,12 +315,12 @@ public interface IExpressions extends IService {
/**
* Registers event listener is notified when registers context hierarchy
- * changes, and when a register is modified by the service commands.
+ * changes, and when a register is modified by the service commands.
*/
interface ExpressionsListener {
/**
- * Called when expression value was changed and clients
+ * Called when expression value was changed and clients
* need to update themselves. Clients, at least, should invalidate
* corresponding cached expression data.
* Not every change is notified - it is not possible,
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IFileSystem.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IFileSystem.java
index 1bcaf2dc7..eab69e96b 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IFileSystem.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IFileSystem.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -21,7 +21,7 @@ import org.eclipse.tm.tcf.protocol.IToken;
* File System service provides file transfer (and more generally file
* system access) functionality in TCF. The service design is
* derived from SSH File Transfer Protocol specifications.
- *
+ *
* Request Synchronization and Reordering
*
* The protocol and implementations MUST process requests relating to
@@ -49,7 +49,7 @@ import org.eclipse.tm.tcf.protocol.IToken;
* performed by the server. If the server's queues are full, it should
* not read any more data from the stream, and flow control will prevent
* the client from sending more requests.
- *
+ *
* File Names
*
* This protocol represents file names as strings. File names are
@@ -77,7 +77,7 @@ import org.eclipse.tm.tcf.protocol.IToken;
* using a slash ('/') as the separator, and that will work as expected.
*/
public interface IFileSystem extends IService {
-
+
/**
* Service name.
*/
@@ -86,8 +86,8 @@ public interface IFileSystem extends IService {
/**
* Flags to be used with open() method.
*/
- static final int
-
+ static final int
+
/**
* Open the file for reading.
*/
@@ -102,7 +102,7 @@ public interface IFileSystem extends IService {
/**
* Force all writes to append data at the end of the file.
*/
- TCF_O_APPEND = 0x00000004,
+ TCF_O_APPEND = 0x00000004,
/**
* If this flag is specified, then a new file will be created if one
@@ -147,30 +147,30 @@ public interface IFileSystem extends IService {
* server normally returns all attributes it knows about.
*/
final static class FileAttrs {
-
+
/**
* The `flags' specify which of the fields are present.
*/
public final int flags;
-
+
/**
* The `size' field specifies the size of the file in bytes.
*/
public final long size;
-
+
/**
* The `uid' and `gid' fields contain numeric Unix-like user and group
* identifiers, respectively.
*/
public final int uid;
public final int gid;
-
+
/**
* The `permissions' field contains a bit mask of file permissions as
* defined by posix [1].
*/
public final int permissions;
-
+
/**
* The `atime' and `mtime' contain the access and modification times of
* the files, respectively. They are represented as milliseconds from
@@ -183,7 +183,7 @@ public interface IFileSystem extends IService {
* Additional (non-standard) attributes.
*/
public final Map<String,Object> attributes;
-
+
public FileAttrs(int flags, long size, int uid, int gid,
int permissions, long atime, long mtime, Map<String,Object> attributes) {
this.flags = flags;
@@ -195,10 +195,10 @@ public interface IFileSystem extends IService {
this.mtime = mtime;
this.attributes = attributes;
}
-
+
/**
* Determines if the file system object is a file on the remote file system.
- *
+ *
* @return true if and only if the object on the remote system can be considered to have "contents" that
* have the potential to be read and written as a byte stream.
*/
@@ -209,7 +209,7 @@ public interface IFileSystem extends IService {
/**
* Determines if the file system object is a directory on the remote file system.
- *
+ *
* @return true if and only if the object on the remote system is a directory.
* That is, it contains entries that can be interpreted as other files.
*/
@@ -218,7 +218,7 @@ public interface IFileSystem extends IService {
return (permissions & S_IFMT) == S_IFDIR;
}
}
-
+
/**
* The following flags are defined for the 'permissions' field:
*/
@@ -246,14 +246,14 @@ public interface IFileSystem extends IService {
S_IROTH = 00004, // others have read permission
S_IWOTH = 00002, // others have write permission
S_IXOTH = 00001; // others have execute permission
-
+
final static class DirEntry {
/**
* `filename' is a file name being returned. It is a relative name within
* the directory, without any path components;
*/
public final String filename;
-
+
/**
* `longname' is an expanded format for the file name, similar to what
* is returned by "ls -l" on Unix systems.
@@ -265,33 +265,33 @@ public interface IFileSystem extends IService {
* use the attrs field instead.
*/
public final String longname;
-
+
/**
* `attrs' is the attributes of the file.
*/
public final FileAttrs attrs;
-
+
public DirEntry(String filename, String longname, FileAttrs attrs) {
this.filename = filename;
this.longname = longname;
this.attrs = attrs;
}
}
-
+
/**
* Opaque representation of open file handle.
- * Note: open file handle can be used only with service instance that
+ * Note: open file handle can be used only with service instance that
* created the handle.
*/
interface IFileHandle {
IFileSystem getService();
}
-
+
/**
* Service specific error codes.
*/
static final int
-
+
/**
* Indicates end-of-file condition; for read() it means that no
* more data is available in the file, and for readdir() it
@@ -310,25 +310,25 @@ public interface IFileSystem extends IService {
* permissions to perform the operation.
*/
STATUS_PERMISSION_DENIED = 0x10003;
-
+
/**
- * The class to represent File System error reports.
+ * The class to represent File System error reports.
*/
@SuppressWarnings("serial")
abstract static class FileSystemException extends IOException {
-
+
protected FileSystemException(String message) {
super(message);
}
-
+
protected FileSystemException(Exception x) {
super(x.getMessage());
initCause(x);
}
-
+
/**
* Get error code. The code can be standard TCF error code or
- * one of service specific codes, see STATUS_*.
+ * one of service specific codes, see STATUS_*.
* @return error code.
*/
public abstract int getStatus();
@@ -336,7 +336,7 @@ public interface IFileSystem extends IService {
/**
* Open or create a file on a remote system.
- *
+ *
* @param file_name specifies the file name. See 'File Names' for more information.
* @param flags is a bit mask of TCF_O_* flags.
* @param attrs specifies the initial attributes for the file.
@@ -345,25 +345,25 @@ public interface IFileSystem extends IService {
* @return pending command handle.
*/
IToken open(String file_name, int flags, FileAttrs attrs, DoneOpen done);
-
+
interface DoneOpen {
void doneOpen(IToken token, FileSystemException error, IFileHandle handle);
}
-
+
/**
* Close a file on a remote system.
- *
+ *
* @param handle is a handle previously returned in the response to
* open() or opendir().
* @param done is call back object.
* @return pending command handle.
*/
IToken close(IFileHandle handle, DoneClose done);
-
+
interface DoneClose {
void doneClose(IToken token, FileSystemException error);
}
-
+
/**
* Read bytes from an open file.
* In response to this request, the server will read as many bytes as it
@@ -374,7 +374,7 @@ public interface IFileSystem extends IService {
* true in case of EOF. For normal disk files, it is guaranteed
* that this will read the specified number of bytes, or up to end of file
* or error. For e.g. device files this may return fewer bytes than requested.
- *
+ *
* @param handle is an open file handle returned by open().
* @param offset is the offset (in bytes) relative
* to the beginning of the file from where to start reading.
@@ -384,7 +384,7 @@ public interface IFileSystem extends IService {
* @return pending command handle.
*/
IToken read(IFileHandle handle, long offset, int len, DoneRead done);
-
+
interface DoneRead {
void doneRead(IToken token, FileSystemException error, byte[] data, boolean eof);
}
@@ -395,7 +395,7 @@ public interface IFileSystem extends IService {
* It is legal to write way beyond the end of the file; the semantics
* are to write zeroes from the end of the file to the specified offset
* and then the data.
- *
+ *
* @param handle is an open file handle returned by open().
* @param offset is the offset (in bytes) relative
* to the beginning of the file from where to start writing.
@@ -412,10 +412,10 @@ public interface IFileSystem extends IService {
interface DoneWrite {
void doneWrite(IToken token, FileSystemException error);
}
-
+
/**
* Retrieve file attributes.
- *
+ *
* @param path - specifies the file system object for which
* status is to be returned.
* @param done is call back object.
@@ -426,27 +426,27 @@ public interface IFileSystem extends IService {
/**
* Retrieve file attributes.
* Unlike 'stat()', 'lstat()' does not follow symbolic links.
- *
+ *
* @param path - specifies the file system object for which
* status is to be returned.
* @param done is call back object.
* @return pending command handle.
*/
IToken lstat(String path, DoneStat done);
-
+
/**
* Retrieve file attributes for an open file (identified by the file handle).
- *
+ *
* @param handle is a file handle returned by 'open()'.
* @param done is call back object.
* @return pending command handle.
*/
IToken fstat(IFileHandle handle, DoneStat done);
-
+
interface DoneStat {
void doneStat(IToken token, FileSystemException error, FileAttrs attrs);
}
-
+
/**
* Set file attributes.
* This request is used for operations such as changing the ownership,
@@ -454,7 +454,7 @@ public interface IFileSystem extends IService {
* An error will be returned if the specified file system object does
* not exist or the user does not have sufficient rights to modify the
* specified attributes.
- *
+ *
* @param path specifies the file system object (e.g. file or directory)
* whose attributes are to be modified.
* @param attrs specifies the modifications to be made to file attributes.
@@ -462,23 +462,23 @@ public interface IFileSystem extends IService {
* @return pending command handle.
*/
IToken setstat(String path, FileAttrs attrs, DoneSetStat done);
-
+
/**
* Set file attributes for an open file (identified by the file handle).
* This request is used for operations such as changing the ownership,
* permissions or access times, as well as for truncating a file.
- *
+ *
* @param handle is a file handle returned by 'open()'.
* @param attrs specifies the modifications to be made to file attributes.
* @param done is call back object.
* @return pending command handle.
*/
IToken fsetstat(IFileHandle handle, FileAttrs attrs, DoneSetStat done);
-
+
interface DoneSetStat {
void doneSetStat(IToken token, FileSystemException error);
}
-
+
/**
* The opendir() command opens a directory for reading.
* Once the directory has been successfully opened, files (and
@@ -492,7 +492,7 @@ public interface IFileSystem extends IService {
* @return pending command handle.
*/
IToken opendir(String path, DoneOpen done);
-
+
/**
* The files in a directory can be listed using the opendir() and
* readdir() requests. Each readdir() request returns one
@@ -508,21 +508,21 @@ public interface IFileSystem extends IService {
* @return pending command handle.
*/
IToken readdir(IFileHandle handle, DoneReadDir done);
-
+
interface DoneReadDir {
void doneReadDir(IToken token, FileSystemException error, DirEntry[] entries, boolean eof);
}
-
+
/**
* Create a directory on the server.
- *
+ *
* @param path - specifies the directory to be created.
* @param attrs - new directory attributes.
* @param done - result call back object.
* @return pending command handle.
*/
IToken mkdir(String path, FileAttrs attrs, DoneMkDir done);
-
+
interface DoneMkDir {
void doneMkDir(IToken token, FileSystemException error);
}
@@ -533,13 +533,13 @@ public interface IFileSystem extends IService {
* with the specified path exists, or if the specified directory is not
* empty, or if the path specified a file system object other than a
* directory.
- *
+ *
* @param path - specifies the directory to be removed.
* @param done - result call back object.
* @return pending command handle.
*/
IToken rmdir(String path, DoneRemove done);
-
+
interface DoneRemove {
void doneRemove(IToken token, FileSystemException error);
}
@@ -549,15 +549,15 @@ public interface IFileSystem extends IService {
* UNIX file system can report just one root with path "/". Other types of systems
* can have more the one root. For example, Windows server can return multiple roots:
* one per disc (e.g. "/C:/", "/D:/", etc.). Note: even Windows implementation of
- * the service must use forward slash as directory separator, and must start
+ * the service must use forward slash as directory separator, and must start
* absolute path with "/". Server should implement proper translation of
- * protocol file names to OS native names and back.
- *
+ * protocol file names to OS native names and back.
+ *
* @param done - result call back object.
* @return pending command handle.
*/
IToken roots(DoneRoots done);
-
+
interface DoneRoots {
void doneRoots(IToken token, FileSystemException error, DirEntry[] entries);
}
@@ -565,24 +565,24 @@ public interface IFileSystem extends IService {
/**
* Remove a file or symbolic link.
* This request cannot be used to remove directories.
- *
+ *
* @param file_name is the name of the file to be removed.
* @param done - result call back object.
* @return pending command handle.
*/
IToken remove(String file_name, DoneRemove done);
-
+
/**
* Canonicalize any given path name to an absolute path.
* This is useful for converting path names containing ".." components or
* relative pathnames without a leading slash into absolute paths.
- *
+ *
* @param path specifies the path name to be canonicalized.
* @param done - result call back object.
* @return pending command handle.
*/
IToken realpath(String path, DoneRealPath done);
-
+
interface DoneRealPath {
void doneRealPath(IToken token, FileSystemException error, String path);
}
@@ -593,48 +593,48 @@ public interface IFileSystem extends IService {
* with the name specified by 'new_path'. The server may also fail rename
* requests in other situations, for example if `old_path' and `new_path'
* point to different file systems on the server.
- *
+ *
* @param old_path is the name of an existing file or directory.
* @param new_path is the new name for the file or directory.
* @param done - result call back object.
* @return pending command handle.
*/
IToken rename(String old_path, String new_path, DoneRename done);
-
+
interface DoneRename {
void doneRename(IToken token, FileSystemException error);
}
/**
* Read the target of a symbolic link.
- *
+ *
* @param path specifies the path name of the symbolic link to be read.
* @param done - result call back object.
* @return pending command handle.
*/
IToken readlink(String path, DoneReadLink done);
-
+
interface DoneReadLink {
void doneReadLink(IToken token, FileSystemException error, String path);
}
/**
* Create a symbolic link on the server.
- *
+ *
* @param link_path specifies the path name of the symbolic link to be created.
* @param target_path specifies the target of the symbolic link.
* @param done - result call back object.
* @return pending command handle.
*/
IToken symlink(String link_path, String target_path, DoneSymLink done);
-
+
interface DoneSymLink {
void doneSymLink(IToken token, FileSystemException error);
}
/**
* Copy a file on remote system.
- *
+ *
* @param src_path specifies the path name of the file to be copied.
* @param dst_path specifies destination file name.
* @param copy_permissions - if true then copy source file permissions.
@@ -644,20 +644,20 @@ public interface IFileSystem extends IService {
*/
IToken copy(String src_path, String dst_path,
boolean copy_permissions, boolean copy_ownership, DoneCopy done);
-
+
interface DoneCopy {
void doneCopy(IToken token, FileSystemException error);
}
-
+
/**
- * Retrieve information about user account, which is used by server
+ * Retrieve information about user account, which is used by server
* to access file system on behalf of the client.
- *
+ *
* @param done - result call back object.
* @return pending command handle.
*/
IToken user(DoneUser done);
-
+
interface DoneUser {
void doneUser(IToken token, FileSystemException error,
int real_uid, int effective_uid, int real_gid, int effective_gid,
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/ILineNumbers.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/ILineNumbers.java
index 4a4e11f81..b5492e806 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/ILineNumbers.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/ILineNumbers.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -22,15 +22,15 @@ import org.eclipse.tm.tcf.protocol.IToken;
public interface ILineNumbers extends IService {
static final String NAME = "LineNumbers";
-
+
/**
* TextArea represent a continues area in source text mapped to
* continues range of code addresses.
* Line and columns are counted starting from 1.
- * File name can be relative path, in such case client should
+ * File name can be relative path, in such case client should
* use TextArea directory name as origin for the path.
* File and directory names are valid on a host where code was compiled.
- * It is client responsibility to map names to this host file system.
+ * It is client responsibility to map names to this host file system.
*/
final class CodeArea {
public final String directory;
@@ -46,7 +46,7 @@ public interface ILineNumbers extends IService {
public final boolean basic_block;
public final boolean prologue_end;
public final boolean epilogue_begin;
-
+
public CodeArea(String directory, String file, int start_line, int start_column,
int end_line, int end_column, Number start_address, Number end_address, int isa,
boolean is_statement, boolean basic_block,
@@ -65,7 +65,7 @@ public interface ILineNumbers extends IService {
this.prologue_end = prologue_end;
this.epilogue_begin = epilogue_begin;
}
-
+
@Override
public boolean equals(Object o) {
if (this == o) return true;
@@ -90,14 +90,14 @@ public interface ILineNumbers extends IService {
if (directory == null && a.directory != null) return false;
return true;
}
-
+
@Override
public int hashCode() {
int h = 0;
if (file != null) h += file.hashCode();
return h + start_line + start_column + end_line + end_column;
}
-
+
@Override
public String toString() {
StringBuffer bf = new StringBuffer();
@@ -157,9 +157,9 @@ public interface ILineNumbers extends IService {
return bf.toString();
}
}
-
+
IToken mapToSource(String context_id, Number start_address, Number end_address, DoneMapToSource done);
-
+
interface DoneMapToSource {
void doneMapToSource(IToken token, Exception error, CodeArea[] areas);
}
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/ILocator.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/ILocator.java
index 636a6288a..7b4759754 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/ILocator.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/ILocator.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -23,7 +23,7 @@ import org.eclipse.tm.tcf.protocol.IToken;
* and is part of that protocol handler. Targets, known to other hosts, can be found through
* remote instances of ILocator service. Automatically discovered targets require no further
* configuration. Additional targets can be configured manually.
- *
+ *
* Clients should use Protocol.getLocator() to obtain local instance of ILocator,
* then ILocator.getPeers() can be used to get list of available peers (hosts and targets).
*/
@@ -36,7 +36,7 @@ public interface ILocator extends IService {
* Peer data retention period in milliseconds.
*/
static final long DATA_RETENTION_PERIOD = 60 * 1000;
-
+
/**
* Auto-configuration protocol version.
*/
@@ -56,38 +56,38 @@ public interface ILocator extends IService {
*/
String getName();
- /**
+ /**
* Get map (ID -> IPeer) of available peers (hosts and targets).
* The method return cached (currently known to the framework) list of peers.
* The list is updated according to event received from transport layer
*/
Map<String,IPeer> getPeers();
-
+
/**
* Redirect this service channel to given peer using this service as a proxy.
* @param peer_id - Peer ID.
*/
IToken redirect(String peer_id, DoneRedirect done);
-
+
interface DoneRedirect {
void doneRedirect(IToken token, Exception error);
}
-
+
/**
* Call back after TCF messages sent to this target up to this moment are delivered.
* This method is intended for synchronization of messages
* across multiple channels.
- *
+ *
* Note: Cross channel synchronization can reduce performance and throughput.
- * Most clients don't need channel synchronization and should not call this method.
- *
- * @param done will be executed by dispatch thread after communication
+ * Most clients don't need channel synchronization and should not call this method.
+ *
+ * @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}.
*/
IToken sync(DoneSync done);
-
+
interface DoneSync {
void doneSync(IToken token);
}
@@ -120,7 +120,7 @@ public interface ILocator extends IService {
* @param id - peer ID
*/
void peerRemoved(String id);
-
+
/**
* Peer heart beat detected.
* @param id - peer ID
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IMemory.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IMemory.java
index a77941d5c..794877bbe 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IMemory.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IMemory.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -37,7 +37,7 @@ public interface IMemory extends IService {
PROP_START_BOUND = "StartBound", /** Number, lowest address (inclusive) which is valid for the context */
PROP_END_BOUND = "EndBound", /** Number, highest address (inclusive) which is valid for the context */
PROP_ACCESS_TYPES = "AccessTypes"; /** Array of String, the access types allowed for this context */
-
+
/**
* Values of "AccessTypes".
* Target system can support multiple different memory access types, like instruction and data access.
@@ -58,11 +58,11 @@ public interface IMemory extends IService {
ACCESS_PHYSICAL = "physical", /** Context uses physical addresses */
ACCESS_CACHE = "cache", /** Context is a cache */
ACCESS_TLB = "tlb"; /** Context is a TLB memory */
-
+
/**
* Retrieve context info for given context ID.
- *
- * @param id – context ID.
+ *
+ * @param id – context ID.
* @param done - call back interface called when operation is completed.
* @return - pending command handle.
*/
@@ -89,7 +89,7 @@ public interface IMemory extends IService {
* all services. In other words, all services access same hierarchy of contexts,
* with same IDs, however, each service accesses its own subset of context's
* attributes and functionality, which is relevant to that service.
- *
+ *
* @param parent_context_id – parent context ID. Can be null –
* to retrieve top level of the hierarchy, or one of context IDs retrieved
* by previous getChildren commands.
@@ -126,62 +126,62 @@ public interface IMemory extends IService {
interface MemoryContext {
- /**
+ /**
* Get context ID.
* @return context ID.
*/
String getID();
- /**
+ /**
* Get parent context ID.
* @return parent ID.
*/
String getParentID();
-
+
/**
* Get process ID, if applicable.
* @return process ID.
*/
String getProcessID();
-
+
/**
* Get memory endianess.
* @return true if memory id big-endian.
*/
boolean isBigEndian();
-
+
/**
* Get memory address size.
* @return number of bytes used to store memory address value.
*/
int getAddressSize();
-
+
/**
* Get memory context name.
* The name can be used for UI purposes.
* @return context name.
*/
String getName();
-
+
/**
* Get lowest address (inclusive) which is valid for the context.
* @return lowest address.
*/
Number getStartBound();
-
+
/**
* Get highest address (inclusive) which is valid for the context.
* @return highest address.
*/
Number getEndBound();
-
+
/**
* Get the access types allowed for this context.
* @return collection of access type names.
*/
Collection<String> getAccessTypes();
- /**
+ /**
* Get context properties.
* @return all available context properties.
*/
@@ -218,7 +218,7 @@ public interface IMemory extends IService {
class MemoryError extends Exception {
private static final long serialVersionUID = 1L;
-
+
public MemoryError(String msg) {
super(msg);
}
@@ -238,7 +238,7 @@ public interface IMemory extends IService {
interface ErrorOffset {
// Error may have per byte information
- final static int
+ final static int
BYTE_VALID = 0x00,
BYTE_UNKNOWN = 0x01, // e.g. out of range
BYTE_INVALID = 0x02,
@@ -270,7 +270,7 @@ public interface IMemory extends IService {
/**
* Memory event listener is notified when memory context hierarchy
- * changes, and when memory is modified by memory service commands.
+ * changes, and when memory is modified by memory service commands.
*/
interface MemoryListener {
@@ -290,7 +290,7 @@ public interface IMemory extends IService {
void contextRemoved(String[] context_ids);
/**
- * Called when target memory content was changed and clients
+ * Called when target memory content was changed and clients
* need to update themselves. Clients, at least, should invalidate
* corresponding cached memory data.
* Not every change is notified - it is not possible,
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IProcesses.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IProcesses.java
index bf9b49fc1..33562f6c7 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IProcesses.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IProcesses.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -18,20 +18,20 @@ import org.eclipse.tm.tcf.protocol.IToken;
/**
- * IProcesses service provides access to the target OS's process
+ * IProcesses service provides access to the target OS's process
* information, allows to start and terminate a process, and allows
* to attach and detach a process for debugging. Debug services,
* like IMemory and IRunControl, require a process to be attached
* before they can access it.
- *
- * If a process is started by this service, its standard input/output streams are
+ *
+ * If a process is started by this service, its standard input/output streams are
* available for client to read/write using Streams service. Stream type of such
* streams is set to "Processes".
*/
public interface IProcesses extends IService {
static final String NAME = "Processes";
-
+
/**
* Retrieve context info for given context ID.
* A context corresponds to an execution thread, process, address space, etc.
@@ -41,8 +41,8 @@ public interface IProcesses extends IService {
* However, 'Processes.getContext' is supposed to return only process specific data,
* If the ID is not a process ID, 'IProcesses.getContext' may not return any
* useful information
- *
- * @param id – context ID.
+ *
+ * @param id – context ID.
* @param done - call back interface called when operation is completed.
*/
IToken getContext(String id, DoneGetContext done);
@@ -61,10 +61,10 @@ public interface IProcesses extends IService {
/**
* Retrieve children of given context.
- *
+ *
* @param parent_context_id – parent context ID. Can be null –
* to retrieve top level of the hierarchy, or one of context IDs retrieved
- * by previous getContext or getChildren commands.
+ * by previous getContext or getChildren commands.
* @param attached_only - if true return only attached process IDs.
* @param done - call back interface called when operation is completed.
*/
@@ -81,38 +81,38 @@ public interface IProcesses extends IService {
*/
void doneGetChildren(IToken token, Exception error, String[] context_ids);
}
-
+
/**
* Context property names.
*/
static final String
/** The TCF context ID */
PROP_ID = "ID",
-
+
/** The TCF parent context ID */
PROP_PARENTID = "ParentID",
-
+
/** Is the context attached */
PROP_ATTACHED = "Attached",
-
+
/** Can terminate the context */
PROP_CAN_TERMINATE = "CanTerminate",
-
+
/** Process name. Client UI can show this name to a user */
PROP_NAME = "Name",
-
+
/** Process standard input stream ID */
PROP_STDIN_ID = "StdInID",
-
+
/** Process standard output stream ID */
PROP_STDOUT_ID = "StdOutID",
-
+
/** Process standard error stream ID */
PROP_STDERR_ID = "StdErrID";
-
+
interface ProcessContext {
-
- /**
+
+ /**
* Get context ID.
* Same as getProperties().get(“ID”)
*/
@@ -149,7 +149,7 @@ public interface IProcesses extends IService {
* @return Map 'property name' -> 'property value'
*/
Map<String, Object> getProperties();
-
+
/**
* Attach debugger to a process.
* Services like IRunControl, IMemory, IBreakpoints work only with attached processes.
@@ -165,38 +165,38 @@ public interface IProcesses extends IService {
* @return pending command handle, can be used to cancel the command.
*/
IToken detach(DoneCommand done);
-
+
/**
- * Terminate a process.
+ * Terminate a process.
* @param done - call back interface called when operation is completed.
* @return pending command handle, can be used to cancel the command.
*/
IToken terminate(DoneCommand done);
}
-
+
/**
* Call-back interface to be called when command is complete.
*/
interface DoneCommand {
void doneCommand(IToken token, Exception error);
}
-
+
/**
* Signal property names used by "getSignalList" command.
*/
static final String
/** Number, bit position in the signal mask */
SIG_INDEX = "Index",
-
+
/** String, signal name, for example "SIGHUP" */
SIG_NAME = "Name",
-
+
/** Number, signal code, as defined by OS */
SIG_CODE = "Code",
-
+
/** String, human readable description of the signal */
SIG_DESCRIPTION = "Description";
-
+
/**
* Get list of signals that can be send to the process.
* @param context_id - process context ID or null.
@@ -211,17 +211,17 @@ public interface IProcesses extends IService {
interface DoneGetSignalList {
void doneGetSignalList(IToken token, Exception error, Collection<Map<String,Object>> list);
}
-
+
/**
* Get process or thread signal mask.
* Bits in the mask control how signals should be handled by debug agent.
* When new context is created it inherits the mask from its parent.
- * If context is not attached the command will return an error.
+ * If context is not attached the command will return an error.
* @param done - call back interface called when operation is completed.
* @return pending command handle, can be used to cancel the command.
*/
IToken getSignalMask(String context_id, DoneGetSignalMask done);
-
+
/**
* Call-back interface to be called when "getSignalMask" command is complete.
*/
@@ -235,13 +235,13 @@ public interface IProcesses extends IService {
*/
void doneGetSignalMask(IToken token, Exception error, int dont_stop, int dont_pass, int pending);
}
-
+
/**
- * Set process or thread signal mask.
+ * Set process or thread signal mask.
* Bits in the mask control how signals should be handled by debug agent.
- * If context is not attached the command will return an error.
+ * If context is not attached the command will return an error.
* @param dont_stop - bit-set of signals that should not suspend execution of the context.
- * By default, debugger suspends a context before it receives a signal.
+ * By default, debugger suspends a context before it receives a signal.
* @param dont_pass - bit-set of signals that should not be delivered to the context.
* @param done - call back interface called when operation is completed.
* @return pending command handle, can be used to cancel the command.
@@ -263,7 +263,7 @@ public interface IProcesses extends IService {
* @return pending command handle, can be used to cancel the command.
*/
IToken getEnvironment(DoneGetEnvironment done);
-
+
/**
* Call-back interface to be called when "getEnvironment" command is complete.
*/
@@ -277,7 +277,7 @@ public interface IProcesses extends IService {
* @param file - process image file.
* @param command_line - command line arguments for the process.
* @param environment - map of environment variables for the process,
- * if null then default set of environment variables will be used.
+ * if null then default set of environment variables will be used.
* @param attach - if true debugger should be attached to the process.
* @param done - call back interface called when operation is completed.
* @return pending command handle, can be used to cancel the command.
@@ -285,14 +285,14 @@ public interface IProcesses extends IService {
IToken start(String directory, String file,
String[] command_line, Map<String,String> environment,
boolean attach, DoneStart done);
-
+
/**
* Call-back interface to be called when "start" command is complete.
*/
interface DoneStart {
void doneStart(IToken token, Exception error, ProcessContext process);
}
-
+
/**
* Add processes service event listener.
* @param listener - event listener implementation.
@@ -307,10 +307,10 @@ public interface IProcesses extends IService {
/**
* Process event listener is notified when a process exits.
- * Event are reported only for processes that were started by 'start' command.
+ * Event are reported only for processes that were started by 'start' command.
*/
interface ProcessesListener {
-
+
/**
* Called when a process exits.
* @param process_id - process context ID
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IRegisters.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IRegisters.java
index 1e0abee4c..9ed2e05d2 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IRegisters.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IRegisters.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -43,14 +43,14 @@ public interface IRegisters extends IService {
PROP_FLOAT = "Float", /** Boolean, true if the register value is a floating-point value */
PROP_BIG_ENDIAN = "BigEndian", /** Boolean, true if big endian */
PROP_LEFT_TO_RIGHT = "LeftToRight", /** Boolean, true if the lowest numbered bit should be shown to user as the left-most bit */
- PROP_FIST_BIT = "FirstBit", /** Number, bit numbering base (0 or 1) to use when showing bits to user */
+ PROP_FIST_BIT = "FirstBit", /** Number, bit numbering base (0 or 1) to use when showing bits to user */
PROP_BITS = "Bits", /** Number, if context is a bit field, contains the field bit numbers in the parent context */
PROP_VALUES = "Values", /** Array of Map, predefined names (mnemonics) for some of context values */
PROP_MEMORY_ADDRESS = "MemoryAddress", /** Number, the address of a memory mapped register */
PROP_MEMORY_CONTEXT = "MemoryContext", /** String, the context ID of a memory context in which a memory mapped register is located */
PROP_CAN_SEARCH = "CanSearch", /** Array of String, a list of attribute names which can be searched for starting on this context */
PROP_ROLE = "Role"; /** String, the role the register plays in a program execution */
-
+
/**
* Values of context property "Role".
*/
@@ -60,18 +60,18 @@ public interface IRegisters extends IService {
ROLE_FP = "FP", /** Register defining the current frame pointer location */
ROLE_RET = "RET", /** Register used to store the return address for calls */
ROLE_CORE = "CORE"; /** Indicates register or register groups which belong to the core state */
-
+
/**
* Search filter properties.
*/
static final String
SEARCH_NAME = "Name", /** The name of the property this filter applies too */
SEARCH_EQUAL_VALUE = "EqualValue"; /** The value which is searched for */
-
+
/**
* Retrieve context info for given context ID.
- *
- * @param id – context ID.
+ *
+ * @param id – context ID.
* @param done - call back interface called when operation is completed.
*/
IToken getContext(String id, DoneGetContext done);
@@ -98,7 +98,7 @@ public interface IRegisters extends IService {
* all services. In other words, all services access same hierarchy of contexts,
* with same IDs, however, each service accesses its own subset of context's
* attributes and functionality, which is relevant to that service.
- *
+ *
* @param parent_context_id – parent context ID. Can be null –
* to retrieve top level of the hierarchy, or one of context IDs retrieved
* by previous getChildren commands.
@@ -118,9 +118,9 @@ public interface IRegisters extends IService {
*/
void doneGetChildren(IToken token, Exception error, String[] context_ids);
}
-
+
/**
- * RegistersContext objects represent register groups, registers and bit fields.
+ * RegistersContext objects represent register groups, registers and bit fields.
*/
interface RegistersContext {
/**
@@ -128,31 +128,31 @@ public interface IRegisters extends IService {
* @return context ID.
*/
String getID();
-
+
/**
* Get parent context ID.
* @return parent context ID.
*/
String getParentID();
-
+
/**
* Get process ID, if applicable.
* @return process ID.
*/
String getProcessID();
-
+
/**
* Get context (register, register group, bit field) name.
* @return context name.
*/
String getName();
-
+
/**
* Get context description.
* @return context description.
*/
String getDescription();
-
+
/**
* Get context size in bytes.
* Byte arrays in get()/set() methods should be same size.
@@ -162,58 +162,58 @@ public interface IRegisters extends IService {
* @return context size in bytes.
*/
int getSize();
-
+
/**
* Check if context value can be read.
* @return true if can read value of the context.
*/
boolean isReadable();
-
+
/**
* Check if reading the context (register) destroys its current value -
* it can be read only once.
* @return true if read-once register.
*/
boolean isReadOnce();
-
+
/**
* Check if context value can be written.
* @return true if can write value of the context.
*/
boolean isWriteable();
-
+
/**
* Check if register value can not be overwritten - every write counts.
* @return true if write-once register.
*/
boolean isWriteOnce();
-
+
/**
- * Check if writing the context can change values of other registers.
+ * Check if writing the context can change values of other registers.
* @return true if has side effects.
*/
boolean hasSideEffects();
-
+
/**
* Check if the register value can change even when target is stopped.
* @return true if the register value can change at any time.
*/
boolean isVolatile();
-
+
/**
* Check if the register value is a floating-point value.
* @return true if a floating-point register.
*/
boolean isFloat();
-
+
/**
* Check endianess of the context.
- * Big endian means decreasing numeric significance with increasing bit number.
+ * Big endian means decreasing numeric significance with increasing bit number.
* The endianess is used to encode and decode values of get, getm, set and setm commands.
* @return true if big endian.
*/
boolean isBigEndian();
-
+
/**
* Check if the lowest numbered bit (i.e. bit #0 or bit #1 depending on
* getFirstBitNumber() value) should be shown to user as the left-most bit or
@@ -221,45 +221,45 @@ public interface IRegisters extends IService {
* @return true if the first bit is left-most bit.
*/
boolean isLeftToRight();
-
+
/**
* If the context has bit field children, bit positions of the fields
* can be zero-based or 1-based.
* @return first bit position - 0 or 1.
*/
int getFirstBitNumber();
-
+
/**
- * If context is a bit field, get the field bit numbers in parent context.
+ * If context is a bit field, get the field bit numbers in parent context.
* @return array of bit numbers.
*/
int[] getBitNumbers();
-
+
/**
* A context can have predefined names (mnemonics) for some its values.
* This method returns a list of such named values.
* @return array of named values or null.
*/
NamedValue[] getNamedValues();
-
+
/**
* Get the address of a memory mapped register.
* @return address.
*/
Number getMemoryAddress();
-
+
/**
- * Get the context ID of a memory context in which a memory mapped register is located.
+ * Get the context ID of a memory context in which a memory mapped register is located.
* @return memory context ID.
*/
String getMemoryContext();
-
+
/**
* Get a list of property names which can be searched for starting on this context
* @return collection of property names.
*/
Collection<String> canSearch();
-
+
/**
* Get the role the register plays in a program execution.
* @return role name.
@@ -271,14 +271,14 @@ public interface IRegisters extends IService {
* @return map of all available context properties.
*/
Map<String,Object> getProperties();
-
+
/**
* Read value of the context.
* @param done - call back object.
* @return - pending command handle.
*/
IToken get(DoneGet done);
-
+
/**
* Set value of the context.
* @param value - value to write into the context.
@@ -286,7 +286,7 @@ public interface IRegisters extends IService {
* @return - pending command handle.
*/
IToken set(byte[] value, DoneSet done);
-
+
/**
* Search register contexts that passes given search filter.
* Search is only supported for properties listed in the "CanSearch" property.
@@ -296,10 +296,10 @@ public interface IRegisters extends IService {
*/
IToken search(Map<String,Object> filter, DoneSearch done);
}
-
+
/**
* A register context can have predefined names (mnemonics) for some its values.
- * NamedValue objects represent such values.
+ * NamedValue objects represent such values.
*/
interface NamedValue {
/**
@@ -307,20 +307,20 @@ public interface IRegisters extends IService {
* @return the value as an array of bytes.
*/
byte[] getValue();
-
+
/**
* Get name (mnemonic) of the value.
* @return value name.
*/
String getName();
-
+
/**
* Get human readable description of the value.
* @return value description.
*/
String getDescription();
}
-
+
/**
* Read values of multiple locations in registers.
* @param locs - array of data locations.
@@ -328,7 +328,7 @@ public interface IRegisters extends IService {
* @return - pending command handle.
*/
IToken getm(Location[] locs, DoneGet done);
-
+
/**
* Set values of multiple locations in registers.
* @param locs - array of data locations.
@@ -343,7 +343,7 @@ public interface IRegisters extends IService {
*/
final class Location {
/** Register context ID */
- public final String id;
+ public final String id;
/** offset in the context, in bytes */
public final int offs;
@@ -370,7 +370,7 @@ public interface IRegisters extends IService {
*/
void doneGet(IToken token, Exception error, byte[] value);
}
-
+
/**
* 'set' command call back interface.
*/
@@ -382,7 +382,7 @@ public interface IRegisters extends IService {
*/
void doneSet(IToken token, Exception error);
}
-
+
/**
* 'search' command call back interface.
*/
@@ -410,7 +410,7 @@ public interface IRegisters extends IService {
/**
* Registers event listener is notified when registers context hierarchy
- * changes, and when a register is modified by the service commands.
+ * changes, and when a register is modified by the service commands.
*/
interface RegistersListener {
@@ -419,12 +419,12 @@ public interface IRegisters extends IService {
* Most targets have static set of registers and register properties.
* Such targets never generate this event. However, some targets,
* for example, JTAG probes, allow user to modify register definitions.
- * Clients should flush all cached register context data.
+ * Clients should flush all cached register context data.
*/
void contextChanged();
/**
- * Called when register content was changed and clients
+ * Called when register content was changed and clients
* need to update themselves. Clients, at least, should invalidate
* corresponding cached registers data.
* Not every change is notified - it is not possible,
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IRunControl.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IRunControl.java
index ccfcc75df..54dc16241 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IRunControl.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IRunControl.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -19,7 +19,7 @@ import org.eclipse.tm.tcf.protocol.IToken;
public interface IRunControl extends IService {
static final String NAME = "RunControl";
-
+
/**
* Context property names.
*/
@@ -33,70 +33,70 @@ public interface IRunControl extends IService {
PROP_CAN_COUNT = "CanCount",
PROP_CAN_SUSPEND = "CanSuspend",
PROP_CAN_TERMINATE = "CanTerminate";
-
+
/**
- * Context resume modes.
+ * Context resume modes.
*/
static final int
-
+
RM_RESUME = 0,
-
+
/**
* Step over a single instruction.
* If the instruction is a function call then don't stop until the function returns.
*/
RM_STEP_OVER = 1,
-
+
/**
* Step a single instruction.
* If the instruction is a function call then stop at first instruction of the function.
*/
RM_STEP_INTO = 2,
-
+
/**
* Step over a single source code line.
* If the line contains a function call then don't stop until the function returns.
*/
RM_STEP_OVER_LINE = 3,
-
+
/**
* Step a single source code line.
* If the line contains a function call then stop at first line of the function.
*/
RM_STEP_INTO_LINE = 4,
-
+
/**
* Run until control returns from current function.
*/
RM_STEP_OUT = 5,
-
+
/**
* Start running backwards.
* Execution will continue until suspended by command or breakpoint.
*/
RM_REVERSE_RESUME = 6,
-
+
/**
* Reverse of RM_STEP_OVER - run backwards over a single instruction.
* If the instruction is a function call then don't stop until get out of the function.
*/
RM_REVERSE_STEP_OVER = 7,
-
+
/**
* Reverse of RM_STEP_INTO.
* This effectively "un-executes" the previous instruction
*/
RM_REVERSE_STEP_INTO = 8,
-
+
/**
* Reverse of RM_STEP_OVER_LINE.
* Resume backward execution of given context until control reaches an instruction that belongs
- * to a different source line.
+ * to a different source line.
* If the line contains a function call then don't stop until get out of the function.
* Error is returned if line number information not available.
*/
RM_REVERSE_STEP_OVER_LINE = 9,
-
+
/**
* Reverse of RM_STEP_INTO_LINE,
* Resume backward execution of given context until control reaches an instruction that belongs
@@ -105,38 +105,38 @@ public interface IRunControl extends IService {
* Error is returned if line number information not available.
*/
RM_REVERSE_STEP_INTO_LINE = 10,
-
+
/**
* Reverse of RM_STEP_OUT.
* Resume backward execution of the given context until control reaches the point where the current function was called.
*/
RM_REVERSE_STEP_OUT = 11,
-
+
/**
* Step over instructions until PC is outside the specified range.
* If any function call within the range is considered to be in range.
*/
RM_STEP_OVER_RANGE = 12,
-
+
/**
* Step instruction until PC is outside the specified range for any reason.
*/
RM_STEP_INTO_RANGE = 13,
-
+
/**
* Reverse of RM_STEP_OVER_RANGE
*/
RM_REVERSE_STEP_OVER_RANGE = 14,
-
+
/**
* Reverse of RM_STEP_INTO_RANGE
*/
RM_REVERSE_STEP_INTO_RANGE = 15;
-
+
/**
* State change reason of a context.
* Reason can be any text, but if it is one of predefined strings,
- * a generic client might be able to handle it better.
+ * a generic client might be able to handle it better.
*/
static final String
REASON_USER_REQUEST = "Suspended",
@@ -148,11 +148,11 @@ public interface IRunControl extends IService {
REASON_SIGNAL = "Signal",
REASON_SHAREDLIB = "Shared Library",
REASON_ERROR = "Error";
-
+
/**
* Retrieve context properties for given context ID.
- *
- * @param id – context ID.
+ *
+ * @param id – context ID.
* @param done - callback interface called when operation is completed.
*/
IToken getContext(String id, DoneGetContext done);
@@ -171,10 +171,10 @@ public interface IRunControl extends IService {
/**
* Retrieve children of given context.
- *
+ *
* @param parent_context_id – parent context ID. Can be null –
* to retrieve top level of the hierarchy, or one of context IDs retrieved
- * by previous getContext or getChildren commands.
+ * by previous getContext or getChildren commands.
* @param done - callback interface called when operation is completed.
*/
IToken getChildren(String parent_context_id, DoneGetChildren done);
@@ -190,7 +190,7 @@ public interface IRunControl extends IService {
*/
void doneGetChildren(IToken token, Exception error, String[] context_ids);
}
-
+
/**
* A context corresponds to an execution thread, process, address space, etc.
* A context can belong to a parent context. Contexts hierarchy can be simple
@@ -198,17 +198,17 @@ public interface IRunControl extends IService {
* layout that is most descriptive for a given target. Context IDs are valid across
* all services. In other words, all services access same hierarchy of contexts,
* with same IDs, however, each service accesses its own subset of context's
- * attributes and functionality, which is relevant to that service.
+ * attributes and functionality, which is relevant to that service.
*/
interface RunControlContext {
- /**
+ /**
* Retrieve context ID.
* Same as getProperties().get(“ID”)
*/
String getID();
- /**
+ /**
* Retrieve parent context ID.
* Same as getProperties().get(“ParentID”)
*/
@@ -227,14 +227,14 @@ public interface IRunControl extends IService {
* @return value of PROP_IS_CONTAINER.
*/
boolean isContainer();
-
+
/**
* Utility method to read context property PROP_HAS_STATE.
- * Only context that has a state can be resumed or suspended.
+ * Only context that has a state can be resumed or suspended.
* @return value of PROP_HAS_STATE.
*/
boolean hasState();
-
+
/**
* Utility method to read context property PROP_CAN_SUSPEND.
* Value 'true' means suspend command is supported by the context,
@@ -244,29 +244,29 @@ public interface IRunControl extends IService {
* @return value of PROP_CAN_SUSPEND.
*/
boolean canSuspend();
-
+
/**
* Utility method to read a 'mode' bit in context property PROP_CAN_RESUME.
* Value 'true' means resume 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 resumed.
- * @param mode - resume mode, see RM_*.
- * @return value of requested bit of PROP_CAN_RESUME.
+ * @param mode - resume mode, see RM_*.
+ * @return value of requested bit of PROP_CAN_RESUME.
*/
boolean canResume(int mode);
-
+
/**
* Utility method to read a 'mode' bit in context property PROP_CAN_COUNT.
* Value 'true' means resume command with count other then 1 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 resumed.
- * @param mode - resume mode, see RM_*.
- * @return value of requested bit of PROP_CAN_COUNT.
+ * @param mode - resume mode, see RM_*.
+ * @return value of requested bit of PROP_CAN_COUNT.
*/
boolean canCount(int mode);
-
+
/**
* Utility method to read context property PROP_CAN_TERMINATE.
* Value 'true' means terminate command is supported by the context,
@@ -291,7 +291,7 @@ public interface IRunControl extends IService {
* @return pending command handle, can be used to cancel the command.
*/
IToken suspend(DoneCommand done);
-
+
/**
* Send a command to resume a context.
* Also resumes children if context is a container.
@@ -301,7 +301,7 @@ public interface IRunControl extends IService {
* @return pending command handle, can be used to cancel the command.
*/
IToken resume(int mode, int count, DoneCommand done);
-
+
/**
* Send a command to resume a context.
* Also resumes children if context is a container.
@@ -312,7 +312,7 @@ public interface IRunControl extends IService {
* @return pending command handle, can be used to cancel the command.
*/
IToken resume(int mode, int count, Map<String,Object> params, DoneCommand done);
-
+
/**
* Send a command to terminate a context.
* @param done - command result call back object.
@@ -345,7 +345,7 @@ public interface IRunControl extends IService {
* @param listener - run control event listener to add.
*/
void addListener(RunControlListener listener);
-
+
/**
* Remove run control event listener.
* @param listener - run control event listener to remove.
@@ -394,14 +394,14 @@ public interface IRunControl extends IService {
/**
* Called when target simultaneously suspends multiple threads in a container
* (process, core, etc.).
- *
+ *
* @param context - ID of a context responsible for the event. It can be container ID or
* any one of container children, for example, it can be thread that hit "suspend all" breakpoint.
* Client expected to move focus (selection) to this context.
* @param pc - program counter of the context.
* @param reason - human readable description of suspend reason.
* @param params - additional target specific data about suspended context.
- * @param suspended_ids - full list of all contexts that were suspended.
+ * @param suspended_ids - full list of all contexts that were suspended.
*/
void containerSuspended(String context, String pc,
String reason, Map<String,Object> params, String[] suspended_ids);
@@ -409,8 +409,8 @@ public interface IRunControl extends IService {
/**
* Called when target simultaneously resumes multiple threads in a container (process,
* core, etc.).
- *
- * @param context_ids - full list of all contexts that were resumed.
+ *
+ * @param context_ids - full list of all contexts that were resumed.
*/
void containerResumed(String[] context_ids);
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IStackTrace.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IStackTrace.java
index cba5b560c..f86e61db1 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IStackTrace.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IStackTrace.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -30,17 +30,17 @@ public interface IStackTrace extends IService {
PROP_NAME = "Name",
PROP_FRAME_ADDRESS = "FP",
PROP_RETURN_ADDRESS = "RP",
- PROP_INSTRUCTION_ADDRESS = "IP",
+ PROP_INSTRUCTION_ADDRESS = "IP",
PROP_ARGUMENTS_COUNT = "ArgsCnt",
PROP_ARGUMENTS_ADDRESS = "ArgsAddr";
/**
* Retrieve context info for given context IDs.
- *
+ *
* The command will fail if parent thread is not suspended.
* Client can use Run Control service to suspend a thread.
- *
- * @param id – array of context IDs.
+ *
+ * @param id – array of context IDs.
* @param done - call back interface called when operation is completed.
*/
IToken getContext(String[] id, DoneGetContext done);
@@ -63,10 +63,10 @@ public interface IStackTrace extends IService {
* Some targets have more then one stack. In such case children of a thread
* are stacks, and stack frames are deeper in the hierarchy - they can be
* retrieved with additional getChildren commands.
- *
+ *
* The command will fail if parent thread is not suspended.
* Client can use Run Control service to suspend a thread.
- *
+ *
* @param parent_context_id – parent context ID.
* @param done - call back interface called when operation is completed.
*/
@@ -84,43 +84,43 @@ public interface IStackTrace extends IService {
*/
void doneGetChildren(IToken token, Exception error, String[] context_ids);
}
-
+
/**
- * StackTraceContext represents stack trace objects - stacks and stack frames.
+ * StackTraceContext represents stack trace objects - stacks and stack frames.
*/
interface StackTraceContext {
-
+
/**
* Get Context ID.
* @return context ID.
*/
String getID();
-
+
/**
* Get parent context ID.
* @return parent context ID.
*/
String getParentID();
-
+
/**
* Get context name - if context represents a stack.
* @return context name or null.
*/
String getName();
-
+
/**
* Get memory address of this frame.
* @return address or null if not a stack frame.
*/
Number getFrameAddress();
-
+
/**
* Get program counter saved in this stack frame -
* it is address of instruction to be executed when the function returns.
* @return return address or null if not a stack frame.
*/
Number getReturnAddress();
-
+
/**
* Get address of the next instruction to be executed in this stack frame.
* For top frame it is same as PC register value.
@@ -128,19 +128,19 @@ public interface IStackTrace extends IService {
* @return instruction address or null if not a stack frame.
*/
Number getInstructionAddress();
-
+
/**
* Get number of function arguments for this frame.
* @return function arguments count.
*/
int getArgumentsCount();
-
+
/**
* Get address of function arguments area in memory.
* @return function arguments address or null if not available.
*/
Number getArgumentsAddress();
-
+
/**
* Get complete map of context properties.
* @return map of context properties.
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IStreams.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IStreams.java
index 9867f420b..c964d6d62 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IStreams.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IStreams.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2009 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -15,13 +15,13 @@ import org.eclipse.tm.tcf.protocol.IToken;
/**
* Streams service is a generic interface to support streaming of data between host and remote agents.
- *
+ *
* The service supports:
* 1. Asynchronous overlapped data streaming: multiple 'read' or 'write' command can be issued at same time, both peers
* can continue data processing concurrently with data transmission.
* 2. Multicast: multiple clients can receive data from same stream.
* 3. Subscription model: clients are required to expressed interest in particular streams by subscribing for the service.
- * 4. Flow control: peers can throttle data flow of individual streams by delaying 'read' and 'write' commands.
+ * 4. Flow control: peers can throttle data flow of individual streams by delaying 'read' and 'write' commands.
*/
public interface IStreams extends IService {
@@ -32,8 +32,8 @@ public interface IStreams extends IService {
/**
* Clients can implement StreamsListener interface to be notified
- * when a stream is created or disposed. The interface is registered with 'subscribe' command.
- *
+ * when a stream is created or disposed. The interface is registered with 'subscribe' command.
+ *
* When new stream is created, client must decide if it is interested in that particular stream instance.
* If not interested, client should send 'disconnect' command to allow remote peer to free resources and bandwidth.
* If not disconnected, client is required to send 'read' commands as necessary to prevent stream buffer overflow.
@@ -41,7 +41,7 @@ public interface IStreams extends IService {
interface StreamsListener {
/**
- * Called when a new stream is created.
+ * Called when a new stream is created.
* @param stream_type - source type of the stream.
* @param stream_id - ID of the stream.
* @param context_id - a context ID that is associated with the stream, or null.
@@ -51,7 +51,7 @@ public interface IStreams extends IService {
void created(String stream_type, String stream_id, String context_id);
/**
- * Called when a stream is disposed.
+ * Called when a stream is disposed.
* @param stream_type - source type of the stream.
* @param stream_id - ID of the stream.
*/
@@ -118,7 +118,7 @@ public interface IStreams extends IService {
* @param lost_size - number of bytes that were lost because of buffer overflow.
* 'lost_size' -1 means unknown number of bytes were lost.
* if both 'lost_size' and 'data.length' are non-zero then lost bytes are considered
- * located right before read bytes.
+ * located right before read bytes.
* @param data - bytes read from the stream.
* @param eos - true if end of stream was reached.
*/
@@ -153,7 +153,7 @@ public interface IStreams extends IService {
}
/**
- * Send End Of Stream marker to a stream. No more writing to the stream is allowed after that.
+ * Send End Of Stream marker to a stream. No more writing to the stream is allowed after that.
* @param stream_id - ID of the stream.
* @param done - command result call back object.
* @return - pending command handle.
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/ISymbols.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/ISymbols.java
index 0a6d24a7d..ef3f3dd35 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/ISymbols.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/ISymbols.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* 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
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -21,7 +21,7 @@ public interface ISymbols extends IService {
* Service name.
*/
static final String NAME = "Symbols";
-
+
enum SymbolClass {
unknown, // unknown symbol class
value, // constant value
@@ -29,7 +29,7 @@ public interface ISymbols extends IService {
function, // function body
type // a type
}
-
+
enum TypeClass {
unknown, // unknown type class
cardinal, // unsigned integer
@@ -41,7 +41,7 @@ public interface ISymbols extends IService {
enumeration, // enumeration type.
function // function type.
}
-
+
/**
* Symbol context interface.
*/
@@ -51,38 +51,38 @@ public interface ISymbols extends IService {
* @return symbol ID.
*/
String getID();
-
+
/**
* Get execution context ID (thread or process) that owns this instance of a symbol.
* @return execution context ID.
*/
String getExeContextID();
-
+
/**
* Get symbol name.
* @return symbol name or null.
*/
String getName();
-
+
/**
* Get symbol class.
* @return symbol class.
*/
SymbolClass getSymbolClass();
-
+
/**
* Get symbol type class.
* @return type class.
*/
TypeClass getTypeClass();
-
+
/**
* Get type ID.
- * If the symbol is a type and not a 'typedef', return same as getID().
+ * If the symbol is a type and not a 'typedef', return same as getID().
* @return type ID.
*/
String getTypeID();
-
+
/**
* Get base type ID.
* If this symbol is a
@@ -90,46 +90,46 @@ public interface ISymbols extends IService {
* array type - return element type;
* function type - return function result type;
* class type - return base class;
- * otherwise return null.
+ * otherwise return null.
* @return type ID.
*/
String getBaseTypeID();
-
+
/**
* Get index type ID.
* If this symbol is a
* array type - return array index type;
- * otherwise return null.
+ * otherwise return null.
* @return type ID.
*/
String getIndexTypeID();
-
+
/**
* Return value size of the symbol (or type).
* @return size in bytes.
*/
int getSize();
-
+
/**
- * If symbol is an array type - return number of elements.
+ * If symbol is an array type - return number of elements.
* @return number of elements.
*/
int getLength();
-
+
/**
* Return offset from 'this' for member of class, struct or union.
* @return offset in bytes.
*/
int getOffset();
-
+
/**
* Return address of the symbol.
* @return address or null.
*/
Number getAddress();
-
+
/**
- * If symbol is a constant object, return its value.
+ * If symbol is a constant object, return its value.
* @return symbol value as array of bytes.
*/
byte[] getValue();
@@ -162,8 +162,8 @@ public interface ISymbols extends IService {
/**
* Retrieve symbol context info for given symbol ID.
* @see Symbol
- *
- * @param id – symbol context ID.
+ *
+ * @param id – symbol context ID.
* @param done - call back interface called when operation is completed.
* @return - pending command handle.
*/
@@ -185,9 +185,9 @@ public interface ISymbols extends IService {
/**
* Retrieve children IDs for given parent ID.
* Meaning of the operation depends on parent kind:
- * 1. struct, union, or class type - get fields;
+ * 1. struct, union, or class type - get fields;
* 2. enumeration type - get enumerators;
- *
+ *
* @param parent_context_id – parent symbol context ID.
* @param done - call back interface called when operation is completed.
* @return - pending command handle.
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/ISysMonitor.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/ISysMonitor.java
index cd54d76ac..dba112819 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/ISysMonitor.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/ISysMonitor.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -17,7 +17,7 @@ import org.eclipse.tm.tcf.protocol.IToken;
/**
- * This is optional service that can be implemented by a peer.
+ * This is optional service that can be implemented by a peer.
* If implemented, the service can be used for monitoring system activity and utilization.
* It provides list of running processes, different process attributes like command line, environment, etc.,
* and some resource utilization data. The service can be used by a client to provide functionality
@@ -29,8 +29,8 @@ public interface ISysMonitor extends IService {
/**
* Retrieve context info for given context ID.
- *
- * @param id – context ID.
+ *
+ * @param id – context ID.
* @param done - callback interface called when operation is completed.
*/
IToken getContext(String id, DoneGetContext done);
@@ -49,10 +49,10 @@ public interface ISysMonitor extends IService {
/**
* Retrieve children of given context.
- *
+ *
* @param parent_context_id – parent context ID. Can be null –
* to retrieve top level of the hierarchy, or one of context IDs retrieved
- * by previous getContext or getChildren commands.
+ * by previous getContext or getChildren commands.
* @param done - callback interface called when operation is completed.
*/
IToken getChildren(String parent_context_id, DoneGetChildren done);
@@ -68,167 +68,167 @@ public interface ISysMonitor extends IService {
*/
void doneGetChildren(IToken token, Exception error, String[] context_ids);
}
-
+
/**
* Context property names.
*/
static final String
/** The TCF context ID */
PROP_ID = "ID",
-
+
/** The TCF parent context ID */
PROP_PARENTID = "ParentID",
-
+
/** Current working directory of the process */
PROP_CWD = "CWD",
-
+
/** The process's root directory (as set by chroot) */
PROP_ROOT = "Root",
-
+
/** User ID of the process owner */
PROP_UID = "UID",
-
+
/** Group ID of the process owner */
PROP_UGID = "UGID",
-
+
/** User name of the process owner */
PROP_USERNAME = "UserName",
-
+
/** Group name of the process owner */
PROP_GROUPNAME = "GroupName",
-
+
/** System process ID */
PROP_PID = "PID",
-
+
/** Executable file of the process */
PROP_FILE = "File",
-
+
/** One character from the string "RSDZTW" where R is running, S is
* sleeping in an interruptible wait, D is waiting in uninterruptible
* disk sleep, Z is zombie, T is traced or stopped (on a signal), and W
* is paging.*/
PROP_STATE = "State",
-
+
/** System ID of the parent process */
PROP_PPID = "PPID",
-
+
/** The process group ID of the process */
PROP_PGRP = "PGRP",
-
+
/** The session ID of the process */
PROP_SESSION = "Session",
-
+
/** The tty the process uses */
PROP_TTY = "TTY",
-
+
/** The process group ID of the process which currently owns the tty that
* the process is connected to. */
PROP_TGID = "TGID",
-
+
/** ID of a process that has attached this process for tracing or debugging */
PROP_TRACERPID = "TracerPID",
-
+
/** The kernel flags word of the process. Details depend on the kernel */
PROP_FLAGS = "Flags",
-
+
/** The number of minor faults the process has made which have not
* required loading a memory page from disk */
PROP_MINFLT = "MinFlt",
-
+
/** The number of minor faults that the process's waited-for children have made */
- PROP_CMINFLT = "CMinFlt",
-
+ PROP_CMINFLT = "CMinFlt",
+
/** The number of major faults the process has made which have required
* loading a memory page from disk */
PROP_MAJFLT = "MajFlt",
-
+
/** The number of major faults that the process's waited-for children
* have made */
PROP_CMAJFLT = "CMajFlt",
-
+
/** The number of milliseconds that this process has been scheduled in user mode */
PROP_UTIME = "UTime",
-
+
/** The number of milliseconds that this process has been scheduled in kernel mode */
PROP_STIME = "STime",
-
+
/** The number of jiffies that this process's waited-for children have
* been scheduled in user mode */
PROP_CUTIME = "CUTime",
-
+
/** The number of jiffies that this process's waited-for children have
* been scheduled in user mode */
PROP_CSTIME = "CSTime",
-
+
/** The standard nice value */
PROP_PRIORITY = "Priority",
-
+
/** The nice value */
PROP_NICE = "Nice",
-
+
/** The time in milliseconds before the next SIGALRM is sent to the process
* due to an interval timer */
PROP_ITREALVALUE = "ITRealValue",
-
+
/** The time in milliseconds the process started after system boot */
PROP_STARTTIME = "StartTime",
-
+
/** Virtual memory size in bytes */
PROP_VSIZE = "VSize",
-
+
/** Memory pages size in bytes */
PROP_PSIZE = "PSize",
-
+
/** Resident Set Size: number of pages the process has in real memory,
* minus used for administrative purposes. This is just the pages which
* count towards text, data, or stack space. This does not include
* pages which have not been demand-loaded in, or which are swapped out */
PROP_RSS = "RSS",
-
+
/** Current limit in bytes on the rss of the process */
PROP_RLIMIT = "RLimit",
-
+
/** The address above which program text can run */
PROP_CODESTART = "CodeStart",
-
+
/** The address below which program text can run */
PROP_CODEEND = "CodeEnd",
-
+
/** The address of the start of the stack */
PROP_STACKSTART = "StackStart",
-
+
/** The bitmap of pending signals */
PROP_SIGNALS = "Signals",
-
+
/** The bitmap of blocked signals */
PROP_SIGBLOCK = "SigBlock",
-
+
/** The bitmap of ignored signals */
PROP_SIGIGNORE = "SigIgnore",
-
+
/** The bitmap of caught signals */
PROP_SIGCATCH = "SigCatch",
-
+
/** This is the "channel" in which the process is waiting. It is the
* address of a system call, and can be looked up in a name list if you
* need a textual name */
PROP_WCHAN = "WChan",
-
+
/** Number of pages swapped */
PROP_NSWAP = "NSwap",
-
+
/** Cumulative NSwap for child processes */
PROP_CNSWAP = "CNSwap",
-
+
/** Signal to be sent to parent when this process exits */
PROP_EXITSIGNAL = "ExitSignal",
-
+
/** CPU number last executed on */
PROP_PROCESSOR = "Processor",
-
+
/** Real-time scheduling priority */
PROP_RTPRIORITY = "RTPriority",
-
+
/** Scheduling policy */
PROP_POLICY = "Policy";
@@ -240,113 +240,113 @@ public interface ISysMonitor extends IService {
* layout that is most descriptive for a given target. Context IDs are valid across
* all services. In other words, all services access same hierarchy of contexts,
* with same IDs, however, each service accesses its own subset of context's
- * attributes and functionality, which is relevant to that service.
+ * attributes and functionality, which is relevant to that service.
*/
interface SysMonitorContext {
- /**
+ /**
* Get context ID.
* Same as getProperties().get(“ID”)
*/
String getID();
- /**
+ /**
* Get parent context ID.
* Same as getProperties().get(“ParentID”)
*/
String getParentID();
- /**
+ /**
* Get process group ID.
* Same as getProperties().get(“PGRP”)
*/
long getPGRP();
- /**
+ /**
* Get process ID.
* Same as getProperties().get(“PID”)
*/
long getPID();
- /**
+ /**
* Get process parent ID.
* Same as getProperties().get(“PPID”)
*/
long getPPID();
- /**
+ /**
* Get process TTY group ID.
* Same as getProperties().get(“TGID”)
*/
long getTGID();
- /**
+ /**
* Get tracer process ID.
* Same as getProperties().get(“TracerPID”)
*/
long getTracerPID();
- /**
+ /**
* Get process owner user ID.
* Same as getProperties().get(“UID”)
*/
long getUID();
- /**
+ /**
* Get process owner user name.
* Same as getProperties().get(“UserName”)
*/
String getUserName();
- /**
+ /**
* Get process owner user group ID.
* Same as getProperties().get(“UGID”)
*/
long getUGID();
- /**
+ /**
* Get process owner user group name.
* Same as getProperties().get(“GroupName”)
*/
String getGroupName();
-
- /**
+
+ /**
* Get process state.
* Same as getProperties().get(“State”)
*/
String getState();
- /**
+ /**
* Get process virtual memory size in bytes.
* Same as getProperties().get(“VSize”)
*/
long getVSize();
- /**
+ /**
* Get process virtual memory page size in bytes.
* Same as getProperties().get(“PSize”)
*/
long getPSize();
- /**
+ /**
* Get number of memory pages in process resident set.
* Same as getProperties().get(“RSS”)
*/
long getRSS();
- /**
+ /**
* Get context executable file.
* Same as getProperties().get(“File”)
*/
String getFile();
- /**
+ /**
* Get context current file system root.
* Same as getProperties().get(“Root”)
*/
String getRoot();
- /**
+ /**
* Get context current working directory.
* Same as getProperties().get(“CWD”)
*/
@@ -358,21 +358,21 @@ public interface ISysMonitor extends IService {
*/
Map<String,Object> getProperties();
}
-
- /**
+
+ /**
* Get context command line.
*/
IToken getCommandLine(String id, DoneGetCommandLine done);
-
+
interface DoneGetCommandLine {
void doneGetCommandLine(IToken token, Exception error, String[] cmd_line);
}
- /**
+ /**
* Get context environment variables.
*/
IToken getEnvironment(String id, DoneGetEnvironment done);
-
+
interface DoneGetEnvironment {
void doneGetEnvironment(IToken token, Exception error, String[] environment);
}
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/util/TCFDataCache.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/util/TCFDataCache.java
index 204f45c04..186e68555 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/util/TCFDataCache.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/util/TCFDataCache.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* 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
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -30,57 +30,57 @@ public abstract class TCFDataCache<V> implements Runnable {
private boolean valid;
private boolean posted;
private V data;
-
+
protected final IChannel channel;
protected IToken command;
private final HashSet<Runnable> waiting_list = new HashSet<Runnable>();
-
+
public TCFDataCache(IChannel channel) {
assert channel != null;
this.channel = channel;
}
-
+
private void post() {
if (posted) return;
if (waiting_list.isEmpty()) return;
Protocol.invokeLater(this);
posted = true;
}
-
+
/**
* @return true if cache contains up-to-date data (or data retrieval error).
*/
public boolean isValid() {
return valid;
}
-
+
/**
* @return true if data retrieval command is in progress.
*/
public boolean isPending() {
return command != null;
}
-
+
/**
* @return error object if data retrieval ended with an error, or null if retrieval was successful.
- * Note: It is prohibited to call this method when cache is not valid.
+ * Note: It is prohibited to call this method when cache is not valid.
*/
public Throwable getError() {
assert valid;
return error;
}
-
+
/**
* @return cached data object.
- * Note: It is prohibited to call this method when cache is not valid.
+ * Note: It is prohibited to call this method when cache is not valid.
*/
public V getData() {
assert Protocol.isDispatchThread();
assert valid;
return data;
}
-
+
/**
* Notify waiting clients about cache state change and remove them from wait list.
* It is responsibility of clients to check if the state change was one they are waiting for.
@@ -95,7 +95,7 @@ public abstract class TCFDataCache<V> implements Runnable {
r.run();
}
}
-
+
/**
* Add a client call-back to cache wait list.
* Client call-backs are activated when cache state changes.
@@ -108,7 +108,7 @@ public abstract class TCFDataCache<V> implements Runnable {
assert !valid;
if (cb != null) waiting_list.add(cb);
}
-
+
/**
* Initiate data retrieval if the cache is not valid.
* @return true if the cache is already valid
@@ -130,7 +130,7 @@ public abstract class TCFDataCache<V> implements Runnable {
post();
return true;
}
-
+
/**
* End cache pending state.
* @param token - pending command handle.
@@ -163,7 +163,7 @@ public abstract class TCFDataCache<V> implements Runnable {
valid = true;
post();
}
-
+
/**
* Invalidate the cache. If retrieval is in progress - let it continue.
*/
@@ -174,7 +174,7 @@ public abstract class TCFDataCache<V> implements Runnable {
data = null;
post();
}
-
+
/**
* Force cache to invalid state, cancel pending data retrieval if any.
*/
@@ -189,7 +189,7 @@ public abstract class TCFDataCache<V> implements Runnable {
data = null;
post();
}
-
+
@Override
public String toString() {
StringBuffer bf = new StringBuffer();
@@ -202,7 +202,7 @@ public abstract class TCFDataCache<V> implements Runnable {
bf.append(']');
return bf.toString();
}
-
+
/**
* Sub-classes should override this method to implement actual data retrieval logic.
* @return true is all done, false if retrieval is in progress.
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/util/TCFFileInputStream.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/util/TCFFileInputStream.java
index a6ba47668..dc91e85dc 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/util/TCFFileInputStream.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/util/TCFFileInputStream.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -24,15 +24,15 @@ import org.eclipse.tm.tcf.services.IFileSystem.IFileHandle;
/**
* TCFFileInputStream is high performance InputStream implementation over TCF FileSystem service.
* The class uses read-ahead buffers to achieve maximum throughput.
- *
+ *
* @noextend This class is not intended to be subclassed by clients.
*/
public final class TCFFileInputStream extends InputStream {
-
+
private static final int MAX_READ_AHEAD = 8;
-
+
private static class Buffer {
-
+
final long offset;
IToken token;
@@ -42,13 +42,13 @@ public final class TCFFileInputStream extends InputStream {
Buffer(long offset) {
this.offset = offset;
}
-
+
@Override
public String toString() {
return "[" + offset + ":" + (buf == null ? "null" : Integer.toString(buf.length)) + "]";
}
}
-
+
private final IFileHandle handle;
private final IFileSystem fs;
private final int buf_size;
@@ -56,11 +56,11 @@ public final class TCFFileInputStream extends InputStream {
private long offset = 0;
private Buffer buf;
private boolean closed = false;
-
+
private boolean suspend_read_ahead;
private Runnable waiting_client;
private final LinkedList<Buffer> read_ahead_buffers = new LinkedList<Buffer>();
-
+
public TCFFileInputStream(IFileHandle handle) {
this(handle, 0x1000);
}
@@ -70,7 +70,7 @@ public final class TCFFileInputStream extends InputStream {
this.fs = handle.getService();
this.buf_size = buf_size;
}
-
+
private void startReadAhead(Buffer prv) {
if (suspend_read_ahead) return;
if (read_ahead_buffers.size() > 0) {
@@ -110,7 +110,7 @@ public final class TCFFileInputStream extends InputStream {
pos += buf_size;
}
}
-
+
private boolean stopReadAhead(Runnable done) {
suspend_read_ahead = true;
for (Iterator<Buffer> i = read_ahead_buffers.iterator(); i.hasNext();) {
@@ -206,7 +206,7 @@ public final class TCFFileInputStream extends InputStream {
}
return pos;
}
-
+
@Override
public boolean markSupported() {
return true;
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/util/TCFFileOutputStream.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/util/TCFFileOutputStream.java
index 33dadd7c7..324dac721 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/util/TCFFileOutputStream.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/util/TCFFileOutputStream.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -25,11 +25,11 @@ import org.eclipse.tm.tcf.services.IFileSystem.IFileHandle;
/**
* TCFFileOutputStream is high performance OutputStream implementation over TCF FileSystem service.
* The class uses write-back buffers to achieve maximum throughput.
- *
+ *
* @noextend This class is not intended to be subclassed by clients.
*/
public final class TCFFileOutputStream extends OutputStream {
-
+
private static final int MAX_WRITE_BACK = 8;
private final IFileHandle handle;
@@ -46,7 +46,7 @@ public final class TCFFileOutputStream extends OutputStream {
public TCFFileOutputStream(IFileHandle handle) {
this(handle, 0x1000);
}
-
+
public TCFFileOutputStream(IFileHandle handle, int buf_size) {
this.handle = handle;
this.fs = handle.getService();
@@ -89,7 +89,7 @@ public final class TCFFileOutputStream extends OutputStream {
flush(buf, 0, buf_pos);
buf_pos = 0;
}
-
+
private void flush(final byte[] buf, final int off, final int len) throws IOException {
synchronized (dirty) {
if (flush_error != null) throw flush_error;
@@ -126,7 +126,7 @@ public final class TCFFileOutputStream extends OutputStream {
done(this);
}
}.getIO();
- offset += len;
+ offset += len;
}
@Override
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/util/TCFTask.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/util/TCFTask.java
index db0386f39..805f9093c 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/util/TCFTask.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/util/TCFTask.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -26,25 +26,25 @@ import org.eclipse.tm.tcf.protocol.Protocol;
* communication over TCF framework. Methods are provided to check if the communication is
* complete, to wait for its completion, and to retrieve the result of
* the communication.
- *
+ *
* TCFTask is useful when communication is requested by a thread other then TCF dispatch thread.
* If client has a global state, for example, cached remote data, multithreading should be avoided,
* because it is extremely difficult to ensure absence of racing conditions or deadlocks in such environment.
- * Such clients should consider message driven design, see TCFDataCache and its usage as an example.
- *
+ * Such clients should consider message driven design, see TCFDataCache and its usage as an example.
+ *
* If a client is extending TCFTask it should implement run() method to perform actual communications.
* The run() method will be execute by TCF dispatch thread, and client code should then call either done() or
- * error() to indicate that task computations are complete.
+ * error() to indicate that task computations are complete.
*/
public abstract class TCFTask<V> implements Runnable, Future<V> {
-
+
private V result;
private boolean done;
private Throwable error;
private boolean canceled;
private IChannel channel;
private IChannel.IChannelListener channel_listener;
-
+
/**
* Construct a TCF task object and schedule it for execution.
*/
@@ -60,7 +60,7 @@ public abstract class TCFTask<V> implements Runnable, Future<V> {
}
});
}
-
+
/**
* Construct a TCF task object and schedule it for execution.
* The task will be canceled if it is not completed after given timeout.
@@ -83,7 +83,7 @@ public abstract class TCFTask<V> implements Runnable, Future<V> {
}
});
}
-
+
/**
* Construct a TCF task object and schedule it for execution.
* The task will be canceled if the given channel is closed or
@@ -117,11 +117,11 @@ public abstract class TCFTask<V> implements Runnable, Future<V> {
}
});
}
-
+
/**
* Set a result of this task and notify all threads waiting for the task to complete.
* The method is supposed to be called in response to executing of run() method of this task.
- *
+ *
* @param result - the computed result
*/
public synchronized void done(V result) {
@@ -135,11 +135,11 @@ public abstract class TCFTask<V> implements Runnable, Future<V> {
if (channel != null) channel.removeChannelListener(channel_listener);
notifyAll();
}
-
+
/**
* Set a error and notify all threads waiting for the task to complete.
* The method is supposed to be called in response to executing of run() method of this task.
- *
+ *
* @param error - computation error.
*/
public synchronized void error(Throwable error) {
@@ -202,7 +202,7 @@ public abstract class TCFTask<V> implements Runnable, Future<V> {
}
return result;
}
-
+
/**
* Waits if necessary for the computation to complete, and then
* retrieves its result.
@@ -293,18 +293,18 @@ public abstract class TCFTask<V> implements Runnable, Future<V> {
}
/**
- * Returns <tt>true</tt> if this task completed.
+ * Returns <tt>true</tt> if this task completed.
*
* Completion may be due to normal termination, an exception, or
* cancellation -- in all of these cases, this method will return
* <tt>true</tt>.
- *
+ *
* @return <tt>true</tt> if this task completed.
*/
public synchronized boolean isDone() {
return error != null || done;
}
-
+
/**
* Return task execution error if any.
* @return Throwable object or null
@@ -312,7 +312,7 @@ public abstract class TCFTask<V> implements Runnable, Future<V> {
protected Throwable getError() {
return error;
}
-
+
/**
* Return task execution result if any.
* @return result object
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/Activator.java b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/Activator.java
index 275f9c113..c3e18cc16 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/Activator.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/Activator.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -125,7 +125,7 @@ public class Activator extends AbstractUIPlugin {
plugin.getLog().log(new Status(IStatus.ERROR,
plugin.getBundle().getSymbolicName(), IStatus.OK, msg, err));
}
- }
+ }
/**
* Send error message into Eclipse log.
@@ -139,5 +139,5 @@ public class Activator extends AbstractUIPlugin {
plugin.getLog().log(new Status(IStatus.ERROR,
plugin.getBundle().getSymbolicName(), IStatus.OK, "Unhandled exception in TCF UI", err));
}
- }
+ }
}
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/ImageCache.java b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/ImageCache.java
index a69de7533..2992ea554 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/ImageCache.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/ImageCache.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* 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
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -22,33 +22,33 @@ import org.eclipse.swt.graphics.Image;
import org.osgi.framework.Bundle;
public class ImageCache {
-
+
public static final String
IMG_TCF = "icons/tcf.gif",
IMG_TARGET_TAB = "icons/target_tab.gif",
IMG_TARGET_WIZARD = "icons/full/wizban/debug_wiz.png",
IMG_ARGUMENTS_TAB = "icons/arguments_tab.gif",
IMG_ATTRIBUTE = "icons/attribute.gif",
-
+
IMG_THREAD_TERMINATED = "icons/full/obj16/threadt_obj.gif",
IMG_THREAD_SUSPENDED = "icons/full/obj16/threads_obj.gif",
IMG_THREAD_RUNNNIG = "icons/full/obj16/thread_obj.gif",
-
+
IMG_PROCESS_TERMINATED = "icons/full/obj16/debugtt_obj.gif",
IMG_PROCESS_SUSPENDED = "icons/full/obj16/debugts_obj.gif",
IMG_PROCESS_RUNNING = "icons/full/obj16/debugt_obj.gif",
-
+
IMG_REGISTER = "icons/full/obj16/genericregister_obj.gif",
-
+
IMG_VARIABLE = "icons/full/obj16/genericvariable_obj.gif",
-
+
IMG_SIGNALS = "icons/signals.gif",
-
+
IMG_ARRAY_PARTITION = "icons/full/obj16/arraypartition_obj.gif",
-
+
IMG_STACK_FRAME_SUSPENDED = "icons/full/obj16/stckframe_obj.gif",
IMG_STACK_FRAME_RUNNING = "icons/full/obj16/stckframe_running_obj.gif",
-
+
IMG_BREAKPOINT_ENABLED = "icons/full/obj16/brkp_obj.gif",
IMG_BREAKPOINT_DISABLED = "icons/full/obj16/brkpd_obj.gif";
@@ -78,7 +78,7 @@ public class ImageCache {
}
return descriptor;
}
-
+
public static synchronized Image getImage(ImageDescriptor desc) {
Image image = image_cache.get(desc);
if (image == null) {
@@ -87,7 +87,7 @@ public class ImageCache {
}
return image;
}
-
+
public static synchronized Image getImage(String name) {
return getImage(getImageDescriptor(name));
}
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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/adapters/TCFLaunchAdapterFactory.java
index e9d9c122b..b74c506ea 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/adapters/TCFLaunchAdapterFactory.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/adapters/TCFLaunchAdapterFactory.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/adapters/TCFLaunchLabelProvider.java
index 77d164525..e3d0c2f41 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/adapters/TCFLaunchLabelProvider.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/adapters/TCFLaunchLabelProvider.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* 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
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/adapters/TCFNodeAdapterFactory.java
index 0ebad922d..fab257da2 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/adapters/TCFNodeAdapterFactory.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/adapters/TCFNodeAdapterFactory.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -18,14 +18,14 @@ import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNode;
public class TCFNodeAdapterFactory implements IAdapterFactory {
-
+
private static final Class<?>[] adapter_list = {
IToggleBreakpointsTarget.class,
IToggleBreakpointsTargetExtension.class,
};
-
+
private final BreakpointCommand breakpoint_command = new BreakpointCommand();
-
+
@SuppressWarnings("unchecked")
public Object getAdapter(Object obj, Class cls) {
if (obj instanceof TCFNode) {
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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/AbstractActionDelegate.java
index e76415378..8df99a35e 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/AbstractActionDelegate.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/AbstractActionDelegate.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2009 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -59,7 +59,7 @@ implements IViewActionDelegate, IActionDelegate2, IWorkbenchWindowActionDelegate
if (part instanceof IViewPart) view = (IViewPart)part;
window = part.getSite().getWorkbenchWindow();
}
-
+
public void run(IAction action) {
IAction action0 = this.action;
try {
@@ -74,7 +74,7 @@ implements IViewActionDelegate, IActionDelegate2, IWorkbenchWindowActionDelegate
public void runWithEvent(IAction action, Event event) {
run(action);
}
-
+
public void selectionChanged(IAction action, ISelection selection) {
this.selection = selection;
IAction action0 = this.action;
@@ -86,25 +86,25 @@ implements IViewActionDelegate, IActionDelegate2, IWorkbenchWindowActionDelegate
this.action = action0;
}
}
-
+
public IAction getAction() {
return action;
}
-
+
public IViewPart getView() {
return view;
}
-
+
public IWorkbenchWindow getWindow() {
if (view != null) return view.getSite().getWorkbenchWindow();
if (window != null) return window;
return null;
}
-
+
public ISelection getSelection() {
return selection;
}
-
+
public TCFNode getSelectedNode() {
if (selection instanceof IStructuredSelection) {
final Object o = ((IStructuredSelection)selection).getFirstElement();
@@ -126,8 +126,8 @@ implements IViewActionDelegate, IActionDelegate2, IWorkbenchWindowActionDelegate
}
return null;
}
-
+
protected abstract void selectionChanged();
-
+
protected abstract void run();
}
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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/BreakpointCommand.java
index ff952707a..ba9275fbf 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/BreakpointCommand.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/BreakpointCommand.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -27,7 +27,7 @@ import org.eclipse.ui.IWorkbenchPart;
public class BreakpointCommand implements IToggleBreakpointsTargetExtension {
-
+
public boolean canToggleBreakpoints(IWorkbenchPart part, ISelection selection) {
if (selection.isEmpty()) return false;
Object obj = ((IStructuredSelection)selection).getFirstElement();
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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/DisconnectCommand.java
index 854b173b0..527fe1cc6 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/DisconnectCommand.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/DisconnectCommand.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/ResumeCommand.java
index 6118ae199..236dfc30b 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/ResumeCommand.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/ResumeCommand.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/SignalsCommand.java
index 8f2e6bde2..57e9c4ad4 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/SignalsCommand.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/SignalsCommand.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2009 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -16,7 +16,7 @@ import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNodeStackFrame;
public class SignalsCommand extends AbstractActionDelegate {
-
+
protected void selectionChanged() {
boolean e = false;
TCFNode n = getSelectedNode();
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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/SignalsDialog.java
index e4ac836e9..66726f50a 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/SignalsDialog.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/SignalsDialog.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2009 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -48,37 +48,37 @@ import org.eclipse.tm.tcf.util.TCFTask;
class SignalsDialog extends Dialog {
- private static final int
+ private static final int
SIZING_TABLE_WIDTH = 800,
SIZING_TABLE_HEIGHT = 300;
private static final String[] column_names = { "Code", "Name", "Description", "Don't stop", "Don't pass", "Pending" };
-
+
private Table signal_table;
private TableViewer table_viewer;
private Map<Number,Signal> org_signals;
-
+
private final TCFModel model;
private final IChannel channel;
private final TCFDataCache<SignalList> signal_list;
private final TCFDataCache<SignalState> signal_state;
-
+
private static class SignalList {
String context_id;
Collection<Map<String,Object>> list;
}
-
+
private static class SignalState {
String context_id;
Signal[] list;
}
-
+
private class Signal implements Cloneable {
Map<String,Object> attrs;
boolean dont_stop;
boolean dont_pass;
boolean pending;
-
+
public Signal copy() {
try {
return (Signal)clone();
@@ -87,7 +87,7 @@ class SignalsDialog extends Dialog {
throw new Error(e);
}
}
-
+
@Override
public String toString() {
StringBuffer bf = new StringBuffer();
@@ -100,7 +100,7 @@ class SignalsDialog extends Dialog {
return bf.toString();
}
}
-
+
private final IStructuredContentProvider content_provider = new IStructuredContentProvider() {
public Object[] getElements(Object input) {
@@ -154,13 +154,13 @@ class SignalsDialog extends Dialog {
if (q.length() < 8) q = "00000000".substring(q.length()) + q;
return "0x" + q;
case 1:
- return (String)s.attrs.get(IProcesses.SIG_NAME);
+ return (String)s.attrs.get(IProcesses.SIG_NAME);
case 2:
return (String)s.attrs.get(IProcesses.SIG_DESCRIPTION);
}
return "";
}
-
+
public String getText(Object element) {
return element.toString();
}
@@ -246,7 +246,7 @@ class SignalsDialog extends Dialog {
}
}.getE();
}
-
+
@Override
public boolean close() {
new TCFTask<Boolean>() {
@@ -264,7 +264,7 @@ class SignalsDialog extends Dialog {
super.configureShell(shell);
shell.setText("Signals");
shell.setImage(ImageCache.getImage(ImageCache.IMG_SIGNALS));
- }
+ }
@Override
protected void createButtonsForButtonBar(Composite parent) {
@@ -274,26 +274,26 @@ class SignalsDialog extends Dialog {
@Override
protected Control createDialogArea(Composite parent) {
Composite composite = (Composite)super.createDialogArea(parent);
-
+
createSignalTable(composite);
composite.setSize(composite.computeSize(SWT.DEFAULT, SWT.DEFAULT));
return composite;
}
-
+
private void createSignalTable(Composite parent) {
Font font = parent.getFont();
Label props_label = new Label(parent, SWT.WRAP);
props_label.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
props_label.setFont(font);
props_label.setText("&Signals:");
-
+
Composite composite = new Composite(parent, SWT.NONE);
GridLayout layout = new GridLayout(2, false);
composite.setFont(font);
composite.setLayout(layout);
composite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true, 2, 1));
-
+
signal_table = new Table(composite, SWT.SINGLE | SWT.BORDER |
SWT.H_SCROLL | SWT.V_SCROLL);
signal_table.setFont(font);
@@ -301,7 +301,7 @@ class SignalsDialog extends Dialog {
data.widthHint = SIZING_TABLE_WIDTH;
data.heightHint = SIZING_TABLE_HEIGHT;
signal_table.setLayoutData(data);
-
+
int w = SIZING_TABLE_WIDTH / (column_names.length + 5);
for (int i = 0; i < column_names.length; i++) {
final TableColumn column = new TableColumn(signal_table, SWT.LEAD, i);
@@ -363,16 +363,16 @@ class SignalsDialog extends Dialog {
public void mouseUp(MouseEvent e) {
}
});
-
- table_viewer = new TableViewer(signal_table);
+
+ table_viewer = new TableViewer(signal_table);
table_viewer.setUseHashlookup(true);
table_viewer.setColumnProperties(column_names);
-
+
table_viewer.setContentProvider(content_provider);
-
+
table_viewer.setLabelProvider(new SignalLabelProvider());
table_viewer.setInput(this);
-
+
org_signals = new HashMap<Number,Signal>();
for (Signal s : (Signal[])content_provider.getElements(null)) {
org_signals.put((Number)s.attrs.get(IProcesses.SIG_INDEX), s.copy());
@@ -392,7 +392,7 @@ class SignalsDialog extends Dialog {
else done(signal_state.getData());
}
}.getE();
-
+
if (state != null && state.list != null) {
boolean set_mask = false;
int dont_stop_set = 0;
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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/StepCommand.java
index 873c1a8e3..89a212bbd 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/StepCommand.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/StepCommand.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -33,12 +33,12 @@ abstract class StepCommand implements IDebugCommandHandler {
public StepCommand(TCFModel model) {
this.model = model;
}
-
+
protected abstract boolean canExecute(IRunControl.RunControlContext ctx);
-
+
protected abstract void execute(IDebugCommandRequest monitor,
IRunControl.RunControlContext ctx, boolean src_step, Runnable done);
-
+
public final void canExecute(final IEnabledStateRequest monitor) {
new TCFRunnable(model.getDisplay(), monitor) {
public void run() {
@@ -99,7 +99,7 @@ abstract class StepCommand implements IDebugCommandHandler {
};
return true;
}
-
+
private void execute(final IDebugCommandRequest monitor, final TCFRunnable request,
final Set<IRunControl.RunControlContext> set) {
int i = 0;
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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/StepIntoCommand.java
index ef1dd6296..36284c264 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/StepIntoCommand.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/StepIntoCommand.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -29,12 +29,12 @@ import org.eclipse.tm.tcf.util.TCFDataCache;
public class StepIntoCommand extends StepCommand implements IStepIntoHandler {
private static class StepStateMachine extends TCFActionStepInto {
-
+
private final IDebugCommandRequest monitor;
private final Runnable done;
private final TCFNodeExecContext node;
private TCFNodeStackFrame frame;
-
+
StepStateMachine(TCFModel model, IDebugCommandRequest monitor,
IRunControl.RunControlContext ctx, boolean src_step, Runnable done) {
super(model.getLaunch(), ctx, src_step);
@@ -42,7 +42,7 @@ public class StepIntoCommand extends StepCommand implements IStepIntoHandler {
this.done = done;
node = (TCFNodeExecContext)model.getNode(context_id);
}
-
+
@Override
protected TCFDataCache<TCFContextState> getContextState() {
if (node == null) return null;
@@ -74,7 +74,7 @@ public class StepIntoCommand extends StepCommand implements IStepIntoHandler {
protected TCFDataCache<?> getStackTrace() {
return node.getStackTrace();
}
-
+
@Override
protected void exit(Throwable error) {
if (exited) return;
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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/StepOverCommand.java
index 8ca946040..68fd7e475 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/StepOverCommand.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/StepOverCommand.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -29,14 +29,14 @@ import org.eclipse.tm.tcf.util.TCFDataCache;
// TODO: drop to frame command
public class StepOverCommand extends StepCommand implements IStepOverHandler {
-
+
private static class StepStateMachine extends TCFActionStepOver {
-
+
private final IDebugCommandRequest monitor;
private final Runnable done;
private final TCFNodeExecContext node;
private TCFNodeStackFrame frame;
-
+
StepStateMachine(TCFModel model, IDebugCommandRequest monitor,
IRunControl.RunControlContext ctx,
boolean src_step, Runnable done) {
@@ -77,7 +77,7 @@ public class StepOverCommand extends StepCommand implements IStepOverHandler {
protected TCFDataCache<?> getStackTrace() {
return node.getStackTrace();
}
-
+
@Override
protected void exit(Throwable error) {
if (exited) return;
@@ -93,7 +93,7 @@ public class StepOverCommand extends StepCommand implements IStepOverHandler {
public StepOverCommand(TCFModel model) {
super(model);
}
-
+
@Override
protected boolean canExecute(IRunControl.RunControlContext ctx) {
if (ctx == null) return false;
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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/StepReturnCommand.java
index 557114167..b4558639c 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/StepReturnCommand.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/StepReturnCommand.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -29,7 +29,7 @@ import org.eclipse.tm.tcf.util.TCFDataCache;
public class StepReturnCommand extends StepCommand implements IStepReturnHandler {
private static class StepStateMachine extends TCFActionStepOut {
-
+
private final IDebugCommandRequest monitor;
private final Runnable done;
private final TCFNodeExecContext node;
@@ -42,7 +42,7 @@ public class StepReturnCommand extends StepCommand implements IStepReturnHandler
this.done = done;
node = (TCFNodeExecContext)model.getNode(context_id);
}
-
+
@Override
protected TCFDataCache<TCFContextState> getContextState() {
if (node == null) return null;
@@ -67,7 +67,7 @@ public class StepReturnCommand extends StepCommand implements IStepReturnHandler
protected TCFDataCache<?> getStackTrace() {
return node.getStackTrace();
}
-
+
@Override
protected void exit(Throwable error) {
if (exited) return;
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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/SuspendCommand.java
index 55fcb80a7..441a6e59b 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/SuspendCommand.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/SuspendCommand.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/TerminateCommand.java
index a9aa268e0..0783392db 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/TerminateCommand.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/TerminateCommand.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/ITCFLaunchContext.java
index e00ef465f..4b0a929e2 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/ITCFLaunchContext.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/ITCFLaunchContext.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* 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
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -20,15 +20,15 @@ import org.eclipse.swt.widgets.Shell;
/**
* TCF clients can implement ITCFLaunchContext to provide information about
* workspace projects to TCF Launch Configuration.
- *
+ *
* The information includes default values for launch configuration attributes,
* list of executable binary files, etc.
- *
+ *
* Since each project type can have its own methods to retrieve relevant information,
* there should be implementation of this interface for each project type that support TCF.
- *
+ *
* Implementation should be able to examine current IDE state (like active editor input source,
- * project explorer selection, etc.) and figure out an "active project".
+ * project explorer selection, etc.) and figure out an "active project".
*/
public interface ITCFLaunchContext {
@@ -37,42 +37,42 @@ public interface ITCFLaunchContext {
* @return true if active.
*/
boolean isActive();
-
+
/**
- * Check if this context recognizes type of a selection.
+ * Check if this context recognizes type of a selection.
* @param selection
* @return true if the selection is supported by this context.
*/
boolean isSupportedSelection(Object selection);
-
+
/**
* Get selection project.
* @param selection
* @return selection project or null if selection is not part of a project
*/
IProject getProject(Object selection);
-
+
/**
* Get selection file path.
* @param selection
* @return selection file path or null if selection is not a file
*/
IPath getPath(Object selection);
-
+
/**
- * Set launch configuration attributes to default values best suited for current context.
+ * Set launch configuration attributes to default values best suited for current context.
* @param dlg - currently open launch configuration dialog
* @param config - currently open launch configuration
*/
void setDefaults(ILaunchConfigurationDialog dlg, ILaunchConfigurationWorkingCopy config);
-
+
/**
* Get project build configuration ID.
* @param project
* @return build configuration ID.
*/
String getBuildConfigID(IProject project);
-
+
/**
* Show a dialog box that allows user to select executable binary file from a list
* of available file in this context.
@@ -81,7 +81,7 @@ public interface ITCFLaunchContext {
* @return binary file path
*/
String chooseBinary(Shell shell, IProject project);
-
+
/**
* Check if a path represents an executable binary file.
* @param project
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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/PeerPropsDialog.java
index 91f5e04a8..9da4bbcf8 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/PeerPropsDialog.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/PeerPropsDialog.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2009 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -22,13 +22,13 @@ import org.eclipse.swt.widgets.Shell;
import org.eclipse.tm.internal.tcf.debug.ui.launch.setup.PeerPropsControl;
class PeerPropsDialog extends Dialog {
-
+
private final Map<String,String> attrs;
private final boolean enable_editing;
private final Image image;
-
+
private PeerPropsControl props;
-
+
PeerPropsDialog(Shell parent, Image image, Map<String,String> attrs, boolean enable_editing) {
super(parent);
this.image = image;
@@ -41,7 +41,7 @@ class PeerPropsDialog extends Dialog {
super.configureShell(shell);
shell.setText("TCF Peer Properties");
shell.setImage(image);
- }
+ }
@Override
protected void createButtonsForButtonBar(Composite parent) {
@@ -60,11 +60,11 @@ class PeerPropsDialog extends Dialog {
composite.setSize(composite.computeSize(SWT.DEFAULT, SWT.DEFAULT));
return composite;
}
-
+
private void updateButtons() {
getButton(IDialogConstants.OK_ID).setEnabled(props.isComplete());
}
-
+
@Override
protected void okPressed() {
props.okPressed();
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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFArgumentsTab.java
index fcfad26dd..a680621dd 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFArgumentsTab.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFArgumentsTab.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -65,7 +65,7 @@ public class TCFArgumentsTab extends AbstractLaunchConfigurationTab {
gd = new GridData();
gd.horizontalSpan = 2;
label.setLayoutData(gd);
-
+
text_arguments = new Text(comp, SWT.MULTI | SWT.WRAP | SWT.BORDER | SWT.V_SCROLL);
gd = new GridData(GridData.FILL_BOTH);
gd.heightHint = 40;
@@ -85,7 +85,7 @@ public class TCFArgumentsTab extends AbstractLaunchConfigurationTab {
}
});
}
-
+
/**
* A variable entry button has been pressed for the given text
* field. Prompt the user for a variable and enter the result
@@ -139,7 +139,7 @@ public class TCFArgumentsTab extends AbstractLaunchConfigurationTab {
public String getName() {
return "Arguments";
}
-
+
@Override
public Image getImage() {
return ImageCache.getImageDescriptor(ImageCache.IMG_ARGUMENTS_TAB).createImage();
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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFLaunchContext.java
index 8fbffd059..ff4a64117 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFLaunchContext.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFLaunchContext.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2008, 2009 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -20,15 +20,15 @@ import org.osgi.framework.Bundle;
/**
* TCF clients can implement ITCFLaunchContext to provide information about
* workspace projects to TCF Launch Configuration.
- *
+ *
* The information includes default values for launch configuration attributes,
* list of executable binary files, etc.
- *
+ *
* Since each project type can have its own methods to retrieve relevant information,
* there should be implementation of this interface for each project type that support TCF.
- *
+ *
* Implementation should be able to examine current IDE state (like active editor input source,
- * project explorer selection, etc.) and figure out an "active project".
+ * project explorer selection, etc.) and figure out an "active project".
*/
public class TCFLaunchContext {
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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFLaunchShortcut.java
index 3783db2b5..15934ee21 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFLaunchShortcut.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFLaunchShortcut.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2009 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -41,7 +41,7 @@ import org.eclipse.ui.dialogs.ElementListSelectionDialog;
* the workbench selection or active editor.
*/
public class TCFLaunchShortcut implements ILaunchShortcut {
-
+
private static final String LAUNCH_CONFIGURATION_TYPE_ID = "org.eclipse.tm.tcf.debug.LaunchConfigurationType"; //$NON-NLS-1$
public void launch(ISelection selection, String mode) {
@@ -96,13 +96,13 @@ public class TCFLaunchShortcut implements ILaunchShortcut {
IDebugModelPresentation labelProvider = DebugUITools.newDebugModelPresentation();
ElementListSelectionDialog dialog= new ElementListSelectionDialog(getShell(), labelProvider);
dialog.setElements(list.toArray());
- dialog.setTitle("TCF Launch Configuration");
+ dialog.setTitle("TCF Launch Configuration");
dialog.setMessage("&Select existing configuration:");
dialog.setMultipleSelection(false);
int result = dialog.open();
labelProvider.dispose();
if (result == Window.OK) return (ILaunchConfiguration) dialog.getFirstResult();
- return null;
+ return null;
}
private ILaunchConfiguration createConfiguration(IProject project, IPath path) {
@@ -118,11 +118,11 @@ public class TCFLaunchShortcut implements ILaunchShortcut {
config = wc.doSave();
}
catch (CoreException x) {
- MessageDialog.openError(getShell(), "Cannot create launch configuration", x.getStatus().getMessage());
- }
+ MessageDialog.openError(getShell(), "Cannot create launch configuration", x.getStatus().getMessage());
+ }
return config;
}
-
+
private Shell getShell() {
Shell shell = null;
IWorkbenchWindow window = Activator.getDefault().getWorkbench().getActiveWorkbenchWindow();
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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFMainTab.java
index 1aaa1bbc9..24a14cdfc 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFMainTab.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFMainTab.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2008, 2009 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -102,14 +102,14 @@ public class TCFMainTab extends AbstractLaunchConfigurationTab {
}
});
}
-
+
private void createApplicationGroup(Composite parent) {
Group group = new Group(parent, SWT.NONE);
GridLayout layout = new GridLayout();
group.setLayout(layout);
group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
group.setText("Application");
-
+
createLocalExeFileGroup(group);
createRemoteExeFileGroup(group);
}
@@ -123,13 +123,13 @@ public class TCFMainTab extends AbstractLaunchConfigurationTab {
comp.setLayout(layout);
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
comp.setLayoutData(gd);
-
+
Label program_label = new Label(comp, SWT.NONE);
program_label.setText("Local File Path:");
gd = new GridData();
gd.horizontalSpan = 3;
program_label.setLayoutData(gd);
-
+
local_program_text = new Text(comp, SWT.SINGLE | SWT.BORDER);
local_program_text.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
local_program_text.addModifyListener(new ModifyListener() {
@@ -165,13 +165,13 @@ public class TCFMainTab extends AbstractLaunchConfigurationTab {
comp.setLayout(layout);
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
comp.setLayoutData(gd);
-
+
Label program_label = new Label(comp, SWT.NONE);
program_label.setText("Remote File Path:");
gd = new GridData();
gd.horizontalSpan = 3;
program_label.setLayoutData(gd);
-
+
remote_program_text = new Text(comp, SWT.SINGLE | SWT.BORDER);
remote_program_text.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
remote_program_text.addModifyListener(new ModifyListener() {
@@ -201,13 +201,13 @@ public class TCFMainTab extends AbstractLaunchConfigurationTab {
}
});
}
-
+
@Override
protected void updateLaunchConfigurationDialog() {
super.updateLaunchConfigurationDialog();
working_dir_text.setEnabled(!default_dir_button.getSelection());
}
-
+
private void createTerminalOption(Composite parent, int colSpan) {
Composite terminal_comp = new Composite(parent, SWT.NONE);
GridLayout terminal_layout = new GridLayout();
@@ -318,7 +318,7 @@ public class TCFMainTab extends AbstractLaunchConfigurationTab {
try {
IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
ILabelProvider label_provider = new LabelProvider() {
-
+
@Override
public String getText(Object element) {
if (element == null) return "";
@@ -349,7 +349,7 @@ public class TCFMainTab extends AbstractLaunchConfigurationTab {
setErrorMessage("Cannot read launch configuration: " + init_error);
return false;
}
-
+
String project_name = project_text.getText().trim();
if (project_name.length() != 0) {
IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(project_name);
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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFPropertyTester.java
index a2778b0a5..2dcd388c2 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFPropertyTester.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFPropertyTester.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2008, 2009 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -17,7 +17,7 @@ import org.eclipse.core.runtime.IPath;
import org.eclipse.tm.internal.tcf.debug.ui.Activator;
public class TCFPropertyTester extends PropertyTester {
-
+
public boolean test(Object receiver, String property, Object[] args, Object expected_value) {
Object value = null;
try {
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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFTabGroup.java
index c8676502b..f10fa1ede 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFTabGroup.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFTabGroup.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFTargetTab.java
index 6fbd054ef..121b6fb1f 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFTargetTab.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFTargetTab.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2009 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -65,7 +65,7 @@ import org.eclipse.tm.tcf.services.ILocator;
* configuration.
*/
public class TCFTargetTab extends AbstractLaunchConfigurationTab {
-
+
private Button run_local_agent_button;
private Button use_local_agent_button;
private Text peer_id_text;
@@ -87,11 +87,11 @@ public class TCFTargetTab extends AbstractLaunchConfigurationTab {
ILocator locator;
LocatorListener listener;
}
-
+
private class LocatorListener implements ILocator.LocatorListener {
-
+
private final PeerInfo parent;
-
+
LocatorListener(PeerInfo parent) {
this.parent = parent;
}
@@ -185,7 +185,7 @@ public class TCFTargetTab extends AbstractLaunchConfigurationTab {
});
}
}
-
+
public void createControl(Composite parent) {
display = parent.getDisplay();
assert display != null;
@@ -236,7 +236,7 @@ public class TCFTargetTab extends AbstractLaunchConfigurationTab {
private void createTargetGroup(Composite parent) {
Font font = parent.getFont();
-
+
Group group = new Group(parent, SWT.NONE);
GridLayout top_layout = new GridLayout();
top_layout.verticalSpacing = 0;
@@ -245,14 +245,14 @@ public class TCFTargetTab extends AbstractLaunchConfigurationTab {
group.setLayoutData(new GridData(GridData.FILL_BOTH));
group.setFont(font);
group.setText("Target");
-
+
createVerticalSpacer(group, top_layout.numColumns);
-
+
Label host_label = new Label(group, SWT.NONE);
host_label.setText("Target ID:");
host_label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING));
host_label.setFont(font);
-
+
peer_id_text = new Text(group, SWT.SINGLE | SWT.BORDER);
peer_id_text.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
peer_id_text.setFont(font);
@@ -264,11 +264,11 @@ public class TCFTargetTab extends AbstractLaunchConfigurationTab {
peer_label.setText("&Available targets:");
peer_label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING));
peer_label.setFont(font);
-
+
loadChildren(peer_info);
createPeerListArea(group);
}
-
+
private void createPeerListArea(Composite parent) {
Font font = parent.getFont();
Composite composite = new Composite(parent, SWT.NONE);
@@ -276,13 +276,13 @@ public class TCFTargetTab extends AbstractLaunchConfigurationTab {
composite.setFont(font);
composite.setLayout(layout);
composite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true, 2, 1));
-
+
peer_tree = new Tree(composite, SWT.VIRTUAL | SWT.BORDER | SWT.SINGLE);
GridData gd = new GridData(GridData.FILL_BOTH);
gd.minimumHeight = 150;
gd.minimumWidth = 470;
peer_tree.setLayoutData(gd);
-
+
for (int i = 0; i < 5; i++) {
TreeColumn column = new TreeColumn(peer_tree, SWT.LEAD, i);
column.setMoveable(true);
@@ -309,7 +309,7 @@ public class TCFTargetTab extends AbstractLaunchConfigurationTab {
break;
}
}
-
+
peer_tree.setHeaderVisible(true);
peer_tree.setFont(font);
peer_tree.addListener(SWT.SetData, new Listener() {
@@ -382,10 +382,10 @@ public class TCFTargetTab extends AbstractLaunchConfigurationTab {
public void treeExpanded(TreeEvent e) {
}
});
-
+
createPeerButtons(composite);
}
-
+
private void createPeerButtons(Composite parent) {
Font font = parent.getFont();
Composite composite = new Composite(parent, SWT.NONE);
@@ -395,7 +395,7 @@ public class TCFTargetTab extends AbstractLaunchConfigurationTab {
composite.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL));
Menu menu = new Menu(peer_tree);
SelectionAdapter sel_adapter = null;
-
+
final Button button_new = new Button(composite, SWT.PUSH);
button_new.setText("N&ew...");
button_new.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
@@ -463,7 +463,7 @@ public class TCFTargetTab extends AbstractLaunchConfigurationTab {
final MenuItem item_remove = new MenuItem(menu, SWT.PUSH);
item_remove.setText("&Remove");
item_remove.addSelectionListener(sel_adapter);
-
+
createVerticalSpacer(composite, 20);
new MenuItem(menu, SWT.SEPARATOR);
@@ -492,9 +492,9 @@ public class TCFTargetTab extends AbstractLaunchConfigurationTab {
final MenuItem item_loop = new MenuItem(menu, SWT.PUSH);
item_loop.setText("Tests &Loop");
item_loop.addSelectionListener(sel_adapter);
-
+
peer_tree.setMenu(menu);
-
+
update_peer_buttons = new Runnable() {
public void run() {
@@ -531,7 +531,7 @@ public class TCFTargetTab extends AbstractLaunchConfigurationTab {
}
update_peer_buttons.run();
}
-
+
@Override
public void dispose() {
Protocol.invokeAndWait(new Runnable() {
@@ -546,7 +546,7 @@ public class TCFTargetTab extends AbstractLaunchConfigurationTab {
public String getName() {
return "Target";
}
-
+
@Override
public Image getImage() {
return ImageCache.getImage(ImageCache.IMG_TARGET_TAB);
@@ -576,7 +576,7 @@ public class TCFTargetTab extends AbstractLaunchConfigurationTab {
public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {
}
-
+
private void disconnectPeer(final PeerInfo info) {
assert Protocol.isDispatchThread();
if (info.children != null) {
@@ -593,11 +593,11 @@ public class TCFTargetTab extends AbstractLaunchConfigurationTab {
info.channel = null;
}
}
-
+
private boolean canHaveChildren(PeerInfo parent) {
return parent == peer_info || parent.attrs.get(IPeer.ATTR_PROXY) != null;
}
-
+
private void loadChildren(final PeerInfo parent) {
assert Thread.currentThread() == display.getThread();
if (parent.children_pending) return;
@@ -618,7 +618,7 @@ public class TCFTargetTab extends AbstractLaunchConfigurationTab {
createLocatorListener(peer_info);
}
else {
- final IChannel channel = parent.peer.openChannel();
+ final IChannel channel = parent.peer.openChannel();
parent.channel = channel;
parent.channel.addChannelListener(new IChannelListener() {
boolean opened = false;
@@ -666,7 +666,7 @@ public class TCFTargetTab extends AbstractLaunchConfigurationTab {
}
});
}
-
+
private void createLocatorListener(PeerInfo peer) {
assert Protocol.isDispatchThread();
Map<String,IPeer> map = peer.locator.getPeers();
@@ -685,7 +685,7 @@ public class TCFTargetTab extends AbstractLaunchConfigurationTab {
peer.locator.addListener(peer.listener);
doneLoadChildren(peer, null, buf);
}
-
+
private void doneLoadChildren(final PeerInfo parent, final Throwable error, final PeerInfo[] children) {
assert Protocol.isDispatchThread();
assert error == null || children == null;
@@ -701,7 +701,7 @@ public class TCFTargetTab extends AbstractLaunchConfigurationTab {
}
});
}
-
+
private void updateItems(PeerInfo parent) {
if (display == null) return;
assert Thread.currentThread() == display.getThread();
@@ -772,7 +772,7 @@ public class TCFTargetTab extends AbstractLaunchConfigurationTab {
assert info.children[i].index == i;
return info.children[i];
}
-
+
private PeerInfo findPeerInfo(String path) {
assert Thread.currentThread() == display.getThread();
if (path == null) return null;
@@ -800,7 +800,7 @@ public class TCFTargetTab extends AbstractLaunchConfigurationTab {
}
return null;
}
-
+
private TreeItem findItem(PeerInfo info) {
if (info == null) return null;
assert info.parent != null;
@@ -811,7 +811,7 @@ public class TCFTargetTab extends AbstractLaunchConfigurationTab {
if (i == null) return null;
return i.getItem(info.index);
}
-
+
private void runDiagnostics(String path, boolean loop) {
PeerInfo info = findPeerInfo(path);
if (info == null) return;
@@ -850,7 +850,7 @@ public class TCFTargetTab extends AbstractLaunchConfigurationTab {
shell.setVisible(true);
runDiagnostics(info, loop, test, shell, label, bar);
}
-
+
private void runDiagnostics(final PeerInfo info, final boolean loop, final TCFTestSuite[] test,
final Shell shell, final CLabel label, final ProgressBar bar) {
final TCFTestSuite.TestListener done = new TCFTestSuite.TestListener() {
@@ -908,7 +908,7 @@ public class TCFTargetTab extends AbstractLaunchConfigurationTab {
}
});
}
-
+
private void fillItem(TreeItem item, PeerInfo info) {
assert Thread.currentThread() == display.getThread();
Object data = item.getData("TCFPeerInfo");
@@ -930,13 +930,13 @@ public class TCFTargetTab extends AbstractLaunchConfigurationTab {
else if (info.children == null || info.children_error != null) item.setItemCount(1);
else item.setItemCount(info.children.length);
}
-
+
private String getPath(PeerInfo info) {
if (info == peer_info) return "";
if (info.parent == peer_info) return info.id;
return getPath(info.parent) + "/" + info.id;
}
-
+
private String getImageName(PeerInfo info) {
return ImageCache.IMG_TARGET_TAB;
}
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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TestErrorsDialog.java
index 55b140a91..8eae865b3 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TestErrorsDialog.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TestErrorsDialog.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -28,15 +28,15 @@ import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
class TestErrorsDialog extends Dialog {
-
- private static final int
+
+ private static final int
SIZING_TEXT_WIDTH = 600,
SIZING_TEXT_HEIGHT = 400;
-
+
private Collection<Throwable> errors;
private Image image;
private Text text;
-
+
TestErrorsDialog(Shell parent, Image image, Collection<Throwable> errors) {
super(parent);
this.image = image;
@@ -48,7 +48,7 @@ class TestErrorsDialog extends Dialog {
super.configureShell(shell);
shell.setText("Connection Diagnostic errors");
shell.setImage(image);
- }
+ }
@Override
protected void createButtonsForButtonBar(Composite parent) {
@@ -59,11 +59,11 @@ class TestErrorsDialog extends Dialog {
protected Control createDialogArea(Composite parent) {
Composite composite = (Composite)super.createDialogArea(parent);
composite.setSize(composite.computeSize(SWT.DEFAULT, SWT.DEFAULT));
-
+
Label label = new Label(composite, SWT.WRAP);
label.setFont(JFaceResources.getFontRegistry().get(JFaceResources.BANNER_FONT));
label.setText("Connection diagnostics ended with errors:");
-
+
text = new Text(composite, SWT.MULTI | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
text.setFont(JFaceResources.getFontRegistry().get(JFaceResources.TEXT_FONT));
text.setEditable(false);
@@ -72,10 +72,10 @@ class TestErrorsDialog extends Dialog {
data.widthHint = SIZING_TEXT_WIDTH;
data.heightHint = SIZING_TEXT_HEIGHT;
text.setLayoutData(data);
-
+
return composite;
}
-
+
private String createText() {
StringWriter buf = new StringWriter();
PrintWriter pwr = new PrintWriter(buf);
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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/AbstractRemoteShell.java
index 1469946b4..d6818ffec 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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/AbstractRemoteShell.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2009 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -19,7 +19,7 @@ abstract class AbstractRemoteShell implements IRemoteShell {
protected boolean debug;
protected BufferedReader inp;
protected PrintWriter out;
-
+
public void setDebug(boolean debug) {
this.debug = debug;
}
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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/IRemoteShell.java
index 4e79949e3..c772b65f6 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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/IRemoteShell.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2009 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -13,7 +13,7 @@ package org.eclipse.tm.internal.tcf.debug.ui.launch.setup;
import java.io.IOException;
interface IRemoteShell {
-
+
/**
* String that is used as shell prompt.
*/
@@ -25,27 +25,27 @@ interface IRemoteShell {
* @throws IOException
*/
void write(String s) throws IOException;
-
+
/**
* Read shell output until given string if found.
* @param s - a string to search in shell output.
* @throws IOException
*/
void expect(String s) throws IOException;
-
+
/**
* Read and collect shell output until shell prompt is found.
* @return shell output, not including the prompt.
* @throws IOException
*/
String waitPrompt() throws IOException;
-
+
/**
* Exit shell and close communication channel.
* @throws IOException
*/
void close() throws IOException;
-
+
/**
* Enable/disable debug output to System.out.
*/
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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/PeerPropsControl.java
index 6a33fd50c..6e68bbaf9 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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/PeerPropsControl.java
@@ -35,13 +35,13 @@ import org.eclipse.tm.internal.tcf.debug.ui.ImageCache;
import org.eclipse.tm.tcf.protocol.IPeer;
public class PeerPropsControl {
-
- private static final int
+
+ private static final int
SIZING_TABLE_WIDTH = 400,
SIZING_TABLE_HEIGHT = 200;
private static final String[] column_names = { "Name", "Value" };
-
+
private final Map<String,String> attrs;
private final ArrayList<Attribute> attr_table_data;
private final boolean create_new;
@@ -53,12 +53,12 @@ public class PeerPropsControl {
private Table attr_table;
private TableViewer table_viewer;
private Image attr_image;
-
+
private class Attribute {
String name;
String value;
}
-
+
private class AttributeLabelProvider extends LabelProvider implements ITableLabelProvider {
public Image getColumnImage(Object element, int column) {
@@ -70,7 +70,7 @@ public class PeerPropsControl {
Attribute a = (Attribute)element;
return column == 0 ? a.name : a.value;
}
-
+
public String getText(Object element) {
TableColumn column = attr_table.getSortColumn();
if (column == null) return "";
@@ -84,7 +84,7 @@ public class PeerPropsControl {
this.listener = listener;
create_new = attrs.isEmpty();
attr_table_data = new ArrayList<Attribute>();
-
+
createTextFields(parent);
createAttrTable(parent);
}
@@ -96,7 +96,7 @@ public class PeerPropsControl {
composite.setFont(font);
composite.setLayout(layout);
composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
+
Label id_label = new Label(composite, SWT.WRAP);
id_label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING));
id_label.setFont(font);
@@ -122,36 +122,36 @@ public class PeerPropsControl {
}
});
}
-
+
private void createAttrTable(Composite parent) {
Font font = parent.getFont();
Label props_label = new Label(parent, SWT.WRAP);
props_label.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
props_label.setFont(font);
props_label.setText("Peer &properties:");
-
+
Composite composite = new Composite(parent, SWT.NONE);
GridLayout layout = new GridLayout(2, false);
composite.setFont(font);
composite.setLayout(layout);
composite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true, 2, 1));
-
+
attr_table = new Table(composite, SWT.SINGLE | SWT.BORDER |
- SWT.H_SCROLL | SWT.V_SCROLL |
+ SWT.H_SCROLL | SWT.V_SCROLL |
SWT.FULL_SELECTION | SWT.HIDE_SELECTION);
attr_table.setFont(font);
GridData data = new GridData(GridData.FILL_BOTH);
data.widthHint = SIZING_TABLE_WIDTH;
data.heightHint = SIZING_TABLE_HEIGHT;
attr_table.setLayoutData(data);
-
+
for (int i = 0; i < column_names.length; i++) {
final TableColumn column = new TableColumn(attr_table, SWT.LEAD, i);
column.setMoveable(false);
column.setText(column_names[i]);
column.setWidth(SIZING_TABLE_WIDTH / column_names.length);
column.addSelectionListener(new SelectionAdapter() {
-
+
public void widgetSelected(SelectionEvent e) {
if (column == attr_table.getSortColumn()) {
switch (attr_table.getSortDirection()) {
@@ -176,13 +176,13 @@ public class PeerPropsControl {
}
attr_table.setHeaderVisible(true);
attr_table.setLinesVisible(true);
-
+
attr_image = ImageCache.getImage(ImageCache.IMG_ATTRIBUTE);
- table_viewer = new TableViewer(attr_table);
+ table_viewer = new TableViewer(attr_table);
table_viewer.setUseHashlookup(true);
table_viewer.setColumnProperties(column_names);
-
+
CellEditor[] editors = new CellEditor[column_names.length];
for (int i = 0; i < column_names.length; i++) {
TextCellEditor editor = new TextCellEditor(attr_table);
@@ -190,7 +190,7 @@ public class PeerPropsControl {
editors[i] = editor;
}
table_viewer.setCellEditors(editors);
-
+
table_viewer.setCellModifier(new ICellModifier() {
public boolean canModify(Object element, String property) {
@@ -215,7 +215,7 @@ public class PeerPropsControl {
table_viewer.update(element, new String[] { property });
}
});
-
+
String[] keys = attrs.keySet().toArray(new String[attrs.size()]);
Arrays.sort(keys);
for (String key : keys) {
@@ -233,7 +233,7 @@ public class PeerPropsControl {
}
}
if (create_new) id_text.setText("USR:" + System.currentTimeMillis());
-
+
table_viewer.setContentProvider(new IStructuredContentProvider() {
public Object[] getElements(Object input) {
@@ -247,7 +247,7 @@ public class PeerPropsControl {
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
}
});
-
+
table_viewer.setLabelProvider(new AttributeLabelProvider());
table_viewer.setInput(attr_table_data);
table_viewer.setComparator(new ViewerComparator() {
@@ -260,10 +260,10 @@ public class PeerPropsControl {
return 0;
}
});
-
+
createTableButtons(composite);
}
-
+
private void createTableButtons(Composite parent) {
Font font = parent.getFont();
Composite composite = new Composite(parent, SWT.NONE);
@@ -271,7 +271,7 @@ public class PeerPropsControl {
composite.setFont(font);
composite.setLayout(layout);
composite.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL));
-
+
final Button button_new = new Button(composite, SWT.PUSH);
button_new.setText("&Add");
button_new.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
@@ -296,7 +296,7 @@ public class PeerPropsControl {
button_remove.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
- Attribute a = (Attribute) ((IStructuredSelection)
+ Attribute a = (Attribute) ((IStructuredSelection)
table_viewer.getSelection()).getFirstElement();
if (a == null) return;
attr_table_data.remove(a);
@@ -304,7 +304,7 @@ public class PeerPropsControl {
}
});
}
-
+
public boolean isComplete() {
return name_text.getText().length() > 0;
}
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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/SSHClient.java
index 6a41f8a46..0db819fa1 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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/SSHClient.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2009 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -28,20 +28,20 @@ import com.jcraft.jsch.Channel;
import com.jcraft.jsch.Session;
class SSHClient extends AbstractRemoteShell {
-
+
private final Session session;
private final Channel channel;
-
+
private static class Pipe {
-
+
final PipedOutputStream out = new PipedOutputStream();
final PipedInputStream inp = new PipedInputStream();
-
+
Pipe() throws IOException {
inp.connect(out);
}
}
-
+
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());
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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/SetupWizardDialog.java
index a966c066c..cfa9771cc 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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/SetupWizardDialog.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2009 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -18,14 +18,14 @@ import org.eclipse.swt.graphics.Image;
import org.eclipse.tm.internal.tcf.debug.ui.ImageCache;
public class SetupWizardDialog extends Wizard {
-
+
private final Map<String,String> peer_attrs;
-
+
public SetupWizardDialog(Map<String,String> peer_attrs) {
this.peer_attrs = peer_attrs;
setWindowTitle("TCF Debug Target Setup");
}
-
+
@Override
public void addPages() {
addPage(new WizardFirstPage(this));
@@ -34,12 +34,12 @@ public class SetupWizardDialog extends Wizard {
addPage(new WizardLocalPage(this));
addPage(new WizardPropsPage(this, peer_attrs));
}
-
+
@Override
public Image getDefaultPageImage() {
return ImageCache.getImage(ImageCache.IMG_TARGET_WIZARD);
}
-
+
@Override
public boolean canFinish() {
IWizardPage page = getContainer().getCurrentPage();
@@ -47,7 +47,7 @@ public class SetupWizardDialog extends Wizard {
if (page instanceof WizardPropsPage) return ((WizardPropsPage)page).canFinish();
return false;
}
-
+
@Override
public boolean performFinish() {
if (!canFinish()) return false;
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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/TelnetClient.java
index e4c896f83..f71ea0045 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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/TelnetClient.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2009 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -23,7 +23,7 @@ import java.net.Socket;
import java.net.SocketException;
class TelnetClient extends AbstractRemoteShell {
-
+
private Socket socket;
private boolean logged;
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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/TelnetInputStream.java
index dfa4f3fb1..429478da5 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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/TelnetInputStream.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2009 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -15,14 +15,14 @@ import java.net.*;
import java.util.ArrayList;
class TelnetInputStream extends FilterInputStream {
-
+
public interface TelnetTraceListener {
void command(String s);
}
private final boolean echo;
private final String prompt;
-
+
private final InputStream inp;
private final OutputStream out;
private final boolean mode_rem[] = new boolean[256];
@@ -34,7 +34,7 @@ class TelnetInputStream extends FilterInputStream {
private boolean eof;
private IOException err;
private boolean closed;
-
+
private final ArrayList<TelnetTraceListener> trace_listeners = new ArrayList<TelnetTraceListener>();
private static final int
@@ -58,14 +58,14 @@ class TelnetInputStream extends FilterInputStream {
co_X_DISPLAY_LOCATION = 35,
co_ENVIRON = 36,
co_NEW_ENVIRON = 39;
-
+
@SuppressWarnings("unused")
private static final int
sp_VAR = 0,
sp_VALUE = 1,
sp_ESC = 2,
sp_USERVAR = 3;
-
+
@SuppressWarnings("unused")
private static final int
ac_IS = 0,
@@ -147,7 +147,7 @@ class TelnetInputStream extends FilterInputStream {
public void run() {
try {
synchronized (out) {
- out.write(cm_IAC);
+ out.write(cm_IAC);
out.write(echo ? cm_DO : cm_DONT);
out.write(co_ECHO);
out.flush();
@@ -174,7 +174,7 @@ class TelnetInputStream extends FilterInputStream {
break;
case cm_DO:
out.write(cm_IAC);
- if (co == co_SUPPRESS_GO_AHEAD) {
+ if (co == co_SUPPRESS_GO_AHEAD) {
out.write(cm_WILL);
}
else if (co == co_NEW_ENVIRON && prompt != null) {
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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/TimeOutInputStream.java
index 5461e3731..71f85657c 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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/TimeOutInputStream.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2009 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -56,7 +56,7 @@ class TimeOutInputStream extends FilterInputStream {
}
}
}
-
+
TimeOutInputStream(InputStream in, long time) {
this(in, 0x1000, time);
}
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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/WizardFirstPage.java
index ce876d753..893133c96 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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/WizardFirstPage.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2009 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -20,9 +20,9 @@ import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;
class WizardFirstPage extends WizardPage implements Listener {
-
+
private final SetupWizardDialog wizard;
-
+
private Button button_props;
private Button button_local;
private Button button_login;
@@ -39,11 +39,11 @@ class WizardFirstPage extends WizardPage implements Listener {
GridLayout gl = new GridLayout();
gl.numColumns = 1;
composite.setLayout(gl);
-
+
button_props = new Button(composite, SWT.RADIO | SWT.WRAP | SWT.MULTI);
button_props.addListener(SWT.Selection, this);
button_props.setText("Manual setup of TCF connection properties.");
-
+
button_local = new Button(composite, SWT.RADIO | SWT.WRAP | SWT.MULTI);
button_local.addListener(SWT.Selection, this);
button_local.setText("Setup TCF agent on local host.");
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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/WizardLocalPage.java
index 91e25a186..9f6841416 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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/WizardLocalPage.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2009 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/WizardLogPage.java
index fc565405b..cc69f7721 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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/WizardLogPage.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2009 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -46,18 +46,18 @@ import org.eclipse.tm.tcf.ssl.TCFSecurityManager;
import org.osgi.framework.Bundle;
class WizardLogPage extends WizardPage implements Runnable {
-
+
private final SetupWizardDialog wizard;
-
+
private Thread thread;
private String protocol;
private String host;
private String user;
private String user_password;
private String root_password;
-
+
private Text log_text;
-
+
private Display display;
private Shell parent;
private IRemoteShell shell;
@@ -86,14 +86,14 @@ class WizardLogPage extends WizardPage implements Runnable {
composite.setLayout(gl);
new Label(composite, SWT.WRAP).setText("Agent installation log:");
-
+
log_text = new Text(composite, SWT.BORDER | SWT.MULTI | SWT.READ_ONLY | SWT.H_SCROLL | SWT.V_SCROLL);
GridData gd = new GridData(GridData.FILL_BOTH);
log_text.setLayoutData(gd);
-
+
setControl(composite);
}
-
+
private void runSetupJob(WizardLoginPage login) {
assert display != null;
assert display.getThread() == Thread.currentThread();
@@ -108,7 +108,7 @@ class WizardLogPage extends WizardPage implements Runnable {
thread = new Thread(this);
thread.start();
}
-
+
public void run() {
Throwable error = null;
try {
@@ -121,9 +121,9 @@ class WizardLogPage extends WizardPage implements Runnable {
else {
throw new Exception("Invalid protocol name: " + protocol);
}
-
+
String s;
-
+
if (!user.equals("root")) {
send("su", true);
expect("Password: ", true);
@@ -138,7 +138,7 @@ class WizardLogPage extends WizardPage implements Runnable {
String machine = waitPrompt().replace('\n', ' ').trim();
String version = "0.0.1";
Bundle bundle = Platform.getBundle(Activator.PLUGIN_ID);
-
+
URL url = FileLocator.find(bundle, new Path("agent/get-os-tag"), null);
if (url == null) throw new Exception("Cannot find get-os-tag script");
send("cat >get-os-tag", true);
@@ -158,12 +158,12 @@ class WizardLogPage extends WizardPage implements Runnable {
if (s.length() > 0) throw new Exception(s);
exec("chmod u+x get-os-tag");
-
+
send("./get-os-tag", true);
String os_tag = waitPrompt().replace('\n', ' ').trim();
-
+
exec("rm -f get-os-tag");
-
+
url = null;
String fnm = null;
String machine0 = machine;
@@ -192,7 +192,7 @@ class WizardLogPage extends WizardPage implements Runnable {
}
}
if (url == null) throw new Exception("Unsupported target OS or CPU");
-
+
inp = url.openStream();
send("which base64", true);
s = waitPrompt();
@@ -219,27 +219,27 @@ class WizardLogPage extends WizardPage implements Runnable {
}
}
inp.close();
-
+
send("rpm -e --quiet tcf-agent", true);
waitPrompt();
exec("rm -f /etc/init.d/tcf-agent*");
exec("rpm -i --quiet " + fnm);
exec("rm -f " + fnm);
-
+
File certs = TCFSecurityManager.getCertificatesDirectory();
File local_cert = new File(certs, "local.cert");
File local_priv = new File(certs, "local.priv");
-
+
if (!local_cert.exists() || !local_priv.exists()) {
copyRemoteSecret("local.cert", local_cert);
copyRemoteSecret("local.priv", local_priv);
exec("/usr/sbin/tcf-agent -c");
}
-
+
copyRemoteSecret("local.cert", new File(certs, host + ".cert"));
copyLocalSecret(local_cert, InetAddress.getLocalHost().getHostName() + ".cert");
-
+
if (!user.equals("root")) {
send("exit", true);
waitPrompt();
@@ -259,7 +259,7 @@ class WizardLogPage extends WizardPage implements Runnable {
}
done(error);
}
-
+
private void sendBase64(InputStream inp) throws Exception {
byte[] buf = new byte[0x100 * 3];
for (;;) {
@@ -273,7 +273,7 @@ class WizardLogPage extends WizardPage implements Runnable {
send(new String(Base64.toBase64(buf, 0, len)), false);
}
}
-
+
private void copyRemoteSecret(String from, File to) throws Exception {
send("cat /etc/tcf/ssl/" + from, true);
String s = waitPrompt();
@@ -283,7 +283,7 @@ class WizardLogPage extends WizardPage implements Runnable {
wr.write(s);
wr.close();
}
-
+
private void copyLocalSecret(File from, String to) throws Exception {
send("cat >/etc/tcf/ssl/" + to, true);
BufferedReader rd = new BufferedReader(new InputStreamReader(
@@ -297,7 +297,7 @@ class WizardLogPage extends WizardPage implements Runnable {
String s = waitPrompt();
if (s.length() > 0) throw new Exception(s);
}
-
+
private void send(final String s, boolean log) throws IOException {
if (log) {
display.asyncExec(new Runnable() {
@@ -314,7 +314,7 @@ class WizardLogPage extends WizardPage implements Runnable {
if (log) shell.expect(s);
shell.expect("\n");
}
-
+
private void expect(final String s, boolean log) throws IOException {
if (log) {
display.asyncExec(new Runnable() {
@@ -328,7 +328,7 @@ class WizardLogPage extends WizardPage implements Runnable {
}
shell.expect(s);
}
-
+
private String waitPrompt() throws IOException {
display.asyncExec(new Runnable() {
public void run() {
@@ -349,13 +349,13 @@ class WizardLogPage extends WizardPage implements Runnable {
}
return s;
}
-
+
private void exec(String cmd) throws Exception {
send(cmd, true);
String s = waitPrompt();
if (s.length() > 0) throw new Exception(s);
}
-
+
private void done(final Throwable error) {
display.asyncExec(new Runnable() {
public void run() {
@@ -382,13 +382,13 @@ class WizardLogPage extends WizardPage implements Runnable {
}
});
}
-
+
@Override
public IWizardPage getPreviousPage() {
if (thread != null) return null;
return wizard.getPage("LoginPage");
}
-
+
@Override
public IWizardPage getNextPage() {
return 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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/WizardLoginPage.java
index 76bdfd2aa..7435d4429 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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/WizardLoginPage.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2009 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -39,16 +39,16 @@ import org.eclipse.tm.internal.tcf.debug.ui.Activator;
import org.osgi.framework.Bundle;
class WizardLoginPage extends WizardPage implements Listener {
-
+
private static final String
PREF_PROTOCOL = "setup.login.protocol",
PREF_HOST = "setup.login.host",
PREF_USER = "setup.login.user";
-
+
private final SetupWizardDialog wizard;
final String[] protocols = { "Telnet", "SSH" };
-
+
Combo protocol;
Button prefs;
Text host;
@@ -65,12 +65,12 @@ class WizardLoginPage extends WizardPage implements Listener {
public void handleEvent(Event event) {
getContainer().updateButtons();
-
+
Preferences p = Activator.getDefault().getPluginPreferences();
p.setValue(PREF_PROTOCOL, protocol.getText());
p.setValue(PREF_HOST, host.getText());
p.setValue(PREF_USER, user.getText());
-
+
root_password.setEnabled(!user.getText().equals("root"));
prefs.setEnabled(protocol.getText().equals(protocols[1]));
}
@@ -139,7 +139,7 @@ class WizardLoginPage extends WizardPage implements Listener {
gd.widthHint = 200;
root_password.setLayoutData(gd);
root_password.addListener(SWT.KeyUp, this);
-
+
Preferences p = Activator.getDefault().getPluginPreferences();
p.setDefault(PREF_PROTOCOL, protocols[0]);
protocol.setText(p.getString(PREF_PROTOCOL));
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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/WizardPropsPage.java
index 896903297..e52283910 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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/setup/WizardPropsPage.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2009 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -21,7 +21,7 @@ import org.eclipse.swt.widgets.Composite;
class WizardPropsPage extends WizardPage {
private final Map<String,String> attrs;
-
+
private PeerPropsControl props;
protected WizardPropsPage(SetupWizardDialog wizard, Map<String,String> attrs) {
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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFAnnotationManager.java
index e4f9e5539..adf895c69 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFAnnotationManager.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFAnnotationManager.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* 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
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -35,7 +35,6 @@ 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.services.IBreakpoints;
-import org.eclipse.tm.tcf.services.IRunControl;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.ISelectionListener;
import org.eclipse.ui.IWindowListener;
@@ -47,25 +46,27 @@ import org.eclipse.ui.texteditor.IDocumentProvider;
import org.eclipse.ui.texteditor.ITextEditor;
public class TCFAnnotationManager {
-
+
class TCFAnnotation extends Annotation {
-
+
final TCFModel model;
final String exe_id;
final ITextEditor editor;
final Image image;
-
- TCFAnnotation(TCFModel model, String exe_id, ITextEditor editor, Image image) {
+ final Position position;
+
+ TCFAnnotation(TCFModel model, String exe_id, ITextEditor editor, Image image, Position position) {
this.model = model;
this.exe_id = exe_id;
this.editor = editor;
this.image = image;
+ this.position = position;
}
-
+
protected Image getImage() {
return image;
}
-
+
void dispose() {
assert Thread.currentThread() == display.getThread();
IDocumentProvider doc_provider = editor.getDocumentProvider();
@@ -76,22 +77,22 @@ public class TCFAnnotationManager {
}
}
}
-
+
private class WorkbenchWindowInfo {
final ArrayList<TCFAnnotation> annotations = new ArrayList<TCFAnnotation>();
-
+
void dispose() {
for (TCFAnnotation a : annotations) a.dispose();
annotations.clear();
}
}
-
+
private TCFLaunch active_launch;
private final HashMap<IWorkbenchWindow,WorkbenchWindowInfo> windows =
new HashMap<IWorkbenchWindow,WorkbenchWindowInfo>();
-
+
private final TCFLaunch.Listener launch_listener = new TCFLaunch.Listener() {
-
+
public void onCreated(TCFLaunch launch) {
}
@@ -150,14 +151,14 @@ public class TCFAnnotationManager {
public void onProcessOutput(TCFLaunch launch, String process_id, int stream_id, byte[] data) {
}
};
-
+
private final ISelectionListener selection_listener = new ISelectionListener() {
-
+
public void selectionChanged(IWorkbenchPart part, ISelection selection) {
updateActiveLaunch();
}
};
-
+
private final IWindowListener window_listener = new IWindowListener() {
public void windowActivated(IWorkbenchWindow window) {
@@ -184,12 +185,12 @@ public class TCFAnnotationManager {
updateActiveLaunch();
}
};
-
+
private final Display display = PlatformUI.getWorkbench().getDisplay();
private int refresh_breakpoint_view_cnt = 0;
private int update_active_launch_cnt = 0;
private boolean disposed;
-
+
public TCFAnnotationManager() {
assert Protocol.isDispatchThread();
TCFLaunch.addListener(launch_listener);
@@ -206,7 +207,7 @@ public class TCFAnnotationManager {
}
});
}
-
+
public void dispose() {
if (disposed) return;
assert Protocol.isDispatchThread();
@@ -224,7 +225,7 @@ public class TCFAnnotationManager {
}
});
}
-
+
private void displayExec(Runnable r) {
synchronized (Device.class) {
if (!display.isDisposed()) {
@@ -232,7 +233,7 @@ public class TCFAnnotationManager {
}
}
}
-
+
private void updateActiveLaunch() {
assert !disposed;
final int cnt = ++update_active_launch_cnt;
@@ -262,10 +263,10 @@ public class TCFAnnotationManager {
}
});
}
-
+
private void refreshBreakpointView() {
assert !disposed;
- final int cnt = ++refresh_breakpoint_view_cnt;
+ final int cnt = ++refresh_breakpoint_view_cnt;
displayExec(new Runnable() {
public void run() {
if (cnt != refresh_breakpoint_view_cnt) return;
@@ -276,7 +277,7 @@ public class TCFAnnotationManager {
}
});
}
-
+
String getBreakpointStatus(final TCFBreakpoint breakpoint) {
if (disposed) return "";
assert Thread.currentThread() == display.getThread();
@@ -303,14 +304,14 @@ public class TCFAnnotationManager {
}
return text[0];
}
-
+
void addStackFrameAnnotation(TCFModel model, String exe_id, boolean top_frame,
IWorkbenchPage page, ITextEditor editor, IRegion region) {
if (disposed) return;
assert Thread.currentThread() == display.getThread();
TCFAnnotation annotation = null;
IAnnotationModel ann_model = null;
-
+
if (editor != null && region != null) {
IDocumentProvider doc_provider = editor.getDocumentProvider();
IEditorInput editor_input = editor.getEditorInput();
@@ -329,23 +330,36 @@ public class TCFAnnotationManager {
text = "Debug Stack Frame"; //$NON-NLS-1$
image = DebugUITools.getImage(IDebugUIConstants.IMG_OBJS_INSTRUCTION_POINTER);
}
- annotation = new TCFAnnotation(model, exe_id, editor, image);
+ annotation = new TCFAnnotation(model, exe_id, editor, image,
+ new Position(region.getOffset(), region.getLength()));
annotation.setType(type);
annotation.setText(text);
}
}
-
+
if (page != null) {
WorkbenchWindowInfo info = windows.get(page.getWorkbenchWindow());
+ if (annotation != null && info.annotations.size() == 1) {
+ for (TCFAnnotation a : info.annotations) {
+ if (a.model != annotation.model) continue;
+ if (a.editor != annotation.editor) continue;
+ if (a.image != annotation.image) continue;
+ if (!a.exe_id.equals(annotation.exe_id)) continue;
+ if (!a.position.equals(annotation.position)) continue;
+ if (!a.getType().equals(annotation.getType())) continue;
+ if (!a.getText().equals(annotation.getText())) continue;
+ return;
+ }
+ }
for (TCFAnnotation a : info.annotations) a.dispose();
info.annotations.clear();
if (annotation != null) {
- ann_model.addAnnotation(annotation, new Position(region.getOffset(), region.getLength()));
+ ann_model.addAnnotation(annotation, annotation.position);
info.annotations.add(annotation);
}
}
}
-
+
public Annotation findAnnotation(TCFModel model, String id) {
if (disposed) return null;
assert Thread.currentThread() == display.getThread();
@@ -359,7 +373,7 @@ public class TCFAnnotationManager {
}
return null;
}
-
+
void onContextResumed(TCFModel model, String id) {
if (disposed) return;
assert Thread.currentThread() == display.getThread();
@@ -374,38 +388,6 @@ public class TCFAnnotationManager {
}
}
- void onContextSuspended(final TCFModel model, final String id) {
- if (disposed) return;
- assert Thread.currentThread() == display.getThread();
- final IAdaptable adaptable = DebugUITools.getDebugContext();
- if (adaptable instanceof TCFNode) {
- Protocol.invokeLater(new Runnable() {
- public void run() {
- IRunControl.RunControlContext x = null;
- TCFNode n = (TCFNode)adaptable;
- while (x == null && n != null && !n.isDisposed()) {
- if (n instanceof TCFNodeExecContext) {
- if (!n.validateNode(this)) return;
- x = ((TCFNodeExecContext)n).getRunContext().getData();
- }
- n = n.parent;
- }
- if (x != null && id.equals(x.getID())) {
- displayExec(new Runnable() {
- public void run() {
- IWorkbenchWindow w = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- if (w != null) {
- IWorkbenchPage page = w.getActivePage();
- if (page != null) model.displaySource(adaptable, page, true);
- }
- }
- });
- }
- }
- });
- }
- }
-
void onContextRemoved(TCFModel model, String id) {
if (disposed) return;
assert Thread.currentThread() == display.getThread();
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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildren.java
index a3ea6fa07..c16f74869 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildren.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildren.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -21,10 +21,10 @@ import org.eclipse.tm.tcf.protocol.IToken;
import org.eclipse.tm.tcf.util.TCFDataCache;
/**
- * TCFChildren is a concrete type of TCF data cache that is used to cache a list of children.
+ * TCFChildren is a concrete type of TCF data cache that is used to cache a list of children.
*/
public abstract class TCFChildren extends TCFDataCache<Map<String,TCFNode>> {
-
+
private final int pool_margin;
private final Map<String,TCFNode> node_pool = new LinkedHashMap<String,TCFNode>(32, 0.75f, true);
private boolean disposed;
@@ -33,12 +33,12 @@ public abstract class TCFChildren extends TCFDataCache<Map<String,TCFNode>> {
super(channel);
pool_margin = 0;
}
-
+
TCFChildren(IChannel channel, int pool_margin) {
super(channel);
this.pool_margin = pool_margin;
}
-
+
/**
* Dispose the cache and all nodes in the nodes pool.
*/
@@ -52,7 +52,7 @@ public abstract class TCFChildren extends TCFDataCache<Map<String,TCFNode>> {
disposed = true;
super.reset(null);
}
-
+
/**
* Remove a node from cache.
* The method is called every time a node is disposed.
@@ -65,7 +65,7 @@ public abstract class TCFChildren extends TCFDataCache<Map<String,TCFNode>> {
if (data != null) data.remove(id);
}
}
-
+
/**
* Check if the cache is disposed.
* @return true if disposed.
@@ -73,7 +73,7 @@ public abstract class TCFChildren extends TCFDataCache<Map<String,TCFNode>> {
boolean isDisposed() {
return disposed;
}
-
+
private void addToPool(Map<String,TCFNode> data) {
assert !disposed;
for (TCFNode n : data.values()) {
@@ -90,7 +90,7 @@ public abstract class TCFChildren extends TCFDataCache<Map<String,TCFNode>> {
}
}
}
-
+
/**
* End cache pending state.
* @param token - pending command handle.
@@ -113,7 +113,7 @@ public abstract class TCFChildren extends TCFDataCache<Map<String,TCFNode>> {
super.set(token, error, new HashMap<String,TCFNode>());
}
}
-
+
/**
* Set given data to the cache, mark cache as valid, cancel any pending data retrieval.
* @param data - up-to-date data to store in the cache, null means empty collection of nodes.
@@ -129,7 +129,7 @@ public abstract class TCFChildren extends TCFDataCache<Map<String,TCFNode>> {
super.reset(new HashMap<String,TCFNode>());
}
}
-
+
/**
* Add a node to collection of children.
* @param n - a node.
@@ -143,7 +143,7 @@ public abstract class TCFChildren extends TCFDataCache<Map<String,TCFNode>> {
if (data != null) data.put(n.id, n);
}
}
-
+
/**
* Return collection of all nodes, including current children as well as
* currently unused nodes from the pool.
@@ -153,7 +153,7 @@ public abstract class TCFChildren extends TCFDataCache<Map<String,TCFNode>> {
Collection<TCFNode> getNodes() {
return node_pool.values();
}
-
+
/**
* Return current number of children.
* The cache must be valid for the method to work.
@@ -164,7 +164,7 @@ public abstract class TCFChildren extends TCFDataCache<Map<String,TCFNode>> {
Map<String,TCFNode> data = getData();
return data == null ? 0 : data.size();
}
-
+
/**
* Return index of given child node.
* @param n - a child node
@@ -177,7 +177,7 @@ public abstract class TCFChildren extends TCFDataCache<Map<String,TCFNode>> {
}
return -1;
}
-
+
/**
* Return current children nodes as an array.
* @return array of nodes.
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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenExecContext.java
index 8cd3ad238..f5e00cf92 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenExecContext.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenExecContext.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -23,14 +23,14 @@ import org.eclipse.tm.tcf.util.TCFDataCache;
/**
* This class is used to maintain a dynamic list of both executable contexts and memory spaces
* that are children of a given parent context. The job is slightly complicated by necessity
- * to merge results from two independent services.
+ * to merge results from two independent services.
*/
public class TCFChildrenExecContext extends TCFChildren {
-
+
private final TCFNode node;
private final TCFChildren mem_children;
private final TCFChildren run_children;
-
+
TCFChildrenExecContext(final TCFNode node) {
super(node.model.getLaunch().getChannel());
this.node = node;
@@ -88,7 +88,7 @@ public class TCFChildrenExecContext extends TCFChildren {
}
};
}
-
+
@Override
protected void dispose() {
super.dispose();
@@ -102,11 +102,11 @@ public class TCFChildrenExecContext extends TCFChildren {
mem_children.dispose(id);
run_children.dispose(id);
}
-
+
@Override
protected boolean startDataRetrieval() {
TCFDataCache<?> pending = null;
- if (!mem_children.validate()) pending = mem_children;
+ if (!mem_children.validate()) pending = mem_children;
if (!run_children.validate()) pending = run_children;
if (pending != null) {
pending.wait(this);
@@ -121,7 +121,7 @@ public class TCFChildrenExecContext extends TCFChildren {
set(null, error, data);
return true;
}
-
+
void onContextAdded(IRunControl.RunControlContext context) {
String id = context.getID();
TCFNodeExecContext n = (TCFNodeExecContext)node.model.getNode(id);
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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenExpressions.java
index 9775c15e8..59ac7ca1d 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenExpressions.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenExpressions.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* 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
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -24,11 +24,11 @@ public class TCFChildrenExpressions extends TCFChildren {
private final TCFNodeStackFrame node;
private final IExpressionManager exp_manager;
-
+
private final IExpressionsListener listener = new IExpressionsListener() {
-
+
int generation;
-
+
public void expressionsAdded(IExpression[] expressions) {
expressionsRemoved(expressions);
}
@@ -62,11 +62,11 @@ public class TCFChildrenExpressions extends TCFChildren {
exp_manager.removeExpressionListener(listener);
super.dispose();
}
-
+
void onSuspended() {
for (TCFNode n : getNodes()) ((TCFNodeExpression)n).onSuspended();
}
-
+
private TCFNodeExpression findScript(String text) {
for (TCFNode n : getNodes()) {
TCFNodeExpression e = (TCFNodeExpression)n;
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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenLocalVariables.java
index 59fc264b2..b51c18924 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenLocalVariables.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenLocalVariables.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* 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
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenRegisters.java
index 1959886d7..2b79c0169 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenRegisters.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenRegisters.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -30,7 +30,7 @@ public class TCFChildrenRegisters extends TCFChildren {
for (TCFNode n : getNodes()) ((TCFNodeRegister)n).onSuspended();
reset();
}
-
+
void onRegistersChanged() {
for (TCFNode n : getNodes()) ((TCFNodeRegister)n).onRegistersChanged();
}
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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenStackTrace.java
index e6fb7fbc5..418e55241 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenStackTrace.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenStackTrace.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -22,14 +22,14 @@ import org.eclipse.tm.tcf.util.TCFDataCache;
public class TCFChildrenStackTrace extends TCFChildren {
private final TCFNodeExecContext node;
-
+
private String top_frame_id;
TCFChildrenStackTrace(TCFNodeExecContext node) {
super(node.model.getLaunch().getChannel(), 16);
this.node = node;
}
-
+
void onSourceMappingChange() {
for (TCFNode n : getNodes()) ((TCFNodeStackFrame)n).onSourceMappingChange();
}
@@ -38,7 +38,7 @@ public class TCFChildrenStackTrace extends TCFChildren {
for (TCFNode n : getNodes()) ((TCFNodeStackFrame)n).onSuspended();
reset();
}
-
+
void onRegistersChanged() {
for (TCFNode n : getNodes()) ((TCFNodeStackFrame)n).onRegistersChanged();
}
@@ -46,7 +46,7 @@ public class TCFChildrenStackTrace extends TCFChildren {
void onResumed() {
reset(null);
}
-
+
TCFNodeStackFrame getTopFrame() {
assert isValid();
return (TCFNodeStackFrame)node.model.getNode(top_frame_id);
@@ -59,7 +59,7 @@ public class TCFChildrenStackTrace extends TCFChildren {
}
super.set(token, error, data);
}
-
+
@Override
protected boolean startDataRetrieval() {
final HashMap<String,TCFNode> data = new HashMap<String,TCFNode>();
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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenSubExpressions.java
index 68966d2a0..8f194580e 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenSubExpressions.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenSubExpressions.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* 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
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -19,7 +19,7 @@ import org.eclipse.tm.tcf.services.ISymbols;
import org.eclipse.tm.tcf.util.TCFDataCache;
public class TCFChildrenSubExpressions extends TCFChildren {
-
+
private final TCFNode node;
private final int par_level;
private final int par_offs;
@@ -38,7 +38,7 @@ public class TCFChildrenSubExpressions extends TCFChildren {
if (n instanceof TCFNodeExpression) ((TCFNodeExpression)n).onSuspended();
}
}
-
+
private TCFNodeExpression findField(String id) {
assert id != null;
for (TCFNode n : getNodes()) {
@@ -47,7 +47,7 @@ public class TCFChildrenSubExpressions extends TCFChildren {
}
return null;
}
-
+
private TCFNodeExpression findIndex(int index) {
assert index >= 0;
for (TCFNode n : getNodes()) {
@@ -164,7 +164,7 @@ public class TCFChildrenSubExpressions extends TCFChildren {
set(null, null, new HashMap<String,TCFNode>());
return true;
}
-
+
private boolean isNull(byte[] data) {
if (data == null) return true;
for (byte b : data) {
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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFColumnPresentationExpression.java
index 4e60082df..81c8c494b 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFColumnPresentationExpression.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFColumnPresentationExpression.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* 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
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -17,7 +17,7 @@ import org.eclipse.jface.resource.ImageDescriptor;
public class TCFColumnPresentationExpression implements IColumnPresentation {
public static final String PRESENTATION_ID = "Expressions";
-
+
/**
* Presentation column IDs.
*/
@@ -33,7 +33,7 @@ public class TCFColumnPresentationExpression implements IColumnPresentation {
COL_DEC_VALUE,
COL_HEX_VALUE,
};
-
+
private static String[] headers = {
"Name",
"Type",
@@ -46,7 +46,7 @@ public class TCFColumnPresentationExpression implements IColumnPresentation {
COL_DEC_VALUE,
COL_HEX_VALUE,
};
-
+
public void dispose() {
}
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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFColumnPresentationRegister.java
index efcec47fa..41fc73c40 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFColumnPresentationRegister.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFColumnPresentationRegister.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* 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
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -15,9 +15,9 @@ import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationCont
import org.eclipse.jface.resource.ImageDescriptor;
public class TCFColumnPresentationRegister implements IColumnPresentation {
-
+
public static final String PRESENTATION_ID = "Registers";
-
+
/**
* Presentation column IDs.
*/
@@ -49,7 +49,7 @@ public class TCFColumnPresentationRegister implements IColumnPresentation {
COL_FLOAT,
COL_MNEMONIC
};
-
+
private static String[] headers = {
"Name",
"Hex",
@@ -72,7 +72,7 @@ public class TCFColumnPresentationRegister implements IColumnPresentation {
COL_DESCRIPTION,
COL_MNEMONIC
};
-
+
public void dispose() {
}
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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFDebugTask.java
index 9f951d488..d7687a6e2 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFDebugTask.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFDebugTask.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -39,7 +39,7 @@ public abstract class TCFDebugTask<V> extends TCFTask<V> {
"Debugger requiest failed", x));
return getResult();
}
-
+
public void error(String msg) {
error(new DebugException(new Status(
IStatus.ERROR, Activator.PLUGIN_ID, DebugException.REQUEST_FAILED,
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
index 4940551ee..b6892e5fe 100644
--- 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
@@ -1,10 +1,10 @@
/*******************************************************************************
* 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
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -30,11 +30,11 @@ import org.eclipse.ui.IWorkbenchPartSite;
* 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;
@@ -49,7 +49,7 @@ public class TCFDetailPane implements IDetailPane {
source_viewer.setEditable(false);
Control control = source_viewer.getControl();
GridData gd = new GridData(GridData.FILL_BOTH);
- control.setLayoutData(gd);
+ control.setLayoutData(gd);
display = control.getDisplay();
return control;
}
@@ -81,7 +81,7 @@ public class TCFDetailPane implements IDetailPane {
}
});
}
-
+
private String getDetailText(ArrayList<TCFNode> nodes, Runnable done) {
if (!TCFNode.validateNodes(nodes, done)) return null;
StringBuffer bf = new StringBuffer();
@@ -94,7 +94,7 @@ public class TCFDetailPane implements IDetailPane {
}
return bf.toString();
}
-
+
public void dispose() {
if (source_viewer == null) return;
generation++;
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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFDetailPaneFactory.java
index 46d971560..5e36a8c01 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFDetailPaneFactory.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFDetailPaneFactory.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* 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
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFMemoryBlockRetrieval.java
index cca0c2ed8..980d2fd08 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFMemoryBlockRetrieval.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFMemoryBlockRetrieval.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* 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
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -39,22 +39,22 @@ import org.eclipse.tm.tcf.util.TCFDataCache;
* TCF memory block retrieval is based on TCF Memory service.
*/
class TCFMemoryBlockRetrieval implements IMemoryBlockRetrievalExtension {
-
+
private final TCFNodeExecContext exec_ctx;
-
+
private class MemoryBlock extends PlatformObject implements IMemoryBlockExtension {
-
+
private final String expression;
private final Set<Object> connections = new HashSet<Object>();
private final TCFDataCache<IExpressions.Expression> remote_expression;
private final TCFDataCache<IExpressions.Value> expression_value;
private final TCFDataCache<ISymbols.Symbol> expression_type;
-
+
private boolean disposed;
-
+
MemoryBlock(final String expression) {
this.expression = expression;
- final TCFLaunch launch = exec_ctx.getModel().getLaunch();
+ final TCFLaunch launch = exec_ctx.getModel().getLaunch();
final IChannel channel = launch.getChannel();
remote_expression = new TCFDataCache<IExpressions.Expression>(channel) {
@Override
@@ -364,7 +364,7 @@ class TCFMemoryBlockRetrieval implements IMemoryBlockRetrievalExtension {
return super.getAdapter(adapter);
}
}
-
+
TCFMemoryBlockRetrieval(TCFNodeExecContext exec_ctx) {
this.exec_ctx = exec_ctx;
}
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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModel.java
index 7bf3cd845..d23699e6e 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModel.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModel.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -18,6 +18,7 @@ import java.util.List;
import java.util.Map;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.debug.core.ILaunch;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.commands.IDisconnectHandler;
@@ -45,6 +46,7 @@ import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxyFactor
import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelSelectionPolicy;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelSelectionPolicyFactory;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
+import org.eclipse.debug.ui.DebugUITools;
import org.eclipse.debug.ui.IDebugUIConstants;
import org.eclipse.debug.ui.IDebugView;
import org.eclipse.debug.ui.ISourcePresentation;
@@ -63,6 +65,8 @@ import org.eclipse.debug.ui.sourcelookup.ISourceDisplay;
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.StructuredViewer;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.BusyIndicator;
@@ -110,27 +114,27 @@ public class TCFModel implements IElementContentProvider, IElementLabelProvider,
private final TCFLaunch launch;
private final Display display;
-
+
private final List<ISuspendTriggerListener> suspend_trigger_listeners =
new LinkedList<ISuspendTriggerListener>();
-
+
private int suspend_trigger_generation;
-
+
private final Map<IPresentationContext,TCFModelProxy> model_proxies =
new HashMap<IPresentationContext,TCFModelProxy>();
-
+
private final Map<String,TCFNode> id2node = new HashMap<String,TCFNode>();
-
+
@SuppressWarnings("unchecked")
private final Map<Class,Object> commands = new HashMap<Class,Object>();
-
+
private final Map<String,IMemoryBlockRetrievalExtension> mem_retrieval =
new HashMap<String,IMemoryBlockRetrievalExtension>();
-
+
private class Console {
final IOConsole console;
final Map<Integer,IOConsoleOutputStream> out;
-
+
Console(final IOConsole console) {
this.console = console;
out = new HashMap<Integer,IOConsoleOutputStream>();
@@ -157,7 +161,7 @@ public class TCFModel implements IElementContentProvider, IElementLabelProvider,
t.setName("TCF Launch Console Input");
t.start();
}
-
+
void close() {
for (IOConsoleOutputStream stream : out.values()) {
try {
@@ -178,15 +182,15 @@ public class TCFModel implements IElementContentProvider, IElementLabelProvider,
private Console console;
- private static final Map<ILaunchConfiguration,IEditorInput> editor_not_found =
+ private static final Map<ILaunchConfiguration,IEditorInput> editor_not_found =
new HashMap<ILaunchConfiguration,IEditorInput>();
-
+
private final Map<String,Map<String,TCFDataCache<ISymbols.Symbol>>> symbols =
new HashMap<String,Map<String,TCFDataCache<ISymbols.Symbol>>>();
-
+
private final Map<String,Map<String,TCFDataCache<String[]>>> symbol_children =
new HashMap<String,Map<String,TCFDataCache<String[]>>>();
-
+
private final IModelSelectionPolicyFactory model_selection_factory = new IModelSelectionPolicyFactory() {
public IModelSelectionPolicy createModelSelectionPolicyAdapter(
@@ -250,7 +254,7 @@ public class TCFModel implements IElementContentProvider, IElementLabelProvider,
};
private final IRunControl.RunControlListener run_listener = new IRunControl.RunControlListener() {
-
+
public void containerResumed(String[] context_ids) {
for (int i = 0; i < context_ids.length; i++) {
TCFNode node = getNode(context_ids[i]);
@@ -274,7 +278,7 @@ public class TCFModel implements IElementContentProvider, IElementLabelProvider,
((TCFNodeExecContext)node).onContextSuspended(pc, reason, params);
}
fireModelChanged();
- runSuspendTrigger();
+ runSuspendTrigger(node);
}
public void contextAdded(IRunControl.RunControlContext[] contexts) {
@@ -336,12 +340,7 @@ public class TCFModel implements IElementContentProvider, IElementLabelProvider,
setDebugViewSelection(context, false);
}
fireModelChanged();
- runSuspendTrigger();
- display.asyncExec(new Runnable() {
- public void run() {
- Activator.getAnnotationManager().onContextSuspended(TCFModel.this, context);
- }
- });
+ runSuspendTrigger(node);
}
};
@@ -364,7 +363,7 @@ public class TCFModel implements IElementContentProvider, IElementLabelProvider,
fireModelChanged();
}
};
-
+
private final IProcesses.ProcessesListener prs_listener = new IProcesses.ProcessesListener() {
public void exited(String process_id, int exit_code) {
@@ -372,7 +371,7 @@ public class TCFModel implements IElementContentProvider, IElementLabelProvider,
if (prs != null && process_id.equals(prs.getID())) onLastContextRemoved();
}
};
-
+
TCFModel(TCFLaunch launch) {
this.launch = launch;
display = PlatformUI.getWorkbench().getDisplay();
@@ -444,7 +443,7 @@ public class TCFModel implements IElementContentProvider, IElementLabelProvider,
refreshLaunchView();
assert id2node.size() == 0;
}
-
+
void onProcessOutput(String process_id, final int stream_id, byte[] data) {
try {
IProcesses.ProcessContext prs = launch.getProcessContext();
@@ -498,7 +497,7 @@ public class TCFModel implements IElementContentProvider, IElementLabelProvider,
Activator.log("Cannot write to console", x);
}
}
-
+
void onContextActionsStart() {
}
@@ -522,7 +521,7 @@ public class TCFModel implements IElementContentProvider, IElementLabelProvider,
}
});
}
-
+
private void onContextRemoved(final String[] context_ids) {
boolean close_channel = false;
for (String id : context_ids) {
@@ -546,7 +545,7 @@ public class TCFModel implements IElementContentProvider, IElementLabelProvider,
}
});
}
-
+
private void onLastContextRemoved() {
Protocol.invokeLater(1000, new Runnable() {
public void run() {
@@ -572,7 +571,7 @@ public class TCFModel implements IElementContentProvider, IElementLabelProvider,
refreshLaunchView();
}
}
-
+
void dispose() {
if (console != null) {
display.asyncExec(new Runnable() {
@@ -599,7 +598,7 @@ public class TCFModel implements IElementContentProvider, IElementLabelProvider,
id2node.remove(id);
mem_retrieval.remove(id);
}
-
+
void fireModelChanged() {
assert Protocol.isDispatchThread();
if (launch.hasPendingContextActions()) return;
@@ -624,7 +623,7 @@ public class TCFModel implements IElementContentProvider, IElementLabelProvider,
assert Protocol.isDispatchThread();
return id2node.get(id);
}
-
+
public TCFDataCache<ISymbols.Symbol> getSymbolInfoCache(String mem_id, final String sym_id) {
Map<String,TCFDataCache<ISymbols.Symbol>> m = symbols.get(mem_id);
if (m == null) symbols.put(mem_id, m = new HashMap<String,TCFDataCache<ISymbols.Symbol>>());
@@ -710,7 +709,7 @@ public class TCFModel implements IElementContentProvider, IElementLabelProvider,
for (int i = 0; i < updates.length; i++) {
Object o = updates[i].getElement();
if (o instanceof TCFLaunch) {
- if (launch_node != null) {
+ if (launch_node != null) {
launch_node.update(updates[i]);
}
else {
@@ -747,23 +746,23 @@ public class TCFModel implements IElementContentProvider, IElementLabelProvider,
public String getColumnPresentationId(IPresentationContext context, Object element) {
if (IDebugUIConstants.ID_REGISTER_VIEW.equals(context.getId())) {
- return TCFColumnPresentationRegister.PRESENTATION_ID;
+ return TCFColumnPresentationRegister.PRESENTATION_ID;
}
if (IDebugUIConstants.ID_VARIABLE_VIEW.equals(context.getId())) {
- return TCFColumnPresentationExpression.PRESENTATION_ID;
+ return TCFColumnPresentationExpression.PRESENTATION_ID;
}
if (IDebugUIConstants.ID_EXPRESSION_VIEW.equals(context.getId())) {
- return TCFColumnPresentationExpression.PRESENTATION_ID;
+ return TCFColumnPresentationExpression.PRESENTATION_ID;
}
return null;
}
-
+
public void setDebugViewSelection(final String node_id, boolean initial_selection) {
assert Protocol.isDispatchThread();
if (initial_selection && debug_view_selection_set) return;
debug_view_selection_set = true;
final int cnt = ++debug_view_selection_cnt;
- Protocol.invokeLater(200, new Runnable() {
+ Protocol.invokeLater(100, new Runnable() {
public void run() {
TCFNode node = getNode(node_id);
if (node == null) return;
@@ -790,14 +789,25 @@ public class TCFModel implements IElementContentProvider, IElementLabelProvider,
}
});
}
-
+
/**
* Reveal source code associated with given model element.
* The method is part of ISourceDisplay interface.
* The method is normally called from SourceLookupService.
*/
- public void displaySource(final Object element, final IWorkbenchPage page, boolean forceSourceLookup) {
+ public void displaySource(Object model_element, final IWorkbenchPage page, boolean forceSourceLookup) {
final int cnt = ++display_source_cnt;
+ /* Because of racing in Eclipse Debug infrastructure, 'model_element' value can be invalid.
+ * As a workaround, get current debug view selection.
+ */
+ if (page != null) {
+ ISelection context = DebugUITools.getDebugContextManager().getContextService(page.getWorkbenchWindow()).getActiveContext();
+ if (context instanceof IStructuredSelection) {
+ IStructuredSelection selection = (IStructuredSelection)context;
+ if (!selection.isEmpty()) model_element = selection.getFirstElement();
+ }
+ }
+ final Object element = model_element;
Protocol.invokeLater(new Runnable() {
public void run() {
if (cnt != display_source_cnt) return;
@@ -852,7 +862,7 @@ public class TCFModel implements IElementContentProvider, IElementLabelProvider,
}
if (editor_input != null) {
editor_id = presentation.getEditorId(editor_input, source_element);
- }
+ }
line = src_ref.area.start_line;
}
}
@@ -865,7 +875,7 @@ public class TCFModel implements IElementContentProvider, IElementLabelProvider,
}
});
}
-
+
private void displaySource(final int cnt,
final String id, final IEditorInput input, final IWorkbenchPage page,
final String exe_id, final boolean top_frame, final int line) {
@@ -876,7 +886,7 @@ public class TCFModel implements IElementContentProvider, IElementLabelProvider,
IRegion region = null;
if (input != null && id != null && page != null) {
IEditorPart editor = openEditor(input, id, page);
- if (editor instanceof ITextEditor) {
+ if (editor instanceof ITextEditor) {
text_editor = (ITextEditor)editor;
}
else {
@@ -892,7 +902,7 @@ public class TCFModel implements IElementContentProvider, IElementLabelProvider,
}
});
}
-
+
private void refreshLaunchView() {
final Throwable error = launch.getError();
if (error != null) launch.setError(null);
@@ -911,9 +921,9 @@ public class TCFModel implements IElementContentProvider, IElementLabelProvider,
if (error != null) showMessageBox("TCF Launch Error", error);
}
}
-
+
/*
- * Show error message box in active workbench window.
+ * Show error message box in active workbench window.
* @param title - message box title.
* @param error - error to be shown.
*/
@@ -949,10 +959,10 @@ public class TCFModel implements IElementContentProvider, IElementLabelProvider,
}
});
}
-
+
/*
* Open an editor for given editor input.
- * @param input - IEditorInput representing a source file to be shown in the editor
+ * @param input - IEditorInput representing a source file to be shown in the editor
* @param id - editor type ID
* @param page - workbench page that will contain the editor
* @return - IEditorPart if the editor was opened successfully, or null otherwise.
@@ -970,10 +980,10 @@ public class TCFModel implements IElementContentProvider, IElementLabelProvider,
}
}
}
- };
+ };
BusyIndicator.showWhile(display, r);
return editor[0];
- }
+ }
/*
* Returns the line information for the given line in the given editor
@@ -1006,9 +1016,9 @@ public class TCFModel implements IElementContentProvider, IElementLabelProvider,
public synchronized void removeSuspendTriggerListener(ISuspendTriggerListener listener) {
suspend_trigger_listeners.remove(listener);
- }
-
- private synchronized void runSuspendTrigger() {
+ }
+
+ private synchronized void runSuspendTrigger(final TCFNode node) {
final int generation = ++suspend_trigger_generation;
final ISuspendTriggerListener[] listeners = suspend_trigger_listeners.toArray(
new ISuspendTriggerListener[suspend_trigger_listeners.size()]);
@@ -1020,12 +1030,12 @@ public class TCFModel implements IElementContentProvider, IElementLabelProvider,
}
for (final ISuspendTriggerListener listener : listeners) {
try {
- listener.suspended(launch, null);
+ listener.suspended(launch, node);
}
catch (Throwable x) {
Activator.log(x);
- };
- }
+ }
+ }
}
});
}
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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModelManager.java
index 492f60801..2d4026570 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModelManager.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModelManager.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -26,7 +26,7 @@ public class TCFModelManager {
private final Map<TCFLaunch,TCFModel> models = new HashMap<TCFLaunch,TCFModel>();
private final TCFLaunch.Listener tcf_launch_listener = new TCFLaunch.Listener() {
-
+
public void onCreated(TCFLaunch launch) {
assert Protocol.isDispatchThread();
assert models.get(launch) == null;
@@ -66,7 +66,7 @@ public class TCFModelManager {
};
private final ILaunchesListener debug_launch_listener = new ILaunchesListener() {
-
+
public void launchesAdded(final ILaunch[] launches) {
}
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
index f2023ffc2..355295120 100644
--- 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
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -34,15 +34,15 @@ 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);
}
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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModelProxy.java
index ff840b17f..95e09937a 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModelProxy.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModelProxy.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -23,7 +23,7 @@ import org.eclipse.jface.viewers.Viewer;
import org.eclipse.tm.tcf.protocol.Protocol;
public class TCFModelProxy extends AbstractModelProxy implements IModelProxy {
-
+
private static final int CONTENT_FLAGS =
IModelDelta.ADDED | IModelDelta.REMOVED |
IModelDelta.REPLACED | IModelDelta.INSERTED |
@@ -31,7 +31,7 @@ public class TCFModelProxy extends AbstractModelProxy implements IModelProxy {
private final TCFModel model;
private final Map<TCFNode,Integer> deltas = new HashMap<TCFNode,Integer>();
-
+
TCFModelProxy(TCFModel model) {
this.model = model;
}
@@ -47,7 +47,7 @@ public class TCFModelProxy extends AbstractModelProxy implements IModelProxy {
if (p != null) model.onProxyDisposed(p);
super.dispose();
}
-
+
void addDelta(TCFNode node, int flags) {
if (flags != 0) {
Integer delta = deltas.get(node);
@@ -59,11 +59,11 @@ public class TCFModelProxy extends AbstractModelProxy implements IModelProxy {
}
}
}
-
+
Viewer getProxyViewer() {
return getViewer();
}
-
+
private ModelDelta makeDelta(ModelDelta root, Map<TCFNode,ModelDelta> map, TCFNode node, int flags) {
boolean content_only = (flags & ~CONTENT_FLAGS) == 0;
ModelDelta delta = map.get(node);
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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModelSelectionPolicy.java
index 883b869e0..fce5e1472 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModelSelectionPolicy.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModelSelectionPolicy.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -18,13 +18,13 @@ import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.tm.tcf.util.TCFTask;
class TCFModelSelectionPolicy implements IModelSelectionPolicy {
-
+
private final TCFModel model;
-
+
TCFModelSelectionPolicy(TCFModel model) {
this.model = model;
}
-
+
public boolean contains(ISelection selection, IPresentationContext context) {
if (selection instanceof IStructuredSelection) {
IStructuredSelection ss = (IStructuredSelection)selection;
@@ -45,7 +45,7 @@ class TCFModelSelectionPolicy implements IModelSelectionPolicy {
}
return false;
}
-
+
private boolean isSuspended(final TCFNode node) {
return new TCFTask<Boolean>() {
public void run() {
@@ -66,7 +66,7 @@ class TCFModelSelectionPolicy implements IModelSelectionPolicy {
}
public boolean overrides(ISelection existing, ISelection candidate, IPresentationContext context) {
- if (IDebugUIConstants.ID_DEBUG_VIEW.equals(context.getId())) {
+ if (IDebugUIConstants.ID_DEBUG_VIEW.equals(context.getId())) {
if (existing instanceof IStructuredSelection && candidate instanceof IStructuredSelection) {
Object el_existing = ((IStructuredSelection)existing).getFirstElement();
Object el_candidate = ((IStructuredSelection)candidate).getFirstElement();
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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNode.java
index 49e0deda7..8f08a8d50 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNode.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNode.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -77,7 +77,7 @@ public abstract class TCFNode extends PlatformObject implements Comparable<TCFNo
}
disposed = true;
}
-
+
/**
* A child node is being disposed.
* The child should be removed from this node children lists.
@@ -95,7 +95,7 @@ public abstract class TCFNode extends PlatformObject implements Comparable<TCFNo
public final boolean isDisposed() {
return disposed;
}
-
+
/**
* Get TCFModel that owns this node.
* @return TCFModel object
@@ -103,7 +103,7 @@ public abstract class TCFNode extends PlatformObject implements Comparable<TCFNo
public TCFModel getModel() {
return model;
}
-
+
/**
* Get TCF ID of the node.
* @return TCF ID
@@ -138,7 +138,7 @@ public abstract class TCFNode extends PlatformObject implements Comparable<TCFNo
assert Protocol.isDispatchThread();
return parent;
}
-
+
/**
* Get index of a node in this node children list
* @param p - presentation context
@@ -147,7 +147,7 @@ public abstract class TCFNode extends PlatformObject implements Comparable<TCFNo
public int getNodeIndex(IPresentationContext p, TCFNode n) {
return -1;
}
-
+
/**
* Get children count of the node.
* @param p - presentation context
@@ -165,7 +165,7 @@ public abstract class TCFNode extends PlatformObject implements Comparable<TCFNo
public BigInteger getAddress() {
return null;
}
-
+
/**
* Retrieve children count for a presentation context.
* @param result - children count update request.
@@ -254,7 +254,7 @@ public abstract class TCFNode extends PlatformObject implements Comparable<TCFNo
}
};
}
-
+
/**
* Retrieve children count for a presentation context.
* The node is validated before calling this method,
@@ -265,7 +265,7 @@ public abstract class TCFNode extends PlatformObject implements Comparable<TCFNo
protected void getData(IChildrenCountUpdate result) {
result.setChildCount(0);
}
-
+
/**
* Retrieve children for a presentation context.
* The node is validated before calling this method,
@@ -275,7 +275,7 @@ public abstract class TCFNode extends PlatformObject implements Comparable<TCFNo
*/
protected void getData(IChildrenUpdate result) {
}
-
+
/**
* Check if the node has children in a presentation context.
* The node is validated before calling this method,
@@ -286,7 +286,7 @@ public abstract class TCFNode extends PlatformObject implements Comparable<TCFNo
protected void getData(IHasChildrenUpdate result) {
result.setHasChilren(false);
}
-
+
/**
* Retrieve node label for a presentation context.
* The node is validated before calling this method,
@@ -298,7 +298,7 @@ public abstract class TCFNode extends PlatformObject implements Comparable<TCFNo
result.setImageDescriptor(ImageCache.getImageDescriptor(getImageName()), 0);
result.setLabel(id, 0);
}
-
+
/**
* Create and post ModelDelta for changes in this node.
* @param flags - description of what has changed: IModelDelta.ADDED, IModelDelta.REMOVED, etc.
@@ -309,7 +309,7 @@ public abstract class TCFNode extends PlatformObject implements Comparable<TCFNo
if (f != 0) p.addDelta(this, f);
}
}
-
+
/**
* Return bit set of model delta flags relevant for this node in given presentation context.
* Sub-classes are supposed to override this method.
@@ -322,7 +322,7 @@ public abstract class TCFNode extends PlatformObject implements Comparable<TCFNo
/*--------------------------------------------------------------------------------------*/
/* Node data retrieval state machine */
-
+
/**
* Validate node - retrieve and put into a cache missing data from remote peer.
* The method should initiate retrieval of all data needed by TCFNode.update() methods.
@@ -332,19 +332,19 @@ public abstract class TCFNode extends PlatformObject implements Comparable<TCFNo
* Note: activation of call-back does not mean all data is retrieved,
* it only means that node state changed, client should call validateNode() again,
* until the method returns true.
- * @param done - call-back object to call when node state changes.
+ * @param done - call-back object to call when node state changes.
* @return true if the node is already valid, false if validation is started.
*/
public abstract boolean validateNode(Runnable done);
-
+
/**
* Clients can use this method to validate a collection of nodes.
* Validation of multiple nodes is expensive and should be avoided
* when possible.
- *
+ *
* Validation is performed in background, and 'done' call-back is
* activated when nodes state changes.
- *
+ *
* @param nodes
* @return true if all nodes are already valid, false if validation is started.
*/
@@ -356,7 +356,7 @@ public abstract class TCFNode extends PlatformObject implements Comparable<TCFNo
if (pending != null && !pending.validateNode(done)) return false;
return true;
}
-
+
/*--------------------------------------------------------------------------------------*/
/* Misc */
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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeArrayPartition.java
index d5972b586..6bd85d15f 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeArrayPartition.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeArrayPartition.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* 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
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -24,21 +24,21 @@ public class TCFNodeArrayPartition extends TCFNode {
private final int offs;
private final int size;
private final TCFChildrenSubExpressions children;
-
+
TCFNodeArrayPartition(TCFNode parent, int level, int offs, int size) {
super(parent, "AP" + level + "." + offs + "." + parent.id);
this.offs = offs;
this.size = size;
children = new TCFChildrenSubExpressions(this, level, offs, size);
}
-
+
@Override
void dispose() {
children.reset(null);
children.dispose();
super.dispose();
}
-
+
@Override
void dispose(String id) {
children.dispose(id);
@@ -47,7 +47,7 @@ public class TCFNodeArrayPartition extends TCFNode {
int getOffset() {
return offs;
}
-
+
int getSize() {
return size;
}
@@ -61,8 +61,8 @@ public class TCFNodeArrayPartition extends TCFNode {
protected void getData(IChildrenUpdate result) {
TCFNode[] arr = children.toArray();
int offset = 0;
- int r_offset = result.getOffset();
- int r_length = result.getLength();
+ int r_offset = result.getOffset();
+ int r_length = result.getLength();
for (TCFNode n : arr) {
if (offset >= r_offset && offset < r_offset + r_length) {
result.setChild(n, offset);
@@ -96,7 +96,7 @@ public class TCFNodeArrayPartition extends TCFNode {
}
}
}
-
+
@Override
int getRelevantModelDeltaFlags(IPresentationContext p) {
if (IDebugUIConstants.ID_EXPRESSION_VIEW.equals(p.getId()) ||
@@ -105,7 +105,7 @@ public class TCFNodeArrayPartition extends TCFNode {
}
return 0;
}
-
+
@Override
public boolean validateNode(Runnable done) {
TCFDataCache<?> pending = null;
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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeExecContext.java
index 7714bea88..1c08fd9e4 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeExecContext.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeExecContext.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -38,7 +38,7 @@ import org.eclipse.tm.tcf.util.TCFDataCache;
public class TCFNodeExecContext extends TCFNode {
private final int seq_no;
-
+
private final TCFChildrenExecContext children_exec;
private final TCFChildrenStackTrace children_stack;
@@ -50,7 +50,7 @@ public class TCFNodeExecContext extends TCFNode {
private final Map<BigInteger,TCFSourceRef> line_info_cache;
private int resumed_cnt;
-
+
private static int seq_cnt;
TCFNodeExecContext(TCFNode parent, final String id) {
@@ -172,7 +172,7 @@ public class TCFNodeExecContext extends TCFNode {
void setMemoryContext(IMemory.MemoryContext ctx) {
mem_context.reset(ctx);
}
-
+
Map<BigInteger,TCFSourceRef> getLineInfoCache() {
return line_info_cache;
}
@@ -221,21 +221,21 @@ public class TCFNodeExecContext extends TCFNode {
if (s.suspend_pc == null) return null;
return new BigInteger(s.suspend_pc);
}
-
+
public TCFNodeStackFrame getTopFrame() {
assert Protocol.isDispatchThread();
if (!children_stack.isValid()) return null;
return children_stack.getTopFrame();
}
-
+
public TCFDataCache<TCFContextState> getState() {
return state;
}
-
+
public TCFChildrenStackTrace getStackTrace() {
return children_stack;
}
-
+
public TCFChildrenExecContext getChildren() {
return children_exec;
}
@@ -256,7 +256,7 @@ public class TCFNodeExecContext extends TCFNode {
if (!children_exec.isValid()) return -1;
return children_exec.getIndexOf(n);
}
-
+
@Override
public int getChildrenCount(IPresentationContext p) {
if (!run_context.isValid()) return -1;
@@ -315,8 +315,8 @@ public class TCFNodeExecContext extends TCFNode {
arr = children_exec.toArray();
}
int offset = 0;
- int r_offset = result.getOffset();
- int r_length = result.getLength();
+ int r_offset = result.getOffset();
+ int r_length = result.getLength();
for (TCFNode n : arr) {
if (offset >= r_offset && offset < r_offset + r_length) {
result.setChild(n, offset);
@@ -457,7 +457,7 @@ public class TCFNodeExecContext extends TCFNode {
}
});
}
-
+
void onChildResumedOrSuspended() {
IRunControl.RunControlContext ctx = run_context.getData();
if (ctx != null && ctx.isContainer()) addModelDelta(IModelDelta.STATE);
@@ -480,7 +480,7 @@ public class TCFNodeExecContext extends TCFNode {
public boolean validateNode(Runnable done) {
assert !disposed;
TCFDataCache<?> pending = null;
-
+
if (!mem_context.validate()) pending = mem_context;
if (!run_context.validate()) pending = run_context;
if (!prs_context.validate()) pending = prs_context;
@@ -503,13 +503,13 @@ public class TCFNodeExecContext extends TCFNode {
pending.wait(done);
return false;
}
-
+
TCFNodeStackFrame frame = children_stack.getTopFrame();
if (frame != null && !frame.validateNode(done)) return false;
-
+
return true;
}
-
+
// Validate children state for hasSuspendedChildren()
// Return TCFDataCache to wait for if validation is pending.
private TCFDataCache<?> validateChildrenState() {
@@ -564,7 +564,7 @@ public class TCFNodeExecContext extends TCFNode {
}
return super.getImageName();
}
-
+
@Override
public int compareTo(TCFNode n) {
if (n instanceof TCFNodeExecContext) {
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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeExpression.java
index 3e5913d11..e0be1e6be 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeExpression.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeExpression.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* 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
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -52,7 +52,7 @@ public class TCFNodeExpression extends TCFNode implements IElementEditor {
private final TCFDataCache<ISymbols.Symbol> type;
private final TCFChildrenSubExpressions children;
private int sort_pos;
-
+
private static int expr_cnt;
TCFNodeExpression(final TCFNode parent, final String script, final String field_id, final String var_id, final int index) {
@@ -98,7 +98,7 @@ public class TCFNodeExpression extends TCFNode implements IElementEditor {
String e = expression.getData().getExpression();
if (e == null) {
set(null, new Exception("Missing 'Expression' property"), null);
- return true;
+ return true;
}
set(null, null, e);
return true;
@@ -240,7 +240,7 @@ public class TCFNodeExpression extends TCFNode implements IElementEditor {
};
children = new TCFChildrenSubExpressions(this, 0, 0, 0);
}
-
+
@Override
void dispose() {
value.reset(null);
@@ -261,12 +261,12 @@ public class TCFNodeExpression extends TCFNode implements IElementEditor {
}
});
}
-
+
@Override
void dispose(String id) {
children.dispose(id);
}
-
+
void onSuspended() {
value.reset();
type.reset();
@@ -274,35 +274,35 @@ public class TCFNodeExpression extends TCFNode implements IElementEditor {
children.onSuspended();
addModelDelta(IModelDelta.STATE | IModelDelta.CONTENT);
}
-
+
String getScript() {
return script;
}
-
+
String getFieldID() {
return field_id;
}
-
+
int getIndex() {
return index;
}
-
+
void setSortPosition(int sort_pos) {
this.sort_pos = sort_pos;
}
-
+
TCFDataCache<String> getExpressionText() {
return text;
}
-
+
TCFDataCache<IExpressions.Value> getValue() {
return value;
}
-
+
TCFDataCache<ISymbols.Symbol> getType() {
return type;
}
-
+
private BigInteger toBigInteger(byte[] data, int offs, int size, boolean big_endian, boolean sign_extension) {
assert offs + size <= data.length;
byte[] temp = null;
@@ -323,7 +323,7 @@ public class TCFNodeExpression extends TCFNode implements IElementEditor {
}
return new BigInteger(temp);
}
-
+
private String toNumberString(int radix, ISymbols.Symbol t, byte[] data, int offs, int size, boolean big_endian) {
String s = null;
if (data == null) s = "N/A";
@@ -366,7 +366,7 @@ public class TCFNodeExpression extends TCFNode implements IElementEditor {
if (s == null) s = "N/A";
return s;
}
-
+
private String toNumberString(int radix) {
String s = null;
IExpressions.Value val = value.getData();
@@ -377,7 +377,7 @@ public class TCFNodeExpression extends TCFNode implements IElementEditor {
if (s == null) s = "...";
return s;
}
-
+
private void setLabel(ILabelUpdate result, String name, int col, int radix) {
String s = toNumberString(radix);
if (name == null) {
@@ -423,7 +423,7 @@ public class TCFNodeExpression extends TCFNode implements IElementEditor {
if (s == null) s = "N/A";
result.setLabel(s, col);
}
-
+
@Override
protected void getData(ILabelUpdate result) {
result.setImageDescriptor(ImageCache.getImageDescriptor(getImageName()), 0);
@@ -480,7 +480,7 @@ public class TCFNodeExpression extends TCFNode implements IElementEditor {
}
}
}
-
+
private void appendErrorText(StringBuffer bf, Throwable error) {
if (error == null) return;
bf.append("Exception: ");
@@ -495,7 +495,7 @@ public class TCFNodeExpression extends TCFNode implements IElementEditor {
error = cause;
}
}
-
+
private boolean appendArrayValueText(StringBuffer bf, int level, ISymbols.Symbol t,
byte[] data, int offs, int size, boolean big_endian, Runnable done) {
assert offs + size <= data.length;
@@ -547,7 +547,7 @@ public class TCFNodeExpression extends TCFNode implements IElementEditor {
if (level == 0) bf.append('\n');
return true;
}
-
+
private boolean appendCompositeValueText(StringBuffer bf, int level, ISymbols.Symbol t,
byte[] data, int offs, int size, boolean big_endian, Runnable done) {
TCFDataCache<String[]> c = model.getSymbolChildrenCache(t.getExeContextID(), t.getID());
@@ -577,7 +577,7 @@ public class TCFNodeExpression extends TCFNode implements IElementEditor {
bf.append('}');
return true;
}
-
+
private boolean appendValueText(StringBuffer bf, int level, ISymbols.Symbol t,
byte[] data, int offs, int size, boolean big_endian, Runnable done) {
if (data == null) return true;
@@ -636,7 +636,7 @@ public class TCFNodeExpression extends TCFNode implements IElementEditor {
}
return true;
}
-
+
String getDetailText(Runnable done) {
StringBuffer bf = new StringBuffer();
appendErrorText(bf, expression.getError());
@@ -671,8 +671,8 @@ public class TCFNodeExpression extends TCFNode implements IElementEditor {
protected void getData(IChildrenUpdate result) {
TCFNode[] arr = children.toArray();
int offset = 0;
- int r_offset = result.getOffset();
- int r_length = result.getLength();
+ int r_offset = result.getOffset();
+ int r_length = result.getLength();
for (TCFNode n : arr) {
if (offset >= r_offset && offset < r_offset + r_length) {
result.setChild(n, offset);
@@ -694,7 +694,7 @@ public class TCFNodeExpression extends TCFNode implements IElementEditor {
}
return 0;
}
-
+
@Override
public boolean validateNode(Runnable done) {
TCFDataCache<?> pending = null;
@@ -720,18 +720,18 @@ public class TCFNodeExpression extends TCFNode implements IElementEditor {
if (sort_pos > e.sort_pos) return +1;
return 0;
}
-
+
public CellEditor getCellEditor(IPresentationContext context, String column_id, Object element, Composite parent) {
assert element == this;
if (TCFColumnPresentationExpression.COL_NAME.equals(column_id) && script != null) {
return new TextCellEditor(parent);
- }
+ }
if (TCFColumnPresentationExpression.COL_HEX_VALUE.equals(column_id)) {
return new TextCellEditor(parent);
- }
+ }
if (TCFColumnPresentationExpression.COL_DEC_VALUE.equals(column_id)) {
return new TextCellEditor(parent);
- }
+ }
return null;
}
@@ -865,7 +865,7 @@ public class TCFNodeExpression extends TCFNode implements IElementEditor {
}.getE();
}
};
-
+
public ICellModifier getCellModifier(IPresentationContext context, Object element) {
assert element == this;
return cell_modifier;
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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeLaunch.java
index 48857dac7..f8779c235 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeLaunch.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeLaunch.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -23,8 +23,8 @@ import org.eclipse.tm.tcf.services.IRunControl;
public class TCFNodeLaunch extends TCFNode {
-
- private final TCFChildrenExecContext children;
+
+ private final TCFChildrenExecContext children;
TCFNodeLaunch(final TCFModel model) {
super(model);
@@ -52,7 +52,7 @@ public class TCFNodeLaunch extends TCFNode {
}
});
}
-
+
private boolean searchTopFrame(TCFNodeExecContext e, ArrayList<TCFNodeStackFrame> frames, Runnable r) {
if (!e.validateNode(r)) return false;
TCFNodeStackFrame f = e.getTopFrame();
@@ -90,7 +90,7 @@ public class TCFNodeLaunch extends TCFNode {
if (!children.isValid()) return -1;
return children.getIndexOf(n);
}
-
+
@Override
public int getChildrenCount(IPresentationContext p) {
if (!children.isValid()) return -1;
@@ -101,13 +101,13 @@ public class TCFNodeLaunch extends TCFNode {
protected void getData(IChildrenCountUpdate result) {
result.setChildCount(children.size());
}
-
+
@Override
protected void getData(IChildrenUpdate result) {
TCFNode[] arr = children.toArray();
int offset = 0;
- int r_offset = result.getOffset();
- int r_length = result.getLength();
+ int r_offset = result.getOffset();
+ int r_length = result.getLength();
for (TCFNode n : arr) {
if (offset >= r_offset && offset < r_offset + r_length) {
result.setChild(n, offset);
@@ -115,12 +115,12 @@ public class TCFNodeLaunch extends TCFNode {
offset++;
}
}
-
+
@Override
protected void getData(IHasChildrenUpdate result) {
result.setHasChilren(children.size() > 0);
}
-
+
void onContextAdded(IRunControl.RunControlContext context) {
children.onContextAdded(context);
}
@@ -128,7 +128,7 @@ public class TCFNodeLaunch extends TCFNode {
void onContextAdded(IMemory.MemoryContext context) {
children.onContextAdded(context);
}
-
+
int getContextCount() {
assert children.isValid();
return children.size();
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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeRegister.java
index 676367ea4..ae353f1ed 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeRegister.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeRegister.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -73,7 +73,7 @@ public class TCFNodeRegister extends TCFNode implements IElementEditor {
}
};
}
-
+
@Override
public void dispose() {
context.reset(null);
@@ -141,7 +141,7 @@ public class TCFNodeRegister extends TCFNode implements IElementEditor {
result.setLabel(id, 0);
}
}
-
+
private void setLabel(ILabelUpdate result, int col, int radix) {
IRegisters.RegistersContext ctx = context.getData();
Throwable error = value.getError();
@@ -165,7 +165,7 @@ public class TCFNodeRegister extends TCFNode implements IElementEditor {
}
}
}
-
+
private String toNumberString(int radix) {
IRegisters.RegistersContext ctx = context.getData();
byte[] data = value.getData();
@@ -227,7 +227,7 @@ public class TCFNodeRegister extends TCFNode implements IElementEditor {
value.reset();
addModelDelta(IModelDelta.STATE);
}
-
+
void onRegistersChanged() {
context.reset();
value.reset();
@@ -255,10 +255,10 @@ public class TCFNodeRegister extends TCFNode implements IElementEditor {
assert element == this;
if (TCFColumnPresentationRegister.COL_HEX_VALUE.equals(column_id)) {
return new TextCellEditor(parent);
- }
+ }
if (TCFColumnPresentationRegister.COL_DEC_VALUE.equals(column_id)) {
return new TextCellEditor(parent);
- }
+ }
return null;
}
@@ -356,7 +356,7 @@ public class TCFNodeRegister extends TCFNode implements IElementEditor {
}.getE();
}
};
-
+
public ICellModifier getCellModifier(IPresentationContext context, Object element) {
assert element == this;
return cell_modifier;
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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeStackFrame.java
index 1534bf51d..85f273bb8 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeStackFrame.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeStackFrame.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -40,7 +40,7 @@ public class TCFNodeStackFrame extends TCFNode {
private final TCFChildrenExpressions children_exps;
private final TCFDataCache<IStackTrace.StackTraceContext> stack_trace_context;
private final TCFDataCache<TCFSourceRef> line_info;
-
+
TCFNodeStackFrame(final TCFNodeExecContext parent, final String id) {
super(parent, id);
children_regs = new TCFChildrenRegisters(this);
@@ -139,11 +139,11 @@ public class TCFNodeStackFrame extends TCFNode {
assert Protocol.isDispatchThread();
return frame_no;
}
-
+
void setFrameNo(int frame_no) {
this.frame_no = frame_no;
}
-
+
public TCFDataCache<TCFSourceRef> getLineInfo() {
return line_info;
}
@@ -164,7 +164,7 @@ public class TCFNodeStackFrame extends TCFNode {
children_vars.dispose(id);
children_exps.dispose(id);
}
-
+
public TCFDataCache<IStackTrace.StackTraceContext> getStackTraceContext() {
return stack_trace_context;
}
@@ -182,7 +182,7 @@ public class TCFNodeStackFrame extends TCFNode {
if (frame_no == 0) return parent.getAddress();
return null;
}
-
+
public BigInteger getReturnAddress() {
assert Protocol.isDispatchThread();
if (!stack_trace_context.isValid()) return null;
@@ -194,7 +194,7 @@ public class TCFNodeStackFrame extends TCFNode {
}
return null;
}
-
+
@Override
public int getNodeIndex(IPresentationContext p, TCFNode n) {
if (IDebugUIConstants.ID_REGISTER_VIEW.equals(p.getId())) {
@@ -211,7 +211,7 @@ public class TCFNodeStackFrame extends TCFNode {
}
return 0;
}
-
+
@Override
public int getChildrenCount(IPresentationContext p) {
if (IDebugUIConstants.ID_REGISTER_VIEW.equals(p.getId())) {
@@ -261,8 +261,8 @@ public class TCFNodeStackFrame extends TCFNode {
arr = new TCFNode[0];
}
int offset = 0;
- int r_offset = result.getOffset();
- int r_length = result.getLength();
+ int r_offset = result.getOffset();
+ int r_length = result.getLength();
for (TCFNode n : arr) {
if (offset >= r_offset && offset < r_offset + r_length) {
result.setChild(n, offset);
@@ -342,7 +342,7 @@ public class TCFNodeStackFrame extends TCFNode {
children_exps.onSuspended();
addModelDelta(IModelDelta.STATE | IModelDelta.CONTENT);
}
-
+
void onRegistersChanged() {
children_regs.onRegistersChanged();
addModelDelta(IModelDelta.STATE | IModelDelta.CONTENT);
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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNumberFormat.java
index 63e04bab9..a2b31fd19 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNumberFormat.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNumberFormat.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* 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
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -16,7 +16,7 @@ public class TCFNumberFormat {
public static String isValidHexNumber(String s) {
int l = s.length();
- if (l == 0) return "Need at least one digit";
+ if (l == 0) return "Need at least one digit";
for (int i = 0; i < l; i++) {
char ch = s.charAt(i);
if (ch >= '0' && ch <= '9') continue;
@@ -26,14 +26,14 @@ public class TCFNumberFormat {
}
return null;
}
-
+
public static String isValidDecNumber(boolean fp, String s) {
int i = 0;
int l = s.length();
- if (l == 0) return "Need at least one digit";
+ if (l == 0) return "Need at least one digit";
char ch = s.charAt(i++);
if (ch == '-' || ch == '+') {
- if (i >= l) return "Need at least one digit";
+ if (i >= l) return "Need at least one digit";
ch = s.charAt(i++);
}
if (fp) {
@@ -55,10 +55,10 @@ public class TCFNumberFormat {
}
}
if (ch == 'e' || ch == 'E') {
- if (i >= l) return "Invalid exponent: need at least one digit";
+ if (i >= l) return "Invalid exponent: need at least one digit";
ch = s.charAt(i++);
if (ch == '-' || ch == '+') {
- if (i >= l) return "Invalid exponent: need at least one digit";
+ if (i >= l) return "Invalid exponent: need at least one digit";
ch = s.charAt(i++);
}
while (ch >= '0' && ch <= '9') {
@@ -70,7 +70,7 @@ public class TCFNumberFormat {
}
return "Decimal digit expected";
}
-
+
public static byte[] toByteArray(String s, int radix, boolean fp, int size, boolean signed, boolean big_endian) throws Exception {
byte[] bf = null;
if (!fp) {
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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFRunnable.java
index cbfbba5fd..8c3eace00 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFRunnable.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFRunnable.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -19,7 +19,7 @@ public abstract class TCFRunnable implements Runnable {
private final IRequest monitor;
private final Display display;
-
+
public TCFRunnable() {
monitor = null;
display = null;
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.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/trace/TraceView.java
index 66be5320f..58c4d7479 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/trace/TraceView.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/trace/TraceView.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -28,23 +28,23 @@ import org.eclipse.ui.part.ViewPart;
public class TraceView extends ViewPart implements Protocol.ChannelOpenListener {
-
+
private Composite parent;
private TabFolder tabs;
private Label no_data;
private final Map<TabItem,Page> tab2page = new HashMap<TabItem,Page>();
-
+
private class Page implements AbstractChannel.TraceListener {
final AbstractChannel channel;
-
+
private TabItem tab;
private Text text;
-
+
private final StringBuffer bf = new StringBuffer();
private int bf_line_cnt = 0;
private boolean closed;
-
+
private final Thread update_thread = new Thread() {
public void run() {
synchronized (Page.this) {
@@ -90,12 +90,12 @@ public class TraceView extends ViewPart implements Protocol.ChannelOpenListener
}
}
};
-
+
Page(AbstractChannel channel) {
this.channel = channel;
update_thread.start();
}
-
+
public void dispose() {
synchronized (this) {
closed = true;
@@ -221,10 +221,10 @@ public class TraceView extends ViewPart implements Protocol.ChannelOpenListener
public void setFocus() {
if (tabs != null) tabs.setFocus();
}
-
+
@Override
public void dispose() {
- final Page[] pages = tab2page.values().toArray(new Page[tab2page.size()]);
+ final Page[] pages = tab2page.values().toArray(new Page[tab2page.size()]);
Protocol.invokeAndWait(new Runnable() {
public void run() {
Protocol.removeChannelOpenListener(TraceView.this);
@@ -243,12 +243,12 @@ public class TraceView extends ViewPart implements Protocol.ChannelOpenListener
}
super.dispose();
}
-
+
public void onChannelOpen(final IChannel channel) {
if (!(channel instanceof AbstractChannel)) return;
AbstractChannel c = (AbstractChannel)channel;
IPeer rp = c.getRemotePeer();
- final String name = rp.getName();
+ final String name = rp.getName();
final String host = rp.getAttributes().get(IPeer.ATTR_IP_HOST);
final String port = rp.getAttributes().get(IPeer.ATTR_IP_PORT);
final Page p = new Page(c);
@@ -273,7 +273,7 @@ public class TraceView extends ViewPart implements Protocol.ChannelOpenListener
}
});
}
-
+
private void showTabs() {
boolean b = false;
if (no_data != null) {
@@ -287,7 +287,7 @@ public class TraceView extends ViewPart implements Protocol.ChannelOpenListener
}
if (b) parent.layout();
}
-
+
private void hideTabs() {
boolean b = false;
if (tabs != null) {
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/Activator.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/Activator.java
index b90c6b989..7ed7c16f7 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/Activator.java
+++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/Activator.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2009 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -56,16 +56,16 @@ public class Activator extends Plugin {
plugin = null;
super.stop(context);
}
-
+
/**
* Returns the shared instance
- *
+ *
* @return the shared instance
*/
public static Activator getDefault() {
return plugin;
}
-
+
public static TCFBreakpointsModel getBreakpointsModel() {
return bp_model;
}
@@ -84,5 +84,5 @@ public class Activator extends Plugin {
plugin.getLog().log(new Status(IStatus.ERROR,
plugin.getBundle().getSymbolicName(), IStatus.OK, msg, err));
}
- }
+ }
}
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFAction.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFAction.java
index 7e298146f..5c2d956b8 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFAction.java
+++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFAction.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* 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
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -21,7 +21,7 @@ import org.eclipse.tm.tcf.protocol.Protocol;
* it does not make sense to execute two step commands concurrently.
* If user requests actions faster then they are executed,
* actions are placed into a FIFO queue.
- *
+ *
* Clients are expected to implement run() method to perform the action job.
* When the job is done, client code should call done() method.
*/
@@ -29,7 +29,7 @@ public abstract class TCFAction implements Runnable {
protected final TCFLaunch launch;
protected final String context_id;
-
+
public TCFAction(TCFLaunch launch, String context_id) {
assert Protocol.isDispatchThread();
assert context_id != null;
@@ -37,7 +37,7 @@ public abstract class TCFAction implements Runnable {
this.context_id = context_id;
launch.addContextAction(this, context_id);
}
-
+
protected void done() {
assert Protocol.isDispatchThread();
launch.removeContextAction(this, context_id);
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFActionStepInto.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFActionStepInto.java
index b2595ae0b..40735ad34 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFActionStepInto.java
+++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFActionStepInto.java
@@ -20,7 +20,7 @@ public abstract class TCFActionStepInto extends TCFAction implements IRunControl
private final boolean src_step;
private final IRunControl rc = launch.getService(IRunControl.class);
-
+
private IRunControl.RunControlContext ctx;
private TCFDataCache<TCFContextState> state;
private TCFDataCache<TCFSourceRef> line_info;
@@ -28,15 +28,15 @@ public abstract class TCFActionStepInto extends TCFAction implements IRunControl
private BigInteger pc0;
private BigInteger pc1;
private int step_cnt;
-
+
protected boolean exited;
-
+
public TCFActionStepInto(TCFLaunch launch, IRunControl.RunControlContext ctx, boolean src_step) {
super(launch, ctx.getID());
this.ctx = ctx;
this.src_step = src_step;
}
-
+
protected abstract TCFDataCache<TCFContextState> getContextState();
protected abstract TCFDataCache<TCFSourceRef> getLineInfo();
protected abstract TCFDataCache<?> getStackTrace();
@@ -161,7 +161,7 @@ public abstract class TCFActionStepInto extends TCFAction implements IRunControl
exit(new Exception("Step into is not supported"));
}
}
-
+
private boolean isSameLine(ILineNumbers.CodeArea x, ILineNumbers.CodeArea y) {
if (x == null || y == null) return false;
if (x.start_line != y.start_line) return false;
@@ -169,7 +169,7 @@ public abstract class TCFActionStepInto extends TCFAction implements IRunControl
if (x.file != y.file && (x.file == null || !x.file.equals(y.file))) return false;
return true;
}
-
+
protected void exit(Throwable error) {
if (exited) return;
rc.removeListener(this);
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFActionStepOut.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFActionStepOut.java
index b6e64a286..d4c598c7f 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFActionStepOut.java
+++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFActionStepOut.java
@@ -16,27 +16,27 @@ import org.eclipse.tm.tcf.util.TCFDataCache;
public abstract class TCFActionStepOut extends TCFAction implements IRunControl.RunControlListener {
private static final long TIMEOUT = 10000;
-
+
private final IRunControl rc = launch.getService(IRunControl.class);
private final IBreakpoints bps = launch.getService(IBreakpoints.class);
-
+
private IRunControl.RunControlContext ctx;
private TCFDataCache<TCFContextState> state;
private int step_cnt;
private Map<String,Object> bp;
-
+
protected boolean exited;
public TCFActionStepOut(TCFLaunch launch, IRunControl.RunControlContext ctx) {
super(launch, ctx.getID());
this.ctx = ctx;
}
-
+
protected abstract TCFDataCache<TCFContextState> getContextState();
protected abstract TCFDataCache<?> getStackTrace();
protected abstract TCFDataCache<IStackTrace.StackTraceContext> getStackFrame();
protected abstract int getStackFrameIndex();
-
+
public void run() {
if (exited) return;
if (state == null) {
@@ -114,7 +114,7 @@ public abstract class TCFActionStepOut extends TCFAction implements IRunControl.
exit(new Exception("Step out is not supported"));
}
}
-
+
protected void exit(Throwable error) {
if (exited) return;
if (bp != null) {
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFActionStepOver.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFActionStepOver.java
index f262faa2b..0d4a28ff0 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFActionStepOver.java
+++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFActionStepOver.java
@@ -23,7 +23,7 @@ public abstract class TCFActionStepOver extends TCFAction implements IRunControl
private final boolean src_step;
private final IRunControl rc = launch.getService(IRunControl.class);
private final IBreakpoints bps = launch.getService(IBreakpoints.class);
-
+
private IRunControl.RunControlContext ctx;
private TCFDataCache<TCFContextState> state;
private TCFDataCache<TCFSourceRef> line_info;
@@ -32,21 +32,21 @@ public abstract class TCFActionStepOver extends TCFAction implements IRunControl
private BigInteger pc1;
private int step_cnt;
private Map<String,Object> bp;
-
+
protected boolean exited;
-
+
public TCFActionStepOver(TCFLaunch launch, IRunControl.RunControlContext ctx, boolean src_step) {
super(launch, ctx.getID());
this.ctx = ctx;
this.src_step = src_step;
}
-
+
protected abstract TCFDataCache<TCFContextState> getContextState();
protected abstract TCFDataCache<TCFSourceRef> getLineInfo();
protected abstract TCFDataCache<?> getStackTrace();
protected abstract TCFDataCache<IStackTrace.StackTraceContext> getStackFrame();
protected abstract int getStackFrameIndex();
-
+
public void run() {
if (exited) return;
if (state == null) {
@@ -212,7 +212,7 @@ public abstract class TCFActionStepOver extends TCFAction implements IRunControl
exit(new Exception("Step over is not supported"));
}
}
-
+
protected void exit(Throwable error) {
if (exited) return;
if (bp != null) {
@@ -270,7 +270,7 @@ public abstract class TCFActionStepOver extends TCFAction implements IRunControl
exit(null);
}
}
-
+
private boolean isSameLine(ILineNumbers.CodeArea x, ILineNumbers.CodeArea y) {
if (x == null || y == null) return false;
if (x.start_line != y.start_line) return false;
@@ -278,7 +278,7 @@ public abstract class TCFActionStepOver extends TCFAction implements IRunControl
if (x.file != y.file && (x.file == null || !x.file.equals(y.file))) return false;
return true;
}
-
+
private boolean isMyBreakpoint(String pc, String reason) {
if (bp == null) return false;
if (pc == null) return false;
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFLaunchDelegate.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFLaunchDelegate.java
index dfd78ecc3..1322814da 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFLaunchDelegate.java
+++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFLaunchDelegate.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2009 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -40,14 +40,14 @@ public class TCFLaunchDelegate extends LaunchConfigurationDelegate {
int cnt;
public void run() {
// Need to delay at least one dispatch cycle to work around
- // a possible racing between thread that calls getLaunch() and
- // the process of activation of other TCF plug-ins.
+ // a possible racing between thread that calls getLaunch() and
+ // the process of activation of other TCF plug-ins.
if (cnt++ < 2) Protocol.invokeLater(this);
else done(new TCFLaunch(configuration, mode));
}
}.getE();
}
-
+
public void launch(final ILaunchConfiguration configuration, final String mode,
final ILaunch launch, final IProgressMonitor monitor) throws CoreException {
String local_id = null;
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFLocalAgent.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFLocalAgent.java
index 0f13f44dd..cd195a841 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFLocalAgent.java
+++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFLocalAgent.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2009 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -32,17 +32,17 @@ import org.osgi.framework.Bundle;
/**
* This class checks that TCF Agent is running on the local host,
- * and starts a new instance of the agent if it cannot be located.
+ * and starts a new instance of the agent if it cannot be located.
*/
public class TCFLocalAgent {
-
+
private static final String
AGENT_HOST = "127.0.0.1",
AGENT_PORT = "1534";
-
+
private static Process agent;
private static boolean destroed;
-
+
private static String getAgentFileName() {
String os = System.getProperty("os.name");
String arch = System.getProperty("os.arch");
@@ -56,7 +56,7 @@ public class TCFLocalAgent {
if (os.equals("Linux")) os = "GNU/Linux";
return "agent/" + os + "/" + arch + "/" + fnm;
}
-
+
static synchronized String runLocalAgent() throws CoreException {
if (destroed) return null;
String id = getLocalAgentID();
@@ -129,13 +129,13 @@ public class TCFLocalAgent {
"Cannot start local agent: file not available: " + fnm,
null));
}
-
+
private static boolean isLocalAgent(IPeer p) {
String host = p.getAttributes().get(IPeer.ATTR_IP_HOST);
String port = p.getAttributes().get(IPeer.ATTR_IP_PORT);
return AGENT_HOST.equals(host) && AGENT_PORT.equals(port);
}
-
+
public static synchronized String getLocalAgentID() {
return new TCFTask<String>() {
public void run() {
@@ -150,7 +150,7 @@ public class TCFLocalAgent {
}
}.getE();
}
-
+
private static String waitAgentReady() {
return new TCFTask<String>() {
public void run() {
@@ -187,7 +187,7 @@ public class TCFLocalAgent {
}
}.getE();
}
-
+
public static synchronized void destroy() {
if (agent != null) {
destroed = true;
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
index 2e044bd0b..1d7ad8d84 100644
--- 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
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFSourceLookupParticipant.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFSourceLookupParticipant.java
index 5ef55e5ee..70ce05485 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFSourceLookupParticipant.java
+++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFSourceLookupParticipant.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFSourcePathComputerDelegate.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFSourcePathComputerDelegate.java
index 02bca97fd..1cdcff8a3 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFSourcePathComputerDelegate.java
+++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFSourcePathComputerDelegate.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFUserDefPeer.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFUserDefPeer.java
index 1a757ad49..5f1d70cfb 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFUserDefPeer.java
+++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFUserDefPeer.java
@@ -20,14 +20,14 @@ import org.eclipse.tm.tcf.protocol.Protocol;
* The class represents manually configured (user defined) TCF peers (targets).
* Unlike auto-discovered peers, manually configured ones are persistent -
* they exist until explicitly deleted by user.
- * Eclipse plug-in state storage is used to keep the configuration data.
+ * Eclipse plug-in state storage is used to keep the configuration data.
*/
public class TCFUserDefPeer extends AbstractPeer {
public TCFUserDefPeer(Map<String, String> attrs) {
super(attrs);
}
-
+
/**
* Load manually configured peers from persistent storage.
*/
@@ -57,7 +57,7 @@ public class TCFUserDefPeer extends AbstractPeer {
Activator.log("Cannot read peer list", x);
}
}
-
+
/**
* Save manually configured peers to persistent storage.
*/
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/ITCFBreakpointListener.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/ITCFBreakpointListener.java
index 8e4cb24b2..c214c872a 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/ITCFBreakpointListener.java
+++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/ITCFBreakpointListener.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/ITCFConstants.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/ITCFConstants.java
index acc0a9b68..d1ea95f94 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/ITCFConstants.java
+++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/ITCFConstants.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFBreakpoint.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFBreakpoint.java
index 387fb170a..adf7b6f8a 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFBreakpoint.java
+++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFBreakpoint.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -33,9 +33,9 @@ import org.eclipse.tm.tcf.services.IBreakpoints;
public class TCFBreakpoint extends Breakpoint {
public static final String MARKER_TYPE = "org.eclipse.tm.tcf.debug.breakpoint.marker";
-
+
private static long last_id = 0;
-
+
private static String createNewID() {
assert Protocol.isDispatchThread();
long id = System.currentTimeMillis();
@@ -43,9 +43,9 @@ public class TCFBreakpoint extends Breakpoint {
last_id = id;
return Long.toHexString(id);
}
-
+
private String text;
-
+
public TCFBreakpoint() {
}
@@ -79,7 +79,7 @@ public class TCFBreakpoint extends Breakpoint {
public String getModelIdentifier() {
return ITCFConstants.ID_TCF_DEBUG_MODEL;
}
-
+
public String getText() {
if (text == null) {
IMarker marker = getMarker();
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFBreakpointsModel.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFBreakpointsModel.java
index a9db30408..8064d13ec 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFBreakpointsModel.java
+++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFBreakpointsModel.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -39,18 +39,18 @@ import org.eclipse.tm.tcf.services.IBreakpoints;
/**
* TCFBreakpointsModel class handles breakpoints for all active TCF launches.
- * It downloads initial set of breakpoint data when launch is activated,
+ * It downloads initial set of breakpoint data when launch is activated,
* listens for Eclipse breakpoint manager events and propagates breakpoint changes to TCF targets.
*/
public class TCFBreakpointsModel implements IBreakpointListener, IBreakpointManagerListener {
private final IBreakpointManager bp_manager = DebugPlugin.getDefault().getBreakpointManager();
-
+
public TCFBreakpointsModel() {
bp_manager.addBreakpointListener(this);
bp_manager.addBreakpointManagerListener(this);
}
-
+
public static TCFBreakpointsModel getBreakpointsModel() {
return Activator.getBreakpointsModel();
}
@@ -59,12 +59,12 @@ public class TCFBreakpointsModel implements IBreakpointListener, IBreakpointMana
bp_manager.removeBreakpointListener(this);
bp_manager.removeBreakpointManagerListener(this);
}
-
+
public boolean isSupported(IChannel channel, IBreakpoint bp) {
// TODO: implement per-channel breakpoint filtering
return true;
}
-
+
public String getBreakpointID(IBreakpoint bp) throws CoreException {
IMarker marker = bp.getMarker();
String id = (String)marker.getAttributes().get(ITCFConstants.ID_TCF_DEBUG_MODEL + '.' + IBreakpoints.PROP_ID);
@@ -73,7 +73,7 @@ public class TCFBreakpointsModel implements IBreakpointListener, IBreakpointMana
if (id == null) return null;
return id + ':' + marker.getId();
}
-
+
@SuppressWarnings("unchecked")
public void downloadBreakpoints(final IChannel channel, final Runnable done)
throws IOException, CoreException {
@@ -165,15 +165,15 @@ public class TCFBreakpointsModel implements IBreakpointListener, IBreakpointMana
Activator.log("Unhandled exception in breakpoint listener", x);
}
}
-
+
private abstract class BreakpointUpdate implements Runnable {
-
+
private final IBreakpoint breakpoint;
private final ILaunch[] launches;
private final Map<String,Object> marker_attrs;
private final String marker_file;
private final String marker_id;
-
+
IBreakpoints service;
IBreakpoints.DoneCommand done;
Map<String,Object> tcf_attrs;
@@ -186,13 +186,13 @@ public class TCFBreakpointsModel implements IBreakpointListener, IBreakpointMana
marker_id = getBreakpointID(breakpoint);
launches = DebugPlugin.getDefault().getLaunchManager().getLaunches();
}
-
+
synchronized void exec() throws InterruptedException {
assert !Protocol.isDispatchThread();
Protocol.invokeLater(this);
wait();
}
-
+
public void run() {
if (marker_id != null) {
tcf_attrs = toBreakpointAttributes(marker_id, marker_file, marker_attrs);
@@ -222,7 +222,7 @@ public class TCFBreakpointsModel implements IBreakpointListener, IBreakpointMana
}
});
};
-
+
abstract void update();
}
@@ -246,7 +246,7 @@ public class TCFBreakpointsModel implements IBreakpointListener, IBreakpointMana
Activator.log("Unhandled exception in breakpoint listener", x);
}
}
-
+
@SuppressWarnings("unchecked")
private Set<String> calcMarkerDeltaKeys(IMarker marker, IMarkerDelta delta) throws CoreException {
assert delta.getKind() == IResourceDelta.CHANGED;
@@ -310,7 +310,7 @@ public class TCFBreakpointsModel implements IBreakpointListener, IBreakpointMana
Activator.log("Unhandled exception in breakpoint listener", x);
}
}
-
+
public Map<String,Object> toMarkerAttributes(Map<String,Object> p) {
assert Protocol.isDispatchThread();
Map<String,Object> m = new HashMap<String,Object>();
@@ -331,7 +331,7 @@ public class TCFBreakpointsModel implements IBreakpointListener, IBreakpointMana
m.put(IBreakpoint.PERSISTED, Boolean.TRUE);
m.put(IBreakpoint.ID, ITCFConstants.ID_TCF_DEBUG_MODEL);
String msg = "";
- if (p.get(IBreakpoints.PROP_LOCATION) != null) msg += p.get(IBreakpoints.PROP_LOCATION);
+ if (p.get(IBreakpoints.PROP_LOCATION) != null) msg += p.get(IBreakpoints.PROP_LOCATION);
m.put(IMarker.MESSAGE, "Breakpoint: " + msg);
Number line = (Number)p.get(IBreakpoints.PROP_LINE);
if (line != null) {
@@ -344,7 +344,7 @@ public class TCFBreakpointsModel implements IBreakpointListener, IBreakpointMana
}
return m;
}
-
+
public Map<String,Object> toBreakpointAttributes(String id, String file, Map<String,Object> p) {
assert Protocol.isDispatchThread();
Map<String,Object> m = new HashMap<String,Object>();
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFBreakpointsStatus.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFBreakpointsStatus.java
index 35797a85a..669b2a797 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFBreakpointsStatus.java
+++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFBreakpointsStatus.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -23,17 +23,17 @@ import org.eclipse.tm.tcf.services.IBreakpoints;
public class TCFBreakpointsStatus {
-
+
private final IBreakpoints service;
private final Map<String,Map<String,Object>> status = new HashMap<String,Map<String,Object>>();
private final Set<ITCFBreakpointListener> listeners = new HashSet<ITCFBreakpointListener>();
-
+
private static final Map<String,Object> status_not_supported = new HashMap<String,Object>();
-
+
static {
status_not_supported.put(IBreakpoints.STATUS_ERROR, "Not supported");
}
-
+
TCFBreakpointsStatus(TCFLaunch launch) {
assert Protocol.isDispatchThread();
service = launch.getChannel().getRemoteService(IBreakpoints.class);
@@ -74,7 +74,7 @@ public class TCFBreakpointsStatus {
});
}
}
-
+
public Map<String,Object> getStatus(String id) {
assert id != null;
assert Protocol.isDispatchThread();
@@ -92,12 +92,12 @@ public class TCFBreakpointsStatus {
return status_not_supported;
}
}
-
+
public void addListener(ITCFBreakpointListener listener) {
assert Protocol.isDispatchThread();
listeners.add(listener);
}
-
+
public void removeListener(ITCFBreakpointListener listener) {
assert Protocol.isDispatchThread();
listeners.remove(listener);
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFContextState.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFContextState.java
index 3a9dd15a8..9589096a3 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFContextState.java
+++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFContextState.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* 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
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -15,7 +15,7 @@ import java.util.Map;
public class TCFContextState {
public boolean is_suspended;
public boolean is_terminated;
-
+
public String suspend_pc;
public String suspend_reason;
public Map<String,Object> suspend_params;
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFError.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFError.java
index 81d422056..5a9d8540d 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFError.java
+++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFError.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFLaunch.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFLaunch.java
index 8e4d2eb29..4ee4715dc 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFLaunch.java
+++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFLaunch.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -52,17 +52,17 @@ import org.eclipse.tm.tcf.services.IProcesses.ProcessContext;
public class TCFLaunch extends Launch {
public interface Listener {
-
+
public void onCreated(TCFLaunch launch);
- public void onConnected(TCFLaunch launch);
+ public void onConnected(TCFLaunch launch);
public void onDisconnected(TCFLaunch launch);
public void onContextActionsStart(TCFLaunch launch);
-
+
public void onContextActionsDone(TCFLaunch launch);
-
+
public void onProcessOutput(TCFLaunch launch, String process_id, int stream_id, byte[] data);
}
@@ -84,9 +84,9 @@ public class TCFLaunch extends Launch {
private int context_action_cnt;
private final HashMap<String,LinkedList<Runnable>> context_action_queue =
new HashMap<String,LinkedList<Runnable>>();
-
+
private HashMap<String,String> stream_ids = new HashMap<String,String>();
-
+
private final IStreams.StreamsListener streams_listener = new IStreams.StreamsListener() {
public void created(String stream_type, String stream_id, String context_id) {
@@ -102,14 +102,14 @@ public class TCFLaunch extends Launch {
public void disposed(String stream_type, String stream_id) {
}
};
-
+
private final IProcesses.ProcessesListener prs_listener = new IProcesses.ProcessesListener() {
public void exited(String process_id, int exit_code) {
if (process_id.equals(process.getID())) process_exit_code = exit_code;
}
};
-
+
public TCFLaunch(ILaunchConfiguration launchConfiguration, String mode) {
super(launchConfiguration, mode, null);
for (Listener l : listeners) l.onCreated(TCFLaunch.this);
@@ -119,7 +119,7 @@ public class TCFLaunch extends Launch {
// The method is called when TCF channel is successfully connected.
subscribeStreamsService();
}
-
+
private void onDisconnected(Throwable error) {
// The method is called when TCF channel is closed.
assert !disconnected;
@@ -139,7 +139,7 @@ public class TCFLaunch extends Launch {
}
});
}
-
+
private void subscribeStreamsService() {
try {
IStreams streams = getService(IStreams.class);
@@ -194,7 +194,7 @@ public class TCFLaunch extends Launch {
}
});
}
-
+
private String[] toArgsArray(String file, String cmd) {
// Create arguments list from a command line.
int i = 0;
@@ -225,7 +225,7 @@ public class TCFLaunch extends Launch {
}
return arr.toArray(new String[arr.size()]);
}
-
+
@SuppressWarnings("unchecked")
protected void runLaunchSequence(final Runnable done) {
try {
@@ -295,7 +295,7 @@ public class TCFLaunch extends Launch {
channel.terminate(x);
}
}
-
+
private void copyFileToRemoteTarget(String local_file, String remote_file, final Runnable done) {
if (local_file == null) {
channel.terminate(new Exception("Program does not exist"));
@@ -311,12 +311,12 @@ public class TCFLaunch extends Launch {
final InputStream inp = new FileInputStream(local_file);
int flags = IFileSystem.TCF_O_WRITE | IFileSystem.TCF_O_CREAT | IFileSystem.TCF_O_TRUNC;
fs.open(remote_file, flags, null, new IFileSystem.DoneOpen() {
-
+
IFileHandle handle;
long offset = 0;
final Set<IToken> cmds = new HashSet<IToken>();
final byte[] buf = new byte[0x1000];
-
+
public void doneOpen(IToken token, FileSystemException error, IFileHandle handle) {
this.handle = handle;
if (error != null) {
@@ -328,7 +328,7 @@ public class TCFLaunch extends Launch {
write_next();
}
}
-
+
private void write_next() {
try {
while (cmds.size() < 8) {
@@ -338,7 +338,7 @@ public class TCFLaunch extends Launch {
break;
}
cmds.add(fs.write(handle, offset, buf, 0, rd, new IFileSystem.DoneWrite() {
-
+
public void doneWrite(IToken token, FileSystemException error) {
cmds.remove(token);
if (error != null) channel.terminate(error);
@@ -352,13 +352,13 @@ public class TCFLaunch extends Launch {
channel.terminate(x);
}
}
-
+
private void close() {
if (cmds.size() > 0) return;
try {
inp.close();
fs.close(handle, new IFileSystem.DoneClose() {
-
+
public void doneClose(IToken token, FileSystemException error) {
if (error != null) channel.terminate(error);
else done.run();
@@ -375,7 +375,7 @@ public class TCFLaunch extends Launch {
channel.terminate(x);
}
}
-
+
private String getProgramPath(String project_name, String local_file) {
if (project_name == null || project_name.length() == 0) {
File f = new File(local_file);
@@ -393,7 +393,7 @@ public class TCFLaunch extends Launch {
}
return program_path.toOSString();
}
-
+
private void connectProcessStreams() {
assert process_start_command == null;
final IStreams streams = getService(IStreams.class);
@@ -416,7 +416,7 @@ public class TCFLaunch extends Launch {
}
}
}
-
+
private void connectStream(final String id, final int no) {
final String peocess_id = process.getID();
final IStreams streams = getService(IStreams.class);
@@ -442,7 +442,7 @@ public class TCFLaunch extends Launch {
streams.read(id, 0x1000, done);
streams.read(id, 0x1000, done);
}
-
+
private void disconnectStream(String id) {
stream_ids.remove(id);
if (channel.getState() != IChannel.STATE_OPEN) return;
@@ -454,17 +454,17 @@ public class TCFLaunch extends Launch {
}
});
}
-
+
protected void runShutdownSequence(final Runnable done) {
done.run();
}
-
+
/*--------------------------------------------------------------------------------------------*/
public Throwable getError() {
return error;
}
-
+
public void setError(Throwable x) {
error = x;
if (x != null) {
@@ -477,7 +477,7 @@ public class TCFLaunch extends Launch {
}
fireChanged();
}
-
+
public TCFBreakpointsStatus getBreakpointsStatus() {
return breakpoints_status;
}
@@ -496,11 +496,11 @@ public class TCFLaunch extends Launch {
assert Protocol.isDispatchThread();
return channel;
}
-
+
public IProcesses.ProcessContext getProcessContext() {
return process;
}
-
+
public void writeProcessInputStream(byte[] buf, int pos, int len) {
assert Protocol.isDispatchThread();
if (channel.getState() != IChannel.STATE_OPEN) return;
@@ -513,16 +513,16 @@ public class TCFLaunch extends Launch {
}
});
}
-
+
public boolean isConnecting() {
return connecting;
}
-
+
public void onLastContextRemoved() {
last_context_exited = true;
closeChannel();
}
-
+
public void closeChannel() {
assert Protocol.isDispatchThread();
if (channel == null) return;
@@ -561,7 +561,7 @@ public class TCFLaunch extends Launch {
public boolean isDisconnected() {
return disconnected;
}
-
+
public void disconnect() throws DebugException {
try {
Protocol.invokeLater(new Runnable() {
@@ -574,7 +574,7 @@ public class TCFLaunch extends Launch {
disconnected = true;
}
}
-
+
public boolean canTerminate() {
return false;
}
@@ -589,11 +589,11 @@ public class TCFLaunch extends Launch {
public boolean isExited() {
return last_context_exited;
}
-
+
public int getExitCode() {
return process_exit_code;
}
-
+
public void launchTCF(String mode, String id) {
assert Protocol.isDispatchThread();
this.mode = mode;
@@ -615,28 +615,28 @@ public class TCFLaunch extends Launch {
channel = peer.openChannel();
while (path.size() > 0) channel.redirect(path.removeFirst());
channel.addChannelListener(new IChannel.IChannelListener() {
-
+
public void onChannelOpened() {
onConnected();
}
-
+
public void congestionLevel(int level) {
}
-
+
public void onChannelClosed(Throwable error) {
channel.removeChannelListener(this);
onDisconnected(error);
}
-
+
});
- assert channel.getState() == IChannel.STATE_OPENNING;
+ assert channel.getState() == IChannel.STATE_OPENNING;
connecting = true;
}
catch (Throwable e) {
onDisconnected(e);
}
}
-
+
public void addContextAction(TCFAction action, String context_id) {
assert Protocol.isDispatchThread();
LinkedList<Runnable> list = context_action_queue.get(context_id);
@@ -651,7 +651,7 @@ public class TCFLaunch extends Launch {
}
if (list.getFirst() == action) Protocol.invokeLater(action);
}
-
+
public void removeContextAction(TCFAction action, String context_id) {
assert Protocol.isDispatchThread();
LinkedList<Runnable> list = context_action_queue.get(context_id);
@@ -667,7 +667,7 @@ public class TCFLaunch extends Launch {
for (Listener l : listeners) l.onContextActionsDone(this);
}
}
-
+
public void removeContextActions(String context_id) {
assert Protocol.isDispatchThread();
LinkedList<Runnable> list = context_action_queue.remove(context_id);
@@ -677,7 +677,7 @@ public class TCFLaunch extends Launch {
for (Listener l : listeners) l.onContextActionsDone(this);
}
}
-
+
public boolean hasPendingContextActions() {
return context_action_cnt > 0;
}
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFSourceRef.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFSourceRef.java
index 049edcd7c..e433f6c59 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFSourceRef.java
+++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFSourceRef.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* 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
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -16,7 +16,7 @@ import org.eclipse.tm.tcf.services.ILineNumbers;
import org.eclipse.tm.tcf.services.IMemory;
/**
- * Objects of this class represent a mapping between an address and source code area.
+ * Objects of this class represent a mapping between an address and source code area.
*/
public class TCFSourceRef {
public IMemory.MemoryContext context;
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/ITCFTest.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/ITCFTest.java
index 0672fa6c8..434339f69 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/ITCFTest.java
+++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/ITCFTest.java
@@ -1,20 +1,20 @@
/*******************************************************************************
* 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
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this 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.tests;
/**
- * Each (sub)test in TCF Test Suite should implement this interface.
+ * Each (sub)test in TCF Test Suite should implement this interface.
*/
interface ITCFTest {
-
+
/**
* Start execution of the test.
*/
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/Main.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/Main.java
index b5e473eaf..8724c35ca 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/Main.java
+++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/Main.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* 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
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -21,14 +21,14 @@ import org.eclipse.tm.tcf.protocol.IPeer;
import org.eclipse.tm.tcf.protocol.Protocol;
/**
- * This class is user to run TCF test suite from command line.
+ * This class is user to run TCF test suite from command line.
*/
public class Main {
-
+
private static class EventQueue extends Thread implements IEventQueue {
-
+
private final LinkedList<Runnable> queue = new LinkedList<Runnable>();
-
+
EventQueue() {
setName("TCF Event Dispatch");
start();
@@ -56,7 +56,7 @@ public class Main {
System.exit(1);
}
}
-
+
public synchronized int getCongestion() {
int n = queue.size() - 100;
if (n > 100) n = 100;
@@ -72,9 +72,9 @@ public class Main {
return Thread.currentThread() == this;
}
}
-
+
private static class RemotePeer extends AbstractPeer {
-
+
public RemotePeer(Map<String,String> attrs) {
super(attrs);
}
@@ -108,7 +108,7 @@ public class Main {
}
return peer;
}
-
+
private static void runTestSuite(IPeer peer) {
TCFTestSuite.TestListener listenr = new TCFTestSuite.TestListener() {
@@ -126,7 +126,7 @@ public class Main {
public void progress(String label, int done, int total) {
if (label != null) System.out.println(label);
}
-
+
};
try {
new TCFTestSuite(peer, listenr);
@@ -140,7 +140,7 @@ public class Main {
/**
* Command line should contain peer description string, for example:
- * "ID=Test:TransportName=TCP:Host=127.0.0.1:Port=1534"
+ * "ID=Test:TransportName=TCP:Host=127.0.0.1:Port=1534"
*/
public static void main(final String[] args) {
if (args.length != 1) {
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TCFTestSuite.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TCFTestSuite.java
index e2589902b..786f91044 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TCFTestSuite.java
+++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TCFTestSuite.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -25,21 +25,21 @@ import org.eclipse.tm.tcf.protocol.Protocol;
/**
* TCF Test Suite implements stress testing of communication channels and capabilities of remote peer.
* It is intended to be used before starting a debug session for a first time to make sure the selected
- * target is stable and reliable.
+ * target is stable and reliable.
*/
public class TCFTestSuite {
-
+
private final static int NUM_CHANNELS = 4;
-
+
private final TestListener listener;
private final IChannel[] channels;
- private final LinkedList<Runnable> pending_tests = new LinkedList<Runnable>();
+ private final LinkedList<Runnable> pending_tests = new LinkedList<Runnable>();
private final Collection<Throwable> errors = new ArrayList<Throwable>();
private final Map<ITCFTest,IChannel> active_tests = new HashMap<ITCFTest,IChannel>();
-
+
private int count_total;
private int count_done;
-
+
boolean cancel;
boolean canceled;
boolean target_lock;
@@ -48,7 +48,7 @@ public class TCFTestSuite {
public void progress(String label, int done, int total);
public void done(Collection<Throwable> errors);
}
-
+
public TCFTestSuite(final IPeer peer, final TestListener listener) throws IOException {
this.listener = listener;
pending_tests.add(new Runnable() {
@@ -152,7 +152,7 @@ public class TCFTestSuite {
}
});
}
-
+
private void openChannels(IPeer peer) {
listener.progress("Openning communication channels...", count_done, count_total);
for (int i = 0; i < channels.length; i++) {
@@ -194,7 +194,7 @@ public class TCFTestSuite {
});
}
}
-
+
public void cancel() {
cancel = true;
if (canceled) return;
@@ -214,15 +214,15 @@ public class TCFTestSuite {
if (c != null && c.getState() != IChannel.STATE_CLOSED) c.close();
}
}
-
+
public boolean isCanceled() {
return canceled;
}
-
+
boolean isActive(ITCFTest test) {
return active_tests.get(test) != null;
}
-
+
void done(ITCFTest test, Throwable error) {
assert active_tests.get(test) != null;
if (error != null && !canceled) errors.add(error);
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestAttachTerminate.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestAttachTerminate.java
index c8776e968..ccb301772 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestAttachTerminate.java
+++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestAttachTerminate.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* 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
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -22,24 +22,24 @@ import org.eclipse.tm.tcf.services.IRunControl;
import org.eclipse.tm.tcf.services.IRunControl.RunControlContext;
class TestAttachTerminate implements ITCFTest, IRunControl.RunControlListener {
-
+
private final TCFTestSuite test_suite;
private final IDiagnostics diag;
private final IRunControl rc;
-
+
private final HashMap<String,IRunControl.RunControlContext> map =
new HashMap<String,IRunControl.RunControlContext>();
private final HashSet<String> process_ids = new HashSet<String>();
-
+
private int cnt;
private int wait_cnt;
-
+
TestAttachTerminate(TCFTestSuite test_suite, IChannel channel) {
this.test_suite = test_suite;
diag = channel.getRemoteService(IDiagnostics.class);
rc = channel.getRemoteService(IRunControl.class);
}
-
+
public void start() {
if (diag == null) {
test_suite.done(this, null);
@@ -65,7 +65,7 @@ class TestAttachTerminate implements ITCFTest, IRunControl.RunControlListener {
});
}
}
-
+
private void startProcess() {
if (test_suite.cancel || cnt == 4) {
if (!process_ids.isEmpty()) {
@@ -127,7 +127,7 @@ class TestAttachTerminate implements ITCFTest, IRunControl.RunControlListener {
}
});
}
-
+
private void exit(Throwable x) {
if (!test_suite.isActive(this)) return;
if (rc != null) rc.removeListener(this);
@@ -161,7 +161,7 @@ class TestAttachTerminate implements ITCFTest, IRunControl.RunControlListener {
}
public void contextException(String context, String msg) {
- IRunControl.RunControlContext ctx = map.get(context);
+ IRunControl.RunControlContext ctx = map.get(context);
if (ctx == null) return;
if (process_ids.contains(ctx.getParentID())) {
exit(new Error("Unexpected 'contextException' event for " + context + ": " + msg));
@@ -181,7 +181,7 @@ class TestAttachTerminate implements ITCFTest, IRunControl.RunControlListener {
public void contextSuspended(String context, String pc, String reason,
Map<String, Object> params) {
assert context != null;
- IRunControl.RunControlContext ctx = map.get(context);
+ IRunControl.RunControlContext ctx = map.get(context);
if (ctx == null) return;
if (process_ids.contains(ctx.getParentID())) {
ctx.resume(IRunControl.RM_RESUME, 1, new IRunControl.DoneCommand() {
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestEcho.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestEcho.java
index 14364896e..e094ffbd8 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestEcho.java
+++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestEcho.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* 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
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -28,7 +28,7 @@ class TestEcho implements ITCFTest, IDiagnostics.DoneEcho {
this.test_suite = test_suite;
diag = channel.getRemoteService(IDiagnostics.class);
}
-
+
public void start() {
if (diag == null) {
test_suite.done(this, null);
@@ -50,7 +50,7 @@ class TestEcho implements ITCFTest, IDiagnostics.DoneEcho {
});
}
}
-
+
private void sendMessage() {
StringBuffer buf = new StringBuffer();
buf.append(Integer.toHexString(count));
@@ -63,7 +63,7 @@ class TestEcho implements ITCFTest, IDiagnostics.DoneEcho {
diag.echo(s, this);
count++;
}
-
+
public void doneEcho(IToken token, Throwable error, String b) {
String s = msgs.removeFirst();
if (!test_suite.isActive(this)) return;
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestEchoFP.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestEchoFP.java
index 358c22fd9..28ee0323b 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestEchoFP.java
+++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestEchoFP.java
@@ -21,7 +21,7 @@ public class TestEchoFP implements ITCFTest, IDiagnostics.DoneEchoFP {
this.test_suite = test_suite;
diag = channel.getRemoteService(IDiagnostics.class);
}
-
+
public void start() {
if (diag == null) {
test_suite.done(this, null);
@@ -30,18 +30,18 @@ public class TestEchoFP implements ITCFTest, IDiagnostics.DoneEchoFP {
for (int i = 0; i < 32; i++) sendMessage();
}
}
-
+
private void sendMessage() {
BigDecimal n = BigDecimal.valueOf(rnd.nextInt(), rnd.nextInt(61) - 30);
msgs.add(n);
diag.echoFP(n, this);
count++;
}
-
+
private boolean cmp(double x, double y) {
return (float)x == (float)y;
}
-
+
public void doneEchoFP(IToken token, Throwable error, BigDecimal b) {
BigDecimal s = msgs.removeFirst();
if (!test_suite.isActive(this)) return;
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestExpressions.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestExpressions.java
index faf2dd9a4..e664fb4c9 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestExpressions.java
+++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestExpressions.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* 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
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -25,14 +25,14 @@ import org.eclipse.tm.tcf.services.IStackTrace;
class TestExpressions implements ITCFTest,
IRunControl.RunControlListener, IExpressions.ExpressionsListener, IBreakpoints.BreakpointsListener {
-
+
private final TCFTestSuite test_suite;
private final IDiagnostics diag;
private final IExpressions expr;
private final IStackTrace stk;
private final IRunControl rc;
private final IBreakpoints bp;
-
+
private String bp_id;
private boolean bp_ok;
private IDiagnostics.ISymbol sym_func3;
@@ -49,7 +49,7 @@ class TestExpressions implements ITCFTest,
new HashMap<String,IExpressions.Expression>();
private final Map<String,IExpressions.Value> expr_val =
new HashMap<String,IExpressions.Value>();
-
+
private static String[] test_expressions = {
"func2_local1 == func2_local1",
"func2_local1 != func2_local2",
@@ -83,7 +83,7 @@ class TestExpressions implements ITCFTest,
"((func2_local1 + func2_local2) * 2 - 2) / 2 == 2",
"func2_local3.f_struct->f_struct->f_struct == &func2_local3"
};
-
+
TestExpressions(TCFTestSuite test_suite, IChannel channel) {
this.test_suite = test_suite;
diag = channel.getRemoteService(IDiagnostics.class);
@@ -362,7 +362,7 @@ class TestExpressions implements ITCFTest,
}
});
}
-
+
private void exit(Throwable x) {
if (!test_suite.isActive(this)) return;
expr.removeListener(this);
@@ -372,7 +372,7 @@ class TestExpressions implements ITCFTest,
}
//--------------------------- Run Control listener ---------------------------//
-
+
public void containerResumed(String[] context_ids) {
}
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestFileSystem.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestFileSystem.java
index 94ae1494d..7f2d5cbb0 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestFileSystem.java
+++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestFileSystem.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* 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
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -31,7 +31,7 @@ class TestFileSystem implements ITCFTest, IFileSystem.DoneStat,
IFileSystem.DoneRename, IFileSystem.DoneRealPath,
IFileSystem.DoneRemove, IFileSystem.DoneRoots,
IFileSystem.DoneReadDir {
-
+
private final TCFTestSuite test_suite;
private final int channel_id;
@@ -42,7 +42,7 @@ class TestFileSystem implements ITCFTest, IFileSystem.DoneStat,
STATE_OUT = 3,
STATE_INP = 4,
STATE_EXIT = 5;
-
+
private final IFileSystem files;
private final byte[] data = new byte[0x1000];
private String root;
@@ -50,13 +50,13 @@ class TestFileSystem implements ITCFTest, IFileSystem.DoneStat,
private String file_name;
private IFileHandle handle;
private int state = STATE_PRE;
-
+
TestFileSystem(TCFTestSuite test_suite, IChannel channel, int channel_id) {
this.test_suite = test_suite;
this.channel_id = channel_id;
files = channel.getRemoteService(IFileSystem.class);
}
-
+
public void start() {
if (files == null) {
test_suite.done(this, null);
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestRCBP1.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestRCBP1.java
index 0bd4836f0..f4088090e 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestRCBP1.java
+++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestRCBP1.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* 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
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -56,8 +56,8 @@ class TestRCBP1 implements ITCFTest,
private final Map<IToken,String> get_state_cmds = new HashMap<IToken,String>();
private final Map<String,Map<String,IRegisters.RegistersContext>> regs =
new HashMap<String,Map<String,IRegisters.RegistersContext>>();
- private final Map<String,Map<String,Object>> bp_list = new HashMap<String,Map<String,Object>>();
-
+ private final Map<String,Map<String,Object>> bp_list = new HashMap<String,Map<String,Object>>();
+
private String context_id; // Test process context ID
private IRunControl.RunControlContext context;
private String main_thread_id;
@@ -70,8 +70,8 @@ class TestRCBP1 implements ITCFTest,
private boolean done_starting_test_process;
private int resume_cnt = 0;
private IToken cancel_test_cmd;
- private boolean bp_set_done;
- private boolean bp_change_done;
+ private boolean bp_set_done;
+ private boolean bp_change_done;
private class SuspendedContext {
final String id;
@@ -79,7 +79,7 @@ class TestRCBP1 implements ITCFTest,
final String reason;
final Map<String,Object> params;
boolean resumed;
-
+
SuspendedContext(String id, String pc, String reason, Map<String,Object> params) {
this.id = id;
this.pc = pc;
@@ -87,7 +87,7 @@ class TestRCBP1 implements ITCFTest,
this.params = params;
}
}
-
+
private final IBreakpoints.BreakpointsListener bp_listener = new IBreakpoints.BreakpointsListener() {
public void breakpointStatusChanged(String id, Map<String,Object> status) {
@@ -111,7 +111,7 @@ class TestRCBP1 implements ITCFTest,
public void contextRemoved(String[] ids) {
}
-
+
private boolean checkBPData(Map<String,Object> m0, Map<String,Object> m1) {
if (m1 == null) return true;
m0 = new HashMap<String,Object>(m0);
@@ -135,7 +135,7 @@ class TestRCBP1 implements ITCFTest,
bp = channel.getRemoteService(IBreakpoints.class);
ln = channel.getRemoteService(ILineNumbers.class);
}
-
+
public void start() {
if (diag == null || rc == null) {
test_suite.done(this, null);
@@ -148,7 +148,7 @@ class TestRCBP1 implements ITCFTest,
}
if (bp != null) bp.addListener(bp_listener);
}
-
+
public void doneGetTestList(IToken token, Throwable error, String[] list) {
assert test_suite.isActive(this);
if (error != null) {
@@ -164,7 +164,7 @@ class TestRCBP1 implements ITCFTest,
}
exit(null);
}
-
+
public void doneRunTest(IToken token, Throwable error, String context_id) {
if (error != null) {
exit(error);
@@ -223,7 +223,7 @@ class TestRCBP1 implements ITCFTest,
});
}
}
-
+
@SuppressWarnings("unchecked")
private void iniBreakpoints() {
assert !bp_set_done;
@@ -359,7 +359,7 @@ class TestRCBP1 implements ITCFTest,
doneStartingTestProcess();
}
}
-
+
private void doneStartingTestProcess() {
assert !done_starting_test_process;
assert get_state_cmds.isEmpty();
@@ -451,7 +451,7 @@ class TestRCBP1 implements ITCFTest,
}
});
}
-
+
public void containerResumed(String[] context_ids) {
for (String id : context_ids) contextResumed(id);
}
@@ -516,7 +516,7 @@ class TestRCBP1 implements ITCFTest,
exit(new Exception("Test main thread breakpoint count = " + bp_cnt + ", expected 30"));
}
rc.removeListener(this);
- // Flush communication channel of pending commands
+ // Flush communication channel of pending commands
Protocol.sync(new Runnable() {
public void run() {
exit(null);
@@ -532,14 +532,14 @@ class TestRCBP1 implements ITCFTest,
if (!isAlienBreakpoint(sc)) suspended_prev.put(id, sc);
running.add(id);
}
-
+
private String toSymName(long addr) {
if (func0.getValue().longValue() == addr) return "tcf_test_func0";
if (func1.getValue().longValue() == addr) return "tcf_test_func1";
if (func2.getValue().longValue() == addr) return "tcf_test_func2";
return "0x" + Long.toHexString(addr);
}
-
+
private void checkSuspendedContext(SuspendedContext sp, ISymbol sym) {
long pc = Long.parseLong(sp.pc);
if (pc != sym.getValue().longValue() || !"Breakpoint".equals(sp.reason)) {
@@ -547,7 +547,7 @@ class TestRCBP1 implements ITCFTest,
", expected breakpoint at '" + toSymName(sym.getValue().longValue()) + "' " + sym.getValue()));
}
}
-
+
private boolean isAlienBreakpoint(SuspendedContext sc) {
// Check if context suspended by a breakpoint from another debug session
// Test should ignore such breakpoints.
@@ -624,7 +624,7 @@ class TestRCBP1 implements ITCFTest,
ln_done.doneMapToSource(null, null, null);
}
}
-
+
private void resume(final SuspendedContext sc) {
assert done_starting_test_process || resume_cnt == 0;
if (!done_starting_test_process) return;
@@ -642,7 +642,7 @@ class TestRCBP1 implements ITCFTest,
});
}
}
-
+
private void runMemoryTest(final SuspendedContext sc) {
if (test_suite.target_lock) {
resume(sc);
@@ -699,7 +699,7 @@ class TestRCBP1 implements ITCFTest,
}
});
}
-
+
private void testSetMemoryCommand(final SuspendedContext sc,
final IMemory.MemoryContext mem_ctx,
final Number addr, final byte[] buf) {
@@ -739,7 +739,7 @@ class TestRCBP1 implements ITCFTest,
}
});
}
-
+
private void testFillMemoryCommand(final SuspendedContext sc,
final IMemory.MemoryContext mem_ctx,
final Number addr, final byte[] buf) {
@@ -781,7 +781,7 @@ class TestRCBP1 implements ITCFTest,
}
});
}
-
+
private void runRegistersTest(final SuspendedContext sc) {
if (regs.get(sc.id) == null) {
final Map<String,IRegisters.RegistersContext> reg_map =
@@ -830,7 +830,7 @@ class TestRCBP1 implements ITCFTest,
testGetSetRegisterCommands(sc);
}
}
-
+
private void testGetSetRegisterCommands(final SuspendedContext sc) {
final Set<IToken> cmds = new HashSet<IToken>();
Map<String,IRegisters.RegistersContext> reg_map = regs.get(sc.id);
@@ -907,7 +907,7 @@ class TestRCBP1 implements ITCFTest,
resume(sc);
}
}
-
+
void cancel(final Runnable done) {
if (rc != null) rc.removeListener(this);
if (context_id == null) {
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestStreams.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestStreams.java
index 19dc9a0cf..ff0917f12 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestStreams.java
+++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestStreams.java
@@ -15,10 +15,10 @@ class TestStreams implements ITCFTest, IStreams.StreamsListener {
private final IStreams streams;
private final Random rnd = new Random();
private final HashSet<String> stream_ids = new HashSet<String>();
-
+
private String inp_id;
private String out_id;
-
+
private int test_count;
TestStreams(TCFTestSuite test_suite, IChannel channel) {
@@ -26,7 +26,7 @@ class TestStreams implements ITCFTest, IStreams.StreamsListener {
diag = channel.getRemoteService(IDiagnostics.class);
streams = channel.getRemoteService(IStreams.class);
}
-
+
public void start() {
if (diag == null ||streams == null) {
test_suite.done(this, null);
@@ -35,7 +35,7 @@ class TestStreams implements ITCFTest, IStreams.StreamsListener {
subsrcibe();
}
}
-
+
private void subsrcibe() {
streams.subscribe(IDiagnostics.NAME, this, new IStreams.DoneSubscribe() {
@@ -49,7 +49,7 @@ class TestStreams implements ITCFTest, IStreams.StreamsListener {
}
});
}
-
+
private void createStream() {
diag.createTestStreams(1153, 947, new IDiagnostics.DoneCreateTestStreams() {
@@ -64,7 +64,7 @@ class TestStreams implements ITCFTest, IStreams.StreamsListener {
if (id.equals(inp_id)) continue;
if (id.equals(out_id)) continue;
streams.disconnect(id, new IStreams.DoneDisconnect() {
-
+
public void doneDisconnect(IToken token, Exception error) {
if (error != null) {
exit(error);
@@ -77,13 +77,13 @@ class TestStreams implements ITCFTest, IStreams.StreamsListener {
}
});
}
-
+
private void testReadWrite() {
final byte[] data_out = new byte[rnd.nextInt(10000) + 1000];
new Random().nextBytes(data_out);
final HashSet<IToken> cmds = new HashSet<IToken>();
IStreams.DoneRead done_read = new IStreams.DoneRead() {
-
+
private int offs = 0;
private boolean eos;
@@ -138,7 +138,7 @@ class TestStreams implements ITCFTest, IStreams.StreamsListener {
cmds.add(streams.read(out_id, 227, done_read));
cmds.add(streams.read(out_id, 229, done_read));
cmds.add(streams.read(out_id, 233, done_read));
-
+
IStreams.DoneWrite done_write = new IStreams.DoneWrite() {
public void doneWrite(IToken token, Exception error) {
@@ -159,7 +159,7 @@ class TestStreams implements ITCFTest, IStreams.StreamsListener {
}
});
}
-
+
private void disposeStreams() {
final HashSet<IToken> cmds = new HashSet<IToken>();
IStreams.DoneDisconnect done_disconnect = new IStreams.DoneDisconnect() {
@@ -191,7 +191,7 @@ class TestStreams implements ITCFTest, IStreams.StreamsListener {
cmds.add(diag.disposeTestStream(out_id, done_dispose));
cmds.add(streams.disconnect(out_id, done_disconnect));
}
-
+
private void unsubscribe() {
streams.unsubscribe(IDiagnostics.NAME, this, new IStreams.DoneUnsubscribe() {
@@ -214,7 +214,7 @@ class TestStreams implements ITCFTest, IStreams.StreamsListener {
if (!test_suite.isActive(this)) return;
test_suite.done(this, x);
}
-
+
/************************** StreamsListener **************************/
public void created(String stream_type, String stream_id, String context_id) {
@@ -225,7 +225,7 @@ class TestStreams implements ITCFTest, IStreams.StreamsListener {
if (inp_id.equals(stream_id)) exit(new Exception("Invalid stream ID in Streams.created event"));
if (out_id.equals(stream_id)) exit(new Exception("Invalid stream ID in Streams.created event"));
streams.disconnect(stream_id, new IStreams.DoneDisconnect() {
-
+
public void doneDisconnect(IToken token, Exception error) {
if (error != null) {
exit(error);
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestSysMonitor.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestSysMonitor.java
index 09985831b..a8ec24d41 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestSysMonitor.java
+++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestSysMonitor.java
@@ -59,7 +59,7 @@ class TestSysMonitor implements ITCFTest {
});
}
}
-
+
private void getEnvironment() {
final HashSet<IToken> cmds = new HashSet<IToken>();
for (final String id : procs.keySet()) {
@@ -78,7 +78,7 @@ class TestSysMonitor implements ITCFTest {
}));
}
}
-
+
private void getCommandLine() {
final HashSet<IToken> cmds = new HashSet<IToken>();
for (final String id : procs.keySet()) {
diff --git a/plugins/org.eclipse.tm.tcf.dsf.ui/src/org/eclipse/tm/internal/tcf/dsf/ui/Activator.java b/plugins/org.eclipse.tm.tcf.dsf.ui/src/org/eclipse/tm/internal/tcf/dsf/ui/Activator.java
index 9565d7ffe..ae7e7ec68 100644
--- a/plugins/org.eclipse.tm.tcf.dsf.ui/src/org/eclipse/tm/internal/tcf/dsf/ui/Activator.java
+++ b/plugins/org.eclipse.tm.tcf.dsf.ui/src/org/eclipse/tm/internal/tcf/dsf/ui/Activator.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -23,7 +23,7 @@ public class Activator extends AbstractUIPlugin {
// The shared instance
private static Activator plugin;
-
+
/**
* The constructor
*/
diff --git a/plugins/org.eclipse.tm.tcf.dsf.ui/src/org/eclipse/tm/internal/tcf/dsf/ui/AdapterFactory.java b/plugins/org.eclipse.tm.tcf.dsf.ui/src/org/eclipse/tm/internal/tcf/dsf/ui/AdapterFactory.java
index 6be73513f..b48e7f9d0 100644
--- a/plugins/org.eclipse.tm.tcf.dsf.ui/src/org/eclipse/tm/internal/tcf/dsf/ui/AdapterFactory.java
+++ b/plugins/org.eclipse.tm.tcf.dsf.ui/src/org/eclipse/tm/internal/tcf/dsf/ui/AdapterFactory.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -68,7 +68,7 @@ public class AdapterFactory implements IAdapterFactory, DsfSession.SessionEndedL
final TcfTerminateCommand terminate_command;
final IDebugModelProvider debug_model_provider;
final TCFDSFLaunch lunch;
- //final BreakpointCommand breakpoint_command;
+ //final BreakpointCommand breakpoint_command;
//final DsfMemoryBlockRetrieval memory_retrieval;
SessionAdapterSet(DsfSession session, TCFDSFLaunch launch) {
@@ -115,10 +115,10 @@ public class AdapterFactory implements IAdapterFactory, DsfSession.SessionEndedL
lunch = launch;
/*
- * Registering the launch as an adapter, ensures that this launch,
- * and debug model ID will be associated with all DMContexts from this
- * session.
- */
+ * Registering the launch as an adapter, ensures that this launch,
+ * and debug model ID will be associated with all DMContexts from this
+ * session.
+ */
session.registerModelAdapter(ILaunch.class, lunch);
}
@@ -133,14 +133,14 @@ public class AdapterFactory implements IAdapterFactory, DsfSession.SessionEndedL
session.unregisterModelAdapter(IStepReturnHandler.class);
session.unregisterModelAdapter(ISuspendHandler.class);
session.unregisterModelAdapter(IResumeHandler.class);
- session.unregisterModelAdapter(ITerminateHandler.class);
+ session.unregisterModelAdapter(ITerminateHandler.class);
step_into_command.dispose();
step_over_command.dispose();
step_return_command.dispose();
suspend_command.dispose();
resume_command.dispose();
terminate_command.dispose();
- }
+ }
}
private static final Class<?>[] adapter_list = {
@@ -150,7 +150,7 @@ public class AdapterFactory implements IAdapterFactory, DsfSession.SessionEndedL
ITerminateHandler.class
};
- private static final Map<String,SessionAdapterSet> session_adapter_set_map =
+ private static final Map<String,SessionAdapterSet> session_adapter_set_map =
Collections.synchronizedMap(new HashMap<String,SessionAdapterSet>());
public AdapterFactory() {
@@ -178,13 +178,13 @@ public class AdapterFactory implements IAdapterFactory, DsfSession.SessionEndedL
@SuppressWarnings("unchecked")
public Object getAdapter(Object adaptableObject, Class adapterType) {
- if (!(adaptableObject instanceof TCFDSFLaunch)) return null;
+ if (!(adaptableObject instanceof TCFDSFLaunch)) return null;
TCFDSFLaunch launch = (TCFDSFLaunch)adaptableObject;
// Find the correct set of adapters based on the launch session-ID. If not found
- // it means that we have a new launch and new session, and we have to create a
- // new set of adapters.
+ // it means that we have a new launch and new session, and we have to create a
+ // new set of adapters.
DsfSession session = launch.getSession();
if (session == null) return null;
@@ -232,7 +232,7 @@ public class AdapterFactory implements IAdapterFactory, DsfSession.SessionEndedL
session_adapter_set_map.remove(id).dispose();
}
}
- }
+ }
}
}
}
diff --git a/plugins/org.eclipse.tm.tcf.dsf.ui/src/org/eclipse/tm/internal/tcf/dsf/ui/actions/TcfTerminateCommand.java b/plugins/org.eclipse.tm.tcf.dsf.ui/src/org/eclipse/tm/internal/tcf/dsf/ui/actions/TcfTerminateCommand.java
index 331352409..7d378666a 100644
--- a/plugins/org.eclipse.tm.tcf.dsf.ui/src/org/eclipse/tm/internal/tcf/dsf/ui/actions/TcfTerminateCommand.java
+++ b/plugins/org.eclipse.tm.tcf.dsf.ui/src/org/eclipse/tm/internal/tcf/dsf/ui/actions/TcfTerminateCommand.java
@@ -6,18 +6,18 @@ import org.eclipse.debug.core.commands.IEnabledStateRequest;
import org.eclipse.debug.core.commands.ITerminateHandler;
public class TcfTerminateCommand implements ITerminateHandler {
-
+
public TcfTerminateCommand(DsfSession session) {
-
+
}
-
+
public void dispose() {
-
+
}
public void canExecute(IEnabledStateRequest request) {
// TODO Auto-generated method stub
-
+
}
public boolean execute(IDebugCommandRequest request) {
diff --git a/plugins/org.eclipse.tm.tcf.dsf.ui/src/org/eclipse/tm/internal/tcf/dsf/ui/launch/LaunchDialogTabGroup.java b/plugins/org.eclipse.tm.tcf.dsf.ui/src/org/eclipse/tm/internal/tcf/dsf/ui/launch/LaunchDialogTabGroup.java
index 999e4ada5..b4de66a27 100644
--- a/plugins/org.eclipse.tm.tcf.dsf.ui/src/org/eclipse/tm/internal/tcf/dsf/ui/launch/LaunchDialogTabGroup.java
+++ b/plugins/org.eclipse.tm.tcf.dsf.ui/src/org/eclipse/tm/internal/tcf/dsf/ui/launch/LaunchDialogTabGroup.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
diff --git a/plugins/org.eclipse.tm.tcf.dsf.ui/src/org/eclipse/tm/internal/tcf/dsf/ui/viewmodel/ExecutableContextLayoutNode.java b/plugins/org.eclipse.tm.tcf.dsf.ui/src/org/eclipse/tm/internal/tcf/dsf/ui/viewmodel/ExecutableContextLayoutNode.java
index a56ed0172..3cc90bff7 100644
--- a/plugins/org.eclipse.tm.tcf.dsf.ui/src/org/eclipse/tm/internal/tcf/dsf/ui/viewmodel/ExecutableContextLayoutNode.java
+++ b/plugins/org.eclipse.tm.tcf.dsf.ui/src/org/eclipse/tm/internal/tcf/dsf/ui/viewmodel/ExecutableContextLayoutNode.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Ericsson - Initial API and implementation
* Wind River Systems - reused for TCF connection type
@@ -57,7 +57,7 @@ public class ExecutableContextLayoutNode extends AbstractDMVMNode implements IEl
public ExecutableContextLayoutNode(AbstractDMVMProvider provider, DsfSession session) {
super(provider, session, IRunControl.IExecutionDMContext.class);
}
-
+
private void doneViewerUpdate(final IViewerUpdate req) {
PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
public void run() {
@@ -71,7 +71,7 @@ public class ExecutableContextLayoutNode extends AbstractDMVMNode implements IEl
TCFDSFRunControl service = getServicesTracker().getService(TCFDSFRunControl.class);
if (service == null) {
update.setStatus(new Status(IStatus.ERROR,
- Activator.PLUGIN_ID, IDsfStatusConstants.INVALID_STATE,
+ Activator.PLUGIN_ID, IDsfStatusConstants.INVALID_STATE,
"Run Control service not available.", null)); //$NON-NLS-1$
handleFailedUpdate(update);
return;
@@ -107,19 +107,19 @@ public class ExecutableContextLayoutNode extends AbstractDMVMNode implements IEl
catch (RejectedExecutionException e) {
for (ILabelUpdate update : updates) {
update.setStatus(new Status(IStatus.ERROR,
- Activator.PLUGIN_ID, IDsfStatusConstants.INTERNAL_ERROR,
+ Activator.PLUGIN_ID, IDsfStatusConstants.INTERNAL_ERROR,
"Cannot execute update request.", e)); //$NON-NLS-1$
handleFailedUpdate(update);
}
}
}
-
+
private void updateLabelInSessionThread(final ILabelUpdate[] updates) {
TCFDSFRunControl service = getServicesTracker().getService(TCFDSFRunControl.class);
if (service == null) {
for (final ILabelUpdate update : updates) {
update.setStatus(new Status(IStatus.ERROR,
- Activator.PLUGIN_ID, IDsfStatusConstants.INVALID_STATE,
+ Activator.PLUGIN_ID, IDsfStatusConstants.INVALID_STATE,
"Run Control service not available.", null)); //$NON-NLS-1$
handleFailedUpdate(update);
}
@@ -140,7 +140,7 @@ public class ExecutableContextLayoutNode extends AbstractDMVMNode implements IEl
});
return;
}
-
+
for (final ILabelUpdate update : updates) {
TCFDSFExecutionDMC dmc = (TCFDSFExecutionDMC)findDmcInPath(update.getViewerInput(),
update.getElementPath(), IContainerDMContext.class);
@@ -175,10 +175,10 @@ public class ExecutableContextLayoutNode extends AbstractDMVMNode implements IEl
}
if (e instanceof IRunControl.IResumedDMEvent || e instanceof IRunControl.ISuspendedDMEvent) {
return IModelDelta.STATE;
- }
+ }
return IModelDelta.NO_CHANGE;
}
-
+
private List<TCFDSFExecutionDMC> getPath(TCFDSFExecutionDMC dmc) {
List<TCFDSFExecutionDMC> list = new ArrayList<TCFDSFExecutionDMC>();
while (dmc != null) {
@@ -234,7 +234,7 @@ public class ExecutableContextLayoutNode extends AbstractDMVMNode implements IEl
}
else if (e instanceof IStartedDMEvent || e instanceof IExitedDMEvent) {
parentDelta.setFlags(parentDelta.getFlags() | IModelDelta.CONTENT);
- }
+ }
rm.done();
}
}
diff --git a/plugins/org.eclipse.tm.tcf.dsf.ui/src/org/eclipse/tm/internal/tcf/dsf/ui/viewmodel/LaunchVMProvider.java b/plugins/org.eclipse.tm.tcf.dsf.ui/src/org/eclipse/tm/internal/tcf/dsf/ui/viewmodel/LaunchVMProvider.java
index 2934513e6..bea389b41 100644
--- a/plugins/org.eclipse.tm.tcf.dsf.ui/src/org/eclipse/tm/internal/tcf/dsf/ui/viewmodel/LaunchVMProvider.java
+++ b/plugins/org.eclipse.tm.tcf.dsf.ui/src/org/eclipse/tm/internal/tcf/dsf/ui/viewmodel/LaunchVMProvider.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -30,12 +30,12 @@ import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationCont
@SuppressWarnings("restriction")
-public class LaunchVMProvider extends AbstractDMVMProvider
+public class LaunchVMProvider extends AbstractDMVMProvider
implements IDebugEventSetListener, ILaunchesListener2 {
@ThreadSafe
public LaunchVMProvider(AbstractVMAdapter adapter,
- IPresentationContext presentationContext,
+ IPresentationContext presentationContext,
DsfSession session, ILaunch launch) {
super(adapter, presentationContext, session);
@@ -44,7 +44,7 @@ implements IDebugEventSetListener, ILaunchesListener2 {
IVMNode threads_node = new ExecutableContextLayoutNode(this, getSession());
addChildNodes(launch_node, new IVMNode[] { threads_node });
-
+
IVMNode stack_frames_node = new StackFramesVMNode(this, getSession());
addChildNodes(threads_node, new IVMNode[] { stack_frames_node, threads_node });
@@ -55,14 +55,14 @@ implements IDebugEventSetListener, ILaunchesListener2 {
public void handleDebugEvents(final DebugEvent[] events) {
if (isDisposed()) return;
-
- // We're in session's executor thread. Re-dispatch to VM Adapter
+
+ // We're in session's executor thread. Re-dispatch to VM Adapter
// executor thread and then call root layout node.
try {
getExecutor().execute(new Runnable() {
public void run() {
if (isDisposed()) return;
-
+
for (final DebugEvent event : events) {
handleEvent(event);
}
@@ -70,8 +70,8 @@ implements IDebugEventSetListener, ILaunchesListener2 {
});
}
catch (RejectedExecutionException e) {
- // Ignore. This exception could be thrown if the provider is being
- // shut down.
+ // Ignore. This exception could be thrown if the provider is being
+ // shut down.
}
}
@@ -83,31 +83,31 @@ implements IDebugEventSetListener, ILaunchesListener2 {
}
public void launchesAdded(ILaunch[] launches) {
- handleLaunchesEvent(new LaunchesEvent(launches, LaunchesEvent.Type.ADDED));
+ handleLaunchesEvent(new LaunchesEvent(launches, LaunchesEvent.Type.ADDED));
}
public void launchesRemoved(ILaunch[] launches) {
- handleLaunchesEvent(new LaunchesEvent(launches, LaunchesEvent.Type.REMOVED));
+ handleLaunchesEvent(new LaunchesEvent(launches, LaunchesEvent.Type.REMOVED));
}
public void launchesChanged(ILaunch[] launches) {
- handleLaunchesEvent(new LaunchesEvent(launches, LaunchesEvent.Type.CHANGED));
+ handleLaunchesEvent(new LaunchesEvent(launches, LaunchesEvent.Type.CHANGED));
}
public void launchesTerminated(ILaunch[] launches) {
- handleLaunchesEvent(new LaunchesEvent(launches, LaunchesEvent.Type.TERMINATED));
+ handleLaunchesEvent(new LaunchesEvent(launches, LaunchesEvent.Type.TERMINATED));
}
private void handleLaunchesEvent(final LaunchesEvent event) {
if (isDisposed()) return;
-
- // We're in session's executor thread. Re-dispach to VM Adapter
+
+ // We're in session's executor thread. Re-dispach to VM Adapter
// executor thread and then call root layout node.
try {
getExecutor().execute(new Runnable() {
public void run() {
if (isDisposed()) return;
-
+
IRootVMNode rootLayoutNode = getRootVMNode();
if (rootLayoutNode != null && rootLayoutNode.getDeltaFlags(event) != 0) {
handleEvent(event);
@@ -115,8 +115,8 @@ implements IDebugEventSetListener, ILaunchesListener2 {
}});
}
catch (RejectedExecutionException e) {
- // Ignore. This exception could be thrown if the provider is being
- // shut down.
+ // Ignore. This exception could be thrown if the provider is being
+ // shut down.
}
}
}
diff --git a/plugins/org.eclipse.tm.tcf.dsf.ui/src/org/eclipse/tm/internal/tcf/dsf/ui/viewmodel/RegisterVMProvider.java b/plugins/org.eclipse.tm.tcf.dsf.ui/src/org/eclipse/tm/internal/tcf/dsf/ui/viewmodel/RegisterVMProvider.java
index 8822dc419..347e7ab01 100644
--- a/plugins/org.eclipse.tm.tcf.dsf.ui/src/org/eclipse/tm/internal/tcf/dsf/ui/viewmodel/RegisterVMProvider.java
+++ b/plugins/org.eclipse.tm.tcf.dsf.ui/src/org/eclipse/tm/internal/tcf/dsf/ui/viewmodel/RegisterVMProvider.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -36,7 +36,7 @@ import org.eclipse.jface.util.PropertyChangeEvent;
*/
@SuppressWarnings("restriction")
public class RegisterVMProvider extends AbstractDMVMProvider implements IPropertyChangeListener {
-
+
/*
* Current default for register formatting.
*/
@@ -44,17 +44,17 @@ public class RegisterVMProvider extends AbstractDMVMProvider implements IPropert
super(adapter, context, session);
context.addPropertyChangeListener(this);
-
+
/*
* Create the register data access routines.
*/
SyncRegisterDataAccess regAccess = new SyncRegisterDataAccess(session) ;
-
+
/*
* Create the top level node to deal with the root selection.
*/
IRootVMNode rootNode = new RootDMVMNode(this);
-
+
IVMNode registerGroupNode = new RegisterGroupVMNode(this, getSession(), regAccess);
IVMNode registerNode = new RegisterVMNode(FormattedValuePreferenceStore.getDefault(), this, getSession(), regAccess);
IVMNode bitFieldNode = new RegisterBitFieldVMNode(FormattedValuePreferenceStore.getDefault(), this, getSession(), regAccess);
@@ -64,17 +64,17 @@ public class RegisterVMProvider extends AbstractDMVMProvider implements IPropert
*/
addChildNodes(rootNode, new IVMNode[] { registerGroupNode, registerNode });
-
+
/*
* Create the next level which is the registers themselves.
*/
addChildNodes(registerGroupNode, new IVMNode[] { registerNode, bitFieldNode });
-
+
/*
* Create the next level which is the bitfield level.
*/
addChildNodes(registerNode, new IVMNode[] { bitFieldNode });
-
+
/*
* Now set this schema set as the layout set.
*/
@@ -85,7 +85,7 @@ public class RegisterVMProvider extends AbstractDMVMProvider implements IPropert
protected IVMUpdatePolicy[] createUpdateModes() {
return new IVMUpdatePolicy[] { new AutomaticUpdatePolicy(), new ManualUpdatePolicy(), new BreakpointHitUpdatePolicy() };
}
-
+
@Override
public void dispose() {
getPresentationContext().removePropertyChangeListener(this);
@@ -96,12 +96,12 @@ public class RegisterVMProvider extends AbstractDMVMProvider implements IPropert
public IColumnPresentation createColumnPresentation(IPresentationContext context, Object element) {
return new RegisterColumnPresentation();
}
-
+
@Override
public String getColumnPresentationId(IPresentationContext context, Object element) {
return RegisterColumnPresentation.ID;
}
-
+
public void propertyChange(PropertyChangeEvent event) {
handleEvent(event);
}
diff --git a/plugins/org.eclipse.tm.tcf.dsf.ui/src/org/eclipse/tm/internal/tcf/dsf/ui/viewmodel/ViewModelAdapter.java b/plugins/org.eclipse.tm.tcf.dsf.ui/src/org/eclipse/tm/internal/tcf/dsf/ui/viewmodel/ViewModelAdapter.java
index 051e4abfa..c624e256d 100644
--- a/plugins/org.eclipse.tm.tcf.dsf.ui/src/org/eclipse/tm/internal/tcf/dsf/ui/viewmodel/ViewModelAdapter.java
+++ b/plugins/org.eclipse.tm.tcf.dsf.ui/src/org/eclipse/tm/internal/tcf/dsf/ui/viewmodel/ViewModelAdapter.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -44,7 +44,7 @@ public class ViewModelAdapter extends AbstractDMVMAdapter {
@Override
protected IVMProvider createViewModelProvider(IPresentationContext context) {
if (IDebugUIConstants.ID_DEBUG_VIEW.equals(context.getId()) ) {
- return new LaunchVMProvider(this, context, getSession(), launch);
+ return new LaunchVMProvider(this, context, getSession(), launch);
}
if (IDebugUIConstants.ID_VARIABLE_VIEW.equals(context.getId()) ) {
return new VariableVMProvider(this, context, getSession());
diff --git a/plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/Activator.java b/plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/Activator.java
index 9d71d4f25..2e3ae3a82 100644
--- a/plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/Activator.java
+++ b/plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/Activator.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
diff --git a/plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/launch/TCFDSFExecuter.java b/plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/launch/TCFDSFExecuter.java
index 309159c89..deff54f04 100644
--- a/plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/launch/TCFDSFExecuter.java
+++ b/plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/launch/TCFDSFExecuter.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
diff --git a/plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/launch/TCFDSFLaunch.java b/plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/launch/TCFDSFLaunch.java
index 641faed20..90fadb4ea 100644
--- a/plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/launch/TCFDSFLaunch.java
+++ b/plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/launch/TCFDSFLaunch.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -61,7 +61,7 @@ public class TCFDSFLaunch extends TCFLaunch {
};
executor.execute(new TCFDSFShutdownSequence(session, TCFDSFLaunch.this, monitor));
}
-
+
public DsfExecutor getDsfExecutor() {
return executor;
}
diff --git a/plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/launch/TCFDSFLaunchDelegate.java b/plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/launch/TCFDSFLaunchDelegate.java
index d6a9280bf..eaef10e4b 100644
--- a/plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/launch/TCFDSFLaunchDelegate.java
+++ b/plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/launch/TCFDSFLaunchDelegate.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
diff --git a/plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/launch/TCFDSFLaunchSequence.java b/plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/launch/TCFDSFLaunchSequence.java
index 21d4ec427..185159820 100644
--- a/plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/launch/TCFDSFLaunchSequence.java
+++ b/plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/launch/TCFDSFLaunchSequence.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
diff --git a/plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/launch/TCFDSFShutdownSequence.java b/plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/launch/TCFDSFShutdownSequence.java
index 9478bf0a2..48aed5ba3 100644
--- a/plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/launch/TCFDSFShutdownSequence.java
+++ b/plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/launch/TCFDSFShutdownSequence.java
@@ -33,7 +33,7 @@ class TCFDSFShutdownSequence extends Sequence {
tracker = new DsfServicesTracker(Activator.getBundleContext(), session_id);
monitor.done();
}
-
+
@Override
public void rollBack(RequestMonitor monitor) {
// In case the shutdown sequence aborts,
@@ -42,7 +42,7 @@ class TCFDSFShutdownSequence extends Sequence {
tracker = null;
monitor.done();
}
- },
+ },
new Step() {
@Override
public void execute(RequestMonitor monitor) {
@@ -86,7 +86,7 @@ class TCFDSFShutdownSequence extends Sequence {
tracker = null;
monitor.done();
}
- }
+ }
};
}
diff --git a/plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/launch/TCFDSFSourceLookupDirector.java b/plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/launch/TCFDSFSourceLookupDirector.java
index 39a98ebc0..84a1a96a1 100644
--- a/plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/launch/TCFDSFSourceLookupDirector.java
+++ b/plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/launch/TCFDSFSourceLookupDirector.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* 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
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
diff --git a/plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/launch/TCFDSFSourceLookupParticipant.java b/plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/launch/TCFDSFSourceLookupParticipant.java
index 3ac0bd2ff..136a95efc 100644
--- a/plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/launch/TCFDSFSourceLookupParticipant.java
+++ b/plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/launch/TCFDSFSourceLookupParticipant.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* 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
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
diff --git a/plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/services/TCFAddress.java b/plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/services/TCFAddress.java
index 3de969429..74d5e6836 100644
--- a/plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/services/TCFAddress.java
+++ b/plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/services/TCFAddress.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* 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
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -15,9 +15,9 @@ import java.math.BigInteger;
import org.eclipse.cdt.core.IAddress;
public final class TCFAddress implements IAddress {
-
+
private final BigInteger addr;
-
+
// TODO: TCFAddress should include memory space ID
public TCFAddress(Number addr) {
if (addr instanceof BigInteger) this.addr = (BigInteger)addr;
@@ -79,7 +79,7 @@ public final class TCFAddress implements IAddress {
public int compareTo(Object o) {
return addr.compareTo(((TCFAddress)o).addr);
}
-
+
public String toString() {
return "[" + toHexAddressString() + "]";
}
diff --git a/plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/services/TCFDSFBreakpoints.java b/plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/services/TCFDSFBreakpoints.java
index f310d160b..056cbb2ce 100644
--- a/plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/services/TCFDSFBreakpoints.java
+++ b/plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/services/TCFDSFBreakpoints.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* 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
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -49,14 +49,14 @@ import org.eclipse.tm.tcf.util.TCFDataCache;
import org.osgi.framework.BundleContext;
public class TCFDSFBreakpoints extends AbstractDsfService implements org.eclipse.dd.dsf.debug.service.IBreakpoints {
-
+
private class BreakpointDMC extends AbstractDMContext implements IBreakpointDMContext {
-
+
final String id;
final IBreakpoint bp;
final TCFDataCache<Map<String,Object>> status;
final Set<IBreakpointsTargetDMContext> targets;
-
+
boolean disposed;
public BreakpointDMC(IDsfService service, final String id, IBreakpoint bp) {
@@ -93,7 +93,7 @@ public class TCFDSFBreakpoints extends AbstractDsfService implements org.eclipse
public int hashCode() {
return id.hashCode();
}
-
+
void dispose() {
assert !disposed;
cache.remove(id);
@@ -102,7 +102,7 @@ public class TCFDSFBreakpoints extends AbstractDsfService implements org.eclipse
assert targets.isEmpty();
disposed = true;
}
-
+
void onAdded(final IBreakpointsTargetDMContext t) {
targets.add(t);
IBreakpointsAddedEvent e = new IBreakpointsAddedEvent() {
@@ -115,7 +115,7 @@ public class TCFDSFBreakpoints extends AbstractDsfService implements org.eclipse
};
getSession().dispatchEvent(e, getProperties());
}
-
+
void onUpdated(final IBreakpointsTargetDMContext t) {
assert targets.contains(t);
IBreakpointsUpdatedEvent e = new IBreakpointsUpdatedEvent() {
@@ -128,7 +128,7 @@ public class TCFDSFBreakpoints extends AbstractDsfService implements org.eclipse
};
getSession().dispatchEvent(e, getProperties());
}
-
+
void onRemoved(final IBreakpointsTargetDMContext t) {
targets.remove(t);
IBreakpointsRemovedEvent e = new IBreakpointsRemovedEvent() {
@@ -142,14 +142,14 @@ public class TCFDSFBreakpoints extends AbstractDsfService implements org.eclipse
getSession().dispatchEvent(e, getProperties());
}
}
-
+
private class BreakpointData implements IBreakpointDMData {
-
+
final IBreakpoint bp;
final Map<String,Object> attrs;
final Map<String,Object> status;
final String file;
-
+
@SuppressWarnings("unchecked")
BreakpointData(IBreakpoint bp, Map<String,Object> status) throws CoreException, IOException {
this.bp = bp;
@@ -181,7 +181,7 @@ public class TCFDSFBreakpoints extends AbstractDsfService implements org.eclipse
if (arr == null) return null;
int cnt = 0;
for (Map<String,Object> m : arr) {
- if (m.get(IBreakpoints.INSTANCE_ADDRESS) != null) cnt++;
+ if (m.get(IBreakpoints.INSTANCE_ADDRESS) != null) cnt++;
}
IAddress[] res = new IAddress[cnt];
int pos = 0;
@@ -232,7 +232,7 @@ public class TCFDSFBreakpoints extends AbstractDsfService implements org.eclipse
return enabled != null && enabled.booleanValue() && bp_manager.isEnabled();
}
}
-
+
private final ITCFBreakpointListener bp_listener = new ITCFBreakpointListener() {
@SuppressWarnings("unchecked")
@@ -272,20 +272,20 @@ public class TCFDSFBreakpoints extends AbstractDsfService implements org.eclipse
if (dmc != null) dmc.dispose();
}
};
-
+
private final TCFLaunch launch;
private final IChannel channel;
private final org.eclipse.tm.tcf.services.IBreakpoints tcf_bpt_service;
private final Map<String,BreakpointDMC> cache = new HashMap<String,BreakpointDMC>();
private final IBreakpointManager bp_manager = DebugPlugin.getDefault().getBreakpointManager();
-
+
public TCFDSFBreakpoints(DsfSession session, TCFLaunch launch, final RequestMonitor monitor) {
super(session);
- this.launch = launch;
+ this.launch = launch;
channel = launch.getChannel();
launch.getBreakpointsStatus().addListener(bp_listener);
tcf_bpt_service = channel.getRemoteService(org.eclipse.tm.tcf.services.IBreakpoints.class);
- initialize(new RequestMonitor(getExecutor(), monitor) {
+ initialize(new RequestMonitor(getExecutor(), monitor) {
@Override
protected void handleSuccess() {
String[] class_names = {
@@ -298,7 +298,7 @@ public class TCFDSFBreakpoints extends AbstractDsfService implements org.eclipse
});
}
- @Override
+ @Override
public void shutdown(RequestMonitor monitor) {
unregister();
super.shutdown(monitor);
@@ -354,7 +354,7 @@ public class TCFDSFBreakpoints extends AbstractDsfService implements org.eclipse
catch (Exception x) {
rm.setStatus(new Status(IStatus.ERROR, Activator.PLUGIN_ID,
REQUEST_FAILED, "Data error", x)); //$NON-NLS-1$
-
+
}
}
else {
diff --git a/plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/services/TCFDSFExecutionDMC.java b/plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/services/TCFDSFExecutionDMC.java
index 3f6d30dc7..7cf0d0731 100644
--- a/plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/services/TCFDSFExecutionDMC.java
+++ b/plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/services/TCFDSFExecutionDMC.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -30,15 +30,15 @@ import org.eclipse.tm.tcf.util.TCFDataCache;
public abstract class TCFDSFExecutionDMC extends AbstractDMContext
implements IExecutionDMContext, IContainerDMContext, IMemoryDMContext, IBreakpointsTargetDMContext {
-
+
public final TCFDataCache<IMemory.MemoryContext> memory_context_cache;
- public final TCFDataCache<RunControlContext> run_control_context_cache;
- public final TCFDataCache<Map<String,TCFDSFExecutionDMC>> run_control_children_cache;
- public final TCFDataCache<TCFContextState> run_control_state_cache;
-
+ public final TCFDataCache<RunControlContext> run_control_context_cache;
+ public final TCFDataCache<Map<String,TCFDSFExecutionDMC>> run_control_children_cache;
+ public final TCFDataCache<TCFContextState> run_control_state_cache;
+
TCFDataCache<?> stack_frames_cache;
TCFDataCache<?> registers_cache;
-
+
TCFDSFExecutionDMC(IChannel channel, IDsfService service, IDMContext[] parents) {
super(service, parents);
final IMemory tcf_mem_service = channel.getRemoteService(IMemory.class);
@@ -135,20 +135,20 @@ public abstract class TCFDSFExecutionDMC extends AbstractDMContext
}
};
}
-
+
public abstract void dispose();
-
+
/**
* Get TCF ID of execution context.
* @return TCF ID.
*/
public abstract String getTcfContextId();
-
+
/**
* Check if this context object is disposed, because, for example, a thread has exited.
* @return true if context object is disposed.
*/
public abstract boolean isDisposed();
-
+
protected abstract TCFDSFExecutionDMC addChild(String id);
}
diff --git a/plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/services/TCFDSFMemory.java b/plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/services/TCFDSFMemory.java
index df3e9b873..f79bd61c4 100644
--- a/plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/services/TCFDSFMemory.java
+++ b/plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/services/TCFDSFMemory.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* 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
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -33,21 +33,21 @@ import org.osgi.framework.BundleContext;
public class TCFDSFMemory extends AbstractDsfService implements org.eclipse.dd.dsf.debug.service.IMemory {
-
+
private static class MemoryChangedEvent extends AbstractDMEvent<IMemoryDMContext> implements IMemoryChangedEvent {
IAddress[] fAddresses;
IDMContext fContext;
-
+
public MemoryChangedEvent(IMemoryDMContext context, IAddress[] addresses) {
super(context);
fAddresses = addresses;
}
-
+
public IAddress[] getAddresses() {
return fAddresses;
}
}
-
+
private final org.eclipse.tm.tcf.services.IMemory.MemoryListener mem_listener =
new org.eclipse.tm.tcf.services.IMemory.MemoryListener() {
@@ -76,14 +76,14 @@ public class TCFDSFMemory extends AbstractDsfService implements org.eclipse.dd.d
}
}
};
-
+
private final org.eclipse.tm.tcf.services.IMemory tcf_mem_service;
public TCFDSFMemory(DsfSession session, IChannel channel, final RequestMonitor monitor) {
super(session);
tcf_mem_service = channel.getRemoteService(org.eclipse.tm.tcf.services.IMemory.class);
if (tcf_mem_service != null) tcf_mem_service.addListener(mem_listener);
- initialize(new RequestMonitor(getExecutor(), monitor) {
+ initialize(new RequestMonitor(getExecutor(), monitor) {
@Override
protected void handleSuccess() {
String[] class_names = {
@@ -96,7 +96,7 @@ public class TCFDSFMemory extends AbstractDsfService implements org.eclipse.dd.d
});
}
- @Override
+ @Override
public void shutdown(RequestMonitor monitor) {
unregister();
super.shutdown(monitor);
diff --git a/plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/services/TCFDSFRegisters.java b/plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/services/TCFDSFRegisters.java
index a6c2a2616..0f84629d7 100644
--- a/plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/services/TCFDSFRegisters.java
+++ b/plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/services/TCFDSFRegisters.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* 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
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -46,14 +46,14 @@ import org.osgi.framework.BundleContext;
public class TCFDSFRegisters extends AbstractDsfService implements org.eclipse.dd.dsf.debug.service.IRegisters {
-
+
private class ObjectDMC extends AbstractDMContext implements IFormattedDataDMContext {
final String id;
final RegisterChildrenCache children;
final Map<String,ValueDMC> values;
-
- org.eclipse.tm.tcf.services.IRegisters.RegistersContext context;
+
+ org.eclipse.tm.tcf.services.IRegisters.RegistersContext context;
boolean disposed;
ObjectDMC(String session_id, IDMContext[] parents, String id) {
@@ -84,7 +84,7 @@ public class TCFDSFRegisters extends AbstractDsfService implements org.eclipse.d
public String getName() {
return context.getName();
}
-
+
void dispose() {
assert !disposed;
children.dispose();
@@ -94,13 +94,13 @@ public class TCFDSFRegisters extends AbstractDsfService implements org.eclipse.d
disposed = true;
}
}
-
+
private class RegisterGroupDMC extends ObjectDMC implements IRegisterGroupDMContext {
-
+
RegisterGroupDMC(String session_id, IDMContext[] parents, String id) {
super(session_id, parents, id);
}
-
+
/* Constructor for a fake register group - DSF requires at least one group object */
RegisterGroupDMC(String session_id, IDMContext[] parents, final String id, RegisterChildrenCache children) {
super(session_id, parents, id, children);
@@ -186,43 +186,43 @@ public class TCFDSFRegisters extends AbstractDsfService implements org.eclipse.d
};
}
}
-
+
private class RegisterDMC extends ObjectDMC implements IRegisterDMContext {
-
+
RegisterDMC(String session_id, IDMContext[] parents, String id) {
super(session_id, parents, id);
}
}
-
+
private class BitFieldDMC extends ObjectDMC implements IBitFieldDMContext {
BitFieldDMC(String session_id, IDMContext[] parents, String id) {
super(session_id, parents, id);
}
}
-
+
private class ValueDMC extends FormattedValueDMContext {
-
+
final RegisterValueCache cache;
-
+
boolean disposed;
ValueDMC(ObjectDMC parent, String fmt) {
super(TCFDSFRegisters.this, parent, fmt);
cache = new RegisterValueCache(channel, parent.context, fmt);
}
-
+
void dispose() {
assert !disposed;
cache.dispose();
disposed = true;
}
}
-
+
private class RegisterGroupData implements IRegisterGroupDMData {
-
+
final org.eclipse.tm.tcf.services.IRegisters.RegistersContext context;
-
+
RegisterGroupData(org.eclipse.tm.tcf.services.IRegisters.RegistersContext context) {
this.context = context;
}
@@ -235,11 +235,11 @@ public class TCFDSFRegisters extends AbstractDsfService implements org.eclipse.d
return context.getName();
}
}
-
+
private class RegisterData implements IRegisterDMData {
final org.eclipse.tm.tcf.services.IRegisters.RegistersContext context;
-
+
RegisterData(org.eclipse.tm.tcf.services.IRegisters.RegistersContext context) {
this.context = context;
}
@@ -280,14 +280,14 @@ public class TCFDSFRegisters extends AbstractDsfService implements org.eclipse.d
return context.isWriteable();
}
}
-
+
private class BitFieldData implements IBitFieldDMData {
final org.eclipse.tm.tcf.services.IRegisters.RegistersContext context;
-
+
IMnemonic[] mnemonics;
IBitGroup[] bit_groups;
-
+
BitFieldData(org.eclipse.tm.tcf.services.IRegisters.RegistersContext context) {
this.context = context;
}
@@ -388,15 +388,15 @@ public class TCFDSFRegisters extends AbstractDsfService implements org.eclipse.d
return context.isLeftToRight();
}
}
-
+
private class RegisterChildrenCache extends TCFDataCache<Map<String,ObjectDMC>> {
-
+
final String id;
final IDMContext[] parents;
-
+
Map<String,ObjectDMC> dmc_pool = new HashMap<String,ObjectDMC>();;
boolean disposed;
-
+
public RegisterChildrenCache(IChannel channel, String id, IDMContext[] parents) {
super(channel);
this.id = id;
@@ -409,7 +409,7 @@ public class TCFDSFRegisters extends AbstractDsfService implements org.eclipse.d
dmc.children.invalidateRegContents();
}
}
-
+
void dispose() {
assert !disposed;
reset();
@@ -478,12 +478,12 @@ public class TCFDSFRegisters extends AbstractDsfService implements org.eclipse.d
return false;
}
}
-
+
private class RegisterValueCache extends TCFDataCache<FormattedValueDMData> {
-
+
final org.eclipse.tm.tcf.services.IRegisters.RegistersContext context;
final String fmt;
-
+
boolean disposed;
public RegisterValueCache(IChannel channel,
@@ -505,8 +505,8 @@ public class TCFDSFRegisters extends AbstractDsfService implements org.eclipse.d
FormattedValueDMData data = null;
if (value != null) {
int radix = 10;
- if (fmt.equals(HEX_FORMAT)) radix = 16;
- else if (fmt.equals(OCTAL_FORMAT)) radix = 8;
+ if (fmt.equals(HEX_FORMAT)) radix = 16;
+ else if (fmt.equals(OCTAL_FORMAT)) radix = 8;
byte[] temp = new byte[value.length + 1];
temp[0] = 0; // Extra byte to avoid sign extension by BigInteger
if (context.isBigEndian()) {
@@ -536,14 +536,14 @@ public class TCFDSFRegisters extends AbstractDsfService implements org.eclipse.d
});
return false;
}
-
+
void dispose() {
assert !disposed;
reset();
disposed = true;
}
}
-
+
private static class RegisterGroupChangedEvent extends AbstractDMEvent<IRegisterGroupDMContext>
implements IGroupChangedDMEvent {
@@ -551,7 +551,7 @@ public class TCFDSFRegisters extends AbstractDsfService implements org.eclipse.d
super(context);
}
}
-
+
private static class RegisterChangedEvent extends AbstractDMEvent<IRegisterDMContext>
implements IRegisterChangedDMEvent {
@@ -562,12 +562,12 @@ public class TCFDSFRegisters extends AbstractDsfService implements org.eclipse.d
private static class BitFieldChangedEvent extends AbstractDMEvent<IBitFieldDMContext>
implements IBitFieldChangedDMEvent {
-
+
public BitFieldChangedEvent(IBitFieldDMContext context) {
super(context);
}
}
-
+
private static class GroupsChangedEvent extends AbstractDMEvent<IDMContext> implements IGroupsChangedDMEvent {
public GroupsChangedEvent(IExecutionDMContext context) {
@@ -607,11 +607,11 @@ public class TCFDSFRegisters extends AbstractDsfService implements org.eclipse.d
}
}
};
-
+
private final IChannel channel;
private final org.eclipse.tm.tcf.services.IRegisters tcf_reg_service;
private final Map<String,ObjectDMC> model;
-
+
private final String[] available_formats = {
HEX_FORMAT,
DECIMAL_FORMAT,
@@ -624,7 +624,7 @@ public class TCFDSFRegisters extends AbstractDsfService implements org.eclipse.d
model = new HashMap<String,ObjectDMC>();
tcf_reg_service = channel.getRemoteService(org.eclipse.tm.tcf.services.IRegisters.class);
if (tcf_reg_service != null) tcf_reg_service.addListener(listener);
- initialize(new RequestMonitor(getExecutor(), monitor) {
+ initialize(new RequestMonitor(getExecutor(), monitor) {
@Override
protected void handleSuccess() {
String[] class_names = {
@@ -638,7 +638,7 @@ public class TCFDSFRegisters extends AbstractDsfService implements org.eclipse.d
});
}
- @Override
+ @Override
public void shutdown(RequestMonitor monitor) {
getSession().removeServiceEventListener(this);
unregister();
@@ -712,12 +712,12 @@ public class TCFDSFRegisters extends AbstractDsfService implements org.eclipse.d
}
rm.done();
}
-
+
private RegisterChildrenCache getRegisterChildrenCache(IDMContext dmc, DataRequestMonitor<?> rm) {
RegisterChildrenCache cache = null;
if (dmc instanceof CompositeDMContext) {
for (IDMContext ctx : dmc.getParents()) {
- if (ctx instanceof TCFDSFExecutionDMC || ctx instanceof TCFDSFStack.TCFFrameDMC ||
+ if (ctx instanceof TCFDSFExecutionDMC || ctx instanceof TCFDSFStack.TCFFrameDMC ||
ctx instanceof RegisterGroupDMC || ctx instanceof RegisterDMC) {
dmc = ctx;
break;
@@ -978,8 +978,8 @@ public class TCFDSFRegisters extends AbstractDsfService implements org.eclipse.d
return;
}
int radix = 10;
- if (fmt.equals(HEX_FORMAT)) radix = 16;
- else if (fmt.equals(OCTAL_FORMAT)) radix = 8;
+ if (fmt.equals(HEX_FORMAT)) radix = 16;
+ else if (fmt.equals(OCTAL_FORMAT)) radix = 8;
byte[] data = new BigInteger(val, radix).toByteArray();
if (!((ObjectDMC)dmc).context.isBigEndian()) {
byte[] temp = new byte[data.length];
@@ -1061,8 +1061,8 @@ public class TCFDSFRegisters extends AbstractDsfService implements org.eclipse.d
return;
}
int radix = 10;
- if (fmt.equals(HEX_FORMAT)) radix = 16;
- else if (fmt.equals(OCTAL_FORMAT)) radix = 8;
+ if (fmt.equals(HEX_FORMAT)) radix = 16;
+ else if (fmt.equals(OCTAL_FORMAT)) radix = 8;
byte[] data = new BigInteger(val, radix).toByteArray();
if (!((ObjectDMC)dmc).context.isBigEndian()) {
byte[] temp = new byte[data.length];
@@ -1168,7 +1168,7 @@ public class TCFDSFRegisters extends AbstractDsfService implements org.eclipse.d
if (cache != null) cache.invalidateRegContents();
}
}
-
+
@DsfServiceEventHandler
public void eventDispatched(org.eclipse.dd.dsf.debug.service.IRunControl.ISuspendedDMEvent e) {
RegisterChildrenCache cache = (RegisterChildrenCache)((TCFDSFExecutionDMC)e.getDMContext()).registers_cache;
diff --git a/plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/services/TCFDSFRunControl.java b/plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/services/TCFDSFRunControl.java
index b5ffef8c2..8b72abec8 100644
--- a/plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/services/TCFDSFRunControl.java
+++ b/plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/services/TCFDSFRunControl.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -214,7 +214,7 @@ public class TCFDSFRunControl extends AbstractDsfService implements org.eclipse.
if (n != null) n.onContextSuspended(pc, reason, params);
}
};
-
+
private class ExecutionDMC extends TCFDSFExecutionDMC {
final String id;
@@ -224,7 +224,7 @@ public class TCFDSFRunControl extends AbstractDsfService implements org.eclipse.
boolean disposed;
int is_stepping;
int is_resuming;
-
+
public ExecutionDMC(ExecutionDMC parent, final String id) {
super(channel, TCFDSFRunControl.this, parent == null ?
new IDMContext[0] : new IDMContext[] { parent });
@@ -249,7 +249,7 @@ public class TCFDSFRunControl extends AbstractDsfService implements org.eclipse.
}
return n;
}
-
+
@Override
public String toString() {
return baseToString() + ".context[" + id + "]"; //$NON-NLS-1$ //$NON-NLS-2$
@@ -288,7 +288,7 @@ public class TCFDSFRunControl extends AbstractDsfService implements org.eclipse.
public boolean isDisposed() {
return disposed;
}
-
+
@Override
public void dispose() {
assert !disposed;
@@ -304,7 +304,7 @@ public class TCFDSFRunControl extends AbstractDsfService implements org.eclipse.
cache.remove(id);
disposed = true;
}
-
+
/*--------------------------------------------------------------------------------------*/
/* Events */
@@ -386,7 +386,7 @@ public class TCFDSFRunControl extends AbstractDsfService implements org.eclipse.
return true;
}
- public StateChangeReason getStateChangeReason() {
+ public StateChangeReason getStateChangeReason() {
return reason;
}
}
@@ -422,7 +422,7 @@ public class TCFDSFRunControl extends AbstractDsfService implements org.eclipse.
if (tcf_run_service != null) tcf_run_service.addListener(run_listener);
root_dmc = new ExecutionDMC(null, null);
cache.put(null, root_dmc);
- initialize(new RequestMonitor(getExecutor(), monitor) {
+ initialize(new RequestMonitor(getExecutor(), monitor) {
@Override
protected void handleSuccess() {
String[] class_names = {
@@ -435,7 +435,7 @@ public class TCFDSFRunControl extends AbstractDsfService implements org.eclipse.
});
}
- @Override
+ @Override
public void shutdown(RequestMonitor monitor) {
if (tcf_run_service != null) tcf_run_service.removeListener(run_listener);
unregister();
@@ -680,13 +680,13 @@ public class TCFDSFRunControl extends AbstractDsfService implements org.eclipse.
rm.done();
}
}
-
+
public Collection<TCFDSFExecutionDMC> getCachedContexts() {
ArrayList<TCFDSFExecutionDMC> l = new ArrayList<TCFDSFExecutionDMC>();
for (ExecutionDMC dmc : cache.values()) l.add(dmc);
return l;
}
-
+
public int toTCFStepType(StepType step_type) {
switch (step_type) {
case STEP_OVER:
@@ -704,14 +704,14 @@ public class TCFDSFRunControl extends AbstractDsfService implements org.eclipse.
}
return -1;
}
-
+
private class StepIntoAction extends TCFActionStepInto {
-
+
private final ExecutionDMC ctx;
private final RequestMonitor monitor;
-
+
private TCFDSFStack.TCFFrameDMC frame;
-
+
StepIntoAction(TCFLaunch launch, ExecutionDMC ctx, RequestMonitor monitor, boolean src_step) {
super(launch, ctx.run_control_context_cache.getData(), src_step);
this.ctx = ctx;
@@ -763,7 +763,7 @@ public class TCFDSFRunControl extends AbstractDsfService implements org.eclipse.
if (service == null) return null;
return service.getFramesCache(ctx, null);
}
-
+
@Override
protected void exit(Throwable error) {
if (exited) return;
@@ -778,12 +778,12 @@ public class TCFDSFRunControl extends AbstractDsfService implements org.eclipse.
}
private class StepOverAction extends TCFActionStepOver {
-
+
private final ExecutionDMC ctx;
private final RequestMonitor monitor;
-
+
private TCFDSFStack.TCFFrameDMC frame;
-
+
StepOverAction(TCFLaunch launch, ExecutionDMC ctx, RequestMonitor monitor, boolean src_step) {
super(launch, ctx.run_control_context_cache.getData(), src_step);
this.ctx = ctx;
@@ -835,7 +835,7 @@ public class TCFDSFRunControl extends AbstractDsfService implements org.eclipse.
if (service == null) return null;
return service.getFramesCache(ctx, null);
}
-
+
@Override
protected void exit(Throwable error) {
if (exited) return;
@@ -850,12 +850,12 @@ public class TCFDSFRunControl extends AbstractDsfService implements org.eclipse.
}
private class StepOutAction extends TCFActionStepOut {
-
+
private final ExecutionDMC ctx;
private final RequestMonitor monitor;
-
+
private TCFDSFStack.TCFFrameDMC frame;
-
+
StepOutAction(TCFLaunch launch, ExecutionDMC ctx, RequestMonitor monitor) {
super(launch, ctx.run_control_context_cache.getData());
this.ctx = ctx;
@@ -896,7 +896,7 @@ public class TCFDSFRunControl extends AbstractDsfService implements org.eclipse.
if (service == null) return null;
return service.getFramesCache(ctx, null);
}
-
+
@Override
protected void exit(Throwable error) {
if (exited) return;
@@ -1077,7 +1077,7 @@ public class TCFDSFRunControl extends AbstractDsfService implements org.eclipse.
if (ctx.run_control_state_cache.isValid()) {
TCFContextState st = ctx.run_control_state_cache.getData();
if (st != null && st.suspend_reason != null) {
- r = toStateChangeReason(st.suspend_reason);
+ r = toStateChangeReason(st.suspend_reason);
}
}
rm.setData(new ExecutionData(r));
diff --git a/plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/services/TCFDSFStack.java b/plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/services/TCFDSFStack.java
index 58c06bab0..f281fdb18 100644
--- a/plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/services/TCFDSFStack.java
+++ b/plugins/org.eclipse.tm.tcf.dsf/src/org/eclipse/tm/internal/tcf/dsf/services/TCFDSFStack.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* 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
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -41,23 +41,23 @@ import org.osgi.framework.BundleContext;
public class TCFDSFStack extends AbstractDsfService implements IStack {
-
+
public class TCFFrameDMC extends AbstractDMContext implements IFrameDMContext, Comparable<TCFFrameDMC> {
-
+
public final String id;
public final TCFDSFExecutionDMC exe_dmc;
public final TCFDataCache<IStackTrace.StackTraceContext> context_cache;
public final TCFDataCache<TCFSourceRef> source_cache;
-
+
int level;
TCFSourceRef prev_data;
-
+
public TCFFrameDMC(final TCFDSFExecutionDMC exe_dmc, final String id) {
super(TCFDSFStack.this.getSession().getId(), new IDMContext[] { exe_dmc });
this.id = id;
this.exe_dmc = exe_dmc;
context_cache = new TCFDataCache<IStackTrace.StackTraceContext>(channel) {
-
+
@Override
public boolean startDataRetrieval() {
assert command == null;
@@ -76,7 +76,7 @@ public class TCFDSFStack extends AbstractDsfService implements IStack {
return false;
}
};
-
+
source_cache = new TCFDataCache<TCFSourceRef>(channel) {
@Override
@@ -102,7 +102,7 @@ public class TCFDSFStack extends AbstractDsfService implements IStack {
set(null, null, prev_data = data);
return true;
}
-
+
private boolean getSourcePos(final TCFSourceRef data) {
if (tcf_lns_service == null) return true;
if (data.address == null) return true;
@@ -125,23 +125,23 @@ public class TCFDSFStack extends AbstractDsfService implements IStack {
}
};
}
-
+
public int getLevel() {
return level;
}
-
+
@Override
public boolean equals(Object other) {
return super.baseEquals(other) && ((TCFFrameDMC)other).id.equals(id);
}
-
+
@Override
public int hashCode() {
return id.hashCode();
}
-
+
@Override
- public String toString() {
+ public String toString() {
return baseToString() + ".frame[" + id + "]"; //$NON-NLS-1$ //$NON-NLS-2$
}
@@ -149,17 +149,17 @@ public class TCFDSFStack extends AbstractDsfService implements IStack {
if (level < f.level) return -1;
if (level > f.level) return +1;
return 0;
- }
+ }
}
-
+
public static class TCFFrameData implements IFrameDMData {
-
+
public final IStackTrace.StackTraceContext context;
public final IAddress address;
public final int level;
public final String function;
public final ILineNumbers.CodeArea code_area;
-
+
TCFFrameData(TCFFrameDMC dmc) {
context = dmc.context_cache.getData();
TCFSourceRef ref = dmc.source_cache.getData();
@@ -172,7 +172,7 @@ public class TCFDSFStack extends AbstractDsfService implements IStack {
public IAddress getAddress() {
return address;
}
-
+
public String getFunction() {
return function;
}
@@ -196,20 +196,20 @@ public class TCFDSFStack extends AbstractDsfService implements IStack {
return code_area.start_column;
}
}
-
+
private class FramesCache extends TCFDataCache<Map<String,TCFFrameDMC>> {
-
+
private final TCFDSFExecutionDMC dmc;
private final Map<String,TCFFrameDMC> frame_pool;
-
+
private String top_frame_id;
-
+
FramesCache(IChannel channel, TCFDSFExecutionDMC dmc) {
super(channel);
this.dmc = dmc;
frame_pool = new HashMap<String,TCFFrameDMC>();
}
-
+
@Override
public boolean startDataRetrieval() {
assert command == null;
@@ -249,7 +249,7 @@ public class TCFDSFStack extends AbstractDsfService implements IStack {
});
return false;
}
-
+
TCFFrameDMC createFrameDMC(String id, int level) {
TCFFrameDMC n = frame_pool.get(id);
if (n == null) frame_pool.put(id, n = new TCFFrameDMC(dmc, id));
@@ -265,7 +265,7 @@ public class TCFDSFStack extends AbstractDsfService implements IStack {
dmc.source_cache.reset();
}
}
-
+
void dispose() {
}
}
@@ -279,7 +279,7 @@ public class TCFDSFStack extends AbstractDsfService implements IStack {
this.channel = channel;
tcf_stk_service = channel.getRemoteService(IStackTrace.class);
tcf_lns_service = channel.getRemoteService(ILineNumbers.class);
- initialize(new RequestMonitor(getExecutor(), monitor) {
+ initialize(new RequestMonitor(getExecutor(), monitor) {
@Override
protected void handleSuccess() {
String[] class_names = {
@@ -293,7 +293,7 @@ public class TCFDSFStack extends AbstractDsfService implements IStack {
});
}
- @Override
+ @Override
public void shutdown(RequestMonitor monitor) {
getSession().removeServiceEventListener(this);
unregister();
@@ -358,7 +358,7 @@ public class TCFDSFStack extends AbstractDsfService implements IStack {
rm.done();
}
}
-
+
public TCFDataCache<?> getFramesCache(TCFDSFExecutionDMC exe, DataRequestMonitor<?> rm) {
if (tcf_stk_service == null) {
if (rm != null) {
@@ -379,7 +379,7 @@ public class TCFDSFStack extends AbstractDsfService implements IStack {
if (exe.stack_frames_cache == null) exe.stack_frames_cache = new FramesCache(channel, exe);
return (FramesCache)exe.stack_frames_cache;
}
-
+
public void getFrames(final IDMContext dmc, final DataRequestMonitor<IFrameDMContext[]> rm) {
if (dmc instanceof TCFDSFExecutionDMC) {
TCFDSFExecutionDMC exe = (TCFDSFExecutionDMC)dmc;
@@ -482,7 +482,7 @@ public class TCFDSFStack extends AbstractDsfService implements IStack {
rm.done();
}
}
-
+
public TCFFrameDMC getTopFrame(TCFDSFExecutionDMC exe) {
FramesCache cache = (FramesCache)getFramesCache(exe, null);
assert cache != null;
@@ -521,7 +521,7 @@ public class TCFDSFStack extends AbstractDsfService implements IStack {
if (cache != null) cache.invalidateFrames();
}
}
-
+
@DsfServiceEventHandler
public void eventDispatched(IRunControl.ISuspendedDMEvent e) {
FramesCache cache = (FramesCache)((TCFDSFExecutionDMC)e.getDMContext()).stack_frames_cache;
diff --git a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/ITCFSubSystem.java b/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/ITCFSubSystem.java
index aef4786ff..27c72cce3 100644
--- a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/ITCFSubSystem.java
+++ b/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/ITCFSubSystem.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
diff --git a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/Messages.java b/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/Messages.java
index 1b39fc3d0..434e779c3 100644
--- a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/Messages.java
+++ b/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/Messages.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -13,16 +13,16 @@ package org.eclipse.tm.internal.tcf.rse;
import org.eclipse.osgi.util.NLS;
public class Messages extends NLS {
-
+
public static String SysMonitor_AllProcesses;
public static String SysMonitor_Process;
-
+
// PROCESS PROPERTIES
public static String PROCESS_ID_LABEL;
public static String PROCESS_PID_LABEL;
- public static String PROCESS_NAME_LABEL;
- public static String PROCESS_CWD_LABEL;
- public static String PROCESS_ROOT_LABEL;
+ public static String PROCESS_NAME_LABEL;
+ public static String PROCESS_CWD_LABEL;
+ public static String PROCESS_ROOT_LABEL;
public static String PROCESS_UID_LABEL;
public static String PROCESS_USERNAME_LABEL;
public static String PROCESS_GID_LABEL;
@@ -66,12 +66,12 @@ public class Messages extends NLS {
public static String PROCESS_PROCESSOR_LABEL;
public static String PROCESS_RTPRIORITY_LABEL;
public static String PROCESS_POLICY_LABEL;
-
+
public static String PROCESS_ID_TOOLTIP;
public static String PROCESS_PID_TOOLTIP;
- public static String PROCESS_NAME_TOOLTIP;
- public static String PROCESS_CWD_TOOLTIP;
- public static String PROCESS_ROOT_TOOLTIP;
+ public static String PROCESS_NAME_TOOLTIP;
+ public static String PROCESS_CWD_TOOLTIP;
+ public static String PROCESS_ROOT_TOOLTIP;
public static String PROCESS_UID_TOOLTIP;
public static String PROCESS_USERNAME_TOOLTIP;
public static String PROCESS_GID_TOOLTIP;
@@ -115,10 +115,10 @@ public class Messages extends NLS {
public static String PROCESS_PROCESSOR_TOOLTIP;
public static String PROCESS_RTPRIORITY_TOOLTIP;
public static String PROCESS_POLICY_TOOLTIP;
-
+
public static String PROCESS_VMSIZE_VALUE;
public static String PROCESS_VMRSS_VALUE;
-
+
static {
// initialize resource bundle
NLS.initializeMessages(Messages.class.getName(), Messages.class);
diff --git a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/TCFConnectorService.java b/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/TCFConnectorService.java
index 79c7ab469..d1e85dacd 100644
--- a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/TCFConnectorService.java
+++ b/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/TCFConnectorService.java
@@ -37,7 +37,7 @@ public class TCFConnectorService extends BasicConnectorService {
private IChannel channel;
private Throwable channel_error;
private final List<Runnable> wait_list = new ArrayList<Runnable>();
-
+
private boolean poll_timer_started;
public TCFConnectorService(IHost host, int port) {
@@ -91,7 +91,7 @@ public class TCFConnectorService extends BasicConnectorService {
});
return res[0];
}
-
+
private void add_to_wait_list(Runnable cb) {
wait_list.add(cb);
if (poll_timer_started) return;
@@ -103,14 +103,14 @@ public class TCFConnectorService extends BasicConnectorService {
});
poll_timer_started = true;
}
-
+
private void run_wait_list() {
if (wait_list.isEmpty()) return;
Runnable[] r = wait_list.toArray(new Runnable[wait_list.size()]);
wait_list.clear();
for (int i = 0; i < r.length; i++) r[i].run();
}
-
+
private boolean connectTCFChannel(Exception[] res, IProgressMonitor monitor) {
if (channel != null) {
switch (channel.getState()) {
@@ -210,7 +210,7 @@ public class TCFConnectorService extends BasicConnectorService {
if (channel.getState() == IChannel.STATE_OPEN) channel.close();
return false;
}
-
+
public <V extends IService> V getService(Class<V> service_interface) {
if (channel == null || channel.getState() != IChannel.STATE_OPEN) throw new Error("Not connected"); //$NON-NLS-1$
V m = channel.getRemoteService(service_interface);
diff --git a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/processes/TCFProcessAdapter.java b/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/processes/TCFProcessAdapter.java
index 0d4de7704..e1212af97 100644
--- a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/processes/TCFProcessAdapter.java
+++ b/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/processes/TCFProcessAdapter.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -36,7 +36,7 @@ public class TCFProcessAdapter implements IHostProcessToRemoteProcessAdapter {
List<IRemoteProcess> list = new ArrayList<IRemoteProcess>(nodes.length);
for (int idx = 0; idx < nodes.length; idx++) {
TCFProcessResource node = (TCFProcessResource)nodes[idx];
- if (node != null) list.add(new TCFRemoteProcess(context, node));
+ if (node != null) list.add(new TCFRemoteProcess(context, node));
}
return list.toArray(new IRemoteProcess[list.size()]);
}
diff --git a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/processes/TCFProcessResource.java b/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/processes/TCFProcessResource.java
index c040f938b..1b953449a 100644
--- a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/processes/TCFProcessResource.java
+++ b/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/processes/TCFProcessResource.java
@@ -133,19 +133,19 @@ public class TCFProcessResource extends AbstractResource implements IHostProcess
});
return false;
}
-
+
private void toLong(String name) {
Number n = (Number)properties.get(name);
if (n == null || n instanceof Long) return;
properties.put(name, Long.valueOf(n.longValue()));
}
-
+
private void toBigInteger(String name) {
Number n = (Number)properties.get(name);
if (n == null || n instanceof BigInteger) return;
properties.put(name, new BigInteger(n.toString()));
}
-
+
private void setPCProperty(String property, String name) {
Object x = prev.properties.get(name);
Object y = properties.get(name);
@@ -159,7 +159,7 @@ public class TCFProcessResource extends AbstractResource implements IHostProcess
properties.put(property, d);
}
}
-
+
public long getTimestamp() {
return timestamp;
}
@@ -261,9 +261,9 @@ public class TCFProcessResource extends AbstractResource implements IHostProcess
public boolean isRoot() {
return true;
}
-
+
private String notNull(String s) {
- return s == null ? "" : s;
+ return s == null ? "" : s;
}
String getStatusLine() {
@@ -299,11 +299,11 @@ public class TCFProcessResource extends AbstractResource implements IHostProcess
running_wait_list = false;
}
}
-
+
public Throwable getChildrenError() {
return children_error;
}
-
+
public void flushChildrenCache() {
Map<Long,TCFProcessResource> pid2res = rse_service.getProcessCache();
for (TCFProcessResource r : children.values()) {
diff --git a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/processes/TCFProcessService.java b/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/processes/TCFProcessService.java
index 2b12b1abe..1b2893acb 100644
--- a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/processes/TCFProcessService.java
+++ b/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/processes/TCFProcessService.java
@@ -51,7 +51,7 @@ public class TCFProcessService extends AbstractProcessService implements IProces
.getInstance().getConnectorService(host, ITCFSubSystem.class);
root = new TCFProcessResource(this, null, null, null);
}
-
+
public TCFConnectorService getTCFConnectorService() {
return connector;
}
@@ -250,7 +250,7 @@ public class TCFProcessService extends AbstractProcessService implements IProces
roots[0] = getProcess(1, monitor);
return roots;
}
-
+
Map<Long,TCFProcessResource> getProcessCache() {
return pid2res;
}
diff --git a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/processes/TCFSystemViewProcessAdapterFactory.java b/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/processes/TCFSystemViewProcessAdapterFactory.java
index 47d1954ac..2d604cf48 100644
--- a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/processes/TCFSystemViewProcessAdapterFactory.java
+++ b/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/processes/TCFSystemViewProcessAdapterFactory.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -28,9 +28,9 @@ public class TCFSystemViewProcessAdapterFactory implements IAdapterFactory {
@SuppressWarnings("unchecked")
public Object getAdapter(Object adaptableObject, Class adapterType) {
assert adaptableObject instanceof TCFRemoteProcess;
- if (adapterType == IPropertySource.class) {
+ if (adapterType == IPropertySource.class) {
((ISystemViewElementAdapter)adapter).setPropertySourceInput(adaptableObject);
- }
+ }
return adapter;
}
@@ -39,12 +39,12 @@ public class TCFSystemViewProcessAdapterFactory implements IAdapterFactory {
return new Class[] {
ISystemViewElementAdapter.class,
ISystemDragDropAdapter.class,
- ISystemRemoteElementAdapter.class,
+ ISystemRemoteElementAdapter.class,
IPropertySource.class,
IWorkbenchAdapter.class,
IActionFilter.class,
IDeferredWorkbenchAdapter.class,
IRemoteObjectIdentifier.class,
- };
+ };
}
}
diff --git a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/processes/TCFSystemViewRemoteProcessAdapter.java b/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/processes/TCFSystemViewRemoteProcessAdapter.java
index dbd93e8e0..f28fdcde5 100644
--- a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/processes/TCFSystemViewRemoteProcessAdapter.java
+++ b/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/processes/TCFSystemViewRemoteProcessAdapter.java
@@ -269,7 +269,7 @@ public class TCFSystemViewRemoteProcessAdapter extends AbstractSystemViewAdapter
if (v == null) v = "";
return v;
}
-
+
private Object internalGetPropertyValueOrNull(Object property) {
TCFRemoteProcess process = (TCFRemoteProcess)propertySourceInput;
Object p = process.getProperties().get(property);
@@ -310,7 +310,7 @@ public class TCFSystemViewRemoteProcessAdapter extends AbstractSystemViewAdapter
@Override
public Object getPropertyValue(Object property, boolean formatted) {
if (formatted) return getPropertyValue(property);
-
+
TCFRemoteProcess process = (TCFRemoteProcess)propertySourceInput;
Object p = process.getProperties().get(property);
if (p == null) {
@@ -333,7 +333,7 @@ public class TCFSystemViewRemoteProcessAdapter extends AbstractSystemViewAdapter
}
return p;
}
-
+
private String formatPercent(Object o) {
if (o instanceof Number) {
Number n = (Number)o;
diff --git a/plugins/org.eclipse.tm.tcf/src/org/eclipse/tm/tcf/ssl/TCFSecurityManager.java b/plugins/org.eclipse.tm.tcf/src/org/eclipse/tm/tcf/ssl/TCFSecurityManager.java
index 30b9d4af2..95948efca 100644
--- a/plugins/org.eclipse.tm.tcf/src/org/eclipse/tm/tcf/ssl/TCFSecurityManager.java
+++ b/plugins/org.eclipse.tm.tcf/src/org/eclipse/tm/tcf/ssl/TCFSecurityManager.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2009 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -38,10 +38,10 @@ import org.eclipse.tm.tcf.protocol.Protocol;
/**
- * This class implements keys and certificates management for secure TCF channels.
+ * This class implements keys and certificates management for secure TCF channels.
*/
public class TCFSecurityManager {
-
+
public static File getCertificatesDirectory() {
File certs = Activator.getDefault().getStateLocation().append("certificates").toFile(); //$NON-NLS-1$
if (!certs.exists()) certs.mkdirs();
@@ -54,7 +54,7 @@ public class TCFSecurityManager {
if (!certs.exists()) certs.mkdirs();
final CertificateFactory cf = CertificateFactory.getInstance("X.509"); //$NON-NLS-1$
SSLContext context = SSLContext.getInstance("TLS"); //$NON-NLS-1$
-
+
X509ExtendedKeyManager km = new X509ExtendedKeyManager() {
public X509Certificate[] getCertificateChain(String alias) {
@@ -70,7 +70,7 @@ public class TCFSecurityManager {
return null;
}
}
-
+
public PrivateKey getPrivateKey(String alias) {
File f = new File(certs, "Local.priv"); //$NON-NLS-1$
try {
@@ -82,7 +82,7 @@ public class TCFSecurityManager {
if (s == null) new Exception("Invalid format"); //$NON-NLS-1$
else if (s.indexOf("-----BEGIN ") == 0) app = true; //$NON-NLS-1$
else if (s.indexOf("-----END ") == 0) break; //$NON-NLS-1$
- else if (app) bf.append(s);
+ else if (app) bf.append(s);
}
r.close();
KeyFactory kf = KeyFactory.getInstance("RSA"); //$NON-NLS-1$
@@ -94,26 +94,26 @@ public class TCFSecurityManager {
return null;
}
}
-
+
public String[] getClientAliases(String keyType, Principal[] issuers) {
return new String[] { "TCF" }; //$NON-NLS-1$
}
-
+
public String chooseClientAlias(String[] keyType, Principal[] issuers, Socket socket) {
return "TCF"; //$NON-NLS-1$
}
-
+
public String[] getServerAliases(String keyType, Principal[] issuers) {
return new String[] { "TCF" }; //$NON-NLS-1$
}
-
+
public String chooseServerAlias(String keyType, Principal[] issuers, Socket socket) {
return "TCF"; //$NON-NLS-1$
}
};
-
+
X509TrustManager tm = new X509TrustManager() {
-
+
public void checkClientTrusted(X509Certificate[] chain, String auth_type) throws CertificateException {
if ("RSA".equals(auth_type) && chain != null && chain.length == 1) { //$NON-NLS-1$
for (X509Certificate cert : getAcceptedIssuers()) {
@@ -122,7 +122,7 @@ public class TCFSecurityManager {
}
throw new CertificateException("Client certificate validation failed"); //$NON-NLS-1$
}
-
+
public void checkServerTrusted(X509Certificate[] chain, String auth_type) throws CertificateException {
if ("RSA".equals(auth_type) && chain != null && chain.length == 1) { //$NON-NLS-1$
for (X509Certificate cert : getAcceptedIssuers()) {
@@ -131,7 +131,7 @@ public class TCFSecurityManager {
}
throw new CertificateException("Server certificate validation failed"); //$NON-NLS-1$
}
-
+
public X509Certificate[] getAcceptedIssuers() {
ArrayList<X509Certificate> list = new ArrayList<X509Certificate>();
for (String fnm : certs.list()) {
@@ -149,7 +149,7 @@ public class TCFSecurityManager {
return list.toArray(new X509Certificate[list.size()]);
}
};
-
+
context.init(new KeyManager[] { km }, new TrustManager[] { tm }, null);
return context;
}

Back to the top