Java Code Examples for ghidra.util.exception.DuplicateNameException#getMessage()

The following examples show how to use ghidra.util.exception.DuplicateNameException#getMessage() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SetStackDepthChangeCommand.java    From ghidra with Apache License 2.0 5 votes vote down vote up
public boolean applyTo(DomainObject obj) {
	try {
		CallDepthChangeInfo.setStackDepthChange(program, address, stackDepthChange);
		return true;
	} catch (DuplicateNameException e) {
		errMsg = e.getMessage();
		Msg.error(this, "Unexpected Exception: " + e.getMessage(), e);
		return false;
	}
}
 
Example 2
Source File: CreateDefaultTreeCmd.java    From ghidra with Apache License 2.0 5 votes vote down vote up
/**
 * 
 * @see ghidra.framework.cmd.Command#applyTo(ghidra.framework.model.DomainObject)
 */
public boolean applyTo(DomainObject obj) {
	Program program = (Program)obj;
	Listing listing = program.getListing();
	try {
		listing.createRootModule(treeName);
		renameFragments(program, treeName);
		return true;
	} catch (DuplicateNameException e) {
		statusMsg = e.getMessage();
	}
	return false;
}
 
Example 3
Source File: RenameTreeCmd.java    From ghidra with Apache License 2.0 5 votes vote down vote up
/**
 * 
 * @see ghidra.framework.cmd.Command#applyTo(ghidra.framework.model.DomainObject)
 */
public boolean applyTo(DomainObject obj) {
	program = (Program)obj;
	Listing listing = program.getListing();
	try {
		listing.renameTree(oldName, newName);
		return true;
	} catch (DuplicateNameException e) {
		statusMsg = e.getMessage();
	}
	return false;
}