Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Khouzam2015-03-23 13:20:23 +0000
committerMarc Khouzam2015-03-23 13:20:23 +0000
commit1a11a46fda80f2b7387beb544df887f85a3dd227 (patch)
tree6d877627d3b4e0c688dc011974546034fa4b0e9e
parent51e701d5f431237e8ee2e0079f481e8518a99129 (diff)
downloadorg.eclipse.cdt-1a11a46fda80f2b7387beb544df887f85a3dd227.tar.gz
org.eclipse.cdt-1a11a46fda80f2b7387beb544df887f85a3dd227.tar.xz
org.eclipse.cdt-1a11a46fda80f2b7387beb544df887f85a3dd227.zip
Adding friend access
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/debugview/layout/actions/DsfDebugViewLayoutCommand.java31
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/debugview/layout/actions/DsfGroupDebugContextsCommand.java1
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/debugview/layout/actions/DsfUngroupDebugContextsCommand.java1
-rw-r--r--dsf/org.eclipse.cdt.dsf/META-INF/MANIFEST.MF4
4 files changed, 17 insertions, 20 deletions
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/debugview/layout/actions/DsfDebugViewLayoutCommand.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/debugview/layout/actions/DsfDebugViewLayoutCommand.java
index a50ed52752a..72f8b943b03 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/debugview/layout/actions/DsfDebugViewLayoutCommand.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/debugview/layout/actions/DsfDebugViewLayoutCommand.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Texas Instruments, Inc. and others.
+ * Copyright (c) 2011, 2015 Texas Instruments, Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -32,7 +32,6 @@ import org.eclipse.debug.core.commands.IEnabledStateRequest;
/**
* @since 2.2
*/
-@SuppressWarnings("restriction")
public abstract class DsfDebugViewLayoutCommand implements IDebugCommandHandler{
protected final DsfExecutor fExecutor;
@@ -55,27 +54,27 @@ public abstract class DsfDebugViewLayoutCommand implements IDebugCommandHandler{
* - all elements are from a DSF session.
* - all elements are from the same DSF session.
*/
- protected IExecutionDMContext[] getDMContexts( IDebugCommandRequest request) {
+ protected IExecutionDMContext[] getDMContexts(IDebugCommandRequest request) {
HashSet<IExecutionDMContext> ret = new HashSet<IExecutionDMContext>();
String sessionId = null;
- for( Object obj : request.getElements()) {
- if(!( obj instanceof IDMVMContext ))
+ for (Object obj : request.getElements()) {
+ if (!(obj instanceof IDMVMContext))
return EMPTY_ARRAY;
IDMContext dmContext = ((IDMVMContext)obj).getDMContext();
IExecutionDMContext exeContext = DMContexts.getAncestorOfType(dmContext, IExecutionDMContext.class);
- if( exeContext == null)
+ if (exeContext == null)
return EMPTY_ARRAY;
// make sure all elements are from the same DSF session.
- if( sessionId == null) {
+ if (sessionId == null) {
sessionId = dmContext.getSessionId();
}
else {
- if( !sessionId.equals(dmContext.getSessionId()))
+ if (!sessionId.equals(dmContext.getSessionId()))
return EMPTY_ARRAY;
}
@@ -86,13 +85,13 @@ public abstract class DsfDebugViewLayoutCommand implements IDebugCommandHandler{
@Override
public void canExecute(final IEnabledStateRequest request) {
- final IExecutionDMContext[] executionContexts = getDMContexts( request);
- if( executionContexts.length > 0 && !fExecutor.isTerminated()) {
+ final IExecutionDMContext[] executionContexts = getDMContexts(request);
+ if (executionContexts.length > 0 && !fExecutor.isTerminated()) {
fExecutor.submit(new DsfRunnable() {
@Override
public void run() {
IExecutionContextTranslator translator = fTracker.getService(IExecutionContextTranslator.class);
- if( translator != null) {
+ if (translator != null) {
canExecuteOnDsfThread(translator, executionContexts,
new DataRequestMonitor<Boolean>(fExecutor, null) {
@Override
@@ -118,13 +117,13 @@ public abstract class DsfDebugViewLayoutCommand implements IDebugCommandHandler{
@Override
public boolean execute(final IDebugCommandRequest request) {
- final IExecutionDMContext[] executionContexts = getDMContexts( request);
- if( executionContexts.length > 0 && !fExecutor.isTerminated()) {
+ final IExecutionDMContext[] executionContexts = getDMContexts(request);
+ if (executionContexts.length > 0 && !fExecutor.isTerminated()) {
fExecutor.submit(new DsfRunnable() {
@Override
public void run() {
IExecutionContextTranslator translator = fTracker.getService(IExecutionContextTranslator.class);
- if( translator != null) {
+ if (translator != null) {
executeOnDsfThread(translator, executionContexts,
new RequestMonitor(fExecutor, null) {
@Override
@@ -143,6 +142,6 @@ public abstract class DsfDebugViewLayoutCommand implements IDebugCommandHandler{
return true;
}
- abstract void executeOnDsfThread( IExecutionContextTranslator translator, IExecutionDMContext[] contexts, RequestMonitor requestMonitor);
- abstract void canExecuteOnDsfThread( IExecutionContextTranslator translator, IExecutionDMContext[] contexts, DataRequestMonitor<Boolean> rm);
+ abstract void executeOnDsfThread(IExecutionContextTranslator translator, IExecutionDMContext[] contexts, RequestMonitor rm);
+ abstract void canExecuteOnDsfThread(IExecutionContextTranslator translator, IExecutionDMContext[] contexts, DataRequestMonitor<Boolean> rm);
}
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/debugview/layout/actions/DsfGroupDebugContextsCommand.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/debugview/layout/actions/DsfGroupDebugContextsCommand.java
index 3f81782065c..121380b4492 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/debugview/layout/actions/DsfGroupDebugContextsCommand.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/debugview/layout/actions/DsfGroupDebugContextsCommand.java
@@ -20,7 +20,6 @@ import org.eclipse.debug.core.commands.IDebugCommandHandler;
/**
* @since 2.2
*/
-@SuppressWarnings("restriction")
public class DsfGroupDebugContextsCommand extends DsfDebugViewLayoutCommand implements IDebugCommandHandler {
public DsfGroupDebugContextsCommand(DsfSession session) {
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/debugview/layout/actions/DsfUngroupDebugContextsCommand.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/debugview/layout/actions/DsfUngroupDebugContextsCommand.java
index 472a9645f8d..9b57eaa78d1 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/debugview/layout/actions/DsfUngroupDebugContextsCommand.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/debugview/layout/actions/DsfUngroupDebugContextsCommand.java
@@ -20,7 +20,6 @@ import org.eclipse.debug.core.commands.IDebugCommandHandler;
/**
* @since 2.2
*/
-@SuppressWarnings("restriction")
public class DsfUngroupDebugContextsCommand extends DsfDebugViewLayoutCommand implements IDebugCommandHandler {
public DsfUngroupDebugContextsCommand(DsfSession session) {
diff --git a/dsf/org.eclipse.cdt.dsf/META-INF/MANIFEST.MF b/dsf/org.eclipse.cdt.dsf/META-INF/MANIFEST.MF
index d4a438d61c4..72520e44e02 100644
--- a/dsf/org.eclipse.cdt.dsf/META-INF/MANIFEST.MF
+++ b/dsf/org.eclipse.cdt.dsf/META-INF/MANIFEST.MF
@@ -14,8 +14,8 @@ Require-Bundle: org.eclipse.core.runtime,
Bundle-ActivationPolicy: lazy
Export-Package: org.eclipse.cdt.dsf.concurrent,
org.eclipse.cdt.dsf.datamodel,
- org.eclipse.cdt.dsf.debug.internal.provisional.model;x-friends:="org.eclipse.cdt.dsf.ui, org.eclipse.cdt.dsf.gdb",
- org.eclipse.cdt.dsf.debug.internal.provisional.service;x-internal:=true,
+ org.eclipse.cdt.dsf.debug.internal.provisional.model;x-friends:="org.eclipse.cdt.dsf.ui,org.eclipse.cdt.dsf.gdb",
+ org.eclipse.cdt.dsf.debug.internal.provisional.service;x-friends:="org.eclipse.cdt.dsf.ui",
org.eclipse.cdt.dsf.debug.model,
org.eclipse.cdt.dsf.debug.service,
org.eclipse.cdt.dsf.debug.service.command,

Back to the top