Eryckz / pmip

Automatically exported from code.google.com/p/pmip
0 stars 0 forks source link

com.intellij.openapi.actionSystem.DataKeys #5

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?

Expected is "Loading core"

Instead I get

Loading plugin core:

An Error occured loading plugin:
  cannot load Java class com.intellij.openapi.actionSystem.DataKeys
  file:/Users/michael/Library/PHPStorm/WebIDE10/PMIP/lib/jruby-complete-1.5.0-patched.jar!/builtin/javasupport/java.rb:51:in `method_missing'
  /Users/michael/Documents/Dev/projects/creativeacceleration/xplane/xmac/code/cormvc/pmip/plugins/core/lib/context.rb:2
  /Users/michael/Documents/Dev/projects/creativeacceleration/xplane/xmac/code/cormvc/pmip/plugins/core/lib/context.rb:5:in `load'
  ./plugins/core/init.rb:5
  ./plugins/core/init.rb:21:in `load'
  <script>:21:in `plugin'
  <script>:3

Ready to go ...

What version of the product are you using? On what operating system?
PMIP 0.3 with PMIP-core-0.4.1.zip

Please provide any additional information below.
Hopefully this can be resolved. I'd like to see if it's possible to port some 
of Textmate's scripts over to PMIP.

Original issue reported on code.google.com by tlmcwi...@gmail.com on 18 Dec 2010 at 12:42

GoogleCodeExporter commented 9 years ago
This is in PHPStorm 1.0. Is this compatible? And if so are there plans to make 
it compatible to 2.0?

Thanks!

Original comment by tlmcwi...@gmail.com on 18 Dec 2010 at 12:44

GoogleCodeExporter commented 9 years ago
Same problem here, using RubyMine 3.1. I found bug report 
http://youtrack.jetbrains.net/issue/RUBY-3840?query=in+use which suggests to 
replace DataKeys with PlatformDataKeys or LangDataKeys. It solves the error, 
but the load of pmip core still fails for me with message:

  Loading plugin core:

  An Error occured loading plugin:
    cannot load Java class org.apache.tools.ant.DirectoryScanner
    file:/home/tomas/.RubyMine30/config/plugins/PMIP/lib/jruby-complete-1.5.0-patched.jar!/builtin/javasupport/java.rb:51:in `method_missing'
  /.../pmip/plugins/core/lib/files.rb:1
  /.../pmip/plugins/core/lib/files.rb:9:in `load'
  ./plugins/core/init.rb:9
  ./plugins/core/init.rb:21:in `load'
  <script>:21:in `plugin'
  <script>:1

What version of the product are you using? On what operating system?
PMIP 0.3 with either PMIP-core-0.4.0.zip or PMIP-core-0.4.1.zip

Original comment by Schi...@gmail.com on 18 Dec 2010 at 5:28

GoogleCodeExporter commented 9 years ago
Hi, thanks for reporting this. I knew the host plugin works in RubyMine and  
PHPStorm, but I've never actually tried a recent core bundle.Apologies for that.

I'll change the DataKeys as that bug report suggests. For the second issue it 
looks like RubyMine/PHPStorm don't ship with the ant jar (which 
DirectoryScanner is part of). This is a bit tricker to fix, I will have a go at 
fixing tomorrow....

Original comment by paulall...@gmail.com on 20 Dec 2010 at 12:31

GoogleCodeExporter commented 9 years ago
In order to get the core working (in some fashion) I suggest for now, doing the 
following locally:
- as previously suggested, in context.rb replace "import 
com.intellij.openapi.actionSystem.DataKeys" with "import 
com.intellij.openapi.actionSystem.PlatformDataKeys" - I will shortly release a 
new version of core with this change
- in init.rb remove the "load 'lib/files.rb'" - while I investigate alternative 
options

Original comment by paulall...@gmail.com on 20 Dec 2010 at 1:53

GoogleCodeExporter commented 9 years ago
There is a new version of the core bundle which has the DataKeys fixed. If 
ant.jar is not available in Intellij then it will load it from a copy in the 
core plugin. This makes the core bundle a lot bigger, so I hope for a better 
solution going forward, but it should at least make it usable for you now.

Please try PMIP-core-0.4.2.zip and let me know how that goes.

Tested in RubyMine 3.0.1

Original comment by paulall...@gmail.com on 20 Dec 2010 at 3:39

GoogleCodeExporter commented 9 years ago
First of all, no apologies needed! The possibilities of a project like this are 
immense and if it works as I suspect it does it allows for some pretty awesome 
flexibility. I'll have to learn more ruby though. :) As noted the idea is to 
bring the flexibility of TextMate's extensibility into PHPStorm, within reason 
of course.

I am able to load the new version though and will start experimenting a bit 
with it.  I was going to ask if it's possible to get PMIP to run arbitrary 
scripts like TextMate but I see there are a number of ways to call scripts from 
within Ruby. Nice.

Original comment by tlmcwi...@gmail.com on 20 Dec 2010 at 4:12

GoogleCodeExporter commented 9 years ago
I am not sure if there is a place I can ask this so please let me know what the 
appropriate place is.

My first TextMate plugin port to work within PMIP is working. Very very nice. 
The API you have for it is very nice and the examples help a ton. I'm only 
doing something simple at this point: replacing text with their html entities, 
i.e.

foo&bar
foo&bar

It's based on code from TextMate's function and it is working except I am not 
able to automatically replace the currently selected text with the updated 
text. Clipboard.set(encoded_text) works with an additional paste of course, and 
the refresh file system code almost works (based on code from link below) 
except that it seems to grab 1 more character after the position of the cursor 
when it does the file write. Is it possible to PMIP to replace selected text in 
the editor?

http://www.google.com/codesearch/p?hl=en#jlqlEkYGC3A/trunk/pmip/plugins/fxi/lib/
toggle_through_cases.rb&q=selection%20package:http://pmip%5C.googlecode%5C.com&d
=5

Original comment by tlmcwi...@gmail.com on 28 Dec 2010 at 2:40