mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -88,6 +88,7 @@ public class CodeCompletionPanel {
|
||||
|
||||
hideOption(myCbShowStaticAfterInstance, OptionId.COMPLETION_SHOW_STATIC_AFTER_IMPORT);
|
||||
hideOption(myCbOnSmartTypeCompletion, OptionId.COMPLETION_SMART_TYPE);
|
||||
myCbAutocompleteCommonPrefix.setVisible(false);
|
||||
|
||||
reset();
|
||||
}
|
||||
|
||||
+3
-1
@@ -454,7 +454,9 @@ public class CodeCompletionHandlerBase {
|
||||
CompletionServiceImpl.setCompletionPhase(new CompletionPhase.ItemsCalculated(indicator));
|
||||
indicator.getLookup().setCalculating(false);
|
||||
if (indicator.showLookup() && isAutocompleteCommonPrefixOnInvocation() && items.length > 1) {
|
||||
indicator.fillInCommonPrefix(false);
|
||||
if (ApplicationManager.getApplication().isUnitTestMode()) {
|
||||
indicator.fillInCommonPrefix(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (decision instanceof AutoCompletionDecision.InsertItem) {
|
||||
|
||||
@@ -65,30 +65,26 @@ public class WebServer {
|
||||
ServerBootstrap bootstrap = new ServerBootstrap(channelFactory);
|
||||
bootstrap.setOption("child.tcpNoDelay", true);
|
||||
bootstrap.setPipelineFactory(new ChannelPipelineFactoryImpl(pipelineConsumers, new DefaultHandler(openChannels)));
|
||||
|
||||
// IDEA-91436 idea <121 binds to 127.0.0.1, but >=121 must be available not only from localhost
|
||||
// but if we bind only to any local port (0.0.0.0), instance of idea <121 can bind to our ports and any request to us will be intercepted
|
||||
// so, we bind to 127.0.0.1 and 0.0.0.0
|
||||
int port = bind(firstPort, portsCount, tryAnyPort, bootstrap);
|
||||
if (port != -1) {
|
||||
try {
|
||||
openChannels.add(bootstrap.bind(new InetSocketAddress(port)));
|
||||
}
|
||||
catch (ChannelException e) {
|
||||
LOG.error(e);
|
||||
}
|
||||
}
|
||||
return port;
|
||||
return bind(firstPort, portsCount, tryAnyPort, bootstrap);
|
||||
}
|
||||
|
||||
// IDEA-91436 idea <121 binds to 127.0.0.1, but >=121 must be available not only from localhost
|
||||
// but if we bind only to any local port (0.0.0.0), instance of idea <121 can bind to our ports and any request to us will be intercepted
|
||||
// so, we bind to 127.0.0.1 and 0.0.0.0
|
||||
private int bind(int firstPort, int portsCount, boolean tryAnyPort, ServerBootstrap bootstrap) {
|
||||
for (int i = 0; i < portsCount; i++) {
|
||||
int port = firstPort + i;
|
||||
try {
|
||||
openChannels.add(bootstrap.bind(new InetSocketAddress(InetAddress.getByName("127.0.0.1"), port)));
|
||||
openChannels.add(bootstrap.bind(new InetSocketAddress(port)));
|
||||
return port;
|
||||
}
|
||||
catch (ChannelException e) {
|
||||
if (!openChannels.isEmpty()) {
|
||||
openChannels.close();
|
||||
openChannels.clear();
|
||||
}
|
||||
|
||||
if (portsCount == 1) {
|
||||
throw e;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user