本文整理汇总了Java中com.intellij.debugger.engine.requests.RequestManagerImpl类的典型用法代码示例。如果您正苦于以下问题:Java RequestManagerImpl类的具体用法?Java RequestManagerImpl怎么用?Java RequestManagerImpl使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
RequestManagerImpl类属于com.intellij.debugger.engine.requests包,在下文中一共展示了RequestManagerImpl类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: disableBreakpoints
import com.intellij.debugger.engine.requests.RequestManagerImpl; //导入依赖的package包/类
public void disableBreakpoints(@NotNull final DebugProcessImpl debugProcess) {
final List<Breakpoint> breakpoints = getBreakpoints();
if (!breakpoints.isEmpty()) {
final RequestManagerImpl requestManager = debugProcess.getRequestsManager();
for (Breakpoint breakpoint : breakpoints) {
breakpoint.markVerified(requestManager.isVerified(breakpoint));
requestManager.deleteRequest(breakpoint);
}
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
updateBreakpointsUI();
}
});
}
}
示例2: getEventDescriptors
import com.intellij.debugger.engine.requests.RequestManagerImpl; //导入依赖的package包/类
@NotNull
public static List<Pair<Breakpoint, Event>> getEventDescriptors(SuspendContextImpl suspendContext) {
DebuggerManagerThreadImpl.assertIsManagerThread();
if(suspendContext == null) {
return Collections.emptyList();
}
final EventSet events = suspendContext.getEventSet();
if(events == null) {
return Collections.emptyList();
}
final List<Pair<Breakpoint, Event>> eventDescriptors = new SmartList<Pair<Breakpoint, Event>>();
final RequestManagerImpl requestManager = suspendContext.getDebugProcess().getRequestsManager();
for (final Event event : events) {
final Requestor requestor = requestManager.findRequestor(event.request());
if (requestor instanceof Breakpoint) {
eventDescriptors.add(Pair.create((Breakpoint)requestor, event));
}
}
return eventDescriptors;
}
示例3: actionPerformed
import com.intellij.debugger.engine.requests.RequestManagerImpl; //导入依赖的package包/类
public void actionPerformed(AnActionEvent e) {
Project project = e.getData(PlatformDataKeys.PROJECT);
if (project == null) {
return;
}
DebuggerManagerEx debugManager = DebuggerManagerEx.getInstanceEx(project);
if (debugManager == null) {
return;
}
final BreakpointManager manager = debugManager.getBreakpointManager();
final PlaceInDocument place = getPlace(e);
if(place != null) {
Breakpoint breakpoint = manager.findBreakpoint(place.getDocument(), place.getOffset(), MethodBreakpoint.CATEGORY);
if(breakpoint == null) {
final int methodLine = place.getDocument().getLineNumber(place.getOffset());
MethodBreakpoint methodBreakpoint = manager.addMethodBreakpoint(place.getDocument(), methodLine);
if(methodBreakpoint != null) {
RequestManagerImpl.createRequests(methodBreakpoint);
}
}
else {
manager.removeBreakpoint(breakpoint);
}
}
}
示例4: fireBreakpointChanged
import com.intellij.debugger.engine.requests.RequestManagerImpl; //导入依赖的package包/类
public void fireBreakpointChanged(Breakpoint breakpoint) {
RequestManagerImpl.updateRequests(breakpoint);
if (myAllowMulticasting) {
// can be invoked from non-AWT thread
myAlarm.cancelAllRequests();
final Runnable runnable = new Runnable() {
@Override
public void run() {
myAlarm.addRequest(new Runnable() {
@Override
public void run() {
myDispatcher.getMulticaster().breakpointsChanged();
}
}, 100);
}
};
if (ApplicationManager.getApplication().isDispatchThread()) {
runnable.run();
}
else {
SwingUtilities.invokeLater(runnable);
}
}
}
示例5: getEventDescriptors
import com.intellij.debugger.engine.requests.RequestManagerImpl; //导入依赖的package包/类
@NotNull
public static List<Pair<Breakpoint, Event>> getEventDescriptors(SuspendContextImpl suspendContext) {
DebuggerManagerThreadImpl.assertIsManagerThread();
if(suspendContext == null) {
return Collections.emptyList();
}
final EventSet events = suspendContext.getEventSet();
if(events == null) {
return Collections.emptyList();
}
final List<Pair<Breakpoint, Event>> eventDescriptors = new SmartList<Pair<Breakpoint, Event>>();
final RequestManagerImpl requestManager = suspendContext.getDebugProcess().getRequestsManager();
for (final Event event : events) {
final Requestor requestor = requestManager.findRequestor(event.request());
if (requestor instanceof Breakpoint) {
eventDescriptors.add(new Pair<Breakpoint, Event>((Breakpoint)requestor, event));
}
}
return eventDescriptors;
}
示例6: DebugProcessImpl
import com.intellij.debugger.engine.requests.RequestManagerImpl; //导入依赖的package包/类
protected DebugProcessImpl(Project project)
{
myProject = project;
myDebuggerManagerThread = new DebuggerManagerThreadImpl(myDisposable, myProject);
myRequestManager = new RequestManagerImpl(this);
NodeRendererSettings.getInstance().addListener(this::reloadRenderers, myDisposable);
reloadRenderers();
myDebugProcessDispatcher.addListener(new DebugProcessListener()
{
@Override
public void paused(SuspendContext suspendContext)
{
myThreadBlockedMonitor.stopWatching(suspendContext.getSuspendPolicy() != EventRequest.SUSPEND_ALL ? suspendContext.getThread() : null);
}
});
}
示例7: disableBreakpoints
import com.intellij.debugger.engine.requests.RequestManagerImpl; //导入依赖的package包/类
public void disableBreakpoints(@NotNull final DebugProcessImpl debugProcess)
{
final List<Breakpoint> breakpoints = getBreakpoints();
if(!breakpoints.isEmpty())
{
final RequestManagerImpl requestManager = debugProcess.getRequestsManager();
for(Breakpoint breakpoint : breakpoints)
{
breakpoint.markVerified(requestManager.isVerified(breakpoint));
requestManager.deleteRequest(breakpoint);
}
SwingUtilities.invokeLater(new Runnable()
{
@Override
public void run()
{
updateBreakpointsUI();
}
});
}
}
示例8: getEventDescriptors
import com.intellij.debugger.engine.requests.RequestManagerImpl; //导入依赖的package包/类
@NotNull
public static List<Pair<Breakpoint, Event>> getEventDescriptors(@Nullable SuspendContextImpl suspendContext)
{
DebuggerManagerThreadImpl.assertIsManagerThread();
if(suspendContext != null)
{
EventSet events = suspendContext.getEventSet();
if(!ContainerUtil.isEmpty(events))
{
List<Pair<Breakpoint, Event>> eventDescriptors = ContainerUtil.newSmartList();
RequestManagerImpl requestManager = suspendContext.getDebugProcess().getRequestsManager();
for(Event event : events)
{
Requestor requestor = requestManager.findRequestor(event.request());
if(requestor instanceof Breakpoint)
{
eventDescriptors.add(Pair.create((Breakpoint) requestor, event));
}
}
return eventDescriptors;
}
}
return Collections.emptyList();
}
示例9: DebugProcessImpl
import com.intellij.debugger.engine.requests.RequestManagerImpl; //导入依赖的package包/类
protected DebugProcessImpl(Project project) {
myProject = project;
myDebuggerManagerThread = new DebuggerManagerThreadImpl(myDisposable, myProject);
myRequestManager = new RequestManagerImpl(this);
NodeRendererSettings.getInstance().addListener(mySettingsListener);
loadRenderers();
myDebugProcessDispatcher.addListener(new DebugProcessAdapter() {
@Override
public void paused(SuspendContext suspendContext) {
myThreadBlockedMonitor.stopWatching(suspendContext.getThread());
}
});
}
示例10: calcIcon
import com.intellij.debugger.engine.requests.RequestManagerImpl; //导入依赖的package包/类
private Icon calcIcon(@Nullable DebugProcessImpl debugProcess) {
final boolean muted = debugProcess != null && isMuted(debugProcess);
if (!isEnabled()) {
return getDisabledIcon(muted);
}
myInvalidMessage = "";
if (!isValid()) {
return getInvalidIcon(muted);
}
if (debugProcess == null) {
return getSetIcon(muted);
}
final RequestManagerImpl requestsManager = debugProcess.getRequestsManager();
final boolean isVerified = myCachedVerifiedState || requestsManager.isVerified(this);
final String warning = requestsManager.getWarning(this);
if (warning != null) {
myInvalidMessage = warning;
if (!isVerified) {
return getInvalidIcon(muted);
}
return getVerifiedWarningsIcon(muted);
}
if (isVerified) {
return getVerifiedIcon(muted);
}
return getSetIcon(muted);
}
示例11: createRequest
import com.intellij.debugger.engine.requests.RequestManagerImpl; //导入依赖的package包/类
public void createRequest(DebugProcessImpl debugProcess) {
DebuggerManagerThreadImpl.assertIsManagerThread();
if (!shouldCreateRequest(debugProcess)) {
return;
}
try {
RequestManagerImpl requestManager = debugProcess.getRequestsManager();
if (isWatchEntry()) {
MethodEntryRequest entryRequest = MethodBreakpoint.findRequest(debugProcess, MethodEntryRequest.class, this);
if (entryRequest == null) {
entryRequest = requestManager.createMethodEntryRequest(this);
}
else {
entryRequest.disable();
}
entryRequest.addClassFilter(getClassPattern());
debugProcess.getRequestsManager().enableRequest(entryRequest);
}
if (isWatchExit()) {
MethodExitRequest exitRequest = MethodBreakpoint.findRequest(debugProcess, MethodExitRequest.class, this);
if (exitRequest == null) {
exitRequest = requestManager.createMethodExitRequest(this);
}
else {
exitRequest.disable();
}
exitRequest.addClassFilter(getClassPattern());
debugProcess.getRequestsManager().enableRequest(exitRequest);
}
}
catch (Exception e) {
LOG.debug(e);
}
}
示例12: perform
import com.intellij.debugger.engine.requests.RequestManagerImpl; //导入依赖的package包/类
public void perform(@NotNull final Project project, final AnActionEvent event) {
PlaceInDocument place = getPlace(project, event);
if(place == null) {
return;
}
ExpandRegionAction.expandRegionAtCaret(project, event.getData(PlatformDataKeys.EDITOR));
Document document = place.getDocument();
int line = document.getLineNumber(place.getOffset());
DebuggerManagerEx debugManager = DebuggerManagerEx.getInstanceEx(project);
if (debugManager == null) {
return;
}
BreakpointManager manager = debugManager.getBreakpointManager();
final Breakpoint breakpoint = manager.findBreakpoint(document, place.getOffset(), LineBreakpoint.CATEGORY);
if(breakpoint == null) {
LineBreakpoint lineBreakpoint = manager.addLineBreakpoint(document, line);
if(lineBreakpoint != null) {
lineBreakpoint.REMOVE_AFTER_HIT = myTemporary;
RequestManagerImpl.createRequests(lineBreakpoint);
}
} else {
if (!breakpoint.REMOVE_AFTER_HIT && myTemporary) {
breakpoint.REMOVE_AFTER_HIT = true;
breakpoint.updateUI();
} else {
manager.removeBreakpoint(breakpoint);
}
}
}
示例13: calcIcon
import com.intellij.debugger.engine.requests.RequestManagerImpl; //导入依赖的package包/类
private Icon calcIcon(@Nullable DebugProcessImpl debugProcess) {
final boolean muted = debugProcess != null && isMuted(debugProcess);
if (!ENABLED) {
return getDisabledIcon(muted);
}
myInvalidMessage = "";
if (!isValid()) {
return getInvalidIcon(muted);
}
if (debugProcess == null) {
return getSetIcon(muted);
}
final RequestManagerImpl requestsManager = debugProcess.getRequestsManager();
final boolean isVerified = myCachedVerifiedState || requestsManager.isVerified(this);
final String warning = requestsManager.getWarning(this);
if (warning != null) {
myInvalidMessage = warning;
if (!isVerified) {
return getInvalidIcon(muted);
}
return getVerifiedWarningsIcon(muted);
}
if (isVerified) {
return getVerifiedIcon(muted);
}
return getSetIcon(muted);
}
示例14: createRequest
import com.intellij.debugger.engine.requests.RequestManagerImpl; //导入依赖的package包/类
public void createRequest(DebugProcessImpl debugProcess) {
DebuggerManagerThreadImpl.assertIsManagerThread();
if (!ENABLED || !debugProcess.isAttached() || debugProcess.areBreakpointsMuted() || !debugProcess.getRequestsManager().findRequests(this).isEmpty()) {
return;
}
try {
RequestManagerImpl requestManager = debugProcess.getRequestsManager();
if (WATCH_ENTRY) {
MethodEntryRequest entryRequest = (MethodEntryRequest)findRequest(debugProcess, MethodEntryRequest.class);
if (entryRequest == null) {
entryRequest = requestManager.createMethodEntryRequest(this);
}
else {
entryRequest.disable();
}
entryRequest.addClassFilter(myClassPattern);
debugProcess.getRequestsManager().enableRequest(entryRequest);
}
if (WATCH_EXIT) {
MethodExitRequest exitRequest = (MethodExitRequest)findRequest(debugProcess, MethodExitRequest.class);
if (exitRequest == null) {
exitRequest = requestManager.createMethodExitRequest(this);
}
else {
exitRequest.disable();
}
exitRequest.addClassFilter(myClassPattern);
debugProcess.getRequestsManager().enableRequest(exitRequest);
}
}
catch (Exception e) {
LOG.debug(e);
}
}
示例15: createLocationBreakpointRequest
import com.intellij.debugger.engine.requests.RequestManagerImpl; //导入依赖的package包/类
static void createLocationBreakpointRequest(@NotNull FilteredRequestor requestor, @Nullable Location location, @NotNull DebugProcessImpl debugProcess)
{
if(location != null)
{
RequestManagerImpl requestsManager = debugProcess.getRequestsManager();
requestsManager.enableRequest(requestsManager.createBreakpointRequest(requestor, location));
}
}