Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ public void nodeDoubleClicked(Node node) {
TreeItem<Node> treeItem = browserSelectionModel.getSelectedItems().get(0);
tab = new SnapshotTab(treeItem.getValue(), saveAndRestoreService);
((SnapshotTab) tab).loadSnapshot(treeItem.getValue());
return;
break;
case FOLDER:
default:
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@
/**
* Tab for creating or editing composite snapshots,
* i.e. for node type {@link org.phoebus.applications.saveandrestore.model.NodeType#COMPOSITE_SNAPSHOT}.
*
* <p>
* Note that this class is only for editing of {@link Node}s of type {@link org.phoebus.applications.saveandrestore.model.NodeType#COMPOSITE_SNAPSHOT}.
* {@link SnapshotTab} is used to show actual snapshot data.
* </p>
*/
public class CompositeSnapshotTab extends SaveAndRestoreTab {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -346,12 +346,7 @@ public void loadSnapshot(Node snapshotNode) {
snapshotControlsViewController.setSnapshotRestorableProperty(true);
snapshotTableViewController.setSelectionColumnVisible(true);

if (snapshotNode.getNodeType().equals(NodeType.SNAPSHOT)) {
loadSnapshotInternal(snapshotNode);
} else {
snapshotControlsViewController.setNameAndCommentDisabled(true);
loadSnapshotInternal(snapshotNode);
}
loadSnapshotInternal(snapshotNode);
}

public void restore(ActionEvent actionEvent) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,11 +306,6 @@ public SimpleBooleanProperty getSnapshotRestorableProperty() {
return snapshotRestorableProperty;
}

public void setNameAndCommentDisabled(boolean disabled) {
snapshotName.disableProperty().set(disabled);
snapshotComment.disableProperty().set(disabled);
}

public void setSnapshotNode(Node node) {
snapshotNodeProperty.set(node);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@
* {@link Tab} subclass showing a view for the purpose of creating or restoring a snapshot.
* These two use cases/views are split in terms of fxml files and controller classes in order to facilitate development
* and maintenance.
*
* <p>
* Note that this class is used also to show the snapshot view for {@link Node}s of type {@link NodeType#COMPOSITE_SNAPSHOT}.
* </p>
*/
public class SnapshotTab extends SaveAndRestoreTab {

Expand Down