mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-03 17:59:46 +02:00
GP-5326 created edit structure field action and dialog.
This commit is contained in:
parent
b22c84a3be
commit
0b0b330bac
15 changed files with 672 additions and 137 deletions
|
@ -455,11 +455,8 @@ class DataTypeComponentDB implements InternalDataTypeComponent {
|
|||
return InternalDataTypeComponent.toString(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if component is an undefined filler component
|
||||
* @return true if undefined filler component, else false
|
||||
*/
|
||||
boolean isUndefined() {
|
||||
@Override
|
||||
public boolean isUndefined() {
|
||||
return record == null && cachedDataType == null;
|
||||
}
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
@ -146,6 +146,11 @@ public class AlignedStructureInspector extends AlignedStructurePacker {
|
|||
this.dataType = dataType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUndefined() {
|
||||
return component.isUndefined();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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.
|
||||
|
@ -173,4 +173,10 @@ public interface DataTypeComponent {
|
|||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if this this component is not defined. It is just a placeholder.
|
||||
* @return true if this this component is not defined. It is just a placeholder.
|
||||
*/
|
||||
public boolean isUndefined();
|
||||
|
||||
}
|
||||
|
|
|
@ -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.
|
||||
|
@ -334,11 +334,8 @@ public class DataTypeComponentImpl implements InternalDataTypeComponent, Seriali
|
|||
dataType = dt;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if component is an undefined filler component
|
||||
* @return true if undefined filler component, else false
|
||||
*/
|
||||
boolean isUndefined() {
|
||||
@Override
|
||||
public boolean isUndefined() {
|
||||
return dataType == DataType.DEFAULT;
|
||||
}
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
@ -33,10 +33,10 @@ public class ReadOnlyDataTypeComponent implements DataTypeComponent, Serializabl
|
|||
private final int ordinal; // position in parent
|
||||
private final String comment; // comment about this component.
|
||||
private final int length; // my length
|
||||
|
||||
|
||||
private String fieldName; // name of this prototype in the component
|
||||
private Settings defaultSettings;
|
||||
|
||||
|
||||
/**
|
||||
* Create a new DataTypeComponent
|
||||
* @param dataType the dataType for this component
|
||||
|
@ -195,4 +195,9 @@ public class ReadOnlyDataTypeComponent implements DataTypeComponent, Serializabl
|
|||
return s1.equals(s2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUndefined() {
|
||||
return dataType == DataType.DEFAULT;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue