Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » How to detect that code is running in Development environment or in generic Eclipse using Plugins?
How to detect that code is running in Development environment or in generic Eclipse using Plugins? [message #1060739] Tue, 28 May 2013 05:59
Eclipse UserFriend
Hi,

I am developing some plug-ins. The issue that I am facing is, there is some piece of code which I want to execute, if and only if the plugin is installed in Eclipse. While developing the plugin that code shall not execute.

This is the case where, I have some files which I am extracting to the project directory. Now if in development environment I run the code, the files get copied or overwritten because of that block of code. I want to block this extracting feature in development phase. But want this to be available when any user extracts or installs the plug-in in eclipse.

Do any one have idea, how I can achieve this?

I have already tried following implementations:
1. Adding flag via VM arguments. This did worked but I do not want to force every developer to add this argument in their development environment.
2. Comparing paths if it is from "jar:" or from "file:". In both the cases I find the path starting from "bundleresource:". This also didn't worked.
3. System.console(). In both the cases it returned "null".

If there is any other way to fix this issue, please help me with it.

Regards,
Ashish
Previous Topic:Access an Eclipse RCP Application from an external Java program
Next Topic:actions form contextmenu executed twice
Goto Forum:
  


Current Time: Mon Jun 16 19:21:25 EDT 2025

Powered by FUDForum. Page generated in 0.03595 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top