I am creating eclipse gef editor using BPMN2 EMF models. Now i am almost end to editor functionality. But i am not clear to implement Cut,Copy and Paste functionality. i searched lot in net but all the tutorials i have seen using clone method in Models. In default bpmn2 models doesn't implement clone interface. Please suggest me any idea to achieve cut,copy and paste in gef editor without cloning.
Thanks.
You could look at the gef logic example:
they use a CopyTemplateAction (standard GEF action) and a custom LogicPasteTemplateAction.
These actions leverage the GEF command framework to istantiate a new Command to create the new model part.
Related
I need to create a custom widget Input control for SAP Analytics Cloud basically the same as native but with more customization. The customization part will be pretty simple and I know how to do it, but I need some ideas on how to start implementing this custom widget. I already am working on a dropdown hierarchy custom widget with SAPUI5, don't really like this approach, but I am open to this. If anyone has any idea or experience in building this, I would much appreciate the help/input/ideas.
Im my application I want to implement the feature of when a user click on a button show a Panel which will consist of some user controls. I know In Java I can easily use Jpanel and use setVisible() method to get this done easily. But this is an MFC application. I couldn't find any built or customized component that I can use for my purpose.
I also tried GroupBox. But it is not grouping the components logically.
What would be the best approach for this?
As user1793036 says, start by creating a dialog resource and CDialog derived class for the panel. In the dialog resource properties turn off the Title Bar style. In the code call Create for the dialog and then SetWindowPos to place it where you want it to appear.
MFC is nothing but a thin wrapper over Win32 API for windows and controls. The core Win32 API doesn't provide any feature to group controls in a group-box or panel. One way is to have a window and make that window parent of all required controls. Unfortunately, this isn't easy to do.
I suggest you, since you are learning, to drop the idea. Instead, learn what you can achieve with existing set of features provided by MFC/Win32. With MFC/Win32, you would, mostly need to derive/subclass a class/window to get something fancy (such as colored list-control).
Is there a good Eclipse editor plugin that would open the view, model and controller class files in one editor with each file having its own tab? E.g. if I have classes FooView, FooModel and FooController and opened one of them, it would open an editor with all of those 3 classes (with an "internal" tab for each of them).
I have used the now discontinued Wicket Bench plugin (which opens related files on their own tabs based on the file extension) when working with the Wicket framework and would love to have something similar when working with MVC classes. (Since the plugin's page is now infested with spam, the only proper screenshot I could find is in the SVN repository: http://svn.laughingpanda.org/svn/wicket-bench/trunk/wicket-bench/docs/wicket_editor.jpg)
I was thinking of writing a plugin like this but would of course love to hear it already exists. I've tried to find one but I guess none exist or my searching skills just need some polishing... However, I think this kind of editor would also help with this problem:
Eclipse PDT Differentiating file name tabs for MVC?
Thank you for any tips.
We're working on creating a specialized graphical editor for our enterprise applications. We've looked at and rejected DSLs. Ideally I'd like to have the main interface of the editor be docked like the code windows and use WPF for drawing. Can anyone point me to some documentation to get me on the right path?
Thanks.
Colin.
UPDATE: It's beginning to look like "no." From http://msdn.microsoft.com/en-us/library/bb166228.aspx: "Document windows are created by implementing an editor. The IVsEditorFactory interface creates document windows as part of instantiating an editor. For more information, see Accessing the Editor By Using Legacy Interfaces."
Following the link to http://msdn.microsoft.com/en-us/library/dd885127.aspx gives this this bit of advice: "You can access the Visual Studio editor from legacy interfaces. The Visual Studio SDK includes adapters known as shims, which enable these interfaces to interact with the new editor. Nevertheless, we recommend that you update your legacy code to use the new editor API. Your code will perform better and you can use new technologies such as the Windows Presentation Foundation (WPF) and the Managed Extensibility Framework (MEF)."
So, to sum up: if you want to implement an editor you have to use the legacy interfaces, but you shouldn't use the legacy interfaces because then you can't use WPF or MEF.
Seriously Microsoft, WTF?
UPDATE 2: Now that I have the proper names ("custom editor"), I was able to find the following topic: http://social.msdn.microsoft.com/Forums/en-US/vsxprerelease/thread/9e605d0f-1296-47c9-a534-e54905251ebe
I still don't see why they couldn't have included that somewhere prominent in the MSDN docs. You know, like somewhere near where they tell you that you can't use WPF if you're using the legacy interfaces.
Creating a custom editor doesn't have to be terribly painful. Yes, a custom editor will require implementing a few interfaces, but you can still use WPF to actually create the control that is hosted in the VS document frame.
DiveDeeper's blog has some great resources for learning about creating a custom editor.
Creating a simple custom editor - the basics
Creating a simple custom editor - the first 10 meters
Creating a simple custom editor - under pressure
I'd recommend using a library like VSXtra to do a lot of the work for you. It will provide you with a nice base implementation of an editor factory, editor pane, package, etc. Istvan Novak writes about building a custom editor with his VSXtra library in this blog post.
I'm making a Cocoa application, and I would like a panel like the 'Attributes Inspector' in Interface Builder. So with big tabs on the top and collapsable/expandable groups. Does anyone know how I can do this?
This is an image of the Attributes Inspector:
Attributes Inspector http://developer.apple.com/documentation/DeveloperTools/Conceptual/XcodeQuickTour/Art/hello_win_attributes.jpg
So I actually want to make a window like the one shown in the image above.
InspectorKit is FOSS on github.
There's no built-in Cocoa controls to do this. You're going to have to write some custom views which replicate the functionality.
There some good advice for creating custom controls in the answers to this question: Looking for info on custom drawing of interface components (Cocoa)
If you need additional help, I recommend you ask smaller, more specific questions explaining what you've tried and what hasn't worked.
I've written some custom classes to do this- it ended up being less work than I expected. I broke it down into two separate components which can be used independently- the first handles the icons at the top and performs the view switching and the second handles the expandable panes:
My code is available at github and is under the BSD 2-clause license.