Merge remote-tracking branch 'origin/patch'

This commit is contained in:
Ryan Kurtz
2025-03-21 06:12:55 -04:00
2 changed files with 24 additions and 5 deletions
@@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -118,7 +118,7 @@ public class TestDummyDomainFile implements DomainFile {
@Override
public boolean isLinkFile() {
throw new UnsupportedOperationException();
return false;
}
@Override
@@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -15,6 +15,8 @@
*/
package help.screenshot;
import java.io.IOException;
import javax.swing.JComboBox;
import org.junit.Test;
@@ -25,6 +27,9 @@ import ghidra.app.util.exporter.Exporter;
import ghidra.framework.model.*;
import ghidra.framework.preferences.Preferences;
import ghidra.program.model.listing.Program;
import ghidra.util.exception.CancelledException;
import ghidra.util.exception.VersionException;
import ghidra.util.task.TaskMonitor;
public class ExporterPluginScreenShots extends GhidraScreenShotGenerator {
@@ -102,6 +107,20 @@ public class ExporterPluginScreenShots extends GhidraScreenShotGenerator {
public Class<? extends DomainObject> getDomainObjectClass() {
return Program.class;
}
@Override
public DomainObject getImmutableDomainObject(Object consumer, int version,
TaskMonitor monitor) throws VersionException, IOException, CancelledException {
try {
return createDefaultProgram(getName(),
getSLEIGH_8051_LANGUAGE().getLanguageID().toString(), consumer);
}
catch (Exception e) {
failWithException("Unexpected exception", e);
return null;
}
}
};
return df;
}