blob: 9d9e1ba9df686cdfe2ee1ca1b47f1f0c1658c898 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2004 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/cpl-v10.html
*
* Contributors:
* IBM Corporation - initial implementation
*******************************************************************************/
package org.eclipse.debug.internal.ui.actions.breakpointGroups;
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IResource;
import org.eclipse.debug.core.model.IBreakpoint;
/**
* An action which groups all breakpoints according to their resource
*/
public class GroupAllByFileAction extends AbstractGroupBreakpointsAction {
/**
* @param breakpoint
* @return
*/
protected String getGroup(IBreakpoint breakpoint) {
String group= null;
IMarker marker = breakpoint.getMarker();
if (marker != null) {
IResource resource = marker.getResource();
group= resource.getName();
}
return group;
}
}