I'm currently writing an RCP application with custom editors. I'm trying to check if the file that is to be renamed is open in an editor. Using a custom RenameParticipant I can check this and prevent the rename operation, but this happens AFTER the user has entered a new name. I would like the check to happen before. Is this possible?
First, you need to obtain the editors that are opened in your RCP application. Eclipse allows you to do this by means of the following line:
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getEditorReferences();
Then, you have to check whether your file is opened in one of these editors. To do this, you can iterate the resulting array. Each of the elements of the array is of type IEditorReference. You can get the file that is opened in each editor reference by means of the method getEditorInput().
Related
I want to process lots of files in my extension and editors have lots of useful methods that I need to use to process the content of a file with, but I don't want to open each file individually in VSC.
I have been able to read the files I plan on editing but how can I create an editor?
Can this be done?
Have you tried vscode.window.openTextDocument()?
openTextDocument(uri: Uri): Thenable<TextDocument>
Opens a document. Will return early if this document is already open. Otherwise the document is loaded and the didOpen-event fires.
That does not imply showing the editor, which is done with a separate vscode.window.showTextDocument() call, so it should qualify as "virtual".
We have a system where we are generating a report as a Word document (using RDLC).
The report is created in a temporary directory, and then Word is launched to display it to the user.
Word is launched, and the report loaded by:
_wordApplication = (Word.Application)Activator.CreateInstance(Type.GetTypeFromProgID("Word.Application"));
object tempFileNameObj = documentPath;
_wordDocument = _wordApplication.Documents.Open(ref tempFileNameObj);
What I want is to convince Word that this is really a newly created, unsaved file, so it will give the user a SaveAs dialog when they save it (rather than save back to the temporary location).
Ideally, I would like to be able to specify the target directory, and offer a default name.
While the Word is being launched, I can do what I like using Automation, but after Word has been launched, my application will be disconnected from Word, and I would prefer not to leave any macros floating around in the document.
You can rename your .doc file to .dot (Word Template) and if you launch it afterwards, it will create a new File looking exactely like your .doc
If you're not using a macro I believe that the only way to archieve this would be to save the file that they will download be a read-only or user defined template file this way if they wan't to make changes to it they wil have to save it with another name in their computer to save the changes made. If you can use a macro you can archieve more options and even force a save as dialog when the document is opened or when it's closed. I hope this helps as I couldn't find any more information without using a macro.
I've created a form in the Forms Designer and saved it. I tried making some modifications to it later, specifically deleting input fields and adding new drop down lists. It won't delete input fields and new drop down lists can't be repositioned.
When trying to delete the program either does nothing or gives me the following error:
"Delete" did not complete normally. Please see the log for more information.
com.ibm.form.designer.model.xforms.model.impl.BindImpl incompatible with com.ibm.form.designer.model.xforms80.model.Bind80
Tried looking up the error but so far no solution. I've tried opening the .xfdl file as xml and edit it manually, it worked ok but now when I re-open the file in the Designer all the fields freeze up as they do with the drop down lists.
Any help appreciated.
There doesn't seem to be a way to fix the deleting bug from the Forms Designer itself. The best I could come up with is:
opening the .xdfl file in a text editor and deleting the tag for the particular field you want to delete
re-open the file in the Designer and the element can be deletable now
or if that doesn't work, find and delete any entry related to the element in the text editor and re-open in the Designer.
For the freezing page elements: close the file and restart IBM/Lotus Forms.
I want to send files to my application without using openfiledialog....lost??
OK.
You select a file in my documents, in the SendTo menu, I want my application to be an option,
when you select my application, the file that was selected should be add to the list box in my application, the same way it would do if I was using openfiledialog. But I want my application to run in the background, which means I don't want to use openfiledialog.
Please help??
Using .NET 3.5
I believe this is what you are looking for. You do not need to write any code to get your app in the 'sendTo' menu. Just following the instructions here:
HowToGeek - Customize 'Send To' menu
once the files / references are being passed to your app, you will have to write code to handle those command line args
I am to create a new design (CSS & HTML) for a web site which is created using Interwoven ContentCenter Professional.
Now, I can see the existing files in CMS (Interwoven) but, I can't make changes. My changes are displayed only when I'm in edit mode. Nothing in the live page. I tried to submit, create editions of files but still no good.
How should I create or edit pages in Interwoven CMS?
Thanks.
If you're talking about generic pages, then once you are finished you have to click on the Generate option, then choose a directory and click Finish. Last thing you should do is to choose yeswhen it asks you to Re-generate the page.
What you are trying to do is just creating a new file, not generating a file from TeamSite's Formpublisher. It is just like if you are in Windows Explorer and creating a new file. In order to generate a file from a form entry, you need to be in the templatedata directory, ex: /default/main/branch1/WORKAREA/wa1/templatedata/category/type(on unix) or Y:/default/main/branch1/WORKAREA/wa1/templatedata/category/type (on Windows). There should be a file call datacapture.cfg there. There is another directory called data under the above path which stores your data content record (dcr) that are created from the form. This is the file that you can use to generate which will use the (tpl) file under the presentation directory.