How to convert JspxIncludePathReferenceProvider for IntelliJ IDEA 8

By : talanb
Source: Stackoverflow.com
Question!

I wrote an IntelliJ IDEA plugin for version 7.0 that uses JspxIncludePathReferenceProvider to allow autocomplete in a custom JSP tag (e.g. dsp:include src="/path/to/file.jsp").

The new version 8 of IntelliJ has changed the API for the Reference providers and I can't figure out how to convert this plugin for the new API.

Any suggestions?

By : talanb


Answers

JspReferenceProvidersUtil.PATH_REFERENCES_PROVIDER

By : nicity


Don't use expect, pexpect or the like to feed in a password. If you do that, your password has to be somewhere in plaintext, which can actually be less secure than using a passwordless public/private key pair. And it's more work!

Read this page from "SSH: The Definitive Guide" for a discussion of your options: http://www.snailbook.com/faq/no-passphrase.auto.html

By : slinkp


expect is out of the question because I would like to run it as a cron job, and since cron jobs don't run under a terminal the combination of expect/ssh just doesn't work

You can run expect scripts from cron, at least you can with expect libraries like "pexpect" for Python. I just tested this to confirm, running a pexpect scp/ssh script from cron and I was able to successfully scp a file from a Python script running in cron.

Example code:

#!/usr/bin/python

import pexpect

FILE="/path/to/file"
REMOTE_FILE=""
USER="user"
HOST="example.com"
PASS="mypass"
COMMAND="scp -oPubKeyAuthentication=no %s %[email protected]%s:%s" % (FILE, USER, HOST, REMOTE_FILE)

child = pexpect.spawn(COMMAND)
child.expect('password:')
child.sendline(PASS)
child.expect(pexpect.EOF)
print child.before
By : Jay


This video can help you solving your question :)
By: admin