Skip to content

Commit

Permalink
Release/v1.2.0-223 is created
Browse files Browse the repository at this point in the history
Signed-off-by: Uladzislau <[email protected]>
  • Loading branch information
KUGDev committed Mar 13, 2024
2 parents 784a60e + 506a659 commit 0ad65cc
Show file tree
Hide file tree
Showing 25 changed files with 38 additions and 161 deletions.
14 changes: 7 additions & 7 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ apply(plugin = "org.jetbrains.intellij")
apply(from = "gradle/sonar.gradle")

group = "org.zowe"
version = "1.2.0-221"
version = "1.2.0-223"
val remoteRobotVersion = "0.11.21"
val okHttp3Version = "4.12.0"
val kotestVersion = "5.6.2"
Expand All @@ -56,8 +56,8 @@ repositories {
}

java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

dependencies {
Expand Down Expand Up @@ -85,20 +85,20 @@ dependencies {
}

intellij {
version.set("2022.1")
version.set("2022.3")
}

tasks {
withType<KotlinCompile> {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.toString()
jvmTarget = JavaVersion.VERSION_17.toString()
languageVersion = org.jetbrains.kotlin.config.LanguageVersion.LATEST_STABLE.versionString
}
}

patchPluginXml {
sinceBuild.set("221.5080")
untilBuild.set("222.*")
sinceBuild.set("223.7571")
untilBuild.set("223.*")
changeNotes.set(
"""
<b>New features:</b>
Expand Down
12 changes: 2 additions & 10 deletions src/main/kotlin/org/zowe/explorer/config/ConfigSandboxImpl.kt
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ import org.zowe.explorer.utils.crudable.ReloadableEventHandler
import org.zowe.explorer.utils.crudable.getAll
import org.zowe.explorer.utils.isThe
import org.zowe.explorer.utils.isTheSameAs
import java.util.stream.Collectors


/** Stateful class to represent the plugin configs sandbox */
data class SandboxState(
Expand Down Expand Up @@ -213,21 +211,15 @@ class ConfigSandboxImpl : ConfigSandbox {
service<ConfigService>()
.getRegisteredConfigDeclarations()
.filter { it.useCredentials }
// TODO: remove in v1.*.*-223 and greater
.flatMap { configCrudable.getAll(it.clazz).collect(Collectors.toList()) }
// TODO: use in v1.*.*-223 and greater
// .flatMap { configCrudable.getAll(it.clazz).toList() }
.flatMap { configCrudable.getAll(it.clazz).toList() }
.filterIsInstance<EntityWithUuid>()
.map {
with(CredentialService.instance) {
Credentials(it.uuid, getUsernameByKey(it.uuid) ?: "", getPasswordByKey(it.uuid) ?: "")
}
}
} else {
// TODO: remove in v1.*.*-223 and greater
configCrudable.getAll(clazz).collect(Collectors.toList())
// TODO: use in v1.*.*-223 and greater
// configCrudable.getAll(clazz).toList()
configCrudable.getAll(clazz).toList()
}
listOfNotNull(classToList(clazz, state), classToList(clazz, initialState))
.forEach { list ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import org.zowe.explorer.utils.nullable
import org.zowe.explorer.utils.validateForBlank
import org.zowe.explorer.utils.validateWorkingSetName
import java.awt.Dimension
import java.util.stream.Collectors
import javax.swing.JComponent

/**
Expand Down Expand Up @@ -66,12 +65,7 @@ abstract class AbstractWsDialog<Connection : ConnectionConfigBase, WSConfig : Wo
abstract val wsConfigClass: Class<out WSConfig>
abstract val connectionClass: Class<out Connection>

// TODO: remove in v1.*.*-223 and greater
private val connectionComboBoxModel by lazy {
CollectionComboBoxModel(crudable.getAll(connectionClass).collect(Collectors.toList()))
}
// TODO: use in v1.*.*-223 and greater
// private val connectionComboBoxModel by lazy { CollectionComboBoxModel(crudable.getAll(connectionClass).toList()) }
private val connectionComboBoxModel by lazy { CollectionComboBoxModel(crudable.getAll(connectionClass).toList()) }

/**
* Name of masks table.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,16 +96,6 @@ class SyncAction : DumbAwareAction() {
}
val editor = getEditor(e) ?: return

// TODO: remove in v1.*.*-223 and greater
val isDumbMode = ActionUtil.isDumbMode(e.project)
if (!isDumbMode && file.isWritable) {
editor.document.setReadOnly(false)
editor.isViewer = false
} else {
e.presentation.isEnabledAndVisible = false
return
}

val contentSynchronizer = service<DataOpsManager>().getContentSynchronizer(file)
val syncProvider = DocumentedSyncProvider(file)
val currentContent = runReadActionInEdtAndWait { syncProvider.retrieveCurrentContent() }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import org.zowe.explorer.utils.runIfTrue
import org.zowe.explorer.utils.runWriteActionOnWriteThread
import org.zowe.explorer.utils.sendTopic
import java.util.concurrent.locks.ReentrantLock
import java.util.stream.Collectors
import kotlin.collections.set
import kotlin.concurrent.withLock

Expand Down Expand Up @@ -173,10 +172,7 @@ abstract class RemoteFileFetchProviderBase<Connection : ConnectionConfigBase, Re
// TODO: does not work correctly on datasets (check VOLSER)
oldFile.isValid && files.none { compareOldAndNewFile(oldFile, it) }
}
// TODO: remove in v1.*.*-223 and greater
?.collect(Collectors.toList())
// TODO: use in v1.*.*-223 and greater
// ?.toList()
?.toList()
?.apply {
runWriteActionOnWriteThread {
forEach { cleanupUnusedFile(it, query) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,28 +49,14 @@ class ChangeContentServiceImpl : ChangeContentService {
if (action is EditorPasteAction || (action is PasteAction && event.place == "EditorPopup")) {
val editor = event.getData(CommonDataKeys.EDITOR) ?: return

// TODO: remove below check in v1.*.*-223 and greater
val isFileWritable = requestDocumentWriting(editor)
if (isFileWritable) {
processMfContent(editor)
}

// TODO: use in v1.*.*-223 and greater
//processMfContent(editor)
processMfContent(editor)
}
}

override fun afterEditorTyping(c: Char, dataContext: DataContext) {
val editor = dataContext.getData(CommonDataKeys.EDITOR) ?: return

// TODO: remove below check in v1.*.*-223 and greater
val isFileWritable = requestDocumentWriting(editor)
if (isFileWritable) {
processMfContent(editor)
}

// TODO: use in v1.*.*-223 and greater
//processMfContent(editor)
processMfContent(editor)
}
}
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,7 @@ class FileEditorEventsListener : FileEditorManagerListener {
override fun fileOpened(source: FileEditorManager, file: VirtualFile) {
if (file is MFVirtualFile) {
val editor = source.selectedTextEditor as? EditorEx

// TODO: remove in v1.*.*-223 and greater
if (editor != null) {
editor.addFocusListener(focusListener)
val isDumbMode = ActionUtil.isDumbMode(editor.project)
if (isDumbMode) {
editor.document.setReadOnly(true)
editor.isViewer = true
}
}

// TODO: use in v1.*.*-223 and greater
//editor?.addFocusListener(focusListener)
editor?.addFocusListener(focusListener)
}
super.fileOpened(source, file)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import com.intellij.openapi.components.service
import com.intellij.openapi.editor.Editor
import com.intellij.openapi.editor.ex.EditorEx
import com.intellij.openapi.editor.ex.FocusChangeListener
// import com.intellij.openapi.ui.isComponentUnderMouse // TODO: needed in v1.*.*-223 and greater
import com.intellij.openapi.ui.isComponentUnderMouse
import org.zowe.explorer.config.ConfigService
import org.zowe.explorer.dataops.DataOpsManager
import org.zowe.explorer.dataops.content.synchronizer.AutoSyncFileListener
Expand Down
18 changes: 0 additions & 18 deletions src/main/kotlin/org/zowe/explorer/editor/MFPastePreprocessor.kt
Original file line number Diff line number Diff line change
Expand Up @@ -43,24 +43,6 @@ class MFPastePreprocessor : CopyPastePostProcessor<TextBlockTransferableData>()
return DATA_FLAVOR
}

// This function is not needed to be overridden since v1.*.*-223
@ApiStatus.ScheduledForRemoval(inVersion = "2.0.0")
override fun getOffsetCount(): Int {
return 0
}

// This function is not needed to be overridden since v1.*.*-223
@ApiStatus.ScheduledForRemoval(inVersion = "2.0.0")
override fun getOffsets(offsets: IntArray?, index: Int): Int {
return index
}

// This function is not needed to be overridden since v1.*.*-223
@ApiStatus.ScheduledForRemoval(inVersion = "2.0.0")
override fun setOffsets(offsets: IntArray?, index: Int): Int {
return index
}

companion object {
private val DATA_FLAVOR = DataFlavor(MFPastePreprocessor::class.java, "class: ChangeContentByPasteAction")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,10 @@ import org.zowe.explorer.dataops.attributes.RemoteDatasetAttributes
import org.zowe.explorer.dataops.attributes.RemoteMemberAttributes
import org.zowe.explorer.dataops.exceptions.CallException
import org.zowe.explorer.dataops.getAttributesService
import org.zowe.explorer.dataops.operations.DeleteMemberOperation
import org.zowe.explorer.dataops.operations.DeleteMemberOperationParams
import org.zowe.explorer.dataops.operations.MemberAllocationOperation
import org.zowe.explorer.dataops.operations.MemberAllocationParams
import org.zowe.explorer.dataops.operations.*
import org.zowe.explorer.explorer.ExplorerUnit
import org.zowe.explorer.explorer.FilesWorkingSet
import org.zowe.explorer.explorer.ui.AddMemberDialog
import org.zowe.explorer.explorer.ui.ExplorerUnitTreeNodeBase
import org.zowe.explorer.explorer.ui.FetchNode
import org.zowe.explorer.explorer.ui.FileExplorerView
import org.zowe.explorer.explorer.ui.FileLikeDatasetNode
import org.zowe.explorer.explorer.ui.LibraryNode
import org.zowe.explorer.explorer.ui.getExplorerView
import org.zowe.explorer.utils.service
import org.zowe.explorer.explorer.ui.*
import org.zowe.explorer.vfs.MFVirtualFile

/** Class that represents "Add member" action */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ import org.zowe.explorer.explorer.ui.getExplorerView
import org.zowe.explorer.utils.castOrNull
import org.zowe.explorer.utils.clone
import org.zowe.explorer.utils.crudable.getByUniqueKey
import org.zowe.explorer.utils.service // TODO: remove in v1.*.*-223 and later
import org.zowe.kotlinsdk.Dataset
import org.zowe.kotlinsdk.DatasetOrganization
import org.zowe.kotlinsdk.DsnameType
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,10 @@ import com.intellij.openapi.components.service
import com.intellij.openapi.ui.Messages
import com.intellij.openapi.vfs.VirtualFile
import org.zowe.explorer.dataops.DataOpsManager
import org.zowe.explorer.dataops.attributes.AttributesService
import org.zowe.explorer.dataops.attributes.FileAttributes
import org.zowe.explorer.dataops.attributes.RemoteDatasetAttributes
import org.zowe.explorer.dataops.attributes.RemoteUssAttributes
import org.zowe.explorer.dataops.attributes.RemoteUssAttributesService
import org.zowe.explorer.dataops.attributes.*
import org.zowe.explorer.explorer.ui.FileExplorerView
import org.zowe.explorer.explorer.ui.getExplorerView
import org.zowe.explorer.utils.sendTopic
import org.zowe.explorer.utils.service // TODO: remove in v1.*.*-223 and later
import org.zowe.explorer.vfs.MFVirtualFile
import org.zowe.kotlinsdk.XIBMDataType

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import org.zowe.explorer.dataops.operations.UssChangeModeOperation
import org.zowe.explorer.dataops.operations.UssChangeModeParams
import org.zowe.explorer.explorer.ui.*
import org.zowe.explorer.utils.castOrNull
import org.zowe.explorer.utils.service // TODO: remove in v1.*.*-223 and greater
import org.zowe.explorer.vfs.MFVirtualFile
import org.zowe.kotlinsdk.ChangeMode
import org.zowe.kotlinsdk.FileType
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import org.zowe.explorer.dataops.operations.jobs.PurgeJobOperation
import org.zowe.explorer.explorer.ui.*
import org.zowe.explorer.ui.build.jobs.JOBS_LOG_VIEW
import org.zowe.explorer.ui.build.jobs.JobBuildTreeView
import org.zowe.explorer.utils.service // TODO: remove in v1.*.*-223 and greater
import org.zowe.kotlinsdk.ExecData
import org.zowe.kotlinsdk.JESApi
import org.zowe.kotlinsdk.Job
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import org.zowe.explorer.dataops.attributes.RemoteMemberAttributes
import org.zowe.explorer.dataops.attributes.RemoteUssAttributes
import org.zowe.explorer.dataops.operations.RenameOperation
import org.zowe.explorer.explorer.ui.*
import org.zowe.explorer.utils.service // TODO: remove in v1.*.*-223 and greater
import org.zowe.explorer.vfs.MFVirtualFile

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import org.zowe.explorer.explorer.Explorer
import org.zowe.explorer.explorer.UIComponentManager
import org.zowe.explorer.utils.isBeingEditingNow
import org.zowe.explorer.utils.runWriteActionInEdtAndWait
import org.zowe.explorer.utils.service // TODO: remove in v1.*.*-223 and greater
import org.zowe.explorer.vfs.MFVirtualFile
import javax.swing.tree.TreePath

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ class ExplorerWindowFactory : ToolWindowFactory, DumbAware {
}

override fun createToolWindowContent(project: Project, toolWindow: ToolWindow) {
// TODO: ContentFactory.SERVICE.getInstance() -> ContentFactory.getInstance() in new versions of the plugin
val contentFactory = ContentFactory.SERVICE.getInstance()
val contentFactory = ContentFactory.getInstance()
UIComponentManager.INSTANCE.getExplorerContentProviders().forEach {
val content = contentFactory
.createContent(it.buildExplorerContent(toolWindow.disposable, project), it.displayName, it.isLockable)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ import org.zowe.explorer.explorer.Explorer
import org.zowe.explorer.explorer.FilesWorkingSet
import org.zowe.explorer.utils.getMinimalCommonParents
import org.zowe.explorer.utils.getParentsChain
import org.zowe.explorer.utils.service // TODO: remove in v1.*.*-223 and greater
import org.zowe.explorer.vfs.MFVirtualFile
import java.awt.Toolkit
import java.awt.datatransfer.DataFlavor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import org.zowe.explorer.dataops.DataOpsManager
import org.zowe.explorer.dataops.attributes.RemoteDatasetAttributes
import org.zowe.explorer.dataops.attributes.RemoteMemberAttributes
import org.zowe.explorer.explorer.ExplorerUnit
import org.zowe.explorer.utils.service // TODO: remove in v1.*.*-223 and greater
import org.zowe.explorer.vfs.MFVirtualFile
import icons.ForMainframeIcons

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import org.zowe.explorer.utils.validateForBlank
import org.zowe.explorer.utils.validateForPositiveInteger
import org.zowe.kotlinsdk.TsoCodePage
import java.awt.Dimension
import java.util.stream.Collectors
import javax.swing.JComboBox
import javax.swing.JComponent
import javax.swing.JTextField
Expand All @@ -50,12 +49,7 @@ class TSOSessionDialog(project: Project?, override var state: TSOSessionParams)
private lateinit var regionField: JTextField
private lateinit var connectionBox: JComboBox<ConnectionConfig>

// TODO: remove in v1.*.*-223 and greater
private var connectionComboBoxModel =
CollectionComboBoxModel(configCrudable.getAll<ConnectionConfig>().collect(Collectors.toList()))

// TODO: use in v1.*.*-223 and greater
// private var connectionComboBoxModel = CollectionComboBoxModel(configCrudable.getAll<ConnectionConfig>().toList())
private var connectionComboBoxModel = CollectionComboBoxModel(configCrudable.getAll<ConnectionConfig>().toList())
private var codepageComboBoxModel = CollectionComboBoxModel(TsoCodePage.values().toList())

/**
Expand Down Expand Up @@ -229,13 +223,13 @@ class TSOSessionDialog(project: Project?, override var state: TSOSessionParams)
* Data class represents the initial state of the dialog. It sets the default parameters for the TSO session.
*/
data class TSOSessionParams(
var connectionConfig : ConnectionConfig = configCrudable.getAll(ConnectionConfig::class.java).findFirst().get(),
var logonproc : String = "DBSPROCC",
var charset : String = "697",
var codepage : TsoCodePage = TsoCodePage.IBM_1047,
var rows : String = "24",
var cols : String = "80",
var acct : String = "ACCT#",
var usergroup : String = "GROUP1",
var region : String = "64000"
var connectionConfig: ConnectionConfig = configCrudable.getAll(ConnectionConfig::class.java).findFirst().get(),
var logonproc: String = "DBSPROCC",
var charset: String = "697",
var codepage: TsoCodePage = TsoCodePage.IBM_1047,
var rows: String = "24",
var cols: String = "80",
var acct: String = "ACCT#",
var usergroup: String = "GROUP1",
var region: String = "64000"
)
4 changes: 2 additions & 2 deletions src/main/kotlin/org/zowe/explorer/utils/encodingUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import com.intellij.codeInspection.InspectionEngine
import com.intellij.codeInspection.InspectionManager
import com.intellij.icons.AllIcons
import com.intellij.ide.IdeBundle
import com.intellij.openapi.actionSystem.ActionUpdateThread
import com.intellij.openapi.actionSystem.AnActionEvent
import com.intellij.openapi.actionSystem.DefaultActionGroup
import com.intellij.openapi.fileEditor.FileDocumentManager
Expand Down Expand Up @@ -164,8 +165,7 @@ fun createCharsetsActionGroup(virtualFile: VirtualFile, attributes: RemoteUssAtt
super.update(e)
}

// TODO: needed in v1.*.*-223 and greater
// override fun getActionUpdateThread() = ActionUpdateThread.BGT
override fun getActionUpdateThread() = ActionUpdateThread.BGT
}
}

Expand Down
Loading

0 comments on commit 0ad65cc

Please sign in to comment.