-
Notifications
You must be signed in to change notification settings - Fork 4
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-release/v1.2.1-221' into zowe-release/v1.2.1-221
Signed-off-by: Uladzislau <[email protected]>
- Loading branch information
Showing
38 changed files
with
396 additions
and
175 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
Binary file not shown.
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
48 changes: 48 additions & 0 deletions
48
src/main/kotlin/org/zowe/explorer/config/connect/ui/ConnectionUssOwnerColumn.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,48 @@ | ||
/* | ||
* 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 org.zowe.explorer.config.connect.ui | ||
|
||
import com.intellij.util.ui.ColumnInfo | ||
import org.zowe.explorer.config.connect.ui.renderer.UssOwnerColumnRenderer | ||
import javax.swing.table.TableCellRenderer | ||
|
||
/** | ||
* Class which represents column of USS Owner in connections GUI | ||
*/ | ||
class ConnectionUssOwnerColumn<ConnectionState : ConnectionDialogStateBase<*>> | ||
: ColumnInfo<ConnectionState, String>("Owner") { | ||
|
||
/** | ||
* Returns name of particular owner | ||
* @param item all info about particular connection to mainframe | ||
* @return name of particular owner | ||
*/ | ||
override fun valueOf(item: ConnectionState): String { | ||
return item.owner | ||
} | ||
|
||
/** | ||
* Sets owner to particular user | ||
* @param item all info about particular connection to mainframe | ||
* @param value new owner of the user | ||
*/ | ||
override fun setValue(item: ConnectionState, value: String) { | ||
item.owner = value | ||
} | ||
|
||
/** | ||
* Specifies a renderer for this cell | ||
*/ | ||
override fun getRenderer(o: ConnectionState): TableCellRenderer { | ||
return UssOwnerColumnRenderer() | ||
} | ||
|
||
} |
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
52 changes: 52 additions & 0 deletions
52
src/main/kotlin/org/zowe/explorer/config/connect/ui/renderer/UssOwnerColumnRenderer.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,52 @@ | ||
/* | ||
* 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 org.zowe.explorer.config.connect.ui.renderer | ||
|
||
import com.intellij.icons.AllIcons | ||
import com.intellij.util.ui.table.IconTableCellRenderer | ||
import javax.swing.Icon | ||
import javax.swing.JTable | ||
import java.awt.Component | ||
|
||
const val WARNING_TOOLTIP_TEXT = "The last TSO request failed. Unable to get the real USS owner. The connection username will be used as USS owner" | ||
|
||
/** | ||
* Renderer class for USS Owner column in the connections table view | ||
*/ | ||
class UssOwnerColumnRenderer : IconTableCellRenderer<String>() { | ||
|
||
/** | ||
* Function returns a warning icon or null if the value is not present | ||
*/ | ||
override fun getIcon(value: String, table: JTable, row: Int): Icon? { | ||
return if(value.isEmpty()) AllIcons.General.Warning else null | ||
} | ||
|
||
/** | ||
* Function returns a component which renders a cell | ||
*/ | ||
override fun getTableCellRendererComponent( | ||
table: JTable?, | ||
value: Any?, | ||
selected: Boolean, | ||
focus: Boolean, | ||
row: Int, | ||
column: Int | ||
): Component { | ||
super.getTableCellRendererComponent(table, value, selected, focus, row, column) | ||
if (icon != null) { | ||
toolTipText = WARNING_TOOLTIP_TEXT | ||
} | ||
return this | ||
} | ||
|
||
|
||
} |
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
Oops, something went wrong.