Visio 2010: Adding a custom Stencil (permanently) to the Shapes menu - visio

I know how to create custom stencils and shapes....what I haven't been able to find out is if it's possible (and how) to have my custom stencil w/shapes show up by default in the Shapes window/menu.
I would like to avoid having to go to > More Shapes > My Shapes and rather just 'stick' my stencil in that menu by default.
Is this possible?

You can put your application's folder path in Visio's StencilPaths property, either through automation (Application.StencilPaths property) or through the UI (in the Advanced menu in the Options, click the File Locations button).
This won't open your stencil by default in Visio, but it makes it fairly easy to find. I can't tell by your question if this is what you're trying to avoid.
I suppose, you could also modify Visio's template files to add your stencil on, so no matter what your stencil is open for any new file.

Open stencils are something that's saved as part of a document's workspace settings. Ordinarily you would create a template that's saved with your stencil open. If the workspace option is included when saving, then subsequent documents (based on that template) will open with your stencil docked in position. Have a look at these two links for details:
Customizing Visio Templates
Create and use custom templates

Related

In RCP / Plugin development, what should be written for properties, args, and values to be written in 'activewhen' and 'enabledwhen'?

I am currently developing RCP.
The first picture plugin.xml file is included in the com.aaa.bbb.core project.
And the plugin.xml file in the second picture is included in the com.ccc.ddd.validator project.
What I'm trying to do is disable the popup's menu if there is no name(assist-provider) for the selected item on the UI.
The list of items that can be selected on the UI refers to the extension points of the com.ccc.ddd.validator project in the second figure, and only some of these extension points have the name (assist-provider) property as indicated by the red square. You have.
I don't know how to write conditions (property, args, value, etc.) in the com.aaa.bbb.core.command.assistValidationResult extension point in the com.aaa.bbb.core project with the above content.
The menu popup is always displayed, but I think you should use enabledwhen not activewhen because it will only be disabled depending on the situation.
Any advice on the matter would be appreciated.

Marker for IStorage

I have an editor plugin where I am using IStorage as editor input. I want to push errors of my editor content to eclipse default Problems View, for which I need to write markers.
I am very much aware of the fact that markers can be created on IResource only and not on IStorage.
I don't want my editor to be associated with a file or any other resource.
Can anyone suggest any manipulative way to implement marker on IStorage ?
Or may be any way to not associate a resource with editor but using IResource ?
Thanks In Advance !
As you already understood, there is no way to have a Marker on anything that's not an IResource. What I would suggest as workaround if you want to take advantage of markers (and more) is that you create a dummy IProject in your workspace, and that you create a "linked resource" for the file under this IProject rather than opening directly it as a IStorage.
Using an IFile linking to your file will allow you take advantage of markers, search, change history and many other IDE features that are only available for IResources.

Plugins for creating and styling custom Editor Windows like C#/C++ Form Designer or “Web Inspector”?

Unity3d allows to construct window with custom UI. Just need to use EditorGUI/EditorGUILayout classes and their static methods.
Example of custom window:
The problem is that all the components have to be added manually via script. Then need to save, switch to Editor, wait for little compile things, and then we can see the result.
In web-development people use Web Inspector (for example, we can press F12 in chrome, Tab Elements -> Styles). We can add all needed properties to element and can see the result in real-time.
EDIT. another example (better than previous): we know C# winFormApp, C++ MFC e.t.c, which has form designer. We can choose any elements and set their properties:
It would be nice to have similar plugins for Unity
So. Does Unity3d have similar tools, utilities, plugins? Utilities to inspect code and editing styles (position, margin, padding, background, width, height, color e.t.c.)?
Well, I found something interesting...Editor window designer
The plugin is almost what I need
The project had been started but not completed yet.
As the author says: he decided to release Editor Window Designer as an open source project, that code is here
For now plugin allows add elements and styling them (position, padding, width, height, e.t.c)
Base demo window:
And here is hierarchy window and properties of concrete element
I wonder why Unity developers (or someone else) still didn't do something like that? It is very useful and necessary thing...

How to change open with options in navigator depending upon name of the resource?

I am working on eclipse RCP application which implements CommonNavigator view to display navigator. I have few LinkedResources in navigator that link to files on the file system with custom extension. These custom extension files are opened in custom editor as well as in TextEditor.
One of the file named default.ext will be common to all the projects and I want to keep it read only. Is it possible to open file in custom editor only? For ex. Default.ext should be opened in only custom editor, however Test.ext should be opened in custom editor as well as text editor.
This way I could handle save action in my editor depending upon file name and keep the file read only.
Is there any other way to keep files read only?
Short answer: not possible in the way you describe.
Long answer: if somebody really wants to modify a file then there's no way or need to stop this. What you can do is either (1) hide the file from user or (2) set Read-only flag to discourage users from modifying the file.

ms-word template named-styles conversion

In MS Word 2010, when I apply a dotx template to a docx files and different styles exist in the two docs, how can I map a list of styles from the former to a list of differently-named styles from the latter?
Let me clarify the issue.
I have a dotx style file with a few standard styles (ex. heading1, caption etc.) and a few other styles (ex. blockquote, superfigure etc.). I must use this template and cannot change nor add any names there.
I have a document preparation system (ex. pandoc, orgmode) that outputs a docx file. When I compare some of the styles used in this docx I see they have a different name compared to the previous dotx, yet the "meaning" is the same. For example the "blockquote" of the dotx should be applied to the parts of the docx that are marked as "quotedtext".
SO, how can I tell MS Word 2010 to apply the dotx style to my docx mapping "blockquote" to "quotedtext"? Any alternative solution using different tecnologies like xls transform or similar stuff?
Any hint would be really appreciated
In the Home tab, click the widget (little arrow in the corner) of the Styles group to display the Styles pane. Click the Manage Styles icon at the bottom, then the Import/Export button at the bottom-left.
In this dialog you can Copy styles across documents or templates, Rename and Delete them. If the other document or template is not open, click Close File (the right button) then Open File (the button-text changes to this).
Unfortunately, you cannot just switch one style for another (at least, not from here; see below). However, I believe the process of Copy, Rename and Delete could achieve the same effect.
Alternatively, press Ctrl-H for the Replace dialog and press the More>> button. Place the cursor in the 'Find What' box, then Format at the bottom-left, and Style... Choose the style you want to replace. Do the same in the 'Replace with' box. However, the style you want to replace with needs to be available in the current document. Use the sequence outlined above to first bring across the styles you need into the current document. A quick way to bring in all the styles from the other document or template is to copy content from this doc/template to the bottom of the current document, deleting it later.
It is also possible to use the Styles dialog (mentioned above) to modify styles, changing the Style Based on property. However, I wouldn't recommend this approach. You will need to be very thorough and be fully aware of the consequences of the cascade; that is, how each modification affects other styles in the document.
If you need to go through this process for a large number of styles then use the macro recorder. You'll then need to modify the generated code, putting it in a loop.