Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 09:59
Ashish Rawat is currently offline Ashish RawatFriend
Messages: 14
Registered: June 2012
Junior Member
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: Fri Apr 19 04:27:06 GMT 2024

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

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

Back to the top