- This topic has 7 replies, 4 voices, and was last updated 15 years, 2 months ago by Riyad Kalla.
-
AuthorPosts
-
phillrobertsMemberI’ve completely moved from windows to linux (ubuntu, if you care to know) and am using myeclipse. In windows, I could use the “Open in Explorer” item under the MyEclipse menu when you right-click on a project and it would open up a windows explorer window to the directory of the resource I selected.
There is no windows explorer in ubuntu. Instead we use Nautilus. Is there a way to configure what application is used for the Open in Explorer option?
My environment includes:
Ubuntu (Jaunty 9.04) x64
MyEclipse 7.5
Java 6Any help would be appreciated…
Thanks,
Phill
support-joyMemberPhill,
You can add new browser, to do that from MyEclipse IDE menu options click on menu option Window > Preferences > General > Web Browser.
Attachments:
You must be logged in to view attached files.
phillrobertsMemberJoy,
I’m not talking about INTERNET EXPLORER. I’m talking about <b>Windows Explorer</b>. You know, to browse the c: drive?
This is the menu I’m talking about.
I don’t want to open up windows explorer, since I’m not using windows. I’m using linux. I want to set be able to specify which program opens when I select “Open in Explorer”. For my case, ‘Explorer’ would be the Nautilus application. How do I change which program is run when I select that menu item?
Thanks,
Phill
Loyal WaterMemberPhill,
I’m afraid this functionality is only supported on Windows.
phillrobertsMemberI’m afraid this functionality is only supported on Windows.
Can you point me to where this feature is implemented? Somehow, I don’t think that linux support for this is at the top of the list of fixes and I’d be glad to give a go at fixing it.
phillrobertsMemberOK, think I found it…Can you confirm that it’s in the Desktop plugin: com.genuitec.eclipse.desktop_7.5.0.zmyeclipse75020090612.jar
There’s an explore(File file) method in the DesktopUtil class that’s using the Shell32 class to open files and directories.Instead of using Shell32, you could add a preference to the preferences page where a user could specify which application to use and use the java runtime’s exec method to execute it. This would work on both windows and *nix platforms. In my case, the property would point to the location of ‘gnome-open’ or ‘xdg-open’…
e.g.
<pre>
public static void explore(File theSelectedFile)
{
if(theSelectedFile == null)
return;
String preferredApplication = “”; // Get path to the preferred application from a properties file or the plugin preferences.
File target = theSelectedFile;
if(target.isFile())
{
target = target.getParentFile();
if(target == null)
return;
}
try
{
Runtime.getRuntime().exec(preferredApplication + target);
}
catch(IOException e)
{
warnException(e);
}
}
</pre>Any chance I could get a hotfix for this?
phillrobertsMemberFor anyone experiencing the same problem…
I can confirm that the above jar is indeed the plugin that handles opening a file/directory and that the fix really IS that simple…well, for the most part. I removed all references to Win32 in favor of the Runtime class’ exec() method, recompiled the class and replaced the DesktopUtil.class file in the jar. I can now use the “Open in Explorer” feature under eclipse with no problems. Mind you, I just hard coded the path to xdg-open. I didn’t update any of the myeclipse preference pages, which really is what should happen IMHO.
There is one caveat. Removing the Win32 dependencies meant that I couldn’t use the “Send to Mail Recipient” feature as it also depends on Win32 and MAPI. No big deal for me cause I’ve never used that ‘feature’ before and don’t intend on starting now. In any case, I’m sure the implementation could be replaced without using Win32 dependencies, but I’m not really interested in that exercise right now.
If there are any java devs out there working in a linux environment and need help with this, let me know and I’ll be happy to help.
A note to Genuitec.
Let me preface this by saying that I am very thankful for the work genuitec has done with bundling the set of plugins that make up myeclipse. I use myeclipse everyday and have been much more productive with it than without. So thank you! That said…
Honestly, this was a pretty simple thing to fix. I’m surprised that you ‘support’ all these different platforms but use a windows specific api to implement something that could be implemented in a platform independent way. I sincerely hope this gets fixed in the next release. I must confess that I’m left wondering if there’s anything else I’m missing because I’m using linux.Next fix? ALT-SHIFT-W,P works in windows, but not in linux. Why oh why would that be platform dependent? (an eclipse thing, not a MyEclipse problem).
Riyad KallaMemberHonestly, this was a pretty simple thing to fix. I’m surprised that you ‘support’ all these different platforms but use a windows specific api to implement something that could be implemented in a platform independent way. I sincerely hope this gets fixed in the next release. I must confess that I’m left wondering if there’s anything else I’m missing because I’m using linux.
Phill, while officially I have to say that decompiling MyEclipse is against our license agreement, unofficially-speaking, thanks for digging into this an surfacing this annoyance. It’s always an issue of priorities and this code was written back in MyEclipse 4 and hasn’t changed since. I think it’s time we change it 😉
I’ll see if we can get this implemented a bit nicer in MyEclipse 8.0M2 for you guys.
-
AuthorPosts