[Ann] Copyright Plugin version 0.0.2

Update to the Copyright plugin. Use the plugin manager to get the latest.

New Features
- Update copyright notice automatically whenever a new class or interface is created.
Bug Fixes
- Ignore CVS directories.
- Fixed visibility/selection of 'Include subdirectories' checkbox
- Handle read-only files.
- No more exception trying to bring up the settings page with no project open.


Rick

2 comments

Hi Rick,

I keep getting the attached exception

Current command: Create Class

Last action: NewClass
or
Last action: NewInterface


great plugin,


Aiko

Rick Maddy wrote:

Update to the Copyright plugin. Use the plugin manager to get the latest.

New Features
- Update copyright notice automatically whenever a new class or interface is created.

Bug Fixes
- Ignore CVS directories.
- Fixed visibility/selection of 'Include subdirectories' checkbox
- Handle read-only files.
- No more exception trying to bring up the settings page with no project open.


Rick


com.intellij.util.IncorrectOperationException: Incorrect comment "/*

  • CopyrightPlugin (c) 2004 Your Corporation. All Rights Reserved.

*/
".
at com.intellij.psi.impl.r.createCommentFromText(r.java:248)
at com.maddyhome.idea.copyright.psi.UpdateJavaFileCopyright.createComment(UpdateJavaFileCopyright.java:147)
at com.maddyhome.idea.copyright.psi.UpdateJavaFileCopyright.updateComment(UpdateJavaFileCopyright.java:125)

at com.maddyhome.idea.copyright.psi.UpdateJavaFileCopyright.update(UpdateJavaFileCopyright.java:62)
at com.maddyhome.idea.copyright.util.CommandHelper$2.run(CommandHelper.java:44)
at com.intellij.openapi.command.impl.a.executeCommand(a.java:95)
at com.maddyhome.idea.copyright.util.CommandHelper$1.run(CommandHelper.java:38)
at com.intellij.openapi.application.a.b.runWriteAction(b.java:290)
at com.maddyhome.idea.copyright.util.CommandHelper.runUpdate(CommandHelper.java:34)
at com.maddyhome.idea.copyright.CopyrightPluginImpl$1.fileOpened(CopyrightPluginImpl.java:71)
at com.intellij.openapi.fileEditor.a.f.f(f.java:560)
at com.intellij.openapi.fileEditor.a.f.b(f.java:386)
at com.intellij.openapi.fileEditor.a.f.access$900(f.java:536)
at com.intellij.openapi.fileEditor.a.f$3.run(f$3.java)
at com.intellij.openapi.command.impl.a.executeCommand(a.java:95)
at com.intellij.openapi.fileEditor.a.f.a(f.java:93)
at com.intellij.openapi.fileEditor.a.f.openFile(f.java:99)
at com.intellij.openapi.fileEditor.a.f$1.run(f$1.java:3)
at com.intellij.openapi.command.impl.a.executeCommand(a.java:95)
at com.intellij.openapi.fileEditor.a.f.openTextEditor(f.java:166)
at com.intellij.codeInsight.d.a.b.cc$0.run(cc$0.java:3)
at com.intellij.openapi.application.a.b.runWriteAction(b.java:290)
at com.intellij.codeInsight.d.a.b.cc.a(cc.java:18)
at com.intellij.codeInsight.d.a.b.ca.a(ca.java:74)
at com.intellij.codeInsight.d.a.b.ca.invoke(ca.java:40)
at com.intellij.codeInsight.intention.b.u$8.run(u$8.java)
at com.intellij.openapi.command.impl.a.executeCommand(a.java:12)
at com.intellij.codeInsight.intention.b.u$0.run(u$0.java:8)
at com.intellij.openapi.application.LaterInvocator$FlushQueue.run(LaterInvocator.java:14)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:454)
at com.intellij.ide.q.b(q.java:61)
at com.intellij.ide.q.a(q.java:112)
at com.intellij.ide.q.dispatchEvent(q.java:50)
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)
ERROR - a.copyright.util.CommandHelper -
ERROR - a.copyright.util.CommandHelper - IntelliJ IDEA 4.0 Build #1171
ERROR - a.copyright.util.CommandHelper - JDK: 1.4.2_03
ERROR - a.copyright.util.CommandHelper - VM: Java HotSpot(TM) Client VM
ERROR - a.copyright.util.CommandHelper - Vendor: Sun Microsystems Inc.
ERROR - a.copyright.util.CommandHelper - OS: Windows XP
ERROR - a.copyright.util.CommandHelper - Last Action: ShowIntentionActions
ERROR - a.copyright.util.CommandHelper - Current Command: Create Class 'BITestHelper'
ERROR - a.copyright.util.CommandHelper -
com.intellij.util.IncorrectOperationException: Incorrect comment "/*

  • CopyrightPlugin (c) 2004 Your Corporation. All Rights Reserved.

