Save dirty file in editor

Hi,
I am writing an extension for the BEA workshop. My question is which API I should
use to let the workshop save the current active file in the editor area, if the
file is modified. (same behavior of trying to close a dirty java file: ask the
user confirmation to save before exit).
Thanks
Elwin

Elwin -
You should post questions related to writting workshop extensions to
weblogic.developer.interest.workshop.extensibility.
You can use com.bea.ide.document.DocumentSvc.get().saveDocument() or
saveDocumentDialog() to save a modified IDocument instance. You can get
the current active IDocument with
com.bea.ide.Application.getActiveDocument().
Greg
Elwin wrote:
Hi,
I am writing an extension for the BEA workshop. My question is which API I should
use to let the workshop save the current active file in the editor area, if the
file is modified. (same behavior of trying to close a dirty java file: ask the
user confirmation to save before exit).
Thanks
Elwin

Similar Messages

  • How to save jpeg files in iPhoto

    I would like to be able to make changes in Photoshop and then be able quickly save a jpeg file in my iPhoto library (Version 9). From what I could deduce, the only way to do this would be to save the file to my hardrive, then go to iPhoto, choose the import to library under the File menu and then locate the file I want to import. Is that really the quickest and easiest way to do this? Or is it possible to save the file directly to the iPhoto library from within the Photoshop program?

    Using Photoshop or Photoshop Elements as Your Editor of Choice in iPhoto.
    1 - select Photoshop or Photoshop Elememts as your editor of choice in iPhoto's General Preference Section's under the "Edit photo:" menu.
    2 - double click on the thumbnail in iPhoto to open it in Photoshop.  When you're finished editing click on the Save button. If you immediately get the JPEG Options window make your selection (Baseline standard seems to be the most compatible jpeg format) and click on the OK button. Your done. 
    3 - however, if you get the navigation window
    that indicates that  PS wants to save it as a PS formatted file.  You'll need to either select JPEG from the menu and save (top image) or click on the desktop in the Navigation window (bottom image) and save it to the desktop for importing as a new photo.
    This method will let iPhoto know that the photo has been editied and will update the thumbnail file to reflect the edit..
    NOTE: With Photoshop Elements  the Saving File preferences should be configured as shown:
    I also suggest the Maximize PSD File Compatabilty be set to Always.  In PSE’s General preference pane set the Color Picker to Apple as shown:
    Note 1: screenshots are from PSE 10
    Note:  to switch between iPhoto and PS or PSE as the editor of choice Control (right)-click on the thumbnail and select either Edit in iPhoto or Edit in External Editor from the contextual menu. If you use iPhoto to edit more than PSE re-select iPhoto in the iPhoto General preference pane. Then iPhoto will be the default editor and you can use the contextual menu to select PSE for your editor when desired.
    OT

  • How to save a file in Java Format?

    Hello All,
    I want to save the files I'm writing in my program in java format?
    (I want the result files to end with .java).
    Is there a specific way to do this?
    Thnx in advance :)

    Wait. Are you saying that your java program is creating files, and you want the files to end in .java?
    Are you writing a program that creates other programs? Because otherwise that makes no sense.
    Or are you saying that you're writing Java source code in some editor, and you just want the editor to save the source code files with the appropriate extension? If so, how you do that will depend on the editor.

  • How to save a file in Jfilechooser with extension

    hi all
    i'm trying to save a file with a certain extension
    i have my class that extends FileFilter, and which write into the jfilechooser combo box with extensions. .jar
    how can i save a file with this extension?
    here is the code
    JFileChooser fileChooser = new JFileChooser();
              fileChooser.addChoosableFileFilter(new JarFilter());
              int returnVal = fileChooser.showDialog(new JFrame(), "Export");
              if (returnVal == JFileChooser.APPROVE_OPTION) {
                   File file = fileChooser.getSelectedFile();
                   try {
                        JarExporter exporter=new JarExporter(this.generateXMLString(file.getName().replaceAll(".jar", "")),
                                       this.editor.getLinkageCanvas().getSelectedWidgetIDs());
                        exporter.exportJarFile(file);
                   } catch (Exception exception) {
                        System.out.println("Export error.");
              }

    hi all
    i'm trying to save a file with a certain extension
    i have my class that extends FileFilter, and which write into the jfilechooser combo box with extensions. .jar
    how can i save a file with this extension?
    here is the code
    JFileChooser fileChooser = new JFileChooser();
              fileChooser.addChoosableFileFilter(new JarFilter());
              int returnVal = fileChooser.showDialog(new JFrame(), "Export");
              if (returnVal == JFileChooser.APPROVE_OPTION) {
                   File file = fileChooser.getSelectedFile();
                   try {
                        JarExporter exporter=new JarExporter(this.generateXMLString(file.getName().replaceAll(".jar", "")),
                                       this.editor.getLinkageCanvas().getSelectedWidgetIDs());
                        exporter.exportJarFile(file);
                   } catch (Exception exception) {
                        System.out.println("Export error.");
              }

  • Elements not always opening and sometimes will not save a file

    I am fairly new to Photoshop having only previously owned PSE 10.  When i upgraded to 11, i was seriously impressed but now i have the most annoying problem.  Usually i can open a raw file sucessfully the first time and edit/process it with no problems but if i then try to open a second one, nothing happens.  If i open elements first and then open the file it will work but then, when it comes time to save the file, nothing happens.  there are no error messages, nothing  freezes, nothingn happens at all!
    The only thing that i  can think of is that i did a silly thing!  When i was looking in the folder with all my files, i saw the new .xmp file that is added after processing a raw file.  For some unknown reason, i thought that it would be a good idea to change the "opens with" setting for it.  I now do not know how to remove this setting or what to change it back to.  At the moment it is set to notepad.  I am not sure if this is relevant as i can usually open the first photo successfully and everything works.  It does, however, require a complete restart if i want to work on another picture.

    You can't do that with any email app. It's an email, not a document in a text editor or word processor.
    To save it as a separate document, click anywhere in the body of the email and press Command+C to copy it. Paste it into a blank Word document and save it.

  • Faild to save sequence file. Out of memory

    I need to write several arrays to my report file. This works fine for a couple of times, but when I add to many steps I get the message "Failed to save sequence file xxx.seq. Out of memory" from the Sequence Editor.
    I found the "CustomActionStep" on this board and modyfied it to handle two arrays.
    Any ideas to why this happens? 
    Attachments:
    test-array-to-report.seq ‏103 KB
    generate-nubers.vi ‏9 KB
    AmpPhaseRes.vi ‏15 KB

    Hi misa37,
    I have run your sequence file several times, but I am unable to reproduce the same error message.  I opened the sequence in TestStand 4.1, added 6 copied steps to the ones already present.  My computer has 2 GB of RAM, with 20GB free of hard disk space.
    If you open the task manager while the code executes is there a noticeable CPU spike or rise as the code executes?  Have you tested this code on a different computer that has more RAM?  What version of TestStand are you using?
    A_Ryan
    AES
    National Instruments

  • SAVE / SAVE AS buttons in editor - possible ?

    Is it possible to enable Save and Save As buttons in the
    editor?
    The only way I see to save files is File > Save or File
    > Save As
    Would be great if there were buttons in the toolbar
    Many thanks

    I have a save button on the standard toolbar (small disc
    icon)... It will
    do a save if you have already saved the document initially,
    or it will open
    up a dialogue box to save a new file....
    Nadia
    Adobe® Community Expert : Dreamweaver
    CSS Templates |Tutorials |SEO Articles
    http://www.DreamweaverResources.com
    http://www.csstemplates.com.au
    http://www.perrelink.com.au
    CSS Tutorials for Dreamweaver
    http://www.adobe.com/devnet/dreamweaver/css.html
    "scan reg" <[email protected]> wrote in
    message
    news:epq2ur$p8m$[email protected]..
    > Is it possible to enable Save and Save As buttons in the
    editor?
    >
    > The only way I see to save files is File > Save or
    File > Save As
    >
    > Would be great if there were buttons in the toolbar
    >
    > Many thanks
    >

  • Adding New File Type/Editor (CS6)

    There are a number of posts around editing Extensions.txt and MMDocumentTypes.xml but those posts don't seem to be solving my issue.
    I have 40+ Dreamweaver users and I'd like to be able to send them one or two configuration files that add new extensions ALONG WITH primary and secondary associations for editing.
    For example, I need to add the extension for PowerPoint (.pptx) and associate PowerPoint as the editor. I want to do this for all Microsoft Office file extensions - associate the extension with the default editor.
    As a test, I've changed both Extensions.txt and MMDocumentTypes.xml in my local user folder, but the only result I get is that the .pptx file extension in the list of extensions Dreamweaver can Save As...
    That's not what I'm looking for.
    When manually adding an extension and a primary (or secondary) editor in the DW preferences File Type / Editor panel, I get the result I want... double-clicking the file from the Files palette opens the file in the specified editor AND the file extension (.pptx) does NOT show up in list of extensions in the Save As... dialog.
    I have about 10 different extensions/app associations I'd like to add. Is there someplace else I should be looking?

    There are a number of posts around editing Extensions.txt and MMDocumentTypes.xml but those posts don't seem to be solving my issue.
    I have 40+ Dreamweaver users and I'd like to be able to send them one or two configuration files that add new extensions ALONG WITH primary and secondary associations for editing.
    For example, I need to add the extension for PowerPoint (.pptx) and associate PowerPoint as the editor. I want to do this for all Microsoft Office file extensions - associate the extension with the default editor.
    As a test, I've changed both Extensions.txt and MMDocumentTypes.xml in my local user folder, but the only result I get is that the .pptx file extension in the list of extensions Dreamweaver can Save As...
    That's not what I'm looking for.
    When manually adding an extension and a primary (or secondary) editor in the DW preferences File Type / Editor panel, I get the result I want... double-clicking the file from the Files palette opens the file in the specified editor AND the file extension (.pptx) does NOT show up in list of extensions in the Save As... dialog.
    I have about 10 different extensions/app associations I'd like to add. Is there someplace else I should be looking?

  • How to Save a file???

    Basically i'm having a tree structure in the leftside..and in the right side i'm having Jeditorpane. Both are split by splitpane.
    In the left side, i willhave some .txt files.
    when i open a file, it should open in the right hand side of the screen..I should be able to edit the file..How this can be done.
    After changing, i have to save that file using Save File Menu..How to do this..
    Please give ur valuable solutions.
    Thanks
    Nathan

    when u select the file on the left side, get the path and ope the file use BufferedInputStream , read the file line by line and display it in ht editor. When the file is modified the get the text from editor and save the file using FileoutputStream.

  • Save multiple photos from editor

    Hi,
    When I have finished my work on multiple photos in the editor and I want to save it then I must save every picture separate.
    Is there a possibility to save all photos in one run.
    Thanks for answers.

    In case you want to save them with a naming covention and other things try File->Process Multiple Files. There choose opened files from the options and use various other options as suitable.
    You can`t save these files in one go with the normal way.
    -Garry

  • Can't save a file because of "a program error"

    PSE 8 doesnt' save files with error "Could not complete your request because of a program error".
    when PC is restarted PSE does save one or two files and then the error appears...
    looks very ugly, such a basic fiture is not working

    First thing to try is resetting the preferences by holding down
    the Shft+Alt+Ctrl keys (windows) Cmd-Shift-Option  (mac)
    as you start the pse 8 editor and then click yes in dialog.
    Some more information might help such as which OS (windows or mac)
    and how much ram you have and if this has worked before or never worked and
    the format your trying to save your files in.
    MTSTUNER

  • Dreamweaver 2014.1 crashes every time I save a file

    Since upgrading to the latest version of Dreamweaver it now crashes every time I save a file.
    I have tried doing a save as using Dreamweaver CC instead which works fine.
    Is there something I can do to give it a lobotomy without losing all of my preferences?
    Thanks

    Ok Henning ! Can you please share the crash logs .
    How to Collect crash logs on win –
    You need to add these entries in registry.
    1. Go to run, type regedit and enter. This will open Registry Editor.
    2. Go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting->Right Click->New->Key. New key named "New Key #1" will be created. Rename it to LocalDumps.
    Add two entries LocalDumps
         2.1 Right click on LocalDumps->New->Expandable String Value (REZ_EXPAND_SZ). Double click on the  entry created and add value name : DumpFolder and value data : %LOCALAPPDATA%\CrashDumps.
         2.2 Right click on LocalDumps->New->DWORD (32 bit) Value(REG_DWORD). Double click on the value created and add value name : DumpType and value data :1
    Next time when the application crashes you will find the crash dump at C:\Users[UserName]\AppData\Local\CrashDumps. Dumps will be created only in case of crash and not hang.
    Thanks!
    Kusha

  • I need to create an action or script to save the file with the name of the selected layer

    I need to create an action or script to save the file with the name of the selected layer (not including the hidden layers, but including those visible).
    How could modify the script: 'Layer Comps To Files.jsx' to get the result?
    Warning: I do not need to export all layers as files.
    Who can help me?
    THX in advance

    Versione in Italiano (Further down the English version)
    NB - Nella versione inglese ho messo tutte le immagini dei menu in italiano.
    Versione per Mac, ma credo sia identico per Windows.
    Spiego passo passo cosa ho fatto:
    - Ho creato un file esempio con tre Livelli, salvato sulla scrivania e ho chiuso il file.
    - Ho aperto il file e selezionato il Livello al centro per iniziare a registrare una azione che ho chiamato: Save with Name of Selected Layer
    - Nuova azione
    - Dare il nome e premere Registra
    Ora salva…
    - Menu --> Livello --> Nuovo --> Livello... e premi -ok-, (lascia il nome che viene mostrato)
    - Ancora una volta Menu --> Livello... --> Nuovo --> Livello... e premi -ok-, (lascia il nome che viene mostrato)
    - Menu --> Livello --> Ordina --> Dietro
    - Menu --> Livello --> Unisci sotto
    - Menu --> Livello --> Unisci visibili
    - Menu --> Livello --> Nuovo --> Livello... e premi -ok-, (lascia il nome che viene mostrato)
    - Menu --> Livello - Nascondi Livello
    - Menu --> Elimina --> Elimina livelli nascosti (press -Yes-)
    - Menu --> Livello --> Nuovo --> Livello... Inserisci questo: 'Move this to the trash' e premi ok
    - Menu --> File --> Script --> Esporta Livelli in File... (Nella finestra che si apre scegliere l’opzione che si desidera, ma togliere il prefisso del nome) e premere -Esegui-
    - Selezionare il pannello Storia cliccare su Elimina premendo -Si- ogni volta che si apre la finestra di dialogo (Ripetere 8 volte questa operazione sino ad arrivare nella storia alla condizione di partenza. Ho visto che è meglio di Ripristina -F12-)
    - Fermare la registrazione.
    A questo punto, mandando in esecuzione questa Azione, ho raggiunto parzialmente l’obiettivo perché i file così creati mantengono, purtroppo, dei prefissi numerici per evitare probabilmente la sovrascrizione di file (credo senza avviso) nel posto dove vengono creati.
    Per ottenere l’obiettivo occorre un nuovo passo ed a proposito di questo riferisco quanto segue:
    ATTENZIONE - L’operazione descritta qui di seguito deve essere fatta su di una copia del file, per cui:
    - Duplicare il file,
    - Spostare l’originale in altra cartella
    - Lavorare sul file duplicato.
    mi riferisco a questo...
    ATTENZIONE - Questa modifica è effettuata a proprio rischio e pericolo ed il sottoscritto non si assume alcuna responsabilità su quanto venga fatto soprattutto da mani inesperte.
    ATTENZIONE - Questa modifica sovrascrive qualsiasi file che abbia nome uguale al layer che viene selezionato più l’estensione del file naturalmente.
    Comunque la modifica è banalissima e a portata di chiunque.
    Procedere così:
    - Chiudere Photoshop
    - Aprire (nel percorso specificato dall’immagine) il file “Export Layers to Files.jsx” (Export Layers To Files.jsx 1.0.0.16) con un editor di testo puro.
    - cercare la stringa (dovrebbe essere in riga 1029)
    var fileNameBody = fileNamePrefix;
    fileNameBody += "_" + zeroSuppress(i, 4);
    fileNameBody += "_" + layerName;
    - sostituirla con:
    var fileNameBody = fileNamePrefix;
    fileNameBody += layerName;
    - cercare la stringa (dovrebbe essere in riga 1047-46)
    var fileNameBody = fileNamePrefix;
    fileNameBody += "_" + zeroSuppress(i, 4) + "s";
    - sostituirla con:
    var fileNameBody = fileNamePrefix;
    fileNameBody += "";
    - salvare e uscire.
    - riavviare Photoshop
    - provare l’azione registrata facendo attenzione che il nome del layer non sia identico al nome di un file già presente altrimenti questo verrà sovrascritto.
    Domanda:
    Perché ho creato livelli che poi ho eliminato ecc.
    Risposta:
    Semplice per evitare errori di esecuzione delle azioni nel caso di operazioni con livelli mancanti o altro.
    Semplice... no?
    English version
    Mac version, but I think it's the same for Windows.
    First of all, I'm translating the actions that I made using the Italian version of Photoshop, you look at the position of the menu that I have chosen to do the work with other languages.
    I explain step by step what I did:
    - I created a sample file with three layers, saved to the desktop and I closed the file.
    - I opened the file and select the layer at the center to start recording an action that I called: Save with Name of the Selected Layer
    - New action
    - Give the name and press Save ( I think it is so in English )
    Now save ...
    - Menu -> Layer - > New —> Layer… and press -ok- , (leave the name that is shown)
    - Once again Menu -> Layer - > New —> Layer… and press -ok- , (leave the name that is shown)
    - Menu -> Layer - > Arrange (order) -> Behind
    - Menu -> Layer - > Merge Down
    - Menu -> Layer - > Merge Visible
    - Menu -> Layer - > New —> Layer… and press -ok- , (leave the name that is shown)
    - Menu -> Layer - Hide Layer
    - Menu - > Delete - > Delete hidden layers (press -Yes- )
    - Menu -> Layer - > New —> Layer… Enter this: ' Move this to the trash ' and press ok
    - Menu -> File - > Scripts -> Export Layers To Files... (In the window that opens select the option you want, but take away the name prefix) and press - Run -
    - Select the History panel and click Delete (on menu opened) pressing -Yes- every time when open the dialog box (8 times Repeat this step until you get into the story to the starting condition. Not use Restore -F12-).
    - Stop recording.
    At this point, by executing this action, I have reached the goal partly because the files created in this way remain, unfortunately, the numerical prefixes to avoid possibly overwriting of files (I think without notice) in the place where they are created.
    To achieve the goal we need a new step and thinking about this as follows:
    WARNING - The operation described below should be made on a copy of the file, so :
    - Duplicate the file
    - Move the original folder to another
    - Work on the duplicate file.
    WARNING - This modification is performed at your own risk and the undersigned assumes no responsibility on what is done mostly by inexperienced hands.
    WARNING - This change will overwrite any files with the same name as the selected layer plus the file extension of course.
    However, the change is trivial and within reach of anyone.
    Proceed as follows:
    - Close Photoshop
    - Open (in the specified path from the image ) file " Export Layers to Files.jsx " (Export Layers To Files.jsx 1.0.0.16) with a pure text editor.
    - Search for the string (should be in line 1029 )
    var = fileNameBody fileNamePrefix ;
    fileNameBody = + "_" + zeroSuppress (i, 4 ) ;
    fileNameBody + = "_ " + layerName ;
    - Replace it with :
    var = fileNameBody fileNamePrefix ;
    fileNameBody + = layerName ;
    - Search for the string (should be in line 1047-46 )
    var = fileNameBody fileNamePrefix ;
    fileNameBody + = "_ " + zeroSuppress (i, 4) + "s" ;
    - Replace it with :
    var = fileNameBody fileNamePrefix ;
    fileNameBody + = "";
    - Save and exit.
    - Restart Photoshop
    - Try the recorded Action, making sure that the layer name is not identical to the name of an existing file otherwise it will be overwritten.
    Question:
    Why I created levels which I then deleted etc..
    Answer:
    Simple to avoid errors of execution of the actions in the case of transactions with missing levels and other.
    Simple ... is not it?
    Sorry for my bad English...
    Thanks in advance for any hint.
    --->>> Please think about this... Adobe <<<---

  • When using Camera raw with PS12 after editing, I cannot save my file in JPEG, only DNG

    When using Camera RAW after editing photo I can only save file as DNG, I want to save as JPEG. HOW??
    THANKS LLOYD

    BARBARA,Yes, you are so right, I was deceived by the eve button,  Just tried it and it WORKS GREAT-Thanks for the help.
    THANKS AGAIN AND HAVE A GOOD DAY Lloyd
          From: Barbara B. <[email protected]>
    To: Lloyd Bennett <[email protected]>
    Sent: Tuesday, January 13, 2015 11:46 AM
    Subject:  When using Camera raw with PS12 after editing, I cannot save my file in JPEG, only DNG
    When using Camera raw with PS12 after editing, I cannot save my file in JPEG, only DNG
    created by Barbara B. in Photoshop Elements - View the full discussionYou are being deceived by the Save button, like most people. That button is not the Save As button, really, but a link to the DNG converter. To save your raw file in an image format, click the Open button instead and then save in the format of your choice in the editor. If the reply above answers your question, please take a moment to mark this answer as correct by visiting: https://forums.adobe.com/message/7092207#7092207 and clicking ‘Correct’ below the answer Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: Please note that the Adobe Forums do not accept email attachments. If you want to embed an image in your message please visit the thread in the forum and click the camera icon: https://forums.adobe.com/message/7092207#7092207 To unsubscribe from this thread, please visit the message page at , click "Following" at the top right, & "Stop Following"  Start a new discussion in Photoshop Elements by email or at Adobe Community For more information about maintaining your forum email notifications please go to https://forums.adobe.com/thread/1516624.

  • Saving files in editor

    Whilst trying to save an edited file in editor I get the following message.
    Could not build a preview because of a program error. Im using imac

    It's very important to delete old preferences after a major OS X upgrade. For PSE 11 you want to go to your username>library>preferences and delete
    com.adobe.PhotoshopElements.plist
    Adobe Photoshop Elements 11 Paths
    Adobe Photoshop Elements 11 Settings
    and any lockfiles with those names.
    While you're in that library go to the Saved Application States folder and delete any for PSE, since you've run it.
    Here's how to find the user library in 10.9:
    http://www.cultofmac.com/251544/mavericks-makes-it-way-easier-to-access-your-library-folde r-os-x-tips/
    and repair permissions before you try again.

Maybe you are looking for