[ANN] PropertiesEditor Plugin 1.6.1b

Changes:

  • Rename properties with specified prefix refactoring(CtrlShiftF6 on property name)

  • Rerun search for usages supported

  • Some XML files find usages issues fixed

  • Bug fixes and small improvements provided


TIA,
Dmitry

13 comments
Comment actions Permalink

Well, there are good news and bad news.

The good news are that it finds the usage in my XML files now.

The bad news are a bunch of exceptions -
java.lang.NullPointerException
at com.intellij.psi.impl.source.l.getText(l.java:77)
at
com.propertiesEditor.propedit.findUsages.PropertyFindUsagesCommand.execute(P
ropertyFindUsagesCommand.java:65)
at
com.propertiesEditor.propedit.findUsages.PropertyUsageViewDescriptor$1.run(P
ropertyUsageViewDescriptor.java:35)
at com.intellij.openapi.progress.a.a.runProcess(a.java:55)
at com.intellij.openapi.l.a.c$1a_.run(c$1a_.java:3)

These happen when Java Classes are searched. After the exception the find
pane doesn't come up.

Other issues:
1. No checkbox for "open in new tab", results are always opened in new tab.
2. Definition of an entry and the XML usage are both listed in the "Probably
occurrences" subtree. XML usage should appear under usages. Also, the title
of "Probably occurrences. .." should be called definition IMO.

2013

Amnon

"Dmitry Kashin" <no_mail@jetbrains.com> wrote in message
news:22308038.1083190470363.JavaMail.itn@is.intellij.net...

Changes:

>

  • Rename properties with specified prefix refactoring(CtrlShiftF6 on

property name)

  • Rerun search for usages supported

  • Some XML files find usages issues fixed

  • Bug fixes and small improvements provided

>

TIA,
Dmitry



0
Comment actions Permalink

Hi,
If understand correctly search in java files doesn't working at all or some files processed and then exception encountered?
I'll fix this NPE but it reason not known.

About usages view issues it not in OpenAPI and in some cases is difficult to achieve equal to narive IDEA behaviour. But I'll try anyway. Earlier check box for open in new tab not possible for me.

Can you describe 2. more detailed. All usages actually jusr probably cause Find usages for properties is text search not structure.

TIA,
Dmitry

0
Comment actions Permalink

Hi,
PropertiesEditor Plugin 1.6.1c released
Some reported issues fixed

TIA,
Dmitry

0
Comment actions Permalink

Exception solved!

Amnon
"Dmitry Kashin" <no_mail@jetbrains.com> wrote in message
news:25185672.1083234174869.JavaMail.itn@is.intellij.net...

Hi,
PropertiesEditor Plugin 1.6.1c released
Some reported issues fixed

>

TIA,
Dmitry



0
Comment actions Permalink

Well, I think that "Probably occurrances" is not correct English, if it
comes from your plug-in it should at least be "Probable occurrances".

Also, as for 2, I think that even though it is a string search, since the
center is a property file, the definition is here and the usages (or
probable usages) are in other files.

Amnon

"Dmitry Kashin" <no_mail@jetbrains.com> wrote in message
news:27769756.1083220047901.JavaMail.itn@is.intellij.net...

Hi,
If understand correctly search in java files doesn't working at all or

some files processed and then exception encountered?

I'll fix this NPE but it reason not known.

>

About usages view issues it not in OpenAPI and in some cases is difficult

to achieve equal to narive IDEA behaviour. But I'll try anyway. Earlier
check box for open in new tab not possible for me.
>

Can you describe 2. more detailed. All usages actually jusr probably cause

Find usages for properties is text search not structure.
>

TIA,
Dmitry



0
Comment actions Permalink

Hi,
Any feedback on CtrlShiftF6 feature? Exisiting implementation not so good and your ideas highly appreciated.

TIA,
Dmitry

0
Comment actions Permalink

Hi,

I just tried it.