*/
".
at com.intellij.psi.impl.r.createCommentFromText(r.java:248)
at com.maddyhome.idea.copyright.psi.UpdateJavaFileCopyright.createComment(UpdateJavaFileCopyright.java:147)
at com.maddyhome.idea.copyright.psi.UpdateJavaFileCopyright.updateComment(UpdateJavaFileCopyright.java:125)
at com.maddyhome.idea.copyright.psi.UpdateJavaFileCopyright.update(UpdateJavaFileCopyright.java:62)
at com.maddyhome.idea.copyright.util.CommandHelper$2.run(CommandHelper.java:44)
at com.intellij.openapi.command.impl.a.executeCommand(a.java:95)
at com.maddyhome.idea.copyright.util.CommandHelper$1.run(CommandHelper.java:38)
at com.intellij.openapi.application.a.b.runWriteAction(b.java:290)
at com.maddyhome.idea.copyright.util.CommandHelper.runUpdate(CommandHelper.java:34)
at com.maddyhome.idea.copyright.CopyrightPluginImpl$1.fileOpened(CopyrightPluginImpl.java:71)
at com.intellij.openapi.fileEditor.a.f.f(f.java:560)
at com.intellij.openapi.fileEditor.a.f.b(f.java:386)
at com.intellij.openapi.fileEditor.a.f.access$900(f.java:536)
at com.intellij.openapi.fileEditor.a.f$3.run(f$3.java)
at com.intellij.openapi.command.impl.a.executeCommand(a.java:95)
at com.intellij.openapi.fileEditor.a.f.a(f.java:93)
at com.intellij.openapi.fileEditor.a.f.openFile(f.java:99)
at com.intellij.openapi.fileEditor.a.f$1.run(f$1.java:3)
at com.intellij.openapi.command.impl.a.executeCommand(a.java:95)
at com.intellij.openapi.fileEditor.a.f.openTextEditor(f.java:166)
at com.intellij.codeInsight.d.a.b.cc$0.run(cc$0.java:3)
at com.intellij.openapi.application.a.b.runWriteAction(b.java:290)
at com.intellij.codeInsight.d.a.b.cc.a(cc.java:18)
at com.intellij.codeInsight.d.a.b.ca.a(ca.java:74)
at com.intellij.codeInsight.d.a.b.ca.invoke(ca.java:40)
at com.intellij.codeInsight.intention.b.u$8.run(u$8.java)
at com.intellij.openapi.command.impl.a.executeCommand(a.java:12)
at com.intellij.codeInsight.intention.b.u$0.run(u$0.java:8)
at com.intellij.openapi.application.LaterInvocator$FlushQueue.run(LaterInvocator.java:14)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:454)
at com.intellij.ide.q.b(q.java:61)
at com.intellij.ide.q.a(q.java:112)
at com.intellij.ide.q.dispatchEvent(q.java:50)
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

This is a bug I will fix shortly but there is a simple workaround.

Edit the comment in the Copyright property editor and ensure there are no blank lines after the comment and no newline after the comment's closing '/' character.

Rick

0

Please sign in to leave a comment.