mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 02:39:44 +02:00
Merge remote-tracking branch 'origin/Ghidra_11.4'
This commit is contained in:
commit
5e17903c66
6 changed files with 139 additions and 75 deletions
|
@ -55,9 +55,13 @@
|
|||
checked out "disappear" from the Ghidra Project Window, as they are unavailable. Private
|
||||
files remain intact and are not affected by the server connection.</P>
|
||||
|
||||
<P><IMG alt="" src="help/shared/tip.png" border="0">You are authenticated only once per
|
||||
Ghidra session; so if you open other project repositories managed by the same Ghidra Server,
|
||||
you will be prompted only once for a password, as required. </P>
|
||||
<BLOCKQUOTE>
|
||||
<P>
|
||||
<IMG SRC="help/shared/tip.png" />
|
||||
You are authenticated only once per
|
||||
Ghidra session; so if you open other project repositories managed by the same Ghidra Server,
|
||||
you will be prompted only once for a password, as required. </P>
|
||||
</BLOCKQUOTE>
|
||||
|
||||
<H3><A name="Troubleshooting"></A>Troubleshooting a Failed Connection</H3>
|
||||
|
||||
|
@ -133,17 +137,25 @@
|
|||
has not been added to version control (note the plain icon and no version information). It
|
||||
is considered to be a "private" file. Private files are never visible to other users.</P>
|
||||
|
||||
<P><IMG alt="" src="help/shared/note.png" border="0"> A normal checkout is indicated by a
|
||||
checkmark with a green background<IMG alt="" src="images/check.png" border="0">, while an
|
||||
exclusive checkout is indicated by checkmark with a blue background<IMG alt="" src=
|
||||
"images/checkex.png" border="0">. A checkmark with a red background<IMG alt="" src=
|
||||
"images/checkNotLatest.gif" border="0"> indicates that a newer version has been checked-in
|
||||
by another user.</P>
|
||||
<BLOCKQUOTE>
|
||||
<P>
|
||||
<IMG SRC="help/shared/tip.png" />
|
||||
A normal checkout is indicated by a
|
||||
checkmark with a green background<IMG alt="" src="images/check.png" border="0">, while an
|
||||
exclusive checkout is indicated by checkmark with a blue background<IMG alt="" src=
|
||||
"images/checkex.png" border="0">. A checkmark with a red background<IMG alt="" src=
|
||||
"images/checkNotLatest.gif" border="0"> indicates that a newer version has been checked-in
|
||||
by another user.</P>
|
||||
</BLOCKQUOTE>
|
||||
|
||||
<BLOCKQUOTE>
|
||||
<P>
|
||||
<IMG SRC="help/shared/note.png" />
|
||||
A tool tip on the file (let the mouse pointer hover over it) shows the date
|
||||
the file was checked out, and the date that is was last modified. An asterisk will appear
|
||||
on the file icon to indicate that changes have been made but not checked in.</P>
|
||||
</BLOCKQUOTE>
|
||||
|
||||
<P align="left">A tool tip on the file (let the mouse pointer hover over it) shows the date
|
||||
the file was checked out, and the date that is was last modified. An asterisk will appear
|
||||
on the file icon to indicate that changes have been made but not checked in.<BR>
|
||||
</P>
|
||||
</BLOCKQUOTE>
|
||||
|
||||
<H3>Check Out<A name="CheckOut"></A> <IMG alt="" src="images/vcCheckOut.png" border=
|
||||
|
@ -171,8 +183,12 @@
|
|||
out. While the exclusive lock exists, no other user can check out the file.<BR>
|
||||
</P>
|
||||
|
||||
<P><IMG alt="" src="help/shared/note.png" border="0"> The exclusive lock is implied for a
|
||||
non-shared project repository.</P>
|
||||
<BLOCKQUOTE>
|
||||
<P>
|
||||
<IMG SRC="help/shared/note.png" />
|
||||
The exclusive lock is implied for a non-shared project repository.</P>
|
||||
</BLOCKQUOTE>
|
||||
|
||||
</BLOCKQUOTE>
|
||||
|
||||
<H3>Check In<A name="CheckIn"></A> <IMG alt="" src="images/vcCheckIn.png" border=
|
||||
|
@ -185,11 +201,15 @@
|
|||
either click on the check in icon <IMG alt="" src="images/vcCheckIn.png" border="0"> on the
|
||||
tool bar, or right mouse click and select the <B>Check In...</B> option. </P>
|
||||
|
||||
<P><IMG alt="" src="help/shared/tip.png" border="0">The <IMG alt="" src=
|
||||
"images/vcCheckIn.png" border="0"> icon is also available from the tool where you have the
|
||||
file opened. </P>
|
||||
<P>A dialog is displayed so that you can enter comments that describe your changes.</P>
|
||||
|
||||
<BLOCKQUOTE>
|
||||
<P>
|
||||
<IMG SRC="help/shared/tip.png" />
|
||||
The <IMG alt="" src="images/vcCheckIn.png" border="0"> toolbar action icon is also
|
||||
available from within the tool where you have the file opened.</P>
|
||||
</BLOCKQUOTE>
|
||||
|
||||
<P>A dialog is displayed so that you can enter comments that describe your changes.</P>
|
||||
</BLOCKQUOTE>
|
||||
|
||||
<P align="center"><IMG alt="" src="images/CheckInFile.png" border="0"></P>
|
||||
|
@ -240,10 +260,26 @@
|
|||
<P align="left">If the checkbox on the dialog is selected, then a private file is created
|
||||
with a ".keep" extension on the filename. The checkbox is selected by default. </P>
|
||||
|
||||
<P align="left"><IMG alt="" src="help/shared/note.png" border="0">If you have the file
|
||||
open in the Code Browser when you attempt to undo the check out, you will get an error
|
||||
dialog indicating that the file is in use. You must close the file first, then undo check
|
||||
out.</P>
|
||||
<BLOCKQUOTE>
|
||||
<P>
|
||||
<IMG SRC="help/shared/note.yellow.png" />
|
||||
If you have the file
|
||||
open in the Code Browser when you attempt to undo the check out, you will get an error
|
||||
dialog indicating that the file is in use. You must close the file first, then undo check
|
||||
out.</P>
|
||||
</BLOCKQUOTE>
|
||||
|
||||
<BLOCKQUOTE>
|
||||
<P>
|
||||
<IMG SRC="help/shared/note.png" />
|
||||
When a file is checked-out a copy of the file and
|
||||
its folder path is created within the private project data store. When an undo checkout
|
||||
is performed that file and any empty parent folders are removed from the private data
|
||||
store. This is done to ensure any folder name changes or removals within a shared project
|
||||
repository are properly reflected while connected and avoid showing old/stale folders.
|
||||
</P>
|
||||
</BLOCKQUOTE>
|
||||
|
||||
</BLOCKQUOTE>
|
||||
|
||||
<H3>Update<A name="Update"></A> <IMG alt="" src="images/vcMerge.png" border="0"> </H3>
|
||||
|
@ -276,12 +312,19 @@
|
|||
option is only enabled when the latest version number on the server is <B>greater</B> than
|
||||
the version that you checked out. </P>
|
||||
|
||||
<P><IMG alt="" src="help/shared/tip.png" border="0"> The <IMG alt="" src=
|
||||
"images/vcMerge.png" border="0"> icon is also available from the tool where you have the
|
||||
file opened.</P>
|
||||
<BLOCKQUOTE>
|
||||
<P>
|
||||
<IMG SRC="help/shared/tip.png" />
|
||||
The <IMG alt="" src="images/vcMerge.png" border="0"> icon is also available from the
|
||||
tool where you have the file opened.</P>
|
||||
</BLOCKQUOTE>
|
||||
|
||||
<BLOCKQUOTE>
|
||||
<P>
|
||||
<IMG SRC="help/shared/note.png" />
|
||||
The update action is not applicable in a non-shared project repository.</P>
|
||||
</BLOCKQUOTE>
|
||||
|
||||
<P><IMG alt="" src="help/shared/note.png" border="0"> The update action is not applicable
|
||||
in a non-shared project repository.</P>
|
||||
</BLOCKQUOTE>
|
||||
|
||||
<H3> </H3>
|
||||
|
@ -343,23 +386,27 @@
|
|||
version 10 of SharedProgram.exe. You can make changes to the file, but you must save
|
||||
it to a new name.</P>
|
||||
|
||||
<P><IMG alt="" src="help/shared/tip.png" border="0"> Other ways to open a specific
|
||||
version in a tool are:</P>
|
||||
<BLOCKQUOTE>
|
||||
<P>
|
||||
<IMG SRC="help/shared/tip.png" />
|
||||
Other ways to open a specific version in a tool are:</P>
|
||||
|
||||
<UL>
|
||||
<LI>Drag a version from the <I>Version History</I> dialog to a running tool, the running
|
||||
tool's icon, or to a tool icon in the tool chest.</LI>
|
||||
<UL>
|
||||
<LI>Drag a version from the <I>Version History</I> dialog to a running tool, the running
|
||||
tool's icon, or to a tool icon in the tool chest.</LI>
|
||||
|
||||
<LI>If you have a <A href=
|
||||
"help/topics/Tool/Ghidra_Tool_Administration.htm#Set_Tool_Associations">default tool</A>
|
||||
specified, double click on the version that you want to open.</LI>
|
||||
<LI>If you have a <A href=
|
||||
"help/topics/Tool/Ghidra_Tool_Administration.htm#Set_Tool_Associations">default tool</A>
|
||||
specified, double click on the version that you want to open.</LI>
|
||||
|
||||
<LI>Choose the <B>File</B><IMG alt="" src="help/shared/arrow.gif" border=
|
||||
"0"><B>Open...</B> option; the <A href=
|
||||
"help/topics/ProgramManagerPlugin/Opening_Program_Files.htm#VersionHistory">Open Program
|
||||
dialog</A> is displayed; from this dialog you can select a version to
|
||||
open. </LI>
|
||||
</UL>
|
||||
</BLOCKQUOTE>
|
||||
|
||||
<LI>Choose the <B>File</B><IMG alt="" src="help/shared/arrow.gif" border=
|
||||
"0"><B>Open...</B> option; the <A href=
|
||||
"help/topics/ProgramManagerPlugin/Opening_Program_Files.htm#VersionHistory">Open Program
|
||||
dialog</A> is displayed; from this dialog you can select a version to
|
||||
open. </LI>
|
||||
</UL>
|
||||
</BLOCKQUOTE>
|
||||
|
||||
<H3>Delete</H3>
|
||||
|
|
|
@ -19,6 +19,7 @@ import java.io.*;
|
|||
|
||||
import db.buffers.BufferFile;
|
||||
import db.buffers.ManagedBufferFile;
|
||||
import ghidra.framework.store.local.UnknownFolderItem;
|
||||
import ghidra.util.InvalidNameException;
|
||||
import ghidra.util.exception.*;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
@ -77,7 +78,9 @@ public interface FileSystem {
|
|||
/**
|
||||
* Returns a list of the folder items contained in the given folder.
|
||||
* @param folderPath the path of the folder.
|
||||
* @return a list of folder items.
|
||||
* @return a list of folder items. Null items may exist if index contained item name
|
||||
* while storage was not found. An {@link UnknownFolderItem} may be returned if unsupported
|
||||
* item storage encountered.
|
||||
* @throws IOException
|
||||
*/
|
||||
public FolderItem[] getItems(String folderPath) throws IOException;
|
||||
|
|
|
@ -167,6 +167,23 @@ public class IndexedLocalFileSystem extends LocalFileSystem {
|
|||
indexJournal = new IndexJournal();
|
||||
}
|
||||
|
||||
@Override
|
||||
public LocalFolderItem[] getItems(String folderPath) throws IOException {
|
||||
String[] itemNames = getItemNames(folderPath, false);
|
||||
LocalFolderItem[] folderItems = new LocalFolderItem[itemNames.length];
|
||||
for (int i = 0; i < itemNames.length; i++) {
|
||||
LocalFolderItem item = getItem(folderPath, itemNames[i]);
|
||||
if (item == null && !readOnly) {
|
||||
// remove item from index where item storage is missing
|
||||
Msg.warn(this, "Removing missing folder item from filesystem index: " +
|
||||
LocalFileSystem.getPath(folderPath, itemNames[i]));
|
||||
itemDeleted(folderPath, itemNames[i]);
|
||||
}
|
||||
folderItems[i] = item;
|
||||
}
|
||||
return folderItems;
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized void dispose() {
|
||||
if (rootFolder == null) {
|
||||
|
@ -1286,9 +1303,9 @@ public class IndexedLocalFileSystem extends LocalFileSystem {
|
|||
/**
|
||||
* Construct a previously allocated item and add it to the parent's
|
||||
* item map. The FileID will be read from the Property file.
|
||||
* @param parent
|
||||
* @param name
|
||||
* @param storageName
|
||||
* @param parent parent folder
|
||||
* @param name item name
|
||||
* @param storageName storage name
|
||||
*/
|
||||
Item(Folder parent, String name, String storageName) {
|
||||
this.storageName = storageName;
|
||||
|
@ -1298,9 +1315,9 @@ public class IndexedLocalFileSystem extends LocalFileSystem {
|
|||
/**
|
||||
* Set this items parent, name and storage name and add the modified item
|
||||
* to the specified parent's item map
|
||||
* @param parent
|
||||
* @param name
|
||||
* @param fileId unique file ID from property file content
|
||||
* @param newParent new parent folder
|
||||
* @param newName new item name
|
||||
* @param newFileId unique file ID from property file content
|
||||
*/
|
||||
void set(Folder newParent, String newName, String newFileId) {
|
||||
if (parent != null && itemStorage != null) {
|
||||
|
|
|
@ -18,16 +18,15 @@ package ghidra.framework.store.local;
|
|||
import java.io.*;
|
||||
import java.util.HashMap;
|
||||
|
||||
import ghidra.framework.store.FolderItem;
|
||||
import ghidra.util.Msg;
|
||||
import ghidra.util.PropertyFile;
|
||||
import ghidra.util.exception.NotFoundException;
|
||||
|
||||
/**
|
||||
* <code>IndexedLocalFileSystem</code> implements a case-sensitive indexed filesystem
|
||||
* <code>IndexedV1LocalFileSystem</code> implements a case-sensitive indexed filesystem
|
||||
* which uses a shallow storage hierarchy with no restriction on file name or path
|
||||
* length. This filesystem is identified by the existence of an index file (~index.dat)
|
||||
* and recovery journal (~index.jrn).
|
||||
* and recovery journal (~index.jrn). File system also maintains a file-ID mapping.
|
||||
*/
|
||||
public class IndexedV1LocalFileSystem extends IndexedLocalFileSystem {
|
||||
|
||||
|
|
|
@ -267,6 +267,10 @@ class GhidraFolderData {
|
|||
if (parent.visited) {
|
||||
parent.folderList.remove(oldName);
|
||||
parent.folderList.add(newName);
|
||||
|
||||
// Must force refresh to ensure that all folder items are properly updted with new parent path
|
||||
refresh(true, true, projectData.getProjectDisposalMonitor());
|
||||
|
||||
listener.domainFolderRenamed(newFolder, oldName);
|
||||
}
|
||||
|
||||
|
@ -632,9 +636,8 @@ class GhidraFolderData {
|
|||
++badItemCount;
|
||||
continue;
|
||||
}
|
||||
Msg.error(this,
|
||||
"Unsupported folder item encountered (" + unk.getFileType() + "): " +
|
||||
getPathname(item.getName()));
|
||||
Msg.error(this, "Unsupported folder item encountered (" + unk.getFileType() +
|
||||
"): " + getPathname(item.getName()));
|
||||
++unknownItemCount;
|
||||
}
|
||||
map.put(itemName, item);
|
||||
|
@ -648,9 +651,8 @@ class GhidraFolderData {
|
|||
"Project folder contains " + nullNameCount + " null items: " + getPathname());
|
||||
}
|
||||
if (badItemCount != 0) {
|
||||
Msg.error(this,
|
||||
"Project folder contains " + unknownItemCount + " unsupported items: " +
|
||||
getPathname());
|
||||
Msg.error(this, "Project folder contains " + unknownItemCount + " unsupported items: " +
|
||||
getPathname());
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
@ -746,7 +748,7 @@ class GhidraFolderData {
|
|||
* a "folder changed" notification.
|
||||
* @param recursive if true a recursive refresh will be done (force must also be true).
|
||||
* Sub-folders will only be refreshed if they have been visited.
|
||||
* @param force if true will refresh will be forced regardless
|
||||
* @param force if true, refresh will be forced regardless
|
||||
* of visited state, if false refresh is lazy and will not be
|
||||
* performed if a previous refresh set the visited state.
|
||||
* @param monitor recursion task monitor - break from recursion if cancelled
|
||||
|
|
|
@ -2933,15 +2933,11 @@ abstract public class DataTypeManagerDB implements DataTypeManager {
|
|||
|
||||
if (allowsDefaultBuiltInSettings() &&
|
||||
builtInDt.getSettingsDefinitions().length != 0) {
|
||||
// Alter built-in datatype instance to use new DB-backed default settings which
|
||||
// facilitates user adjustments to the original default settings.
|
||||
DataTypeSettingsDB settings =
|
||||
new DataTypeSettingsDB(this, builtInDt, dataTypeID);
|
||||
if (builtInDt instanceof TypeDef) {
|
||||
// Copy default immutable builtin typedef settings
|
||||
Settings typedefSettings = builtInDt.getDefaultSettings();
|
||||
for (String n : typedefSettings.getNames()) {
|
||||
settings.setValue(n, typedefSettings.getValue(n));
|
||||
}
|
||||
}
|
||||
settings.setDefaultSettings(builtInDt.getDefaultSettings());
|
||||
settings.setAllowedSettingPredicate(n -> isBuiltInSettingAllowed(builtInDt, n));
|
||||
builtInDt.setDefaultSettings(settings);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue