xdebug api improvement

This commit is contained in:
Sergey Simonchik
2013-09-06 19:03:14 +04:00
parent b7e7f125f2
commit f1b0f113bf
3 changed files with 5 additions and 9 deletions
@@ -44,7 +44,6 @@ import javax.swing.event.HyperlinkListener;
public abstract class XDebugProcess {
private final XDebugSession mySession;
private ProcessHandler myProcessHandler;
private XDebugLayoutCustomizer myLayoutCustomizer;
/**
* @param session pass <code>session</code> parameter of {@link XDebugProcessStarter#start} method to this constructor
@@ -198,12 +197,8 @@ public abstract class XDebugProcess {
}
@Nullable
public XDebugLayoutCustomizer getLayoutCustomizer() {
return myLayoutCustomizer;
}
public void setLayoutCustomizer(@Nullable XDebugLayoutCustomizer layoutCustomizer) {
myLayoutCustomizer = layoutCustomizer;
public XDebugLayoutCustomizer createLayoutCustomizer() {
return null;
}
/**
@@ -11,6 +11,7 @@ import org.jetbrains.annotations.NotNull;
* @author Sergey Simonchik
*/
public interface XDebugLayoutCustomizer {
/**
* Registers tab for the given {@code console}, that is returned by {@link com.intellij.xdebugger.XDebugProcess#createConsole()}.
*
@@ -26,4 +27,4 @@ public interface XDebugLayoutCustomizer {
* @param ui {@code RunnerLayoutUi} instance
*/
void registerAdditionalContent(@NotNull RunnerLayoutUi ui);
}
}
@@ -136,7 +136,7 @@ public class XDebugSessionTab extends DebuggerSessionTabBase {
myUi.addContent(createFramesContent(session), 0, PlaceInGrid.left, false);
myUi.addContent(createVariablesContent(session), 0, PlaceInGrid.center, false);
myUi.addContent(createWatchesContent(session, sessionData), 0, PlaceInGrid.right, false);
XDebugLayoutCustomizer layoutCustomizer = debugProcess.getLayoutCustomizer();
XDebugLayoutCustomizer layoutCustomizer = debugProcess.createLayoutCustomizer();
final Content consoleContent;
if (layoutCustomizer != null) {
consoleContent = layoutCustomizer.registerConsoleContent(myConsole, myUi);