views:

21

answers:

3

We use a lot of workspaces, and frequently switch between them. I was wondering if there is a trick that can allow me to simply click a workspace in Windows Explorer and have Eclipse started on it.

A "create shortcut for Eclipse" creator might also be interesting, but I was envisioning perhaps a special name for the workspace triggering this behaviour?

Suggestions?

(Edit: I am aware of the --data switch, but I'm looking for the bridge to Windows Explorer which may use that switch)

A: 

You can run Eclipse with a parameter do specify the workspace. I think it's -data - but check the documentation. So then you can just make a bunch of desktop shortcuts, one for each workspace.

Documentation can be found here

dty
A: 

Maybe you could look at Yoxos 5 Beta. It is said to provide the shortcut functionalities - on the other hand I have never tried it.

Zoltán Ujhelyi
A: 

I guess you are under Windows. Just in case someone would have the same problem but under Linux environment, i had the same question and am using right now a simple shell script which behaves like an "eclipse workspace launcher". It shows me all my workspaces, with the number of projects contained in each workspaces. So i can easily launch one dedicated workspace.

My folder structure is just something like :

~/java/workspaces/eclipse/workspace1/project1/

~/java/workspaces/eclipse/workspace1/project2/

~/java/workspaces/eclipse/workspace2/project3/

and so on. This then gives something like :

alt text

The script only needs the Linux "Zenity" package (Gnome) and should run on any shell interpreter :

#!/bin/ksh

windows_title="Eclipse Launcher"
WNG_ICON="/opt/gnome/share/pixmaps/gnome-warning.png"
ECLIPSE_ICON="/opt/Eclipse_DEV/Eclipse-V3-2-1/icon.xpm"

WORKSPACES_DIR="<path_to_my_workspaces_directory>"
WORKSPACES=""
ls -1d "${WORKSPACES_DIR}"/* | while read ITEM
do
        WORKSPACE_NAME="$(basename ${ITEM})"
        WORKSPACE_COUNT=$(ls -1d "${ITEM}"/* 2>/dev/null | grep -v total | wc -l)
        WORKSPACES="${WORKSPACES}${WORKSPACE_NAME} ${WORKSPACE_COUNT} 
"
done

ret=`zenity --list --width="280" --height="410" --window-icon="${ECLIPSE_ICON}" \
--text "Choisissez le workspace" \
--column "Workspace" \
--column "Projets" \
$WORKSPACES --title "${windows_title}"`

if [[ ! -z $ret ]] ; then
        export JAVA_HOME="/<path_to_java_home>/"
        export GTL_MODULES="";
        cmd='<path_to_eclipse>/eclipse -showlocation -data "'${WORKSPACES_DIR}$ret'" -vm '${JAVA_HOME}'/bin/java -vmargs  -Xss4m -Xms256m -Xmx384m -XX:PermSize=256m -XX:MaxPermSize=256m'
        eval $cmd
fi

Otherwise, as stated above, Yoxos seems indeed a good choice (i've just discovered recently about this project on my own).

Sergio