regarding gef selection - eclipse-rcp

I am new to GEF. I would like to post some doubts here.
I have created a rectangle figure on the graphical editor. Now I am unable to select that
figure. In order to select a figure, do I need to use the edit policies and commands?
Also the delete,redo and undo actions can that all be used in a view without an editor?

Enabling selection is done using edit policies. Since you are new to GEF, you can check out my tutorial on the subject. You can also read more information from the sources I have found.
Good luck!

Related

VSCode custom snippets list in activitybar/sidebar - extension recommendation?

Dear fellow VSCode users!
My collection of custom snippets has become rather vast lately, with all of documentation writing that I have to do. And it's becoming kind of difficult to remember all the shortcuts.
I know I can search for snippets and browse their list via the command palette, but it requires quite some extra typing and/or clicking.
Is there an existing extension that would add a new activity bar icon and provide a list of all user-defined snippets in the sidebar, allowing one to simply click on the desired snippet and thus insert it?
I imagine I'm not the only person on the planet to desire such a feature, but I honestly can't seem to be able to find it searching the Marketplace or using Google.
Thanks for all your suggestions.
Just made an extension. Snippets View. Tested only on Windows.
It's not complete yet, but has basic functionality...

qgis preferences in a python plugin

I'm developing a qgis python plugin. This plugin changes the default UI windows displayed (which I've already managed to do) and creates a few new tabs and such. Recently, it was requested that I modify some of the options within qgis. These are what they want me to modify:
Under Settings -> Options -> CRS ... modify the preference to Always start new projects with this CRS. They want me to change that to a specific CRS. They also want me to change several settings under the general tab and the map tools tab.
I have no idea where these preferences live in the API and/or how I can change them. I don't think I need specifics, but if you could give me a general idea of where to look, it would be much appreciated. Thanks!
I figured out the answer here. This mailing list entry: http://lists.osgeo.org/pipermail/qgis-developer/2012-October/022627.html and this http://qt-project.org/doc/qt-5.0/qtcore/qsettings.html were helpful. I ended up going into the windows registry to figure out the names of the options (since that's where they're set when you use store QSettings natively in Windows. It was under HKEY_USERS/myid/Software/QuantumGIS. In there, I just experimented by turning things on and off to figure out what needed to be changed in the plugin. I did that like this.
settings = QSettings(QSettings.NativeFormat, QSettings.UserScope, 'QuantumGIS', 'QGis')
settings.setValue('/Projections/projectDefaultCrs', 'EPSG:2278')
Hope this helps someone else.

Is there a way to create templates for text files in Eclipse?

In Eclipse, I really enjoy being able to create templates for things I commonly write in Java and XML. While there is some room for improvement, templates have proven to be quite the time saver. Today I was documenting some notes in the release notes. We have a specific format that we write said release notes in. I thought it would be handy to write a small template so that I could easily insert most of the boiler plate text when I amend the notes. So I dug around the eclipse settings and didn't see anything for plain text files. I googled around and also didn't see anything.
So is what I'm wanting to do possible in Eclipse? Is there a plugin I would need to enable such a feature?
I assume the closest you can get is using Snippets
Add the view by clicking Window -> Show View -> Snippets. In that view, right-click and select Customizeto create custom snippets. You can now add those snippets in your textfile by double-clicking them.
Maybe there is also some shortcut feature I didn't find yet...

How i can create a toolbar for a specific perspective in rcp?

I am very new to rcp. In my plugin, I have three perspectives and In a perspective, I have 4-5 views, I want to create a toolbar specific to the slected perspective. I searched a lot for this but unable to find any answer, please help me in this.
One solution is to create an extension using org.eclipse.ui.actionSets that contains a set of actions you want to be displayed in the tool bar when a specific perspective is selected. Then there is a extension point called org.eclipse.ui.perspectiveExtensions where you can associated a action set ID (the one you created) with a persepctive ID and that action set is only shown when the perspective is active. In terms of "creating your own tool bar" that is in clear. There is always only one toolbar but based on the perspective/view selection items can be hidden or active.
This thread is dead and the answer posted is no more valid. so it doesn't help me. please refer the link below.
This question is correct, on which no one is responding, after last response. The Last repose which is not correct for the current eclipse development, as actionSets is a deprecated API now. Below link clearly mentions that this is deprecated.
http://help.eclipse.org/kepler/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fextension-points%2Forg_eclipse_ui_actionSets.html
I have same related question and created another thread, which addresses more than this question too. Hope that is helpful.
In RCP Eclipse(Neon) Development, how to enable a created perspective

Learning Eclipse MDT-UML2 Sequence Diagrams

Are there any tutorials or documentation files for drawing Sequence Diagrams with Eclipse MDT-UML2?
I can't put a Lifeline on the page. It took me 10 minutes to figure out that I first have to make a big Iteraction, and then I can put Lifelines into it.
I can't figure out how to make the Participant box wider in the lifeline. Any name more than 4 characters is too wide for the box. When I do the obvious thing of clicking and dragging the handles, the box springs back to its original size.
I can add a Message by clicking "Message" in the pallette and click-dragging an arrow from line Lifeline to another. Now I have an arrow labeled "1: *". I've tried every way I can think of to change that name: double-clicking on it, shift-clicking, ctrl-clicking, changing Name in the properties.
Can anyone help?
As I understand it MDT-UML2 is in the very early stages, it may not work as it should always. Additionally, the sequence diagram is a newer one, see below. There were no tutorial I could find, but I did link to samples below. I also found a comment in the eclipse bug tracker for this feature:
Here are the most important issues from my side: moving of lifelines, create messages,
replies are causing strange behaviour (some kind of auto alignment). Moreover it
should be possible to give the messages names.
They say it is resolved, but you be the judge.
From the wiki (Note:What you want is UML2 Tools):
http://wiki.eclipse.org/MDT-UML2Tools
Interaction diagrams (in progress):
Sequence (new in Galileo)
This may not help, but here is a link to the samples: http://wiki.eclipse.org/images/3/3a/UML2Tools_samples.psf
The tutorial reference does not seem to cover the new stuff, just the class diagram.
http://www.vogella.de/articles/UML/article.html
Search stackoverflow for other open source tools to use. The MDT-UML2 is coming along and can be used for some stuff, especially simple DSMs/DSLs/UML Profiles, but for drawing easily there are a host of good tools. An ok thread: What's the best UML diagramming tool? or
https://stackoverflow.com/questions/390438/good-free-uml-tool-for-java-eclipse