Opening compare editor results inside a wizard page - eclipse

In my custom plugin I am trying open compare result inside a wizard page but they always open in an editor or as a new dialog.
I am overriding setVisible(booolean)method, so as soon as wizard page is visible I am opening compare editor using CompareUI.openCompareEditor()call, but this opens up a new editor in the background.
Is it possible to open compare editor results inside a wizard page.
Thanks!!

There is no existing support for this.
You could read the source of the dialog that is displayed by openCompareDialog.openCompareDialog - this is org.eclipse.compare.internal.CompareDialog.
It looks like it might be possible to do the same thing in a wizard page without using internal classes by adapting what that dialog does.

Related

How can I use a non-IFileEditorInput as the default EditorInput in my plugin?

I am in the middle of creating an Eclipse plugin that will open an editor. Everything is mapped out well - my plugin.xml is set up correctly to open the editor for anything with the .xyz extension. The only thing holding me back is the IEditorInput.
I have a subclass of IEditorInput that I created for use with my editor. When I open the editor programmatically, I can create that EditorInput and open the editor correctly. However, when I open the editor using Project Explorer (Right click > Open With > My Editor), it is opened with a FileEditorInput.
How can I change the default behavior of Project Explorer to create the correct IEditorInput? Is there something in plugin.xml that I'm missing?
Thanks!
The editor doesn't get to choose the kind of editor input object it's given. It can use a IDocumentProvider to support different kinds of IEditorInput, but you should never artificially limit your editor to working with one kind of input, even if you do manage to change how the Project Explorer works.

Eclipse GEF graphical editor without header

I am developing RCP plug-in with GEF framework.
I've created basic graphical editor (GraphicalEditor and IEditorInput)
IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
page.openEditor(new TEditorInput("T"), TGraphicalEditor.ID,false);
When I run the application I get editor with a header that contains the tab with the name of the editor and control buttons to maximize and minimize the editor.
What I need is to display just the editor, without the header.
Can it be done?
To my knowledge, it is not possible to just hide an editor's tab.
However, you can try two workarounds:
Have your GEF editor be displayed in an Eclipse view instead of an editor and open such a view as a standalone view. An example of how to open a GEF diagram in a view can be found in GEF's Directed Graph Example. An example of how to open a view as standalone can be found in one the Eclipse RCP official tutorials.
Extend the presentation factories extension point to control how workbench parts are displayed (which includes control over the part stack tab).
I suggest you try the first approach, as to me it seems easier to implement.
The idea with editors is that you can instantiate them multiply for different editor inputs. I am not aware of any way to restrict the number of open editors to just one (well, it appears you can in Eclipse 4.2 if that helps you)
For views, what you want can be done by setting the perspective to fixed and set showTitle of the org.eclipse.ui.perspectiveExtensions extension to false on the view. Maybe you can use a view instead of an editor and control the editor input yourself?
(For example, using an editor, the default Open action would instantiate a new editor, while you probably want to replace the contents in your only editor, right?)

JQueryUI Dialog TinyMCE Issues

i am having some problems with the TinyMCE (V3.4.7) and JqueryUI (V1.8.14) Dialog
the following Fiddler link shows my example purfectly here
What i am trying to do is open a JqueryUI Dialog box with a TinyMCE WYSIWYG Editor in it.
the first time it displays properly. but if you click close and then reopen the box it will not show the Editor but just the TextArea.
Any help would be good. Thanks
Update
I did find out a solution that works for me, i have put up the working code here
What i am doing is check to see if the dialog has been opened before and if so just open it, then in the Open Function i test to see if the box contains an element with id_parent
if it does then this will be the editor (so do nothing) otherwise just init as usual.
it seems there is a problem with the JQuery Plug in as it does not remove the elements when you call tinyMCE.execCommand('mceRemoveControl',false,'editor_id') and when you re-add the editor it attaches to the first box available.
Problem here is that you need to shut down tinymce correctly in order to open an editor with the same id.
Use:
ed.execCommand('mceRemoveControl', false, 'editor_id');// editor_id equals the id of your textarea

How to associate an Eclipse sample Editor with a file in project explorer view

I have an sample editor which opens up by selecting an action from a sample Menu created in the menu bar.
How do i associate this editor with a file in Project explorer view?
I mean if i double click on the file in project explorer view , the editor should spawn up.
Basically i want this editor to work like a regular eclipse editor.
Please let me know your suggestions or any online material which explains the framework on how to achieve this.
Thanks,
Karthik
Have a look at IWorkbenchPage.openEditor(IEditorInput input, String editorId). Here you specify the input object of the editor and the ID for the editor.
In a RCP application, the IEditorInput is usually made up by you - nothing fancy is needed unless you want to persist the editors - and ID is specified via the org.eclipse.ui.editors.

Eclipse Plugin Development : Open popup on an action

I have created a right click menu item. On its click I want to show a small popup filled with certain values. Any idea?
Take a look under SWT snippets for instructions on opening new windows of various kinds.
http://www.eclipse.org/swt/snippets/
Look under the Shell section.