Finding What text was deleted in a Document

How do I find out what text has been deleted in a document?
the public void removeUpdate(DocumentEvent e) method is called when the document has already been updated, so the offset and length in the document event seem to be useless. The UndoableEditEvent seemed promising, but apparently the modifications stored in the UndoableEdit are not accessible...
This shoudln't be that hard! Off course, I could keep a copy of the document text updated, but that seems awfully inefficient!

I found a solution, but I'm not entirely satisfied, so the question is still opened. The solution is to extend one of the default document classes, overriding the remove() method to notify a new type of event, and then invoke super.remove(). This works, but it's not perfect, because if the super.remove() doesn't succede (i.e. throws an exception) what was notified is wrong.
I'm still very surprised that there is no obvious way of capturing the removed text... please let me know if you can see any.

Similar Messages

  • How do i find out what app was deleted by mistake on my iphone 5?

    How do I find out what app was deleted by mistake on my iphone5?

    Do you mean that you deleted an app by mistake and you don't know which one it was?
    Look for it in the Apps section of iTunes. If you used iTunes to sync your phone, just choose Install next to the app, then resync.

  • HT1766 I deleted some phone records (call numbers, dates) & texts. Can I access them from back-up without restoring the phone.  Don't want to alter what I have, just find what I later deleted

    I deleted some phone records (call numbers, dates) & texts. Can I access  them from back-up without restoring the phone.  Don't want to alter what I have, just find what I later deleted

    Without "pretending" to be yourself on the other phone (change settings) there's nothing else you can do.
    iOS devices are meant to be single user and can't view iCloud.com the same way a Mac or PC can do.
    You need to find a desktop or laptop machine (Mac or PC) to log in at iCloud.

  • How to identify what role was deleted in SUIM report ?

    Dear all,
    Whenever a role is deleted, in SUIM --> change document of a user, it only shows the profile name, based on the profile name we can't figure out what role was it.
    Any solution for this ?
    Your advice and comment will be appreciated.
    Thanks.
    Regards,
    Kent

    Hi,
    It is possible to see who and when the role is deleted...
    Here are the steps for the same.
    1. Start SUIM
    2. Go to Change Document --> For Roles
    3. Enter Role name (for example Z*), Enter Username (Changed by), Date, Time (From and To)
    4. Select "Create and Delete Roles" in Change Documents.
    5. Execute.
    You will see the report who and when the Role is deleted.
    Regards.
    Rajesh Narkhede

  • How to find a text in the Frame maker document via script?

    How to find a particular text in the Frame maker document via script?

    johnsyns wrote:
    Why it doesn't work for the other days? When i tried to change the days other than wednesday. it return nothing.
    Reason why Justin's code does not work for other days is date format mask DAY returns day blank padded to 9 characters which is the longest day name which, yes you guessed right, is WEDNESDAY. You either need to blank pad or use format modifier FM:
    SQL> select *
      2    from (SELECT TO_DATE(SYSDATE+ROWNUM, 'DD-MON-YY') dt
      3            FROM DUAL CONNECT BY ROWNUM <= 27)
      4  WHERE TO_CHAR(dt,'DAY') = 'TUESDAY'
      5  /
    no rows selected
    SQL> select *
      2    from (SELECT TO_DATE(SYSDATE+ROWNUM, 'DD-MON-YY') dt
      3            FROM DUAL CONNECT BY ROWNUM <= 27)
      4  WHERE TO_CHAR(dt,'DAY') = 'TUESDAY  '
      5  /
    DT
    07-APR-09
    14-APR-09
    21-APR-09
    28-APR-09
    SQL> select *
      2    from (SELECT TO_DATE(SYSDATE+ROWNUM, 'DD-MON-YY') dt
      3            FROM DUAL CONNECT BY ROWNUM <= 27)
      4  WHERE TO_CHAR(dt,'FMDAY') = 'TUESDAY'
      5  /
    DT
    07-APR-09
    14-APR-09
    21-APR-09
    28-APR-09
    SQL> SY.

  • How do you know what char was deleted?

    I'm writing a GUI app that will need to keep track of opening and closing parens. It's pretty easy to Listen for when a paren is added, but I'm not sure if there a way to verify whether or not a deleted char was a paren. Does anyone know if JTextPane has some sort of buffer that stores things like this? Thank you for any information you can provide.

    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.text.*;
    public class Test3 extends JFrame {
      public Test3() {
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        Container content = getContentPane();
        JTextPane jtp = new JTextPane(new MyDocument());
        jtp.setText("Now is the ((()))time for all good men");
        jtp.setCaretPosition(15);
        content.add(new JScrollPane(jtp), BorderLayout.CENTER);
        setSize(200,200);
      public static void main(String[] args) { new Test3().setVisible(true); }
    class MyDocument extends DefaultStyledDocument {
      public void removeUpdate(DefaultDocumentEvent chng) {
        try {
          String adios = getText(chng.getOffset(), chng.getLength());
          if (adios.indexOf(")")>-1) System.out.println(")");
          if (adios.indexOf("(")>-1) System.out.println("{");
        } catch (BadLocationException ble) {}
    }

  • Computer crashed. Lost license/key. Have no way of reactivating it or finding what key was.

    Installed another copy but have no license key from original downloaded software. Using it fine for years but never wrote down the key. How can I get my key for Adobe Acrobat 8 Professional so I can continue using it like I have for years?

    Hi richardf12009898,
    I've checked your account, and it looks like Acrobat 8 was never registered (at least not under the Adobe ID/email address that you use here in the forums). If you registered under a different Adobe ID, then this document may help: Find your serial number quickly.
    If you're still having trouble, please Contact Customer Care.
    Best,
    Sara

  • How to find out what software was used to create a document?

    Hello:
    I was sent a file to work with and it was supposedly made using a Mac computer, but I can't open it. How can I find out what program was actually used to create this document. It ends with xxxxx.rsrc. I even tried to open it on my PC and it says there is no default application specified to open the document.
    Thanks for your help.
    Susan
      Mac OS X (10.4.7)  

    Have you tried opening your file with Textedit?
    Also, if you select the file from the Finder and type cmnd-I (Get Info), it should tell you what program can be used to open it.
    Lita

  • Hello All, I have recently made the switch to all things Apple and still feel quite the rookie so hoping I can find help here!  I'm a bit in shock as 0f now because  my entire music libra was deleted by accident and I am completely stuck as to what to do

    Hello All, I have recently made the switch to all things Apple and still feel quite the rookie so hoping I can find help here!  I'm a bit in shock as 0f now because  my entire music libra was deleted by accident and I am completely stuck as to what to do now..I just got the 4s and haven't transferred much music over at all..I figured i could just export it all back but to my Mac...Any advice guys , is it even possible?

    Restore from TimeMachine back-up.

  • How to find out when data was deleted from table in oracle and Who deleted that

    HI Experts,
    Help me for below query:
    how to find out when data was deleted from table in oracle and Who deleted that ?
    I did that to fidn out some data from dba_tab_modifications, but I m not sure that what timestamp shows, wether it shows for update,insert or delete time ?
    SQL> select TABLE_OWNER,TABLE_NAME,INSERTS,UPDATES,DELETES,TIMESTAMP,DROP_SEGMENTS,TRUNCATED from dba_tab_modifications where TABLE_NAME='F9001';
    TABLE_OWNER                    TABLE_NAME                        INSERTS    UPDATES    DELETES     TIMESTAMP         DROP_SEGMENTS TRU
    PRODCTL                        F9001                                                     1683         46       2171            11-12-13 18:23:39             0                   NO
    Audit is enable in my enviroment?
    customer is facing the issue and data missing in the table and I told him that yes there is a delete at 11-12-13 18:23:39 in table after seeing the DELETS column and timestamp in dba_tab_modifications, but not sure I am right or not
    SQL> show parameter audit
    NAME                                 TYPE        VALUE
    audit_file_dest                      string      /oracle/admin/pbowe/adump
    audit_sys_operations                 boolean     TRUE
    audit_syslog_level                   string
    audit_trail                          string      DB, EXTENDED
    please help
    Thanks
    Sam

    LOGMiner --> Using LogMiner to Analyze Redo Log Files
    AUDIT --> Configuring and Administering Auditing

  • Pages app unexpectedly quit whilst I was in the middle of a document. I can now not open it AT ALL. I find it's not just that particular document that won't open, but any of my Pages docs will not open using the current version of Pages. Any help?

    Pages app unexpectedly quit whilst I was in the middle of a document. I can now not open it AT ALL. I find it's not just that particular document that won't open, but any of my Pages docs will not open using the current version of Pages. The reports of the app unexpectedly closing each time, automatically went to Apple, but I am not sure what happens with them then. Does anyone know how to help me with this? We live in a very isolated region so rely on internet help. Thanks

    I also managed to read a few other discussions about Pages and files not being able to open. I actually went to the last back-up and restored the computer from that and everything seemed to work ok again, which is great!...advice from another discussion I think you may have been involved in PeterB. Thanks for the advice...also this advice, as I will make a note of trying to open using the Shift key if it happens again and see what happens...might be an easier first option than restoring from a back-up. Thans heaps for the help!
    I was interested to read some of the other discussions where it was stated that Pages '09 seems to be a better option to use. I have both installed, so I will lkeep this in mind. Thanks heaps!

  • My keychains haven't been working so I deleted something and I forgot what it was

    My keychains haven't been working so I deleted something and I forgot what it was, but it was obviously something big and now my mac is saying that it cannot find a place to store a keychain or there is no keychain available or something along those lines. I need help with this problem ASAP. This is how this problem started:
    1) A couple days ago i changed my password and turned my computer off.
    2) Today I powered up my mac and it says "This application would like to use keychains please enter your keychain login."
    3) I didn't know what the password was so I went on Safari and the messages kept popping up.
    4) I went on Safari typed in my problem and it came up with a question similar to mine on an apple webpage.
    5) I clicked the webpage and it was telling me these steps to follow to make the pop up messages stop and how to reset the keychain login password
    6) I followed the steps and one of the steps were to delete something so i did
    7) I then tried to reset my default keychain but it said "This specified keychain could not be found"
    8) so i got worried and restarted my computer and it still had the pop ups and i had to relog into my account.
    9) I got relogged into my account and the messages kept popping up.
    So now i come to you all smart mac users asking for your help and ASAP. Please help me I don't know what i did and i want my mac back to the way it was.
    HELP ME!!!! Answer ASAP PLEASE I NEED YOU SMART PEOPLE!!!!!

    Hello Chewey
    Best thing to do here would be to reset your keychain to factory default. I’ll explain below. But first let me explain the consequences: doing the action below means that your iMac will forget your passwords until you enter them again once more. Think email passwords, wifi passwords, website passwords etc. You don’t have to change all these passwords, you will have to simply enter them once more, so hopefully you either know them by heart or wrote them down in a safe place at one point.
    Either way, I think at this point you have little choice, as your description makes me think your keychain is completely broken anyway unfortunately.
    So here we go:
    1/ click on the Finder and locate the menu called “go” in the upper left corner of your computer display. For reference, this will be somewhere to the right of the classic -menu. Once found, click on it and select: “Go To Folder”
    2/ Type the line below in the box that appears, including the ~ (or copy-paste it from here of course) and click the [GO]-button.
    ~/library/
    3/ Now the Finder will enter a folder with a lot of technical-looking folders. Scroll around until you find the folder called “Keychains” Move this entire folder - with contents and all - to the trash.
    4/ Once trashed (you don’t have to empty the trash if you don’t want to) restart your computer via:  > restart. If this doesn’t work (might happen if a lot of password prompts are hanging around for example) just forcefully restart it this once.
    Your issue should be solved and you’re now left with the slight chore of re-entering your passwords one-by-one as your computer asks for them.  

  • Check if Text-Frame was deleted

    Hi,
    i tried "before.." and "after delete" as events to check wether a text-frame is deleted. But it seems that all "objects" in InDesign except the document and placed images/PDFs do not trigger events.
    Therfore i have to questions:
    - can i "do" something to my text-frame to become an event-triggering obejct?
    - if not, how can i check if an text-frame was deleted?
    regards,
    Frank

    You can't do this and this is the wrong approach anyway. The quick answer is triggers are not supported on sys objects, this is to prevent you from corrupting the data dictionary. The longer answer is that v$ views aren't in fact views of tables they are views of memory space of the Oracle executable, made to look like views. They aren't 'inserted' or 'deleted' in the way that regular tables are, the views are 'updated' by the Oracle code updating it's own memory during the course of execution.
    To track an application that has no instrumentation, you would need to trace the database session(s) that the application uses. You need to read about sql_trace (AKA event 10046) and the dbms_monitor package (on 10g) or dbms_system.set_ev packaged procedure (9i and earlier). You very unhelpfully did not provide your Oracle version. This will produce a trace file that can be anaylsed using tkprof (comes with the database), trace analyzer (requires Metalink) or any of a whole number of 3rd party trace file tools, some free, some commercial.
    If your application uses PL/SQL, the DBMS_PROFILER package is also very useful.
    Google, search these forums.
    HTH
    Chris

  • In a hurry, I opened an email that said "order was shipped from "ammazon". I downloaded the order document and it ended up being a zip file. I then realized what it was, and did not actually open the file. This was on my Iphone 5. What should I do now!?

    In a hurry, I opened an email that said "order was shipped from "ammazon". I downloaded the order document and it ended up being a zip file. I then realized what it was, and did not actually open the file. This was on my Iphone 5. What should I do now!?

    Delete the email. The zip file will have no effect on your iPhone.

  • HT1926 Tried to download itunes update 11.1.4. At 99% IE said, "This program contained a virus and was deleted."  Anyone else with this problem?  What do I do?

    Tried to download itunes update 11.1.4. At 99% IE said, "This program contained a virus and was deleted."  Anyone else with this problem?  What do I do?

    Hi JEOQ,
    Thanks for visiting Apple Support Communities.
    You may find the information and steps in this article helpful with downloading iTunes:
    iTunes: Downloading iTunes for Windows using Internet Explorer
    http://support.apple.com/kb/ts3212
    Best Regards,
    Jeremy

