-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'private-main' into public-main
Signed-off-by: Uladzislau <leksilonchikk@gmail.com>
- Loading branch information
Showing
68 changed files
with
1,625 additions
and
1,174 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
81 changes: 81 additions & 0 deletions
81
src/IC-231/kotlin/eu/ibagroup/formainframe/vfs/MFVFilePropertyChangeEvent.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
/* | ||
* Copyright (c) 2020 IBA Group. | ||
* | ||
* This program and the accompanying materials are made available under the terms of the | ||
* Eclipse Public License v2.0 which accompanies this distribution, and is available at | ||
* https://www.eclipse.org/legal/epl-v20.html | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
* | ||
* Contributors: | ||
* IBA Group | ||
* Zowe Community | ||
*/ | ||
|
||
package eu.ibagroup.formainframe.vfs | ||
|
||
import com.intellij.openapi.vfs.VirtualFile | ||
import com.intellij.openapi.vfs.VirtualFileSystem | ||
import com.intellij.openapi.vfs.newvfs.events.VFileEvent | ||
import eu.ibagroup.formainframe.vfs.MFVirtualFileSystem.Companion.MF_VFS_CHANGES_TOPIC | ||
|
||
/** | ||
* MF virtual file property change event. Carries info about a property of a MF virtual file being changed. | ||
* Use it together with [MF_VFS_CHANGES_TOPIC] | ||
* @property requestor an instance to describe the event requester | ||
* @property file the MF virtual file to change property of | ||
* @property propName the name of the property to change | ||
* @property oldValue the old value of the property being changed | ||
* @property newValue the possible new value of the property being changed | ||
* @property delegate the delegate to execute the necessary functions | ||
*/ | ||
class MFVFilePropertyChangeEvent( | ||
requestor: Any?, | ||
private val file: MFVirtualFile, | ||
private val propName: MFVirtualFile.PropName, | ||
private val oldValue: Any, | ||
private val newValue: Any, | ||
private val delegate: MFVFilePropertyChangeEventDelegate | ||
) : VFileEvent(requestor, false) { | ||
|
||
init { | ||
delegate.checkPropValid(requestor, propName, oldValue, newValue) | ||
} | ||
|
||
override fun equals(other: Any?): Boolean { | ||
var otherFile: MFVirtualFile? = null | ||
var otherPropName: MFVirtualFile.PropName? = null | ||
var otherOldValue: Any? = null | ||
var otherNewValue: Any? = null | ||
if (other is MFVFilePropertyChangeEvent) { | ||
otherFile = other.file | ||
otherPropName = other.propName | ||
otherOldValue = other.oldValue | ||
otherNewValue = other.newValue | ||
} | ||
return delegate.equals( | ||
this, file, propName, oldValue, newValue, other, otherFile, otherPropName, otherOldValue, otherNewValue | ||
) | ||
} | ||
|
||
override fun hashCode(): Int { | ||
return delegate.hashCode(propName, oldValue, newValue, file) | ||
} | ||
|
||
override fun computePath(): String { | ||
return delegate.computePath(file) | ||
} | ||
|
||
override fun getFile(): VirtualFile { | ||
return delegate.getFile(file) | ||
} | ||
|
||
override fun getFileSystem(): VirtualFileSystem { | ||
return delegate.getFileSystem(file) | ||
} | ||
|
||
override fun isValid(): Boolean { | ||
return delegate.isValid(file) | ||
} | ||
|
||
} |
77 changes: 77 additions & 0 deletions
77
src/IC-233/kotlin/eu/ibagroup/formainframe/vfs/MFVFilePropertyChangeEvent.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
/* | ||
* This program and the accompanying materials are made available under the terms of the | ||
* Eclipse Public License v2.0 which accompanies this distribution, and is available at | ||
* https://www.eclipse.org/legal/epl-v20.html | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
* | ||
* Copyright IBA Group 2020 | ||
*/ | ||
|
||
package eu.ibagroup.formainframe.vfs | ||
|
||
import com.intellij.openapi.vfs.VirtualFile | ||
import com.intellij.openapi.vfs.VirtualFileSystem | ||
import com.intellij.openapi.vfs.newvfs.events.VFileEvent | ||
import eu.ibagroup.formainframe.vfs.MFVirtualFileSystem.Companion.MF_VFS_CHANGES_TOPIC | ||
|
||
/** | ||
* MF virtual file property change event. Carries info about a property of a MF virtual file being changed. | ||
* Use it together with [MF_VFS_CHANGES_TOPIC] | ||
* @property requestor an instance to describe the event requester | ||
* @property file the MF virtual file to change property of | ||
* @property propName the name of the property to change | ||
* @property oldValue the old value of the property being changed | ||
* @property newValue the possible new value of the property being changed | ||
* @property delegate the delegate to execute the necessary functions | ||
*/ | ||
class MFVFilePropertyChangeEvent( | ||
requestor: Any?, | ||
private val file: MFVirtualFile, | ||
private val propName: MFVirtualFile.PropName, | ||
private val oldValue: Any, | ||
private val newValue: Any, | ||
private val delegate: MFVFilePropertyChangeEventDelegate | ||
) : VFileEvent(requestor) { | ||
|
||
init { | ||
delegate.checkPropValid(requestor, propName, oldValue, newValue) | ||
} | ||
|
||
override fun equals(other: Any?): Boolean { | ||
var otherFile: MFVirtualFile? = null | ||
var otherPropName: MFVirtualFile.PropName? = null | ||
var otherOldValue: Any? = null | ||
var otherNewValue: Any? = null | ||
if (other is MFVFilePropertyChangeEvent) { | ||
otherFile = other.file | ||
otherPropName = other.propName | ||
otherOldValue = other.oldValue | ||
otherNewValue = other.newValue | ||
} | ||
return delegate.equals( | ||
this, file, propName, oldValue, newValue, other, otherFile, otherPropName, otherOldValue, otherNewValue | ||
) | ||
} | ||
|
||
override fun hashCode(): Int { | ||
return delegate.hashCode(propName, oldValue, newValue, file) | ||
} | ||
|
||
override fun computePath(): String { | ||
return delegate.computePath(file) | ||
} | ||
|
||
override fun getFile(): VirtualFile { | ||
return delegate.getFile(file) | ||
} | ||
|
||
override fun getFileSystem(): VirtualFileSystem { | ||
return delegate.getFileSystem(file) | ||
} | ||
|
||
override fun isValid(): Boolean { | ||
return delegate.isValid(file) | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.