Search in sources :

Example 1 with PythonConsoleData

use of com.jetbrains.python.console.parsing.PythonConsoleData in project intellij-community by JetBrains.

the class PyConsoleUtil method setIPythonAutomagic.

public static void setIPythonAutomagic(@NotNull VirtualFile file, boolean detected) {
    PythonConsoleData consoleData = getOrCreateIPythonData(file);
    consoleData.setIPythonAutomagic(detected);
}
Also used : PythonConsoleData(com.jetbrains.python.console.parsing.PythonConsoleData)

Example 2 with PythonConsoleData

use of com.jetbrains.python.console.parsing.PythonConsoleData in project intellij-community by JetBrains.

the class PyConsoleUtil method getOrCreateIPythonData.

@NotNull
public static PythonConsoleData getOrCreateIPythonData(@NotNull VirtualFile file) {
    PythonConsoleData consoleData = file.getUserData(PYTHON_CONSOLE_DATA);
    if (consoleData == null) {
        consoleData = new PythonConsoleData();
        file.putUserData(PYTHON_CONSOLE_DATA, consoleData);
    }
    return consoleData;
}
Also used : PythonConsoleData(com.jetbrains.python.console.parsing.PythonConsoleData) NotNull(org.jetbrains.annotations.NotNull)

Example 3 with PythonConsoleData

use of com.jetbrains.python.console.parsing.PythonConsoleData in project intellij-community by JetBrains.

the class PydevConsoleCommunication method execNotifyAboutMagic.

private Object execNotifyAboutMagic(Vector params) {
    List<String> commands = (List<String>) params.get(0);
    boolean isAutoMagic = (Boolean) params.get(1);
    if (getConsoleFile() != null) {
        PythonConsoleData consoleData = PyConsoleUtil.getOrCreateIPythonData(getConsoleFile());
        consoleData.setIPythonAutomagic(isAutoMagic);
        consoleData.setIPythonMagicCommands(commands);
    }
    return "";
}
Also used : PythonConsoleData(com.jetbrains.python.console.parsing.PythonConsoleData) XValueChildrenList(com.intellij.xdebugger.frame.XValueChildrenList)

Example 4 with PythonConsoleData

use of com.jetbrains.python.console.parsing.PythonConsoleData in project intellij-community by JetBrains.

the class PyConsoleUtil method markIPython.

public static void markIPython(@NotNull VirtualFile file) {
    PythonConsoleData consoleData = getOrCreateIPythonData(file);
    consoleData.setIPythonEnabled(true);
}
Also used : PythonConsoleData(com.jetbrains.python.console.parsing.PythonConsoleData)

Example 5 with PythonConsoleData

use of com.jetbrains.python.console.parsing.PythonConsoleData in project intellij-community by JetBrains.

the class PyConsoleUtil method setCurrentIndentSize.

public static void setCurrentIndentSize(@NotNull VirtualFile file, int indentSize) {
    PythonConsoleData consoleData = getOrCreateIPythonData(file);
    consoleData.setIndentSize(indentSize);
}
Also used : PythonConsoleData(com.jetbrains.python.console.parsing.PythonConsoleData)

Aggregations

PythonConsoleData (com.jetbrains.python.console.parsing.PythonConsoleData)5 XValueChildrenList (com.intellij.xdebugger.frame.XValueChildrenList)1 NotNull (org.jetbrains.annotations.NotNull)1