"export all" window blocks my plugins script UI - plugins

I'm writing a custom File Translator for Maya which can export only (I have only declared the writer function).
Currently having a problem with the MEL script which defines the plugin's options as a GUI.
Currently I have a blank Maya scene, go to "file->export all". This creates the "File Export All" dialog, I then select my plugin exporter which runs my MEL script to create the bespoke options window. This new window is created behind the "File Export All" dialog and is not selectable!
Do I have to place my export plugin specific options within the export all dialog rather than placing them in a separate window?

The export all window is a modal window that is why your new window appears behind it.
You'll have to place the options in the export all dialog which will require you to edit the MEL script which actually draws it(not recommended). Rather you can make your own export window which uses the options provided by the file command.

Related

How can I configure Eclipse to save console out for my build?

I specifically only want console out for Building my code, which is primarily C++. Every search for this leads me to configuring Run Configuration(s) to output the console. I'm not trying to RUN my program, just want the additional detail from console-out when I build and get warnings, some of which I'm not getting filepath info in the "Problems" window. Thanks!
This might already be set up by default. It was for me, once I found the solution I realized this. Check if the following filename exists:
<workspace_name>/.metadata/.plugins/org.eclipse.cdt.ui/global-build.log
If it's there, you might already be setup with build output saved to a file. It should be saved in this file. If you don't have this file, and/or you want to change the file location, do the following: click Window context menu->Preferences. Expand the triangle next to C/C++ on the left sidebar, then under that sub-menu, expand the triangle next to the Build menu, then click Logging. Inside the Logging window, ensure the checkbox next to Enable global build logging is checked, then click the Change... button next to the Log file location text box and select your log file. (In Linux, this part may not be so easy if you don't have a log file already touched. In this case, navigate to the directory in which you want to save your log file, then click the button in the top left that looks like a piece of paper with a pencil over it (when hovering over this button it says "Type a file name"), and then type the name of the log file you wish to use. Click Ok.) Then in the Preferences window, click Apply and/or Ok. Next time you build, this log file should be populated automatically with your Console output.

How can I make VSCode file explorer menu items context sensitive to the file selected?

Description
I am working on an extension for Visual Studio Code and I am contributing some commands to the File Explorer menu. I want my commands to be visible based on the file that is selected in the File Explorer as well as some settings that the user has to configure.
So far I have my commands being contributed to the menu, and they are enabled based on a custom context that I have created. I have also created a function that can determine whether the menu items should be enabled given the path of the file selected (note that the enablement logic is more complex than just having a regex match on the file name/path). The problem is that right now the context value is set only once during the activate. I need the value to be set dynamically using my utility function each time the selection is changed in the explorer (or whenever the menu is created - whichever is easier). I have not been able to find a way to listen for changes in selection in the File Explorer. I know the vscode.Window namespace has several listener functions, but they all seem to be for the editor or when changing the state of views
Is this possible?
Code
activate function:
vscode.commands.executeCommand('setContext', 'myContext', true); // not calling my utility function because I don't have the selected file path available
package.json:
"explorer/context": [
{
"command": "my.command",
"when": "myContext"
},
It seems that it's not possible to add listeners to the file explorer view (see How to listen to events in vscode's TreeDataProvider?).
Further, the only way to get the file paths selected in the explorer is to copy them to the clipboard (see https://github.com/Microsoft/vscode/issues/3553).

How to make Matlab editor open a new script as a tab by default, instead of a new window?

I'm used to using tabs rather than having many new windows open. I've recently changed (work) computers and now whenever I open an old script or start writing a new one it opens a new instance of the matlab editor. The question is, does anybody know how to change the default to a new tab within the same editor? (hope that makes sense).
Thanks
Open 2 scripts or more. On one of the editor windows press the circled triangle (I am sure it has a proper name):
Select Dock All in Editor.
The files should appear as tabs docked to the matlab desktop.
You can now undock the editor using the same button (you should undock the editor, not a specific file)
Any file you open now should be in a new tab.

Only one editor per file in eclipse?

Eclipse PDE documentation claims:
You can think of the input object as the document or file that is
being edited. Changes made in an editor are not committed until the
user saves them.
Only one editor can be open for any particular editor input in a
workbench page. For example, if the user is editing readme.txt in the
workbench, opening it again in the same perspective will activate the
same editor. (You can open another editor on the same file from a
different workbench window or perspective).
Obviously it is possible to open a file using different editors - for example .java file using default java editor, and then text editor (by 'open with'). Is this part of the documentation wrong? Or is IEditorInput different for these two editors? I'm just wondering.
It was like that originally, and I think their point was double-clicking on an already open file will just bring it to the front, not open a new editor with the same information. Tht's still true, but that's not the whole truth :-)
I believe that section needs to be expanded, as I'm pretty sure the capability you refer to has been there for years as well. There's a "New Editor" entry in the editor tab context menu that allows you to open the same file in the same type of editor too.

Running Eclipse projects on the Command Prompt

I have a console-based C project in Eclipse. Is there a button I can press to launch my application in a Command Prompt window?
You can run your application as an External Tool, and there's a toolbar item for that. Looks like a green circle with a white arrow, beside a red toolbox. I'm a Java developer so I don't really know the CDT, but at least in the JDT you can run any command line tool in this way. (If it's not in your toolbar, right-click the toolbar and choose Customize Perspective… then find the External Tools item under Launch, and add it.)
First, click the down-arrow beside the button and then choose External Tools Configurations…. In the dialog, select Program from the left side and then click the New button in the toolbar. You are basically creating a shortcut that will live in the toolbar. At this point you can fill out the command line details to run your application. There's a lot of goodies like setting up environment variables, requiring a build of your projects before launching, etc. When you're done, save it, and you can run it as often as you like by clicking the arrow-and-toolbox button. You can come back and edit it later too, make duplicates, etc.
If you're working with a team, or you just want to do a really nice job:
In the Common tab, under Save as, choose Shared File. This will create a file in your project to represent the tool shortcut that you're building. That means you can check it into your source tree, and others can use it too. These files are XML so you want to check them in as text, not binary.
Start your working directory with ${workspace_loc} so that anyone who checks out your project can run it without having to adjust the shortcut for their file system.
Not directly, but you could configure an Ant task to run it (if it doesn't require console input), or you can configure firing up a JVM under Run|External Tools.