mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-09-19 16:40:38 -09:00
Merge remote-tracking branch 'origin/GP-0-dragonmacher-test-fixes-11-30-21'
This commit is contained in:
@@ -293,20 +293,7 @@ public class LocationReferencesPlugin extends Plugin
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void findAndDisplayAppliedDataTypeAddresses(DataType dataType) {
|
public void findAndDisplayAppliedDataTypeAddresses(DataType dataType) {
|
||||||
ProgramManager programManagerService = tool.getService(ProgramManager.class);
|
findAndDisplayAppliedDataTypeAddresses(dataType, null);
|
||||||
GoToService goToService = tool.getService(GoToService.class);
|
|
||||||
Program program = programManagerService.getCurrentProgram();
|
|
||||||
if (program == null) {
|
|
||||||
Msg.showInfo(this, null, "Find References To...",
|
|
||||||
"You must have a program open in order to use the 'Find References To...' action");
|
|
||||||
return; // cannot find references to a data type if there is no open program
|
|
||||||
}
|
|
||||||
|
|
||||||
ProgramLocation genericLocation = new GenericDataTypeProgramLocation(program, dataType);
|
|
||||||
LocationDescriptor locationDescriptor = getLocationDescriptor(genericLocation);
|
|
||||||
Navigatable navigatable = goToService.getDefaultNavigatable();
|
|
||||||
LocationReferencesProvider provider = findProvider(locationDescriptor, navigatable);
|
|
||||||
showProvider(program, provider, locationDescriptor, navigatable);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -320,8 +307,15 @@ public class LocationReferencesPlugin extends Plugin
|
|||||||
return; // cannot find references to a data type if there is no open program
|
return; // cannot find references to a data type if there is no open program
|
||||||
}
|
}
|
||||||
|
|
||||||
ProgramLocation genericLocation =
|
ProgramLocation genericLocation;
|
||||||
new GenericCompositeDataTypeProgramLocation(program, dataType, fieldName);
|
if (fieldName != null) {
|
||||||
|
genericLocation =
|
||||||
|
new GenericCompositeDataTypeProgramLocation(program, dataType, fieldName);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
genericLocation = new GenericDataTypeProgramLocation(program, dataType);
|
||||||
|
}
|
||||||
|
|
||||||
LocationDescriptor locationDescriptor = getLocationDescriptor(genericLocation);
|
LocationDescriptor locationDescriptor = getLocationDescriptor(genericLocation);
|
||||||
Navigatable navigatable = goToService.getDefaultNavigatable();
|
Navigatable navigatable = goToService.getDefaultNavigatable();
|
||||||
LocationReferencesProvider provider = findProvider(locationDescriptor, navigatable);
|
LocationReferencesProvider provider = findProvider(locationDescriptor, navigatable);
|
||||||
|
|||||||
Reference in New Issue
Block a user