org.eclipse.debug.ui.actions.IToggleBreakpointsTarget Java Examples

The following examples show how to use org.eclipse.debug.ui.actions.IToggleBreakpointsTarget. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ToggleBreakpointsTargetFactory.java    From corrosion with Eclipse Public License 2.0 5 votes vote down vote up
@Override
public IToggleBreakpointsTarget createToggleTarget(String targetID) {
	if (FACTORY_ID.equals(targetID)) {
		return new ToggleBreakpointAdapter();
	}
	return null;
}
 
Example #2
Source File: StratumBreakpointAdapterFactory.java    From xtext-eclipse with Eclipse Public License 2.0 5 votes vote down vote up
@SuppressWarnings("unchecked")
@Override
public <T> T getAdapter(Object adaptableObject, Class<T> adapterType) {
	if (adaptableObject instanceof XtextEditor && adapterType == IToggleBreakpointsTarget.class) {
		return (T) this;
	}
	return null;
}
 
Example #3
Source File: ScriptBreakpointAdapterFactory.java    From birt with Eclipse Public License 1.0 5 votes vote down vote up
public Object getAdapter( Object adaptableObject, Class adapterType )
{
	if (adapterType == IRunToLineTarget.class) {
		
		return new ScriptRunToLineAdapter();
	}
	else if (adapterType == IToggleBreakpointsTarget.class)
	{
		return new ScriptLineBreakpointAdapter( );
	}
	return null;
}
 
Example #4
Source File: PyToggleTargetAdapter.java    From Pydev with Eclipse Public License 1.0 5 votes vote down vote up
@SuppressWarnings("unchecked")
@Override
public <T> T getAdapter(Object adaptableObject, Class<T> adapterType) {
    if (adaptableObject instanceof ITextEditor && adapterType == IToggleBreakpointsTarget.class) {
        ITextEditor iTextEditor = (ITextEditor) adaptableObject;
        if (canToggleFor(iTextEditor)) {
            return (T) new PyDjangoToggleBreakpointsTarget();
        }
        return null;
    }

    return null;
}
 
Example #5
Source File: PyBreakpointRulerAction.java    From Pydev with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * This is the function that actually adds the marker to the Eclipse
 * structure.
 */
protected void addMarker() {
    IDocument document = getDocument();
    int rulerLine = getInfo().getLineOfLastMouseButtonActivity();
    IToggleBreakpointsTarget adapter = (IToggleBreakpointsTarget) getTextEditor().getAdapter(
            IToggleBreakpointsTarget.class);
    if (adapter instanceof IPyToggleBreakpointsTarget) {
        IPyToggleBreakpointsTarget iPyToggleBreakpointsTarget = (IPyToggleBreakpointsTarget) adapter;
        iPyToggleBreakpointsTarget.addBreakpointMarker(document, rulerLine + 1, fTextEditor);
    } else {
        addBreakpointMarker(document, rulerLine + 1, fTextEditor, PyBreakpoint.PY_BREAK_TYPE_PYTHON);
    }
}
 
Example #6
Source File: LangToggleBreakpointsTargetFactory.java    From goclipse with Eclipse Public License 1.0 5 votes vote down vote up
@Override
public IToggleBreakpointsTarget createToggleTarget(String targetID) {
	if(targetID.equals(DebugUI_Actual.LANG_BREAKPOINT_FACTORY_ID)) {
		return DebugUI_Actual.createToggleBreakPointAdapter();
	}
	if(targetID.equals(DYNAMIC_PRINTF_FACTORY_ID)) {
		return DebugUI_Actual.createDynamicPrintfBreakpoint();
	}
	return null;
}
 
Example #7
Source File: TypeScriptAdapterFactory.java    From typescript.java with MIT License 4 votes vote down vote up
public Object getAdapter(Object adaptableObject, Class adapterType) {
	if (adapterType.equals(IToggleBreakpointsTarget.class)) {
		return getToggleBreakpointAdapter();
	}
	return null;
}
 
Example #8
Source File: TypeScriptAdapterFactory.java    From typescript.java with MIT License 4 votes vote down vote up
public Class[] getAdapterList() {
	return new Class[] { IToggleBreakpointsTarget.class };
}
 
Example #9
Source File: ScriptBreakpointAdapterFactory.java    From birt with Eclipse Public License 1.0 4 votes vote down vote up
public Class[] getAdapterList( )
{
	return new Class[]{
		IToggleBreakpointsTarget.class, IRunToLineTarget.class
	};
}
 
Example #10
Source File: PyToggleTargetAdapter.java    From Pydev with Eclipse Public License 1.0 4 votes vote down vote up
@Override
public Class<?>[] getAdapterList() {
    return new Class[] { IToggleBreakpointsTarget.class };
}