mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
WEB-7303 — node-webkit debug works
This commit is contained in:
@@ -80,7 +80,7 @@ public class BuiltInServer implements Disposable {
|
||||
@Override
|
||||
protected void initChannel(Channel channel) throws Exception {
|
||||
channel.pipeline().addLast(channelRegistrar);
|
||||
NettyUtil.initHttpHandlers(channel.pipeline());
|
||||
NettyUtil.addHttpServerCodec(channel.pipeline());
|
||||
channel.pipeline().addLast(handler, ChannelExceptionHandler.getInstance());
|
||||
}
|
||||
});
|
||||
|
||||
@@ -27,8 +27,7 @@ import io.netty.channel.socket.nio.NioServerSocketChannel;
|
||||
import io.netty.channel.socket.nio.NioSocketChannel;
|
||||
import io.netty.channel.socket.oio.OioSocketChannel;
|
||||
import io.netty.handler.codec.http.HttpObjectAggregator;
|
||||
import io.netty.handler.codec.http.HttpRequestDecoder;
|
||||
import io.netty.handler.codec.http.HttpResponseEncoder;
|
||||
import io.netty.handler.codec.http.HttpServerCodec;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.ide.PooledThreadExecutor;
|
||||
|
||||
@@ -130,7 +129,7 @@ public final class NettyUtil {
|
||||
return bootstrap;
|
||||
}
|
||||
|
||||
public static void initHttpHandlers(ChannelPipeline pipeline) {
|
||||
pipeline.addLast(new HttpRequestDecoder(), new HttpObjectAggregator(1048576 * 10), new HttpResponseEncoder());
|
||||
public static void addHttpServerCodec(ChannelPipeline pipeline) {
|
||||
pipeline.addLast(new HttpServerCodec(), new HttpObjectAggregator(1048576 * 10));
|
||||
}
|
||||
}
|
||||
@@ -104,7 +104,7 @@ class PortUnificationServerHandler extends Decoder {
|
||||
new PortUnificationServerHandler(delegatingHttpRequestHandler, detectSsl, false));
|
||||
}
|
||||
else if (isHttp(magic1, magic2)) {
|
||||
NettyUtil.initHttpHandlers(pipeline);
|
||||
NettyUtil.addHttpServerCodec(pipeline);
|
||||
pipeline.addLast(delegatingHttpRequestHandler);
|
||||
if (BuiltInServer.LOG.isDebugEnabled()) {
|
||||
pipeline.addLast(new ChannelHandlerAdapter() {
|
||||
|
||||
@@ -40,7 +40,7 @@ public final class OpenUrlHyperlinkInfo implements HyperlinkWithPopupMenuInfo {
|
||||
this(url, Conditions.<WebBrowser>alwaysTrue(), null);
|
||||
}
|
||||
|
||||
public OpenUrlHyperlinkInfo(@NotNull String url, @NotNull WebBrowser browser) {
|
||||
public OpenUrlHyperlinkInfo(@NotNull String url, @Nullable WebBrowser browser) {
|
||||
this(url, null, browser);
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ public final class OpenUrlHyperlinkInfo implements HyperlinkWithPopupMenuInfo {
|
||||
public ActionGroup getPopupMenuGroup(@NotNull MouseEvent event) {
|
||||
DefaultActionGroup group = new DefaultActionGroup();
|
||||
for (final WebBrowser browser : WebBrowserManager.getInstance().getActiveBrowsers()) {
|
||||
if (browserCondition == null ? browser.equals(this.browser) : browserCondition.value(browser)) {
|
||||
if (browserCondition == null ? (this.browser == null || browser.equals(this.browser)) : browserCondition.value(browser)) {
|
||||
group.add(new AnAction("Open in " + browser.getName(), "Open URL in " + browser.getName(), browser.getIcon()) {
|
||||
@Override
|
||||
public void actionPerformed(AnActionEvent e) {
|
||||
|
||||
Reference in New Issue
Block a user