mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
js "Inspect in IDE" — add rerun action (actually, "reload page", to be discussed)
This commit is contained in:
@@ -21,6 +21,7 @@ import com.intellij.execution.ui.ConsoleView;
|
||||
import com.intellij.execution.ui.RunContentDescriptor;
|
||||
import com.intellij.execution.ui.RunnerLayoutUi;
|
||||
import com.intellij.openapi.Disposable;
|
||||
import com.intellij.openapi.actionSystem.DataKey;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.ui.MessageType;
|
||||
import com.intellij.xdebugger.breakpoints.XBreakpoint;
|
||||
@@ -45,6 +46,7 @@ import javax.swing.event.HyperlinkListener;
|
||||
* @author nik
|
||||
*/
|
||||
public interface XDebugSession extends AbstractDebuggerSession {
|
||||
DataKey<XDebugSession> DATA_KEY = DataKey.create("XDebugSessionTab.XDebugSession");
|
||||
|
||||
@NotNull
|
||||
Project getProject();
|
||||
|
||||
@@ -170,6 +170,7 @@ public class XDebugSessionImpl implements XDebugSession {
|
||||
myPauseActionSupported = isSupported;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public List<AnAction> getRestartActions() {
|
||||
return myRestartActions;
|
||||
}
|
||||
@@ -180,6 +181,7 @@ public class XDebugSessionImpl implements XDebugSession {
|
||||
}
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public List<AnAction> getExtraActions() {
|
||||
return myExtraActions;
|
||||
}
|
||||
|
||||
@@ -22,7 +22,6 @@ import com.intellij.openapi.actionSystem.DataContext;
|
||||
import com.intellij.ui.content.ContentManager;
|
||||
import com.intellij.util.Alarm;
|
||||
import com.intellij.xdebugger.XDebugSession;
|
||||
import com.intellij.xdebugger.impl.ui.XDebugSessionTab;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -68,11 +67,11 @@ public abstract class XDebugView implements Disposable {
|
||||
ViewContext viewContext = ViewContext.CONTEXT_KEY.getData(dataContext);
|
||||
ContentManager contentManager = viewContext == null ? null : viewContext.getContentManager();
|
||||
if (contentManager != null) {
|
||||
XDebugSession session = XDebugSessionTab.SESSION_KEY.getData(DataManager.getInstance().getDataContext(contentManager.getComponent()));
|
||||
XDebugSession session = XDebugSession.DATA_KEY.getData(DataManager.getInstance().getDataContext(contentManager.getComponent()));
|
||||
if (session != null) {
|
||||
return session;
|
||||
}
|
||||
}
|
||||
return XDebugSessionTab.SESSION_KEY.getData(dataContext);
|
||||
return XDebugSession.DATA_KEY.getData(dataContext);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,7 +56,6 @@ import java.util.List;
|
||||
|
||||
public class XDebugSessionTab extends DebuggerSessionTabBase {
|
||||
private static final DataKey<XDebugSessionTab> TAB_KEY = DataKey.create("XDebugSessionTab");
|
||||
public static final DataKey<XDebugSession> SESSION_KEY = DataKey.create("XDebugSessionTab.XDebugSession");
|
||||
|
||||
private XWatchesViewImpl myWatchesView;
|
||||
private final List<XDebugView> myViews = new ArrayList<XDebugView>();
|
||||
@@ -146,7 +145,7 @@ public class XDebugSessionTab extends DebuggerSessionTabBase {
|
||||
}
|
||||
|
||||
if (mySession != null) {
|
||||
if (SESSION_KEY.is(dataId)) {
|
||||
if (XDebugSession.DATA_KEY.is(dataId)) {
|
||||
return mySession;
|
||||
}
|
||||
else if (LangDataKeys.CONSOLE_VIEW.is(dataId)) {
|
||||
|
||||
Reference in New Issue
Block a user