mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-09-28 15:47:43 +08:00
GP-1717 - Fixed Plate Comment rending bugs
This commit is contained in:
+7
-34
@@ -21,11 +21,7 @@ import javax.lang.model.element.*;
|
||||
import javax.lang.model.type.*;
|
||||
import javax.tools.Diagnostic.Kind;
|
||||
|
||||
import db.DBHandle;
|
||||
import ghidra.util.database.DBCachedDomainObjectAdapter;
|
||||
import ghidra.util.database.DBOpenMode;
|
||||
import ghidra.util.database.annot.DBAnnotatedField;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
public class DBAnnotatedFieldValidator extends AbstractDBAnnotationValidator {
|
||||
final VariableElement field;
|
||||
@@ -127,31 +123,8 @@ public class DBAnnotatedFieldValidator extends AbstractDBAnnotationValidator {
|
||||
return codecElem;
|
||||
}
|
||||
|
||||
class A extends DBCachedDomainObjectAdapter {
|
||||
|
||||
protected A(DBHandle dbh, DBOpenMode openMode, TaskMonitor monitor, String name,
|
||||
int timeInterval, int bufSize, Object consumer) {
|
||||
super(dbh, openMode, monitor, name, timeInterval, bufSize, consumer);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isChangeable() {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
protected void checkCodecTypes(TypeElement objectType) {
|
||||
|
||||
//experiment(new Blargh(null, null));
|
||||
|
||||
TypeElement codecType = getCodecTypeElement();
|
||||
if (codecType == null) {
|
||||
ctx.messager.printMessage(Kind.ERROR,
|
||||
@@ -169,13 +142,13 @@ public class DBAnnotatedFieldValidator extends AbstractDBAnnotationValidator {
|
||||
// 3) FieldType is non-abstract
|
||||
// 4) The codec has an appropriate constructor
|
||||
|
||||
for (Element enc : codecType.getEnclosedElements()) {
|
||||
if (enc.getKind() == ElementKind.CONSTRUCTOR) {
|
||||
ExecutableElement exe = (ExecutableElement) enc;
|
||||
ExecutableType exeType = (ExecutableType) exe.asType();
|
||||
//throw new RuntimeException();
|
||||
}
|
||||
}
|
||||
// for (Element enc : codecType.getEnclosedElements()) {
|
||||
// if (enc.getKind() == ElementKind.CONSTRUCTOR) {
|
||||
// ExecutableElement exe = (ExecutableElement) enc;
|
||||
// ExecutableType exeType = (ExecutableType) exe.asType();
|
||||
// //throw new RuntimeException();
|
||||
// }
|
||||
// }
|
||||
|
||||
Map<String, TypeMirror> args = ctx.getArguments(codecType, ctx.DB_FIELD_CODEC_ELEM);
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/* ###
|
||||
* IP: GHIDRA
|
||||
* REVIEWED: YES
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -26,38 +25,42 @@ import ghidra.app.util.viewer.proxy.ProxyObj;
|
||||
* the browser needs from the fields.
|
||||
*/
|
||||
public interface ListingField extends Field {
|
||||
/**
|
||||
* Returns the FieldFactory that generated this Field
|
||||
*/
|
||||
/**
|
||||
* Returns the FieldFactory that generated this Field
|
||||
* @return the FieldFactory that generated this Field
|
||||
*/
|
||||
public FieldFactory getFieldFactory();
|
||||
/**
|
||||
* Returns the height above the imaginary base line used for alignment of
|
||||
* fields.
|
||||
*/
|
||||
int getHeightAbove();
|
||||
/**
|
||||
* Returns the height below the imaginary base line used for alignment of
|
||||
* fields.
|
||||
*/
|
||||
int getHeightBelow();
|
||||
|
||||
/**
|
||||
* Returns the fieldModel that has the FieldFactory that generated this field.
|
||||
*/
|
||||
/**
|
||||
* Returns the height above the imaginary base line used for alignment of fields.
|
||||
*/
|
||||
@Override
|
||||
public int getHeightAbove();
|
||||
|
||||
/**
|
||||
* Returns the height below the imaginary base line used for alignment of fields.
|
||||
*/
|
||||
@Override
|
||||
public int getHeightBelow();
|
||||
|
||||
/**
|
||||
* Returns the fieldModel that has the FieldFactory that generated this field.
|
||||
* @return the fieldModel that has the FieldFactory that generated this field.
|
||||
*/
|
||||
public FieldFormatModel getFieldModel();
|
||||
|
||||
/**
|
||||
* Returns the object that the fieldFactory used to generate the information
|
||||
* in this field.
|
||||
*/
|
||||
public ProxyObj getProxy();
|
||||
|
||||
/**
|
||||
* Returns the object that the fieldFactory used to generate the information in this field.
|
||||
* @return the object that the fieldFactory used to generate the information in this field.
|
||||
*/
|
||||
public ProxyObj<?> getProxy();
|
||||
|
||||
/**
|
||||
* Returns the object that was clicked on a Field for the given FieldLocation. This may be the
|
||||
* field itself or a lower-level entity, such as a FieldElement.
|
||||
* field itself or a lower-level entity, such as a FieldElement.
|
||||
*
|
||||
* @param fieldLocation The location that was clicked.
|
||||
* @return the object that was clicked
|
||||
*/
|
||||
public Object getClickedObject( FieldLocation fieldLocation );
|
||||
public Object getClickedObject(FieldLocation fieldLocation);
|
||||
}
|
||||
|
||||
+52
-75
File diff suppressed because it is too large
Load Diff
+159
-118
File diff suppressed because it is too large
Load Diff
@@ -143,7 +143,7 @@ public interface Field {
|
||||
* the given data
|
||||
* @param row the text row
|
||||
* @param col the character position
|
||||
* @return tru if valid
|
||||
* @return true if valid
|
||||
*/
|
||||
public boolean isValid(int row, int col);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user