Java Code Examples for ghidra.framework.options.Options#setDate()

The following examples show how to use ghidra.framework.options.Options#setDate() . 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: ProgramDB.java    From ghidra with Apache License 2.0 5 votes vote down vote up
private void propertiesCreate() {
	Options pl = getOptions(PROGRAM_INFO);
	boolean origChangeState = changed;
	pl.setString(EXECUTABLE_PATH, UNKNOWN);
	pl.setString(EXECUTABLE_FORMAT, UNKNOWN);
	pl.setString(CREATED_WITH_GHIDRA_VERSION, Application.getApplicationVersion());
	pl.setDate(DATE_CREATED, new Date());
	changed = origChangeState;
}
 
Example 2
Source File: DataTypeArchiveDB.java    From ghidra with Apache License 2.0 5 votes vote down vote up
private void propertiesCreate() {
		Options pl = getOptions(ARCHIVE_INFO);
		boolean origChangeState = changed;
		pl.setString(CREATED_WITH_GHIDRA_VERSION, Application.getApplicationVersion());
		pl.setDate(DATE_CREATED, new Date());
//	    registerDefaultPointerSize();
		changed = origChangeState;
	}
 
Example 3
Source File: PropertyListMergeManager.java    From ghidra with Apache License 2.0 5 votes vote down vote up
private void setValue(Options options, String propertyName, OptionType type, Object value) {

		switch (type) {
			case BOOLEAN_TYPE:
				options.setBoolean(propertyName, ((Boolean) value).booleanValue());
				break;

			case DOUBLE_TYPE:
				options.setDouble(propertyName, ((Double) value).doubleValue());
				break;

			case INT_TYPE:
				options.setInt(propertyName, ((Integer) value).intValue());
				break;

			case LONG_TYPE:
				options.setLong(propertyName, ((Long) value).longValue());
				break;

			case STRING_TYPE:
				options.setString(propertyName, (String) value);
				break;
			case DATE_TYPE:
				options.setDate(propertyName, (Date) value);
				break;

			case NO_TYPE:
			default:
		}
	}
 
Example 4
Source File: MergeProgramBuilder.java    From ghidra with Apache License 2.0 5 votes vote down vote up
private void initialize() {

		Date date = new Date();
		for (ProgramBuilder builder : builders) {
			ProgramDB p = builder.getProgram();
			int ID = p.startTransaction("Property");
			Options options = p.getOptions("Program Information");
			options.setDate("Date Created", date);
			p.endTransaction(ID, true);

			builder.setRecordChanges(true);
		}

	}