Hi, On Mon, Nov 1, 2010 at 1:20 PM, Saminda Wijeratne <samin...@wso2.com> wrote:
> > > On Mon, Nov 1, 2010 at 11:23 AM, Harshana Martin <harsh...@wso2.com>wrote: > >> Hi Chathuri, >> >> This is exactly what's in my mind. Instead of IProject parameter, I am >> going to overload the method to accept Project Location parameter in String >> format. This will solve allow us to use the existing API inside Eclipse and >> the overloaded method can be used when we work outside of Eclipse. This >> change will be useful if we are going to support Maven for C-App projects as >> well. >> > > +1 > Harshana figure out what API level changes needed and do it now itself. > Sure. > Anyway the car exporting process is not still under direct API level > exposed to other parties. You will have to make checks where the eclipse UI > threads related tasks are not applicable and skip them. > I just tried to reuse the existing method of exporting a Car file. But it is almost impossible to reuse the existing implementation since we are heavily depending on the Eclipse Resources API. Therefore it is not a feasible option to reuse the existing implementation. Therefore I'm moving to Java IO to implement this Car Export method. Thanks and Regards, Harshana > > Saminda > > >> Thanks and Regards, >> Harshana >> >> >> On Mon, Nov 1, 2010 at 11:15 AM, Chathuri Wimalasena >> <chath...@wso2.com>wrote: >> >>> Hi Harshana, >>> >>> You can overload the existing CAR exporting method with different input >>> parameters, so that we can get the needed functionality with minimum API >>> changes to the existing API. This will enable us to use existing method when >>> using it inside eclipse (where we have the access to eclipse resources) and >>> use the new method when eclipse resources are not available. >>> >>> Regards, >>> Chathuri >>> >>> On Mon, Nov 1, 2010 at 10:52 AM, Harshana Martin <harsh...@wso2.com>wrote: >>> >>>> Hi All, >>>> >>>> I have worked this issue [0] and made a progress. I created an custom >>>> ant task and execute it. But there are few things i need to clarify before >>>> I >>>> continue. >>>> >>>> Current Car Export method (* >>>> org.wso2.carbonstudio.eclipse.capp.project.utils.CAppUtils.generateCAR(...) >>>> *) requires 3 input parameters as String savePath, IProject >>>> selectedProject, boolean stratosEnabled. But if we are going to build the >>>> C-App from command line, it is bit problematic to get the value of >>>> the selectedProject as it is an Eclipse Workspace related information and >>>> when we are using the command line, we don't have the access to the >>>> workspace. If we try to use Eclipse Resource API, we get an >>>> IllegalStateException saying that workspace is closed. >>>> >>>> IMHO first, i don't think it is a good practice to expect Eclipse >>>> Specific data from a command line user and second, i don't think we have a >>>> mechanism of retrieving that data unless we read the .project file. Even >>>> though we read and get the project name, it would not be that easy to >>>> provide it as an IProject type parameter since it is an Eclipse Resource >>>> API >>>> related. Even if we provide that as an IProject type parameter, we cannot >>>> execute Eclipse runtime related code from command line. For example, if we >>>> try to execute "*ResourcesPlugin.getWorkspace().getRoot().getProject()*" >>>> from console, this gives the same IllegalStateException for workspace. >>>> Therefore we need an alternative. Hence, I propose that we use some Eclipse >>>> unrelated mechanism to Car Export process. This needs to be a minor API >>>> change. I propose, we provide the Location of the project. Then we can >>>> retrieve the root-artifact.xml file and retrieve information about all the >>>> existing artifacts from it and export them as a car file. WDYT? >>>> >>>> [0]. https://wso2.org/jira/browse/TOOLS-376 >>>> >>>> -- >>>> Harshana Martin >>>> Software Engineer >>>> WSO2 Inc. >>>> Web:http://wso2.com >>>> >>>> Mobile: +94 716062650 >>>> Blog: http://harshana05.blogspot.com >>>> Profile: https://www.google.com/profiles/harshana05 >>>> >>>> >>>> _______________________________________________ >>>> Carbon-dev mailing list >>>> Carbon-dev@wso2.org >>>> https://wso2.org/cgi-bin/mailman/listinfo/carbon-dev >>>> >>>> >>> >>> _______________________________________________ >>> Carbon-dev mailing list >>> Carbon-dev@wso2.org >>> https://wso2.org/cgi-bin/mailman/listinfo/carbon-dev >>> >>> >> >> >> -- >> Harshana Martin >> Software Engineer >> WSO2 Inc. >> Web:http://wso2.com >> >> Mobile: +94 716062650 >> Blog: http://harshana05.blogspot.com >> Profile: https://www.google.com/profiles/harshana05 >> >> >> _______________________________________________ >> Carbon-dev mailing list >> Carbon-dev@wso2.org >> https://wso2.org/cgi-bin/mailman/listinfo/carbon-dev >> >> > > _______________________________________________ > Carbon-dev mailing list > Carbon-dev@wso2.org > https://wso2.org/cgi-bin/mailman/listinfo/carbon-dev > > -- Harshana Martin Software Engineer WSO2 Inc. Web:http://wso2.com Mobile: +94 716062650 Blog: http://harshana05.blogspot.com Profile: https://www.google.com/profiles/harshana05
_______________________________________________ Carbon-dev mailing list Carbon-dev@wso2.org https://wso2.org/cgi-bin/mailman/listinfo/carbon-dev