mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 15:19:59 +07:00
cleanup: sort modifiers in Kotlin files accordingly to Kotlin code conventions
This fixes problems reported by 'Non-canonical modifier order' inspection.
This commit is contained in:
@@ -18,7 +18,7 @@ abstract class BaseInspectionProfileManager(messageBus: MessageBus) : Inspectio
|
||||
|
||||
private val severityRegistrar = SeverityRegistrar(messageBus)
|
||||
|
||||
override final fun getSeverityRegistrar() = severityRegistrar
|
||||
final override fun getSeverityRegistrar() = severityRegistrar
|
||||
|
||||
internal fun cleanupSchemes(project: Project) {
|
||||
for (profile in schemeManager.allSchemes) {
|
||||
@@ -42,7 +42,7 @@ abstract class BaseInspectionProfileManager(messageBus: MessageBus) : Inspectio
|
||||
}
|
||||
}
|
||||
|
||||
open protected fun schemeRemoved(scheme: InspectionProfileImpl) {
|
||||
protected open fun schemeRemoved(scheme: InspectionProfileImpl) {
|
||||
}
|
||||
|
||||
abstract fun fireProfileChanged(profile: InspectionProfileImpl)
|
||||
|
||||
@@ -3,7 +3,7 @@ package org.jetbrains.builtInWebServer
|
||||
import com.intellij.openapi.project.Project
|
||||
|
||||
abstract class PrefixlessWebServerRootsProvider : WebServerRootsProvider() {
|
||||
override final fun resolve(path: String, project: Project, pathQuery: PathQuery): PathInfo? = resolve(path, project, WebServerPathToFileManager.getInstance(project).getResolver(path), pathQuery)
|
||||
final override fun resolve(path: String, project: Project, pathQuery: PathQuery): PathInfo? = resolve(path, project, WebServerPathToFileManager.getInstance(project).getResolver(path), pathQuery)
|
||||
|
||||
abstract fun resolve(path: String, project: Project, resolver: FileResolver, pathQuery: PathQuery): PathInfo?
|
||||
}
|
||||
@@ -17,12 +17,14 @@ import java.util.concurrent.atomic.AtomicReference
|
||||
abstract class SingleConnectionNetService(project: Project) : NetService(project) {
|
||||
protected val processChannel: AtomicReference<Channel> = AtomicReference<Channel>()
|
||||
|
||||
private @Volatile var port = -1
|
||||
private @Volatile var bootstrap: Bootstrap? = null
|
||||
@Volatile
|
||||
private var port = -1
|
||||
@Volatile
|
||||
private var bootstrap: Bootstrap? = null
|
||||
|
||||
protected abstract fun configureBootstrap(bootstrap: Bootstrap, errorOutputConsumer: Consumer<String>)
|
||||
|
||||
override final fun connectToProcess(promise: AsyncPromise<OSProcessHandler>, port: Int, processHandler: OSProcessHandler, errorOutputConsumer: Consumer<String>) {
|
||||
final override fun connectToProcess(promise: AsyncPromise<OSProcessHandler>, port: Int, processHandler: OSProcessHandler, errorOutputConsumer: Consumer<String>) {
|
||||
val bootstrap = oioClientBootstrap()
|
||||
configureBootstrap(bootstrap, errorOutputConsumer)
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ import org.jetbrains.builtInWebServer.LOG
|
||||
import org.jetbrains.io.NettyUtil
|
||||
|
||||
abstract class WebSocketProtocolHandler : ChannelInboundHandlerAdapter() {
|
||||
override final fun channelRead(context: ChannelHandlerContext, message: Any) {
|
||||
final override fun channelRead(context: ChannelHandlerContext, message: Any) {
|
||||
// Pong frames need to get ignored
|
||||
when (message) {
|
||||
!is WebSocketFrame, is PongWebSocketFrame -> ReferenceCountUtil.release(message)
|
||||
@@ -32,7 +32,7 @@ abstract class WebSocketProtocolHandler : ChannelInboundHandlerAdapter() {
|
||||
}
|
||||
}
|
||||
|
||||
abstract protected fun textFrameReceived(channel: Channel, message: TextWebSocketFrame)
|
||||
protected abstract fun textFrameReceived(channel: Channel, message: TextWebSocketFrame)
|
||||
|
||||
protected open fun closeFrameReceived(channel: Channel, message: CloseWebSocketFrame) {
|
||||
channel.close()
|
||||
@@ -45,7 +45,7 @@ abstract class WebSocketProtocolHandler : ChannelInboundHandlerAdapter() {
|
||||
}
|
||||
|
||||
open class WebSocketProtocolHandshakeHandler(private val handshaker: WebSocketClientHandshaker) : ChannelInboundHandlerAdapter() {
|
||||
override final fun channelRead(context: ChannelHandlerContext, message: Any) {
|
||||
final override fun channelRead(context: ChannelHandlerContext, message: Any) {
|
||||
val channel = context.channel()
|
||||
if (!handshaker.isHandshakeComplete) {
|
||||
handshaker.finishHandshake(channel, message as FullHttpResponse)
|
||||
@@ -63,6 +63,6 @@ open class WebSocketProtocolHandshakeHandler(private val handshaker: WebSocketCl
|
||||
context.fireChannelRead(message)
|
||||
}
|
||||
|
||||
open protected fun completed() {
|
||||
protected open fun completed() {
|
||||
}
|
||||
}
|
||||
@@ -53,11 +53,11 @@ internal class ComponentInfoImpl(override val component: Any, override val state
|
||||
}
|
||||
|
||||
private abstract class ModificationTrackerAwareComponentInfo : ComponentInfo() {
|
||||
override final val isModificationTrackingSupported = true
|
||||
final override val isModificationTrackingSupported = true
|
||||
|
||||
override abstract var lastModificationCount: Long
|
||||
abstract override var lastModificationCount: Long
|
||||
|
||||
override final fun updateModificationCount(newCount: Long) {
|
||||
final override fun updateModificationCount(newCount: Long) {
|
||||
lastModificationCount = newCount
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ abstract class ComponentStoreImpl : IComponentStore {
|
||||
open val loadPolicy: StateLoadPolicy
|
||||
get() = StateLoadPolicy.LOAD
|
||||
|
||||
override abstract val storageManager: StateStorageManager
|
||||
abstract override val storageManager: StateStorageManager
|
||||
|
||||
internal fun getComponents(): Map<String, ComponentInfo> {
|
||||
return components
|
||||
@@ -128,7 +128,7 @@ abstract class ComponentStoreImpl : IComponentStore {
|
||||
return componentName
|
||||
}
|
||||
|
||||
override final fun save(readonlyFiles: MutableList<SaveSessionAndFile>, isForce: Boolean) {
|
||||
final override fun save(readonlyFiles: MutableList<SaveSessionAndFile>, isForce: Boolean) {
|
||||
val errors: MutableList<Throwable> = SmartList<Throwable>()
|
||||
|
||||
beforeSaveComponents(errors)
|
||||
@@ -464,13 +464,13 @@ abstract class ComponentStoreImpl : IComponentStore {
|
||||
return notReloadableComponents ?: emptySet()
|
||||
}
|
||||
|
||||
override final fun reloadStates(componentNames: Set<String>, messageBus: MessageBus) {
|
||||
final override fun reloadStates(componentNames: Set<String>, messageBus: MessageBus) {
|
||||
runBatchUpdate(messageBus) {
|
||||
reinitComponents(componentNames)
|
||||
}
|
||||
}
|
||||
|
||||
override final fun reloadState(componentClass: Class<out PersistentStateComponent<*>>) {
|
||||
final override fun reloadState(componentClass: Class<out PersistentStateComponent<*>>) {
|
||||
val stateSpec = StoreUtil.getStateSpecOrError(componentClass)
|
||||
val info = components.get(stateSpec.name) ?: return
|
||||
(info.component as? PersistentStateComponent<*>)?.let {
|
||||
|
||||
@@ -15,7 +15,7 @@ abstract class ComponentStoreWithExtraComponents : ComponentStoreImpl() {
|
||||
super.initComponent(component, isService)
|
||||
}
|
||||
|
||||
override final fun beforeSaveComponents(errors: MutableList<Throwable>) {
|
||||
final override fun beforeSaveComponents(errors: MutableList<Throwable>) {
|
||||
// component state uses scheme manager in an ipr project, so, we must save it before
|
||||
val isIprProject = project?.let { !it.isDirectoryBased } ?: false
|
||||
if (isIprProject) {
|
||||
@@ -30,7 +30,7 @@ abstract class ComponentStoreWithExtraComponents : ComponentStoreImpl() {
|
||||
}
|
||||
}
|
||||
|
||||
override final fun afterSaveComponents(errors: MutableList<Throwable>) {
|
||||
final override fun afterSaveComponents(errors: MutableList<Throwable>) {
|
||||
val isIprProject = project?.let { !it.isDirectoryBased } ?: false
|
||||
for (settingsSavingComponent in settingsSavingComponents) {
|
||||
if (!isIprProject || settingsSavingComponent !is SchemeManagerFactoryBase) {
|
||||
|
||||
@@ -17,7 +17,7 @@ private class DefaultProjectStorage(file: Path, fileSpec: String, pathMacroManag
|
||||
override val isUseVfsForWrite: Boolean
|
||||
get() = false
|
||||
|
||||
override public fun loadLocalData(): Element? {
|
||||
public override fun loadLocalData(): Element? {
|
||||
val element = super.loadLocalData() ?: return null
|
||||
try {
|
||||
return element.getChild("component").getChild("defaultProject")
|
||||
|
||||
@@ -31,7 +31,7 @@ abstract class DirectoryBasedStorageBase(@Suppress("DEPRECATION") protected val
|
||||
|
||||
protected abstract val virtualFile: VirtualFile?
|
||||
|
||||
override public fun loadData(): StateMap = StateMap.fromMap(DirectoryStorageUtil.loadFrom(virtualFile, pathMacroSubstitutor))
|
||||
public override fun loadData(): StateMap = StateMap.fromMap(DirectoryStorageUtil.loadFrom(virtualFile, pathMacroSubstitutor))
|
||||
|
||||
override fun createSaveSessionProducer(): StateStorage.SaveSessionProducer? = null
|
||||
|
||||
@@ -79,7 +79,8 @@ abstract class DirectoryBasedStorageBase(@Suppress("DEPRECATION") protected val
|
||||
open class DirectoryBasedStorage(private val dir: Path,
|
||||
@Suppress("DEPRECATION") splitter: StateSplitter,
|
||||
pathMacroSubstitutor: TrackingPathMacroSubstitutor? = null) : DirectoryBasedStorageBase(splitter, pathMacroSubstitutor) {
|
||||
private @Volatile var cachedVirtualFile: VirtualFile? = null
|
||||
@Volatile
|
||||
private var cachedVirtualFile: VirtualFile? = null
|
||||
|
||||
override val virtualFile: VirtualFile?
|
||||
get() {
|
||||
|
||||
@@ -17,7 +17,7 @@ private open class ModuleStoreImpl(module: Module, private val pathMacroManager:
|
||||
|
||||
override val storageManager = ModuleStateStorageManager(TrackingPathMacroSubstitutorImpl(pathMacroManager), module)
|
||||
|
||||
override final fun getPathMacroManagerForDefaults() = pathMacroManager
|
||||
final override fun getPathMacroManagerForDefaults() = pathMacroManager
|
||||
|
||||
// todo what about Upsource? For now this implemented not in the ModuleStoreBase because `project` and `module` are available only in this class (ModuleStoreImpl)
|
||||
override fun <T> getStorageSpecs(component: PersistentStateComponent<T>, stateSpec: State, operation: StateStorageOperation): List<Storage> {
|
||||
@@ -49,7 +49,7 @@ private class TestModuleStore(module: Module, pathMacroManager: PathMacroManager
|
||||
|
||||
// used in upsource
|
||||
abstract class ModuleStoreBase : ComponentStoreImpl(), ModuleStore {
|
||||
override abstract val storageManager: StateStorageManagerImpl
|
||||
abstract override val storageManager: StateStorageManagerImpl
|
||||
|
||||
override fun <T> getStorageSpecs(component: PersistentStateComponent<T>, stateSpec: State, operation: StateStorageOperation): List<Storage> {
|
||||
val storages = stateSpec.storages
|
||||
@@ -61,7 +61,7 @@ abstract class ModuleStoreBase : ComponentStoreImpl(), ModuleStore {
|
||||
}
|
||||
}
|
||||
|
||||
override final fun setPath(path: String) {
|
||||
final override fun setPath(path: String) {
|
||||
setPath(path, false)
|
||||
}
|
||||
|
||||
|
||||
@@ -49,23 +49,23 @@ internal val PROJECT_FILE_STORAGE_ANNOTATION = FileStorageAnnotation(PROJECT_FIL
|
||||
internal val DEPRECATED_PROJECT_FILE_STORAGE_ANNOTATION = FileStorageAnnotation(PROJECT_FILE, true)
|
||||
|
||||
// cannot be `internal`, used in Upsource
|
||||
abstract class ProjectStoreBase(override final val project: ProjectImpl) : ComponentStoreWithExtraComponents(), IProjectStore {
|
||||
abstract class ProjectStoreBase(final override val project: ProjectImpl) : ComponentStoreWithExtraComponents(), IProjectStore {
|
||||
// protected setter used in upsource
|
||||
// Zelix KlassMaster - ERROR: Could not find method 'getScheme()'
|
||||
var scheme: StorageScheme = StorageScheme.DEFAULT
|
||||
|
||||
override final var loadPolicy: StateLoadPolicy = StateLoadPolicy.LOAD
|
||||
final override var loadPolicy: StateLoadPolicy = StateLoadPolicy.LOAD
|
||||
|
||||
override final fun isOptimiseTestLoadSpeed(): Boolean = loadPolicy != StateLoadPolicy.LOAD
|
||||
final override fun isOptimiseTestLoadSpeed(): Boolean = loadPolicy != StateLoadPolicy.LOAD
|
||||
|
||||
override final fun getStorageScheme(): StorageScheme = scheme
|
||||
final override fun getStorageScheme(): StorageScheme = scheme
|
||||
|
||||
override abstract val storageManager: StateStorageManagerImpl
|
||||
abstract override val storageManager: StateStorageManagerImpl
|
||||
|
||||
protected val isDirectoryBased: Boolean
|
||||
get() = scheme == StorageScheme.DIRECTORY_BASED
|
||||
|
||||
override final fun setOptimiseTestLoadSpeed(value: Boolean) {
|
||||
final override fun setOptimiseTestLoadSpeed(value: Boolean) {
|
||||
// we don't load default state in tests as app store does because
|
||||
// 1) we should not do it
|
||||
// 2) it was so before, so, we preserve old behavior (otherwise RunManager will load template run configurations)
|
||||
@@ -79,13 +79,13 @@ abstract class ProjectStoreBase(override final val project: ProjectImpl) : Compo
|
||||
*/
|
||||
override fun getProjectConfigDir(): String? = if (isDirectoryBased) storageManager.expandMacro(PROJECT_CONFIG_DIR) else null
|
||||
|
||||
override final fun getWorkspaceFilePath(): String = storageManager.expandMacro(StoragePathMacros.WORKSPACE_FILE)
|
||||
final override fun getWorkspaceFilePath(): String = storageManager.expandMacro(StoragePathMacros.WORKSPACE_FILE)
|
||||
|
||||
override final fun clearStorages() {
|
||||
final override fun clearStorages() {
|
||||
storageManager.clearStorages()
|
||||
}
|
||||
|
||||
override final fun loadProjectFromTemplate(defaultProject: Project) {
|
||||
final override fun loadProjectFromTemplate(defaultProject: Project) {
|
||||
defaultProject.save()
|
||||
|
||||
val element = (defaultProject.stateStore as DefaultProjectStoreImpl).getStateCopy() ?: return
|
||||
@@ -102,7 +102,7 @@ abstract class ProjectStoreBase(override final val project: ProjectImpl) : Compo
|
||||
(storageManager.getOrCreateStorage(PROJECT_FILE) as XmlElementStorage).setDefaultState(element)
|
||||
}
|
||||
|
||||
override final fun getProjectBasePath(): String {
|
||||
final override fun getProjectBasePath(): String {
|
||||
if (isDirectoryBased) {
|
||||
val path = PathUtilRt.getParentPath(storageManager.expandMacro(PROJECT_CONFIG_DIR))
|
||||
if (Registry.`is`("store.basedir.parent.detection", true) && PathUtilRt.getFileName(path).startsWith("${Project.DIRECTORY_STORE_FOLDER}.")) {
|
||||
@@ -253,7 +253,7 @@ private open class ProjectStoreImpl(project: ProjectImpl, private val pathMacroM
|
||||
assert(!project.isDefault)
|
||||
}
|
||||
|
||||
override final fun getPathMacroManagerForDefaults() = pathMacroManager
|
||||
final override fun getPathMacroManagerForDefaults() = pathMacroManager
|
||||
|
||||
override val storageManager = ProjectStateStorageManager(TrackingPathMacroSubstitutorImpl(pathMacroManager), project)
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ import com.intellij.openapi.vfs.SafeWriteRequestor
|
||||
import org.jdom.Element
|
||||
|
||||
abstract class SaveSessionBase : StateStorage.SaveSession, StateStorage.SaveSessionProducer, SafeWriteRequestor, LargeFileWriteRequestor {
|
||||
override final fun setState(component: Any?, componentName: String, state: Any?) {
|
||||
final override fun setState(component: Any?, componentName: String, state: Any?) {
|
||||
if (state == null) {
|
||||
setSerializedState(componentName, null)
|
||||
return
|
||||
|
||||
@@ -30,7 +30,7 @@ sealed class SchemeManagerFactoryBase : SchemeManagerFactory(), SettingsSavingCo
|
||||
|
||||
protected open fun createFileChangeSubscriber(): ((schemeManager: SchemeManagerImpl<*, *>) -> Unit)? = null
|
||||
|
||||
override final fun <T : Any, MutableT : T> create(directoryName: String,
|
||||
final override fun <T : Any, MutableT : T> create(directoryName: String,
|
||||
processor: SchemeProcessor<T, MutableT>,
|
||||
presentableName: String?,
|
||||
roamingType: RoamingType,
|
||||
@@ -84,7 +84,7 @@ sealed class SchemeManagerFactoryBase : SchemeManagerFactory(), SettingsSavingCo
|
||||
}
|
||||
}
|
||||
|
||||
override final fun save() {
|
||||
final override fun save() {
|
||||
val errors = SmartList<Throwable>()
|
||||
for (registeredManager in managers) {
|
||||
try {
|
||||
|
||||
@@ -34,7 +34,7 @@ private val MACRO_PATTERN = Pattern.compile("(\\$[^$]*\\$)")
|
||||
* If componentManager not specified, storage will not add file tracker
|
||||
*/
|
||||
open class StateStorageManagerImpl(private val rootTagName: String,
|
||||
override final val macroSubstitutor: TrackingPathMacroSubstitutor? = null,
|
||||
final override val macroSubstitutor: TrackingPathMacroSubstitutor? = null,
|
||||
override val componentManager: ComponentManager? = null,
|
||||
private val virtualFileTracker: StorageVirtualFileTracker? = StateStorageManagerImpl.createDefaultVirtualTracker(componentManager)) : StateStorageManager {
|
||||
private val macros: MutableList<Macro> = ContainerUtil.createLockFreeCopyOnWriteList()
|
||||
@@ -131,7 +131,7 @@ open class StateStorageManagerImpl(private val rootTagName: String,
|
||||
}
|
||||
|
||||
@Suppress("CAST_NEVER_SUCCEEDS")
|
||||
override final fun getStateStorage(storageSpec: Storage): StateStorage = getOrCreateStorage(
|
||||
final override fun getStateStorage(storageSpec: Storage): StateStorage = getOrCreateStorage(
|
||||
storageSpec.path,
|
||||
storageSpec.roamingType,
|
||||
storageSpec.storageClass.java,
|
||||
@@ -337,7 +337,7 @@ open class StateStorageManagerImpl(private val rootTagName: String,
|
||||
protected open fun beforeElementLoaded(element: Element) {
|
||||
}
|
||||
|
||||
override final fun rename(path: String, newName: String) {
|
||||
final override fun rename(path: String, newName: String) {
|
||||
storageLock.write {
|
||||
val storage = getOrCreateStorage(collapseMacros(path), RoamingType.DEFAULT) as FileBasedStorage
|
||||
|
||||
@@ -417,7 +417,7 @@ open class StateStorageManagerImpl(private val rootTagName: String,
|
||||
return normalizeFileSpec(result)
|
||||
}
|
||||
|
||||
override final fun getOldStorage(component: Any, componentName: String, operation: StateStorageOperation): StateStorage? {
|
||||
final override fun getOldStorage(component: Any, componentName: String, operation: StateStorageOperation): StateStorage? {
|
||||
val oldStorageSpec = getOldStorageSpec(component, componentName, operation) ?: return null
|
||||
return getOrCreateStorage(oldStorageSpec, RoamingType.DEFAULT)
|
||||
}
|
||||
|
||||
@@ -15,7 +15,8 @@ import java.util.concurrent.atomic.AtomicBoolean
|
||||
|
||||
class StorageVirtualFileTracker(private val messageBus: MessageBus) {
|
||||
private val filePathToStorage: ConcurrentMap<String, TrackedStorage> = ContainerUtil.newConcurrentMap()
|
||||
private @Volatile var hasDirectoryBasedStorages = false
|
||||
@Volatile
|
||||
private var hasDirectoryBasedStorages = false
|
||||
|
||||
private val vfsListenerAdded = AtomicBoolean()
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ abstract class XmlElementStorage protected constructor(val fileSpec: String,
|
||||
|
||||
protected abstract fun loadLocalData(): Element?
|
||||
|
||||
override final fun getSerializedState(storageData: StateMap, component: Any?, componentName: String, archive: Boolean): Element? = storageData.getState(componentName, archive)
|
||||
final override fun getSerializedState(storageData: StateMap, component: Any?, componentName: String, archive: Boolean): Element? = storageData.getState(componentName, archive)
|
||||
|
||||
override fun archiveState(storageData: StateMap, componentName: String, serializedState: Element?) {
|
||||
storageData.archive(componentName, serializedState)
|
||||
@@ -396,7 +396,7 @@ internal fun DataWriter?.writeTo(file: Path, lineSeparator: String = LineSeparat
|
||||
}
|
||||
|
||||
internal abstract class StringDataWriter : DataWriter {
|
||||
override final fun write(output: OutputStream, lineSeparator: String, filter: DataWriterFilter?) {
|
||||
final override fun write(output: OutputStream, lineSeparator: String, filter: DataWriterFilter?) {
|
||||
output.bufferedWriter().use {
|
||||
write(it, lineSeparator, filter)
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ import org.jdom.Element
|
||||
|
||||
private const val VALUE_ELEMENT_NAME = "Value"
|
||||
|
||||
internal class KdbxEntry(private val element: Element, private val database: KeePassDatabase, internal @Volatile var group: KdbxGroup?) {
|
||||
internal class KdbxEntry(private val element: Element, private val database: KeePassDatabase, @Volatile internal var group: KdbxGroup?) {
|
||||
@Volatile var title: String? = element.removeProperty("Title")
|
||||
set(value) {
|
||||
if (field != value) {
|
||||
|
||||
@@ -11,7 +11,7 @@ import java.time.Instant
|
||||
import java.time.LocalDateTime
|
||||
import java.time.ZoneOffset
|
||||
|
||||
internal class KdbxGroup(private val element: Element, private val database: KeePassDatabase, private @Volatile var parent: KdbxGroup?) {
|
||||
internal class KdbxGroup(private val element: Element, private val database: KeePassDatabase, @Volatile private var parent: KdbxGroup?) {
|
||||
@Volatile var name: String = element.getChildText(NAME_ELEMENT_NAME) ?: "Unnamed"
|
||||
set(value) {
|
||||
if (field != value) {
|
||||
@@ -23,7 +23,8 @@ internal class KdbxGroup(private val element: Element, private val database: Kee
|
||||
private val groups: MutableList<KdbxGroup>
|
||||
val entries: MutableList<KdbxEntry>
|
||||
|
||||
private @Volatile var locationChanged = element.get("Times")?.get("LocationChanged")?.text?.let(::parseTime) ?: 0
|
||||
@Volatile
|
||||
private var locationChanged = element.get("Times")?.get("LocationChanged")?.text?.let(::parseTime) ?: 0
|
||||
|
||||
init {
|
||||
locationChanged = element.get("Times")?.get("LocationChanged")?.text?.let(::parseTime) ?: 0
|
||||
|
||||
@@ -81,7 +81,7 @@ abstract class LineStatusTrackerBase<R : Range> {
|
||||
|
||||
open val virtualFile: VirtualFile? get() = null
|
||||
|
||||
abstract protected fun Block.toRange(): R
|
||||
protected abstract fun Block.toRange(): R
|
||||
|
||||
protected open fun createDocumentTrackerHandler(): DocumentTracker.Handler = MyDocumentTrackerHandler()
|
||||
|
||||
@@ -399,8 +399,8 @@ abstract class LineStatusTrackerBase<R : Range> {
|
||||
|
||||
protected open class BlockData(internal var innerRanges: List<Range.InnerRange>? = null)
|
||||
|
||||
open protected fun createBlockData(): BlockData = BlockData()
|
||||
open protected val Block.ourData: BlockData get() = getBlockData(this)
|
||||
protected open fun createBlockData(): BlockData = BlockData()
|
||||
protected open val Block.ourData: BlockData get() = getBlockData(this)
|
||||
protected fun getBlockData(block: Block): BlockData {
|
||||
if (block.data == null) block.data = createBlockData()
|
||||
return block.data as BlockData
|
||||
|
||||
@@ -34,7 +34,7 @@ abstract class GenericProgramRunner<Settings : RunnerSettings> : BaseProgramRunn
|
||||
}
|
||||
|
||||
abstract class AsyncProgramRunner<Settings : RunnerSettings> : BaseProgramRunner<Settings>() {
|
||||
override final fun execute(environment: ExecutionEnvironment, callback: ProgramRunner.Callback?, state: RunProfileState) {
|
||||
final override fun execute(environment: ExecutionEnvironment, callback: ProgramRunner.Callback?, state: RunProfileState) {
|
||||
startRunProfile(environment, state, callback, runProfileStarter { execute(environment, state) })
|
||||
}
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ open class ConsoleTitleGen @JvmOverloads constructor(private val myProject: Proj
|
||||
}
|
||||
|
||||
|
||||
open protected fun getActiveConsoles(consoleTitle: String): List<String> {
|
||||
protected open fun getActiveConsoles(consoleTitle: String): List<String> {
|
||||
val consoles = ExecutionHelper.collectConsolesByDisplayName(myProject) { dom -> dom.contains(consoleTitle) }
|
||||
|
||||
return consoles.filter({ input ->
|
||||
|
||||
@@ -32,7 +32,7 @@ abstract class StateStorageBase<T : Any> : StateStorage {
|
||||
|
||||
protected abstract fun hasState(storageData: T, componentName: String): Boolean
|
||||
|
||||
override final fun hasState(componentName: String, reloadData: Boolean): Boolean {
|
||||
final override fun hasState(componentName: String, reloadData: Boolean): Boolean {
|
||||
return hasState(getStorageData(reloadData), componentName)
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ import org.jdom.Element
|
||||
import java.awt.event.MouseEvent
|
||||
|
||||
open class DefaultKeymapImpl(dataHolder: SchemeDataHolder<KeymapImpl>, private val defaultKeymapManager: DefaultKeymap) : KeymapImpl(dataHolder) {
|
||||
override final var canModify: Boolean
|
||||
final override var canModify: Boolean
|
||||
get() = false
|
||||
set(value) {
|
||||
// ignore
|
||||
|
||||
@@ -181,7 +181,7 @@ open class KeymapImpl @JvmOverloads constructor(private var dataHolder: SchemeDa
|
||||
|
||||
override fun getParent(): KeymapImpl? = parent
|
||||
|
||||
override final fun canModify(): Boolean = canModify
|
||||
final override fun canModify(): Boolean = canModify
|
||||
|
||||
override fun addShortcut(actionId: String, shortcut: Shortcut) {
|
||||
val list = actionIdToShortcuts.getOrPut(actionId) {
|
||||
|
||||
@@ -111,7 +111,7 @@ abstract class SchemeWrapper<out T>(name: String) : ExternalizableSchemeAdapter(
|
||||
abstract class LazySchemeWrapper<T>(name: String, dataHolder: SchemeDataHolder<SchemeWrapper<T>>, protected val writer: (scheme: T) -> Element) : SchemeWrapper<T>(name) {
|
||||
protected val dataHolder: AtomicReference<SchemeDataHolder<SchemeWrapper<T>>> = AtomicReference(dataHolder)
|
||||
|
||||
override final fun writeScheme(): Element {
|
||||
final override fun writeScheme(): Element {
|
||||
val dataHolder = dataHolder.get()
|
||||
@Suppress("IfThenToElvis")
|
||||
return if (dataHolder == null) writer(scheme) else dataHolder.read()
|
||||
|
||||
@@ -29,7 +29,8 @@ abstract class BreakpointBase<L : Any>(override val target: BreakpointTarget,
|
||||
* Whether the breakpoint data have changed with respect
|
||||
* to the JavaScript VM data
|
||||
*/
|
||||
protected @Volatile var dirty: Boolean = false
|
||||
@Volatile
|
||||
protected var dirty: Boolean = false
|
||||
|
||||
override val isResolved: Boolean
|
||||
get() = !actualLocations.isEmpty()
|
||||
|
||||
@@ -60,7 +60,7 @@ abstract class BreakpointManagerBase<T : BreakpointBase<*>> : BreakpointManager
|
||||
return BreakpointManager.BreakpointCreated(breakpoint, promise)
|
||||
}
|
||||
|
||||
override final fun remove(breakpoint: Breakpoint): Promise<*> {
|
||||
final override fun remove(breakpoint: Breakpoint): Promise<*> {
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
val b = breakpoint as T
|
||||
val existed = breakpoints.remove(b)
|
||||
@@ -70,7 +70,7 @@ abstract class BreakpointManagerBase<T : BreakpointBase<*>> : BreakpointManager
|
||||
return if (!existed || !b.isVmRegistered()) nullPromise() else doClearBreakpoint(b)
|
||||
}
|
||||
|
||||
override final fun removeAll(): Promise<*> {
|
||||
final override fun removeAll(): Promise<*> {
|
||||
val list = breakpoints.toList()
|
||||
breakpoints.clear()
|
||||
breakpointDuplicationByTarget.clear()
|
||||
@@ -85,7 +85,7 @@ abstract class BreakpointManagerBase<T : BreakpointBase<*>> : BreakpointManager
|
||||
|
||||
protected abstract fun doClearBreakpoint(breakpoint: T): Promise<*>
|
||||
|
||||
override final fun addBreakpointListener(listener: BreakpointListener) {
|
||||
final override fun addBreakpointListener(listener: BreakpointListener) {
|
||||
dispatcher.addListener(listener)
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,8 @@ abstract class ScriptBase(override val type: Script.Type,
|
||||
override val line: Int = Math.max(line, 0)
|
||||
|
||||
@SuppressWarnings("UnusedDeclaration")
|
||||
private @Volatile var source: Promise<String>? = null
|
||||
@Volatile
|
||||
private var source: Promise<String>? = null
|
||||
|
||||
override var sourceMap: SourceMap? = null
|
||||
|
||||
|
||||
@@ -14,7 +14,8 @@ import org.jetbrains.rpc.LOG
|
||||
import org.jetbrains.rpc.MessageProcessor
|
||||
|
||||
open class StandaloneVmHelper(private val vm: Vm, private val messageProcessor: MessageProcessor, channel: Channel) : AttachStateManager {
|
||||
private @Volatile var channel: Channel? = channel
|
||||
@Volatile
|
||||
private var channel: Channel? = channel
|
||||
|
||||
fun getChannelIfActive(): Channel? {
|
||||
val currentChannel = channel
|
||||
|
||||
@@ -46,7 +46,7 @@ interface SuspendContext<out CALL_FRAME : CallFrame> {
|
||||
}
|
||||
|
||||
abstract class ContextDependentAsyncResultConsumer<T>(private val context: SuspendContext<*>) : java.util.function.Consumer<T> {
|
||||
override final fun accept(result: T) {
|
||||
final override fun accept(result: T) {
|
||||
val vm = context.vm
|
||||
if (vm.attachStateManager.isAttached && !vm.suspendContextManager.isContextObsolete(context)) {
|
||||
accept(result, vm)
|
||||
|
||||
@@ -35,7 +35,7 @@ abstract class ValueManager() : Obsolescent {
|
||||
|
||||
fun getCacheStamp(): Int = cacheStamp.get()
|
||||
|
||||
override final fun isObsolete(): Boolean = obsolete
|
||||
final override fun isObsolete(): Boolean = obsolete
|
||||
|
||||
fun markObsolete() {
|
||||
obsolete = true
|
||||
|
||||
@@ -31,7 +31,7 @@ abstract class CommandProcessor<INCOMING, INCOMING_WITH_SEQ : Any, SUCCESS_RESPO
|
||||
return id
|
||||
}
|
||||
|
||||
override final fun <RESULT> doSend(message: Request<RESULT>, callback: RequestPromise<SUCCESS_RESPONSE, RESULT>) {
|
||||
final override fun <RESULT> doSend(message: Request<RESULT>, callback: RequestPromise<SUCCESS_RESPONSE, RESULT>) {
|
||||
messageManager.send(message, callback)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,22 +66,22 @@ abstract class DebugProcessImpl<out C : VmConnection<*>>(session: XDebugSession,
|
||||
protected val realProcessHandler: ProcessHandler?
|
||||
get() = executionResult?.processHandler
|
||||
|
||||
override final fun getSmartStepIntoHandler(): XSmartStepIntoHandler<*>? = smartStepIntoHandler
|
||||
final override fun getSmartStepIntoHandler(): XSmartStepIntoHandler<*>? = smartStepIntoHandler
|
||||
|
||||
override final fun getBreakpointHandlers(): Array<out XBreakpointHandler<*>> = when (connection.state.status) {
|
||||
final override fun getBreakpointHandlers(): Array<out XBreakpointHandler<*>> = when (connection.state.status) {
|
||||
ConnectionStatus.DISCONNECTED, ConnectionStatus.DETACHED, ConnectionStatus.CONNECTION_FAILED -> XBreakpointHandler.EMPTY_ARRAY
|
||||
else -> _breakpointHandlers
|
||||
}
|
||||
|
||||
override final fun getEditorsProvider(): XDebuggerEditorsProvider = editorsProvider
|
||||
final override fun getEditorsProvider(): XDebuggerEditorsProvider = editorsProvider
|
||||
|
||||
val vm: Vm?
|
||||
get() = connection.vm
|
||||
|
||||
override final val mainVm: Vm?
|
||||
final override val mainVm: Vm?
|
||||
get() = connection.vm
|
||||
|
||||
override final val activeOrMainVm: Vm?
|
||||
final override val activeOrMainVm: Vm?
|
||||
get() = (session.suspendContext?.activeExecutionStack as? ExecutionStackView)?.suspendContext?.vm ?: mainVm
|
||||
|
||||
init {
|
||||
@@ -116,11 +116,11 @@ abstract class DebugProcessImpl<out C : VmConnection<*>>(session: XDebugSession,
|
||||
lastCallFrame = vm.suspendContextManager.context?.topFrame
|
||||
}
|
||||
|
||||
override final fun checkCanPerformCommands(): Boolean = activeOrMainVm != null
|
||||
final override fun checkCanPerformCommands(): Boolean = activeOrMainVm != null
|
||||
|
||||
override final fun isValuesCustomSorted(): Boolean = true
|
||||
final override fun isValuesCustomSorted(): Boolean = true
|
||||
|
||||
override final fun startStepOver(context: XSuspendContext?) {
|
||||
final override fun startStepOver(context: XSuspendContext?) {
|
||||
val vm = context.vm
|
||||
updateLastCallFrame(vm)
|
||||
continueVm(vm, StepAction.OVER)
|
||||
@@ -129,18 +129,18 @@ abstract class DebugProcessImpl<out C : VmConnection<*>>(session: XDebugSession,
|
||||
val XSuspendContext?.vm: Vm
|
||||
get() = (this as? SuspendContextView)?.activeVm ?: mainVm!!
|
||||
|
||||
override final fun startForceStepInto(context: XSuspendContext?) {
|
||||
final override fun startForceStepInto(context: XSuspendContext?) {
|
||||
isForceStep = true
|
||||
startStepInto(context)
|
||||
}
|
||||
|
||||
override final fun startStepInto(context: XSuspendContext?) {
|
||||
final override fun startStepInto(context: XSuspendContext?) {
|
||||
val vm = context.vm
|
||||
updateLastCallFrame(vm)
|
||||
continueVm(vm, StepAction.IN)
|
||||
}
|
||||
|
||||
override final fun startStepOut(context: XSuspendContext?) {
|
||||
final override fun startStepOut(context: XSuspendContext?) {
|
||||
val vm = context.vm
|
||||
if (isVmStepOutCorrect()) {
|
||||
lastCallFrame = null
|
||||
@@ -195,14 +195,14 @@ abstract class DebugProcessImpl<out C : VmConnection<*>>(session: XDebugSession,
|
||||
}
|
||||
}
|
||||
|
||||
override final fun startPausing() {
|
||||
final override fun startPausing() {
|
||||
activeOrMainVm!!.suspendContextManager.suspend()
|
||||
.onError(RejectErrorReporter(session, "Cannot pause"))
|
||||
}
|
||||
|
||||
override final fun getCurrentStateMessage(): String = connection.state.message
|
||||
final override fun getCurrentStateMessage(): String = connection.state.message
|
||||
|
||||
override final fun getCurrentStateHyperlinkListener(): HyperlinkListener? = connection.state.messageLinkListener
|
||||
final override fun getCurrentStateHyperlinkListener(): HyperlinkListener? = connection.state.messageLinkListener
|
||||
|
||||
override fun doGetProcessHandler(): ProcessHandler = executionResult?.processHandler ?: object : DefaultDebugProcessHandler() { override fun isSilentlyDestroyOnClose() = true }
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ interface DebuggerViewSupport {
|
||||
}
|
||||
|
||||
open class PromiseDebuggerEvaluator(protected val context: VariableContext) : XDebuggerEvaluator() {
|
||||
override final fun evaluate(expression: String, callback: XDebuggerEvaluator.XEvaluationCallback, expressionPosition: XSourcePosition?) {
|
||||
final override fun evaluate(expression: String, callback: XDebuggerEvaluator.XEvaluationCallback, expressionPosition: XSourcePosition?) {
|
||||
try {
|
||||
evaluate(expression, expressionPosition)
|
||||
.onSuccess { callback.evaluated(VariableView(VariableImpl(expression, it.value), context)) }
|
||||
|
||||
@@ -22,7 +22,7 @@ abstract class VmConnection<T : Vm> : Disposable {
|
||||
|
||||
private val stateRef = AtomicReference(ConnectionState(ConnectionStatus.NOT_CONNECTED))
|
||||
|
||||
open protected val dispatcher: EventDispatcher<DebugEventListener> = EventDispatcher.create(DebugEventListener::class.java)
|
||||
protected open val dispatcher: EventDispatcher<DebugEventListener> = EventDispatcher.create(DebugEventListener::class.java)
|
||||
private val connectionDispatcher = ContainerUtil.createLockFreeCopyOnWriteList<(ConnectionState) -> Unit>()
|
||||
|
||||
@Volatile var vm: T? = null
|
||||
|
||||
@@ -5,5 +5,5 @@ internal fun FileScope(globalScope: GlobalScope, stringBuilder: StringBuilder) =
|
||||
internal open class FileScope(val output: TextOutput, globalScope: GlobalScope) : GlobalScope(globalScope.state) {
|
||||
fun newClassScope() = ClassScope(this, asClassScope())
|
||||
|
||||
open protected fun asClassScope(): ClassScope? = null
|
||||
protected open fun asClassScope(): ClassScope? = null
|
||||
}
|
||||
@@ -43,7 +43,7 @@ open class ApplicationRule : ExternalResource() {
|
||||
}
|
||||
}
|
||||
|
||||
override public final fun before() {
|
||||
public final override fun before() {
|
||||
IdeaTestApplication.getInstance()
|
||||
TestRunnerUtil.replaceIdeEventQueueSafely()
|
||||
(PersistentFS.getInstance() as PersistentFSImpl).cleanPersistedContents()
|
||||
@@ -92,7 +92,7 @@ class ProjectRule(val projectDescriptor: LightProjectDescriptor = LightProjectDe
|
||||
}
|
||||
}
|
||||
|
||||
override public fun after() {
|
||||
public override fun after() {
|
||||
if (projectOpened.compareAndSet(true, false)) {
|
||||
sharedProject?.let { runInEdtAndWait { (ProjectManager.getInstance() as ProjectManagerImpl).forceCloseProject(it, false) } }
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ abstract class LineStatusTracker<R : Range> constructor(override val project: Pr
|
||||
|
||||
private val vcsDirtyScopeManager: VcsDirtyScopeManager = VcsDirtyScopeManager.getInstance(project)
|
||||
|
||||
override abstract val renderer: LocalLineStatusMarkerRenderer
|
||||
abstract override val renderer: LocalLineStatusMarkerRenderer
|
||||
|
||||
var mode: Mode = mode
|
||||
set(value) {
|
||||
|
||||
@@ -65,7 +65,8 @@ class IcsManager @JvmOverloads constructor(dir: Path, val schemeManagerFactory:
|
||||
}
|
||||
}, settings.commitDelay)
|
||||
|
||||
private @Volatile var autoCommitEnabled = true
|
||||
@Volatile
|
||||
private var autoCommitEnabled = true
|
||||
|
||||
@Volatile var isRepositoryActive: Boolean = false
|
||||
|
||||
|
||||
@@ -19,7 +19,8 @@ import com.intellij.openapi.vcs.ui.VcsBalloonProblemNotifier
|
||||
import java.util.concurrent.Future
|
||||
|
||||
internal class AutoSyncManager(private val icsManager: IcsManager) {
|
||||
private @Volatile var autoSyncFuture: Future<*>? = null
|
||||
@Volatile
|
||||
private var autoSyncFuture: Future<*>? = null
|
||||
|
||||
@Volatile var enabled = true
|
||||
|
||||
@@ -157,7 +158,7 @@ internal class AutoSyncManager(private val icsManager: IcsManager) {
|
||||
}
|
||||
}
|
||||
|
||||
inline internal fun catchAndLog(asWarning: Boolean = false, runnable: () -> Unit) {
|
||||
internal inline fun catchAndLog(asWarning: Boolean = false, runnable: () -> Unit) {
|
||||
try {
|
||||
runnable()
|
||||
}
|
||||
|
||||
@@ -131,7 +131,7 @@ interface PathEdit {
|
||||
fun apply(entry: DirCacheEntry, repository: Repository)
|
||||
}
|
||||
|
||||
abstract class PathEditBase(override final val path: ByteArray) : PathEdit
|
||||
abstract class PathEditBase(final override val path: ByteArray) : PathEdit
|
||||
|
||||
private fun encodePath(path: String): ByteArray {
|
||||
val bytes = Constants.CHARSET.encode(path).toByteArray()
|
||||
|
||||
@@ -58,7 +58,7 @@ class GitRepositoryClientImpl(override val repository: Repository, private val c
|
||||
}
|
||||
}
|
||||
|
||||
open internal class Pull(val manager: GitRepositoryClient, val indicator: ProgressIndicator?, val commitMessageFormatter: CommitMessageFormatter = IdeaCommitMessageFormatter()) {
|
||||
internal open class Pull(val manager: GitRepositoryClient, val indicator: ProgressIndicator?, val commitMessageFormatter: CommitMessageFormatter = IdeaCommitMessageFormatter()) {
|
||||
val repository = manager.repository
|
||||
|
||||
// we must use the same StoredConfig instance during the operation
|
||||
|
||||
@@ -16,7 +16,7 @@ constructor(private val configuration: AbstractPythonRunConfiguration<*>,
|
||||
chooserDescriptor: FileChooserDescriptor = FileChooserDescriptorFactory.createSingleFileOrFolderDescriptor().withPythonFiles())
|
||||
: TextBrowseFolderListener(chooserDescriptor, configuration.getProject()) {
|
||||
|
||||
override final fun getInitialFile(): VirtualFile? =
|
||||
final override fun getInitialFile(): VirtualFile? =
|
||||
super.getInitialFile() ?: LocalFileSystem.getInstance().findFileByPath(configuration.getWorkingDirectorySafe())
|
||||
|
||||
}
|
||||
@@ -50,7 +50,7 @@ abstract class PyAddSdkPanel : JPanel(), PyAddSdkView {
|
||||
|
||||
override fun complete(): Unit = Unit
|
||||
|
||||
override abstract val panelName: String
|
||||
abstract override val panelName: String
|
||||
override val icon: Icon = PythonIcons.Python.Python
|
||||
open val sdk: Sdk? = null
|
||||
open val nameExtensionComponent: JComponent? = null
|
||||
|
||||
@@ -229,7 +229,7 @@ private abstract class LegacyConfigurationManager<
|
||||
/**
|
||||
* If one of these fields is not empty -- legacy configuration makes sence
|
||||
*/
|
||||
open protected fun getFieldsToCheckForEmptiness() = listOf(legacyConfig.scriptName, legacyConfig.className, legacyConfig.methodName)
|
||||
protected open fun getFieldsToCheckForEmptiness() = listOf(legacyConfig.scriptName, legacyConfig.className, legacyConfig.methodName)
|
||||
|
||||
/**
|
||||
* @return true of legacy configuration loaded, false if configuration is pure new
|
||||
|
||||
@@ -644,7 +644,7 @@ abstract class PyAbstractTestConfiguration(project: Project,
|
||||
|
||||
abstract class PyAbstractTestFactory<out CONF_T : PyAbstractTestConfiguration> : PythonConfigurationFactoryBase(
|
||||
PythonTestConfigurationType.getInstance()) {
|
||||
override abstract fun createTemplateConfiguration(project: Project): CONF_T
|
||||
abstract override fun createTemplateConfiguration(project: Project): CONF_T
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -60,7 +60,7 @@ abstract class AbstractEvaluatorExtension(override val language: Language) : UEv
|
||||
}
|
||||
|
||||
abstract class SimpleEvaluatorExtension : AbstractEvaluatorExtension(Language.ANY) {
|
||||
override final fun evaluatePostfix(operator: UastPostfixOperator, operandValue: UValue, state: UEvaluationState): UEvaluationInfo {
|
||||
final override fun evaluatePostfix(operator: UastPostfixOperator, operandValue: UValue, state: UEvaluationState): UEvaluationInfo {
|
||||
val result = evaluatePostfix(operator, operandValue)
|
||||
return if (result != UUndeterminedValue)
|
||||
result.toConstant() to state
|
||||
@@ -70,7 +70,7 @@ abstract class SimpleEvaluatorExtension : AbstractEvaluatorExtension(Language.AN
|
||||
|
||||
open fun evaluatePostfix(operator: UastPostfixOperator, operandValue: UValue): Any? = UUndeterminedValue
|
||||
|
||||
override final fun evaluatePrefix(operator: UastPrefixOperator, operandValue: UValue, state: UEvaluationState): UEvaluationInfo {
|
||||
final override fun evaluatePrefix(operator: UastPrefixOperator, operandValue: UValue, state: UEvaluationState): UEvaluationInfo {
|
||||
val result = evaluatePrefix(operator, operandValue)
|
||||
return if (result != UUndeterminedValue)
|
||||
result.toConstant() to state
|
||||
@@ -80,7 +80,7 @@ abstract class SimpleEvaluatorExtension : AbstractEvaluatorExtension(Language.AN
|
||||
|
||||
open fun evaluatePrefix(operator: UastPrefixOperator, operandValue: UValue): Any? = UUndeterminedValue
|
||||
|
||||
override final fun evaluateBinary(binaryExpression: UBinaryExpression,
|
||||
final override fun evaluateBinary(binaryExpression: UBinaryExpression,
|
||||
leftValue: UValue,
|
||||
rightValue: UValue,
|
||||
state: UEvaluationState): UEvaluationInfo {
|
||||
@@ -93,7 +93,7 @@ abstract class SimpleEvaluatorExtension : AbstractEvaluatorExtension(Language.AN
|
||||
|
||||
open fun evaluateBinary(binaryExpression: UBinaryExpression, leftValue: UValue, rightValue: UValue): Any? = UUndeterminedValue
|
||||
|
||||
override final fun evaluateMethodCall(target: PsiMethod, argumentValues: List<UValue>, state: UEvaluationState): UEvaluationInfo {
|
||||
final override fun evaluateMethodCall(target: PsiMethod, argumentValues: List<UValue>, state: UEvaluationState): UEvaluationInfo {
|
||||
val result = evaluateMethodCall(target, argumentValues)
|
||||
return if (result != UUndeterminedValue)
|
||||
result.toConstant() to state
|
||||
@@ -103,7 +103,7 @@ abstract class SimpleEvaluatorExtension : AbstractEvaluatorExtension(Language.AN
|
||||
|
||||
open fun evaluateMethodCall(target: PsiMethod, argumentValues: List<UValue>): Any? = UUndeterminedValue
|
||||
|
||||
override final fun evaluateVariable(variable: UVariable, state: UEvaluationState): UEvaluationInfo {
|
||||
final override fun evaluateVariable(variable: UVariable, state: UEvaluationState): UEvaluationInfo {
|
||||
val result = evaluateVariable(variable)
|
||||
return if (result != UUndeterminedValue)
|
||||
result.toConstant() to state
|
||||
|
||||
@@ -64,7 +64,7 @@ enum class UNumericType(val prefix: String = "") {
|
||||
}
|
||||
|
||||
abstract class UNumericConstant(val type: UNumericType, override val source: ULiteralExpression?) : UAbstractConstant() {
|
||||
override abstract val value: Number
|
||||
abstract override val value: Number
|
||||
|
||||
override fun toString(): String = "${type.prefix}$value"
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ open class UDependentValue protected constructor(
|
||||
|
||||
override fun toConstant(): UConstant? = value.toConstant()
|
||||
|
||||
open internal fun copy(dependencies: Set<UDependency>) =
|
||||
internal open fun copy(dependencies: Set<UDependency>) =
|
||||
if (dependencies == this.dependencies) this else create(value, dependencies)
|
||||
|
||||
override fun coerceConstant(constant: UConstant): UValue =
|
||||
|
||||
@@ -97,5 +97,5 @@ abstract class UValueBase : UValue {
|
||||
|
||||
override val reachable: Boolean = true
|
||||
|
||||
override abstract fun toString(): String
|
||||
abstract override fun toString(): String
|
||||
}
|
||||
@@ -25,7 +25,7 @@ class JavaUCompositeQualifiedExpression(
|
||||
givenParent: UElement?
|
||||
) : JavaAbstractUExpression(givenParent), UQualifiedReferenceExpression, UMultiResolvable {
|
||||
|
||||
lateinit internal var receiverInitializer: () -> UExpression
|
||||
internal lateinit var receiverInitializer: () -> UExpression
|
||||
|
||||
override val receiver: UExpression by lazy { receiverInitializer() }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user