Files
HeidiSQL/extra/jheidi/resetTabsOracle.ajl

45 lines
1.1 KiB
Plaintext

import javax.swing.table.*;
WindowContext context = argObj("windowContext");
HashObject profile = context.get("profile");
Text banner = null;
Table table = null;
if ( "Instance".equals(arg("selectedTab")) )
{
banner = context.get("/mainTabs/Schema/toolbar/banner");
banner.setText("No schema selected");
table = context.get("/mainTabs/Schema/table");
table.clear();
banner = context.get("/mainTabs/Query/toolbar/banner");
banner.setText("SQL query on " + profile.get("user") + "@" + profile.get("host"));
}
else
{
banner = context.get("/mainTabs/Query/toolbar/banner");
}
banner = context.get("/mainTabs/Table/toolbar/banner");
banner.setText("No table selected");
table = context.get("/mainTabs/Table/table");
table.clear();
banner = context.get("/mainTabs/Data/toolbar/banner");
banner.setText("No table selected");
table = context.get("/mainTabs/Data/table");
table.clear();
ToolbarButton btn = context.get("/mainTabs/Table/toolbar/New Field");
btn.setEnabled(false);
btn = context.get("/mainTabs/Table/toolbar/Manage Indexes");
btn.setEnabled(false);