mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 19:42:36 +02:00
GP-5157 - Listing Colors - Combined color usage for functions so that they are displayed the same in different parts of the Listing
This commit is contained in:
parent
6e9340b4b8
commit
779ef887e0
18 changed files with 224 additions and 214 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.
|
||||
|
@ -346,7 +346,6 @@ public class VTMarkupItemsTableModel extends AddressBasedTableModel<VTMarkupItem
|
|||
}
|
||||
Color c = FG_ERROR;
|
||||
if (symbolInspector != null) {
|
||||
symbolInspector.setProgram(program);
|
||||
c = symbolInspector.getColor(s);
|
||||
}
|
||||
setForeground(c);
|
||||
|
@ -481,7 +480,6 @@ public class VTMarkupItemsTableModel extends AddressBasedTableModel<VTMarkupItem
|
|||
}
|
||||
Color c = FG_ERROR;
|
||||
if (symbolInspector != null) {
|
||||
symbolInspector.setProgram(program);
|
||||
c = symbolInspector.getColor(s);
|
||||
}
|
||||
setForeground(c);
|
||||
|
|
|
@ -5,9 +5,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.
|
||||
|
@ -587,7 +587,6 @@ public abstract class AbstractVTMatchTableModel extends AddressBasedTableModel<V
|
|||
renderer.setToolTipText(symbol.getName(true));
|
||||
}
|
||||
if (symbolInspector != null) {
|
||||
symbolInspector.setProgram(symbol.getProgram());
|
||||
renderer.setForeground(symbolInspector.getColor(symbol));
|
||||
}
|
||||
}
|
||||
|
@ -716,7 +715,6 @@ public abstract class AbstractVTMatchTableModel extends AddressBasedTableModel<V
|
|||
Address address = displayableAddress.getAddress();
|
||||
if (!address.isMemoryAddress() && symbolInspector != null) {
|
||||
Symbol s = program.getSymbolTable().getPrimarySymbol(address);
|
||||
symbolInspector.setProgram(program);
|
||||
Color c = (s != null) ? symbolInspector.getColor(s) : FG_ERROR;
|
||||
setForeground(c);
|
||||
}
|
||||
|
@ -826,7 +824,6 @@ public abstract class AbstractVTMatchTableModel extends AddressBasedTableModel<V
|
|||
renderer.setToolTipText(symbol.getName(true));
|
||||
}
|
||||
if (symbolInspector != null) {
|
||||
symbolInspector.setProgram(symbol.getProgram());
|
||||
renderer.setForeground(symbolInspector.getColor(symbol));
|
||||
}
|
||||
}
|
||||
|
@ -955,7 +952,6 @@ public abstract class AbstractVTMatchTableModel extends AddressBasedTableModel<V
|
|||
Address address = displayableAddress.getAddress();
|
||||
if (!address.isMemoryAddress() && symbolInspector != null) {
|
||||
Symbol s = program.getSymbolTable().getPrimarySymbol(address);
|
||||
symbolInspector.setProgram(program);
|
||||
Color c = (s != null) ? symbolInspector.getColor(s) : FG_ERROR;
|
||||
setForeground(c);
|
||||
}
|
||||
|
|
|
@ -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.
|
||||
|
@ -53,7 +53,6 @@ public class VTSymbolRenderer extends GhidraTableCellRenderer {
|
|||
Color color = Colors.FOREGROUND;
|
||||
if (value instanceof Symbol) {
|
||||
Symbol s = (Symbol) value;
|
||||
inspector.setProgram(s.getProgram());
|
||||
color = inspector.getColor(s);
|
||||
}
|
||||
setForeground(color);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue