[ANN] PropertiesEditor Plugin 1.8
Description:
Editor for properties files like built-in editors (highlighting, navigation, find usages, intentions, properties files specific features, bundle editing mode etc.)
Changes:
Find usages of property from java code(CtrlAltF7 on string represents actual property name from any file from project)
Rename property from java code(CtrlAltF6 on string represents actual property name from any file from project)
Goto property declaration from java code(CtrlAltD on string represents actual property name from any file from project)
Minor improvements and reported bugs fixes
TIA,
Dmitry
请先登录再写评论。
I wish I could try it, but the plug-in repository seems broken :(
Amnon
"Dmitry Kashin" <no_mail@jetbrains.com> wrote in message
news:4410196.1086902587481.JavaMail.itn@is.intellij.net...
navigation, find usages, intentions, properties files specific features,
bundle editing mode etc.)
>
actual property name from any file from project)
property name from any file from project)
represents actual property name from any file from project)
>
THis helps for a while :)
Find Property Usages is great, but doesn't show in XML files.
Out of curiosity - what do you parse on startup and what on opening of a
property file?
Amnon
"Dmitry Kashin" <no_mail@jetbrains.com> wrote in message
news:4410196.1086902587481.JavaMail.itn@is.intellij.net...
navigation, find usages, intentions, properties files specific features,
bundle editing mode etc.)
>
actual property name from any file from project)
property name from any file from project)
represents actual property name from any file from project)
>
Some problems I encountered (on 2111):
1. Stopping CtrlAltU in the middle:
Error message: SelectViewTable
com.intellij.openapi.progress.ProcessCanceledException
at com.intellij.openapi.progress.util.c.checkCanceled(c.java:58)
at com.intellij.openapi.progress.a.a$0.run(a$0.java)
at com.intellij.util.g.d.a(d.java:68)
at com.intellij.openapi.progress.a.a.checkCanceled(a.java:11)
at com.intellij.psi.f.f.bw.a(bw.java:5)
at com.intellij.psi.f.f.n.f(n.java:8)
at com.intellij.psi.f.f.n.getText(n.java:2)
at
com.propertiesEditor.propedit.action.PropertiesFindUnusedPropertiesFromBundl
eAction.findUnusedProperties(PropertiesFindUnusedPropertiesFromBundleAction.
java:237)
at
com.propertiesEditor.propedit.action.PropertiesFindUnusedPropertiesFromBundl
eAction.access$300(PropertiesFindUnusedPropertiesFromBundleAction.java:59)
at
com.propertiesEditor.propedit.action.PropertiesFindUnusedPropertiesFromBundl
eAction$5.run(PropertiesFindUnusedPropertiesFromBundleAction.java:178)
at com.intellij.openapi.progress.a.a.runProcess(a.java:0)
at com.intellij.openapi.f.b.c$1a_.run(c$1a_.java:3)
2. Sometimes clicking the menu bar of IJ while in PE causes an exception (I
don't know exactly when and of course it is not happening now when I want to
take the stack exception...
3. Ctrl+/ produces below exception. This may be due to the Comment plug-in.
com.intellij.openapi.editor.ReadOnlyModificationException: Attempt to modify
read-only document
at com.intellij.openapi.editor.b.m.deleteString(m.java:64)
at
com.propertiesEditor.propedit.controller.PropertiesFileEditorItem$7.run(Prop
ertiesFileEditorItem.java:478)
at com.intellij.openapi.command.a.a.executeCommand(a.java:71)
at
com.propertiesEditor.propedit.controller.PropertiesFileEditorItem$6.run(Prop
ertiesFileEditorItem.java:473)
at com.intellij.openapi.f.b.c.runWriteAction(c.java:88)
at
com.propertiesEditor.propedit.controller.PropertiesFileEditorItem.toggleLine
Comment(PropertiesFileEditorItem.java:471)
at
com.propertiesEditor.propedit.action.PropertiesCommentLineAction.actionPerfo
rmed(PropertiesCommentLineAction.java:34)
at com.intellij.openapi.b.a.e.a(e.java:8)
at com.intellij.openapi.b.a.e.b(e.java:154)
at com.intellij.openapi.b.a.e.a(e.java:27)
at com.intellij.ide.t.a(t.java:160)
at com.intellij.ide.t.dispatchEvent(t.java:133)
at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.ja
va:201)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java
:151)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
4. Can menu items be added to the context (right click) menu? Don't forget
the CtrlAltF7 in XML files as well...
Regards,
Amnon
"Dmitry Kashin" <no_mail@jetbrains.com> wrote in message
news:4410196.1086902587481.JavaMail.itn@is.intellij.net...
navigation, find usages, intentions, properties files specific features,
bundle editing mode etc.)
>
actual property name from any file from project)
property name from any file from project)
represents actual property name from any file from project)
>
Hi Amnon,
XML and JSP support will be added after full support in java.
On startup I'm parse all files that fit to bunles. On file opening if it not changed from startup parsing not performed. If delay exist it may be just tree building or something like this.
Are you experience performance issues?
By the way in next build kind of properties names completion will be added, but it so far from standard IDEA lookups for a while.
Any new RFE's?
TIA,
Dmitry
Hi Amnon,
You are really fast. I'll look into this issues.
TIA,
Dmitry
I am happy to contribute as much as I can to such a worthy effort and I
enjoy working with you.
Hey, have you voted for my Tshirt yet? :)
Amnon
"Dmitry Kashin" <no_mail@jetbrains.com> wrote in message
news:14563752.1087114922465.JavaMail.itn@is.intellij.net...
>
I'm move my "better i18n support" 20 voices to your request.
Almost all my votes casted to better JSP support but it useless as I'm see.
About progress bar exception it here for very long time appear stochastically and I'm cannot catch it cause it raise this bad exception window inside IDEA. :( The solution, may be to disable cancel in dialogs but it looks like bad solution.
TIA,
Dmitry
Cool!
Can anyone (JetBrains or other) comment on these intermittent exceptions?
Do they seem to be PE or API related?
Dmitry, if you want to run a test or extra debugging info version by me,
please do.
Regards,
Amnon
"Dmitry Kashin" <no_mail@jetbrains.com> wrote in message
news:29753060.1087117089492.JavaMail.itn@is.intellij.net...
>
see.
>
stochastically and I'm cannot catch it cause it raise this bad exception
window inside IDEA. :( The solution, may be to disable cancel in dialogs but
it looks like bad solution.
>
Actually I'm already resolve this problem don't know right or wrong but this problems was with Open API using.
Anyway in future versions this exception won't appear I'm hope.
TIA,
Dmitry
Dmitry Kashin wrote:
Can you add functionality to jsp files?
Thanks,
Jon
Jon Steelman wrote:
>> * Find usages of property from java code(CtrlAltF7 on string
>> represents actual property name from any file from project)
>> * Rename property from java code(CtrlAltF6 on string represents
>> actual property name from any file from project)
>> * Goto property declaration from java code(CtrlAltD on string
>> represents actual property name from any file from project)
Also, with the growing functionality, can you add documentation/help in
PE itself that gives a brief description of all the features?
TIA,
Jon
Hi Jon,
PE have readme file but I don't know where to place it :(
TIA,
Dmitry
JSP PSI is not stable and not so powerful as Java or XML as I'm see and adding this support postponed for now.
TIA,
Dmitry
Hi,
One could easily process java code fragments in JSP even now since the
PSI for them is nearly the same.
Dmitry Kashin wrote:
--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"
Why not a built-in reference like the regex plugin has...Could you give
access to it from IDE Settings > Properties editor?
Dmitry Kashin wrote:
Hi Maxim,
Do you know that use pure java in JSP is not so good? :)
This way feature most possible won't be used. There are so many generalization in JSP PSI and I'm hope when JSP 2.0 support will be added it would be better in this sense. Any way support for Pallada JSP will be added but a bit later after implementing more usefull features.
Also parralel support of Aurora and Pallada for now don't allow me to use PSI in full strength.
TIA,
Dmitry
Ok, I'll add in next build about tab with simple text pane contains readme file.
TIA,
Dmitry
Hi,
The jsp support is up to you, I would like to comment a little bit.
- Surely, the java code in jsp is not advised practice but missing
usages is significantly greater problem :) (given that it comes nerly
for free).
- JSP PSI should be nearly the same in 4.0 and 4.5. Overall, one could
pickup the property names from JspActions / JspAttributes also quite easily.
Dmitry Kashin wrote:
--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"
Hi,
I'm sorry my comments was not exactly for attributes, literals and so on JSP elements, but for other things which planned for a long time but still absolutely not implemented (for example externalization of strings placed in JSP files to be fair in java too :( but here it easier to do).
TIA,
Dmitry
Little example from XML.
I want to use something like ((XmlToken) psiElement).getTokenType() == XmlToken.XML_ATTRIBUTE_VALUE_TOKEN
But unfortuntely in Aurora and Pallada constant values different.
For java token types even constants class changed.
So until Pallada will be released it's difficult to release both branches compatible version.
TIA,
Dmitry
Is it possible to integrate PE more with 'normal' IJ functionality?
The following points come to mind:
1. Use IJ configured search key shortcust for property searches and same for
other parallel searches (e.g. rename).
2. Use structure pane for property structure (so that floating, docking and
pinning settings of it would apply).
3. Code style integration with the normal Colors and fonts.
4. File type integration.
We have talked about some of these before, but I feel that whatever is not
possible to do should produce tracker requests so that JetBrains will
provide the means to do these things.
Amnon
p.s. Dmitry, you didnd't comment about the Lomo camera. can you get one or
more for cheap?
"Dmitry Kashin" <no_mail@jetbrains.com> wrote in message
news:4410196.1086902587481.JavaMail.itn@is.intellij.net...
navigation, find usages, intentions, properties files specific features,
bundle editing mode etc.)
>
actual property name from any file from project)
property name from any file from project)
represents actual property name from any file from project)
>
Hi Amnon,
1. Some shortcuts may be configured already, they just spread across different contexts.
2. It would be very good but I'm think that PE will remain alone plugin that can use this API cause implemnting other editor will be very difficult.
3. No codestyle for now in PE, but when it appear (if it happens) would be good to have such API.
4. Already present in Pallada but still not utilized due parallel Aurora support for now.
PS. All such things like camera are already gone away from our countries in your direction :). May be Jetbrain's can help you in this instead of T-Shirt cause Lomo as I'm now was produced in St.Petersburgh.
TIA,
Dmitry
Hi,
I am curious why you operate on 'token' level, besides other issues, the
token ids ideed are changed quite often.
However, these issues would not arise if one uses XmlTag / XmlAttribute
(JspAction/JspAttribute)
Dmitry Kashin wrote:
--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"
Hi Maxim,
May be I'm wrong but this cause there no good samples.
So I use tokens cause findElementAt (or something like this don't remember exactly) returns token, as I'm see, and use PsiTreeUtils to get AttributeValueElemnETC looks like not very goo idea.
Correct me if I use PSI API in wrong way.
(There are so many ways to do same things and this the main reason of my troubles).
TIA,
Dmitry
Hi,
Surely, like following
PsiElement token = xmlFile.getElementAt(offset);
if (token!=null) {
XmlAttriburte attr = PsiTreeUtil.getParentOfType(token,new Class[]
{XmlAttribute.class});
}
Fill free to ask quetions.
Dmitry Kashin wrote:
--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"
Hi Maxim,
Thanks for suggestion. As I'm notice earlier
But if you suggest me do it this way, I'll implement it exactly like this.
TIA,
Dmitry
Uhm, with all those news and the recent development on the plugin I've lost track of all its features! Is there some documentation page listing all current version's shortcuts and so on?
In next build in settings pane will be added overview page where main features will be described.
About remaping keys:
All PE specific actions visible in menus can be remapped.
TIA,
Dmitry