I want to manually test some features of a plugin I'm developing. To do so, it'd be nice to be able to create some projects in the test Eclipse instance and have them stay throughout all my testing season. At the moment it seems that Eclipse insists on clearing the Eclipse Plugin workspace. Is it possible to invert its default behavior?
Thanks
Open up the launch configuration for this launch
On the Main tab, unclick Clear so the workspace remains across launches (alternatively, you can select Ask for confirmation... so you can choose each time).
As far as I know, there is no way to mark this as the default.
Related
This might be considered a minor thing, but I'm curious how you typicially solve following situation (if this is even a common use case): We have a project with dozens of practical Launch-Configurations for everyday use. Depending on which part of the application you work with, different launch configurations are interesting. To filter these, we use the favourite setting of eclipse. Those, who are needed where added to favourites, others removed.
Unfortunatly the favourite state is written within the launch configuration file, so SVN recognizes changing the favourite state as a change, when synchronizing a project. Since everyone usually needs different launch configurations at a specific time, this isnĀ“t considered a desired behaviour.
Is there any way to work around this? How do you typically manage your launch configurations for a project?
It is recommended to share only a few and only very important launch configurations that are marked as to be displayed in a favorites menu (see Common tab in the launch configuration):
To add a shared launch configuration to the personal favorites menu, you have following options:
Add the shared launch configuration to the favorites menu but do not commit the changed .launch file
Duplicate the launch configuration and change Save As to Local File (see Common tab)
Wrap the shared launch configuration in a new Launch Group launch configuration
Alternatively, launch configurations can also be shared in a separate repository, outside of the associated project.
I use IntelliJ IDEA and want that my class should be redeployed after I make changes. Eclipse can do this. How does this work in IDEA?
I know that in the run configuration there is "On frame deactivation" and I set it to "Update classes and resources", but this does not work.
Do you hit the "redeploy" button every time you made a change in your class?
There are limitations to class reload, in any Java project. It also depends on what you're using to perform this reload (if you're using a servlet container, etc).
By default, IntelliJ uses HotSwap for its reloading. There are some limitations to it though:
At the moment due to original limitations of Java SDK the HotSwapping is possible ONLY if a method body is altered. In all other cases (like changing method or class signature), the class reload is impossible and the corresponding error message appears.
That said, the instructions for configuring your application to reload can be found here.
To configure reloading behavior
On the main menu, choose File | Settings , and then expand the Debugger node.
Open HotSwap page.
Click one of the radio buttons in the group Reload classes after compilation. You can opt to always reload classes, reload after
confirmation, or never do it.
Take a look at HotswapAgent configuration for InteliJ IDEA
Is there any method in SWT to programmatically set my plugin as default whenever the eclipse IDE starts i.e. when the eclipse starts a desired plugin is set as perspective.
If I remember correctly, it should be possible with setDefaultPerspective(String id).
You can access this via:
PlatformUI.getWorkbench().getPerspectiveRegistry().setDefaultPerspective(id);
However, be careful when doing this. I can imagine that a lot of people might uninstall your plugin, just because they are annoyed by this small change.
I am currently using Eclipse for both Java and Python (with PyDev). I often find that I have one Java project open with lots of files, and then for some reason I have to switch to a Python project for a bit.
I want to leave my Java project the way it is, and I don't just want to open tons of Python files in the same place because then I have too much open at once.
Is there any way I can leave my Java project exactly the way it is, and open a completely new session of Eclipse? (sort of the way you can do with a browser)
If you want two instances accessing two workspaces, just run a second copy of eclipse
If you want two windows accessing the same workspace, you can create a second window with Window -> New Window
Yes, you can. Otherwise, no one could develop an Eclipse plug-in.
You have to uncheck the default workspace on startup. You can't have two instances of Eclipse referencing the same workspace.
Yes, you can have two instances of Eclipse running at the same time. However, they can't both access the same workspace at the same time. If you try to do this, the second instance will complain about it on startup and ask you to choose a different workspace.
Also bear in mind that Eclipse tends to be a very memory-hungry application. Running two at once may put a significant strain on your system.
This is what I did.
Go to the folder from where Eclipse is installed.
Click on eclipse Application once.
When it asks to select workspace, 1st go back to directory and click on eclipse application again. It will ask for another workspace selection dialog.
Now you can enter 2 different workspace and work simultaneously.
As long as each project uses its own workspace, yes, you absolutely can. This assumes that your system has sufficient memory and CPU resources to accommodate multiple instances, of course. (I do it all the time!)
I was able to debug two simultaneous instances by copying the whole workspace folder and running a new copy of eclipse using that folder.
If you want to open different work spaces with different projects then Window -> New Editor; here you can open different work space with different project.
I just started using eclipse for some personal projects and am finding the transition from IntelliJ (what I use at work) kind of annoying. I hope it's kosher to ask a few different questions in the same thread. Here goes:
1) How do I get "views" (I'm not sure if this is the term. I mean windows such as Project Explorer, Servers, Console, etc) to stay expanded and on top even after I've clicked back on the editor or another view. I'm pretty sure that right now all of these tabs are "quick views" that I have minimized and then docked, so I may not be doing this right to begin with. In IntelliJ, I would simply just pin the tab.
2) How can I open a file (for instance, an ant build.xml) without having to make it part of an eclipse project? I want the syntax highlighting and Ctrl-click ability that the IDE will give me (not to mention being able to use eclipse's built-in ant), but I don't need to associate the file with any others and so don't see the point of having to make it a part of a project.
3) Is it just me (wouldn't be surprised) or does eclipse have a bug with parsing empty html tags within the body of html tags of the same type. I've only tested this in a JSP, and it doesn't happen with JSF tags. For example: <div id="foo"><div id="bar"/></div>. Eclipse will give a warning saying the first div tag has no end tag. This is with the most recent version of eclipse for Java EE, no plugins have been installed.
4) Finally, a general question: Any best practices or resources to look at for organizing the eclipse interface and perspectives/views? What about workspaces/projects? Is there some tutorial out there that would be really informative that I could read through in less than an hour?
I appreciate any answers and tips/tricks.
First of all, please acknowledge that there are different people in the world and there are people who don't work the "Eclipse way". Even if I was paid for it (and I am), I couldn't work with IDEA. So if Eclipse rubs you the wrong way, it may not be for you. That out of the way, your answers:
In Eclipse, you open a view and let it stay where it is. In IDEA, the view changes all the time, things pop up and go away. Eclipse is static unless you specifically move things around. There are two ways to move things: You can minimize a part (a part is something which contains tabbed views). This moves the part into the closest border. Or you can maximize the current part (Ctrl-M). This pushes all other parts out of the way. Another Ctrl-M will restore the view.
This is a good place to show the difference between IDEA and Eclipse. IDEA tries to anticipate what you're doing and to be helpful. For me, this means it always gets in my way. It will start to format source as I type, things move, etc. That freaks me out. Eclipse is like a toolbox. Everything is there but you have to pick it up. A toolbox doesn't move on its own accord and it doesn't try to be smart.
Eclipse is based on the idea of a workspace. The workspace is the universe and nothing outside exists. If you need to go outside, you must first create a file or folder. In the "New File/Folder" wizard, you can open the advanced options (at the bottom) and link this resource to a real file/folder in the file system. May sound like a lot of effort but it allows Eclipse to display virtually anything in the explorer since it just shows "resources" in there, not actually files.
Smells like a bug. Please report it at https://bugs.eclipse.org/bugs/
I'm not aware of anything.
[EDIT] 3. As cletus pointed out, is not valid HTML. So that might cause the warning.
An Eclipse Perspective is a collection Views and their position. You can customize or create new perspectives, but the existing ones are good enough for a start (Java, J2EE, Java Browsing etc.). I recommend to stick with the default layout for a while until you've managed to use the quick view feature (which, personally, i find quite annoying). On small screens, i simply like to use Ctrl-M to switch the Editor to fullscreen mode and back, without the need of minimizing single views or move them around.
Yes, you can run external build scripts as well and it's called External Tool in Eclipse. Go to Run > External Tools > External Tools Configurations. Create either a new Ant-based config or a native executable (Program). The location of the build script or executable can either be workspace-relative (Browse Workspace) or absolute on the file system (Browse File System)