i am working with eclipse oxygen, i download pydev 6.3.2 and this was added to eclipse.
Now i want add Pydev in my custom rcp application, i read vogella book but i can't figure out how do this.
If anyone have the tip of the iceberg where i can start i will be thankful.
I have a e3 rcp application with Pydev Perspective already working but i want updated the technologies that i am working now that is i why start with e4.
In e3 i add the pydev plugins trougth Windows, Preferences, Plug-in Development, Target Platform.
Then i added in Dependence Tab in plugin.xml the "com.python.pydev.*"
Last step was create an button and in the handler put the next code
public class ShowPydevPerspective extends AbstractHandler
{
#Override
public Object execute(ExecutionEvent event) throws ExecutionException
{
ViewUtility.OpenPerspective("org.python.pydev.ui.PythonPerspective");
return null;
}
}
When the app run and click on the button the pydev perspective appears with all the context.
I try to do the same steps in e4 but is not working.
I added in my plugin.xml , dependece tab all
org.python.pyedev.*
org.eclipse.ui.*
I added too a button with the code that i mentioned after.
I have the following error, has you see in the image attached.
pydev integration error
Regards
PyDev is written for e3 and won't run in a pure e4 app. If you want to use this stick to an e3 RCP.
You can't just include org.eclipse.ui.xxx plugins in an e4 app {with one or two exceptions) - these are 3.x compatibility mode code and require a lot of setup that e4 doesn't do.
Related
I just added 2 perspectives in my RCP App. I can switch from one to another without problems.
But I didn't find a way to reset perspective, for example if I close a Part excidently I need to reset my perspective.
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().resetPerspective();
this didn't work because I use E4.
-clearPersistedState -persistState false
is not a solution cause I need to reset without restart my App.
Use the resetPerspective method of EModelService:
public void resetPerspectiveModel(MPerspective persp, MWindow window)
Note that PlatformUI and associated APIs can't be used in a pure e4 application.
We have a large RCP based on Eclipse 3.7 that we want to migrate to Eclipse 4. We were able to build the system successfully using the compatibility layer.
The Problem: We use our own WorkbenchPresentationFactory-Implementation that in turn uses a specialStackPresentation:
public class PresentationFactory extends WorkbenchPresentationFactory {
public PresentationFactory() {}
#Override
public StackPresentation createEditorPresentation(Composite parent, IStackPresentationSite site) {
return new SimpleStackPresentation(parent, site);
}
}
This SimpleStackPresentation is basically a copy of the original Eclipse 3.7 StackPresentation and accompanying "helper" classes altered so that there is always only one editor visible at a time, editors are never closed but hidden.
Now, the use of a PresentationFactory is deprecated officially in Eclipse 4, see:https://www.eclipse.org/eclipse/development/porting/4.2/incompatibilities.php#presentationAPI
Were do I start to implement the same behavior with Eclipse 4 in conjunction with the compatibility layer?
Any help is very much appreciated!
Regards
sascha
I recently installed Java 8 64 bit version on my machine and installed Eclipse Luna version 4.4.2 64 bit.However when I programme a java application,the IDE not showing auto suggestions to use Java 8 features like use lambda expressions instead of anonymous inner class.The code I have used is given below.As my reputation is low I am not able to post images.
public static void main(String[] args) {
Thread t=new Thread(new Runnable() {
#Override
public void run() {
System.out.println("Run method called");
}
});
t.start();
}
Works fine for me in Eclipse Luna 4.4.2. I press Ctrl+1 when staying on new Runnable:
Seems that there's no way to mark it as warning (yellow lightbulb). However you can switch on a save action for lambda. Go to Preferences -> Java -> Editor -> Save Actions, check "Additional actions", press "Configure", go to "Code style" tab and check the "Convert functional interface instances":
This way all the anonymous classes which can be converted to lambdas will be converted automatically upon you press Ctrl+S. You can also make this conversion for the whole project at once: select the project in Package explorer, right-click, Source, Clean up, Use custom profile, configure and check the same checkbox.
I have a question regarding e4 rcp applications.
I am creating an Eclipse e4 RCP project which uses the compatibilty layer.
Basically I created an 3.x RCP project, a product and an Application.e4xmi to use e4 features in my 3.x RCP project. I did this to be able to use the compatibilty layer for stuff like the project explorer, the console etc....
I started with that tutorial: http://dirksmetric.wordpress.com/2012/08/01/tutorial-eclipse-rcp-e4-with-3-x-views-like-project-explorer-properties-etc/
and now I'm migrating my own plugins from 3.x to e4.
Till now that worked out pretty well. I can still use a multiparteditor from 3.x but also dependency injection for some parts. Now I'm facing a rather odd problem.
My Application has a Trimmed Window with a Main menu some parts and then there are the TrimBars...my problem.
The toolbar I create there is not shown if I choose the 'top' side...every other side is working.
In a pure e4 Application that is working fine. I'm not sure why...maybe you have an idea.
Thx.
After you have created your RCP application, you should have class ApplicationWorkbenchWindowAdvisor (extends WorkbenchWindowAdvisor) created for you. It has preWindowOpen() method overridden with IWorkbenchWindowConfigurer.setShowCoolBar(false). Change it to true:
public void preWindowOpen() {
IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
configurer.setInitialSize(new Point(400, 300));
configurer.setShowCoolBar(true);
configurer.setShowStatusLine(false);
configurer.setTitle("RCP Application");
}
Make sure that your XMI file defines the 'TOP' TrimBar with the id 'org.eclipse.ui.main.menu', there's currently some dependency on the handling code that requires this (i.e. it finds the trim bar by ID rather than position).
In Flash Builder 4.6's code assist, there is this extra box on the right of the classes, outlined in red, (image: http://oi42.tinypic.com/rqyuqq.jpg) that pops up when using the default Flex SDK. What is it called?
I find this feature very useful and wondering where I can get more information to implement a similar one in another Eclipsed-based IDE that I'm using.
this window is called JavaDoc View
http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Freference%2Fviews%2Fref-view-javadoc.htm
any developer that uses the eclipse IDE knows this windows, it's shown the javadoc content of selected element,
it's part of Eclipse Java development tools (JDT)