|How to detect that code is running in Development environment or in generic Eclipse using Plugins? [message #1060739]
||Tue, 28 May 2013 09:59
| Ashish Rawat
Registered: June 2012
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.
Powered by FUDForum
. Page generated in 0.18778 seconds