I'm developing two GEF plugin and one RCP eclipse plugin, I have the next problem:
I have one plugin with multitab editor and i would like to open the editor of plugin on first tab and open the editor of second plugin on second tab.
I mean if I open the file in first tab it uses the editor A, but if I open the same file in second tab, it uses the editor B of second tab.
The rcp pluging only serves as a base for GEF plugins.
is it possible?
regards
I haven't tried it, but you can use the extension org.eclipse.ui.editors.documentProviders in order to implement your logic. Here is a link of the eclipse online help.
EDIT: The problem you would have is to synchronize the both instances, when you open them.Or you can use one with change listeners
Related
I have a eclipse-rcp application developed with Eclipse 4. This application is modularized with several plugins and features. This application is built with maven-tycho using pomless. The project structure follows the guidelines proposed by vogella for Eclipse Tycho.
This project has a main Application model defined in the plugin app.rcp (Application.e4xmi). It has several plugins that extend this application model through several fragment.e4xmi files. Specifically, in one of them, I modify the application model to add a menu to the application main menu with the following line in the frament.e4xmi:
Extended Element-ID: org.eclipse.ui.main.menu
Feature Name: children
Position in list: index:1000
This model fragment allows me to add menus, handled menus and so on without any problem through the Eclipse 4 model editor.
At this point, my objective is to build a separate feature, which is not in the same project, to add a similar menu to the application main menu, which will be installed in the original application using a p2 update site.
For this, I have created a plug-in with an application model fragment (fragment.e4xmi). I try to modify the file with the Eclipse 4 model editor pushing Find... of Extended Element-ID field. However, when I select Menu in Container-Type, there is no item that I can select. In the other plugin I can select the Main menu (org.eclipse.ui.main.menu) and other created menus.
I have tried to add dependencies to the plugins of the main application. The project compiles in the command line (mvn clean verify), but in Eclipse IDE it shows that it cannot find the plug-ins of the main application.
EDIT:
The problem here is that the combo to add Menu, MenuSeparator, HandledMenuItem, etc is disabled, so I have no way of adding any of it. When I push the add button, it does nothing. I have tried to use a text editor to change the fragment.e4xmi file directly, but I haven't been able to test if that works.
The combo box that I refer to is located below the "Position in list" field of the model fragment ( see Model Fragment editor image)
You must add the menu to the 'Imports' section in the fragment.e4xmi to make the 'Find' dialog work.
You can also just add the id manually, it should still be resolved properly when the model is being loaded.
I'm new to IntelliJ, coming from NetBeans. In NetBeans, on the bottom left side of the window, under the list of files in the project, there is a list of methods/fields in the current class.
With IntelliJ, I found that same window using CTRL+F12, but it's a popup. I'd like it to sit permanently on the bottom left instead. How can I do that?
You can open it by View->Tools windows->Structure
Alternatively you can press ALT+7 (Tested on Ubuntu).
ALT+7 (⌘7 on Mac) shall show up Structure which lists all the methods of current class open in editor.
You can get familiar with IntelliJ IDEA from this official tutorial
I'm quite confused when it comes to file templates in IntelliJ. Basically, when I right click anything and hover my mouse over to New, I can see the usual file templates like Java Class, HTML File and so on. I downloaded Scala plugin and I can see Scala templates (Scala Class, Scala Object, etc.) if I go to Edit File Templates, but I can't actually use/see them in the New menu. Is there a way to modify what I see in the New menu? I'd like to be able to create Scala classes.
Go to Settings -> Menus and Toolbars
There you will see many type of menus. You need edit the menu you want the files to be displayed. Most Probably "Project View Popup Menu".
Click on "Add After" button on right. There you choose the file form plug-ins or other category to be displayed.
I added "Show Bytecode" to meny well it does not make sense here. You can add files from scala plugin like that.
You can restore to Defaults if you mess up easily by clicking on
"Restore All Defaults" button.
I created some batch work and integrated it as ExternalTool to the IntelliJ IDEA. as described here: Configure Intellij IDEA to run batch file
But how can I add buttons to my toolbar that will activate the batch that defined as external tool?
It is quite easy.
Assuming that you already have an External Tool configured just right click on the menu bar and choose Customize Menus and Toolbars...:
Next step is to mark the last item (whatever that is in your setup) in Main Toolbar and select Add After...:
Now you can select your external tool from the Choose Actions To Add window (here you can also select an icon to use):
Action has been added:
And your button has been added to the toolbar:
Can someone tell me how to open two or more file editor in eclipse kepler?
In before version like helios it can be open by shortcut ctrl + 8.
Which looks something like this in helios
But in kepler I am not able to do this.
Open your file and then Window -> New Editor
I see that in Kepler this feature hasn't a shortcut binding anymore. You can make this yourself by going to Preferences -> General -> keys and search for "new editor". Then click Binding and press the shortcut you want.
You can achieve this indirectly, like first opening both the files then click on your file header in your editor and just drag towards the right.
Eclipse will automatically creates two seperate views like you have shown.
Window / New Editor opens a second editor. It does not seem to have a default key binding.
When the second editor is open drag the tab to open the windows side by side.
What command is Ctrl + 8 bound to in your workspace ? I've looked at 3.8.2 but can't find it (even though I do vaguely remember doing something like this).
There is a way.
Window -> Editor -> Clone
Drag out window to console and it will divide in two parts ..then put both editor side by side.