Specifier Editor - Visual Studio Extension for creating/editing UE4 Specifier Tags!

Hello all!

I bring to you my first Visual Studio extension: Specifier Editor!
I’ll just use the description from my gallery page since it conveys the information well enough:

**"A simple tool that adds a right-click context menu in the code editor, which opens a simple editor with (most) possible specifier options available for UE4 code tags (such as UPROPERTY, UFUNCTION, etc.)

This tool can generate an entire tag from a single code tag word, or edit an existing tag by parsing the contents.

This is my first Visual Studio Extension and my first time working with WPF; bugs are probably to be expected."**

Demo gify: SpecifierDemo1 4 GIF | Gfycat (Updated)
not exactly sure how to embed these and the original gif is too big it seems

So why use this if I have all the tags memorized?
Good question! Obviously you don’t have to, but I think this tool is great for new UE4 programmers and veterans alike. It organizes the tags into a nice UI that is easy to navigate and work with. In my case, I am porting code from a bp only project into a Cpp project, and having to make all of these specifiers for the large amount of variables present is going to be a headache…why not make it easier?

Installation instructions:
Simply search for ‘SpecifierTool’ in Visual Studio’s online extension window (Tools -> Extensions and Update -> Select the ‘Online’ tree on the left, type into the search box in the upper right), then click ‘Download’ and follow the prompts.
Or you can do a manual install by downloading from this link: Visual Studio Gallery page
If you would like to update your copy, simply follow these same instructions (the Extension window will provide an update option)
If you cannot update the extension via the Extension window, simply uninstall the extension and reinstall it.

Uninstallation instructions:
Simply remove it via the Extension manager (similar to the steps in Installation).

Changelog:



Version 1.3:
- Fixed bug involving partial word matches in specifier tags (i.e. 'Config' and 'GlobalConfig', etc.)
- Fixed case-sensitivity search preventing specifiers from being picked up if they did not match the expected case
- Greatly improved theme colors
- 'Theme aware' color selection to match the Visual Studio color theme
- Added UIMin, UIMax, ClampMin, ClampMax for UPROPERTY
- Added Units to UPROPERTY with all valid unit types
- Added ToolTip and ShortTooltip to all specifiers


Version 1.2:
- Added support for VS2017


Version 1.1:
- Added new option "Generate Specifier Here" in the same right-click context menu as the Edit Specifier command. This allows quick selection of a specifier and will generate it at the cursor position (and immediately open the editor)
- Added keyboard shortcuts (default: Alt-W for Generate Specifier, Alt-E for Edit Specifier)


Version 1.0:
- initial release


Notes/Future plans/Bugs/etc:

  • This extension currently only supports Visual Studio 2015 + 2017!!!.
  • The specifiers list can be edited in the Options menu under ‘Specifier Editor’. You can remove tags and rearrange their order there for each specific tag as you see fit.
  • Specifiers that used a comma-seperated list (such as HideCategories) are not supported at current
  • The context option does not currently detect which file type it’s editing; so the extension can be used outside of .cpp/.h files (whether this will change or not is undecided)
  • Some specifiers may be flat-out missing; if so, feel free to notify me and/or link documentation to them
  • All meta/advanced specifiers are hard-coded at the moment
  • The parsing will ignore consecutive specifiers placed together without spaces; the first specifier found programmatically will be used
  • In the future, tooltips and/or links to documentation pages for specifiers should be added
  • In the future, should probably gray out/disable/uncheck specifiers that are not compatible with each other (such as EditDefaultsOnly with EditAnywhere)
  • Option changes may not save. Probably something I am doing wrong with the configuration code; will look into it later on

No eta on any changes ever because this project is merely done in my spare time

Now without further adieu:
Download: Follow ‘installation instructions’ or manual download

Feel free to leave feedback/comments/etc. about it!

A shortcut to open a tag’s menu and generate the Unreal Meta Tags in-place (wherever the cursor is) would be nice!
Looks useful so far, nice!

Thanks!
I have taken your suggestions into consideration and have uploaded an update with those exact things. Check out the first post for changelog info.

The update should be available through the usual methods.

Any update on when it is usable with VS 2017?

No eta, mainly because I do not have VS2017 myself. I suppose I can grab the community edition and get on with it though, huh?

Yes community edition works fine and its free. Great plugin! Thank you for making and releasing it. :slight_smile:

Well, after some serious disk cleanup, I installed VS2017 and managed to get the project to work on both versions. Grab the update (or install new) at any time!
(You might need to uninstall older versions, then redownload the plugin to install the update. At least, I had to do this with my copy of VS2015)

Awesome! VS2017 is working for me! I really like it, as it makes working on U-Macros more easy. Thank you so much :slight_smile:

