I really miss toolbar from Visual Studio in XS, and I would like to customize it -- adding "save"/"save all" buttons for sure, but also removing completely useless (for me) ones as well.
Can I customize XS toolbar? If yes, how?
XS at this moment doesn't have ability to add commands to toolbar(tbh shouldn't be hard to implement).
But it's very easy to add it if you create AddIn:
Just add this to AddIn manifest.addin.xml:
<Extension path = "/MonoDevelop/Ide/CommandBar">
<ItemSet id = "MyCommandsBar">
<CommandItem id = "MonoDevelop.Ide.Commands.FileCommands.Save" />
<CommandItem id = "MonoDevelop.Ide.Commands.FileCommands.SaveAll" />
</ItemSet>
</Extension>
And call:
IdeApp.Workbench.ShowCommandBar ("MyCommandsBar");
Result will be:
Update:
To address your question in comment.
Unfortunately you will have to create actual AddIn(Plugin), to do this you will have to install "AddInMaker addin" from online AddIn Gallery.
Then create new AddIn project and add this logic. You can't just change some config files to do this.
I created GitHub repository with this sample, see this commit to see changes needed: https://github.com/DavidKarlas/SaveButtonsAddIn/commit/7cff0bd9eadfa5c02f5a7d21c5b139e13e50d860
Notice that I also added StartupHandler that is executed when Xamarin Studio is started.
Related
Can I somehow use the same Eclipse plug-in project for both a generated EMF model and the corresponding generated EMF Edit code?
Normally these two components reside in two different projects, the EMF Edit one with the suffix .edit to its name. I find this superfluous, since there is so little code in the Edit project, and it is so closely related to the model code.
I have tried setting both the modelDirectory and the editDirectory Gen Model attributes to (different) directories in the same project, but that seems to lead to endless confusion and build problems. I think maybe the two generation steps overwrite each others project setting files.
After some more experimentation it seems like it works fine to have EMF and EMF Edit generated code in the same project.
The things I had to do to make it work are the following:
Setting the genmodel property modelDirectory and editDirectory to the same directory. Otherwise I got a build error saying "The type ... is already defined in ...".
Setting the genmodel property bundleManifest="false". Otherwise the plug-in ID is overwritten by the generation process.
Apart from this I also set updateClasspath="false" to avoid that the generation process messes around with that.
The automatic updates to the manifest and plugin.xml files seem to be the following:
Set plug-in ID
Add exported packages
Add EMF extensions to plugin.xml
2 and 3 needs to be performed manually if they are desired. That would involve adding entries to plugin.xml similar to these:
<extension point="org.eclipse.emf.ecore.generated_package">
<!-- #generated model -->
<package
uri="somePackage"
class="somePackage.SomePackage"
genModel="model/model.xcore"/>
</extension>
<extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
<!-- #generated model -->
<factory
uri="somePackage"
class="somePackage.someClass"
supportedTypes=
"org.eclipse.emf.edit.provider.IEditingDomainItemProvider
org.eclipse.emf.edit.provider.IStructuredItemContentProvider
org.eclipse.emf.edit.provider.ITreeItemContentProvider
org.eclipse.emf.edit.provider.IItemLabelProvider
org.eclipse.emf.edit.provider.IItemPropertySource"/>
</extension>
When I create a new javascript file, a template like comment is added at the top of the file that looks like this:
/**
* Created by User on 2015-03-29.
*/
I would like to modify this template, but I cannot for the life of me figure out how.
In the settings page, I have tried searching for 'IDE settings', 'File and Coding Template' (as it would be in PHPStorm, I believe), 'Copyright' (as in IntelliJ), 'header', 'template', 'comment' and different combinations of those terms. But none of these terms result in anything relevant. And searching on google is difficult, because most links take you to PHPStorm or IntelliJ help docs.
Maybe my google-fu is off today...
Settings (Preferences on Mac) | Editor | File and Code Templates | Templates -- you need JavaScript File entry.
And searching on google is difficult, because most links take you to PHPStorm or IntelliJ help docs.
Well ... PhpStorm = WebStorm + PHP + Databases -- in terms of settings it is exactly the same... (comparable builds of course)
P.S.
In previous versions (WebStorm v8, PhpStorm v8.0.1 and older, IntelliJ v13) all Settings were in single column but separated in 2 groups: "Project Settings" on top and then "IDE Settings" on the bottom of the list. In current versions all settings are mixed together using collapsible tree structure and you have to look for special icon next to the settings section name -- it will tell if you this is an IDE wide setting or project specific.
Currently, all my angular material HTML attributes are highlighted in yellow with WebStorm 9 (Mac OS X Yosemite) warning: "Attribute [name] is not allowed here".
How can I teach WS to automatically recognize these attributes as valid? I am aware that I can add each one one-by-one to the list of custom attributes, but was hoping that there would be a better way to do this.
UPDATE:
Just wanted to clarify that this issue applies to Angular Material project, and not the AngularJS itself.
You need to add the angular-material.js file as a Library in WebStorm:
Open Preferences (Mac: Cmd+,, Win/Linux: Ctrl+Alt+S)
Go to Languages & Frameworks > JavaScript > Libraries
Click Add and then press the + icon
Find angular-material.js in your node_modules folder
Add a Name and a version and press Ok
Now you will have completions for all elements and attributes that have an #ngdoc documentation in the angular-material source code.
Usage
Start typing and you will see the completions:
Pressing F1 (Ctrl+Q on Win/Linux) will also show some docs, if available in the source code:
Important note
Not all features are properly documented, the following won't show up (unless you already used them) cause they are defined dynamically in a loop, with no #ngdoc for them:
var API_WITH_VALUES = [ "layout", "flex", "flex-order", "flex-offset", "layout-align" ];
var API_NO_VALUES = [ "show", "hide", "layout-padding", "layout-margin" ];
So for these you'd have to add them as a custom attribute (Alt+Enter > "Add flex to custom html attributes").
Environment
Tested on a Mac OS X 10.11.4 using WebStorm 2016.1.1, but this should work for older versions as well.
I am using PHPStorm, which is a sister Project of WebStorm, but it should work the same way.
You maybe need to add the Library:
File
Settings
Languages & Frameworks
Javascript
Librarys
Add here AngularJS
If this does not work, you can add them manually:
Follow this Steps:
File
Default Settings
Editor
Inspection
HTML
Unknown HTML tag attributes
To the right you will see in Options "Custom HTML tag attributes". Enter here the attributes you want to allow.
I highly recomend you to install the Angular.js plugin:
Go to menu File > Settings (or ctrl + alt + S if you're on Windows);
Select Plugins in the window that'll open;
Click in the Browse Repositories button;
Type AngularJS in the search field. Select the plugin;
Click Install Plugin.
The plugin is incumbed to read #ngdoc annotations present in ngMaterial sources and create documentation for their directives.
It seems to support WebStorm and other IDEs, but I could not find it in the plugin registry while filtering by other IDEs. Maybe it'll work inside WebStorm...
Anyway, this is what you get:
You have also a plugin that helps a lot, check it out. It helps a lot
Angular material v2, Teradata covalent v1, Angular flex layout v1 & Material icon live templates
And with the solution provided by #Alex Ilyaev gives a lot of help.
But its no perfect.
Hope it helps.
Currently I don't think that idea's AngularJS plugin understands angular-materials attribute extensions.
It does understand the directives i.e. control click <md-button ...> and the directive (custom tag) is found.
For now you will have to add the attributes af custom attributes in order to get a "green" page.
I'm working on a project consisting of two Eclipse plugin projects. One is an EMF project and contains the metamodel for the application. The other one is the acctual plugin working on that metamodel.
I'm now looking for a way to list all types of models available in the metamodel project. Since I basically need all generated classes I could use reflections to iterate through the metamodel package but I'd prefer an easier way if there is one.
The models are already listed as extensions in the plugin.xml like this:
<plugin>
<extension point="org.eclipse.emf.ecore.generated_package">
<package
uri="MyModel"
class="org.myproject.metamodel.MyModel.MyModelPackage"
genModel="model/MetaModel.genmodel"/>
</extension>
</plugin>
where the class MyModelPackage extends EPackage and org.myproject.metamodel.MyModel also contains all the other generated classes I need to list. I'm guessing that I can use that information but I still don't know how.
Update
The project I'm working on is based on EMFStore. Running it offers the EMFStore perspective. If I have the Navigator view with a project I can right click on that project and select New Model Element. This opens a dialog where all the model elements from my metamodel are listed so it is possible. It must be done somewhere in EMFStore or one of it's dependencies. I looked through the source code but can't seem to find where it's done.
The plugin.xml of the project org.eclipse.emf.emfstore.perspective refers to the class org.eclipse.emf.emfstore.emfperspective.EMFStorePerspective which I can't find in the sources. I imported the project via the Eclipse Import Plug-Ins and Fragments functionality and it has no source folder. In the EMFStore git repositories I can't even find that project.
Update
I now got the registry that contains the generated packages using EPackage.Registry.INSTANCE. Unfortunately it contains more than the EPackages from the one project containing the metadata (org.myproject.metamodel). Now I'm just looking for a proper way to filter it, but still can't get the hang of it.
Update
As the filtering is not part of my original question I accepted the answer by #SpaceTrucker. For those who are curious, this is how I've done it now:
Registry registry = EPackage.Registry.INSTANCE;
for (String key : new HashSet<String>(registry.keySet())) {
EPackage ePackage = registry.getEPackage(key);
if (ePackage.getClass().getName().startsWith("org.myproject.metamodel")) {
//do stuf
}
}
I found no way to filter for the project but luckily all the packages start with the same prefix.
EPackages may be registered via an EPackage.Registry. There seems to be a globally used instance available via ECorePlugin.getDefaultRegistryImplementation(). However I'm not 100% sure on that.
MoDisco comes with a EMF Model Browser, where you are also able to select any registered EMF model. So you also could have a look at those sources.
I just installed the Expression Blend Studio 4 (Trial) from Microsoft.
I have several tutorials telling me to change the style, that I should go to
(Assets) Styles > SketchStyles
There is nothing under that area except a warning(and link)
This category shows all the styles you have created for the current document or application. Additional styles can be found in the online Expression Gallery.
That link gets me no where fast. It basically goes to the home page of Expression Blend.
If you look at this 90 second video.
http://electricbeach.org/files/sketchflow_overview.wmv
At the 30-36 second mark, he is switching the style from squiggly to something more professional.
I'm trying to demo that same thing, which I believe (keep in mind I'm new to this) I am changing FROM the WigglyStyles style to something else.
With
(Assets) Styles > SketchStyles
being empty, I don't know what I'm missing.
...........
So a 2 part question:
How do I get entries to show up under (Assets) Styles > SketchStyles?
(If different from #1), how do I change the overall style from WigglyStyles to something else (and back to WigglyStyles)?
Thanks!
Is misssing the SketchStyles.xaml.
SketchStyles.xaml – this file contain the resource dictionary with number of styles which SketchFlow project makes use of them internally.
Solution:
Create a new solution, a (sketchflow silverlight solution), copy the SketchStyles.xaml from your created solution drag and drop the to the project that doesn't have this file, and press ctrl+shift+B to build it.
hope it helped.
The message was throwing me off.
The little triangle, pointed "to the right" initially, has to be clicked (and then points down) exposing the sub items.
The message:
This category shows all the styles you have created for the current document or application. Additional styles can be found in the online Expression Gallery.
is what was throwing me off. (And I was thinking the same thing as alimbada, that my install went awry).
Once I expand "Styles" (via the small triangle), everything is there.
Ok!! Did I mention I'm a developer, not a designer?? (haha).
Aka, this was just a big "duh" moment.
Thanks.
I just had a quick play with Sketchflow since I have Blend installed and those styles show up fine. Maybe your install went awry?