use of net.sourceforge.usbdm.constants.ToolInformationData in project usbdm-eclipse-plugins by podonoghue.
the class PrefixedCommandLineGenerator method getToolPrefix.
/**
* @param tool The tool to look in for options
* @return The tool prefix e.g.arm-none-eabi-
*/
private String getToolPrefix(ITool tool) {
if (buildToolOptionId == null) {
// System.err.println("PrefixedCmdLineGenerator.getToolPrefix() buildToolOptionId null");
return "";
}
IToolChain toolChain = getToolChain(tool);
if (toolChain == null) {
// System.err.println("PrefixedCmdLineGenerator.getToolPrefix() Toolchain null");
return "";
}
// System.err.println("PrefixedCmdLineGenerator.getToolPrefix() buildToolOptionId = " +buildToolOptionId);
// System.err.println("PrefixedCmdLineGenerator.getToolPrefix() Checking toolchain: " + toolChain.getId());
// Find selected build tool
IOption buildToolOption = toolChain.getOptionBySuperClassId(buildToolOptionId);
// }
if (buildToolOption == null) {
return "";
}
// Get build path variable
ToolInformationData toolData = ToolInformationData.getToolInformationTable().get(buildToolOption.getValue().toString());
if (toolData == null) {
return null;
}
String toolPrefixVariableId = toolData.getPrefixVariableName();
if (toolPrefixVariableId == null) {
return "";
}
UsbdmSharedSettings settings = UsbdmSharedSettings.getSharedSettings();
String toolPrefix = null;
if (settings != null) {
toolPrefix = settings.get(toolPrefixVariableId);
}
if (toolPrefix == null) {
toolPrefix = "Tool Prefix not set";
}
// }
return toolPrefix;
}
use of net.sourceforge.usbdm.constants.ToolInformationData in project usbdm-eclipse-plugins by podonoghue.
the class UsbdmDebuggerPanel method buildToolSelectionChanged.
private void buildToolSelectionChanged() {
ToolInformationData toolInfo = ToolInformationData.getToolInformationTable().get(getBuildToolId());
if (toolInfo != null) {
fTextGdbCommand.setText("${" + toolInfo.getPrefixVariableName() + "}" + UsbdmSharedConstants.GDB_NAME);
fTextGdbBinPath.setText("${" + toolInfo.getPathVariableName() + "}");
}
fTextGdbCommand.setEnabled(toolInfo == null);
fButtonGdbCommandVariables.setEnabled(toolInfo == null);
fTextGdbBinPath.setEnabled(toolInfo == null);
fButtonGdbBinPathBrowse.setEnabled(toolInfo == null);
fButtonGdbBinPathVariables.setEnabled(toolInfo == null);
}
Aggregations