Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] CDT Job Scheduler-Erratic behaviour

Hi,
 I tried user's newsgroup as well but did not get any response? Does someone here have any idea about what exactly is the problem?

Thanks,
Prateek

On Tue, Oct 26, 2010 at 11:37 AM, Prateek Verma <verma.prateek@xxxxxxxxx> wrote:

Hi,

I am using Eclipse CDT’s API to index a C project outside of Eclipse using a script which invokes a CLI developed for the purpose(using IApplication). The code mentioned below is a part of the IApplication. I am facing the problem that this code works perfectly when run from Eclipse(using Run Configuration). However, when the same code is invoked from command prompt using the script to invoke the CLI, the code highlighted does not execute.

 Apparently, the job scheduler behaves differently when invoked from inside Eclipse and when invoked from outside(?). Can someone suggest how to make the highlighted bit of code execute from CLI?


This code is meant to run on Eclipse for Linux.

Any pointers?

 

private void callJoinIndexer()

        throws Exception

    {

       private static final IIndexManager PDOMMANAGER= CCorePlugin.getIndexManager();

       System.out.println(prependIOXCLIPluginId(new StringBuffer(INFO_MSG_ABOUT_TO_SLEEP_FOR)

            .append(12000).append(ms).toString())); // parasoft-suppress

        // MISC.SIO

        // "This is a CLI and System.out's are needed for user feedback."

        Thread.sleep(12000);

 

        final IIndexManager im = CCorePlugin.getDefault().getIndexManager();

        final IJobManager jm = Job.getJobManager();

 

                    

            if (jm.find(im).length > 0)

            {

                System.out.println(prependIOXCLIPluginId("Indexer job scheduled - "

                    + System.currentTimeMillis()));

                System.out

                    .println(prependIOXCLIPluginId(INFO_MSG_ABOUT_TO_EXECUTE_JOIN_INDEXER_METHOD)); // parasoft-suppress

                // MISC.SIO

                // "This is a CLI and System.out's are needed for user feedback."

                FPDOMMANAGER.joinIndexer(IIndexManager.FOREVER, new NullProgressMonitor());

 

                indexManagerScheduledOnce = true;

 

                break;

            }

                      

        }
Thanks in advance,

Prateek



Back to the top