use of com.google.security.zynamics.binnavi.config.ConfigManager in project binnavi by google.
the class CIdaSelectionDialog method approve.
/**
* Handles file selection.
*/
private void approve() {
if (m_chooser.getCurrentDirectory() == null) {
return;
}
final ConfigManager configFile = ConfigManager.instance();
if (InstallationState.Installed.equals(CBinExportInstallationChecker.getState(m_chooser.getCurrentDirectory())) && configFile.getGeneralSettings().getIdaDirectory().equals(m_chooser.getCurrentDirectory())) {
CMessageBox.showInformation(this, "Settings unchanged.");
dispose();
return;
}
final InstallationState cppState = CBinExportInstallationChecker.getState(m_chooser.getSelectedFile());
if (cppState != InstallationState.Installed) {
CMessageBox.showError(this, "Please install the BinExport IDA plugin.");
return;
}
m_selectedFile = m_chooser.getSelectedFile();
dispose();
}
use of com.google.security.zynamics.binnavi.config.ConfigManager in project binnavi by google.
the class CGraphBuilder method loadNativeSettings.
/**
* Generates the default graph settings for a native view.
*
* @param view The view whose graph settings are generated.
*
* @return The generated graph settings.
*/
private static Pair<Map<String, String>, ZyGraphViewSettings> loadNativeSettings(final INaviView view) {
final ConfigManager configFile = ConfigManager.instance();
// Native views receive the default settings when they are loaded.
final ZyGraphViewSettings graphSettings = view.getGraphType() == GraphType.CALLGRAPH ? configFile.getDefaultCallGraphSettings() : configFile.getDefaultFlowGraphSettings();
graphSettings.getProximitySettings().setProximityBrowsing(view.getGraph().nodeCount() >= graphSettings.getProximitySettings().getProximityBrowsingActivationThreshold());
return new Pair<Map<String, String>, ZyGraphViewSettings>(new HashMap<String, String>(), graphSettings);
}
Aggregations