Opening a project for command line tool

My plugin is an ApplicationStarter (command line tool); the main() method is properly called but when I try to open a project as following:

ProjectManager.getInstance().loadAndOpenProject(projectFileName);

IDEA is opening a window (?) and I got the following exception:

2005-07-30 19:44:27,359 INFO - om.intellij.util.ProfilingUtil -
java.lang.Exception: To profile application, you should run it with the profiler agent
at com.yourkit.api.Controller.a(a:24)
at com.yourkit.api.Controller.(a:78) at com.intellij.util.ProfilingUtil.initController(ProfilingUtil.java:35) at com.intellij.util.ProfilingUtil.(ProfilingUtil.java:31) at com.intellij.util.CaptureMemorySnapshotAction.update(CaptureMemorySnapshotAction.java:6) at com.intellij.openapi.actionSystem.impl.Utils.expandActionGroup(Utils.java:44) at com.intellij.openapi.actionSystem.impl.ActionToolbarImpl.updateActions(ActionToolbarImpl.java:179) at com.intellij.openapi.actionSystem.impl.ActionToolbarImpl.(ActionToolbarImpl.java:13) at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.createActionToolbar(ActionManagerImpl.java:189) at com.intellij.openapi.wm.impl.IdeRootPane.a(IdeRootPane.java:1) at com.intellij.openapi.wm.impl.IdeRootPane.updateToolbar(IdeRootPane.java:20) at com.intellij.openapi.wm.impl.IdeRootPane.(IdeRootPane.java:33) at com.intellij.openapi.wm.impl.IdeFrame.]]>(IdeFrame.java:42)
at com.intellij.openapi.wm.impl.WindowManagerImpl.allocateFrame(WindowManagerImpl.java:105)
at com.intellij.openapi.wm.impl.ToolWindowManagerImpl.projectOpened(ToolWindowManagerImpl.java:559)
at com.intellij.openapi.project.impl.ProjectImpl.c(ProjectImpl.java:240)
...

Am I doing something wrong? Is that normal that IDEA is opening a window? What is this error about profiling?


Cheers,
_marc

1 comment
Comment actions Permalink



I've figured out the issue with the "profiling agent" error; I was trying to run the "ApplicationStarter" from a "sandbox" target; it seems it does not work properly.

I still have one question: is that possible to have NO window/GUI opened at all when running a "plugin" from the command line (typically during a night job)?

Thanks,
_marc

0

Please sign in to leave a comment.