Some Feedback or ideas for what to improve first:

  • Make a tooltip box on hovering each element that displays the comment from ObjectMacros.h - that’ll help some to know what they are good for
  • don’t show “no specifier found” when the cursor is in the brackets of the specifier, so a better search around the cursor for specifiers. don’t know if it’ll work on every position in that line maybe? And not only backwards search, but also forward from the cursor position to include the case where the cursor is before the U of e.g. UCLASS.
  • saw “transient” instead of “Transient” in a UE4 engine header, which was not parsed in the edit dialogoue - compare lower-cased text would be an idea for a fix

From your description you seem to be aware of those. :wink: But still those are the my initial thoughts on its usefulness after a quick test, so I’ll leave this feedback.

I love you. Thanks for this, it’ll help me greatly.

Parsing a file in that manner is not necessarily the best idea I feel, but some way of showing the documentation for each one is something I want to do. I want to setup a custom settings dialog at some point so things like Tooltips and such could be edited as well. Certainly something that will take some time to get rolling, but it’ll come eventually. :slight_smile:

I definitely want to! But working with the Text Selection (which is what is used for finding text and replacing it) is a surprising pain. I will see what can be done, because I’m not entirely satisfied with the implementation, either.

I presume you mean that it parses it as a case-sensitive search, which is definitely an error on my part. I will get to fixing it sometime, probably the first thing I’ll correct.

Thank you for your feedback. :slight_smile:

Version 1.3 is up now. Here are the changes:



Version 1.3:
- Fixed bug involving partial word matches in specifier tags (i.e. 'Config' and 'GlobalConfig', etc.)
- Fixed case-sensitivity search preventing specifiers from being picked up if they did not match the expected case
- Greatly improved theme colors
- 'Theme aware' color selection to match the Visual Studio color theme
- Added UIMin, UIMax, ClampMin, ClampMax for UPROPERTY
- Added Units to UPROPERTY with all valid unit types
- Added ToolTip and ShortTooltip to all specifiers


Take a look at the first post for a screenshot of the new theme colors. Also note that they will change depending on your Visual Studio theme option as mentioned in the changelog.

I’ll probably next be looking into text scanning improvements and adding all missing specifiers from ObjectMacros.h. After that, things like tooltips, fixing the config problems (and expanding on it), links to documentation pages, and more will come into play.

Very good job! Keep it up, I really like those handy VS extensions.
I have just found two issues: missing AllowPrivateAccess meta and strings (tested only category) are lower case even when original specifier has upper case, so after clicking Ok they are lowercased even when I changed nothing :slight_smile:

For future: something like full project refactoring of specifiers would be awesome! If we could just choose order of specifiers, their case version (these work correctly, great job) and clicking button like Refactor and boom, whole project is consistent. It would be absolute game changer for me :smiley:

I am not sure what standard is Epic using for order of specifiers but It would also awesome to do some research and configure default settings in similar manner :slight_smile:

As mentioned in future updates, little tool-tip explaining what each one does would be super handy until it sticks in the head :slight_smile: Great useful extension.

Thanks. :slight_smile:

AllowPrivateAccess was never documented and hence why it got missed. I will add it in short order immediately!

And that’s not a bad suggestion for the text formatting really. Personally I would prefer the tool to format the text for me, so I think I can leave that as an option when I get around to making a new options dialog page. I will surely keep this in mind. But I do think I have a way to preserve the text so expect to see that in the future.

Whole file and/or project refactoring/editing is a good idea! I can imagine scenarios, too, where one might put down a bunch of empty tags in a file with similar-purpose data (perhaps for example a BP Function Library) and quickly apply the same tags to all of them in one quick edit. This will take quite some time to develop though, so it will probably have to be on the back burner for the time being.

The order apparently does not matter a whole lot, as code in the Unreal Header Tool just parses through the entire parameter list of the macro to do its work. You actually can edit the order yourself in the options page for the tool (Tools -> Options -> Specifier Editor -> Specifier Editor Settings) but the changes will not save properly since I do not think I implemented the configuration correctly. I plan to correct that (and of course, expand on it) as one of my next things after text scanning improvements and such.

Yeah, the order is more matter of my “OCD” :smiley: I tend to do refactors of whole project just to keep order of specifiers consistent.

Do you have plans to add “UENUM()”? :slight_smile:

Hey, sorry I have not kept on this much at all; started a new job full time and just have not had much time for personal projects.

UENUM() is supported I believe. Are there specific tags or properties that are missing? I can add them in provided you list them off or link me some documentation (since documentation on all the tags is a bit tough to come by last I checked).

This add on is significantly more useful than the UnrealVS add on Epic ships with the engine. Great work Patience, thanks a ton.

Is the source for this public somewhere? I’d love to add mouse over tooltips because I’m still constantly referring to documentation to find the exact specifiers I want.

Awesome tool mate. Looking forward to future updates!! Keep up the good work!