mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 19:42:36 +02:00
GP-4740 Added undo/redo support to composite editor. Switched actions to use isEnabledForContext. Transitioned VT FilterFormattedTestField to GFormattedTextField and use for editor text entry fields. Cleanup of old datatype tree actions no longer in use. Lots of changes to improve handling of data type dependency changes and restored original DTM.
This commit is contained in:
parent
6347d8bd94
commit
0ccb142e7e
98 changed files with 3898 additions and 3544 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.
|
||||
|
@ -532,6 +532,16 @@ public class DBHandle {
|
|||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Provides a means of detecting changes to the underlying database buffers
|
||||
* during a transaction.
|
||||
*
|
||||
* @return current modification count
|
||||
*/
|
||||
public long getModCount() {
|
||||
return bufferMgr.getModCount();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if there are uncommitted changes to the database.
|
||||
* @return true if there are uncommitted changes to the database.
|
||||
|
|
|
@ -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.
|
||||
|
@ -68,6 +68,7 @@ public class BufferMgr {
|
|||
private Object snapshotLock = new Object(); // Used to prevent BufferNode modifications during snapshot
|
||||
private boolean modifiedSinceSnapshot = false;
|
||||
private boolean hasNonUndoableChanges = false;
|
||||
private long modCount;
|
||||
|
||||
private int bufferSize;
|
||||
|
||||
|
@ -238,7 +239,7 @@ public class BufferMgr {
|
|||
if (lockCount != 0) {
|
||||
throw new IOException("Unable to re-initialize buffer cache while in-use");
|
||||
}
|
||||
|
||||
|
||||
if (cacheFile != null) {
|
||||
cacheFile.delete();
|
||||
}
|
||||
|
@ -248,7 +249,7 @@ public class BufferMgr {
|
|||
cacheTail = new BufferNode(TAIL, -1);
|
||||
cacheHead.nextCached = cacheTail;
|
||||
cacheTail.prevCached = cacheHead;
|
||||
|
||||
|
||||
cacheSize = 0;
|
||||
buffersOnHand = 0;
|
||||
|
||||
|
@ -264,7 +265,7 @@ public class BufferMgr {
|
|||
cacheFile.setParameter(name, sourceFile.getParameter(name));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
resetCacheStatistics();
|
||||
|
||||
if (alwaysPreCache) {
|
||||
|
@ -1093,6 +1094,7 @@ public class BufferMgr {
|
|||
throw new AssertException();
|
||||
}
|
||||
|
||||
++modCount;
|
||||
modifiedSinceSnapshot = true;
|
||||
|
||||
// Establish current checkpoint if necessary
|
||||
|
@ -1199,6 +1201,14 @@ public class BufferMgr {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Provides a means of detecting changes to the underlying database during a transaction.
|
||||
* @return current modification count
|
||||
*/
|
||||
public synchronized long getModCount() {
|
||||
return modCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if unsaved "buffer" changes exist.
|
||||
* If no changes have been made, or all changes have been
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue