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.

Bug 244308

Summary: Split extexecution to have a base API with minimal dependencies
Product: platform Reporter: Petr Hejl <phejl>
Component: ExecutionAssignee: Petr Hejl <phejl>
Status: RESOLVED FIXED    
Severity: normal CC: apireviews, tmysik
Priority: P2 Keywords: API, API_REVIEW_FAST
Version: 8.0   
Hardware: PC   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:
Bug Depends on:    
Bug Blocks: 247200    
Attachments: the patch
the patch
the patch

Description Petr Hejl 2014-05-05 15:23:55 UTC
Some other projects both Oracle and non-Oracle has requested a External Execution API that would have a really minimal (and small in size) dependencies.

This change introduce the extexecution.base for now on execution_split and later on server_split branch of jet-main. It only depends on org.openide.util.base and org.openide.util.lookup. The base API provides all the important machinery not related to the IDE.

The change is fully source and binary compatible. Old APIs are deprecated but still usable.

The change also incorporates some minor improvements from stalled issue #232434.

I plan to rewrite the clients to new methods before it will eventually get merged to default branch. In future deprecated methods and classes may be removed though it is not planned for now.
Comment 1 Petr Hejl 2014-05-05 15:39:43 UTC
Created attachment 147117 [details]
the patch
Comment 2 Petr Hejl 2014-05-05 15:43:57 UTC
Please review.
Comment 3 Jaroslav Tulach 2014-05-06 10:35:41 UTC
$ hg diff --git 
might provide more insight into what is going on...
Comment 4 Petr Hejl 2014-05-06 12:24:12 UTC
Created attachment 147136 [details]
the patch
Comment 5 Petr Hejl 2014-05-06 12:33:10 UTC
(In reply to Jaroslav Tulach from comment #3)
> $ hg diff --git 
> might provide more insight into what is going on...
I'm sorry I forgot about that. Though it does not seem better. I guess I moved a module on the FS. Lesson learned :(

At least I can briefly describe what has been done:

-in package org.netbeans.api.extexecution ExecutionService and ExecutionDescriptor are still relevant, rest is deprecated and replaced by org.netbeans.api.extexecution.base.ProcessBuilder (and ProcessBuilder.getLocal()) and org.netbeans.api.extexecution.base.Processes

-org.netbeans.api.extexecution.input deprecated and refactored to org.netbeans.api.extexecution.base.input except four methods related to IO printing which have been moved to (existing) package org.netbeans.api.extexecution.print

-org.netbeans.spi.extexecution deprecated replaced by corresponding classes in org.netbeans.spi.extexecution.base

-org.netbeans.spi.extexecution.destroy.ProcessDestroyPerformer deprecated and replaced by org.netbeans.spi.extexecution.base.ProcessesImplementation
Comment 6 Petr Hejl 2014-05-06 12:44:17 UTC
Created attachment 147139 [details]
the patch

Forgot to hide constructor.
Comment 7 Petr Hejl 2014-05-12 08:17:02 UTC
Thanks for the review. I'll merge the change to server_split branch tomorrow.
Comment 8 Petr Hejl 2014-05-13 09:31:07 UTC
Merged to server_split branch dbb500a2d1fa.
Comment 9 Jaroslav Tulach 2014-05-14 09:47:26 UTC
I think the intention to split is OK. I'd however like to use this review opportunity to fix issue that I run into recently:

Y01 make sure the overview page in Javadoc (of the complex module) describes the most frequent usecase - e.g. how to execute something and show the result in OutputWindow.
Comment 10 Petr Hejl 2014-05-16 07:31:09 UTC
Fixed in jet-main, branch server_split 0d0619a64832.

(In reply to Jaroslav Tulach from comment #9)
> I think the intention to split is OK. I'd however like to use this review
> opportunity to fix issue that I run into recently:
> 
> Y01 make sure the overview page in Javadoc (of the complex module) describes
> the most frequent usecase - e.g. how to execute something and show the
> result in OutputWindow.
Comment 11 Quality Engineering 2014-10-18 05:13:12 UTC
Integrated into 'main-silver', will be available in build *201410180001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/0d0619a64832
User: Petr Hejl <phejl@netbeans.org>
Log: #244308 - Split extexecution to have a base API with minimal dependencies