Undo and OutOfMemoryError...

Hi All,
I have this program in which I work with the StyledDocument. I have implemented the undo functionality as well. Now, if a lot of style changes happen to the file being edited, as in change of color for sections of text eg. highlight of comments, strings etc., I have noticed that lots of instances (thousands) of DefaultStyledDocument.AttributeUndoableEdit are being created. As a result, while doing editing, sometimes java gives OutOfMemoryError.
Can anyone suggest how I can override the behaviour and instruct java not to worry about remembering AttributeSet changes to an Element?
Regards,
M

Hi All,
I have seen an example code which is capabable of the operations like undo and redo with JTextPane. But, I need to apply the same for JTextArea.How to apply the undo and redo operations with JTextArea?

Similar Messages

  • How can I use undo and redo with run time menu?

    Hi..I try to built my own menu for graphic programming. How can I use undo and redo in labview with run time menu?

    filozof-
    During runtime, by default, LabVIEW has undo/redo data changes under the edit menu. This will undo/redo changes made to controls during runtime. If you want a more extensive undo/redo (custom for your application), you are going to have to do quite a few things
    1) Create a custom runtime menu (Edit>>RunTime Menu) and place your own undo/redo controls on it
    2) Keep an action history in your program
    3) Catch the Shortcut menu event for your custom undo/redo controls
    4) Reverse the last action in your histroy when you catch the event
    This method would allow you undo entire operations (like resize, move, or whatever kind of functionality you are building into your application) unstead of just undoing data changes.
    Xaq

  • TIP: Editor Undo and Redo

    It happend to me a couple of times already that I pressed some strange key combination by accident and erased the whole editor content; probably Ctrl-z. Unfortunately Undo from the web browser menu is greyed out and not available.
    Checking the Jive 5 documenation I found a link to editor shortcuts, which mentioned Ctrl-z for undo and Ctrl-y for redo.
    I have not figured out yet what the exact criteria for undo and redo is, but I find it very important to know that undo and redo exist and work. It just does not use the browser, which provides undo using platform specific shortcuts. So the editor does provide undo and redo support by using the editor's keyboard shortcuts, despite of what is available in the web browser menu.
    I suggest to mention important editor shortcuts in the forum FAQ.

    @https://forums.oracle.com/people/HemantKChitale the like Burton
    for the opening thread is in the top right under the 'follow' button.
    Timo 

  • Problem of cut,copy,past ,undo and redo actions

    hi
    iam a student of computer science
    iam working on my project notpad
    in this i have to apply the command of doing cut ,copy ,past ,undo,redo
    how can i use thes actions in my project
    please help me for making my project
    i will wait your response at [email protected]

    what u can do is
    just component.cut();
    or
    compoennt.copy();
    component.paste();
    for undo and redo
    u need to take help of undo manager
    which will tell u whether u can undo or not
    same with redo case
    hope it will work

  • How to exclude UNDO and temp tablespace using monitoring template

    hi,
    as per MOS note id 816920.1 undo and temp tablespace is excluded from monitoring starting version 11G onwards.It says that thresholds will need to be explicitly set if undo and temp needs to be monitored
    we have grid 12C implemented now with monitoring templates which sets thresholds for all tablespaces. does it apply that thresholds to undo and temp too?? we are receiving alerts for undo and temp tablespaces and we wish to disable them. We have undo tablespaces with different names in many databases as per naming conventions for that line of business.
    How can i exclude undo and temp tablespaces from monitoring using grid 12C monitoring templates. is there a way through templates where i can set thresholds of permanent tablespaces only???

    In EM12c, go to the 'Enterprise' menu, then 'Job', then 'Library'. There should be an out-of-the-box job called "DISABLE TABLESPACE USED (%) ALERTS FOR UNDO AND TEMP TABLESPACES" that you can run against your database targets, and that job will disable database-generated alerts.
    If a previous admin has set up EM12c-generated alerts for undo and temp, then yes, a monitoring template will take care of disabling them. Either remove those alerts from the existing monitoring template and apply them to your targets, or create a new monitoring template based on one database's current settings, remove those warning/critical thresholds for your undo and temp tablespaces, and apply it to your targets.

  • Database restore without temp, undo and control files.

    Hi All,
    You might found this question silly but I don't know so asking this question here.
    I have cold back up of the database. Now, I want create clone of that database, but I have some different paths for the DBFs so I will create new control file after restoring the database.
    Now, I know that I don't need control files and tempfiles to be restored. I have 10 undo files in backup but on the new clone database I don't need all 10. I want only 5. So can I do the restoration without undo , temp and control file and later on add undo and temp?? and if yes then tell me that can I add them at mount level??
    This is my first restore, Please guide me its very urgent

    Nitin Joshi wrote:
    f the COLD Backup does not include the Online Redo Logs, an ALTER DATABASE OPEN RESETLOGS is requireed >>to create these Online Redo Logs. Unfortunately, an OPEN RESETLOGS can only be done after an Incomplete >>Recovery or when using a Backup Control file.
    Therefore, we do a RECOVER with a CANCEL to simulate an Incomplete Recovery.Completely agree with you Hemant. And the links you've provided,i've gone through many times. Excellent description.
    I just wanted to know in above(OP's) scenario if he has complete cold backup(includes online redo logs), does he really need open reset logs or any recovery?
    Regards!no , if you have cold backup with online redo log files then i don't think so you need to open database in resetlogs.Resetlog is always after incomplete recovery or recovery using backup controlfile or you dont have redo logs.
    I am completely agree with you that with given scenario for the cold backup undo tablespace would not be part of recovery and you can
    -offline drop undo tablespace file
    -create another one undo tablespace and its undo datafile
    -point spfile to that newly undo tablespace
    I think Aman is saying in the context of restore and recover online database where undo tablespace create a vital role in database recovery, the undo blocks roll back the effects of uncommitted transactions previously applied by the rolling forward phase.
    Khurram

  • Move undo and temporary tablespace to new path

    Hi All,
    I want to move my undo and temporary tablespace to new path because of space issue. I am using Oracle 10g release 2 and working on production server can't take shutdown without prior permission.
    Please tell me the steps to do so...
    thanks
    Api

    About create/change/drop
    UNDO:
    SQL>show parameter undo
    NAME TYPE VALUE
    undo_management string AUTO
    undo_retention integer 900
    undo_tablespace string UNDOTBS1
    SQL> CREATE UNDO TABLESPACE undotbs2 DATAFILE '+DATA_NEWPATH' SIZE 100M AUTOEXTEND ON;
    http://www.oracle-base.com/articles/9i/AutomaticUndoManagement.php
    SQL> alter system set undo_tablespace=undotbs2;
    *** after that can drop UNDOTBS1
    TEMP:
    SQL> CREATE TEMPORARY TABLESPACE TEMP TEMPFILE '+DATA_NEWPATH' SIZE 500M AUTOEXTEND ON NEXT 100M MAXSIZE unlimited EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1M;
    http://www.idevelopment.info/data/Oracle/DBA_tips/Tablespaces/TBS_3.shtml
    SQL> ALTER DATABASE DEFAULT TEMPORARY TABLESPACE temp2;
    *** after that can drop old temp tablespace -> DROP TABLESPACE temp INCLUDING CONTENTS AND DATAFILES

  • UNDO and TEMP usage by a schema

    Hi,
    How can I findout UNDO and TEMP space usage by a schema? do we have any tables for this?
    If I want to get UNDO,TEMP space or any other resource used by a schema for 24 Hours period,can get this info.
    Can you please suggest the procedure to know the high resource consumption application?
    I am using Oracle 9.2.0.4 in SUN cluster environment.
    Thanks very much in advance.I apreciate your help
    Thanks
    Thanks

    Hi,
    About UNDO, you can check the status of the undo segment currently used by active transactions.
    select s.username, t.xidusn, t.ubafil, t.ubablk, t.used_ublk
    from v$session s, v$transaction t
    where s.saddr = t.ses_addr;About others user session's information, you can try this below:
    select osuser,
           machine,
           username,
           segment_name,
           sa.sql_text
    from   v$session s,
           v$transaction t,
           dba_rollback_segs r,
           v$sqlarea sa
    where  s.taddr = t.addr
    and    t.xidusn = r.segment_id(+)
    and    s.sql_address = sa.address(+)
    order by osuserAbout TEMP:
    To monitor tempspace eating by sessionSELECT a.sid,b.BLOCKS FROM v$session a , v$sort_usage b
    WHERE a.saddr=b.SESSION_ADDR;
    To monitor tempspace eating by SQLSELECT a.sql_text,b.BLOCKS FROM v$sql a , v$sort_usage b
    WHERE a.sql_id=b.sql_id;Cheers

  • How to rebuil undo and temp tbspc

    Hi hussein/helios
    Our apps undo and temp tablespaces got so big ( like 10Gb each) that it almost run out of space. Ho do i resync in back to 2Gb each.
    Is there a system commnad like > alter tablespace undo resync?
    Thanks a lot
    msK

    Hi,
    Please refer tech note *262066.1 : How To Size UNDO Tablespace For Automatic Undo Management*
    Hope helps.
    Regards,
    X A H E E R

  • How to exclude undo and temp from "Tablespace Space Used (%)"

    Dear All
    Is it possible to exclude undo and temp tablespace monitoring from "Tablespace Space Used (%)" matric?
    Thanks & Regards
    Quazi Abdur Rab

    If you use TEMP >=100 as Warning, this warning can still be raised.
    What version of the database is it? If Oracle 10g, Grid Control (the agent) searches the alert table in the database for alerts, so the database raises the alert and the agent just passes this alert to Grid Control.
    If you are using Oracle 10g, you can use the following statement (connected as sys):
    DBMS_SERVER_ALERT.SET_THRESHOLD(
    metrics_id => DBMS_SERVER_ALERT.TABLESPACE_PCT_FULL,
    warning_operator => DBMS_SERVER_ALERT.OPERATOR_GT,
    warning_value => '90',
    critical_operator => DBMS_SERVER_ALERT.OPERATOR_GT,
    critical_value => '100',
    observation_period => 1,
    consecutive_occurrences => 1,
    instance_name => NULL,
    object_type => DBMS_SERVER_ALERT.OBJECT_TYPE_TABLESPACE,
    object_name => 'TEMP');
    This will create the GT (Greater Than) instead of GE (Greater Equal).
    Kind regards,
    Dave
    ps. I'm using GC 10.2.0.3.0, so thanks for the note that 10.2.0.4 doesn't take 100+ values.

  • Can't get to first base using undo and redo

    Hi folks:
    I'm trying to add undo and redo capabilities to a small application I'm writing with Swing, but I can't get to first base. When I try to establish an undo object like this:
    final UndoManager undo = new UndoManager();
    I get two "cannot resolve symbol" errors on the line.
    Is there some library I'm not importing? What gives?
    Thanks

    Is there some library I'm not importing?Probably. Look in the API for UndoManager. It will tell you what package to import.

  • Cut & Paste - Undo and Redo won't work

    Cut & Paste - Undo and Redo won't work in DreamWeaver -
    this happened suddenly today. Frustrating. Did I set something by
    accident?
    Reinstalled and chose "repair" - rebooted, reinstalled java,
    an intuition. Nothing has worked so far.
    Any ideas?

    On Sat, 2 Sep 2006 03:18:19 +0000 (UTC), "Waltzzz"
    <[email protected]> wrote:
    >Cut & Paste - Undo and Redo won't work in DreamWeaver
    - this happened suddenly
    >today. Frustrating. Did I set something by accident?
    >
    > Reinstalled and chose "repair" - rebooted, reinstalled
    java, an intuition.
    >Nothing has worked so far.
    >
    > Any ideas?
    >
    >
    What a coincidence. I have kept Java off my main machine for
    two
    years, but installed it last week for an app that required
    it. I've
    used FW since version 3 and have never seen it be buggy, but
    the past
    couple of days I have had intermittent problems with copy and
    paste.
    Java goes tomorrow. I'm on XP Pro SP2, how about yo?

  • Question abount undo and Redo

    Hello friends,
    could you explain the work of UNDO and REDO work ,i have some confusion.

    Shiv wrote:
    Hello friends,
    could you explain the work of UNDO and REDO work ,i have some confusion.Hello,
    Where is your db version, OS version?
    Generally overview
    What Is Undo?
    Oracle Database creates and manages information that is used to roll back, or undo, changes to the database. Such information consists of records of the actions of transactions, primarily before they are committed. These records are collectively referred to as undo.
    Undo records are used to:
    Roll back transactions when a ROLLBACK statement is issued
    Recover the database
    Provide read consistency
    Analyze data as of an earlier point in time by using Oracle Flashback Query
    Recover from logical corruptions using Oracle Flashback features
    When a ROLLBACK statement is issued, undo records are used to undo changes that were made to the database by the uncommitted transaction. During database recovery, undo records are used to undo any uncommitted changes applied from the redo log to the datafiles. Undo records provide read consistency by maintaining the before image of the data for users who are accessing the data at the same time that another user is changing it.
    What Is the Redo Log?
    The most crucial structure for recovery operations is the redo log, which consists of two or more preallocated files that store all changes made to the database as they occur. Every instance of an Oracle Database has an associated redo log to protect the database in case of an instance failure.
    Redo Threads
    When speaking in the context of multiple database instances, the redo log for each database instance is also referred to as a redo thread. In typical configurations, only one database instance accesses an Oracle Database, so only one thread is present. In an Oracle Real Application Clusters environment, however, two or more instances concurrently access a single database and each instance has its own thread of redo. A separate redo thread for each instance avoids contention for a single set of redo log files, thereby eliminating a potential performance bottleneck.
    This chapter describes how to configure and manage the redo log on a standard single-instance Oracle Database. The thread number can be assumed to be 1 in all discussions and examples of statements. For information about redo log groups in an Oracle Real Application Clusters environment, please refer to Oracle Real Application Clusters Administration and Deployment Guide.
    Redo Log Contents
    Redo log files are filled with redo records. A redo record, also called a redo entry, is made up of a group of change vectors, each of which is a description of a change made to a single block in the database. For example, if you change a salary value in an employee table, you generate a redo record containing change vectors that describe changes to the data segment block for the table, the undo segment data block, and the transaction table of the undo segments.
    Redo entries record data that you can use to reconstruct all changes made to the database, including the undo segments. Therefore, the redo log also protects rollback data. When you recover the database using redo data, the database reads the change vectors in the redo records and applies the changes to the relevant blocks.
    Redo records are buffered in a circular fashion in the redo log buffer of the SGA (see "How Oracle Database Writes to the Redo Log") and are written to one of the redo log files by the Log Writer (LGWR) database background process. Whenever a transaction is committed, LGWR writes the transaction redo records from the redo log buffer of the SGA to a redo log file, and assigns a system change number (SCN) to identify the redo records for each committed transaction. Only when all redo records associated with a given transaction are safely on disk in the online logs is the user process notified that the transaction has been committed.
    Redo records can also be written to a redo log file before the corresponding transaction is committed. If the redo log buffer fills, or another transaction commits, LGWR flushes all of the redo log entries in the redo log buffer to a redo log file, even though some redo records may not be committed. If necessary, the database can roll back these changes.

  • I transferred data to my MacBook Pro, then I accidentally did an UNDO and all the data desapeared....What can I do to recover it???

    I transferred data to my MacBook Pro, then I accidentally did an UNDO and all the data desapeared....What can I do to recover it???

    Sorry, but it's probably lost, then, presuming you never made a backup. There's a dim chance that you could recover at least some of the data using a file recovery utility such as Data Rescue from Prosoft Engineering, but the chances aren't good and get lower the more you use your computer.
    Regards.

  • Undo and Redo

    What is the difference between undo and redo?

    Deepa,
    I shall be short in my reply as I shall be leaving in a while now. So in very short,
    when the user updates the block, lets suppose we updated salary from 100 to 200.So in the buffer cache, it was first 100.When you gave a dml to change to 200, oracle will maintain its redo image in the redo log buffer using redo copy latch and thus the changed info is maintained in the redo log buffer.This info is maintained in the block also.Now before this image gets changed,the entry is done in the transacton table (v$transaction) and Oracle just "maps" a block which will contain the undo image.At the moment no physical changeis done neither any physical write is done in the undo tablespace.
    in which stage, commited data is written to data files.....i got confusion??? I know, when Buffer cache is 1/4 th is full...and at every check point...it wil happen...but as per my above scenario..at which stage it will happen...please explain properly..
    Committed data is written into the log files.Oracle makes sure that once committed the data is there in the redo log files which means from there it can recover at any point of time.
    From where did you read 1/4th of buffer cache?Please can you rephrase the questionbefore I try to answer it?
    One more thing....data base writer writes to data files...redo writer writes to redo log files...which will write undo information to undo files.....
    DBWR only writes the data Deepa.So all the normal flushing which is applicable to other buffers thats the same that is applicable to the undo data too.
    Aman....

Maybe you are looking for