mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-06 03:21:12 +07:00
use only required libs from Netty (not netty-all)
This commit is contained in:
17
.idea/libraries/Netty.xml
generated
17
.idea/libraries/Netty.xml
generated
@@ -1,17 +0,0 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Netty" type="repository">
|
||||
<properties maven-id="io.netty:netty-all:4.1.24.Final"/>
|
||||
<ANNOTATIONS>
|
||||
<root url="file://$PROJECT_DIR$/lib/annotations/netty" />
|
||||
</ANNOTATIONS>
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/io/netty/netty-all/4.1.24.Final/netty-all-4.1.24.Final.jar!/"/>
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/io/netty/netty-all/4.1.24.Final/netty-all-4.1.24.Final-javadoc.jar!/"/>
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/io/netty/netty-all/4.1.24.Final/netty-all-4.1.24.Final-sources.jar!/"/>
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
25
.idea/libraries/netty_codec_http.xml
generated
Normal file
25
.idea/libraries/netty_codec_http.xml
generated
Normal file
@@ -0,0 +1,25 @@
|
||||
<component name="libraryTable">
|
||||
<library name="netty-codec-http" type="repository">
|
||||
<properties maven-id="io.netty:netty-codec-http:4.1.24.Final" />
|
||||
<ANNOTATIONS>
|
||||
<root url="file://$PROJECT_DIR$/lib/annotations/netty" />
|
||||
</ANNOTATIONS>
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/io/netty/netty-codec-http/4.1.24.Final/netty-codec-http-4.1.24.Final.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/io/netty/netty-codec/4.1.24.Final/netty-codec-4.1.24.Final.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/io/netty/netty-transport/4.1.24.Final/netty-transport-4.1.24.Final.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/io/netty/netty-buffer/4.1.24.Final/netty-buffer-4.1.24.Final.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/io/netty/netty-common/4.1.24.Final/netty-common-4.1.24.Final.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/io/netty/netty-resolver/4.1.24.Final/netty-resolver-4.1.24.Final.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/io/netty/netty-codec-http/4.1.24.Final/netty-codec-http-4.1.24.Final-sources.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/io/netty/netty-codec/4.1.24.Final/netty-codec-4.1.24.Final-sources.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/io/netty/netty-transport/4.1.24.Final/netty-transport-4.1.24.Final-sources.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/io/netty/netty-buffer/4.1.24.Final/netty-buffer-4.1.24.Final-sources.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/io/netty/netty-common/4.1.24.Final/netty-common-4.1.24.Final-sources.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/io/netty/netty-resolver/4.1.24.Final/netty-resolver-4.1.24.Final-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
12
.idea/libraries/netty_handler.xml
generated
Normal file
12
.idea/libraries/netty_handler.xml
generated
Normal file
@@ -0,0 +1,12 @@
|
||||
<component name="libraryTable">
|
||||
<library name="netty-handler" type="repository">
|
||||
<properties include-transitive-deps="false" maven-id="io.netty:netty-handler:4.1.24.Final" />
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/io/netty/netty-handler/4.1.24.Final/netty-handler-4.1.24.Final.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/io/netty/netty-handler/4.1.24.Final/netty-handler-4.1.24.Final-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
@@ -28,7 +28,8 @@ List<String> projectLibraries = [
|
||||
"NanoXML",
|
||||
"Guava",
|
||||
"JUnit4",
|
||||
"Netty",
|
||||
"netty-codec-http",
|
||||
"netty-handler",
|
||||
"lz4-java",
|
||||
"gant-groovy",
|
||||
"Log4J",
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
<orderEntry type="library" scope="RUNTIME" name="ASM" level="project" />
|
||||
<orderEntry type="library" exported="" scope="RUNTIME" name="cli-parser" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="JDOM" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Netty" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="protobuf" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Log4J" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="jna" level="project" />
|
||||
@@ -41,5 +40,7 @@
|
||||
<orderEntry type="module" module-name="intellij.java.guiForms.jps" scope="RUNTIME" />
|
||||
<orderEntry type="module" module-name="intellij.groovy.jps" scope="RUNTIME" />
|
||||
<orderEntry type="module" module-name="intellij.groovy.rt" scope="RUNTIME" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="netty-codec-http" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="netty-handler" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
@@ -22,12 +22,13 @@
|
||||
<orderEntry type="module" module-name="intellij.java.impl" />
|
||||
<orderEntry type="module" module-name="intellij.platform.jps.build" />
|
||||
<orderEntry type="module" module-name="intellij.platform.jps.build.launcher" />
|
||||
<orderEntry type="library" name="Netty" level="project" />
|
||||
<orderEntry type="module" module-name="intellij.java.testFramework" scope="TEST" />
|
||||
<orderEntry type="module" module-name="intellij.platform.jps.model.impl" />
|
||||
<orderEntry type="module" module-name="intellij.java.analysis.impl" />
|
||||
<orderEntry type="module" module-name="intellij.platform.builtInServer.impl" />
|
||||
<orderEntry type="library" name="KotlinJavaRuntime" level="project" />
|
||||
<orderEntry type="library" name="protobuf" level="project" />
|
||||
<orderEntry type="library" name="netty-codec-http" level="project" />
|
||||
</component>
|
||||
<component name="copyright">
|
||||
<Base>
|
||||
|
||||
@@ -58,6 +58,7 @@
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="library" name="netty-codec-http" level="project" />
|
||||
</component>
|
||||
<component name="copyright">
|
||||
<Base>
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="module" module-name="intellij.platform.annotations.java5" />
|
||||
<orderEntry type="module" module-name="intellij.platform.util.rt" />
|
||||
<orderEntry type="library" name="Netty" level="project" />
|
||||
<orderEntry type="library" name="Log4J" level="project" />
|
||||
<orderEntry type="library" name="protobuf" level="project" />
|
||||
<orderEntry type="module-library" scope="RUNTIME">
|
||||
@@ -22,5 +21,6 @@
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="library" name="Trove4j" level="project" />
|
||||
<orderEntry type="library" name="netty-codec-http" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
@@ -19,8 +19,7 @@
|
||||
<orderEntry type="library" name="JDOM" level="project" />
|
||||
<orderEntry type="library" name="NanoXML" level="project" />
|
||||
<orderEntry type="library" name="jgoodies-forms" level="project" />
|
||||
<orderEntry type="library" name="Netty" level="project" />
|
||||
<orderEntry type="library" exported="" name="protobuf" level="project" />
|
||||
<orderEntry type="library" name="protobuf" level="project" />
|
||||
<orderEntry type="module" module-name="intellij.java.rt" scope="RUNTIME" />
|
||||
<orderEntry type="library" name="Log4J" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="JUnit4" level="project" />
|
||||
@@ -34,5 +33,6 @@
|
||||
<orderEntry type="library" scope="TEST" name="KotlinTest" level="project" />
|
||||
<orderEntry type="library" name="Xerces" level="project" />
|
||||
<orderEntry type="library" name="Guava" level="project" />
|
||||
<orderEntry type="library" name="netty-codec-http" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
@@ -1,18 +1,4 @@
|
||||
/*
|
||||
* Copyright 2000-2013 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package org.jetbrains.jps.cmdline;
|
||||
|
||||
import com.google.protobuf.Message;
|
||||
@@ -25,6 +11,10 @@ import com.intellij.uiDesigner.core.GridConstraints;
|
||||
import com.intellij.util.SystemProperties;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import com.jgoodies.forms.layout.CellConstraints;
|
||||
import io.netty.buffer.ByteBufAllocator;
|
||||
import io.netty.channel.EventLoopGroup;
|
||||
import io.netty.handler.codec.protobuf.ProtobufDecoder;
|
||||
import io.netty.resolver.AddressResolverGroup;
|
||||
import io.netty.util.NetUtil;
|
||||
import net.n3.nanoxml.IXMLBuilder;
|
||||
import org.jetbrains.idea.maven.aether.ArtifactRepositoryManager;
|
||||
@@ -60,7 +50,11 @@ public class ClasspathBootstrap {
|
||||
|
||||
cp.addAll(PathManager.getUtilClassPath()); // intellij.platform.util
|
||||
cp.add(getResourcePath(Message.class)); // protobuf
|
||||
cp.add(getResourcePath(NetUtil.class)); // netty
|
||||
cp.add(getResourcePath(NetUtil.class)); // netty common
|
||||
cp.add(getResourcePath(EventLoopGroup.class)); // netty transport
|
||||
cp.add(getResourcePath(AddressResolverGroup.class)); // netty resolver
|
||||
cp.add(getResourcePath(ByteBufAllocator.class)); // netty buffer
|
||||
cp.add(getResourcePath(ProtobufDecoder.class)); // netty codec
|
||||
cp.add(getResourcePath(ClassWriter.class)); // asm
|
||||
cp.add(getResourcePath(ClassVisitor.class)); // asm-commons
|
||||
cp.add(getResourcePath(JpsModel.class)); // intellij.platform.jps.model
|
||||
|
||||
@@ -15,5 +15,6 @@
|
||||
<orderEntry type="module" module-name="intellij.platform.jps.model.serialization" exported="" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="gant-groovy" level="project" />
|
||||
<orderEntry type="library" name="Log4J" level="project" />
|
||||
<orderEntry type="library" name="protobuf" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
@@ -279,7 +279,9 @@ class CommunityLibraryLicenses {
|
||||
licenseUrl: "http://www.opensource.org/licenses/zlib-license.html"),
|
||||
new LibraryLicense(name: "nekohtml", libraryName: "nekohtml", version: "1.9.14", license: "Apache 2.0",
|
||||
url: "http://nekohtml.sourceforge.net/", licenseUrl: "http://apache.org/licenses/LICENSE-2.0.txt"),
|
||||
new LibraryLicense(name: "Netty", libraryName: "Netty", version: "4.1.24", license: "Apache 2.0", url: "http://netty.io",
|
||||
new LibraryLicense(name: "netty-codec-http", libraryName: "netty-codec-http", version: "4.1.24", license: "Apache 2.0", url: "http://netty.io",
|
||||
licenseUrl: "http://www.apache.org/licenses/LICENSE-2.0"),
|
||||
new LibraryLicense(name: "netty-handler", libraryName: "netty-handler", version: "4.1.24", license: "Apache 2.0", url: "http://netty.io",
|
||||
licenseUrl: "http://www.apache.org/licenses/LICENSE-2.0"),
|
||||
new LibraryLicense(name: "Objenesis", libraryName: "objenesis-1.2.jar", version: "1.2", license: "Apache 2.0", url: "http://objenesis.org/",
|
||||
licenseUrl: "http://apache.org/licenses/LICENSE-2.0"),
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
<orderEntry type="library" scope="RUNTIME" name="ASM" level="project" />
|
||||
<orderEntry type="library" exported="" scope="RUNTIME" name="cli-parser" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="JDOM" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Netty" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="protobuf" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Log4J" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="jna" level="project" />
|
||||
@@ -27,5 +26,7 @@
|
||||
<orderEntry type="module" module-name="intellij.groovy.rt" scope="RUNTIME" />
|
||||
<orderEntry type="library" exported="" name="gant-groovy" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="JUnit4" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="netty-codec-http" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="netty-handler" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
@@ -8,9 +8,9 @@
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="module" module-name="intellij.platform.core" />
|
||||
<orderEntry type="library" name="Netty" level="project" />
|
||||
<orderEntry type="library" name="Guava" level="project" />
|
||||
<orderEntry type="library" name="KotlinJavaRuntime" level="project" />
|
||||
<orderEntry type="module" module-name="intellij.platform.ide" />
|
||||
<orderEntry type="library" name="netty-codec-http" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
@@ -10,7 +10,6 @@
|
||||
<orderEntry type="module" module-name="intellij.platform.projectModel" />
|
||||
<orderEntry type="module" module-name="intellij.platform.projectModel.impl" />
|
||||
<orderEntry type="module" module-name="intellij.platform.ide.impl" />
|
||||
<orderEntry type="library" name="Netty" level="project" />
|
||||
<orderEntry type="module" module-name="intellij.xml" />
|
||||
<orderEntry type="module" module-name="intellij.platform.debugger" />
|
||||
<orderEntry type="library" name="Guava" level="project" />
|
||||
@@ -21,5 +20,7 @@
|
||||
<orderEntry type="module" module-name="intellij.platform.builtInServer" exported="" />
|
||||
<orderEntry type="module" module-name="intellij.platform.vcs" />
|
||||
<orderEntry type="library" name="KotlinJavaRuntime" level="project" />
|
||||
<orderEntry type="library" name="netty-codec-http" level="project" />
|
||||
<orderEntry type="library" name="netty-handler" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
@@ -10,7 +10,6 @@
|
||||
<orderEntry type="module" module-name="intellij.platform.projectModel" />
|
||||
<orderEntry type="module" module-name="intellij.platform.projectModel.impl" />
|
||||
<orderEntry type="module" module-name="intellij.platform.ide.impl" />
|
||||
<orderEntry type="library" name="Netty" level="project" />
|
||||
<orderEntry type="module" module-name="intellij.xml" />
|
||||
<orderEntry type="module" module-name="intellij.platform.debugger" />
|
||||
<orderEntry type="library" name="Guava" level="project" />
|
||||
@@ -23,5 +22,6 @@
|
||||
<orderEntry type="library" scope="TEST" name="KotlinJavaRuntime" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="assertJ" level="project" />
|
||||
<orderEntry type="module" module-name="intellij.platform.builtInServer.impl" />
|
||||
<orderEntry type="library" scope="TEST" name="netty-codec-http" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
@@ -9,7 +9,6 @@ import io.netty.buffer.ByteBuf
|
||||
import io.netty.buffer.Unpooled
|
||||
import io.netty.channel.ChannelHandler
|
||||
import io.netty.channel.ChannelHandlerContext
|
||||
import io.netty.util.CharsetUtil
|
||||
import junit.framework.TestCase
|
||||
import org.jetbrains.concurrency.AsyncPromise
|
||||
import org.jetbrains.concurrency.Promise
|
||||
@@ -37,7 +36,7 @@ internal class BinaryRequestHandlerTest {
|
||||
it.pipeline().addLast(object : Decoder() {
|
||||
override fun messageReceived(context: ChannelHandlerContext, input: ByteBuf) {
|
||||
val requiredLength = 4 + text.length
|
||||
val response = readContent(input, context, requiredLength) { buffer, _, _ -> buffer.toString(buffer.readerIndex(), requiredLength, CharsetUtil.UTF_8) }
|
||||
val response = readContent(input, context, requiredLength) { buffer, _, _ -> buffer.toString(buffer.readerIndex(), requiredLength, Charsets.UTF_8) }
|
||||
if (response != null) {
|
||||
result.setResult(response)
|
||||
}
|
||||
@@ -53,7 +52,7 @@ internal class BinaryRequestHandlerTest {
|
||||
buffer.writeLong(MyBinaryRequestHandler.ID.mostSignificantBits)
|
||||
buffer.writeLong(MyBinaryRequestHandler.ID.leastSignificantBits)
|
||||
|
||||
val message = Unpooled.copiedBuffer(text, CharsetUtil.UTF_8)
|
||||
val message = Unpooled.copiedBuffer(text, Charsets.UTF_8)
|
||||
buffer.writeShort(message.readableBytes())
|
||||
channel.write(buffer)
|
||||
channel.writeAndFlush(message).await(5, TimeUnit.SECONDS)
|
||||
@@ -71,7 +70,7 @@ internal class BinaryRequestHandlerTest {
|
||||
}
|
||||
}
|
||||
|
||||
TestCase.assertEquals("got-" + text, result.get())
|
||||
TestCase.assertEquals("got-$text", result.get())
|
||||
}
|
||||
finally {
|
||||
channel.close()
|
||||
@@ -80,7 +79,7 @@ internal class BinaryRequestHandlerTest {
|
||||
|
||||
class MyBinaryRequestHandler : BinaryRequestHandler() {
|
||||
companion object {
|
||||
val ID = UUID.fromString("E5068DD6-1DB7-437C-A3FC-3CA53B6E1AC9")
|
||||
val ID: UUID = UUID.fromString("E5068DD6-1DB7-437C-A3FC-3CA53B6E1AC9")
|
||||
}
|
||||
|
||||
override fun getId(): UUID {
|
||||
@@ -112,7 +111,7 @@ internal class BinaryRequestHandlerTest {
|
||||
val messageText = readChars(input) ?: return
|
||||
|
||||
state = State.HEADER
|
||||
context.writeAndFlush(Unpooled.copiedBuffer("got-" + messageText, CharsetUtil.UTF_8))
|
||||
context.writeAndFlush(Unpooled.copiedBuffer("got-$messageText", Charsets.UTF_8))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ import com.intellij.project.isDirectoryBased
|
||||
import com.intellij.ui.AppUIUtil
|
||||
import com.intellij.util.ArrayUtilRt
|
||||
import com.intellij.util.SmartList
|
||||
import com.intellij.util.SystemProperties
|
||||
import com.intellij.util.containers.SmartHashSet
|
||||
import com.intellij.util.containers.isNullOrEmpty
|
||||
import com.intellij.util.lang.CompoundRuntimeException
|
||||
@@ -34,7 +35,6 @@ import com.intellij.util.messages.MessageBus
|
||||
import com.intellij.util.xmlb.JDOMXIncluder
|
||||
import com.intellij.util.xmlb.XmlSerializerUtil
|
||||
import gnu.trove.THashMap
|
||||
import io.netty.util.internal.SystemPropertyUtil
|
||||
import org.jdom.Element
|
||||
import org.jetbrains.annotations.TestOnly
|
||||
import java.io.IOException
|
||||
@@ -401,7 +401,7 @@ abstract class ComponentStoreImpl : IComponentStore {
|
||||
name != "ProjectRunConfigurationManager" && /* ProjectRunConfigurationManager is used only for IPR, avoid relatively cost call getState */
|
||||
name != "NewModuleRootManager" /* will be changed only on actual user change, so, to speed up module loading, skip it */ &&
|
||||
name != "DeprecatedModuleOptionManager" /* doesn't make sense to check it */ &&
|
||||
SystemPropertyUtil.getBoolean("use.loaded.state.as.existing", true)
|
||||
SystemProperties.getBooleanProperty("use.loaded.state.as.existing", true)
|
||||
}
|
||||
|
||||
protected open fun isUseLoadedStateAsExisting(storage: StateStorage): Boolean = (storage as? XmlElementStorage)?.roamingType != RoamingType.DISABLED
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
<orderEntry type="library" name="OroMatcher" level="project" />
|
||||
<orderEntry type="module" module-name="intellij.platform.icons" />
|
||||
<orderEntry type="module" module-name="intellij.platform.projectModel" exported="" />
|
||||
<orderEntry type="library" name="Netty" level="project" />
|
||||
<orderEntry type="library" name="proxy-vole" level="project" />
|
||||
<orderEntry type="module" module-name="intellij.platform.analysis" exported="" />
|
||||
<orderEntry type="module" module-name="intellij.platform.editor" exported="" />
|
||||
@@ -32,5 +31,6 @@
|
||||
<orderEntry type="library" name="ini4j" level="project" />
|
||||
<orderEntry type="library" name="JDOM" level="project" />
|
||||
<orderEntry type="library" name="jackson" level="project" />
|
||||
<orderEntry type="library" name="netty-codec-http" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
@@ -27,7 +27,6 @@
|
||||
<orderEntry type="module" module-name="intellij.platform.indexing" />
|
||||
<orderEntry type="module" module-name="intellij.platform.indexing.impl" />
|
||||
<orderEntry type="module" module-name="intellij.platform.projectModel.impl" />
|
||||
<orderEntry type="library" exported="" name="Netty" level="project" />
|
||||
<orderEntry type="library" name="commons-imaging" level="project" />
|
||||
<orderEntry type="library" name="Guava" level="project" />
|
||||
<orderEntry type="module" module-name="intellij.platform.jps.model.impl" />
|
||||
@@ -52,5 +51,7 @@
|
||||
<orderEntry type="library" name="kotlinx-coroutines-core" level="project" />
|
||||
<orderEntry type="library" name="kotlinx-coroutines-jdk8" level="project" />
|
||||
<orderEntry type="library" name="org.apache.httpcomponents:fluent-hc" level="project" />
|
||||
<orderEntry type="library" name="netty-codec-http" level="project" />
|
||||
<orderEntry type="library" name="netty-handler" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
@@ -2,11 +2,8 @@
|
||||
package com.intellij.util.io
|
||||
|
||||
import com.google.common.net.InetAddresses
|
||||
import com.intellij.openapi.diagnostic.logger
|
||||
import com.intellij.openapi.util.Condition
|
||||
import com.intellij.openapi.util.Conditions
|
||||
import com.intellij.openapi.util.SystemInfo
|
||||
import com.intellij.util.SystemProperties
|
||||
import com.intellij.util.Url
|
||||
import com.intellij.util.Urls
|
||||
import com.intellij.util.net.NetUtils
|
||||
@@ -15,8 +12,6 @@ import io.netty.bootstrap.BootstrapUtil
|
||||
import io.netty.bootstrap.ServerBootstrap
|
||||
import io.netty.buffer.ByteBuf
|
||||
import io.netty.channel.*
|
||||
import io.netty.channel.kqueue.KQueueEventLoopGroup
|
||||
import io.netty.channel.kqueue.KQueueServerSocketChannel
|
||||
import io.netty.channel.nio.NioEventLoopGroup
|
||||
import io.netty.channel.oio.OioEventLoopGroup
|
||||
import io.netty.channel.socket.ServerSocketChannel
|
||||
@@ -30,7 +25,6 @@ import io.netty.handler.ssl.SslHandler
|
||||
import io.netty.resolver.ResolvedAddressTypes
|
||||
import io.netty.util.concurrent.GenericFutureListener
|
||||
import org.jetbrains.ide.PooledThreadExecutor
|
||||
import org.jetbrains.io.BuiltInServer
|
||||
import org.jetbrains.io.NettyUtil
|
||||
import java.io.IOException
|
||||
import java.net.InetAddress
|
||||
@@ -68,7 +62,7 @@ fun serverBootstrap(group: EventLoopGroup): ServerBootstrap {
|
||||
private fun EventLoopGroup.serverSocketChannelClass(): Class<out ServerSocketChannel> = when {
|
||||
this is NioEventLoopGroup -> NioServerSocketChannel::class.java
|
||||
this is OioEventLoopGroup -> OioServerSocketChannel::class.java
|
||||
SystemInfo.isMacOSSierra && this is KQueueEventLoopGroup -> KQueueServerSocketChannel::class.java
|
||||
// SystemInfo.isMacOSSierra && this is KQueueEventLoopGroup -> KQueueServerSocketChannel::class.java
|
||||
else -> throw Exception("Unknown event loop group type: ${this.javaClass.name}")
|
||||
}
|
||||
|
||||
@@ -305,29 +299,29 @@ fun ByteBuf.writeUtf8(data: CharSequence) = writeCharSequence(data, Charsets.UTF
|
||||
|
||||
@Suppress("FunctionName")
|
||||
fun MultiThreadEventLoopGroup(workerCount: Int, threadFactory: ThreadFactory): MultithreadEventLoopGroup {
|
||||
if (SystemInfo.isMacOSSierra && SystemProperties.getBooleanProperty("native.net.io", false)) {
|
||||
try {
|
||||
return KQueueEventLoopGroup(workerCount, threadFactory)
|
||||
}
|
||||
catch (e: Throwable) {
|
||||
logger<BuiltInServer>().warn("Cannot use native event loop group", e)
|
||||
}
|
||||
}
|
||||
// if (SystemInfo.isMacOSSierra && SystemProperties.getBooleanProperty("native.net.io", false)) {
|
||||
// try {
|
||||
// return KQueueEventLoopGroup(workerCount, threadFactory)
|
||||
// }
|
||||
// catch (e: Throwable) {
|
||||
// logger<BuiltInServer>().warn("Cannot use native event loop group", e)
|
||||
// }
|
||||
// }
|
||||
|
||||
return NioEventLoopGroup(workerCount, threadFactory)
|
||||
}
|
||||
|
||||
@Suppress("FunctionName")
|
||||
fun MultiThreadEventLoopGroup(workerCount: Int): MultithreadEventLoopGroup {
|
||||
if (SystemInfo.isMacOSSierra && SystemProperties.getBooleanProperty("native.net.io", false)) {
|
||||
try {
|
||||
return KQueueEventLoopGroup(workerCount, PooledThreadExecutor.INSTANCE)
|
||||
}
|
||||
catch (e: Throwable) {
|
||||
// error instead of warn to easy spot it
|
||||
logger<BuiltInServer>().error("Cannot use native event loop group", e)
|
||||
}
|
||||
}
|
||||
// if (SystemInfo.isMacOSSierra && SystemProperties.getBooleanProperty("native.net.io", false)) {
|
||||
// try {
|
||||
// return KQueueEventLoopGroup(workerCount, PooledThreadExecutor.INSTANCE)
|
||||
// }
|
||||
// catch (e: Throwable) {
|
||||
// // error instead of warn to easy spot it
|
||||
// logger<BuiltInServer>().error("Cannot use native event loop group", e)
|
||||
// }
|
||||
// }
|
||||
|
||||
return NioEventLoopGroup(workerCount, PooledThreadExecutor.INSTANCE)
|
||||
}
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
<orderEntry type="module" module-name="intellij.platform.debugger.impl" scope="RUNTIME" />
|
||||
<orderEntry type="module" module-name="intellij.xml" />
|
||||
<orderEntry type="library" name="Groovy" level="project" />
|
||||
<orderEntry type="library" name="Netty" level="project" />
|
||||
<orderEntry type="library" name="http-client" level="project" />
|
||||
<orderEntry type="module" module-name="intellij.platform.jps.model.impl" scope="TEST" />
|
||||
<orderEntry type="library" name="gson" level="project" />
|
||||
|
||||
@@ -12,6 +12,7 @@ import com.intellij.testFramework.assertions.compareFileContent
|
||||
import com.intellij.ui.layout.*
|
||||
import com.intellij.ui.layout.migLayout.patched.*
|
||||
import com.intellij.util.SVGLoader
|
||||
import com.intellij.util.SystemProperties
|
||||
import com.intellij.util.io.exists
|
||||
import com.intellij.util.io.inputStream
|
||||
import com.intellij.util.io.sanitizeFileName
|
||||
@@ -19,7 +20,6 @@ import com.intellij.util.io.write
|
||||
import com.intellij.util.ui.TestScaleHelper
|
||||
import com.intellij.util.ui.UIUtil
|
||||
import com.intellij.util.ui.paint.ImageComparator
|
||||
import io.netty.util.internal.SystemPropertyUtil
|
||||
import org.junit.rules.ExternalResource
|
||||
import org.junit.rules.TestName
|
||||
import org.junit.runners.model.MultipleFailureException
|
||||
@@ -38,7 +38,7 @@ import javax.swing.JLabel
|
||||
import javax.swing.UIManager
|
||||
import javax.swing.plaf.metal.MetalLookAndFeel
|
||||
|
||||
internal val isUpdateSnapshotsGlobal by lazy { SystemPropertyUtil.getBoolean("test.update.snapshots", false) }
|
||||
internal val isUpdateSnapshotsGlobal by lazy { SystemProperties.getBooleanProperty("test.update.snapshots", false) }
|
||||
|
||||
open class RequireHeadlessMode : ExternalResource() {
|
||||
override fun before() {
|
||||
|
||||
@@ -11,6 +11,6 @@
|
||||
<orderEntry type="module" module-name="intellij.platform.scriptDebugger.protocolReaderRuntime" />
|
||||
<orderEntry type="module" module-name="intellij.platform.ide" />
|
||||
<orderEntry type="module" module-name="intellij.platform.ide.impl" />
|
||||
<orderEntry type="library" name="Netty" level="project" />
|
||||
<orderEntry type="library" name="netty-codec-http" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
@@ -1,18 +1,4 @@
|
||||
/*
|
||||
* Copyright 2000-2017 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package org.jetbrains.debugger
|
||||
|
||||
import com.intellij.openapi.application.ApplicationManager
|
||||
@@ -120,7 +106,7 @@ fun createDebugLogger(@PropertyKey(resourceBundle = Registry.REGISTRY_BUNDLE) ke
|
||||
}
|
||||
|
||||
if (!suffix.isEmpty()) {
|
||||
debugFile = debugFile.replace(".json", suffix + ".json")
|
||||
debugFile = debugFile.replace(".json", "$suffix.json")
|
||||
}
|
||||
return MessagingLogger(debugFile)
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ abstract class CommandProcessor<INCOMING, INCOMING_WITH_SEQ : Any, SUCCESS_RESPO
|
||||
ResultReader<SUCCESS_RESPONSE>,
|
||||
MessageProcessor {
|
||||
private val currentSequence = AtomicInteger()
|
||||
@Suppress("LeakingThis")
|
||||
protected val messageManager = MessageManager(this)
|
||||
|
||||
override fun cancelWaitingRequests() {
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
<orderEntry type="module" module-name="intellij.platform.ide.impl" />
|
||||
<orderEntry type="module" module-name="intellij.platform.scriptDebugger.backend" />
|
||||
<orderEntry type="module" module-name="intellij.platform.debugger.impl" />
|
||||
<orderEntry type="library" name="Netty" level="project" />
|
||||
<orderEntry type="library" name="Guava" level="project" />
|
||||
<orderEntry type="module" module-name="intellij.platform.lang.impl" />
|
||||
<orderEntry type="library" name="netty-codec-http" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
@@ -10,6 +10,6 @@
|
||||
<orderEntry type="library" exported="" name="gson" level="project" />
|
||||
<orderEntry type="module" module-name="intellij.platform.util" />
|
||||
<orderEntry type="module" module-name="intellij.platform.ide.impl" />
|
||||
<orderEntry type="library" name="Netty" level="project" />
|
||||
<orderEntry type="library" name="netty-codec-http" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
@@ -42,5 +42,6 @@
|
||||
<orderEntry type="module" module-name="intellij.platform.uast" />
|
||||
<orderEntry type="module" module-name="intellij.gradle.java" />
|
||||
<orderEntry type="module" module-name="intellij.java.ui" />
|
||||
<orderEntry type="library" name="protobuf" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
@@ -41,5 +41,6 @@
|
||||
<orderEntry type="module" module-name="intellij.regexp" />
|
||||
<orderEntry type="module" module-name="intellij.platform.externalSystem.impl" scope="TEST" />
|
||||
<orderEntry type="module" module-name="intellij.platform.lang.tests" scope="TEST" />
|
||||
<orderEntry type="library" name="protobuf" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
@@ -21,7 +21,6 @@
|
||||
<orderEntry type="module" module-name="intellij.xml.analysis.impl" exported="" />
|
||||
<orderEntry type="library" name="swingx" level="project" />
|
||||
<orderEntry type="module" module-name="intellij.xml.structureView.impl" exported="" />
|
||||
<orderEntry type="library" name="Netty" level="project" />
|
||||
<orderEntry type="module" module-name="intellij.platform.debugger" />
|
||||
<orderEntry type="module" module-name="intellij.platform.builtInServer" />
|
||||
<orderEntry type="module" module-name="intellij.platform.vcs.impl" />
|
||||
|
||||
@@ -1,18 +1,4 @@
|
||||
/*
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.intellij.xml.actions;
|
||||
|
||||
import com.intellij.codeInsight.CodeInsightActionHandler;
|
||||
@@ -36,7 +22,7 @@ import com.intellij.psi.xml.XmlTokenType;
|
||||
import com.intellij.util.ParameterizedCachedValueImpl;
|
||||
import com.intellij.xml.Html5SchemaProvider;
|
||||
import com.intellij.xml.util.XmlUtil;
|
||||
import io.netty.util.collection.IntObjectHashMap;
|
||||
import gnu.trove.TIntObjectHashMap;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -44,20 +30,20 @@ import org.jetbrains.annotations.Nullable;
|
||||
* @author Dennis.Ushakov
|
||||
*/
|
||||
public class EscapeEntitiesAction extends BaseCodeInsightAction implements CodeInsightActionHandler {
|
||||
private static final ParameterizedCachedValueImpl<IntObjectHashMap<String>, PsiFile> ESCAPES = new ParameterizedCachedValueImpl<IntObjectHashMap<String>, PsiFile>(
|
||||
new ParameterizedCachedValueProvider<IntObjectHashMap<String>, PsiFile>() {
|
||||
private static final ParameterizedCachedValueImpl<TIntObjectHashMap<String>, PsiFile> ESCAPES = new ParameterizedCachedValueImpl<TIntObjectHashMap<String>, PsiFile>(
|
||||
new ParameterizedCachedValueProvider<TIntObjectHashMap<String>, PsiFile>() {
|
||||
@Nullable
|
||||
@Override
|
||||
public CachedValueProvider.Result<IntObjectHashMap<String>> compute(PsiFile param) {
|
||||
public CachedValueProvider.Result<TIntObjectHashMap<String>> compute(PsiFile param) {
|
||||
final XmlFile file = XmlUtil.findXmlFile(param, Html5SchemaProvider.getCharsDtdLocation());
|
||||
assert file != null;
|
||||
final IntObjectHashMap<String> result = new IntObjectHashMap<>();
|
||||
final TIntObjectHashMap<String> result = new TIntObjectHashMap<>();
|
||||
XmlUtil.processXmlElements(file, new PsiElementProcessor() {
|
||||
@Override
|
||||
public boolean execute(@NotNull PsiElement element) {
|
||||
if (element instanceof XmlEntityDecl) {
|
||||
final String value = ((XmlEntityDecl)element).getValueElement().getValue();
|
||||
final Integer key = Integer.valueOf(value.substring(2, value.length() - 1));
|
||||
final int key = Integer.parseInt(value.substring(2, value.length() - 1));
|
||||
if (!result.containsKey(key)) {
|
||||
result.put(key, ((XmlEntityDecl)element).getName());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user