Issues:
1. Checkboxes don't behave well on Shift click (the list control is a
multiple select but the checkboxes don't behave accordingly.
2. When the cursor is an entry name when pressing CtrlShiftF6 the dialog
shows up with the entry id in the edit box but no entries in the select box
instead of showing the entry (or duplicated entries) in there. Clicking the
select box causes an exception.
3. When the cursor is in an entry value CtrlShF6 doesn't bring the dialog.
I think it should bring it up with the entry id as if the cursor were on the
entry name.
4. It would be nice if you supported not only entries that start with
something but also wildcards (e.g. *TITLE)
5. If there is a selection of a part of an entry name it would be cool if
the dialog came up with a smart wildcard.
Examples:
a. CPU_TITLE_ID, CPU is selected - dialog comes up with CPU in the edit
box and everything that starts with CPU in the select box.
b. CPU_TITLE_ID, TITLE is selected - dialog comes up with *TITLE in the
edit box and everything that matches it (e.g. DISK_TITLE_NAME, TITLE,
TITLE_1)
6. It would be nice if in the editor the Ctrl+Arrow would stop at the
current delimiter.
7. CtrlShiftF6 on a 'directory' or entry in the tree should also work,
probably in an accumulative way (i.e. accumulate all the 'path' including
the selected directory or entry.

Other issues:
1. I feel annoyed when a progress bar fills up more than once on an
operation, as it is misleading. Just like when IJ downloads updated plug-ins
the progress bar spans the whole operation (multiple files), I would like to
see your search progress bar fill up only once, including all the files
(Java, non Java, etc.) while still updating the text above it.
2. Fully expanding the tree from the toolbar seems to take as much time as
it takes to do the initial parsing. Why? Collapsing the tree is almost
instantaneous and so is changing the delimiter.

This plug-in is already turning to be a very useful tool in our development,
I am happy I can make these small contributions...

Amnon

"Dmitry Kashin" <no_mail@jetbrains.com> wrote in message
news:11772678.1083300286587.JavaMail.itn@is.intellij.net...

Hi,
Any feedback on CtrlShiftF6 feature? Exisiting implementation not so

good and your ideas highly appreciated.
>

TIA,
Dmitry



0
Comment actions Permalink

Another issue: the strange state of "modified read-only" is still there.

"Dmitry Kashin" <no_mail@jetbrains.com> wrote in message
news:11772678.1083300286587.JavaMail.itn@is.intellij.net...

Hi,
Any feedback on CtrlShiftF6 feature? Exisiting implementation not so

good and your ideas highly appreciated.
>

TIA,
Dmitry



0
Comment actions Permalink

CTRL-SHIFT F6 dialog

Got this stack trace when I clicked in the empty list below the "Starts with.." text box

Error message: Error during dispatching of java.awt.event.MouseEvent[MOUSE_CLICKED,(183,89),button=1,modifiers=Button1,clickCount=1] on dialog2
java.lang.ArrayIndexOutOfBoundsException: -1

at java.util.Vector.elementAt(Vector.java:434)

at javax.swing.DefaultListModel.getElementAt(DefaultListModel.java:70)

at com.propertiesEditor.propedit.refactoring.rename.ui.SmartRenamePropertyDialog$1.mouseClicked(SmartRenamePropertyDialog.java:59)

at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:212)

at java.awt.Component.processMouseEvent(Component.java:5103)

at java.awt.Component.processEvent(Component.java:4897)

at java.awt.Container.processEvent(Container.java:1569)

at java.awt.Component.dispatchEventImpl(Component.java:3615)

at java.awt.Container.dispatchEventImpl(Container.java:1627)

at java.awt.Component.dispatchEvent(Component.java:3477)

at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)

at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3207)

at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)

at java.awt.Container.dispatchEventImpl(Container.java:1613)

at java.awt.Window.dispatchEventImpl(Window.java:1606)

at java.awt.Component.dispatchEvent(Component.java:3477)

at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)

at com.intellij.ide.r.b(r.java:43)

at com.intellij.ide.r.a(r.java:86)

at com.intellij.ide.r.dispatchEvent(r.java:99)

at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:141)

at java.awt.Dialog$1.run(Dialog.java:540)

at java.awt.Dialog.show(Dialog.java:561)

at com.intellij.openapi.a.b.a$d_.show(a$d_.java:2)

