I searched all day long yesterday but i didn't found an answer to my problem.
I would like to hook the workspace selection process of eclipse in order to forbid spaces in the path of the workspace location (typed in the workspace dialog selection launched at startup).
Do someone know how i can achieve this ?
Thank you for your help.
The workspace selection is done in org.eclipse.ui.internal.ide.application.IDEApplication which is the main IApplication class for Eclipse. This does not have any way to change the workspace validation.
The only way to change this would be to define a new IApplication class and build a custom RCP version of Eclipse based on that. I don't think this is possible without accessing some internal Eclipse classes so would violate the Eclipse API Rules of Engagement
Related
This might sound like a stupid question to ask, but I'm curious if it is possible for others to view and reach different user's eclipse projects?
I know there is GitHub, but I have not leashed my workspace to a central source or cloud such as Git. Just a question regarding privacy and security.
Let's say you are coding a program in Java with eclipse and it might contain some sensitive information. Is the project completely safe on your computer? Or are there any settings you need to change in order for it to be secure? Like setting a password on the workspace or so?
Thanks in advance guys.
When Eclipse is started, it asks you for a workspace location. Anyone who has access to that location would be able to view your workspace.
To view your current workspace location go to: File -> Switch Workspace -> Other...
I frequently use folding/unfolding of methods in Eclipse for Java while working. However after each launch of Eclipse I need to redo the settings of folding/unfolding methods. Is it possible to make the framework "remember" my settings in each opened file? By folding/unfolding I meen clicking (+)/(-) button as on the following picture:
Please note I do not want all methods to be folded or all to be unfolded. I want the fremwork to remember my settings.
Although Eclipse doesn't natively support the remembering of folding/collapsed state of its editors, you can use external plugin to do the same. Here's a plugin that might help you with your problem.
Eclipse Folding Plugin
I have a problem with Talend (built with Eclipse RCP): the SVN is checked every second for new files.
After having a look at Talend files, I had isolated a view (class RepoRefreshAction) which seems to update SVN.
I wonder if it is possible that an Eclipse RCP view has a default refresh interval of one second, and if this delay could be changed ?
You can try changing refresh types in Window > Preferences > General > Workspace :
you have :
Refresh using native hooks or polling
Refresh on access
But it's hard to answer your question if we don't know what exactly you want to achieve (is the refresh too fast, and consume too much system resource ?)
Plus, I don't know how the view is made (I believe it's RepoViewCommonViewer or RepoViewCommonNavigator), and which Interface is used (I'm using IResourceChangeListener for listening to workspace changes)
explanation
I have been using eclipse for a few years. I typically use just ONE workspace and have several projects for all of my perforce branches. I close the ones I'm not working on, open the one I am interested in.
The caveat to this approach is that I have to manually close empty editor tabs every time I do this.
Am I approaching this the wrong way?
I'm really not a fan of having multiple workspaces as then I have to setup proejct variables for each new workspace.
Is there a way to associate the currently open set of editor tabs to the current project(s)?
Thank you for your time.
-Dennis
Is there a way to associate the currently open set of editor tabs to the current project(s)?
AFAIK, no. However, you can associate the editors to a task by using Eclipse Mylyn. This way when you switch to an old task, it will set the editors and package exlorer to only show what you worked on the last time.
If you are working with defects from Jira or Bugzilla or a few other systems, these defects can automatically be imported into mylyn and will allow for very easy context switching.
If you dont get tasks from one of the supported repositories you'd have to manually create the tasks, but then just creating a dummy task for each project you work on would create the effect you are after.
The Eclipse content assist for PHP (and I'm assuming for other types as well) isn't using the currently active working set - it's searching ALL files in the project. How do I change it to only use the active working set?
When doing a Ctrl+Shift+R search, it was also looking for all files in the project (not what I wanted), until I clicked the small black triangle in that window and selected the working set I wanted it to use. Now it successfully only shows the files that match my search string in the working set. However, this doesn't change anything in the autocomplete content assist feature (i.e. doing a Ctrl+Space to complete the name of a function or variable). Is there any way to accomplish this?
I'm using Eclipse Indigo release, so it's very recent.
I'm afraid it's not possible the way you put it. Eclipse Working Sets just give you a way to organize your projects.
However you may want to take a look at Mylyn, which is fully integrated with Eclipse platform. Here and here is a nice overview of what you can do with Mylyn. But briefly, what it allows you to do is to create a task and maintain a context associated with it. This way, only the relevant files will be displayed in Project Explorer and autocomplete would suggest you only task-focused options.