Community
Participate
Working Groups
/*******************************************************************************
* Copyright (c) 2010 Wind River Systems, Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Anton Leherbauer (Wind River Systems) - initial API and implementation
* Freescale Semiconductor - refactoring
*******************************************************************************/
package org.eclipse.cdt.debug.internal.core;
import org.eclipse.core.runtime.IStatus;
/** IRequest object used in the asynchronous method {@link ICWatchpointTarget#getSize()} */
interface GetSizeRequest extends IRequest {
int getSize();
int getSize(); // returns -1 if size not available
void setSize(int size);
};
}
private static class GetSizeRequest extends CRequest implements ICWatchpointTarget.GetSizeRequest {
int fSize;
int fSize = -1;
public int getSize() {
return fSize;
* org.eclipse.jface.viewers.ISelection)
*/
public void selectionChanged(final IAction action, ISelection selection) {
fVar = null;
if (selection == null || selection.isEmpty()) {
action.setEnabled(false);
return;
if (expressionService != null) {
final DataRequestMonitor<IExpressionDMAddress> drm = new DataRequestMonitor<IExpressionDMAddress>(getSession().getExecutor(), null) {
@Override
public void handleSuccess() {
public void handleCompleted() {
request.setSize(getData().getSize());
if (isSuccess()) {
request.done();
expressionService.getExpressionAddressData(exprDmc, drm);
else {
});
request.setSize(-1);
assert getData().getSize() > 0;
request.setCanCreate(true);
request.setCanCreate(false);
/**