at com.intellij.openapi.a.b.a.show(a.java:90)

at com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:669)

at com.propertiesEditor.propedit.refactoring.rename.SmartRenamePropertyProcessor.rename(SmartRenamePropertyProcessor.java:47)

at com.propertiesEditor.propedit.action.SmartRenamePropertyAction.actionPerformed(SmartRenamePropertyAction.java:36)

at com.intellij.openapi.n.b.e.a(e.java:74)

at com.intellij.openapi.n.b.e.b(e.java:53)

at com.intellij.openapi.n.b.e.a(e.java:2)

at com.intellij.ide.r.a(r.java:5)

at com.intellij.ide.r.dispatchEvent(r.java:99)

at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java: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)

0
Comment actions Permalink

Cosmetic stuff:

1. The menu option "Refactor->Rename Properies" is misspelled - should be "Rename Properties"

2. "Rename specified properties with names start with" should be "Rename properties names that start with"

3. "To properties start with" should be "To names that start with"

4. If you change the "starts with" value, then the rename preview screen displays the wrong title. For example, I selected a property called "z" and pressed CTRL-SHIFT-F6. Then I changed the prefix in the dialog to "build" to list "build.xxx" properties. When I selected ok, the rename preview was titled "Rename of "z" preview", whereas it should be titled "Rename of "build" preview"


0
Comment actions Permalink

I tried to do a CTRL-SHIFT-F6 rename properties from

"build" to "fix".

I had all of the file types selected (java, jsp, property, xml, ant).

When I selected OK I got the following exception:

Error message: Unexpected duplicated usage!
java.lang.Throwable

at com.intellij.openapi.diagnostic.Logger.error(Logger.java:30)

at com.intellij.usageView.a.d$e_.foundUsage(d$e_.java:89)

at com.intellij.usageView.a.d.a(d.java:304)

at com.intellij.usageView.a.d.a(d.java:447)

at com.intellij.usageView.a.d.access$500(d.java:355)

at com.intellij.usageView.a.d$2.run(d$2.java:1)

at com.intellij.openapi.l.a.c.runReadAction(c.java:165)

at com.intellij.usageView.a.d.a(d.java:550)

at com.intellij.usageView.a.d.r(d.java:193)

at com.intellij.usageView.a.d.(d.java:93) at com.intellij.usageView.a.g.(g.java:331) at com.intellij.usageView.a.g.]]>(g.java:35)

at com.intellij.usageView.a.i.addContent(i.java:24)

at com.propertiesEditor.propedit.refactoring.rename.SmartRenamePropertyProcessor.rename(SmartRenamePropertyProcessor.java:54)

at com.propertiesEditor.propedit.action.SmartRenamePropertyAction.actionPerformed(SmartRenamePropertyAction.java:36)

at com.intellij.openapi.n.b.e.a(e.java:74)

at com.intellij.openapi.n.b.e.b(e.java:53)

at com.intellij.openapi.n.b.e.a(e.java:2)

at com.intellij.ide.r.a(r.java:5)

at com.intellij.ide.r.dispatchEvent(r.java:99)

at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java: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)

0
Comment actions Permalink

After ignoring this exception I viewed the rename preview.

The list of changes in an ant file were not highlighted corrected:



Attachment(s):
rename-properties-preview.GIF
0
Comment actions Permalink

It would be nice to have a select all, select none and invert selection in
the CtrlShiftF6 dialog. Also, it would be easier to just remove the
checkboxes and use item selection (click, shift-click, ctrl+click).

Otherwise, on the surface it looks very nice (still no wildcards) with a lot
of little enhancements. It will probably take some use to find more
complaints :)

Cheers,

Amnon

"Dmitry Kashin" <no_mail@jetbrains.com> wrote in message
news:22308038.1083190470363.JavaMail.itn@is.intellij.net...

Changes:

>

  • Rename properties with specified prefix refactoring(CtrlShiftF6 on

property name)

  • Rerun search for usages supported

  • Some XML files find usages issues fixed

  • Bug fixes and small improvements provided

>

TIA,
Dmitry



0

Please sign in to leave a comment.