Skip to content

Commit

Permalink
Update showView logging
Browse files Browse the repository at this point in the history
  • Loading branch information
angjordn committed Sep 17, 2024
1 parent 503f7f5 commit 35fae3a
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,18 @@ public abstract class AmazonQView extends ViewPart implements ISelectionListener

public static void showView(String viewId) {
if (!amazonQViews.contains(viewId)) {
PluginLogger.error("Failed to show view. You must add the view (" + viewId + ") to amazonQViews Set");
PluginLogger.error("Failed to show view. You must add the view " + viewId + " to amazonQViews Set");
return;
}

IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
if (page != null) {
// Show requested view
try {
PluginLogger.info("Attempting to show view" + viewId);
page.showView(viewId);
PluginLogger.info("Showing view " + viewId);
} catch (Exception e) {
PluginLogger.error("Error occurred while showing view (" + viewId + ")", e);
PluginLogger.error("Error occurred while showing view " + viewId, e);
}

// Hide all other Amazon Q Views
Expand All @@ -57,7 +57,7 @@ public static void showView(String viewId) {
try {
page.hideView(viewRef);
} catch (Exception e) {
PluginLogger.error("Error occurred while hiding view (" + viewId + ")", e);
PluginLogger.error("Error occurred while hiding view " + viewId, e);
}
}
}
Expand Down

0 comments on commit 35fae3a

Please sign in to comment.