Maybe you are looking for

  • Yoga Tab 2 8 inch slow performance after update

    Hello everyone! I recently bought a Yoga tablet 2 8 inch (Wifi only). By default, it was running smoothly, and the performance was overall solid, both on the launcher (Lenovo's and Google Now Launcher) and in apps. However, after two updates (The fir

  • Agent Connection to Instance error in Oracle Database 11G EM

    Hi I am getting the following error message when logging into EM on Oracle 11G Database. Failed to connect to database instance: ORA-12541: TNS:no listener (DBD ERROR: OCIServerAttach). Users can connect to the database no problem and it shows the Da

  • Mounting /tmp as a filesystem on Solaris 10?

    Hi, Does anyone know if it's possible to mount /tmp as a filesystem in Solaris 10? My server is running Veritas Volume Manager 5.0 and the boot drive is encapsulated. After I change vfstab to mount /tmp as a standard filesystem, the server goes into

  • How to run JMS in multiple machines?

    hello all, i am new to jms, so please let me know how to run jms in multiple machines. i mean, iin one machine publisher and the queue/topic are running, in other machine listener/clent. so client and the publisher must be running in an application s

  • Ink cartridges

    i have hp c309a all in one premiun printer most things work well except the ink and cartridges installed brand new original hp cartridges 5 have printed both color and grey but the only ink being consumed is the black . photo black magenta cyan blue