Я хочу использовать представление браузера, чтобы заменить представление консоли по умолчанию, чтобы консоль могла иметь больше расширений. Моя идея состоит в том, чтобы принудительно выполнить замену с помощью интерфейса org.eclipse.ui.console.consolePageParticipants
. не знаю, как его заменить. Я знал, что мой план может быть неверным, но я не думал о лучшем решении. Кто может высказать некоторые идеи. Согласно моему текущему плану, до сих пор не решено, как заменить стандартный вид консоли.
<extension point="org.eclipse.ui.console.consolePageParticipants">
<consolePageParticipant class="me.eclipse.plugin.ansiconsole.participants.AnsiConsolePageParticipant" id="me.eclipse.plugin.ansiconsole.participants.AnsiConsolePageParticipant">
<enablement>
<instanceof value="org.eclipse.ui.console.IConsole" />
</enablement>
</consolePageParticipant>
</extension>
public class AnsiConsolePageParticipant implements IConsolePageParticipant{
@Override
public <T> T getAdapter(Class<T> adapter) {
return null;
}
@Override
public void activated() {
// Nothing to do, but we are forced to implement it for IConsolePageParticipant
}
@Override
public void deactivated() {
// Nothing to do, but we are forced to implement it for IConsolePageParticipant
}
@Override
public void dispose() {
}
@Override
public void init(IPageBookViewPage page, IConsole console) {
//do forced replacement
}
}