This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Build: NetBeans IDE Dev (Build 20130705-2a0d2b28cb6d) VM: Java HotSpot(TM) 64-Bit Server VM, 23.21-b01, Java(TM) SE Runtime Environment, 1.7.0_21-b11 OS: Linux User Comments: janario: Running java aplication GUEST: pom.xml webservice client Stacktrace: java.lang.IllegalStateException: Fold has been already finished. at org.netbeans.core.output2.NbIO$IOFoldingImpl$NbIoFoldHandleDefinition.finish(NbIO.java:594) at org.openide.windows.FoldHandle.finish(FoldHandle.java:69) at org.netbeans.modules.maven.execute.cmd.ExecutionEventObject$Tree.finishFold(ExecutionEventObject.java:223) at org.netbeans.modules.maven.execute.CommandLineOutputHandler.processExecEvent(CommandLineOutputHandler.java:437) at org.netbeans.modules.maven.execute.CommandLineOutputHandler.trimTree(CommandLineOutputHandler.java:525) at org.netbeans.modules.maven.execute.CommandLineOutputHandler.completeTreeAtEnd(CommandLineOutputHandler.java:398)
Created attachment 136755 [details] stacktrace
Created attachment 137295 [details] Proposed Patch Patch for API change that adds some convenience methods to class FoldHandle.
The bug comes from Maven Project Support, but the FoldHandle could be more helpful if it's too complex or undesirable to manage state and structure of folds on the client side of the API. Milos, can you please check the attached patch? Would the new methods be useful for you? Thank you. (Suggestions for better method names are welcome.)
patch looks ok to me
Please review the following API changes in class FoldHandle: New methods: ------------ isFinished() getLastNestedFold() getCurrentNestedFold() silentFinish() silentStartFold(boolean) Thank you.
Created attachment 137400 [details] stacktrace tried to run a maven program
*** Bug 232997 has been marked as a duplicate of this bug. ***
(In reply to comment #5) > Please review the following API changes in class FoldHandle: > New methods: > ------------ > isFinished() > getLastNestedFold() > getCurrentNestedFold() > silentFinish() > silentStartFold(boolean) > Thank you. R01: Are the silent methods really necessary? Are the added methods isFinished() and getCurrentNestedFold() not sufficient for the api-client to safely call finish() or startFold()? R02: I do not think we want to catch(Exception)
Created attachment 137606 [details] Proposed Patch v2 > R01: [...] Are the added methods isFinished() and getCurrentNestedFold() not > sufficient for the api-client to safely call finish() or startFold()? Yes, the two methods are sufficient, other methods are just for API client convenience. If they are not implemented here, they'll be implemented in module maven (and maybe some others, e.g. ant). So I preferred richer API over duplication of code. If you think minimalistic API is better, I'll remove the extra methods. > R02: I do not think we want to catch(Exception) Indeed. Thank you. All possible problems are handled, so the try-catch is not needed.
(In reply to comment #9) > R01: [...] So I preferred richer API over duplication of code. > If you think minimalistic API is better, I'll remove the extra methods. I agree, the patch v2 looks ok to me.
Thank you, Ralph. It there are no other objections, I'll integrate the patch tomorrow. Thanks.
Integrated as http://hg.netbeans.org/core-main/rev/28fa0b528e68 Thank you for reviewing.
I'm changing subject of the issue to the original one and reassigning it to Projects/Maven. Milos, please check it. Thanks.
I guess this should be sufficient http://hg.netbeans.org/core-main/rev/38d2a6e17aff
Integrated into 'main-silver', will be available in build *201307262300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/28fa0b528e68 User: Jaroslav Havlin <jhavlin@netbeans.org> Log: #232316: Output Window: Make FoldHandle API more user-friendly
*** Bug 234378 has been marked as a duplicate of this bug. ***